Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7220 Discussions

scipy.linalg.solve CRASH when used with IntelOneAPI 2024.2 MKL on Windows 11

Ashish_Shirodkar
Beginner
563 Views

Hi,

scipy.linalg.solve CRASH when used with IntelOneAPI 2024.2 MKL on Windows 11

 

I have raised this issue with scipy :https://github.com/scipy/scipy/issues/21997

 

Note: ifort was by default selected here for compilation. 

           icx and ifx combination gives compilation errors on windows.

Please let me know how to go ahead with this problem.

 

Numpy 2.1.3 built using following commands:

call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64
set CC=clang-cl
set CXX=clang-cl

python -m pip install . -Cbuild-dir=build -Csetup-args=-Dallow-noblas=false -Csetup-args=-Dblas-order=mkl -Csetup-args=-Dlapack-order=mkl -Csetup-args=-Dblas=mkl -Csetup-args=-Dlapack=mkl
 

Scipy 1.13.1 built using following commands:

call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64

python -m pip install --no-binary :all: pybind11
python -m pip install --no-binary :all: pythran

set CC=clang-cl
set CXX=clang-cl

python -m pip install . -Csetup-args=-Dblas=mkl -Csetup-args=-Dlapack=mkl
 

scipy.linalg.solve crashed:

C:\Users\ashish.shirodkar>python
Python 3.12.7 (heads/main:20557ca, Oct 18 2024, 07:43:18) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import integrate, optimize, linalg, signal, stats, interpolate
>>> import numpy as np
>>> A = np.array([[3, 1], [1, 2]])
>>> b = np.array([9, 8])
>>> x = linalg.solve(A, b)

C:\Users\ashish.shirodkar>
 

Reproducing Code Example

from scipy import integrate, optimize, linalg, signal, stats, interpolate
import numpy as np
A = np.array([[3, 1], [1, 2]])
b = np.array([9, 8])
x = linalg.solve(A, b)
 

Error message

>>> x = linalg.solve(A, b)

C:\Users\ashish.shirodkar>

It just crashed no output.
0 Kudos
1 Reply
Ruqiu_C_Intel
Moderator
447 Views

Hi Ashish,


Looks I can't reproduce your issue in my side. I am using oneAPI 2025.0, can you try the newer oneAPI version too?


C:\Program Files (x86)\Intel\oneAPI>python

Python 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> from scipy import integrate, optimize, linalg, signal, stats, interpolate

>>> import numpy as np

>>> A = np.array([[3, 1], [1, 2]])

>>> b = np.array([9, 8])

>>> x = linalg.solve(A, b)

>>> x

array([2., 3.])


regards,

ruqiu


0 Kudos
Reply