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

error while loading shared librairies: libimf.so : cannot open shared libraries

Bruno_Borgarino
Beginner
3,259 Views
Hello,

I am trying to compile a fortran code on a Cray (running on Linux Suse, ifort EM64T, version 9.0)
The code compiles and run well on my workstation (Ubuntu 64bits, 10.04, ifort 11.1) But has several problems on the Cray.

As I use large arrays, my compilation and linking options are:

-O2 -ip -axW -mcmodel=medium -i-dynamic -g

(here -i-dynamic replaces -shared-intel that I used on my workstation ; this option does not seem to be available on ifort 9.0)

The code compiles well, but at running I get : "error while loading shared librairies: libimf.so : cannot open shared libraries". Spending some time on google I figured out this is related to dynamic linking. Then I have tried the following:

source /opt/intel/fc/9.0/bin/ifortvars.sh ia64 : the compilation does not work, "Command line warning: ignoring unknown option mcmodel=medium"

source /opt/intel/fce/9.0/bin/ifortvars.sh ia64 : the compilation works all right, but "error while loading shared librairies: libimf.so : cannot open shared libraries". Basically it does not change anything

export LD_LIBRARY_PATH=/opt/intel/fce/9.0/lib : the same, compilation is ok, but same error when running.

I have even try to include the library adress in the makefile, but without any success.

Is there anything else that I should have tried ?

Best regards,

Bruno
0 Kudos
6 Replies
mecej4
Honored Contributor III
3,261 Views
On the Cray, is the file libimf.so in the expected place ( /lib/ia64, for example, /opt/intel/Compiler/11.1/072/lib/ia64/ ) and does it have the correct permissions? Which process is it that depends on libimf.so? You may use ldd on the executable image to see what shared libraries are needed to run it.
0 Kudos
Bruno_Borgarino
Beginner
3,261 Views
Hi,

Thanks for the quick answer.

About the location:

~> locate libimf.so
/opt/intel/fc/9.0/lib/libimf.so
/opt/intel/fce/9.0/lib/libimf.so

The permissions are:

~> ls -l /opt/intel/fce/9.0/lib/libimf.so
-rwxr-xr-x 1 root root 1939789 2005-12-02 10:36 /opt/intel/fce/9.0/lib/libimf.so

And "~>ldd NameExecutable" gives:

libimf.so => /opt/intel/fce/9.0/lib/libimf.so (0x0000002a9566d000)
libm.so.6 => /lib64/libm.so.6 (0x0000002a95905000)
libsvml.so => /opt/intel/fce/9.0/lib/libsvml.so (0x0000002a95a5d000)
libifport.so.5 => /opt/intel/fce/9.0/lib/libifport.so.5 (0x0000002a95ba1000)
libifcore.so.5 => /opt/intel/fce/9.0/lib/libifcore.so.5 (0x0000002a95cda000)
libirc.so => /opt/intel/fce/9.0/lib/libirc.so (0x0000002a95eb7000)
libc.so.6 => /lib64/libc.so.6 (0x0000002a95fed000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a96213000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a9631e000)
/lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

Taking -lm off the librairies used at compilation brings the same problem further down (libsvml.so).

Thanks again,

Bruno
0 Kudos
TimP
Honored Contributor III
3,261 Views
Paths to intel64/em64t libraries are irrelevant if you are running on ia64 (Itanium). As I remember it, ifort 9.1 versions depending on running the ifortvars script in the specific installation for the architecture (there was no ia64 argument for ifortvars). So, there are differences between setup for intel64 on a recent version and ia64 on that older version.
0 Kudos
Bruno_Borgarino
Beginner
3,261 Views
Hi Tim,

I did not understand in details what you mean but your are right: there is no argument needed for ifortvars.
However, running : /opt/intel/fce/9.0/bin/ifortvars.sh, then recompiling and executing leads to the same errors.

I am running intel64 ("uname -a" gives x86_64, just like on my worksation).

When you mention irrelevant path, is that about the answer of "ldd NameExecutable", or about the way I was calling ifortvars.sh ?

Thanks,
Bruno
0 Kudos
mecej4
Honored Contributor III
3,261 Views
I do not know anything about current Crays, but there is a glaring inconsistency in what you reported. IA64 stands for Intel Itanium architecture, and Intel64 is Intel's version of a 64-bit extension of X86 architecture.

IA64 and Intel64 have similar names, but are completely different. If uname says x86_64, then it is certain that your Cray does not use IA64 architecture. Therefore, you should expect the Intel compiler and utilities to behave similarly to your Ubuntu workstation. You should not attempt to run any IA64/Itanium binaries.
0 Kudos
TimP
Honored Contributor III
3,261 Views
If you are actually running on IA64, the em64t/intel64 libraries should be ignored, even if found, accounting for the ineffectiveness of setting paths to them.
0 Kudos
Reply