Repository navigation
Keep extracted boundary names consistent across MPI ranks (completes #856; after #1095) - #1098
Merged
Merged
Conversation
Region filtering previously selected boundary enum members from rank-local strata. A coarse extracted annulus lost Upper on some ranks, causing KeyError in natural Stokes boundary registration while peers entered collectives. Union label presence over the DM communicator and create empty labels where globally retained boundaries have no local points. Preserve candidate order and exclude globally absent labels. Validation: two focused regressions pass serial and on each of two MPI ranks, including actual region extraction. No equations, coordinates, partitioning or finite-element values change. Next validate the existing int32 Gadi installation gates and rerun only the four affected coarse Poisson models.
Reduce source values and multiplicities through the parent field DM before owner synchronisation. This preserves spatial injection without global coordinate gathering, including add mode and untouched exterior values. A parent owner may retain no extracted-region cells even when another rank has the corresponding source node. Add independent P1/P2 vector replace/add regressions. Reproducer: annulus 2h buffers at h=1/32 on 16 ranks lose four inner-wall source values despite correct saved submesh topography. Static compilation and diff checks pass; matching versioned int32 installation, serial/MPI regression gates and affected scientific reruns remain pending on Gadi.
Avoid implicit child redistribution when a filtered region or surface occupies only one MPI rank. Preserve the parent-derived point/DOF mappings and retain the existing parent-owner reduction. Make surface emptiness validation collective so ranks outside a valid surface do not fail before PETSc extraction. Add deterministic P1/P2 replace/add coverage with the region concentrated on one parent rank, plus empty-rank re-extraction/cell-size and surface-label tests. The four new transfer cases fail on the original PR with errors 5.0/4.0 before this change. Validation on an isolated rebuilt Mac PETSc 3.25 int32/Open MPI runtime: 20 serial passed, one existing expected failure; 23 passed on each of two ranks; 10 passed on each of four ranks. Python parsing, Black test formatting, deprecated-pattern gate, CI test reachability and diff checks pass. Shared runtime and benchmark results unchanged. Next: verify the fresh Linux/MPICH CI run. Underworld development team with AI support from Claude Code
Reduce component minima and maxima in the parent field section SF before changing any target values. Preserve raw nondimensional transfer and document collective surface extraction and its persistent empty labels. Underworld development team with AI support from Claude Code
…sts pinned H1's review of f93cadb (2026-11-06), with development merged. - The injection test now puts the extracted region on rank 0 and its neighbour on the last rank, split at the interface (y = 0.85). Parent DOFs owned there by a rank with no child copy now exist, and the test asserts that they do; the old prolongate body fails it (10 tests at np 2 and 3), where before it passed. - The section SF taken in prolongate is released: it grew memory by 1098 kB per call at 23.6k DOF rows on rank 0 at np 2; now 0. - The shared-value reduction is a helper, _reduce_injection, with the public MPI.DOUBLE. - extract_surface asks hasLabel before reading a label (getLabel gives a null handle, and getValueIS on it aborted PETSc), and no longer adds empty labels to the parent: every rank already has the label. - New tests: agreeing shared copies are injected (a missing division by the multiplicity now fails at np 2); the rejection tolerance on both sides and non-finite values; a missing label raises ValueError. The MPI-only tests carry mpi(min_size=2). - tests/test_0858_submesh_injection_odd_ranks.py runs the annulus injection at np 3 and 5 from serial CI (#1087), from a field of sevens so dropped old values show, and asserts orphan DOFs exist. - The design note's paragraph moves below the flavours table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n the contract H1's review of 9bf307d (2026-11-06). - _surviving_labels keeps the allgathered union (the fix) and no longer creates labels: a filtered DM carries the parent's label list on every rank, and the branch never fired outside the synthetic test. - The helper test builds the reachable state (the label on every rank, points on rank 0 only), checks agreement on every rank, uses hasLabel, and destroys its DM in a finally, so a failure cannot hang the batch. - The enum is pinned exactly, for the default partition and for the region on one rank. - New: the symptom itself, a natural condition on Top for a region held by rank 0 alone, solved to u = y; and extract_surface on that region. - level, tier and mpi(min_size=2) markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Adversarial review of #1098 (H3, second review desk)Verdict: READY at 2333f8f, merged after #1095 and on green CI. CI was still running when we finished: shards 5 and 6 had passed. The union of surviving names is correct, and the symptom test catches the defect on development. Reviewed head FindingsNone. The symptom, checked as asked
Attacks that failed
Issues
Not testednp above 5; Open MPI; 3-D regions; a checkpoint written by a rank without the name (named in the PR body); nested extraction. Underworld development team with AI support from Claude Code |
9 tasks done
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.
Supersedes #856 (gthyagi's "Keep extracted boundary names consistent across MPI ranks"). His commit is kept, merged, not squashed.
Merge after #1095. This branch contains #1095 (#858, completed), because it needs #858's collective extraction guards. Until #1095 merges, this PR's diff includes #1095's changes as well; after that it shows only #856's own.
What changed and why
The defect.
extract_regionbuilt each rank's boundary enum from the label strata it held, so a rank with no points on a boundary left that name out. A boundary condition on it then raisedKeyErroron that rank, while the others waited in collective solver setup. On development a natural condition onTophung at np 2, 4 and 8. A checkpoint written by such a rank also lost the names.The fix (#856).
_surviving_labelstakes the union over ranks (an allgather), so every rank's enum holds every name that survives anywhere.The review follow-up (H1, 2026-11-06), in 2333f8f:
hasLabel;finally.Topfor a region only rank 0 holds, solved to u = y.The finding-by-finding list is on #856.
Tests
tests/parallel/test_1085_submesh_boundary_names.py: 5/5 at np 2, 3 and 4.Checklist (UW3 Style Charter)
level_*andtier_*markers (S8).array/mesh.X.coords(S7)pixi.toml/pixi.lockor other dependency changesUnderworld development team with AI support from Claude Code