Pittsburgh Supercomputing Center 

Advancing the state-of-the-art in high-performance computing,
communications and data analytics.


Allocation requests now being accepted.     More information  


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.

Choosing which libraries to link to

For help in determining which libraries to link, to see the MKL Library Link Advisor provided by Intel.

Threaded MKL routines

Note that threaded MKL routines are based on OpenMP. Treat these routines as OpenMP parallel regions. Be sure that your thread count does not exceed the number of cores allocated to your job.

Blacklight usage

MKL version 10.2.5 is installed on blacklight. To use MKL:

  1. Create a batch job which:
    1. Sets up the use of the module command in a batch job.
    2. Loads the MKL module.
      module load imkl
    3. 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
  2. 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:


By default, MKL_DYNAMIC is set to TRUE.