IntelMKL (imkl)
It 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
.
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 Developer Guide for Intel® oneAPI Math Kernel Library for Linux
Depending on the version, you might have to load additional modules until you can load IntelMKL (imkl):
module load iccifort/2019.5.281
module load impi/2021.6.0
module load imkl/2019.5.281
Available IntelMKL (imkl) versions can be listed with module spider imkl
. Specifying a version will list the needed modules: module spider imkl/2019.5.281
This will also let you know if you can use a different compiler and MPI with that version.
Alternatively you can load imkl
indirectly by loading a compiler toolchain, which would include a compiler. For instance to load imkl
with GCC and Open MPI you could use the gomkl
compiler toolchain:
module load gomkl/2021a