Skip to content

Support stage2_ef_solver_name from generic_cylinders#651

Closed
DLWoodruff wants to merge 1 commit intoPyomo:mainfrom
DLWoodruff:stage2EFsolvern
Closed

Support stage2_ef_solver_name from generic_cylinders#651
DLWoodruff wants to merge 1 commit intoPyomo:mainfrom
DLWoodruff:stage2EFsolvern

Conversation

@DLWoodruff
Copy link
Copy Markdown
Collaborator

@DLWoodruff DLWoodruff commented Apr 10, 2026

Summary

  • Register stage2_ef_solver_name in xhatshuffle_args() so --stage2-ef-solver-name is available from the generic_cylinders.py CLI
  • Rename stage2EFsolvernstage2_ef_solver_name across the codebase to follow project naming conventions (snake_case config, dashed CLI flags)
  • Relax the hard assertion requiring this option for multistage xhatshuffle to a warning, since the regular multi-stage xhat path also works
  • Add documentation in generic_cylinders.rst ("Multistage Options" section) and update spokes.rst
  • Add MPI test for hydro with stage2_ef_solver_name in test_with_cylinders.py

Test plan

  • ruff check . passes on all modified files
  • python -m pytest mpisppy/tests/test_ef_ph.py passes (26 passed, 2 skipped)
  • mpiexec -np 2 python -m mpi4py mpisppy/tests/test_with_cylinders.py passes (5 passed including new hydro stage2ef test)
  • examples/generic_tester.py smoke test (exercises hydro via generic_cylinders with --stage2-ef-solver-name)

🤖 Generated with Claude Code

Register the stage2 EF solver option in xhatshuffle_args() so it is
available as --stage2-ef-solver-name from the generic_cylinders CLI.
Rename the option from stage2EFsolvern to stage2_ef_solver_name to
follow project naming conventions. Relax the hard assertion requiring
this option for multistage xhatshuffle to a warning, since the regular
multi-stage xhat path also works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.16%. Comparing base (35c4f52) to head (e053324).

Files with missing lines Patch % Lines
mpisppy/generic/parsing.py 33.33% 2 Missing ⚠️
mpisppy/opt/fwph.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
- Coverage   70.16%   70.16%   -0.01%     
==========================================
  Files         153      153              
  Lines       18905    18908       +3     
==========================================
+ Hits        13265    13266       +1     
- Misses       5640     5642       +2     

☔ 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.

@DLWoodruff DLWoodruff marked this pull request as ready for review April 11, 2026 17:44
@DLWoodruff DLWoodruff requested a review from bknueven April 14, 2026 20:35
DLWoodruff added a commit to DLWoodruff/mpi-sppy-1 that referenced this pull request Apr 15, 2026
@DLWoodruff
Copy link
Copy Markdown
Collaborator Author

Superseded by #653, which combines this PR with #652.

@DLWoodruff DLWoodruff closed this Apr 15, 2026
DLWoodruff added a commit to DLWoodruff/mpi-sppy-1 that referenced this pull request Apr 15, 2026
PR Pyomo#651 relaxed a hard assert into a warnings.warn call when multistage
xhatshuffle is used without --stage2-ef-solver-name. Without a test,
silent drift (warning removed, branch not taken) would go unnoticed.
Covers both cases: warning fires when missing, does not fire when set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant