- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have Intel Compiler 2015 Update 6 on OS X (10.10 Yosemite).
I'm compiling 2 programs each uses OpenMP (I use static linking for IPP + OpenMP).
When I run them one after the other the second program crashes (It doesn't matter which is first and which is second, at any order).
When I turn off the OpenMP (Remove -Qopenmp) all is working (Removing all OpenMP Pragma's will also make them work).
How can it be?
What makes them conflict with each other?
Just to clarify, on Windows they can run successively with no issue, so it is not some kind of a bug in the code.
Moreover, If I run any of them many times in succession all is working (Yet, there is no interaction between them what's ever).
Another question, I tried to use Dynamic Linking, yet then the program won't work (MacDependency will show libiomp5.dydl in red).
I installed Intel Redistributable (https://software.intel.com/en-us/articles/intelr-composer-redistributable-libraries-by-version) according to the version, yet it still didn't make libiomp5.dydl on the path.
How can I redistribute Intel Compiled programs which uses Intel Run Time?
I thought Intel Run Time would do the work, yet it won't (It will just put the files in the User Home Library).
Thank You.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Royi,
According to the stack your both modules (TonalRangeSelector and ALCEIT) linked with openmp library statically. It looks second openmp library detects second copy, writes something to console and calls abort. Have you tried to link _both_ modules with openmp dynamically? could you attach stack for such case?
thank you,
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
I'm actually trying to make a dynamic link yet I struggle with it and can't do it.
My host program (Photoshop) uses the same OpenMP Library (libiomp5.dylib) Yet I can't make the Plug In project to look for it.
You may have a look here:
http://stackoverflow.com/questions/40318465/setting-the-search-path-for-plug-in-dylib
On a side note, how come it is not an issue on Windows yet on OS X it crashes?
Moreover, why the second one "Sees" the first one.
The first one supposedly finished its work long before (It was called form Photoshop, processed data and returned the data).
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've answered on stackoverflow.
The short suggestion is to try to link with openmp library from photoshop. @rpath support was added to openmp library in 16.0 update 2 of compiler.
"Windows": There is no such problem on windows because there is no static openmp library:) if you use default link with import library there will be only one openmp library in the process.
"It sees": you can check __kmp_do_serial_initialize routine by downloading sources from openmprtl.org site or from llvm. First library writes environment variable during initialization. Second library checks it. As you can see from the crash report both libraries are in memory. First one sleeps, second one is being initialized.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But if I set Intel Run Time Library to Dynamic I have many more DyLib to link not only libiomp5.dylib.
Those I don't have version with @executable_path/../Frameworks/ of those.
Is there a way to compile the project with Static Intel Run Time besides libiomp5.dylib?
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-static-intel should help here.
the link to the page for 15.0 compiler. https://software.intel.com/en-us/node/523284
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
But -static-intel makes the libiomp5.dylib static as well (This is what we used so far).
So how can I use -static-intel and still have libiomp5 linked dynamically?
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
right, something is wrong with documentation, i'll ask to check. you should put neither -static-intel nor -shared-intel:)
my experiments show:
$ LIBRARY_PATH=.:$LIBRARY_PATH icc -qopenmp test1.cpp -Wl,-rpath,. $ otool -l ./a.out Load command 12 cmd LC_LOAD_DYLIB cmdsize 48 name @rpath/libiomp5.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 5.0.0 compatibility version 5.0.0 Load command 13 cmd LC_LOAD_DYLIB cmdsize 48 name /usr/lib/libc++.1.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 120.0.0 compatibility version 1.0.0 Load command 14 cmd LC_LOAD_DYLIB cmdsize 56 name /usr/lib/libSystem.B.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 1213.0.0 compatibility version 1.0.0 $ $ $ $ LIBRARY_PATH=.:$LIBRARY_PATH icc -qopenmp test1.cpp -Wl,-rpath,. -shared-intel $ otool -l ./a.out Load command 12 cmd LC_LOAD_DYLIB cmdsize 40 name libimf.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 0.0.0 compatibility version 0.0.0 Load command 13 cmd LC_LOAD_DYLIB cmdsize 40 name libsvml.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 0.0.0 compatibility version 0.0.0 Load command 14 cmd LC_LOAD_DYLIB cmdsize 40 name libirng.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 0.0.0 compatibility version 0.0.0 Load command 15 cmd LC_LOAD_DYLIB cmdsize 48 name @rpath/libiomp5.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 5.0.0 compatibility version 5.0.0 Load command 16 cmd LC_LOAD_DYLIB cmdsize 48 name /usr/lib/libc++.1.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 120.0.0 compatibility version 1.0.0 Load command 17 cmd LC_LOAD_DYLIB cmdsize 56 name /usr/lib/libSystem.B.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 1213.0.0 compatibility version 1.0.0 Load command 18 cmd LC_LOAD_DYLIB cmdsize 40 name libintlc.dylib (offset 24) time stamp 2 Thu Jan 1 03:00:02 1970 current version 1.13.0 compatibility version 1.0.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
You're the best.
I was wrong, I thought that -static-intel is equivalent of the choice of "Static Intel Run Time" in the Xcode.
It seems it does not and when we compile that way only libiomp5.dylib is dynamically linked.
Now, what I did is copy the libiomp5.dylib of Photoshop into the bundle (Sub folder named Frameworks) and used "install_name_tool -change" to update the binary file of the bundle.
Is there a better way to do so (Or make the compiler generate the bundle with the Framework folder and libiomp5.dylib in it)?
Could you explain me what you see in your example?
But the real question here, why does it work on Windows yet generates issues in OS X?
Thank You.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page