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

OMP abort: Clearing __KMP_REGISTERED_LIB env var failed

guido4096
Beginner
2,683 Views
Dear,

I develop a product and have two integrate two thrid party libraries. One uses libguide40 and the other uses lbiomp5md. I cannot moveeither of the third party vendors to change how they are using the intel libraries. Obviously, my application generates the error:

OMP: Error #15: Initializing libiomp5md.dll, but found libguide40.lib already initialized.
OMP: Hint: This may cause performance 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 is unsupported and using it may cause undefined behavior. For more information, please see http://www.intel.com/software/products/support/.

This is a minor problem, setting the env var seems to solve it.

However, what I guess is related, at program exit I get this message:
MP abort: Clearing __KMP_REGISTERED_LIB env var failed
And the program ALWAYS exits with exitcode 3. This is a major problem for me. There are other processes that depend on a correct error code. How can I fix this?

Best Regards,

Guido Jansen

0 Kudos
10 Replies
Gennady_F_Intel
Moderator
2,683 Views

Do you have opportunity to rebuild the application which uses libguide* with libiomp5md.dll?We strongly recommend to do that first.

What version of MKL do you use?

--Gennady

0 Kudos
TimP
Honored Contributor III
2,683 Views
Pending a vendor update of the libraries to use consistent OpenMP libraries, you may be limited to use of mkl_sequential or an older MKL consistent with the libraries.
0 Kudos
guido4096
Beginner
2,683 Views
Hi Gennady,


No, I cannot build the application that uses libguide with iomp5md. I get DLL's from two different suppliers, I do not have access to the sourcecode. I cannot influence them enough to fix this in the required timeframe (6 months). They informed me they have other dependencies and cannot fulfill this request.

Is there another way to prevent the application to always exit with errorcode 3? This is my first concern. I'm surprised that intel chose this solution, I'm sure there must be a better way to do this migration.

Best Regards,

Guido
0 Kudos
guido4096
Beginner
2,683 Views
P.S. the dependency on one side is coming in through the intel fortran 9.1 compiler.
On the other side, it is coming in through ipp. For example: "ipps-6.1.dll is the ippSP dispatcher".
0 Kudos
Gennady_F_Intel
Moderator
2,683 Views
Guido,
the similar problem has been alredy fixed earlier. Could please check the version of libiomp you are using.
set the environment varaible KMP_VERSION=1 and execute your application.

you will have smth like I have with my local installation:

Intel OMP performance library (dynamic) ver. 20071022 (C) Copyright 1997-2007 by Intel Corporation
Intel OMP library built: Oct 22 2007, 13:14:08 using Intel C++ Compiler 9.1
........................
........................
Intel OMP performance library (dynamic) ver. 20071022 (C) Copyright 1997-2007 by Intel CorporationIntel OMP library built: Oct 22 2007, 13:14:08 using Intel C++ Compiler 9.1Intel OMP port libraryIntel OMP nested libraryIntel OMP alternative compiler supportIntel OMP sibling library

based on this info, I will check with owners of libiomp if this fix was available with this version or not.

--Gennady
0 Kudos
guido4096
Beginner
2,683 Views
These are messages I get from the two different libraries:

Intel OMP performance library (dynamic) ver. 20060120 (C) Copyright 1997-2005 by Intel Corporation

Intel OMP library built: Jan 20 2006, 16:47:52 using Intel C++ Compiler 8.1

Intel OMP port library

Intel OMP nested library

Intel OMP sibling library

Intel OMP no tracefile support

Intel OMP no consistency checking support

Intel OMP INTEGER*8 dynamic dispatch support

Intel OMP INTEGER*8 dynamic scheduling support

Intel OMP Helper Thread support



Intel OMP performance library (dynamic) ver. 20090212 (C) Copyright 1997-2009 by Intel Corporation

Intel OMP library built: Feb 12 2009, 15:50:13 using Intel C++ Compiler 10.1

Intel OMP port library

Intel OMP nested library

Intel OMP alternative compiler support

Intel OMP 3.0 support

Intel OMP sibling library

Intel OMP no tracefile support

Intel OMP no consistency checking support

Intel OMP INTEGER*8 dynamic dispatch support

Intel OMP INTEGER*8 dynamic scheduling support

Intel OMP Helper Thread support

Intel OMP debugger support version 1.1

0 Kudos
Gennady_F_Intel
Moderator
2,683 Views
Actually, both of these versions don't contain the fix of that problem. The fix available since the version20090623.
I am not sure about workaround, but may be you can try to use evaluation version one of the latest Intel Compilers ( > 11.1 ).These versions of compilers contain both versions of OpenMP runTime libraries ( libiomp and libguide ) with the fix of that problem.Then set system's path to this new dll's first and try to launch your application.It should help. That's all I can suggest right now.
--Gennady
0 Kudos
guido4096
Beginner
2,683 Views
Thanks for the information. I've taken thedlls from a recent intel compiler and the first test went ok, problem seems to be gone now. I'm now going to run the full test suite on 32 and 64 bit windows and see if all tests are ok now. This will take some more time.

For your information, the version of the libraries I now have included are below.

Is there anything I should particularly wathc out for? I'm now using newer version of only these libraries. Is this supposed to work well, or anything known that will blow up at some point?


Thanks for your support !

Guido



Intel OMP performance library (dynamic) ver. 4.0.20091005 (C) Copyright 1997-2009 by Intel Corporation

Intel OMP library built 2009-10-05 18:17:36 UTC using Intel C++ Compiler 10.1

Intel OMP port library

Intel OMP nested library

Intel OMP 3.0 support

Intel OMP sibling library

Intel OMP no tracefile support

Intel OMP no consistency checking support

Intel OMP INTEGER*8 dynamic dispatch support

Intel OMP INTEGER*8 dynamic scheduling support

Intel OMP Helper Thread support

Intel OMP not using thread affinity support

Intel OMP debugger support version 1.1



Intel OMP performance library (dynamic) ver. 5.0.20091005 (C) Copyright 1997-2009 by Intel Corporation

Intel OMP library built 2009-10-05 18:25:59 UTC using Intel C++ Compiler 10.1

Intel OMP port library

Intel OMP nested library

Intel OMP alternative compiler support

Intel OMP 3.0 support

Intel OMP sibling library

Intel OMP no tracefile support

Intel OMP no consistency checking support

Intel OMP INTEGER*8 dynamic dispatch support

Intel OMP INTEGER*8 dynamic scheduling support

Intel OMP Helper Thread support

Intel OMP not using thread affinity support

Intel OMP debugger support version 1.1

Intel OMP not using Intel RML support

0 Kudos
Gennady_F_Intel
Moderator
2,683 Views
glad to hear that -:). Please let us know the results. Developers of Openmp RunTime Library are highly intersting in this info.
--Gennady
0 Kudos
guido4096
Beginner
2,683 Views
So far, things are working out quite nice. I've now run a limited testsuite on32 and 64 bit windows and this works fine.

Next step is to run the entire testsuite, but this will take more time because I need to deploy the changes on the master build.
0 Kudos
Reply