Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

MKL linking options

csv610
Beginner
320 Views

Hello,

I have installed Intel-MKL software package on my Intel-Core-2 machine with
Ubuntu-64 bit OS.

It seems there are many linking options and looks very confusing too. Can someone
tell what are the best options to use ?

Confusion points:
1. gnu_thread v/s intel threads
2. lp64 v/s ilp64
3. guide
4. iomp5
5. sp2dp

I don't know what are 3-5 libraries.

Thanks,

Chaman Singh Verma
Poona, India
0 Kudos
2 Replies
TimP
Honored Contributor III
320 Views
1. I haven't seen this documented either. I suppose, if for some reason you chose to use libgomp rather than libiomp5, you would use gnu thread rather than intel thread. Then, presumably, you would not be able to use Intel compiler option -fopenmp. This would enable an MKL thread build linked against OpenMP run-time .so to run on a system with gcc 4.2 or newer installed, without requiring libiomp5.so to be present. I'm not certain how valuable a consideration this is, as it seems to involve a combination of linking MKL static with the exception of dynamic OpenMP.
2. This has been explained several times. The "i" in ilp64 stands for integer, meaning that the integer arguments for MKL functions are all 64-bit data types. lp64 means that the int arguments are 32-bit data types, while still in 64-bit pointer mode. There are several scripts which include lp64, core, and intel thread libraries; if you want to change any of those selections, including use of ilp64, you must avoid those scripts which would produce conflicts. You would require the ilp64 for cases where you must specify a data region >8GB. 64-bit integer data types include C long long and Fortran integer(selected_int_kind(12)) or default integer promoted by -i8.
3. libguide is the "legacy" Intel OpenMP run-time library, backward compatible with MKL 9.x and Intel 9.x and 10.0 compilers. It is not compatible with gnu OpenMP, nor with future Intel compilers or MKL. Intel 10.1 compilers use it as a default for -openmp.
It looks like the OpenMP profiling option is available only with libguide, requiring Intel thread profiler to be installed.
4. libiomp5 supports gnu openmp calls (gcc/g++/gfortran -fopenmp) as well as Intel 10.1 -openmp. With Intel 10.1 compilers, it may be selected by -openmp-lib=compat. The next major Intel release will likely make it the only OpenMP version available.
On Windows, libiomp5 is compatible with VC9 -openmp, not with libgomp.
5. sp2dp doesn't appear to be documented for general use. It looks like it translates single precision function names to the double precision ones, to support changing from all single precision Fortran to all double precision by a -autodouble switch. If my interpretation is right, sp2dp itself doesn't translate data formats, only function names.
We could get clarification if the above isn't sufficient.
0 Kudos
Gennady_F_Intel
Moderator
320 Views

Hi Chaman Singh Verma,

Id recommend to read mkl userguide.pdf (you can find this doc in ..doc folder). You can find there all info you asked here.

--Gennady

0 Kudos
Reply