Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29396 Обсуждение

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

Jasmeet_S_
Начинающий
26 877Просмотр.

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 баллов
1 Решение
mecej4
Почетный участник III
26 877Просмотр.

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.

Просмотреть решение в исходном сообщении

4 Ответы
mecej4
Почетный участник III
26 876Просмотр.

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_
Начинающий
26 876Просмотр.

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
Почетный участник III
26 878Просмотр.

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.

Jasmeet_S_
Начинающий
26 876Просмотр.

Thanks mecej4.

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

Now it is working.

Ответить