NervanaSystems / neon

Intel® Nervana™ reference deep learning framework committed to best performance on all hardware
http://neon.nervanasys.com/docs/latest
Apache License 2.0
3.87k stars 811 forks source link

libmklml_intel.so not found #438

Closed mas-dse-greina closed 6 years ago

mas-dse-greina commented 6 years ago

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 (https://github.com/tensorflow/tensorflow/issues/13711).

mas-dse-greina commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

We'll fix our code on the URL

mas-dse-greina commented 6 years ago

Thanks!

-Tony

On Fri, Jan 26, 2018 at 2:54 PM, Wei Wang notifications@github.com wrote:

We'll fix our code on the URL

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NervanaSystems/neon/issues/438#issuecomment-360927312, or mute the thread https://github.com/notifications/unsubscribe-auth/AVReEkyDX2-endS1m3gqreZiMG2B1IO7ks5tOledgaJpZM4RqlHx .

wei-v-wang commented 6 years ago

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

wei-v-wang commented 6 years ago

https://github.com/NervanaSystems/neon/commit/f43cfa2e26f9c84b0f42fcda50b6b83104623223 closes this issue. Thanks again for reporting!