mkl, Qmkl

Tells the compiler to link to certain libraries in the Intel® Math Kernel Library (Intel® MKL). On Windows systems, you must specify this option at compile time.

Syntax

Linux:

-mkl[=lib]

macOS:

-mkl[=lib]

Windows:

/Qmkl[:lib]

Arguments

lib

Indicates which Intel® MKL library files should be linked. Possible values are:

parallel

Tells the compiler to link using the threaded libraries in the Intel® MKL. This is the default if the option is specified with no lib.

sequential

Tells the compiler to link using the sequential libraries in the Intel® MKL.

cluster

Tells the compiler to link using the cluster-specific libraries and the sequential libraries in the Intel® MKL. Cluster-specific libraries are not available for macOS*.

Default

OFF

The compiler does not link to the Intel® MKL.

Description

This option tells the compiler to link to certain libraries in the Intel® Math Kernel Library (Intel® MKL).

On Linux* and macOS* systems, dynamic linking is the default when you specify -mkl. To link with Intel® MKL statically, you must specify:

-mkl -static-intel

On Windows* systems, static linking is the default when you specify /Qmkl. To link with Intel® MKL dynamically, you must specify:

/Qmkl /MD 

For more information about using Intel® MKL libraries, see the article in Intel® Developer Zone titled: Intel® Math Kernel Library Link Line Advisor, which is located in https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor .

Note

On Windows* systems, this option adds directives to the compiled code, which the linker then reads without further input from the driver. On Linux* and macOS* systems, the driver must add the library names explicitly to the link command.

Note

If you specify option [Q]mkl or [Q]mkl=parallel, and you also specify option [Q]tbb, the compiler links to the standard threaded version of the Intel® MKL. However, if you specify [Q]mkl or [Q]mkl=parallel, and you also specify option [Q]tbb and option [q or Q]openmp, the compiler links to the OpenMP* threaded version of the Intel® MKL.

IDE Equivalent

Visual Studio: None

Eclipse: Performance Library Build Components > Use Intel® Math Kernel Library

Xcode: Performance Library Build Components > Use Intel® Math Kernel Library

Alternate Options

None

See Also