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*).
|
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

Comments
Here is the additional information.
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.
Akio, thank you a lot. I add the information you provided in the article.
See the related acticles at Intel Compiler KB
<<http://software.intel.com/en-us/articles/omp-error-15-initializing-libguidelib-but-found-libguide40dll-already-initialized/>>
<<http://software.intel.com/en-us/articles/omp-error-15-initializing-libguidedylib-but-found-libiomp5dylib-already-initialized/>>
I still have the problem, I deleted libguide40.dll. I built the OpenCv project once again.
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.
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?
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.
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.
ps: how do I subscribe to a thread on this forum? I don't think I get notifications when someone replies.
OK
Pages