Skip to content

Fix wrapper test failures by running them sequentially #675

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

Conversation

ChrisRackauckas-Claude
Copy link

Summary

Problem

The wrapper tests import multiple heavy external packages (PETSc, MINPACK, NLsolve, SIAMFANLEquations, SpeedMapping, FixedPointAcceleration, FastLevenbergMarquardt, LeastSquaresOptim) that can have issues with parallel initialization and resource contention when multiple test workers try to load and initialize them simultaneously.

Solution

  1. Force sequential execution (nworkers=0) for wrapper tests specifically:

    • Modified test/runtests.jl to detect when GROUP=="wrappers" and set RETESTITEMS_NWORKERS=0
    • Added RETESTITEMS_NWORKERS environment variable override in CI workflow
  2. Increased retry count from 3 to 5 for tests involving PETSc/MINPACK:

    • These tests are particularly prone to initialization issues
    • Extra retries give them more chances to pass
  3. CI workflow configuration:

    • Sets RETESTITEMS_NWORKERS=0 explicitly for wrapper group in GitHub Actions

Test plan

  • Local testing confirms tests run sequentially when GROUP=wrappers
  • CI should show improved reliability for wrapper tests

🤖 Generated with Claude Code

The wrapper tests import multiple heavy external packages (PETSc, MINPACK,
NLsolve, etc.) that can have issues with parallel initialization and resource
contention. This change:

1. Forces sequential execution (nworkers=0) for wrapper tests specifically
2. Increases retry count from 3 to 5 for tests involving PETSc/MINPACK
3. Sets RETESTITEMS_NWORKERS=0 in CI workflow for wrapper group

This should resolve the intermittent failures seen in:
https://github.com/SciML/NonlinearSolve.jl/actions/runs/16865133167/job/47770956480

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit b37b31b into SciML:master Aug 11, 2025
28 of 77 checks passed
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.

2 participants