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

problem using mkl with XE2011 composer and visula studio 2008 IDE

morandi__antonio
Beginner
690 Views
hi,

I am having problems linking the MKL libraries to my project.

Here is a sample code for matrix inversion

program sample
use mkl95_lapack,only : getrf,getri
implicit none
integer, parameter :: N = 4
integer :: i,j
real(8), dimension(N,N) :: A = (/ 5,7,6,5,7,10,8,7,6,8,10,9,5,7,9,10/)
integer, dimension(N) :: piv
integer :: info
call getrf( a, piv, info )
call getri( a, piv, info )
write(*,10)((a(i,j),j=1,N),i=1,N)
stop
10 format(1x,4F12.6)
end program sample

I tried to link the MKL by following:

Go to Project > Properties > Libraries > Use Intel Math Kernel Library and select Parallel, Sequential, or Cluster as appropriate

but it did not work (unresolved reference external symbols _DGETRF_MKL95 and _DGETRF_MKL95 was obtained as response from the compiler).

what is wrong? Is the code correct?

In general I do not really understand what to "use" or to "include" for correctly linking MKL subroutines (I am quite a beginner user). Could you please hel me with this.

Thank you,

Antonio

0 Kudos
1 Reply
mecej4
Honored Contributor III
690 Views
Your program compiled without errors, so there are probably no errors in your INCLUDE and USE statements.

Add mkl_lapack95.lib (and, if needed, mkl_blas95.lib) to the list of additional libraries to search.

0 Kudos
Reply