Intel Math Kernel Library (MKL) consists of high-performance, multithreaded mathematics libraries for linear algebra, fast Fourier transforms, vector math, and more.
Availability and Restrictions
Versions
OSC supports single-process use of MKL for LAPACK and BLAS levels one through three. For multi-process applications, we also support the ScaLAPACK, FFTW2, and FFTW3 MKL wrappers. MKL modules are available for the Intel, GNU, and PGI compilers. MKL is available on Pitzer, Ascend and Clusters. The versions currently available at OSC are:
Version | Pitzer | Ascend | Cardinal | Notes |
---|---|---|---|---|
2017.0.7 | X | |||
2018.0.3 | X | |||
2019.0.3 | X | |||
2019.0.5 | X* | |||
2021.3.0 | X | |||
2023.2.0 | X | X | ||
2024.1.0 | X | X* | ||
2025.0.1 | X |
On Pitzer, you can use module spider mkl
to view the available modules. On Ascend and Cardinal, the MKL module name has been changed to intel-oneapi-mkl to align with the standards of the package management system. You can find the available modules by running module spider intel-oneapi-mkl
.
Feel free to contact OSC Help if you need other versions for your work.
Access
MKL is available to all OSC users.
Publisher/Vendor/Repository and License Type
Intel, Commercial
Usage
Set-up
To load the default MKL, run the following command: module load mkl
or module load intel-oneapi-mkl
.
This step is required for both building and running MKL applications. Note that loading an MKL module defines several environment variables that can be useful for compiling and linking to MKL, e.g., MKL_CFLAGS
and MKL_LIBS
.
Intel Comipler
If you are using the MKL module with the Intel or oneAPI compiler, you may NOT need to load the MKL module separately. The Intel or oneAPI modules already include the MKLROOT
variable, which allows most applications to automatically determine the required linking libraries and linker flags.
Intel MKL Advisor
Intel MKL provides multiple libraries to support various environments, tools, and interfaces. To determine the recommended libraries for a specific use case, use the Intel MKL Link Line Advisor to obtain the appropriate linking methods and linker flags.
Dynamic Linking Variables
These variables indicate how to link to MKL. While their contents are used during compiling and linking, the variables themselves are usually specified during the configuration stage of software installation. The form of specification is dependent on the application software. For example, some softwares employing cmake for configuration might use this form:
cmake .. -DMKL_INCLUDE_DIR="$MKLROOT/include" -DMKL_LIBRARIES="MKL_LIBS_SEQ"
Here is an exmple for some software employing autoconf:
./configure --prefix=$HOME/local/pkg/version CPPFLAGS="$MKL_CFLAGS" LIBS="$MKL_LIBS" LDFLAGS="$MKL_LIBS"
Variable | Comment |
---|---|
MKL_LIBS | Link with parallel threading layer of MKL |
GNU_MKL_LIBS | Dedicated for GNU compilers in Intel programming environment |
MKL_LIBS_SEQ | Link with sequential threading layer of MKL |
GNU_MKL_LIBS_SEQ | Dedicated for GNU compilers in Intel programming environment |
MKL_SCALAPACK_LIBS | Link with BLACS and ScaLAPACK of MKL |
MKL_CLUSTER_LIBS | Link with BLACS, CDFT and ScaLAPACK of MKL |