Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MKL static linking

amit_paliwal
Beginner
304 Views
Hi All,
I have the latest version of MKL installed with IFC 7.1

I compiled my program by the following command:

ifc try.f -o try -L /opt/intel/mkl60/lib/32 -lmkl_lapack -lmkl_ia32 -lguide -lpthread

it works fine but when i run it on some other node of the cluster: it gives me error

./try: error while loading shared libraries: libguide.so: cannot open shared object file: no such file or directory

I was under the impression that it is linking all the libraries statically because libguide.a exists in the mentioned directory. What is the problem here? I want to link all the
libraries statically so that i can run them on a different node/computer.
please help.

-Amit.
0 Kudos
1 Reply
TimP
Honored Contributor III
304 Views
While we've heard that MKL would no longer support static linking, I see that the blurb on developer.intel.com specifically says both dynamic and static linking are supported. It also says you are permitted to copy the dynamic link libraries.

Note that, unlike earlier versions, where you had to choose a single architecture version (p4/p3/generic), it appears that a static link would include all the versions.

I think that the supported link option, in place of -lguide -lpthread, would be -openmp, but I'm not claiming that would make a difference.

In any case, you could use ldd to find out which .so libraries are required, and save yourself some trial and error.

An issue submission on premier.intel.com would be appropriate to ask for clarification.
0 Kudos
Reply