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.
OpenMP environment variables could be easily set in a program andplease take a look at example:[cpp] ... int iRetCode = _putenv( "KMP_AFFINITY=disabled" ); if( iRetCode == 0 ) printf( "KMP_AFFINITY=%sn", getenv( "KMP_AFFINITY" ) ); else printf( "Error: Failed to Set Environment Variable KMP_AFFINITYn" ); ... [/cpp]
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
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...
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
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.
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.
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.20111219
Intel OMP library type: performance
Intel OMP link type: dynamic
Intel OMP build time: 2011-12-19 17:12:07 UTC
Intel OMP build compiler: Intel C++ Compiler 12.0
Intel OMP alternative compiler support: yes
Intel OMP API version: 3.1 (201107)
Intel OMP tracefile support: no
Intel OMP dynamic error checking: no
Intel OMP helper thread support: yes
Intel OMP thread affinity support: no
Intel OMP debugger support version: 1.1
Intel 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.
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*).
Intel Developer Support
>>>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 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)?