In short, this is what all developers of IPP code must do, if OpenMP is used and if the bogus warning (Windows Command Prompt window with warnings) must be supressed:
1. Determine if CPU = Genuine Intel processor.
2. If not so, set KMP_AFFINITY=disabled in the global or local environment.
3. If so, implement Intel processor multiple core optimal threaded performance tuning by setting KMP_AFFINITY to appropiate values (global or local environment).
It appears to me that this cannot be implemented with IPP code. To determine if CPU = Genuine Intel processor, you can use support functions in IPP, but you cannot use IPP without first having set KMP_AFFINITY (chicken and egg problem?).
In my case, I cannot implement it since I have put IPP code in a custom dll, and I cannot load this dll to use cpu support functions without triggering the bogus warning (Windows Command Prompt window with warnings) on non-Genuine Intel processors. Thus, I'm forced to disable KMP_AFFINITY on all processors, possible lowering the highest possible performance for Genuine Intel processors.
Intel, please fix this issue soon.
Please take a look at another very simple way to set some environment variable programmatically. That was discussed
about two days ago. A link to a thread is:
and a Post #2 has an example.
What I can see that the 'KMP_AFFINITY problem' is hot and many developersare havingproblems.
Programatically setting a value in the Windows Environment is not an issue for me; I know well how to do that.
If you reread my text, please take a note of what I call my chicken and egg problem.
Or, must I repeat my text here?
If I haven't expressed my problem clearly, please indicate that fact.
KMP_AFFINITY=none is intended to leave control of thread placement up to the OS kernel facilities, so you can use taskset et al. (if on linux) or let the kernel scheduler look for open resources. One of the reasons for "none" is to allow multiple application instances to run together without KMP_AFFINITY causing them to contend for specific cores (if you didn't take care to set complementary allocations for each job).
1) foralmost all of IPP user, itdoesn't need to setthe KMP_AFFINITY for no-intel processors.
2) for who have seen the warning ( for example,you haveexplicitly call ippAffinity function in your code), please set environment variable KMP_AFFINITY= 'disable'
3) Regarding None vs. Disable.
Thomas is correct.I heard from Patrick, hehave confirmedthat none does not suppress warnings 71 & 72, only disabled does. So use KMP_AFFINITY= 'disable' if you run into the warning.