Using the Intel® MKL Dynamic Interface for Windows* OS

Starting with the version 10.3, Intel® MKL provides dynamic libraries for Windows* OS(*).


They enable dynamically selecting of the interfaces and threading layer for Intel® MKL.
To use the dynamic interface, put the only single library to the link line: "mkl_rt.lib".
It should be noted that the line linking remain the same for both IA32 and for Intel® 64 Architectures.

So the linking line will look like:
icl.exe test.cpp mkl_rt.lib

Where,
mkl_rt.lib is dynamic interface library to be used for linking (for IA-32 and for Intel® 64 architectures correspondingly). For IA-32 and Intel® 64, the corresponding dynamic library is mkl_rt.dll.

There is one exception in the current implementation: ScaLAPACK functionality is not included in mkl_rt.dll.

Setting the Threading Layer:

The threading layer is selected at run-time and depends on value provided by environment variable MKL_THREADING_LAYER or function MKL_Set_Threading_Layer(int code).

The environment variable MKL_THREADING_LAYER can be set to INTEL, SEQUENTIAL, or PGI.
The function should be called prior to any other function call except MKL_Set_Interface_Layer. If the function is called the environment variable is ignored.

The default behavior is using of Intel threading layer.

The function declaration is:
int MKL_Set_Threading_Layer(int code)
The variable code can have values :
#define MKL_THREADING_INTEL 0
#define MKL_THREADING_SEQUENTIAL 1
#define MKL_THREADING_PGI 2

Also we provide entry points (**):
int mkl_set_threading_layer(int* code)
int mkl_set_threading_layer_(int* code)
int MKL_SET_THREADING_LAYER(int* code)

The environment variable MKL_THREADING_LAYER can be set to INTEL, SEQUENTIAL, or PGI.

Setting the Interface Layer:


Available interfaces depend on the architecture of your system.

On Windows Intel64 the interface layer is selected at run-time and depends on value provided environment variable MKL_INTERFACE_LAYER or function MKL_Set_Interface_Layer.

The function should be called prior to any other function call (except maybe MKL_Set_Threading_Layer). If the function is called the environment variable is ignored. The default behavior is same as of LP64 interface.

The function declaration is:
int MKL_Set_Interface_Layer(int code) and the variable code can have values:

#define MKL_INTERFACE_LP64 0
#define MKL_INTERFACE_ILP64 1

Also we provide entry points (**):

int mkl_set_interface_layer(int* code)
int mkl_set_interface_layer_(int* code)
int MKL_SET_INTERFACE_LAYER(int* code)


The environment variable MKL_INTERFACE_LAYER can be set to LP64 or ILP64.

notes:

(*)   -- this dynamic interface is only available for Windows OS only

(**) -- all these Windows dynamic interface staff are defined in mkl_service.h header file.

For more complete information about compiler optimizations, see our Optimization Notice.