Lapack

Lapack

I would use subroutines getrf and getrs in lapack of MKL. How should I include it in the main?

program main

USE lapack
implicit none

...

call getrf(a)

...
end program main

Error1 error #7002: Error in opening the compiled module file. Check INCLUDE paths.
Error2Compilation Aborted (code 1)

Thank you very much for your help.

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Apparently the compiler cannot find the module LAPACK. In my installation, the module is
called LAPACK95 - that is probably the same in your case.

Otherwise you will need to add a directory for the INCLUDE paths that does contain the
LAPACK module file (lapack.mod)

Regards,

Arjen

program main
use lapack95
implicit none
...
call getrf(a)
...
end

Error1 error LNK2019: unresolved external symbol _DGETRF_F95 referenced in function _MAIN__beispiel.obj
Error2 fatal error LNK1120: 1 unresolved externalsDebug\beispiel.exe

above is the new error message

MKL routines are intended to be called from a number of languages. The Fortran-95 interfaces are intended only to be called from Fortran. Therefore, the Fortran-95 specific library has to be listed explicitly in the compiler command:

ifort /Qmkl ulap.f90 mkl_lapack95.lib

Iam using Microsoft Visual Studio. How can I includethe specific library or a path in the compilation setup?

Fortran95 Interface Conventions

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.

Note

For LAPACK, Intel MKL offers two types of Fortran95 interfaces:

  • using mkl_lapack.fi only through include mkl_lapack.fi statement. Such interfaces allow you to make use of the original LAPACK routines with all their arguments
  • using lapack.f90 that includes improved interfaces. This file is used to generate the module files lapack95.mod and f95_precision.mod. The module files mkl95_lapack.mod and mkl95_precision.mod are also generated. See also section Fortran95 interfaces and wrappers to LAPACK and BLAS of Intel MKL User's Guide for details. The module files are used to process the FORTRAN use clauses referencing the LAPACK interface: use lapack95 (or an equivalent use mkl95_lapack) and use f95_precision (or an equivalent use mkl95_precision).

I followed this above instruction

Login to leave a comment.