Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gspr opened this issue Sep 9, 2023 · 1 comment
Open

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

gspr opened this issue Sep 9, 2023 · 1 comment

Comments

@gspr
Copy link
Contributor

gspr commented Sep 9, 2023

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.

@rflamary
Copy link
Collaborator

Hello,

i'm sorry but we do not maintain POT on 32bits processors so we will not fix i686 specific bugs. Of course if you or another contributor find a way to make code compatible for both 64 and 32 bits feel free to propose a PR.

I think this probably comes form default a size of int and long int in the C++ code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants