Intel® Math Kernel Library 11.0.2 User Guide

Linking on Intel Xeon Phi Coprocessors

Intel MKL provides both static and dynamic libraries for coprocessors based on Intel MIC Architecture, but the Single Dynamic Library is unavailable for the coprocessors.

See Selecting Libraries to Link with for libraries to list on your link line in the simplest case.

See Detailed Directory Structure of the lib/mic Directory for a full list of libraries provided in the <mkl directory>/lib/mic directory.

You can link either static or dynamic host libraries and either static or dynamic coprocessor-side libraries independently.

To run applications linked dynamically with the host-computer and coprocessor-side libraries, perform the Setting Environment Variables step of the Getting Started process, which sets:

To make Intel MKL functions available on the coprocessor side, provide the -offload-attribute-target=mic option on your link line.

Important

Because Intel MKL provides both LP64 and ILP64 interfaces, ensure that the host and coprocessor-side executables use the same interface or cast all 64-bit integers to 32-bit integers (or vice-versa) before calling coprocessor-side functions in your application.

The following examples illustrate linking with Intel compilers on Intel Xeon Phi coprocessors.

The examples use a .f (Fortran) source file and Intel® Fortran Compiler. C/C++ users should instead specify a .cpp (C++) or .c (C) file and replace ifort with icc.

In these examples, MKLINCLUDE is defined as $MKLROOT/include
(if you successfully completed the Setting Environment Variables step of the Getting Started process, you can omit the -I$MKLINCLUDE parameter):

See Also


Submit feedback on this help topic