using mkl, error while loading shared libraries: libmkl_intel_lp64.so

旧街凉风 提交于 2019-12-06 06:53:43

You have to set the LD_LIBRARY_PATH environment variable, otherwise the shared library will not be found at run time.

Before running your program, type export LD_LIBRARY_PATH=/path/to/your/library/directory in the (bash) shell in which you want to run your code.

If you are using Ubuntu, you can set this variable automatically by using configuration files in /etc/ld.so.conf.d/, see Ubuntu help. Similar mechanisms are available for other distributions.

I copied the address of libiomp5 in /etc/ld.so.conf.d/icc.conf and used sudo ldconfig.

There is another way that every time we should use this flag: -Wl,-rpath=/opt/intel/directory/to/library/directory

and it worked.

user3800173

I'm using CentOS on our workstations. Adding following lines to bashrc worked for me.

export PATH="$PATH:/opt/intel/bin"

export LD_LIBRARY_PATH="$PATH:opt/intel/mkl/lib/intel64_lin/"

I'm using CentOS and intel compiler. Type
locate compilervars.sh

Go to your '.bashrc' file and add

source /adress you got from locate command/compilervars.sh intel64

Then in terminal type
source ~/.bashrc

It will fix the error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!