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

dyld: Library not loaded: @rpath/libmkl_intel_lp64.dylib when running scripts

Leon_W_1
Beginner
1,283 Views

I tried to run a series of simulations using GROMACS 4.6.5 on MAC PRO in which intel composer_xe_2013 was installed. If I manually submit an individual job using commands in a terminal, I do not have any problems. However, If I want to submit a series of job using PERL scripts to run these commands, I always get the error message

dyld: Library not loaded: @rpath/libmkl_intel_lp64.dylib

The $DYLD_LIBRARY_PATH has been set and can be visited.

I do not know what is going wrong here. I read discussion at https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/747922. I am not very sure how to set the library link properly. Do I need to recompile GROMACS or just simply set " link with libiomp5.dylib and mkl lib path" which was stated in above link? if I run "icc -o dgemm_example dgemm_example.c -L$MKLROOT/lib -Wl,-rpath,$MKLROOT/lib -Wl,-rpath,$MKLROOT/../compiler/lib -mkl " as suggested in that discussion, how do I backup the original setting in case I failed and had a chance to recover the original setting? Any further information and help would be sincerely appreciated.

 

0 Kudos
1 Reply
Ying_H_Intel
Employee
1,283 Views

Hi Leon,

It seems the perl shell don't recognize the  $DYLD_LIBRARY_PATH , while under the command is bash shell, which is recognize the path. 

1) how do you setting the path?  are you run

export DYLD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2018.*.***/mac/compiler/lib:/opt/intel/compilers_and_libraries_2018.*.***/mac/mkl/lib:$DYLD_LIBRARY_PATH

$echo $DYLD_LIBRARY_PATH

2) how do you write the perl script?

there are some ways as the forum topic  or https://software.intel.com/en-us/articles/dyld-library-not-loadedlibiomp5dylib/
​ mainly 3 kind of type
​1. set correct environment
​2. recompile your application with -rpath , point to specific path .   or recompile with mkl static library, you don't need consider the run-time path.
​3. add the path in exe file. off-line.

​Basically, the No.1 is more easily, let's try it first. if possible, please try
> define the DYLD_LIBRARY_PATH variable in the /etc/launchd.conf file​
> https://www.nntp.perl.org/group/perl.beginners/2010/05/msg113072.html , write the path in your perl script file.

​Best Regards,
​Ying

https://superuser.com/questions/282450/where-do-i-set-dyld-library-path-on-mac-os-x-and-is-it-a-good-idea

 

0 Kudos
Reply