KMP_Affinity

KMP_Affinity

Hi @all

under Win7Pro 64, AMD Athlon X4 645

i got an exception , first warning is :
OMP: Warinig #72: KMP_AFFINITY: affinitity only supportedfor Intel *...

second warnig is :

OMP: Warinig #71: KMP_AFFINITY: affinity is not supported, using "none"

and then the program crashes.

Any idear ?

Thx.

Ps: i used w_ccompxe_redist_ia32_2011.7.258.msm in the istall process

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Ronald W Green (Intel)'s picture

Correct, KMP_AFFINITY is only available for genuine intel architecture:

http://software.intel.com/en-us/articles/optimization-notice/

Even if you choose a KMP_AFFINITY option which isn't supported on AMD, resulting in the choice of "none," this would affect the execution of your program only if you have a race condition which can be papered over by a different mapping of threads to cores.
As KMP_AFFINITY doesn't impose a strict mapping, it's possible for the mapping to vary occasionally. You could try KMP_AFFINITY by the numbers, e.g.
set KMP_AFFINITY="proclist=[0-3],explicit"
to see if that will be accepted, and you could add the verbose option to see if it comes out the same as "none."
"idear" was a common pronunciation among my schoolmates when I was young, but that was a long time ago.
Note that it's confusing when you ask about Windows on the linux forum. People might not notice this and may not give the best answers.
KMP_AFFINITY is likely to be less effective on Windows than on linux, but your CPU ought not to depend on it.

Regarding OMP: Warning #72: & Warning #71:, there is a known issue with the 12.1.1 compiler when running an application compiled with -openmp on a host not containing a genuine Intel processor. As a workaround, set environment variable KMP_AFFINITY to 'none' or 'disabled'.

Patrick Kennedy

Intel Developer Support

Can Intel provide us with a simple high-level means to detect if we're on a genuine Intel processor on all Windows versions? Is there one registry variable we can check on all versions of Windows for an embedded "Intel" string or something? Patrick, I hope management there are aware of this product defect in an Intel product.

If I'm understanding the thread correctly, you are running a version where that known failure of KMP_AFFINITY=none has been corrected.
A high level way to see your CPU brand is "less /proc/cpuinfo"
If you add the ,verbose option to your KMP_AFFINITY string, you will see if your selection has been reset to "none" on account of not recognizing the CPU. In this case, your remedy is to employ taskset, using your superior knowledge of the platform architecture.
Permuting affinity should not break a correct program (as long as you don't overflow stack or memory by piling multiple threads per core), but it will detract from performance on a multiple CPU platform. It could happen on an Intel CPU newer than those for which your ifort was tested.
I'm sure that a lot of effort has been expended looking for ways for KMP_AFFINITY to work with the widest possible selection of CPUs. If it were easy, such a facility would even work on Windows with non-Intel software and hardware.
The open source tool hwloc should help with understanding of your platform topology and perhaps how to employ taskset with KMP_AFFINITY=none.

Quoting tfield98Can Intel provide us with a simple high-level means to detect if we're on a genuine Intel processor on all Windows versions?

[SergeyK] There is a high-level API from Microsoftto do what you want and this is WMI.
In case of alow level APIyou can use a '__cpuid' intrinsic function.

Is there one registry variable we can check on all versions of Windows for an embedded "Intel" string or something?

[SergeyK] I don't know ifthis is applicable for ALL versions of Windows but you can look at a registry key:

HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0
Best regards,
Sergey

Repeat Offender's picture

You can always execute the CPUID instruction with EAX = 0; the string 'GenuineIntel' will be contained in EBX:EDX:ECX for an Intel processor. Obviously you can do this with an ifort program with some difficulty.The difficulty level would be less if ifort provided an extension, but it's not that hard in any case given that you can just copy and paste the code from the web.

Login to leave a comment.