Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

libmkl problem

roddur
Beginner
786 Views

Hello friends,

I am using

[bash]$ ifort --version
ifort (IFORT) 11.1 20091130
Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.
[/bash]

in some makefile there is -lmkl option that means mkl dir should contain libmkl.a file, which is not in my installation. I have libmkl_intel etc. so what is the exact solution?

I am using

[bash]$ uname -a
Linux roddur 2.6.31.12-174.2.3.fc12.i686.PAE #1 SMP Mon Jan 18 20:06:44 UTC 2010 i686 i686 i386 GNU/Linux
[/bash]

If i keep the -lmkl option i am getting error:

[bash].....-L/opt/intel/Compiler/11.1/064/mkl/lib/32  -lmkl -lmkl_lapack -lguide   -g  -o rsnew.x
ld: cannot find -lmkl
make: [rsnew.x] Error 1 (ignored)
[/bash]

and if i replace it wid -lmkl_intel, i got...

[bash]opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_serv_load_dll'
/opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_pds_get_proc_pardiso'
/opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_pds_blkslv_unsym_pardiso'
/opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_lapack_cgbtrf'
/opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_pds_blkldl_omp_pardiso'
/opt/intel/Compiler/11.1/064/mkl/lib/32/libmkl_lapack.so: undefined reference to `mkl_pds_sp_blklu_unsym_omp_pardiso'
make: [rsnew.x] Error 1 (ignored)[/bash]

as the last part of the makefile output.

what to do?

0 Kudos
1 Reply
Kevin_D_Intel
Employee
786 Views

Try the MKL link line advisor (here) to determine what you need to specify to link MKL libraries.

You probably need to use something like:

-L$MKLPATH $MKLPATH/libmkl_solver.a -Wl,--start-group -lmkl_intel -lmkl_intel_thread -lmkl_core -Wl,--end-group -openmp -lpthread

0 Kudos
Reply