Skip to content

tsp_asymmetric segfaults (SIGSEGV) on a basic dense cost matrix #4

Description

@3x3xX3N0N

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_asymmetrictsp_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions