Compiler flag to link with MKL in Intel Compilers

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


On Windows, this option is: /Qmkl[:<lib>]
and for Linux and Mac OS X correspondingly this option is –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 the 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 the Intel® MKL.

cluster

Tells the compiler to link using the cluster part and the sequential part of the 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
and for Mac OS* X version 058

  • This option is available for ia32, Intel®64 and IA-64 architectures.

For more complete information about compiler optimizations, see our Optimization Notice.