osqp / osqp-python

Python interface for OSQP

Home Page:https://osqp.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mkl_set_interface workaround

nicolas-brodu opened this issue · comments

The mkl_set_interface call in init_linsys_solver_pardiso, pardiso_interface.c, is still crashing with a segfault, no matter whether it uses long ints or not. I recompiled by commenting out the mkl_set_interface_layer call and now the module works really well. It seems the MKL library just uses the environment variable instead : https://scc.ustc.edu.cn/zlsc/tc4600/intel/2017.0.098/mkl/common/mklman_c/GUID-CF00130A-092E-4B3F-85C1-BACA3EB500C1.htm for possible combinations

Since only MKL_INTERFACE_LP64 and MKL_INTERFACE_ILP64 are supported in the pardiso_interface.c (and I use the GNU option), and since the program works well without any call to mkl_set_interface , but crashes when a call is performed, I suggest to just remove that call. If that is not possible (for example, because it is necessary in some other contexts, OS, etc), then a workaround would be to check whether an environment variable for MKL_THREADING_LAYER or MKL_INTERFACE_LAYER exists. If so, then MKL will use these anyway, so the call can be avoided.

In any case, thanks for the nice work :-)