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

cannot find -lmkl_lapack

ridox
Beginner
1,351 Views
Hi everyone,
I am not expert, but i do my best effort.
I have recently installFortran Composer XE 2011 for Linux 64-bits, which camewith Math Kernel Library (MKL).
I am trying to compile a program with the following instruction:
-----------------------------------
ifort -O2 -DOPTIMIZE test test.o -L. -L/usr/local/lib -lcfitsio -L/opt/intel/composerxe-2011.5.220/mkl/lib/intel64 -lmkl_lapack -lmkl -lguide -lpthread -lpthread -lpthread
\\n
but ifort complains and gives:
---------------------------------
ld: cannot find -lmkl_lapack
ld: cannot find -lmkl
ld: cannot find -lguide
make: *** [test] Error 1
\\n
I have read thatBLAS/LAPACK routines are now internal to the MKL core library, so there is no separate MKL Lapack library and the customary flag '-lmkl_lapack' is now obsolete and should be removed.
\\n
* So I have tried without the '-lmkl_lapack' flag but doesn't found -lmkl and -lguide
* I tried without any-lmkl_lapack,-lmkl,-lguide but gives: undefined reference to `dpotrf_'
* I change the flags:
-lmkl_lapack -> -lmkl_intel_lp64 but gives same errors.
So, my final question is: How can i change the 'obsolete' flags in order to be compatibleFortran Composer XE and MKL???
Thanks in advance, any suggestion is really appreciate it.
Jorge
0 Kudos
3 Replies
mecej4
Honored Contributor III
1,351 Views
Was the user library /usr/local/lib/libcfitiso.a compiled for X64 with the same integer/pointer model as was used for producing the object file test.o?

Try the simpler -mkl option instead of specifying which MKL libraries to use. If that does not work, you may consult the MKL Link Line Advisor, to which a link is provided on the MKL forum.
0 Kudos
Gennady_F_Intel
Moderator
1,351 Views
this is the link to MKL Linker Adviser
0 Kudos
ridox
Beginner
1,351 Views
Thanks everyone,

cfitsio wasn't the problem.
I used the MKL link line advisor and told me to use:-lmkl_lapack95_lp64
But the same error appears.
At the end I use both flags, the -mkl and the one for the-lmkl_lapack95_lp64
and the problem is gone.
Thanks for your help.
0 Kudos
Reply