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

Using and linking of the blas library using 95 interfaces

rotero
Beginner
539 Views
Greetings,

Following the advice found on this group, specifically this post:

http://softwarecommunity.intel.com/isn/Community/en-US/forums/permalink/30232854/30232857/ShowThread.aspx#30232857

I have compiled the interfaces for blas95 and lapack95, placing the three generated modules into the include directory.

Then I sought to create a small test function:
-------------------------------------------
program test
use mkl95_blas, only: dot

real(kind=8), dimension(4) :: a=(/1.,2.,3.,4./), b=(/4.,3.,2.,1./)
real(kind=8) :: c

c = dot(a,b)

write(*,*) 'c=', c
end program test
--------------------------------------------

I compile the program with the following command:
ifort -o run test.f90 -L/opt/intel/mkl/10.0.1.014/lib/64 -I/opt/intel/mkl/10.0.1.014/include -lmkl_blas95 -lmkl

But get this output:

ld: /opt/intel/mkl/10.0.1.014/lib/64/libmkl_intel_lp64.so: warning: sh_link not set for section `.IA_64.unwind'
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/64/libmkl_intel_lp64.so when searching for libmkl_intel_lp64.so
ld: /opt/intel/mkl/10.0.1.014/lib/64/libmkl_intel_lp64.so: warning: sh_link not set for section `.IA_64.unwind'
ld: skipping incompatible /opt/intel/mkl/10.0.1.014/lib/64/libmkl_intel_lp64.so when searching for libmkl_intel_lp64.so
ld: cannot find libmkl_intel_lp64.so

my machine is:
Linux richard-debian 2.6.22-3-amd64 #1 SMP Sun Nov 4 18:18:09 UTC 2007 x86_64 GNU/Linux

Is there something that I am just missing here? I have been trying to look through the reference documents.

Any guidance would be appreciated.

thank you,
Richard

0 Kudos
2 Replies
TimP
Honored Contributor III
539 Views

MKL /64 directory is for IA-64. The x86-64 libraries are in /em64t.
0 Kudos
rotero
Beginner
539 Views
Thank you Tim, that was most definitely the problem.

For the sake of documenting:

1) recompiled the fortran 95 interfaces for em64t
make PLAT=lnx32e INTERFACE=mkl_blas.f90 lib
make PLAT=lnx32e INTERFACE=mkl_lapack.f90 lib

2) Then the compile
ifort -o run -L/opt/intel/mkl/10.0.1.014/lib/em64t test.f90 -lmkl_blas95 -lmkl_em64t

Works; thank you for your help.

Richard
0 Kudos
Reply