Hello, I have a module wherein I have a gaussian random number generator (that uses the VSL Gaussian generator from MKL Library). I am using that module now to write a small program that generates 10 random numbers. I am now having a whole bunch of issues to link the programs together to create an executable. I am using Mac OSX with 64 bit architecture and Intel processor. Here is the shell script I am using: The module: randomGenerator.f90 The program: testRandomGaussian.f90 The script:
#! /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:
dyld: Library not loaded: libmkl_intel_lp64.dylib Referenced from: /Users/debanjanmukherjee/Workfiles/Work/Simple-particle-OOP/sources/./testRandomGaussian.out Reason: image not found Trace/BPT trap: 5dyld: Library not loaded: libmkl_intel_lp64.dylib Referenced from: /Users/debanjanmukherjee/Workfiles/Work/Simple-particle-OOP/sources/./testRandomGaussian.out Reason: image not foundTrace/BPT trap: 5 Can someone please offer some help t show what I am doing wrong? I can upload my codes too in case that is needed, but since the compilation completes I believe the code itself is okay and I have an error in the linking. Many thanks




