- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#! /bin/sh
echo 'compiling an MKL random generator example'
MKLROOT=/opt/intel/composer_xe_2011_sp1.7.246/mkl/
MKLPATH=$MKLROOT/lib/
MKLINCLUDE=$MKLROOT/include/
DYLD_LIBRARY_PATH=$MKLPATH
ifort -c randomGenerator.f90 -L$MKLPATH -I$MKLINCLUDE -I$MKLINCLUDE/intel64/lp64 -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -liomp5
ifort -c testRandomGaussian.f90 -L$MKLPATH -I$MKLINCLUDE -I$MKLINCLUDE/intel64/lp64 -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -liomp5
ifort -L$MKLPATH -I$MKLINCLUDE -I$MKLINCLUDE/intel64/lp64 -lmkl_blas95_lp64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -liomp5 randomGenerator.o testRandomGaussian.o -o testRandomGaussian.out
The above creates the .out executable but when i run the .out file it ends up giving me an error saying:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem is related to the loading of the dynamically loaded libraries when your a.out is run and reaches a point where routines in those libraries are invoked. If the MKL *.dylib libraries are not accessible (in Linux this may be achieved by setting $LD_LIBRARY_PATH, or by modifying the ldd configuration file). The error messages are from the dynamic library loader. In looks in the usual system directories and does not find the needed .dylib files.
- 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
The error message dyld: Library not loaded: libmkl_intel_lp64.dylib means the system can't find the library.
So whatever in Xcode environment (either4.0 or 3.2.4)or in terminal environment, to define DYLD_LIBRARY_PATH environment variable is required.
You candefinethe variable eitherby mklvars.* or define the DYLD_LIBRARY_PATH manually.
Please refer to http://software.intel.com/en-us/forums/showthread.php?t=106397&p=1#189389
Best Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page