Skip to content

Conversation

@mbkumar
Copy link
Collaborator

@mbkumar mbkumar commented Apr 25, 2025

No description provided.

@mbkumar
Copy link
Collaborator Author

mbkumar commented May 5, 2025

Putting the failing tests from CI here for future reference.

======================================================================
ERROR: test_boozer_surface_optimisation_convergence (geo.test_boozersurface.BoozerSurfaceTests) (surfacetype='SurfaceXYZTensorFourier', stellsym=True, optimize_G=True, second_stage='newton_exact', get_data=<function get_ncsx_data at 0x7f6aea688b80>, vectorize=False)
Test to verify the various optimization algorithms that compute
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 238, in test_boozer_surface_optimisation_convergence
    self.subtest_boozer_surface_optimisation_convergence(
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 304, in subtest_boozer_surface_optimisation_convergence
    res = boozer_surface.minimize_boozer_exact_constraints_newton(
  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/simsopt/geo/boozersurface.py", line 641, in minimize_boozer_exact_constraints_newton
    dx = np.linalg.solve(A, b)
  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/numpy/linalg/_linalg.py", line 410, in solve
    r = gufunc(a, b, signature=signature)
  File "/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/numpy/linalg/_linalg.py", line 104, in _raise_linalgerror_singular
    raise LinAlgError("Singular matrix")
numpy.linalg.LinAlgError: Singular matrix

======================================================================
FAIL: test_boozer_surface_optimisation_convergence (geo.test_boozersurface.BoozerSurfaceTests) (surfacetype='SurfaceXYZTensorFourier', stellsym=True, optimize_G=True, second_stage='newton_exact', get_data=<function get_hsx_data at 0x7f6aea688dc0>, vectorize=False)
Test to verify the various optimization algorithms that compute
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 238, in test_boozer_surface_optimisation_convergence
    self.subtest_boozer_surface_optimisation_convergence(
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 311, in subtest_boozer_surface_optimisation_convergence
    assert res['success']
AssertionError

======================================================================
FAIL: test_boozer_surface_optimisation_convergence (geo.test_boozersurface.BoozerSurfaceTests) (surfacetype='SurfaceXYZTensorFourier', stellsym=True, optimize_G=True, second_stage='newton', get_data=<function get_ncsx_data at 0x7f6aea688b80>, vectorize=False)
Test to verify the various optimization algorithms that compute
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 238, in test_boozer_surface_optimisation_convergence
    self.subtest_boozer_surface_optimisation_convergence(
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 311, in subtest_boozer_surface_optimisation_convergence
    assert res['success']
AssertionError

======================================================================
FAIL: test_boozer_surface_optimisation_convergence (geo.test_boozersurface.BoozerSurfaceTests) (surfacetype='SurfaceXYZTensorFourier', stellsym=True, optimize_G=True, second_stage='newton', get_data=<function get_giuliani_data at 0x7f6aea688af0>, vectorize=False)
Test to verify the various optimization algorithms that compute
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 238, in test_boozer_surface_optimisation_convergence
    self.subtest_boozer_surface_optimisation_convergence(
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 311, in subtest_boozer_surface_optimisation_convergence
    assert res['success']
AssertionError

======================================================================
FAIL: test_boozer_surface_optimisation_convergence (geo.test_boozersurface.BoozerSurfaceTests) (surfacetype='SurfaceXYZFourier', stellsym=True, optimize_G=False, second_stage='ls', get_data=<function get_ncsx_data at 0x7f6aea688b80>, vectorize=False)
Test to verify the various optimization algorithms that compute
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 238, in test_boozer_surface_optimisation_convergence
    self.subtest_boozer_surface_optimisation_convergence(
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 312, in subtest_boozer_surface_optimisation_convergence
    assert not boozer_surface.surface.is_self_intersecting(thetas=100)
AssertionError

======================================================================
FAIL: test_convergence_cpp_and_notcpp_same (geo.test_boozersurface.BoozerSurfaceTests)
This unit test verifies that that the cpp and not cpp implementations converge to
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 392, in test_convergence_cpp_and_notcpp_same
    x_nonvec = self.subtest_convergence_cpp_and_notcpp_same(False)
  File "/home/runner/work/simsopt/simsopt/tests/geo/test_boozersurface.py", line 426, in subtest_convergence_cpp_and_notcpp_same
    assert res['success']
AssertionError

@akaptano
Copy link
Contributor

akaptano commented May 12, 2025

Happy to get this over the finish line, but what is the advantage of this change?

Seems like it addresses (#467) although I don't think there is understanding still of why different ubuntu versions break certain tests in the code?

@mbkumar
Copy link
Collaborator Author

mbkumar commented May 12, 2025

Happy to get this over the finish line, but what is the advantage of this change?

No advantage, but a necessity. ubuntu-latest points to ubuntu 24.04 on Github runners where the CI was failing. On CI, we changed the runners back to 22.04. But we have to transition to Ubuntu 24.04 eventually when 22.04 reaches EOL in 2027. Many will install 24.04 even before that and we want to have no test failures.

@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (706cb1d) to head (f63dfc8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #486   +/-   ##
=======================================
  Coverage   92.02%   92.02%           
=======================================
  Files          82       82           
  Lines       16015    16015           
=======================================
  Hits        14738    14738           
  Misses       1277     1277           
Flag Coverage Δ
unittests 92.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrewgiuliani
Copy link
Contributor

@mbkumar weren't the failing tests happening on Ubuntu 24.04? why would forcing 24.04 fix the issue?

@mbkumar
Copy link
Collaborator Author

mbkumar commented May 12, 2025 via email

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

Successfully merging this pull request may close these issues.

3 participants