You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with Pyinstaller and calling dgetrs from MKL via either scipy or my own Cython wrapper of C code. A minimum working example is below. An interesting bit is that when n, the number of rows in the linear system, is 8 or less, the frozen executable works as expected. When n>8 as below, I observe a segfault on the dgetrs call (always, and in several different scripts as I trimmed down to the small script here). This occurs when I use scipy's LAPACK wrapper, numpy's linalg module (as below), or when I call dgetrs in C++ code wrapped by Cython. It only occurs with the frozen executable - running the original scripts through the python interpreter is fine.
I'm on Linux RHEL 7.6, with a fresh python3.6 conda environment built with conda install scipy that pulls in MKL during installation. I've verified this problem with pyinstaller from conda install -c conda-forge pyinstaller as well as the development version (checked out today, 4.0.dev0+ffb1ff369). Trying with --onedir --noupx --debug all script.py hasn't helped me figure this out.
Feels like some sort of issue bundling MKL (a seg fault inside dgetrs from both scipy and my own C++ code doesn't leave room for much else), but it looks like there has at least been extra effort to handle it in pyinstaller (for instance, when bundling it identifies and adds MKL libraries when it finds numpy).
import numpy as np
import numpy.linalg as la
n = 9 # n > 8 = segfault, n <= 8 works fine
a = np.eye(n)
b = np.linspace(0, 1, n)
x = la.solve(a, b)
print('successfully completed')
The text was updated successfully, but these errors were encountered:
Hello,
I'm having trouble with Pyinstaller and calling
dgetrs
from MKL via either scipy or my own Cython wrapper of C code. A minimum working example is below. An interesting bit is that whenn
, the number of rows in the linear system, is 8 or less, the frozen executable works as expected. Whenn>8
as below, I observe a segfault on thedgetrs
call (always, and in several different scripts as I trimmed down to the small script here). This occurs when I use scipy's LAPACK wrapper, numpy's linalg module (as below), or when I calldgetrs
in C++ code wrapped by Cython. It only occurs with the frozen executable - running the original scripts through the python interpreter is fine.I'm on Linux RHEL 7.6, with a fresh python3.6 conda environment built with
conda install scipy
that pulls in MKL during installation. I've verified this problem with pyinstaller fromconda install -c conda-forge pyinstaller
as well as the development version (checked out today,4.0.dev0+ffb1ff369
). Trying with--onedir --noupx --debug all script.py
hasn't helped me figure this out.Feels like some sort of issue bundling MKL (a seg fault inside
dgetrs
from both scipy and my own C++ code doesn't leave room for much else), but it looks like there has at least been extra effort to handle it in pyinstaller (for instance, when bundling it identifies and adds MKL libraries when it finds numpy).Any help would be greatly appreciated.
Log output: https://gist.github.com/michael-a-hansen/9e73b378cdbdce7e8e58051ea8fb3a0b
Debut output: https://gist.github.com/michael-a-hansen/0719970083f099ea7dbd57cf406fe0e4
Warnings: https://gist.github.com/michael-a-hansen/7289035bd3e867fec2fd2141c5b9cf86
Minimum working example:
The text was updated successfully, but these errors were encountered: