| January 23, 2010 5:00 AM PST | |
Problem :
ld64 warning: indirect library libiomp5.dylib could not be loaded: file not found: libiomp5.dylib
Or runtime error:
dyld: Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.1/076/Frameworks/mkl/lib/em64t/libmkl_intel_thread.dylib
Reason: image not found
Trace/BPT trap
Root Cause :
Since MKL 10.0, the MKL libraries for Mac OS* have been integrated into Intel® C++/Fortran Compiler Professional Edition or Intel® C++/Fortran Composer XE for Mac OS* X. The default path of MKL libraries were changed from
"/Library/Frameworks/Intel_MKL.framework/Versions/10.0.x.xxx/"
to "/opt/intel/Compiler/11.x/0xx/Frameworks/mkl/"
At the same time, the default OpenMP libraries (libiomp5.dylib, libiomp5.a) used by MKL are not in <MKL Libraries>/lib directory as in previous versions. They are under the Intel compiler lib directory now.
for example, in /opt/intel/Compiler/11.0/0xx/lib
(IPP is the same, please see the article XCode link error: "file not found: libiomp5.dylib" )
Resolution :
For compiler warning:
Please refer to the MKL link line advisor.
the command line could be
>ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
or
ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
-L/opt/intel/Compiler/11.1/076/lib -liomp5 -lpthread
For runtime error: like dyld: Library not loaded: lib[mkl|ipp]_x.dylib
Please add the path of lib*.dylib in system environment before run binary.
>export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib:$DYLD_LIBRARY_PATH"
In Xcode 2.3 development environment,
Under Executables, Double click active Executable, click "Arguments" Tab, under Variables to be set in the environment, Add DYLD_LIBRARY_PATH , set value, for example,
/opt/intel/Compiler/11.1/076/lib:/opt/intel/Compiler/11.1/080/Frameworks/mkl/lib/em64t
Build an Intel® MKL program on Mac OS* with Intel® Fortran Compiler,
For example, m_cprof_p_11.1.076,
MKLPATH=/opt/intel/Compiler/11.1/076/Frameworks/mkl/lib/em64t
MKLINCLUDE=/opt/intel/Compiler/11.1/076/Frameworks/mkl/include
> ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread
ld64 warning: indirect library libiomp5.dylib could not be loaded: file not found: libiomp5.dylib
Or runtime error:
dyld: Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.1/076/Frameworks/mkl/lib/em64t/libmkl_intel_thread.dylib
Reason: image not found
Trace/BPT trap
Root Cause :
Since MKL 10.0, the MKL libraries for Mac OS* have been integrated into Intel® C++/Fortran Compiler Professional Edition or Intel® C++/Fortran Composer XE for Mac OS* X. The default path of MKL libraries were changed from
"/Library/Frameworks/Intel_MKL.framework/Versions/10.0.x.xxx/"
to "/opt/intel/Compiler/11.x/0xx/Frameworks/mkl/"
At the same time, the default OpenMP libraries (libiomp5.dylib, libiomp5.a) used by MKL are not in <MKL Libraries>/lib directory as in previous versions. They are under the Intel compiler lib directory now.
for example, in /opt/intel/Compiler/11.0/0xx/lib
(IPP is the same, please see the article XCode link error: "file not found: libiomp5.dylib" )
Resolution :
For compiler warning:
Please refer to the MKL link line advisor.
the command line could be
>ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
or
ifort main. f -o main -L$(MKLPATH) -I$(MKLINCLUDE) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
-L/opt/intel/Compiler/11.1/076/lib -liomp5 -lpthread
For runtime error: like dyld: Library not loaded: lib[mkl|ipp]_x.dylib
Please add the path of lib*.dylib in system environment before run binary.
>export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib:$DYLD_LIBRARY_PATH"
In Xcode 2.3 development environment,
Under Executables, Double click active Executable, click "Arguments" Tab, under Variables to be set in the environment, Add DYLD_LIBRARY_PATH , set value, for example,
/opt/intel/Compiler/11.1/076/lib:/opt/intel/Compiler/11.1/080/Frameworks/mkl/lib/em64t
Do you need more help?
This article applies to: Intel® C++ Compiler for Mac OS X* Knowledge Base, Intel® Fortran Compiler for Mac OS X* Knowledge Base, Intel® Integrated Performance Primitives Knowledge Base, Intel® Math Kernel Library Knowledge Base
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (8) 
| December 1, 2009 6:14 PM PST
Intel Software Network Support
| Fixed, thank you. |
| July 18, 2010 1:15 PM PDT
Ted Christopher
|
Hi, Where is the line >export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib:$DYLD_LIBRARY _PATH" placed? Thanks for any help. Ted C. |
| July 19, 2010 12:56 AM PDT
Ying H (Intel)
|
Hi Ted, if you build and run your program under command line, then put the line before run the application. for example, in cmd windows enter, $export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib:$DYLD_LIBRARY _PATH" $./main If you build and run your program in some develop IDE, like Xcode 3.0, then add the envioronment variable in the IDE. Regards, Ying |
| July 19, 2010 11:30 AM PDT
Ted Christopher
|
Hi and thanks Ying, I am using the Unix command line and I get, DYLD_LIBRARY: Undefined variable. when I tried executing the export line. I know very little about the Unix command/environment world. What is this if statement in ippvarsem64t.csh trying to do? if !($?DYLD_LIBRARY_PATH) then setenv DYLD_LIBRARY_PATH ${IPPROOT}/Libraries else setenv DYLD_LIBRARY_PATH ${IPPROOT}/Libraries:${DYLD_LIBRARY_PATH} endif Thanks again, Ted |
| July 21, 2010 2:36 PM PDT
Ted Christopher
|
Hi, I tried the suggested export statement without success (see above). Is there something else I should try? Thanks, Ted |
| July 22, 2010 1:18 AM PDT
Ying H (Intel)
|
Hi Ted, If DYLD_LIBRARY: Undefined variable, you may try >export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib" If it still doesn't work, please sumbit your question to MKL forum (with more details information, like what kind OS and processor,what software IPP or MKL are you using) Thanks Ying |
| July 22, 2010 1:20 AM PDT
Ying H (Intel)
| MKL forum URL : http://software.intel.com/en-us/forums/intel-math-kernel-library/ |
Trackbacks (0)
Leave a comment 
To obtain technical support, please go to Software Support.



tj
>export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/076/lib:$DYLD_LIBRARY _PATH"