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

Problem Linking

davidfarrelly
初学者
1,367 次查看
Hello,

I am having problems using Lapack on a Dell Linux machine (redhat) with a Xeon chip. I installed mkl and try to compile with ifc using;

ifc -pc80 -cm -w -o test test.f -L/opt/intel/mkl721/lib/64 -lmkl_lapack64 -lmkl_def -lguide -lpthread -O3 -r8 -tpp7

and the error message is

/opt/intel/mkl721/lib/64/libmkl_lapack64.so: file not recognized: File format not recognized

There are no complaints at compilation that subroutines/functions can't be found.

If I use lapack32 then the routines I need cannot be found. I've tried various permutations of "32" and "64" in the above and nothing works.

Any suggestions would be greatly appreciated!

David

Message Edited by davidfarrelly on 06-10-2005 02:20 PM

Message Edited by davidfarrelly on 06-10-2005 02:38 PM

0 项奖励
3 回复数
TimP
名誉分销商 III
1,367 次查看
That's an Itanium library. If you are using a 32-bit compiler, you need those in /lib/32/. If you are running an x86-64 linux, with 64-bit compilers, you need the em64t libraries. You should have 3 directories under mkl721/lib, to cover the 3 varieties. The only use for the /64 directory is where you have an Itanium system where mkl won't install, and you need to copy it over there.
0 项奖励
davidfarrelly
初学者
1,367 次查看
EDITED: Problem solved using;

ifc -i_dynamic -pc80 -cm -w -o test test.f -L/opt/intel/mkl721/lib/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread -O3 -r8 -tpp7

Again, thanks for the help!

Pre-edited message below (will leave since might be useful for reference)

*********************************************************************

Tim,

Thanks - I still have some problems;

If I do this:

ifc -i_dynamic -pc80 -cm -w -o test test.f -L/opt/intel/mkl721/lib/32 -lmkl_lapack32 -lmkl_def -lguide -lpthread -O3 -r8 -tpp7

the error message on compilation is:

11057 Lines Compiled
/tmp/ifcwhTfKM.o(.text+0x3bc6): In function `syminv_':
: undefined reference to `dsytrf_'
/tmp/ifcwhTfKM.o(.text+0x3c46): In function `syminv_':
: undefined reference to `dsytri_'
/tmp/ifcwhTfKM.o(.text+0x11794): In function `f02aaf_':
: undefined reference to `dsyevx_'
/tmp/ifcwhTfKM.o(.text+0x11a1a): In function `f02abf_':
: undefined reference to `dsyevx_'


whereas if I use the lapack64 in /32 i.e.,


ifc -i_dynamic -pc80 -cm -w -o test test.f -L/opt/intel/mkl721/lib/32 -lmkl_lapack64 -lmkl_def -lguide -lpthread -O3 -r8 -tpp7

it compiles ok, but when I try to run it I get this;

./bnd_linnh3: error while loading shared libraries: libmkl_lapack64.so: cannot open shared object file: No such file or directory.

I'm migrating from 64 bit DEC alphas so sorry to be so naive about how to do all this!

David

Message Edited by davidfarrelly on 06-10-2005 04:56 PM

0 项奖励
Todd_R_Intel
员工
1,367 次查看
You're very close now. You need to add the path ofdynamic libraries (libmkl_lapack64.so in this case) to the LD_LIBRARY_PATH environment variable so that the loader can find them at runtime. The following should work:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl721/lib/32
The mklvars32.sh script is provided in the tools/environment directory of MKL. You could just source this script.
-Todd
0 项奖励
回复