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

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:

parallel

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

sequential

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

cluster

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.

Notes: 

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
For more complete information about compiler optimizations, see our Optimization Notice.