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

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

Jasmeet_S_
Beginner
20,603 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
Honored Contributor III
20,603 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

0 Kudos
4 Replies
mecej4
Honored Contributor III
20,602 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.

0 Kudos
Jasmeet_S_
Beginner
20,602 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?

 

0 Kudos
mecej4
Honored Contributor III
20,604 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.

0 Kudos
Jasmeet_S_
Beginner
20,602 Views

Thanks mecej4.

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

Now it is working.

0 Kudos
Reply