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

[self-tests] pyamg/tests/test_graph.py::TestGraph::test_bellman_ford hangs on i586 platform #342

Open
stanislavlevin opened this issue Sep 23, 2022 · 4 comments

Comments

@stanislavlevin
Copy link

pyamg/tests/test_graph.py::TestGraph::test_bellman_ford hangs on i586 machine.

Minimal reproducer based on hanging test:

from scipy import sparse
import numpy as np

from pyamg.gallery import poisson
from pyamg.graph import bellman_ford


def canonical_graph(G):
    G = sparse.coo_matrix(G)

    mask = G.row != G.col
    G.row = G.row[mask]
    G.col = G.col[mask]
    G.data = G.data[mask]
    G.data[:] = 1
    return G


graph = canonical_graph(poisson((5, 5)))
graph.data = np.random.rand(graph.nnz) 
N = graph.shape[0] 

n_seeds = int(N/20)
seeds = np.random.permutation(N)[:n_seeds]
bellman_ford(graph, seeds)

Versions (checked on 4.2.3 and current main):

pytest version: 7.1.2
scipy  version: 1.6.1
numpy  version: 1.22.1
pyamg  version: 4.2.3.post1.dev11+gf9b2805
@lukeolson
Copy link
Member

@stanislavlevin closing for now. If it still hangs on an updated scipy/numpy/pyamg version then we can reopen.

@matoro
Copy link

matoro commented Nov 28, 2023

Hi, can I ask that this be reopened? This reproduces on i686 with the following versions:

pytest version: 7.4.3
scipy  version: 1.11.3
numpy  version: 1.26.1
pyamg  version: 5.0.1

@lukeolson lukeolson reopened this Nov 28, 2023
@lukeolson
Copy link
Member

@matoro thanks for reporting.

I'm still unable to reproduce and the tests pass:

python -c "import pyamg; pyamg.test()"
Python version: 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0]
pytest version: 7.4.3
scipy  version: 1.11.3
numpy  version: 1.26.1
pyamg  version: 5.0.1

This is sounding like a memory leak. I'll check valgrind as a start.

@matoro
Copy link

matoro commented Nov 28, 2023

@matoro thanks for reporting.

I'm still unable to reproduce and the tests pass:

python -c "import pyamg; pyamg.test()"
Python version: 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0]
pytest version: 7.4.3
scipy  version: 1.11.3
numpy  version: 1.26.1
pyamg  version: 5.0.1

This is sounding like a memory leak. I'll check valgrind as a start.

I don't see any meaningful memory usage change during the hang. Just spins one CPU indefinitely. You are running 32-bit right?

# python3 -c "import platform; print(platform.architecture())"
('32bit', 'ELF')

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

No branches or pull requests

3 participants