Fortran95 interface to LAPACK is implemented through wrappers that call respective FORTRAN77 routines. This interface uses such features of Fortran95 as assumed-shape arrays and optional arguments to provide simplified calls to LAPACK routines with fewer arguments.
For LAPACK, Intel MKL offers two types of Fortran95 interfaces:
call getrs( a, ipiv, b [, trans] [,info] )
This routine is declared in mkl_lapack.fi for FORTRAN 77 interface, in lapack.f90 for Fortran 95 interface, and in mkl_lapack.h for C interface.
Before calling this routine, you must call ?getrf to compute the LU factorization of A.
Specific details for the routine getrs interface are as follows:
Holds the matrix A of size (n, n).
Holds the matrix B of size (n, nrhs).
Holds the vector of length n.
Must be 'N', 'C', or 'T'. The default value is 'N'.
But it is still not clear to me what to do.
Thank you in advance for your help.
I am using Microsoft Visual Studio. In the directories of my computer, I found lapack95.mod and mkl_lapack95.lib. How should I configure the Project Property Pages?
Fortran > General > Additional Include Directories: set as the directory with lapack95.mod
Fortran > Libraries > Use Intel Math Kernel Library: set as Sequential (/Qmkl:sequential)
Linker > General > Additional Library Directories: set as the directory with mkl_lapack95.lib
But I got followingerror messages when build:
Error1 error LNK2019: unresolved external symbol _SGETRF_F95 referenced in function _MAIN__mkltest.obj
Error2 error LNK2019: unresolved external symbol _SGETRS1_F95 referenced in function _MAIN__mkltest.obj
Error3 fatal error LNK1120: 2 unresolved externalsDebug\mkltest.exe
May I ask your help to solve this problem.
2.500000 -0.4000000 -0.4000000 -1.000000 2.100000
-0.6666667 -1.000000 -1.400000 1.166667
1.000000 2.000000 3.000000
1 2 3
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
mkltest.exe 004AB546 Unknown Unknown Unknown
mkltest.exe 00401452 _MAIN__ 18 mkltest.f90
mkltest.exe 004AD903 Unknown Unknown Unknown
mkltest.exe 0044D3D7 Unknown Unknown Unknown
mkltest.exe 0044D2AF Unknown Unknown Unknown
kernel32.dll 7C817077 Unknown Unknown Unknown
From above result (until line 17 pause 'initial'), it seems that call getrf works,the problem appears when call getrs. I could not fix the problem. Many thanks if you can help me.