tsp_asymmetric crashes the interpreter with a segmentation fault (exit 139) on a plain dense asymmetric cost matrix. It reproduces in a base install (no pyopencl), so it isn't GPU/OpenCL-related.
Repro (segfaults verbatim)
import numpy as np
from pyqrackising import tsp_asymmetric
M = np.random.default_rng(3).random((200, 200)).astype(np.float32)
np.fill_diagonal(M, 0.0)
print(tsp_asymmetric(M, quality=3, k_neighbors=20))
Output: Segmentation fault, process exits 139, no Python traceback.
Expected
Returns a (tour, length) for the asymmetric instance, as tsp_symmetric does for symmetric ones.
Ruled out (all still crash)
- Not OpenCL/GPU — crashes with
pyopencl uninstalled (CPU path) and installed.
- Not dtype — crashes with
float32 and float64.
- Not
multi_start — crashes with multi_start=1 and 4.
- Not size — crashes at
n=50 and n=200.
- Specific to
tsp_asymmetric — tsp_symmetric and maxcut_tfim run fine on the same machine and instances.
Environment
- PyQrackIsing 9.16.2
- Python 3.12.10, Windows 11 (10.0.26200)
- numpy 2.4.6, numba 0.66.0, scipy 1.18.0, networkx 3.6.1
Not yet tested on Linux, so it may be platform- or numba-version-specific. Happy to run a faulthandler / debug trace if that would help localize it.
tsp_asymmetriccrashes the interpreter with a segmentation fault (exit 139) on a plain dense asymmetric cost matrix. It reproduces in a base install (nopyopencl), so it isn't GPU/OpenCL-related.Repro (segfaults verbatim)
Output:
Segmentation fault, process exits 139, no Python traceback.Expected
Returns a
(tour, length)for the asymmetric instance, astsp_symmetricdoes for symmetric ones.Ruled out (all still crash)
pyopencluninstalled (CPU path) and installed.float32andfloat64.multi_start— crashes withmulti_start=1and4.n=50andn=200.tsp_asymmetric—tsp_symmetricandmaxcut_tfimrun fine on the same machine and instances.Environment
Not yet tested on Linux, so it may be platform- or numba-version-specific. Happy to run a
faulthandler/ debug trace if that would help localize it.