- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fort and Xcode give error message on OS X El Capitan on run-time error when trying to use openmp
or mkl options. I have set DYLD_LIBRARIES_PATH parameter but it does not help.
This is the error message on ifort:
dyld: Library not loaded: @rpath/libmkl_intel_lp64.dylib
Referenced from: /Users/dorongepner/Documents/./a.out
Reason: image not found
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Doron,.
Looks like the problem caused by OS X 10.11 SIP. But it is really weird that setting DYLD_LIBRARY_PATH does not help.
Could you please share all the steps: linking the application, setting DYLD_LIBRARY_PATH, and running it?
Did you take a look at the section 'Dynamic Library Dependencies' here: https://software.intel.com/en-us/articles/os-x-1011-support-in-intel-parallel-studio-xe-2016
- 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
Could you please try to link your application with rpath set to MKL library dir (replace $MKLROOT with actual MKL directory)?
$ ifort -mkl -Wl,-rpath,$MKLROOT/lib try.f90
- 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
Oh it might happen because the application could not locate Intel OMP library (for the same reason: OS X SIP).
Could you please also add -Wl,-rpath,$ICLROOT/lib into the link line (libiomp5.dylib should be in $ICLROOT/lib)?
BTW, what MKL and ICL version do you use? Not sure about ICL, but MKL starts support OS X 10.11 since 11.3.1+ (almost the latest available version of MKL)...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I tried this and ifort actually works in command line. I cannot still run it on Xcode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for delay.
Once you create an executable via XCode (which doesn't work), could you please run the following and dump the result here?
$ otool -L a.out $ otool -l a.out | grep -A3 RPATH
This will help us to understand whether the problem is in the libraries or in the executable.
What MKL version and ICL do you use?
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any updates on this? I'm struggling with the same problem.
$ otool -l a.out | grep -A3 rpath name @rpath/libmkl_intel_lp64.dylib (offset 24) time stamp 2 Wed Dec 31 16:00:02 1969 current version 0.0.0 compatibility version 0.0.0 -- name @rpath/libmkl_intel_thread.dylib (offset 24) time stamp 2 Wed Dec 31 16:00:02 1969 current version 0.0.0 compatibility version 0.0.0 -- name @rpath/libmkl_core.dylib (offset 24) time stamp 2 Wed Dec 31 16:00:02 1969 current version 0.0.0 compatibility version 0.0.0 -- name @rpath/libiomp5.dylib (offset 24) time stamp 2 Wed Dec 31 16:00:02 1969 current version 5.0.0 compatibility version 5.0.0 $ otool -l a.out | grep -A3 RPATH $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this problem too. Can't find solution anywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Doron G and all,
I recalled, there is some discussions about the specific to OS X* 10.11 (Please see here).
You may try some workaround on that article. https://software.intel.com/en-us/articles/os-x-1011-support-in-intel-parallel-studio-xe-2016
For link MKL dylib library, another workaround: is it for ok you link static mkl library
for example, ifort -mkl -static-intel ?
Best Regards,
Ying
Dynamic Library Dependencies
Starting with OS X 10.11 DYLD_LIBRARY_PATH environment variable might be reset under OS X new security policy, System Integrity Protection. As a result an application built with Intel® Parallel Studio version 2016 (Update 1) or earlier might not work since it is unable to locate dependent libraries such as libiomp5.dylib.
Workaround
The following is suggested workaround: make all dynamic libraries run-path depended by following this two step process.
1. Add directories in which dependencies (required libraries) are located to the application rpath during the application linking:
1 |
$ icc x.o -Wl,-rpath,$ICLROOT/lib -L$ICLROOT/lib -liomp5 -o app.out |
2. Change the dependency from non-run-path-dependent library to run-path-dependent library:
1 |
$ install_name_tool -change libiomp5.dylib @rpath/libiomp5.dylib app.out |
3. Repeat Step 2 for all dependencies from composer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rasmus,
you mentioned that:
$ otool -l a.out | grep -A3 RPATH $
That is definitely bad. Ideally there should be at least two matches: one for MKL library path and another one for libiomp5.dylib library path. Do you add -Wl,-rpath,$MKLROOT/lib -Wl,-rpath,$MKLROOT/../compiler/lib during the linkage of the executable, as Ying suggested?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My problem was solved some other way. Turns out it only happened when I ran my mkl-linked executable from a bash-script with #!/bin/bash shebang. Theres a description here: https://forums.developer.apple.com/thread/9233 .. basically
If a script file begins with "#!/bin/bash", or any other #!/path/to/interpreter, the DYLD environment variables are omitted from the set of environment variables passed to that interpreter. This applies even if the current and new interpreters are instances of the same interpreter.
This means that the DYLD_LIBRARY_PATH was not exported to the bash script. Sorry for the confusion. This seems like an incompatibility with how Intel/MKL is set up and the security in Mac OS 10.11, no?

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