- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you set the LD_LIBRARY_PATH?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page