Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
jirina
Total Points:
1,990
Status Points:
1,490
Brown Belt
November 11, 2008 2:59 AM PST
Error while loading shared libraries: libiomp5.so

I am trying to create an application in the following way:

ifort -fixed -extend_source 132 -openmp -fpscomp general -warn declarations -assume byterecl -threads -align all -heap-arrays file1.for file2.for ... fileN.for -o MyApp.out

After I start the application, I get the error 'Error while loading shared libraries: libiomp5.so'.

I updated my .bash_profile to include

source /opt/intel/Compiler/11.0/044/bin/ifortvars.sh ia32

and added also

export PATH=/opt/intel/Compiler/11.0/044/lib/ia32:$PATH

because this path contains libiomp5.so, but I am still getting the same error message.

What am I doing wrong? Please note that I am a complete newbie in Linux and Intel Fortran in Linux, so my questions might be quite stupid :-[Is there any way how to "link a library to an application" so that the application can be distributed?

af123_af007
Total Points:
130
Registered User
November 11, 2008 4:20 AM PST
Rate
 
#1

Did you set the LD_LIBRARY_PATH?



tim18
Total Points:
68,767
Status Points:
68,767
Black Belt
November 11, 2008 5:40 AM PST
Rate
 
#2 Reply to #1
Quoting - af123_af007

Did you set the LD_LIBRARY_PATH?

Unlike Windows, where shared libraries may be found on PATH, linux PATH is not used for that purpose.  The ifortvars script sets both PATH and LD_LIBRARY_PATH, so it is useful both at compile and at run time.



jirina
Total Points:
1,990
Status Points:
1,490
Brown Belt
November 12, 2008 10:38 AM PST
Rate
 
#3 Reply to #2

I am running this in my .bash_profile:

source /opt/intel/Compiler/11.0/044/bin/ifortvars.sh ia32

I checked that PATH contains

/opt/intel/Compiler/11.0/044/bin/ia32

However, I did not find LD_LIBRARY_PATH, just LIBRARY_PATH, containing

/opt/intel/Compiler/11.0/044/mkl/lib/32

However, this directory does not contain libiomp5.so which is reported to be missing when I try starting my

application.

I tried adding /opt/intel/Compiler/11.0/044/lib/ia32 to LIBRARY_PATH, because I found libiomp5.so in that

directory, but this did not help.

Finally, I tried following:

export LD_LIBRARY_PATH=/opt/intel/Compiler/11.0/044/lib/ia32:$LD_LIBRARY_PATH

which made my application work!

Does this mean that ifortvars.sh does not work well and specifies LIBRARY_PATH instead of LD_LIBRARY_PATH, in

addition containg incorrect path ?

Another question is what I should do to be able to distribute my application to other people who don't have

Intel Fortran installed.

Thank you in advance for any help.



tim18
Total Points:
68,767
Status Points:
68,767
Black Belt
November 12, 2008 11:04 AM PST
Rate
 
|Best Answer
#4 Reply to #3

If your ifortvars script does not set LD_LIBRARY_PATH, it looks like an installation failure.

I don't think the  beta version provides for distributing your application.  When you have a standard license for the released version, you have the choice of -static-intel to avoid use of .so from the ifort installation, or the right to send the necessary .so files (check with ldd) with your  file.



jirina
Total Points:
1,990
Status Points:
1,490
Brown Belt
November 12, 2008 1:13 PM PST
Rate
 
#5 Reply to #4

Thank you for your ideas. I reinstalled Intel Fortran from 11.044 to 11.069, there were no problems with the installation, and after running ifortvars.sh (source /opt/intel/Compiler/11.0/069/bin/ifortvars.sh ia32) I have everything correct. There seems to be a problem with running the script in .bash_profile, which I tried to run the script automatically after the login.



bgeneto
Total Points:
40
Registered User
August 26, 2009 9:36 AM PDT
Rate
 
#6 Reply to #5
Quoting - jirina

There seems to be a problem with running the script in .bash_profile, which I tried to run the script automatically after the login.


I don't think that was the problem. I had exactly the same problem with LD_LIBRARY_PATH not been set by ifort 11.1.038 under Ubuntu linux 9.04 x64. Running the ifortvars script manually or automatically sets only LIBRARY_PATH, not the correct environment variable LD_LIBRARY_PATH required in order to run your application in parallel. I think the ifortvars.sh script should be carefully revised for linux, meanwhile one solution is to add the following line in your .bashrc (local) or /etc/profile (global) file (just after calling ifortvars.sh with source command):

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBRARY_PATH


Good luck!





Intel Software Network Forums Statistics

8474 users have contributed to 31606 threads and 100656 posts to date.
In the past 24 hours, we have 30 new thread(s) 109 new posts(s), and 163 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member Kevin Johnson