Compiler Flag to Link with Intel® MKL in Intel® Compilers

By Gennady Fedorov, Published: 10/12/2010, Last Updated: 12/27/2018

The latest versions of Intel® C++ and Fortran Compilers introduce new options that will be useful for Intel® Math Kernel Library (Intel® MKL) users.
These options provide to reference in compile time and link with Intel MKL without having to know all the nuances of how the performance libraries can be combined.

Windows*: /Qmkl[:<lib>]
Linux* and mac OS X*: –mkl[=<lib>]

Where argument <lib>


Indicates the part of the library that the compiler should link to. Possible values are:


Tells the compiler to link using the threaded part of Intel MKL. This is the default if the option is specified with no lib.


Tells the compiler to link using the non-threaded part of Intel MKL.


Tells the compiler to link using the cluster part and the sequential part of Intel MKL.


By default this option /Qmkl is OFF.

The example of using on Windows OS
icl /Qmkl /Fetest.exe mkl.cpp

For more details see Compiler User and Reference Guide.


The option is available staring from the following versions of Intel® C++ and Fortran Compilers version 11.1

  • Windows Version 11.1.038,
  • Linux version 11.1.046
  • mac OS X version 11.1.05

Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804