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

MKL linking (LAPACK, LBLAS)/error message

Deleted_U_Intel
Employee
945 Views
Hi,

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: libguide.so: 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
get_Sortvalue.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,
0 Kudos
2 Replies
Todd_R_Intel
Employee
945 Views
Try sourcing the mklvars32.sh 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 libguide.so.
Or, you could also try linking statically for all libraries using the--static option.
Todd
0 Kudos
TimP
Honored Contributor III
945 Views
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 libguide.so 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.
0 Kudos
Reply