MKL

Overview

Intel Math Kernel Library (MKL) provides a library of highly optimized, extensively threaded maths routines. The library has C and Fortran interfaces for most routines. There is also comprehensive support for several math operations including: Linear algebra, Fast Fourier transforms (FFT), Vector maths, Direct and iterative sparse solvers, Random number generators.

Version 2017.0 update 4 is installed on the CSF as part of the Intel 17.0.7 compiler installation.

There is no MKL modulefile – use the Intel compiler modulefile instead.

Restrictions on use

The CSF uses the University license. The Intel compilers are available to any student or member of staff of the University of Manchester for the purpose of the normal business of the University. Such use includes research, personal development and administration and management of the university. The software may not be used for research, consultancy or services leading to commercial exploitation of the software.

Code may be compiled on the login node, but aside from very short test runs (e.g., one minute on fewer than 4 cores), executables must always be run by submitting to the batch system, SGE.

Set up procedure

There is no MKL modulefile – use the Intel compiler modulefile instead.

Using the MKL in your applications

Flags should be provided to the Intel compiler command line to link against the MKL. The flags used depend on your requiresments, such as the particular libraries you wish to use and whether you are compiling a serial or parallel (OpenMP or MPI) application.

To determine the flags to use, first check to see if the software you are compiling already has instructions or Makefiles for an Intel-compiler build. The MKL flags will often already have been set up correctly.

Alternatively, complete the form at the online Intel MKL Link-line Advisor, then copy-and-paste the advised flags from the webpage.

See the CSF Intel compiler page for more information on running the Intel compiler and also how to automatically compile your code for the various Intel architectures used by the CSF compute nodes (remember that the CSF has several different compute node architectures – Haswell, Broadwell, Skylake – that have been added over the years. With the Intel compiler it is possible to compile a single copy of you application that contains several version of various parts of your code, each optimized for the new features found in each Intel architecture. When you run your app in a job, the app itself will use the version most suitable to the architecture on which your job is running).

Environment variables

The Intel compiler modulefile will set the MKLROOT environment variable to point to the folder containing the MKL installation. This can be used on your compiler command line to access header files and libraries. For example:

icc -I${MKLROOT}/include -L${MKLROOT}/lib/intel64 ...

The LD_LIBRARY_PATH environment variable is also set correctly by the modulefiles so that executables will find the MKL libraries at runtime if you linked against shared libraries at compile time.

Further info

Updates

None.

Last modified on November 1, 2022 at 11:36 am by Pen Richardson