I am having problems linking the MKL libraries to my project.
Here is a sample code for matrix inversion
use mkl95_lapack,only : getrf,getri
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 )
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.
Add mkl_lapack95.lib (and, if needed, mkl_blas95.lib) to the list of additional libraries to search.