-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so #3884
Comments
From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
Did you compile pycaffe with mkl? If you compiled with mkl in the past, you should |
Are you using Anaconda? The problem might not be related with caffe. Try python -c 'import sklearn.linear_model.tests.test_randomized_l1' If you can reproduce the error, that means the problem is not related with caffe but anaconda. conda install nomkl that solves my problem. Hope that can solve yours, too. |
conda install nomkl numpy scipy scikit-learn numexpr The above answer in the site must not be a solution. If it happens still, the default mode of Anaconda should be nomkl as soon as possible at least in Ubuntu. What do you guys think? |
Closing due to lack of reply from @linhj184169280, and to clean up the Issues page. |
Hi, Just wanted to note that Anaconda 4.0.0, shipped with mkl enabled by default, has this issue. The actual issue is that Anaconda linked with mkl, but not with libmkl_core.so, thus it has a missing symbol, and can be seen by running:
I didn't want to uninstall mkl, as I'd like to have the performance boost, so I found a workaround which worked for me - preload libmkl_core.so before execution.
Regards, |
@yanirj To use MKL properly it is required to set its environment using provided script. Usually something like that: This is just example, MKL may be installed in different directory , and argument given match requested architecture (intel64 in that case). More options is available , but I gave You the most common one. Please try it and see if it works if you haven't used it. Let us know if this sorted out issue You are observing. Regards, |
Updating via |
Thanks @jskDr! Your solution helped me! |
Hello: I found this thread while reseaching this MKL error, and summarized my answer here (related thread):
TLDR:
worked for me;
did not. :-) |
I have solved the problem,this is the tutorial https://docs.continuum.io/mkl-optimizations/, the command is: |
I had this issue with gensim. This worked:
Strangely, swapping the last two steps does not work.
|
Following instructions from @victoriastuart and @ujsyehao , I updated mkl and anaconda. It removed the original error. But there was a new error:
So I removed mkl and installed nomkl following @pcgreat and @jskDr. It works. |
I had the same problem, and it went away after updating Anaconda to the latest version (4.3.0 with Python 3.6). |
Just a heads up for anyone else that may end up here that this error can also be a red herring at times. I got a similar error recently due to inadvertently running a script while inside a mounted directory since behind the scenes its checking cwd and can't make sense of where things are. |
Thanks @jskDr! I solved it using your commands, but I didn't need to remove mkl. My problem was importing scikit-image in a conda environment |
same here. there was no need to remove mkl. thanks @jskDr for helping me out |
nomkl added as per BVLC/caffe#3884 (comment)
nomkl added as per BVLC/caffe#3884 (comment)
conda install nomkl worked for me |
either with
What are the downsides of this action if I press "yes"? |
Thanks @pcgreat ! |
I had this same issue using scikit-learn 0.19 and numpy 1.13.3 when running MLPRegressor (and also with a package called pyearth running an algorithm called MARS). I believe the root of the problem was that our python is part of an Anaconda install, but scikit-learn and numpy were installed via pip, and their expectations for mkl must not agree. Unfortunately my framework is managed by some dedicated company admins, not by me, so I haven't gotten my guy to try recompiling numpy yet. But I was able to find a workaround based on this thread: Adding |
Just some more info: Installing "nomkl" is not a solution! It simply disables mkl falling back to very slow functions. Hence we need to find the libraries that export those symbols: So preloading TLDR: Note: libmkl_sequential might not be the best choice for performance. So you could try one of the thread libraries instead. |
@pcgreat, it worked for me. Thanks. |
Note: |
The following worked for me |
still not fixed!! :-( |
The workaround proposed by @Flamefire worked best for me! |
I had a similar issue using Faiss - this worked. Solution sourced from https://www.programmersought.com/article/10826550193/ and https://blog.csdn.net/qikaihuting/article/details/103526376 and : In my case (on WSL2 Ubuntu on Windows) the Intel MKL libraries were installed at
|
For me downgrading mkl solved it: |
The BLAS that I choosed in Makefile.conf is atlas, and I compile the caffe with pycaffe.
make test and make runtest is okay, but when I "import caffe" in python, it tells me "Intel MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so". So what happened to my caffe?
The text was updated successfully, but these errors were encountered: