Intel MKL ERROR when callying scipy from Matlab

I am using Matlab R2023a on Ubuntu 22.04.2 LTS. If I call py.scipy.special.roots_jacobi(int8(8),1,1) I get the error message `"Python Error: ValueError: illegal value in argument 11 of internal sbevd". In the terminal where I called Matlab, I have the error "Intel MKL ERROR: Parameter 11 was incorrect on entry to DSBEVD.".
Calling this function directly in python does not yield this error. Does anyone have a hint?

2 Comments

There may be a compatibility issue between the version of SciPy you are using and the version of the Intel MKL library that is installed on your system. You could try updating either or both of these components to see if that resolves the issue.
I do not get the error when I use scipy in python directly. The error only appears when I call scipy in Matlab.

Sign in to comment.

 Accepted Answer

The problem is solved by adding the following line to the startup file:
py.sys.setdlopenflags(int32(bitor(int64(py.os.RTLD_LAZY), int64(py.os.RTLD_DEEPBIND))));

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!