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 and salk.

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:

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:

  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.
      ifort source.f -L${MKL_PATH} -lmkl -lguide -lpthread 
  2. Submit the job with the qsub command.
Last Updated on Wednesday, 13 March 2013 15:40  

More on MKL

Sample Jobs

For blacklight

For salk

Documentation

User Information

PSC Passwords

Connect to PSC systems:

PSC Policies

For technical questions:
Call the PSC hotline: 412-268-6350 / 800-221-1641 or mail to remarks@psc.edu.

Other services PSC provides:

Advanced Networking: High-speed network design, testing and tuning

3ROX: High-speed network access

Biomedical Applications: Computational biomedical research and training