I am using psxe2020u4 for benchmarking CP2K on intel platform which uses intel's mkl at one of the math library.
I have compiled 3 versions of cp2k - -xCORE-AVX512+ zmm high, -xCORE-AVX512 + zmm low,-xCORE-AVX2.
i want to ensure that while running application compiled with xCORE-AVX2, only AVX2 instruction set should be used. Here are my queries -
a) MKL_ENABLE_INSTRUCTIONS variable is available with psxe2020u4?
b) do i need to set -
MKL_ENABLE_INSTRUCTIONS=AVX2 explicitly or
the run time will ensure that AVX2 routines are used (as application was compiled with xCORE-AVX2).
a) Yes, MKL_ENABLE_INSTRUCTIONS variable can be set in PSXE 2020 environment. To know more, please follow the below link:
b) For programs compiled with xCORE-AVX2, there is a possibility of falling back to other instruction sets (SSE): https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-...
It would be better to set the environment variable for greater control over the underlying instruction set.