Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

OMP Abort: libiomp5md.dll

vikrantca
Beginner
1,821 Views
Hello,
I have a Managed c++ dll that calls MKL 10.
I get the following error on some computers (but not on my development machine) when I run my program:

*************************************************************
OMP abort: Initializing libiomp5md.dll, but found libguide40.dll already initialized.
This may cause performance degradation and correctness issues.
Set environment variable KMP_DUPLICATED_LIB_OK=TRUE to ignore this problem and force the program to continue anyway.
..... < More Text about contacting Premier Support>
*********************************************************

Any help from the forum is appreciated, before I raise it to Support.

Thank you.

VA
0 Kudos
7 Replies
TimP
Honored Contributor III
1,821 Views
The message warns that you have linked both the VS2008 compatible debug OpenMP library, and the Intel "legacy" compatible library. You should avoid that. For example, if the C++ code includes an OpenMP library, you should not also link against libguide or libiomp from the MKL libraries. I suppose you must ensure that an application which uses your .dll doesn't invoke another version of the library. The docs warn against static linking of OpenMP libraries, supposedly to help avoid such problems.
0 Kudos
vikrantca
Beginner
1,821 Views
Thanks tim18.
I am currently linking the following libraries:

mkl_c_dll.lib
mkl_intel_thread_dll.lib
mkl_solver.lib
libiomp5md.dll

I read thru the documentation a couple of times, but still cannot get my hands around the new version 10 linking model.
I have a Managed C++ dll being developed in VS 2005 and this dll uses the following functionality from the MKL:
BLAS, LAPACK, Optimization Solver and VML

The dll will be called from other .NET languages to perform length calculations (large matrices etc.). The calling programs (C++.NET or C#) may run multiple threads that call my DLL (above). So I guess this is the scenario -

Main Application ==> Multiple Threads, Each Thread ==> Calls different functions, which in turn call different MKL routines.

Any suggestions on what the correct linking should be ?

Thanks.
VA



0 Kudos
TimP
Honored Contributor III
1,821 Views
If your project links with libguide elsewhere (as it would, if you used ICL -Qopenmp without theICL 10.1Qopenmplib option), you should not be specifying libiomp5md here.
0 Kudos
vikrantca
Beginner
1,821 Views
I dont explicity link with libguide any where else. Those are the only libs I have.

Thanks.
VA
0 Kudos
snellers1
Beginner
1,821 Views
I have the same problem. It appears that mkl_intel_thread.dll depends on libguide40.dll and will load it (using the dependency walker tool to discern this). It thus appears that you can't use mkl_intel_thread with libiomp5md??
0 Kudos
Vladimir_Lunev
New Contributor I
1,821 Views

Hi,

I confirm you can't use libiomp with dynamic MKL 10.0. The dynamic MKL is built with libguide40.lib. Officially the library libguide40.lib must be used to resolve threading functions. In the future MKL versions libiomp will be a single threading library in the MKL package, but now the static case only is working fine with libiomp.

Vladimir
MKL library engineering

0 Kudos
jontron
Beginner
1,821 Views

Hi,

I confirm you can't use libiomp with dynamic MKL 10.0. The dynamic MKL is built with libguide40.lib. Officially the library libguide40.lib must be used to resolve threading functions. In the future MKL versions libiomp will be a single threading library in the MKL package, but now the static case only is working fine with libiomp.

Vladimir
MKL library engineering


In MKL 10.1 update 1, it now appears that libguide40.dll doesn't work, and libiomp5md.dll is the only dll that works at runtime. This is the opposite behavior of MKL 10.0.

-Jon
0 Kudos
Reply