MKL linking (LAPACK, LBLAS)/error message

MKL linking (LAPACK, LBLAS)/error message


I'm trying to run some files that I wrote using f77. The Script I've written creates the executable file without error messages but once I try to run it, the following error message is displayed (for the most part I'm just trying to link MKL lapack and lblas libraries):


trrj: error while loading shared libraries: cannot open shared object file: No such file or directory


Script is:

#! /bin/csh
source /opt/intel_fc_80/bin/ifortvars.csh

ifort -c get_MatrRec.f get_eigenv1211.f get_KLh12.f get_K_z.f

get_f.f get_Evector.f get_Jcurrent.f get_Rec.f


ifort -c MAIN.f

ifort -o trrj MAIN.o get_MatrRec.o get_eigenv1211.o get_KLh12.o

get_K_z.o get_f.o get_Evector.o get_Jcurrent.o

get_Rec.o get_Sortvalue.o

-L /opt/intel/mkl70/lib/32 -lmkl_lapack -lmkl_ia32

-lguide -lpthread

What should I do to fix this problem?

Thank you,

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Try sourcing the file found in /tools/environment/ directory. I notice from your script that while you are linking the MKL libraries statically you have included "-lguide" which by defaultlinks in the included shared library. Since your app is not threaded using openmp with the compiler the compiler does not link in (I think) it's own copy of

Or, you could also try linking statically for all libraries using the--static option.


As far as I know, the option -openmp would have the same effect as -lguide -lpthread, and it makes no difference that OpenMP is confined to the MKL rather than invoked in the Fortran code. There should be a copy of in the compiler /lib installation, as well as one in MKL /lib. Either one should do the job, as long as LD_LIBRARY_PATH is set by either the ifortvars.csh or mklvars.csh or both scripts.

Leave a Comment

Please sign in to add a comment. Not a member? Join today