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

error while loading shared libraries: libiomp5.so

pierre96321478
Beginner
14,156 Views

Dear all,

I want to run a subroutine written in FORTRAN within an engineering software package. The compilation went well but apparently a shared library is missing as I have this error message:

error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

I am using a Linux OS.

Any help would be appreciated.

Pierre

0 Kudos
12 Replies
TimP
Honored Contributor III
14,156 Views
If you are running on the platform where the compiler and libraries are installed, the usual compile environment variable setting script, e.g.
source /opt/intel/bin/compilervars.sh intel64
will add the library path to LD_LIBRARY_PATH.
If running where the shared library isn't present, you may install the redistributable library package, or take other remedies such as copying the library over and adding it yourself to LD_LIBRARY_PATH, or linking libiomp5.a (in your final link, preferably not when making a .so).
0 Kudos
pierre96321478
Beginner
14,156 Views

Thanks a lot for your answer. Actually, I can locate the shared library libiomp5.so under the Intel directory but the compiler cannot find it on its own. Do you know how to add the library to LD_LIBRARY_PATH?

0 Kudos
TimP
Honored Contributor III
14,156 Views
I suppose you mean that you are running without sourceing compilervars, and the run-time loader doesn't have the LIBRARY_PATH; you must repeat the LIBRARY_PATH setting in the compilervars script e.g.
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.7.256/compiler/lib/intel64:$LD_LIBRARY_PATH
(use the path where you found it)
0 Kudos
mecej4
Honored Contributor III
14,157 Views
One way is to issue the following command to the shell:

$ export LD_LIBRARY_PATH=directory containing shared library>:$LD_LIBRARY_PATH

Note the colon separating the components of LD_LIBRARY_PATH

0 Kudos
pierre96321478
Beginner
14,157 Views

I issued exactly this command in the terminal:

$export LD_LIBRARY_PATH=home/tph201/intel/Compiler/11.0/081/lib/intel64:$LD_LIBRARY_PATH

and the Bash replied:

LD_LIBRARY_PATH=home/tph201/intel/Compiler/11.0/081/lib/intel64:: No such file or directory

I have double-checked that the path is correct. Should I try to re-install Intel compiler?

0 Kudos
TimP
Honored Contributor III
14,157 Views
The correct entry should have been visible in LD_LIBRARY_PATH after you sourced the ifortvars script to set up for compiling. If the libraries aren't actually present there, then uninstall and re-install would be advisable. But you said you were able to find the library, so it should be found if your LD_LIBRARY_PATH has a match.
0 Kudos
mecej4
Honored Contributor III
14,157 Views
>$export LD_LIBRARY_PATH=home/tph201/intel/Compiler/11.0/081/lib/intel64:$LD_LIBRARY_PATH

There should be a slash character ('/') preceding home.
0 Kudos
pierre96321478
Beginner
14,157 Views

Thanks a lot Tim and Mecej for your patience. I managed to export the LD_LIBRARY_PATH as followed this steps:

me:~$ /home/tph201/intel/Compiler/11.0/081/lib/intel64

bash: /home/tph201/intel/Compiler/11.0/081/lib/intel64: is a directory

me:~$ export LD_LIBRARY_PATH=/home/tph201/intel/Compiler/11.0/081/lib/intel64

me:~$ echo $LD_LIBRARY_PATH

bash: /home/tph201/intel/Compiler/11.0/081/lib/intel64

But the shared library is still missing when I run the code afterwards. I will try to reinstall ifort.

Cheers,

Pierre

0 Kudos
apiano
Beginner
14,157 Views
The same thing happened to me and I tried reinstallation but it still doesn't work
0 Kudos
Georg_Z_Intel
Employee
14,157 Views
Hello,

assuming you have installed the latest Intel Composer XE 2011 Update 8. Could you please verify that libiomp5.so is present in
/composer_xe_2011_sp1.8.273/compiler/lib/[intel64|ia32]

Also, after sourcing the environment like this (as described in an earlier post)
source /composer_xe_2011_sp1.8.273/bin/compilervars.sh [intel64|ia32]

$LD_LIBRARY_PATH
should point to the same directory containing libiomp5.so.

This has to be set every time you're executing your application (or you install the library to a system wide library directory).

Best regards,

Georg Zitzlsberger
0 Kudos
kiran_s_
Beginner
14,157 Views

same kind of error while running the matrix multiplication for mic ...sample code from vtune amplifier. 

and my bashrc 

export PATH=/opt/intel/composer_xe_2013.0.079/bin/intel64_mic/:$PATH
export INCLUDE=/opt/intel/composer_xe_2013.0.079/compiler/include/mic/:$INCLUDE
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2013.0.079/compiler/lib/mic/:$LD_LIBRARY_PATH

export PATH=/opt/intel/impi/4.1.0.018/mic/bin/:$PATH
export INCLUDE=/opt/intel/impi/4.1.0.018/mic/include/:$INCLUDE
export LD_LIBRARY_PATH=/opt/intel/impi/4.1.0.018/mic/lib/:$LD_LIBRARY_PATH

./matrix.mic: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

0 Kudos
kiran_s_
Beginner
14,157 Views

just copy that  libiomp5.so file to mic card 

scp  libiomp5.so username@mic0:/tmp

and then run that executable.

 

Thank you 

kiran sonavane.

0 Kudos
Reply