Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

libmklml_intel.so not found #438

Closed
mas-dse-greina opened this issue Jan 24, 2018 · 7 comments
Closed

libmklml_intel.so not found #438

mas-dse-greina opened this issue Jan 24, 2018 · 7 comments

Comments

@mas-dse-greina
Copy link

I just built neon on a CentOS 7 (3.10.0-693.11.6.el7.x86_64) within a conda (Python 2.7) environment. The build appeared to be successful, but when I try to run the mnist_mlp.py example, I get:

(neon) [bduser@node15 examples]$ python mnist_mlp.py
Traceback (most recent call last):
File "mnist_mlp.py", line 59, in
args = parser.parse_args()
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/site-packages/nervananeon-2.6.0-py2.7.egg/neon/util/argparser.py", line 366, in parse_args
compat_mode=args.compat_mode)
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/site-packages/nervananeon-2.6.0-py2.7.egg/neon/backends/init.py", line 113, in gen_backend
deterministic=deterministic)
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/site-packages/nervananeon-2.6.0-py2.7.egg/neon/backends/backend.py", line 468, in allocate_backend
return Backend.backendsname
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/site-packages/nervananeon-2.6.0-py2.7.egg/neon/backends/nervanamkl.py", line 213, in init
self.mklEngine = ctypes.cdll.LoadLibrary(mkl_engine_path)
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/ctypes/init.py", line 444, in LoadLibrary
return self._dlltype(name)
File "/home/bduser/miniconda2/envs/neon/lib/python2.7/ctypes/init.py", line 366, in init
self._handle = _dlopen(self._name, mode)
OSError: libmklml_gnu.so: cannot open shared object file: No such file or directory

I found this online and am trying the suggestion at the end to rebuild mkl-dnn from source (tensorflow/tensorflow#13711).

@mas-dse-greina
Copy link
Author

mas-dse-greina commented Jan 24, 2018

It looks like this works:

git clone https://github.com/01org/mkl-dnn.git
cd mkl-dnn/scripts && ./prepare_mkl.sh && cd ..
mkdir -p build && cd build && cmake .. && make
sudo make install

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> ~/.bashrc

Maybe the .tar.gz file that is being included with neon needs to be updated??

@baojun-nervana
Copy link
Contributor

@mas-dse-greina It is good you can fix the issue by setting the library path.
Sometimes it may need to clean up before built. You may run

make clean => this will clean up all the mkl artifacts
make install => it will download mkl and do a fresh install.

@wei-v-wang
Copy link
Contributor

Thanks for reporting. Looks like there is a URL change for the tar.gz.
Your approach using latest mkl-dnn (open-source) was able to avoid calling buggy URL.

@wei-v-wang
Copy link
Contributor

We'll fix our code on the URL

@mas-dse-greina
Copy link
Author

mas-dse-greina commented Jan 26, 2018 via email

@wei-v-wang
Copy link
Contributor

Reopen till URL is changed. Sorry for the confusion...

@wei-v-wang wei-v-wang reopened this Jan 26, 2018
@wei-v-wang
Copy link
Contributor

f43cfa2 closes this issue. Thanks again for reporting!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants