OMP: Error #15: Initializing libguide40.lib, but found libiomp5md.lib already initialized.
or vice versa message
This can cause performance degradation.
Set environment variable KMP_DUPLICATE_LIB_OK=TRUE if you want your program to continue in this case.
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. Since Intel® MKL 10.1.0.018 and Intel® Compiler 11.x and later, the default OpenMP runtime library for Intel MKL has been changed from libguide to libiomp. Please see </en-us/articles/openmp-support-change>
The error is caused by multiple OpenMP libraries were linked in same application. For example, you have two mkl versions MKL 10 and MKL 10.2.1 are linked in same appliation. The error arises because of the duplicate initialization of OpenMP Runtime library from MKL 10 which link libguide40 and MKL 10.2.1 which use libiomp5md .
Please note, the libguide40.dll sometimes were linked implicitly, e.g. by third-party library, custom dll or by dummy library mkl_c.lib in previous MKL version.
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 or custom dll which have used the libguide40.dll from pervious MKL version, in order to avoid such kind of issue, we strongly recommend rebuild your library with libiomp5md.dll and check if the third-party library has some version with libiomp5md.dll supported.
Otherwise, Otherwise, set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore the library conflict.
See similiar article for Intel® IPP