0

I'm trying to use Arrayfire's implementation of LU and got:

Intel MKL FATAL ERROR: Cannot load libmkl_mc3.so or libmkl_def.so.

I tried lot of things to solve the issues (like libraries paths and other stuff). Nothing worked for me. Also, I tried the solution that people gave to other ones with the same problem (at stackoverflow), which also did not work for me.

Zachi Shtain
  • 826
  • 1
  • 13
  • 31
Mwattad
  • 3
  • 2

1 Answers1

1

This sounds a lot like this issue. If it is indeed the same issue, you can use as a workaround

LD_PRELOAD="/usr/local/lib64/libmkl_core.so:/usr/local/lib64/libtbb.so.2:/usr/local/lib64/libmkl_tbb_thread.so" <your_binary>

to start your program. You might have to adjust /use/local/lib64 to where MKL is installed on your system.

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
  • Interesting! This did fix my problem. Any idea how to compile the program such that this isn't necessary? – ingomueller.net Feb 24 '21 at 08:45
  • No idea. However, does this still happen with current Arrayfire? Supposedly this problem has been fixed by now. – Ralf Stubner Feb 24 '21 at 10:18
  • I am running into this problem with my own native Python module, not with Arrayfire, your solution still solved the problem. Maybe the fix in Arrayfire could apply for me as well. I'll take a look. – ingomueller.net Feb 25 '21 at 12:56
  • 1
    *Update:* [this](https://github.com/arrayfire/arrayfire/commit/bf505d18) is the commit that fixed the problem in ArrayFire. I guess that this gives an idea about how to compile and link against MKL properly. I'll try that once I get back to this project. – ingomueller.net Feb 25 '21 at 13:04