-
Notifications
You must be signed in to change notification settings - Fork 226
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. #698
Comments
From @bilderbuchi on February 10, 2016 12:22 I just encountered a similar/equivalent one (on Windows): |
From @msarahan on February 10, 2016 13:50 Pinging @ilanschnell |
From @bilderbuchi on February 10, 2016 15:11 Here is another instance of this error, apparently. It provides a repro procedure (which doesn't repro on my side, though), and hints that maybe scipy 0.17 is the culprit, and downgrading to 0.15 could circumvent it? |
From @jakirkham on February 10, 2016 15:34 FWIW, this problem does not occur on Mac. So, it is only Linux and Windows. |
From @jakirkham on February 10, 2016 15:39 It appears like the libraries are in the packages. @bilderbuchi, are using Windows natively or are using it in a VM? If the latter what are you using for virtualization? If the former, do you know what architecture you have? |
From @bilderbuchi on February 11, 2016 6:59 natively, 64bit, Windows 8.1. |
From @desilinguist on February 11, 2016 18:15 Yes, I am having the same issue on my RHEL box. Works fine on my Mac. Seems like |
From @jakirkham on February 11, 2016 18:17 Sorry, by architecture, @bilderbuchi, I was meaning what kind of processor are you using? |
From @bilderbuchi on February 12, 2016 7:45 An Intel(R) Xeon(R) CPU E3-1225 V2 @ 3.20GHz |
Does this issue still exist? Regardless, going to kick it over to anaconda-issues. Pretty sure it's packaging-related. |
This was a problem on Linux. I spun up a docker container and installed |
Cool! |
I have some Travis builds failing with the same error: https://travis-ci.org/colour-science/colour/builds/118175098 |
@kalefranz: Is it possible to re-open that issue please, it is not fixed or there are no clear step-by-step info to correct the problem. |
Why do you need to pin the patch number for NumPy in your builds? |
@jakirkham: It is a good point, back then I think we had specific requirements (especially for Scipy). I will try a build without specifying any version. Thanks! |
Seems like it was that, for my curiosity any specific reason why this problem happened? Cheers, |
There were some issues with the first MKL package released as you have seen. In this case, missing libraries on Linux. I expect (though have not checked) that NumPy 1.10.1 was pinned to a certain version of the MKL package. However, this was fixed in a later version of the MKL package and I believe the next NumPy package (think 1.10.2) changed its pinning to this new version. |
Excellent, makes sense! Thanks for the help, appreciated 👍 |
EDIT: My mistake, the wipe was not as complete as I wanted. With a truly fresh install, this problem is gone. Leaving the comment below because it shows how to reproduce the original error. I don't think this is fixed. I am experiencing this issue from a wipe and fresh download and install of Anaconda today. Again, the particular issue is: Here is a way to reproduce, thanks to BVLC/caffe#3884:
According to that thread, the solution is to not use MKL or to do the following:
However, with What gives?
|
I had the same problem, despite using the latest available packages. Turns out the solution was easier than I thought: for whatever reason Anaconda installed the MKL-enabled versions of the numpy/scipy stack, but did not actually install A simple |
Updating via |
We need to do this to work around an issue with mkl packages shipped with older version of numpy. See: ContinuumIO/anaconda-issues#698 (comment) for more. Using numpy 1.9.x, the code would build with mkl but ip-diffim would fail tests because mkl couldn't find all of its libraries and therefore symbols (would terminate with `python: symbol lookup error`). See the above issue for more.
This is my first post to anaconda-issues, so suggested alternative actions to posting here are welcome. On my system, I have the following packages installed:
That is after I did
Is there any workaround or suggested action? |
I got also the following error: |
I finally solved this problem using two steps for my deep learning applications with Keras/Theano. Notice that I am using Ubuntu 14.04. First, I removed mkl with the following two commands. Although mkl is removed from my anaconda python 3, LinearRegression fit in skearn still makes error related to scipy. During I am searching Web. Some brilliants said to remove python-scipy but install pip based way. So, I applied this solution to my case. I removed conda scipy and install pip sciy py as follows: Now everything works perfectly. I am very fine without invoking mkl. |
Also had to use @jskDr 's solution on a fresh anaconda install on Ubuntu 16.04. The other upvoted methods didn't work for me. I'm hoping to be able to use MKL in the future. |
I came across the same error while building |
@jskDr solution indeed do work and don't know why. Thanks mate! |
Occurs when using python3.5 but not python3.6 |
I am using Anaconda 2 on Centos 7, I also met this issue. Following @jskDr 's solution, the problem disappeared. Thanks! |
I am using Anaconda3-4.3.0 on Ubuntu16.04, also met this issue and solved by following @jskDr 's solution. |
For me the problem was resolved by removing numpy from |
For me (on Ubuntu 14.04, python 3.6.1) it started working after installing numexpr (conda install numexpr). No paths specified. |
For me problems started appearing after installing a |
This issue still exists. My environment configs are: Using LD_PRELOAD=... does not help me out either. 1. 9582: symbol=mkl_dft_avx_xs_f32_1df; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_avx.so [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=python [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/opt/anaconda2/bin/../lib/libpython2.7.so.1.0 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libutil.so.1 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libm.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib64/ld-linux-x86-64.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_avx.so [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib64/ld-linux-x86-64.so.2 [0] **9582: /opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_avx.so**: error: symbol lookup error: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8 (fatal) 2. 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/opt/anaconda2/bin/../lib/libpython2.7.so.1.0 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libutil.so.1 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libm.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib64/ld-linux-x86-64.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_def.so [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0] 9582: symbol=mkl_sparse_optimize_bsr_trsm_i8; lookup in file=/lib64/ld-linux-x86-64.so.2 [0] ** 9582: /opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_def.so**: error: symbol lookup error: undefined symbol: mkl_sparse_optimize_bsr_trsm_i8 (fatal) It reveals that the installed scipy is referencing MKL libs. But the installed MKL coming along with anaconda is located at '/opt/anaconda2/lib/libmkl_{core,avx,def}.so'. And for aforementioned solutions, I believe either to uninstall mkl or to install nomkl is not solving this issue. I tried to find which file is referencing these so file with grep -r lmkl_avx and grep -r lmkl_def, but no result returned. I also installed Intel MKL package downloaded from Intel's site. Similar error log apears, but in addition I found: 9517: symbol=COIProcessLoadSinkLibraryFromFile; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_intel_lp64.so [0] 9517: symbol=COIProcessLoadSinkLibraryFromFile; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_intel_thread.so [0] 9517: symbol=COIProcessLoadSinkLibraryFromFile; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libmkl_core.so [0] 9517: symbol=COIProcessLoadSinkLibraryFromFile; lookup in file=/opt/anaconda2/lib/python2.7/site-packages/scipy/special/../../../../libiomp5.so [0] ........ The problem, I guess, is how to correctly link the /opt/anaconda2/lib/liblmk_{core|avx|def}.so for scipy or gensim, by hard code or dynamic way -ld. I will continuing working and the post a solution, if no one solves. |
In my problematic Ubuntu vbox, this issue is solved by using: LD_PRELOAD=/opt/anaconda2/lib/libmkl_core.so:/opt/anaconda2/lib/libmkl_sequential.so python -c 'import gensim' Also, in another copy of Ubuntu vbox as well as Centos vbox, I can do python -c "import gensim" after installing the same version (4.4.0) of anaconda and gensim in my problematic Ubuntu without any additional settings. It seems that the issue has sth to with OS or Shell environment. |
On my scientific linux box, I fixed this issue by pinning mkl to version 11.3.3
|
Nothing seems to work for me here. Though for me its not an anaconda issiue may be. I am getting this error from a VirtualEnv set up for django. Any help is appreciated, |
This did the trick when everything else failed - |
Executing the following before other imports solves the problem for me: |
I was having this error inside a conda environment using py3.5 in Ubuntu 14.04. My problem was resolved by executing |
I had the "Intel MKL FATAL ERROR: Error on loading function mkl_blas_avx_xdcopy". It was resolved by executing |
This issue is still persisting for me |
The above solutions are invalid for me, and I solved it by adding the two lines to the beginning of my code: |
From @jakirkham on February 10, 2016 2:20
Seeing this on Travis CI (Linux) and in Docker containers during install. ( https://travis-ci.org/jakirkham/nanshe/builds/108187039#L749 )
Copied from original issue: conda/conda#2048
The text was updated successfully, but these errors were encountered: