Intel MKL

Guidance last updated: 20 October 2026

Intel’s Math Kernel Library (MKL) provides highly optimised, threaded and vectorised functions to maximise performance on each processor family. It uses standard C and Fortran interfaces for BLAS (Basic Linear Algebra Subprograms) and LAPACK, and provides interfaces compatible with FFTW.

Documentation: https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2025-1/overview.html

Usage

After connecting to Stanage (see Establishing a SSH connection), start an interactive session:

salloc

Intel MKL can be activated using one of the following:

module load imkl/2025.3.1
module load imkl/2025.2.0
module load imkl/2023.0.0
module load imkl/2022.2.1
module load imkl/2022.2.0

Example batch job

Download mkl-example.c to your working directory. It checks a BLAS matrix multiplication and a LAPACK linear solve. The following example batch submission script uses the sequential LP64 libraries, selected through pkg-config:

#!/bin/bash
#SBATCH --partition=sheffield
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=4000
#SBATCH --time=00:05:00

set -e
module load imkl/2025.3.1
cd "$SLURM_SUBMIT_DIR"
gcc -std=c99 -O2 -o mkl-example mkl-example.c $(pkg-config --cflags --libs mkl-dynamic-lp64-seq)
./mkl-example

Save the script as run.sh and submit it from the directory containing the source file with sbatch run.sh. It requests one CPU and 4000 MB of memory for five minutes. Choose resources and linking options appropriate to your application.

IMKL-FFTW

The imkl-FFTW modules provide FFTW-compatible interfaces backed by Intel MKL, allowing applications using the FFTW API to link against MKL. The standalone FFTW library is available separately.

Intel MKL-FFTW can be activated using one of the following:

module load imkl-FFTW/2025.3.1-iimpi-2026.1
module load imkl-FFTW/2025.2.0-iimpi-2025b
module load imkl-FFTW/2023.0.0-iimpi-2022.12
module load imkl-FFTW/2022.2.1-iimpi-2022.11
module load imkl-FFTW/2022.2.1-iimpi-2022b
module load imkl-FFTW/2022.2.0-iimpi-2022.09

which also implicitly loads a version of the iimpi toolchain, itself being a subset of the intel toolchain. See matching intel toolchains.

For example, download fftw-example.c and use the following commands in a batch job requesting one CPU. This uses the icx compiler loaded by the imkl-FFTW module:

module load imkl-FFTW/2025.3.1-iimpi-2026.1
icx -O2 -o mkl-fftw-example fftw-example.c -lfftw3xc_intel $(pkg-config --cflags --libs mkl-dynamic-lp64-seq)
./mkl-fftw-example

Installation notes

imkl was installed using Easybuild, build details can be found in $EBROOTIMKL/easybuild with a given module loaded.

imkl-FFTW was installed using Easybuild, build details can be found in $EBROOTIMKLMINFFTW/easybuild with a given module loaded.

Direct dependencies for latest version of imkl-FFTW