Intel® C++ Compiler Classic Developer Guide and Reference

ID 767249
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

qmkl, 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:

-qmkl[=lib]

macOS:

-qmkl[=lib]

Windows:

/Qmkl[:lib]

Arguments

lib

Indicates which oneMKL library files should be linked. Possible values are:

parallel

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

sequential

Tells the compiler to link using the sequential libraries in oneMKL.

cluster

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

Default

OFF

The compiler does not link to the oneMKL library.

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 -qmkl.

On C++ systems, to link with oneMKL statically, you must specify:

-qmkl -static-intel

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

/Qmkl /MD 

If both option -qmkl (or /Qmkl) and -qmkl-ilp64 (or /Qmkl-ilp64) are specified on the command line, the rightmost specified option takes precedence.

NOTE:

On Windows* systems, this option adds directives to the compiled code, which the linker then reads without further input from the driver. You do not need to specify a separate link command.

On Linux* and macOS systems, the driver must add the library names explicitly to the link command. You must use option -qmkl to perform the link to pull in the dependent libraries.

NOTE:

If you specify option [q or Q]mkl, or -qmkl=parallel or /Qmkl:parallel, and you also specify option [Q]tbb, the compiler links to the standard threaded version of oneMKL.

However, if you specify [q or Q]mkl, or -qmkl=parallel or /Qmkl:parallel, and you also specify option [Q]tbb and option [q or Q]openmp, the compiler links to the OpenMP* threaded version of oneMKL.

IDE Equivalent

Visual Studio: None

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

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

Alternate Options

Linux and macOS: -mkl (this is a deprecated option)

See Also