Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6743 Discussions

-mkl=parallel appears to link with both ilp64 and lp64 MKL libraries


As the number of data elements in the application data gets bigger we're moving to use the ilp64 MKL routines.

I used the Intel Link Line Advisor to specify the required link libraries. Based on this advice, if I build and link an application thus:

icc -DMKL_ILP64 -w testlapack.cpp -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5  -lpthread -lm -o testlapackp

and use ldd -v to examine what libraries are linked with the executable I find as expected: =>  (0x00007fffb8bff000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007f111c837000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007f111b878000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007f111a1ba000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007f1119e9f000) => /lib64/ (0x00007f1119c76000) => /lib64/ (0x00007f11199f2000) => /usr/lib64/ (0x00007f11196ec000) => /lib64/ (0x00007f11194d5000) => /lib64/ (0x00007f1119142000) => /lib64/ (0x00007f1118f3e000)
        /lib64/ (0x00007f111cf53000)

ie the ilp64 library (highlighted)  is properly linked. With > 2**31 array elements the application builds, runs and, parallelises as expected.

If I try to simplify the link line a bit using:

icc -DMKL_ILP64 -w testlapack.cpp -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -mkl=parallel -lm -o testlapackp

and examine the executable with ldd -v I get: =>  (0x00007fff1edff000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007ff92cda4000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007ff92c65f000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007ff92b6a1000) => /opt/intel/composer_xe_2013_sp1.1.106/mkl/lib/intel64/ (0x00007ff929fe3000) => /opt/intel/composer_xe_2013_sp1.1.106/compiler/lib/intel64/ (0x00007ff929cc7000) => /lib64/ (0x00007ff929a38000) => /usr/lib64/ (0x00007ff929732000) => /lib64/ (0x00007ff92951b000) => /lib64/ (0x00007ff9292fe000) => /lib64/ (0x00007ff928f6b000) => /lib64/ (0x00007ff928d66000)
        /lib64/ (0x00007ff92d4c0000)

ie both the ilp64 and lp64 libraries.

The application built with this linkline executes, parallelises etc OK with an array containing 2.5G elements (50k x 50k) but my question is why is the lp64 library being linked?






0 Kudos
0 Replies