Fix cell-family detection on empty MPI ranks - #691
Merged
lmoresi merged 1 commit intoSep 6, 2026
Merged
Conversation
DMPlexIsSimplex returns false on an empty partition. Using that local value for coordinate FE construction mixed simplex and tensor bases across the same communicator, consuming different PETSc message tags. A subsequent mesh HDF5 labelsLoad then blocked in PetscSFSetUp_Basic/MPI_Waitall. Gather cell-family decisions from populated ranks before FE setup and use the same classification for element metadata. Preserve the constructor hint for an entirely empty mesh; do not change SUPG algorithms, solver tolerances or MPI providers. Add single-cell triangle/tet/quad/hex regressions that require empty ranks and subsequently load another mesh, checking P2 volume and boundary integrals. The triangle regression failed before the fix. The original SUPG migration/partition sequence plus all four regressions passed on eight Mac ranks: 15 tests in 26.05 s, 32.30 s including launcher, 2.74 GiB peak process-tree RSS. The pre-fix sequence hung and the mesh-only reproducer also hung. Gadi rerun remains pending.
10 tasks
Contributor
Author
|
This independent MPI mesh fix is now a prerequisite for completing the Eulerian SUPG integration stack:
#691 itself remains one focused commit, has no outstanding review comments, and both current CI checks pass. Review is the remaining merge gate. |
This was referenced Sep 6, 2026
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.
Summary
Determine a distributed mesh's cell family collectively when some MPI ranks own no cells.
DMPlexIsSimplex()is rank-local. On an empty rank it reportsFalse, while populated ranks correctly report the actual family. UW3 then constructed different coordinate finite elements on different ranks. That desynchronised PETSc communication and caused a later labeled HDF5 mesh load to hang inPetscSFSetUp_Basic.Change
Nonefrom ranks with no cells.The serial/populated-rank behavior is unchanged.
Regression
tests/parallel/test_0781_empty_rank_mesh_sequence.pyconstructs one simplex or tensor cell in 2-D and 3-D on eight ranks, forcing seven empty partitions. It verifies:mesh.isSimplexvalues on all ranks;Validation
This is split from #689 so the generic distributed-mesh correction can be reviewed and merged independently of Eulerian SUPG transport.
Underworld development team with AI support from Claude Code