Link to Intel MKL Fortran 95 libraries

I’m trying to link a PGI Fortran application with the Fortran 95 versions of the MKL BLAS and LAPACK libraries.

As my application uses the MKL routines inside higher-level OpenMP threads, I need to link the sequential versions of the MKL with the PGI OpenMP runtime. Based on the output of Intel’s MKL Link Line Advisor, my link dependancies are:

mkl_solver_sequential.lib mkl_intel_s.lib mkl_sequential.lib mkl_core.lib -mp -pgf90libs mkl_blas95.lib mkl_lapack95.lib

(…with the last two added in on my own initiative - they are there in this form when I compile the application in Intel Fortran).

Anyway, when I try to compile the application, I get an error stating:

error F0004 : Corrupt or Old Module file C:\Program Files (x86)\Intel\Compiler\11.1\051\mkl\include\ia32\mkl95_blas.mod

Is there some other way I ought to be doing this?

Few compilers can read module description files (*.mod) written by another compiler. You need to retrieve the source code for the module from the MKL distribution, presumably mkl95_blas.f90, and compile it using the PGI compiler.

Thanks; I guess that makes sense. Before V10.2 (if I remember rightly), you had to build the F95 interface files manually even for the Intel compiler. Nowadays they provide pre-built files, but I guess they only apply to the Intel compiler.