Skip to content

Gromov-Wasserstein tests segfault on i386/i686 in version 0.9.1 #521

@gspr

Description

@gspr

Describe the bug

On the i386/i686 architecture, version 0.9.1's Gromov-Wasserstein test suite segfaults. It does not segfault on any other architecture I have tested on, nor does version 0.9.0 segfault on i386/i686.

To Reproduce

Steps to reproduce the behavior:

  1. On an i386/i686 machine or VM,
  2. build and install POT 0.9.1 and
  3. run pytest test/test_gromov.py and observe a segfault.

Backtrace (POT 0.9.1 is installed system-wide):

test/test_gromov.py ...s...................Fatal Python error: Segmentation fault

Current thread 0xf7b74700 (most recent call first):
  File "/usr/lib/python3/dist-packages/ot/lp/__init__.py", line 346 in emd
  File "/usr/lib/python3/dist-packages/ot/optim.py", line 392 in lp_solver
  File "/usr/lib/python3/dist-packages/ot/optim.py", line 279 in generic_conditional_gradient
  File "/usr/lib/python3/dist-packages/ot/optim.py", line 394 in cg
  File "/usr/lib/python3/dist-packages/ot/gromov/_gw.py", line 468 in fused_gromov_wasserstein
  File "/usr/lib/python3/dist-packages/ot/gromov/_gw.py", line 990 in <listcomp>
  File "/usr/lib/python3/dist-packages/ot/gromov/_gw.py", line 990 in fgw_barycenters
  File "/home/foo/tmp/pot-0.9.1/test/test_gromov.py", line 1332 in test_fgw_barycenter

Code sample

POT's own test/test_gromov.py suffices (see above).

Expected behavior

Tests should pass, or even fail, but definitely not segfault.

Environment (please complete the following information):

  • OS: Linux
  • Python version: 3.11.5
  • How was POT installed: source
  • Build command you used: python3.11 -m build --skip-dependency-check --no-isolation --wheel --outdir /home/foo/tmp/python-pot-0.9.1/tmp

Output of the suggested code snippet:

>>> import platform; print(platform.platform())
Linux-5.10.0-25-amd64-i686-with-glibc2.37
>>> import sys; print("Python", sys.version)
Python 3.11.5 (main, Aug 29 2023, 15:31:31) [GCC 13.2.0]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.24.2
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.10.1
>>> import ot; print("POT", ot.__version__)
POT 0.9.1

Additional context

Problem does not occur on other architectures. Problem does also not occur on i386/i686 in POT version 0.9.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions