Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6956 Discussions

how to build/link with mkl LAPACK95 in Visual Studio (fortran and C++)

Ying_H_Intel
Employee
836 Views

As in previous MKL version, LAPACK95 wrapper library is not a part of MKL main library. So many users who use LAPACK95 interface need to build the mkl_lapack95 library seperately. Here is some information about how to build and then how to link the Lapack95 in our application.

First, please know that Starting version 10.2 and later , Intel MKL have contained the precompiled Fortran 95 interface libraries for BLAS and LAPACK for Intel Fortran compiler as well as the corresponding precompiled interface modules for BLAS95 and LAPACK95. Sowe don't need to build the wrapper library seperately.

Please see more at http://software.intel.com/en-us/articles/blas-and-lapack-fortran95-mod-files/

Secondly, for who build the BLAS95 and LAPACK95, please go to the folder interfaceslapack95

open Command line windowsof Intel fortan. ( by Click Start->All Programs->Intel Software Development Software tools-> Intel Visual Fortran Compiler -> Fortran build environment for application runing on 32bit or 64bit.
enter corresponding command
>nmake {lib32^|libem64t^|lib64}

once we build the wrapper library, please check if we have them in machine. For example, see ifmkl_lapack95.lib have been in [32|em64t]lib directory or if lapack95.mod are in includeia32

Thirdly, link them in our application, we may refer to the KB
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
to get the library list we need to link against.

For link lapack95, please see the Note 2 at the bottom of the Article
Note: For applications calling Fortran 95 Interface library for BLAS an LAPACK, please addBLAS95/LAPACK95 librarymanually. For example,the link line is like:
mkl_lapack95.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib

And add use "Use Statements" ..
USE mkl95_LAPACK,
in source code as the discussion in http://software.intel.com/en-us/forums/showthread.php?t=67711

last, there is sample project at the end of http://software.intel.com/en-us/articles/blas-and-lapack-fortran95-mod-files/
Sample
Here is a small Intel Fortran Project in Visual Studio 2005 for your reference

Kind Regards,
Ying

0 Kudos
0 Replies
Reply