Intel® oneAPI DPC++/C++ Compiler
Developer Guide and Reference
qmkl, Qmkl
Tells the compiler to link to certain libraries in the Intel® oneAPI Math Kernel Library (oneMKL). On Windows systems, you must specify this option at compile time.
Syntax
Linux: |
-qmkl[=lib] |
Windows: |
/Qmkl[:lib] |
Arguments
lib |
Indicates which oneMKL library files should be linked. Possible values are:
|
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® oneAPI Math Kernel Library (oneMKL).
On Linux* systems, dynamic linking is the default when you specify -qmkl. 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.
When using option -qmkl (or /Qmkl) along with option -fsycl, the compiler now links against the LP64 interface library instead of relying solely on the ILP64 variants.
This enables improved compatibility and consistency between host (CPU) and device (SYCL) code paths.
For SYCL-based compilation, when enabled with option -qmkl(or option /Qmkl) or option -qtbb (or option /Qtbb), the compiler now defaults to using LP64 libraries instead of ILP64 libraries. To continue using ILP64-based oneMKL libraries, users must explicitly specify the -qmkl-ilp64 option.
For more information about using oneMKL libraries, see the article titled: Intel® oneAPI Math Kernel Library Link Line Advisor.
If you specify options [q or Q]mkl and -fsycl on the command line, you link to the combined oneMKL* SYCL library.
To link to a specific oneMKL SYCL library, specify options [q or Q]mkl, -fsycl, and [q or Q]mkl-sycl-impl.
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* 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.
If you specify option [q or Q]mkl, or [q or Q]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 [q or Q]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
Alternate Options
None