Intel® Math Kernel Library 2018 Update 1 Developer Guide

Linking for Compiler Assisted Offload

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.

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

To run applications linked dynamically with the host-side and coprocessor-side libraries, perform the Scripts to Set Environment Variables Setting Environment Variables step of the Getting Started process. In addition to other environment variables, it sets:

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 for compiler assisted offload to Intel Xeon Phi coprocessors.

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

Important

Coprocessors run a Unix* operating system.

See Also