Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26755 Discussions

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

Jasmeet_S_
Beginner
8,504 Views

HI,

I have compiled a source code on my system.

After giving the correct path of binaries created, I am trying to run the script files but the following error is coming:

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

 

0 Kudos
1 Solution
mecej4
Black Belt
8,504 Views

If you were able to compile and link already, that is an indication that the shared library was found during the linking phase. However, since the a.out so produced may be run at a different time or even on a different machine, it is necessary to have LD_LIBRARY_PATH set accordingly.

If you simply open a shell window and source the start-up script (compilervars.sh, ifortvars.sh, etc.) for the Intel compiler package, LD_LIBRARY_PATH would be set up by the script itself.

View solution in original post

4 Replies
mecej4
Black Belt
8,504 Views

In your execution environment, the variable LD_LIBRARY_PATH should contain the path to the directory that contains the shared library. This is normally done for you when you launch a shell configured for the compiler, but if you attempt to run the executables that you built in a different shell, you have to set LD_LIBRARY_PATH yourself.

Jasmeet_S_
Beginner
8,504 Views

Thanks mecej4 for the comment. Actually the source codes are compiled on university server. Whether I need to compile it again or to change LD_LIBRARY_PATH?

 

mecej4
Black Belt
8,505 Views

If you were able to compile and link already, that is an indication that the shared library was found during the linking phase. However, since the a.out so produced may be run at a different time or even on a different machine, it is necessary to have LD_LIBRARY_PATH set accordingly.

If you simply open a shell window and source the start-up script (compilervars.sh, ifortvars.sh, etc.) for the Intel compiler package, LD_LIBRARY_PATH would be set up by the script itself.

View solution in original post

Jasmeet_S_
Beginner
8,504 Views

Thanks mecej4.

I used the command: source /path/to/file/mklvars.sh intel64

Now it is working.

Reply