Sie befinden sich im Service: RWTH High Performance Computing (Linux)




Intel Math Kernel Library (Intel MKL) is a library of highly optimized, extensively threaded math routines for science, engineering, and financial applications.

The library is optimized for Intel processors. Intel MKL contains implementations of BLAS, BLACS, LAPACK and ScaLAPACK, Fast Fourier Transforms (FFT) complete with FFTW interfaces, Sparse Solvers (Direct - PARDISO, Iterative - FGMRES and Conjugate Gradient Solvers), Vector Math Library and Vector Random Number Generators.

Intel MKL contains a couple of OpenMP-parallelized routines. The number of threads used is set by the environment variable OMP_NUM_THREADS or MKL_NUM_THREADS.


1. General information

There are two possible ways of calling MKL routines from C/C++:

  • Using BLAS: You can use the Fortran-style routines directly. Please follow the Fortran-style calling conventions (call-by-reference, column-major data order).
  • Using CBLAS: Using the BLAS routines with the C-style interface is the preferred way because you do not need to know the exact differences between C and Fortran and the compiler is able to report errors before runtime. 

Please refer to chapter Language-specic Usage Options in the Intel MKL Developer Guide or details about mixed-language programming.

2. How to access the software

Starting with version 11 of the Intel compiler, a version of MKL is included in the Intel compiler distribution and the environment is initialized whenever the Intel compiler is loaded.

To use Intel MKL with another compiler, load this compiler first and then load the MKL environment, e.g. for the GCC compiler:

module switch intel gcc
module load LIBRARIES
module load intelmkl

This will set the variables FLAGS_MKL_INCLUDE and FLAGS_MKL_LINKER for compiling and linking, which are the same as FLAGS_MATH_... if the MKL module was loaded last. These variables let you use at least the BLAS and LAPACK routines of Intel MKL. To use other capabilities of Intel MKL, please refer to the Intel MKL documentation:
The BLACS and ScaLAPACK routines use Intel MPI, so you have to load the Intel MPI before compiling and running a program that uses BLACS or ScaLAPACK.


zuletzt geändert am 14.07.2022

Wie hat Ihnen dieser Inhalt geholfen?

Creative Commons Lizenzvertrag
Dieses Werk ist lizenziert unter einer Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland Lizenz