MKL
The Intel Math Kernel Library (MKL) contains highly optimized and extensively threaded routines for engineering and scientific applications.
It includes linear algebra routines (BLAS, LAPACK, ScaLAPACK, and sparse solvers), FFTs, a vector math library, vector random number generators, and LINPACK benchmark routines.
Installed on blacklight, salk, and warhol.
Choosing which libraries to link to
For help in determining which libraries to link, to see the MKL Library Link Advisor provided by Intel.
Blacklight usage
MKL version 10.2.5 is installed on blacklight. To use MKL:
- Create a batch job which:
- Sets up the use of the module command in a batch job.
- Loads the MKL module.
module load imkl
- Includes a compilation command. If you need help to determine which
libraries to link to, see the MKL Library Link
Advisor.
- To use the Intel compilers with MKL, the compilation command should be similiar to:
ifort source.f -o executable -mkl=[parallel | sequential]
- To use the Gnu compilers with MKL, you must explicitly list each library:
g++ source.cc -o executable -L${MKL_PATH} -lmkl_intel_lp64 \ -lmkl_intel_thread -lmkl_core \ -L/opt/intel/Compiler/11.1/072/lib/intel64 \ -liomp5 -fopenmp
- To use the Intel compilers with MKL, the compilation command should be similiar to:
- Submit the job with the qsub command.
Choosing the number of threads with MKL 10.2.5
MKL 10.2.5 includes an optimization feature that allows the library to decide how many threads to use at run time, and the user-defined value of OMP_NUM_THREADS may be ignored. Unfortunately, on UV systems and for this version of the library, the method used to determine the number of available cores can be unreliable.
To override this feature and maintain the value you have defined for OMP_NUM_THREADS, set the environment variable MKL_DYNAMIC to FALSE:
setenv MKL_DYNAMIC FALSE
By default, MKL_DYNAMIC is set to TRUE.
Salk usage
MKL version 10.0 is installed on salk. To use MKL:
- Create a batch job which:
- Sets up the use of the module command in a batch job.
- Loads the MKL module.
module load imkl
- Includes a compilation command. If you need help to determine which
libraries to link to, see the MKL Library Link
Advisor.
ifort source.f -L${MKL_PATH} -lmkl -lguide -lpthread
- Submit the job with the qsub command.
Warhol usage
To use MKL:
- Create a batch job which:
- Loads the MKL module.
module load mkl
- Includes a compilation command like:
gfortran source.f -L${MKL_PATH} -lmkl -lguide -lpthreadIf you need help to determine which libraries to link to, see the MKL Library Link Advisor.
- Loads the MKL module.
- Submit the job with the qsub command.
Example jobs
See some example jobs.