networkx icon indicating copy to clipboard operation
networkx copied to clipboard

Unexpected test failures in `test_algebraic_connectivity.py`(in nx-parallel)

Open Schefflera-Arboricola opened this issue 2 years ago • 2 comments

Current Behavior

ref PR https://github.com/networkx/nx-parallel/pull/38 (this PR just fixes README files)

=========================== short test summary info ============================
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_path[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_buckminsterfullerene[tracemin_pcg-False-0.2434017461399311-laplacian_matrix] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_buckminsterfullerene[tracemin_pcg-True-0.0811339153799775-normalized_laplacian_matrix] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_cycle[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_buckminsterfullerene[lobpcg-False-0.2434017461399311-laplacian_matrix] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_buckminsterfullerene[lobpcg-True-0.0811339153799775-normalized_laplacian_matrix] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_abbreviation_of_method - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_problematic_graph_issue_2381[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestAlgebraicConnectivity::test_seed_argument[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_cycle[tracemin_pcg-True-expected_order1] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_cycle[tracemin_pcg-False-expected_order0] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_three_nodes_multigraph[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_disconnected[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_seed_argument[lobpcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_path[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_path[lobpcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_three_nodes[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_cycle[lobpcg-False-expected_order0] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_seed_argument[tracemin_pcg] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::TestSpectralOrdering::test_cycle[lobpcg-True-expected_order1] - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
FAILED linalg/tests/test_algebraic_connectivity.py::test_spectral_bisection - _flapack.error: (liwork>=max(1,10*n)||liwork==-1) failed for 10th keyword liwork: dsyevr:liwork=1
===== 21 failed, 5240 passed, 57 skipped, 466 warnings in 82.97s (0:01:22) =====
Error: Process completed with exit code 1.

Schefflera-Arboricola avatar Jan 23 '24 18:01 Schefflera-Arboricola

These failures are almost certainly related to a bad interaction between the parallelization and the under-the-hood parallelization from blas (via scipy).

I also suspect that this may be specific to CI - parallelization on hosted runners is tricky. I know there have been bad interactions in the past between BLAS and some default runners in CI. Do you see these errors if you run locally?

FWIW I'm confident that this isn't a problem in networkx, so it'd be okay to close it in the main repo and open on nx-parallel. Nor does it hurt to keep it open here - whatever you think is best!

rossbar avatar Jan 24 '24 18:01 rossbar

I also suspect that this may be specific to CI - parallelization on hosted runners is tricky. I know there have been bad interactions in the past between BLAS and some default runners in CI. Do you see these errors if you run locally?

yes

Schefflera-Arboricola avatar Jan 24 '24 20:01 Schefflera-Arboricola