Intel MKL调用SciPy函数时出错,来自MATLAB。

huangapple go评论54阅读模式
英文:

Intel MKL ERROR when calling SciPy function from MATLAB

问题

我正在使用Ubuntu 22.04.2 LTS上的Matlab R2023a。在MATLAB中,以下这行代码:

py.scipy.special.roots_jacobi(int8(8),1,1)

会产生以下错误消息:

"Python Error: ValueError: illegal value in argument 11 of internal sbevd

在我调用MATLAB的终端中,我看到以下错误信息:

Intel MKL ERROR: Parameter 11 was incorrect on entry to DSBEVD.

直接在Python中调用这个函数不会产生这个错误。我如何在MATLAB中使用这个Python函数?

英文:

I am using Matlab R2023a on Ubuntu 22.04.2 LTS. This line in MATLAB

py.scipy.special.roots_jacobi(int8(8),1,1)

produces 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. How can I use this Python function from within MATLAB?

答案1

得分: 1

问题通过将以下行添加到启动文件中解决:

py.sys.setdlopenflags(int32(bitor(int64(py.os.RTLD_LAZY), int64(py.os.RTLD_DEEPBIND))));
英文:

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))));

huangapple
  • 本文由 发表于 2023年6月16日 07:01:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76485995.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定