MKL

From BenchIT-Wiki

Jump to: navigation, search

Contents

Links

Intel Math Kernel Library (MKL)

Intel MKL Documentation

ScaLAPACK Documentation


x86_64

If the standard path is used, the following informations apply: The MKL libraries are located in

/opt/intel/mkl/8.0/lib/em64t ( = $MKL_LIBRARY_PATH )

the include files are located in

/opt/intel/mkl/8.0/include

a number of examples is located in

/opt/intel/mkl/8.0/examples

list of libraries for EM64T

The following table presents a likst of the available libraries inside the mkl (lib/em64t contains all libraries for IntelEM64T applications):

libmkl_em64t.a Optimized kernels for Intel EM64T (BLAS, Sparse BLAS, FFT/DFT, VML, VSL and interval arithmetic functions)
libmkl_lapack.a LAPACK routines and drivers
libmkl_lapack95.a Fortran-95 interface to LAPACK routines and drivers
libmkl_blas95.a Fortran-95 interface to BLAS routines and drivers
libmkl_solver.a Sparse solver routines
libguide.a Threading library for static linking
libmkl.so Library dispatcher for dynamic load of processor specific kernel (Dynamically loaded versions of BLAS, Sparse BLAS, FFT/DFT and interval arithmetic functions)
libmkl_lapack32.so LAPACK routines and drivers, single precision data types
libmkl_lapack64.so LAPACK routines and drivers,double precision data types
libmkl_def.so Default kernel
libmkl_p4n.so Kernel for Intel Xeon processor with Intel EM64T
libvml.so Library dispatcher for dynamic load of processor specific VML kernels (Dynamically loaded versions of VML/VSL)
libmkl_vml_def.so VML part of default kernel
libmkl_vml_p4n.so VML for Intel Xeon processor with Intel EM64T
libmkl_ias.so Interval arithmetic routines
libguide.so Threading library for dynamic linking

Examples for compiling

Examples (static)

ifort myprog.f -L$MKL_LIBRARY_PATH -lmkl_lapack -lmkl_em64t -lguide -lpthread

Static linking of LAPACK and kernels. Processor dispatcher will call the appropriate kernel for the system at runtime.

ifort myprog.f -L$MKL_LIBRARY_PATH -lmkl_lapack95 -lmkl_lapack -lmkl_em64t -lguide -lpthread

Static linking of Fortran-95 LAPACK interface and kernels. Processor dispatcher will call the appropriate kernel for the system at runtime.

icc myprog.c -L$MKL_LIBRARY_PATH -lmkl_em64t -lguide -lpthread -lm

Static linking of BLAS, Sparse BLAS, VML/VSL, interval arithmetic, and FFT/DFT. Processor dispatcher will call the appropriate kernel for the system at runtime.

ifort myprog.f -L$MKL_LIBRARY_PATH -lmkl_solver -lmkl_lapack -lmkl_em64t -lguide -lpthread

Static linking of the sparse solver and possibly other routines within Intel MKL (including the kernels needed to support the sparse solver).

Examples (dynamic)

icc myprog.c -L$MKL_LIBRARY_PATH -lmkl -lguide -lpthread

Dynamic linking of the BLAS or FFTs within Intel MKL.

Examples (static libguide)

Libguide libraries have the same name for both static and dynamic cases. The previous example's libguide demonstrates the dynamic case, in which the shared object is used for the linking. To force the static library linking, use either -static flag or explicit static form:

ld myprog.o $MKL_LIBRARY_PATH/libmkl_lapack.a $MKL_LIBRARY_PATH/libmkl_em64t.a $MKL_LIBRARY_PATH/libguide.a -lpthread

Static linking, LAPACK library, EM64T processor kernels. Processor dispatcher will call the appropriate kernel for the system at runtime.

ld myprog.o $MKL_LIBRARY_PATH/libmkl_lapack.a $MKL_LIBRARY_PATH/libmkl_ipf.a $MKL_LIBRARY_PATH/libguide.a -lpthread

Static linking of LAPACK and kernels. Processor dispatcher will call the appropriate kernel for the system at runtime.

More Examples

/opt/intel/mkl/8.0/examples
/opt/intel/mkl/8.0/tests

Note: If you want to test these examples yourself you will have to copy them to your home directory (or wherever you want to put them), check the makefiles (e.g. if paths are correct) and make the examples e.g. for Intel compiler with

make libem64t

or for GNU compiler with

make libem64t F=gnu



ia64

ia32

Personal tools