Search Software

Intel MKL is available with the Intel® C++ and Fortran Compilers and Intel Cluster Toolkit / Studio, and as a standalone product. It includes BLAS, LAPACK, FFTs, Scalapack and related libraries.

SW Documentation:

To initialize this library in a Linux environment run the command:

module load mkl

For the Intel Composer compiler package, compiler version 12 or later, MKL is included as part of the package, and will be automatically loaded with the compilers, ex:

module load intel

To compile using this library in aLinux environment run the command:

ifort -O3 -mkl source_code.f

When compiling with the MKL libraries it is generally best to use the Intel compilers, and the appropriate linking flags must be used. For the Intel Composer compiler package version 2013 or later the single flag -mkl enables most of the MKL features. By default using the single flag -mkl will use multi-threaded MKL algorithms. To use single threaded sequential MKL algorithms use the compiling command:

ifort -O3 -mkl=sequential source_code.f

It is sometimes necessary to use explicit MKL library linking flags, and the versions of Intel/MKL previous to 2013 require this. An example of a common compiling command using explicit MKL library linking flags is given below. This command is to be entered all on one line.

ifort -O3 source_code.f -lmkl_intel_lp64 -lmkl_sequential -lmkl_core

Sometimes it is necessary to specify the path to the MKL libraries in the compiling command using the -L flag as shown below. The path specified will depend on the version of MKL being used. The example command below is for MKL version 11.0.5.192 which is part of the Intel 2013/upgrade5 compiler package. The command is to be entered all on one line.

Please note different versions of MKL are available on the lab and the high performance systems. On different systems the default MKL may link to different versions of MKL. To see the available MKL modules use the command:

module avail mkl

Other Intel modules include the MKL libraries, for example, the Intel compiler version 12 or later modules include the associated MKL libraries, and so MKL will be automatically loaded when loading these more recent compiler modules. The following table indicates which MKL version is associated with each recent Intel compiler version, and the table syntax is the same as the module names on MSI systems.