I have a problem with linking the Intel’s MKL library to the PGI Visual Fortran. After setting the complier and library environments (mkl_lapack95_ilp64.lib mkl_intel_ilp64.lib mkl_core.lib mkl_pgi_thread.lib), I try to execute function GETRF(MINV,BG,INFO). As a result I always get the error message “error LNK2019: unresolved external symbol sgetrf_f95_ referenced in function…”. I have compiled lapack.f90 using the PGI complier in order to overcome issues regarding the different compilers. Can you please advise. Tanks in advance.
The Lapack95 and blas95 libraries that come with MKL cannot be used with PGI Fortran. Intel compilers and PGI compilers do not produce compatible code when Fortran 9X code containing optional arguments, assumed shape array arguments, etc. is compiled.
If you wish to use MKL with the Lapack95 interface, you will have to rebuild the library and the modules using the source code and the makefile provided with MKL (there are close to 1,100 source files to compile). This work has to be performed for each architecture of interest: IA32, LP64 and ILP64.
Some of the example source files provided with MKL call NAG utility routines (such as X04CAF, to print out a matrix). Intel provides prebuilt libraries containing these routines, but those libraries are not quite compatible with PGI Fortran. If you have the Intel Fortran runtime libraries and DLLs, it is possible to get these libraries to work with PGI Fortran, but the effort needed is significant.