Repository navigation
test: relaunch an mpiexec that never started, for every test and for the MPI_INIT flake too - #95
Merged
Merged
Conversation
…the MPI_INIT flake too
Open MPI 5 on the macOS Intel runner fails to start a launch now and then: either PMIx
cannot find a network interface ("ptl_tool: problems getting address", exit 213) or a rank's
MPI_Init cannot reach the others ("It looks like MPI_INIT failed ... PML add procs failed",
exit 14). #88's two Intel runs each lost one test to the second message, once in
test_pro_cli (two ranks) and once in test/multilevel (four ranks). The retry that caught
the first message lived in test/multilevel/conftest.py, so it covered neither.
The retry now lives in test/conftest.py, wraps every subprocess.run from any test, and
matches both messages; nothing has run when either appears, so relaunching is safe, and
any other failure is returned as it is. The multilevel conftest keeps only its rank-slot
gate, layered over the root retry so a relaunch holds the same slots.
test_mpi_launch_retry.py drives the retry with a fake launcher that fails a given number
of times with a given message (PROTEUS_TEST_MPI_RETRY_DELAY=0 makes it quick).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both Intel runs of #88 lost one test to the same Open MPI 5 launch flake: a rank's
MPI_Initfails withIt looks like MPI_INIT failed ... PML add procs failed --> Returned "Not found" (-13)(exit 14), once intest_pro_cli::test_superlu_is_refused_on_two_ranks_before_computing(two ranks) and once intest/multilevel/test_cube_q2.py::test_single_level_q2_quad_is_the_serial_solve[4]. The existing relaunch (test/multilevel/conftest.py, from #75) matched only the PMIxptl_tool: problems getting addressmessage and covered onlytest/multilevel, so it caught neither.Changes:
test/conftest.pyas an autouse fixture that wraps everysubprocess.runfrom a test. A launch whose stderr carries either Open MPI message (nothing has run when they appear) is launched again, three attempts in all, with a pause ofPROTEUS_TEST_MPI_RETRY_DELAYseconds (default 3) then twice that. Any other failure is returned unchanged, as is anything whose stderr was not captured. Five other test files launchmpiexecdirectly (test_pro_cli.py,test_adr_problem.py,test_archive_parallel_metadata.py,parun_exit_status/,poisson_2d/test_parallel_partitioning.py) and are now covered.test/multilevel/conftest.pykeeps only its rank-slot gate (test/multilevel: limit concurrent MPI ranks instead of grouping onto one xdist worker #87), layered over the root retry (it depends on that fixture by name), so a relaunch holds the same slots.test/test_mpi_launch_retry.py: a fake launcher that fails a given number of times with a given message checks that both messages are relaunched, that there are three attempts at most, and that a failure of the job itself or an uncaptured stderr is not relaunched.Checked locally (chewbacca, Open MPI 5 env): the new tests,
test/multilevel/test_multigrid.py(the slot gate over the retry), and the fulltest/multileveldirectory with-n 4 --dist loadgroup.#88 merges this branch so its Intel leg gets the retry; once this merges, #88 is just its two scripts on main.
🤖 Generated with Claude Code