When I run my application which built base on the INTEL IPP on an AMD CPU, got the warning message, please see the attached screenshot. Please tell me how to remove it, thanks in advance.
i had the same problem, the best way is to set the enviorment variable "KMP_AFFINITY=disabled".
OpenMP environment variables could be easily set in a program andplease take a look at example:
int iRetCode = _putenv( "KMP_AFFINITY=disabled" );
if( iRetCode == 0 )
printf( "KMP_AFFINITY=%sn", getenv( "KMP_AFFINITY" ) );
printf( "Error: Failed to Set Environment Variable KMP_AFFINITYn" );
Thank you for your code, then I should detected the CPU in my application, if the CPU is AMD, then call your code, correct?
Yes, that is correct.
Please take into account that all OpenMP environment variables with a prefix 'KMP_' are Intel specific.
Thanks for the suggestion. That is right. The basic reason is that IPP is threaded by OpenMP, which provided by Intel Compiler.The warning message is from the OpenMP library. It is known issue and solved by set KMP_AFFINITY =NONE.
Here is detial discussion in Intel Comipiler Forum: http://software.intel.com/en-us/forums/showthread.php?t=100563
You are wrong. Since IPP 7 update 7 None does not work, only Disabled works.
I would prefer if Intel could fix this asap so all we users won't have to add strange workaround code. The world has other processor types than Intel... Our software is used in the world...
From Subject Received firstname.lastname@example.org Intel Software Network - Thread Subscription : Intel Integrated Performance Primitives, How to remove the warning when run IPP on AMD processor ? 03:40
Do you mean'None' doesn't work on computers withAMD CPU?
Unfortunately, I don't have a computer with AMD CPU and I can't verify.
My work pc is an AMD Phenom X4, 3.8GHz.I develop an IPP custom dll with a subset of IPP, enabling OpenMP, compiled with Intel C++ 10.2. This gives me a small dll with multithreaded codecs and image filters.
Since IPP 7.0, I got a unexceptable command prompt window (This is all on Windows 7) every time I loaded my custom dll (and calling ippStaticInit). This command prompt window is unacceptable for our users, as you might guess.
I then learned that by adding the kmp environment, I could supress the command prompt window.I first tried to add the environment inside my custom dll, but that did not work. I guess IPP was doing some initialization before my code was run. I then added the kmp to the (local) environment in the exe file, and that worked. At this tme, I used "None" and it worked. Later, with IPP 7.0.7 (Via Composer) the problem came back. I then changed to "Disabled", and that fixed it again, no command windows.
I strongly advise the people responsible for this problem to go out and buy an AMD computer, to verify their code before release. I don't know the real numbers, but I guess that AMD has 1/3 of all computers out there. IPP must be tested to also run on such platforms. If Intel can't do that, then IPP should be stated as "Only supported on Genuine Intel Processors", and then I will have to drop the product.
Thanksfor checking on this. We are looking at this problem, and will provide more information.
Yes, that is correct and environment variables have to be set in some executable module. It doesn't work iftheyset in a DLL module.
Can Intel please confirm Mr. Jensen's statement that "none' no longer works?
I want to add to my findings.I launched the precompiled Picnic application from the IPP 7 update 7 samples.This application use only IPP in dll files.Running this on my AMD did not trigger bogus warning command prompt windows.I do not have any KMP environment settings my my computer.Picnic uses libiomp5md.dll (KMP stuff), as I also do.
So why is this KMP warning not in Picnic but it is in my application?
We checked the affinity with IPP developer,all ofIPP functions ( primitives) haven'tlow-level affinity settings internally.There is several IPP functions (in Core domain) for low-level affinity control, like ippSetAffinity()for external purposes, but we only use these functions in the sample for Realistic Rendering (RR) domain.
So formost of applications, likePicnic application you won't seesuch problem. You mentioned, you are using image Filter in dll files, could you please give the function lists you are using orthe exacttest case?
Regarding theproblem of None doesn't work, but Disable works, I discussed withPatrick Kennedy (Intel). he'd like to check this. Could you please tell the result of using (set/export KMP_VERSION=1), then run the application.or a test case will be helpful.
If I set KMP_VERSION=1, I get this on my AMD:
OMP: Warning #72: KMP_AFFINITY: affinity only supported for Intel processors.
OMP: Warning #71: KMP_AFFINITY: affinity not supported, using "disabled".Intel OMP Copyright (C) 1997-2011, Intel Corporation. All Rights Reserved.Intel OMP version: 5.0.20111219Intel OMP library type: performanceIntel OMP link type: dynamicIntel OMP build time: 2011-12-19 17:12:07 UTCIntel OMP build compiler: Intel C++ Compiler 12.0Intel OMP alternative compiler support: yesIntel OMP API version: 3.1 (201107)Intel OMP tracefile support: noIntel OMP dynamic error checking: noIntel OMP helper thread support: yesIntel OMP thread affinity support: noIntel OMP debugger support version: 1.1Intel OMP Intel RML support: not using
However, I want to add more of my findings:
As I stated before, with IPP 7.0.7, I suddenly got the bogus warning when I used "none". Since I knew about "disabled", I just put that in, and the bogus warning went away. Then I started posting about this matter.However, right now I tested just removing KMP_AFFINITY. I now see no bogus warning. This answers two things:1. The reason Picnic has no bogus warning.2. The question when the bugfix for the bogus warning in 7.0.0 would come (the bugfix is in 7.0.7).
So, if I'm right, with 7.0.7 and on AMD systems, it is no longer neccesary to add the environment KMP_AFFINITY setting. Thank you, Intel. Sorry that I didn't see this earlier.
Beccause some .exe's may initialize the IPP DLLs on startup, wouldn't it be more accurate to state that the local environment variable has to be set before teh IPP DLLs are initialized? .
I've reported to the developers that setting KMP_AFFINITY=none is no longer a workaround to disable affinity warnings 71 & 72 on non-Intel processor hosts. Setting KMP_AFFINITY=disabled is still a viable workaround.
This is being tracked as defect DPD200232441. I'll keep this thread updated with news from the developers.
This is only a compiler issue with the Intel OpenMP runtime library libiomp5.so (Linux*) or libiomp5md.dll (Windows*).
Patrick KennedyIntel Developer Support
For IPP 7.0.7 (current), I want to add: Not setting (or clearing) KMP_AFFINITY is also a viable workaround.
Hello Thomas,>>>Not setting (or clearing) KMP_AFFINITY is also a viable workaround.
Thanks for pointing that out. It's true, if you don't do anything with KMP_AFFINITY, you won't see those warnings at all.
Regarding the problem report I filed, the OpenMP developer has already fixed the issue in the v13.0 OpenMP runtime library! The fix should appear in an update to the v13.0 beta compiler. The fix is already in our v13.0 development compiler:
$ export KMP_AFFINITY=none
$ icc -fopenmp helloOmp.cc && ./a.out
_OPENMP is defined for compiler.
Hello from thread 0 out of 4
Hello from thread 3 out of 4
Hello from thread 1 out of 4
Hello from thread 2 out of 4
I'm sorry to say this story is not finished yet.I tested on another AMD processor, and it did display the bogus KMP warning, when no KMP_AFFINITY was set.
It appears that this problem is dependent on what type AMD processor you use.
So, KMP_AFFINITY not set at all:
No KMP warnings: AMD Phenom II X4 "Deneb"Bogus KMP warnings: AMD Athlon 64 X2 "Toledo"
In other words, newer AMD no warnings, older AMD warnings unless KMP_AFFINITY=disabled is set.
I'd prefer that Intel fix this also.Setting KMP_AFFINITY locally (runtime) requires detecting cpu vendor first. IPP can do that but then it is too late. Do anyone have simple C++ code for cpu vendor detection?
Patrick, the OpenMP changes, will those not be added to the IPP Composer OpenMP library libiomp5md.dll also (when)?
Just notify that Compiler 13.0 (IPP 7.1 gold) release recently. Please feel free to test them.
The version should fix the problem Patrik mentioned in , 05/30/2012 .
" Regarding the problem report I filed, the OpenMP developer has already fixed the issue in the v13.0 OpenMP runtime library! The fix should appear in an update to the v13.0 beta compiler. The fix is already in our v13.0 development compiler"
I don't understand, If I use the latest compiler and IPP 7.1, is the problem fixed (Meaning I shouldn't care at all which CPU is being used)?
Or still the KMP property should be set?
Yes, the problem should be fix. From the issue's record,
Redo fix for DPD200175816. Suppress warning if KMP_AFFINITY=none
or KMP_AFFINITY=disabled, as welll as if KMP_AFFINITY is not set.
So whatever the CPU is, the warning is suppressed.