Error running NumPy example: MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.

Error running NumPy example: MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.

Hi,

I built NumPy and SciPy according to the instructions posted at http://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl. I'm using the free version of Composer XE 2013 for Linux. I have added the appropriate directories to LD_LIBRARY_PATH and updated ldconfig. NumPy and SciPy both seem to build and install just fine, but when I run the example program at the end of the page, it fails at the first matrix multiplication line C = A*B (just before start = time.time() ) with the error MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so.

I've tried everything I can think of, but I still can't get rid of the error. I recently applied the MKL patch here http://software.intel.com/en-us/articles/svd-multithreading-bug-in-mkl could this have something to do with it?

Thanks,
Matt

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

>>...it fails at the first matrix multiplication line C = A*B (just before start = time.time() ) with the error
>>MKL FATAL ERROR: Cannot load libmkl_avx.so or libmkl_def.so...

It is possible that search path to these modules is Not set properly and you need to review LD_LIBRARY_PATH environment variable. By the way, I could easily reproduce that problem on a Windows platform when mkl_avx.dll or mkl_def.dll can not be found.

Also, please verify that 32-bit test application uses 32-bit MKL modules, or 64-bit test application uses 64-bit MKL modules.

Hi Sergey,

I think I solved the problem. My NumPy 'site.cfg' file simply had the line "mkl_libs = mkl_rt", but when I explicitly added mkl_avx and mkl_def and recompiled, it worked fine. I guess there was some issue in libmkl_rt.so. I only have the 64-bit MKL installed, so that's not an issue.

Matt

Thanks for the update, Matt.

>>...I think I solved the problem... ...I only have the 64-bit MKL installed...

This is what I've expected because, as far as I know, the pair of modules mkl_avx.* and mkl_def.* is for 64-bit platforms only. On 32-bit platforms the the pair of modules should be mkl_avx.* and mkl_p4.*.

Leave a Comment

Please sign in to add a comment. Not a member? Join today