Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

How to properly link with OpenMP?

levicki
Valued Contributor I
297 Views

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
Honored Contributor III
297 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.

0 Kudos
levicki
Valued Contributor I
297 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?

0 Kudos
TimP
Honored Contributor III
297 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.
0 Kudos
Reply