Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ILevi1
Valued Contributor I
48 Views

How to properly link with OpenMP?

How to properly link several static libraries which use OpenMP with an application which also uses OpenMP and avoid having to set that dreaded KMP_DUPLICATE_INIT_OK=TRUE?

0 Kudos
3 Replies
TimP
Black Belt
48 Views

Igor,

If you can make a simple example of this suitable for submission as a problem report, please do so. I agree that this issue needs a more definite answer.

ILevi1
Valued Contributor I
48 Views

And I thought I was doing something wrong here... I will try to create a stripped down example and post it here.

While we are at it, there is a similar issue (at least for me) with EXE which calls DLL if both have been statically linked with libguide. Should I make an example for that one as well?

TimP
Black Belt
48 Views

I'm not surprised about a problem with static linking with references to libguide both from the .dll and from the .exe. The problem would be expected in a case where one links the static libguide, and the other links the dynamic one, or in some other way the libraries aren't identical (libguide vs libiomp, or different releases). The release notes warn against static links. It would be good to ask for a definite answer whether it can be made to work when there is no such discrepancy.
Reply