| September 6, 2009 6:00 AM PDT | |
Problem :
OMP abort: Initializing libguide40.dll, but found libiomp5md.dll already initialized.
This can cause performance degradation.
Set environment variable KMP_DUPLICATE_LIB_OK=TRUE if you want your program to continue in this case.
Root Cause :
Both libiomp5md.dll and libguide40.dll are Intel OpenMP Runtime library. The libiomp5md.dll is new Intel OpenMP* Compatibility library while the libguide40.dll is legacy OpenMP library. The Intel® IPP 6.x and Intel® Compiler 11.x threading libraries are switching from the legacy OpenMP* run-time library (libguide*) to the compatibility library (libiomp*).
The dynamic library, libguide40.dll, is still included in the current releases for backwards compatibility and will be removed in a future release.
The error is caused by multiple OpenMP libraries were linked in same application. For example, if a application link the libiomp5md.dll from IPP 6.x, at the same time, it also link other software, e.g third-party library, which link libguide40.dll, then the error arises because of the duplicate initialization of OpenMP Runtime library
Resolution :
Please remove one of them and keep only one OpenMP runtime library.
We recommend using and distributing libiomp5md.dll (located in the \bin directory), as libguide40 will be obsolete.
For the third-party library which have used the libguide40.dll from pervious IPP version, in order to avoid such kind of issue, we strongly recommend rebuild your library with libiomp5md.dll.
Test Case :
Here is a good example,
When build a application using the OpenCV 1.0 with Intel Compiler 11.0 Professional. And we could build it successfully but unable to run it with the following error.
OMP: Error #15: Initializing libiomp5md.dll, but found libguide40.lib already initialized.
There are a few workarounds and solutions on this issue.
1) Rebuild the OpenCV library using ICC 11, which use libiomp5 library, so no more library conflict happens.
2) Delete IPP PATH from system environment variable or runtime environment not to have OpenCV try to use IPP libraries.
3) Set KMP_DUPLICATE_LIB_OK=TRUE environment variable to ignore the library conflict, which is not really recommended to do though.
4) Use the latest OpenCV whose version is 1.1pre1. This versioned library is built with Microsoft OpenMP library "vcomp.dll" which is compatible with Intel OpenMP library "libiomp5md.dll". So we can use OpenCV + IPP6.x without any errors.
See another similar issue from here
OMP abort: Initializing libguide40.dll, but found libiomp5md.dll already initialized.
This can cause performance degradation.
Set environment variable KMP_DUPLICATE_LIB_OK=TRUE if you want your program to continue in this case.
Root Cause :
Both libiomp5md.dll and libguide40.dll are Intel OpenMP Runtime library. The libiomp5md.dll is new Intel OpenMP* Compatibility library while the libguide40.dll is legacy OpenMP library. The Intel® IPP 6.x and Intel® Compiler 11.x threading libraries are switching from the legacy OpenMP* run-time library (libguide*) to the compatibility library (libiomp*).
Note: The static OpenMP library is removed in Intel Parallel Studio 2011. So the problem like OMP abort: Initializing libiomp5mt.lib, but found libiomp5md.dll already initialized is avoidable if within Intel Parallel Studio 2011 and future version. Please see OpenMP library in Parallel Studio 2011
The dynamic library, libguide40.dll, is still included in the current releases for backwards compatibility and will be removed in a future release.
The error is caused by multiple OpenMP libraries were linked in same application. For example, if a application link the libiomp5md.dll from IPP 6.x, at the same time, it also link other software, e.g third-party library, which link libguide40.dll, then the error arises because of the duplicate initialization of OpenMP Runtime library
Resolution :
Please remove one of them and keep only one OpenMP runtime library.
We recommend using and distributing libiomp5md.dll (located in the \bin directory), as libguide40 will be obsolete.
For the third-party library which have used the libguide40.dll from pervious IPP version, in order to avoid such kind of issue, we strongly recommend rebuild your library with libiomp5md.dll.
Test Case :
Here is a good example,
When build a application using the OpenCV 1.0 with Intel Compiler 11.0 Professional. And we could build it successfully but unable to run it with the following error.
OMP: Error #15: Initializing libiomp5md.dll, but found libguide40.lib already initialized.
There are a few workarounds and solutions on this issue.
1) Rebuild the OpenCV library using ICC 11, which use libiomp5 library, so no more library conflict happens.
2) Delete IPP PATH from system environment variable or runtime environment not to have OpenCV try to use IPP libraries.
3) Set KMP_DUPLICATE_LIB_OK=TRUE environment variable to ignore the library conflict, which is not really recommended to do though.
4) Use the latest OpenCV whose version is 1.1pre1. This versioned library is built with Microsoft OpenMP library "vcomp.dll" which is compatible with Intel OpenMP library "libiomp5md.dll". So we can use OpenCV + IPP6.x without any errors.
See another similar issue from here
Do you need more help?
This article applies to: Intel® Integrated Performance Primitives Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (15) 
| February 4, 2009 8:24 PM PST
Ying H (Intel)
| Akio, thank you a lot. I add the information you provided in the article. |
| April 13, 2009 8:39 PM PDT
Ying H (Intel)
|
See the related acticles at Intel Compiler KB <<http://software.intel.com/en-us/articles/omp-error-15-initia.....ed/>> <<http://software.intel.com/en-us/articles/omp-error-15-initia.....ed/>> |
| September 17, 2009 8:20 PM PDT
Santhosh | I still have the problem, I deleted libguide40.dll. I built the OpenCv project once again. |
| September 18, 2009 9:32 AM PDT
Intel Software Network Support
|
Hello Santhosh, To obtain further support for this, please post this issue to the Intel(R) IPP forum, as support is not typically available in the page comments. -Lexi Intel(R) Software Network Support |
| October 7, 2009 10:11 AM PDT
gary-oberbrunner | This is a serious problem. My product is a plug-in; I link with Intel libs, and the host app may also link with Intel libs. I have no control over what the host does. There needs to be a solution that doesn't require the host to change. (I've submitted an issue already.) Changing a lib's name in an incompatible way, and causing the app to exit on an error, are both extremely bad practice IMHO. Did I miss some discussion last year or two years ago that this was going to screw my customers? |
| January 21, 2010 2:21 AM PST
Lev Nezhdanov (Intel) |
gary-oberbrunner wrote: > Changing a lib's name in an incompatible way, and causing the app to exit on an error, are both extremely bad practice IMHO. We had to change library name, because we want Intel OpenMP RTL is compatible with MS OpenMP RTL. However, it is not technically possible to be compatible with the previous version of Intel OpenMP RTL and MS one, because there are some functions with the same name in both libraries (libguide40.dll and vcomp.dll), but calling conventions differs. |
| March 9, 2010 2:41 PM PST
gary-oberbrunner |
Lev, "there are some functions with the same name in both libraries (libguide40.dll and vcomp.dll), but calling conventions differs" is just a restatement of the bug, not an explanation. Of course there are, and there should NOT have been! Please fix it so this conflict does not occur. Deprecate the old names, change them, make the new lib a wrapper for the old lib, or do whatever is needed. This is an extremely serious problem. There is no known solution for plug-ins and hosts to use Intel MKL at this time. In any case, FIX IT SO IT DOESN'T EXIT THE PROGRAM. Do this today, then worry about everything else. This hard exit causes untold customer hardship. |
| March 9, 2010 2:42 PM PST
gary-oberbrunner | ps: how do I subscribe to a thread on this forum? I don't think I get notifications when someone replies. |
| June 2, 2010 4:38 PM PDT
pat quarto | OK |
| February 6, 2011 1:29 PM PST
sawan | HOW and where to do this? ::>>Set KMP_DUPLICATE_LIB_OK=TRUE environment variable to ignore the library conflict |
| March 4, 2011 8:30 AM PST
Aung Tharn Daing
|
Dear Sir, My Problem for running Fortran is following: OMP: Error #15: Initializing libguide.lib, but found libiomp5md.dll already initialized. OMP: Hint: This may cause perofrmance degradation and correctness issues. Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore this problem and force the program to continue anyway. Please note that the use of KMP_DUPLICATE_LIB_OK=TRUE is unsupported and using it may cause undefined behavior. Please help me fix it to work properly. |
| March 6, 2011 5:03 PM PST
Ying H (Intel)
|
Hi Sawan, Aung, The quick workaround is to set environment vairable KMP_DUPLICATE_LIB_OK=TRUE in system, genereally, by click Control PanelSystem property or right click "my computer"=>Properties=>Advanced System setting=>Advanced=>Environmet Variables =>System Variables=>New... Variable name: KMP_DUPLICATE_LIB_OK Variable value:TRUE Then restart your application. If you'd like find why the error, then the key is to find where you use libguide.lib, or libguide40.dll libiomp5md.dll. Genererally, it may easy to find the libiomp5md.dll, libguide40.dll by your build log or dependency tool, for example MSVC2005 command line prompt=>depends. For detials, please submit your problem(including build log) to Forum. <<http://software.intel.com/en-us/forums/intel-math-kernel-library/>> Regards, Ying |
| May 4, 2011 8:41 AM PDT
Howard | I am using AMD nit Intel .. why I am i getting this error whenever I try to use Nero Vision?? |
| December 16, 2011 3:24 AM PST
David |
Hai Ying ! Is work! Thanks for the solutions.. The programs now can run. David |
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.
Related Link
Forum Discussion
Tags for this Page



Akio Yasu (Intel)
355
There are a few workarounds and solution on this issue.
1) Rebuild the OepnCV library with libiomp5 library, so no more library conflict happens.
2) Delete IPP PATH from system environment variable or runtime environment not to have OpenCV try to use IPP libraries.
3) Set KMP_DUPLICATE_LIB_OK=TRUE environment variable to ignore the library conflict, which is not really recommended to do though.
4) Use the latest OpenCV whose version is 1.1pre1. This versioned library is built with Microsoft OpenMP library “vcomp.dll” which is compatible with Intel OpenMP library “libiomp5md.dll”. So we can use OpenCV + IPP6.x without any errors.