MKL - Intel Math Kernel Library

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, Ruby, and Owens Clusters. The versions currently available at OSC are:

Version Owens Pitzer Notes
11.3.2 X    
11.3.3 X    
2017.0.2 X    
2017.0.4 X    
2017.0.7   X  
2018.0.3 X X  
2019.0.3 X X  
2019.0.5 X* X*  
2021.3.0 X X  
* Current Default Version

You can use module spider mkl to view available modules for a given machine. 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

Usage on Owens

Set-up

To load the default MKL, run the following command: module load mkl. To load a particular version, use  module load mkl/version. For example, use module load mkl/11.3.3 to load MKL version 11.3.3. You can use module spider mkl to view available modules.

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.

Exception: The "mkl" module is usually not needed when using the Intel compilers; just use the "-mkl" flag on the compile and link steps.

Usage on Pitzer

Set-up

To load the default MKL, run the following command: module load 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.

Exception: The "mkl" module is usually not needed when using the Intel compilers; just use the "-mkl" flag on the compile and link steps.

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 compiler in Intel programming environment
MKL_LIBS_SEQ Link with sequential threading layer of MKL
MKL_SCALAPACK_LIBS Link with BLACS and ScaLAPACK of MKL
MKL_CLUSTER_LIBS Link with BLACS, CDFT and ScaLAPACK of MKL

Further Reading

Tag: 
Supercomputer: 
Service: