Skip to content

addon_partition.partition_addon agrees on failure (#874) - #1247

Merged
lmoresi merged 4 commits into
developmentfrom
bugfix/agreed-partition-addon-874
Nov 20, 2026
Merged

lmoresi merged 4 commits into
developmentfrom
bugfix/agreed-partition-addon-874

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Part of #874: the add-on partition is converted to the agreed-build mechanism (#1218), following custom_mg.build (#1225).

Change

addon_partition.partition_addon runs its parallel body (_partition_addon_body) inside one agreed_build("addon_partition.partition_addon", builder_failure=False) context. A rank-local exception on one rank is raised on every rank as the same CollectiveBuildError (a RuntimeError, not a builder failure). This happens at the next agreement point or at the partition's end, so the other ranks no longer hang in the next collective. The serial path is unchanged.

  • There is an agreement point before each helper that makes collectives: parent location, base parent addresses, embedded surface marks, region cells, region merge, balance, redistribution, moved wrap, carried reference and parent resolution.
  • The per-level agreement before the parent resolution sits outside that loop's branches. The collective-guard scan (test_0052) finds no guarded agreement point, so no new ACCEPTED entries are needed.
  • The body's own scalar and list exchanges go through the agreed wrappers (agreed_allreduce, agreed_allgather). _allreduce agrees before its array Allreduce.
  • The helpers keep their own guards for now. Their insides are later Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 items.

Test

tests/parallel/test_0874_agreed_partition_addon_parallel.py partitions the add-on of an adapt child with a fault trace. One failure is forced on the last rank just after each of seven helpers has returned, so after the helper's own collectives. Each case must raise the same error, with the same message, on every rank, and every rank must make the same number of verdict exchanges. A clean partition is also checked.

Runs were on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH), under the repository's MPI supervisor (exit 124 = hang, 142 = abort):

case development, np 2 this branch, np 2 / 3 / 4 / 5
parent location hang (124) pass
region cells hang (124) pass
region merge hang (124) pass
balance abort (142) pass
redistribution abort (142) pass
moved mesh hang (124) pass
parent resolution hang (124) pass
clean partition pass pass

Regression

  • The existing add-on partition parallel files (1096, 1097 ×2, 1099, 1106, 1132, 1173) pass at np 2 (18 passed, 2 skipped), np 3 (18 passed, 2 skipped) and np 4 (20 passed).
  • scripts/test.sh's np 2 parallel set: 101 passed, 3 skipped.
  • test_0052 passes (9 passed).
  • scripts/check_test_coverage.py is OK.

Review fixes (8babf9f; development merged at 40862ef, after #1244)

From the first review:

  • region_marks callbacks are agreement points. The callback belongs to the caller, and it is collective: mark_polylines reconciles over the point star-forest. An agreement point now comes before each level's call. The collective-guard scan (test_0052) cannot see inside a callback, so callbacks count as agreement points by this rule, not by the scan.
  • Balance sweeps. Each sweep's count of moved units in _peel_balance is now reduced through _allreduce, which agrees first, instead of a bare comm.allreduce.

Two new forced-failure cases cover these:

  • one rank fails in the callback after the first level's marks;
  • one rank fails after a sweep's gap reduction, just before the moved-units reduction.
case d6d72ae, np 2 / 3 this head
failure in the region_marks callback hang (124) / hang (124) pass
failure in a balance sweep hang (124) / hang (124) pass

Runs at this head:

  • test_0874_agreed_partition_addon_parallel.py (10 cases): passes at np 2, 3, 4 and 5 (before the merge).
  • Every tests/parallel/test_0874_* file, after merging development: np 2, 66 passed and 1 skipped; np 3, 67 passed.
  • The add-on partition files pass at np 2 (18 passed, 2 skipped), and at np 3 before the merge.
  • test_0052 passes.

Markers (5d23b21)

From the re-check of 40862ef: a failure inside a region marker, before the marker's own collective, was not caught by the agreement at the call site.

The markers now agree before their collectives, as the call sites do:

  • mark_polylines before _propagate_vertex;
  • mark_sheets and mark_band before _vertex_h_3d, which reconciles collectively.

agree() is a no-op outside an agreed build, so the markers' other callers are unchanged. The claim of this PR, that partition_addon's body runs agreed, therefore covers the region-mark path too.

case (a failure forced on one rank inside the marker, before its collective) 40862ef, np 2 / 3 5d23b21
mark_polylines, through partition_addon hang (124) / hang (124) pass
mark_sheets, inside an agreed build, 3-D box hang (124) / hang (124) pass
mark_band, inside an agreed build, 2-D box hang (124) / hang (124) pass

The mark_polylines case fails on rank 1, because cell_diameters runs only on a rank holding cells.

The whole file (13 cases) passes:

  • at np 2, 3, 4 and 5;
  • at np 3 with the last rank empty, under a test-only shell partition of every gmsh mesh.

test_0052 also passes.

Underworld development team with AI support from Claude Code

partition_addon's parallel body now runs inside one agreed_build context
(builder_failure=False). A rank-local exception on one rank is raised on
every rank as the same CollectiveBuildError, at the next agreement point or
at the partition's end, instead of hanging the other ranks in the next
collective.

- an agreement point before each helper that makes collectives (parent
  location, base parent addresses, embedded surface marks, region cells,
  region merge, balance, redistribution, moved wrap, carried reference,
  parent resolution); the per-level agreement before the parent resolution
  sits outside the level's branches, so the scan finds no guarded one
- the body's own scalar and list exchanges go through the agreed wrappers;
  _allreduce agrees before its array Allreduce
- the helpers keep their own guards for now

The new parallel test forces a failure on the last rank after each of seven
helpers. Each is the same error on every rank, with the agreement calls per
rank paired, at np 2 to 5. On development, five of the seven hang and two
abort at np 2.

Underworld development team with AI support from Claude Code
Copilot AI review requested due to automatic review settings November 20, 2026 01:43
@lmoresi

lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH))
(H1 is the session that reviews pull requests and runs the parallel tests.)

Verdict at d6d72ae: changes requested.

  • What holds: the conversion pairs correctly wherever the body has an agreement point. It leaves the partition and the solve bitwise unchanged.
  • What doesn't: the body calls the region_marks callbacks, which are collective, with no agreement point in front of them. A one-rank failure there hangs at np 2 and 3 (finding 1).
  • The fix is small: one agree() per callback.

What I ran

item result
The PR's 8 cases (7 forced failures and a clean partition) 8/8 at np 2, at np 3, and at np 3 with an empty rank (the empty-band layout leaves the last rank with no cells on any level; the failure is forced there).
My failure point 1: in the caller's region_marks callback (mark_polylines), on the last rank, before the callback's own exchange Hangs at np 2 and np 3. Supervisor: the healthy rank is in _propagate_vertex, inside mark_polylines; the failed rank is in the exit agreement. Finding 1.
My failure point 2: after _base_parent_addresses returns, in the unit tables before the region_marks calls Hangs at np 2 and np 3, at the same place. At np 3 with the empty rank failing, it passes. Finding 1.
My failure point 3: inside _peel_balance, after _face_other_rank, before the balance's first _allreduce (which now agrees) Passes at np 2 and np 3: the same CollectiveBuildError on every rank.
My failure point 4: inside _peel_balance, after the gap _allreduce (now agreed), before the bare comm.allreduce(moved) that ends a sweep Hangs at np 2 and np 3. The healthy rank is in _peel_balance's allreduce; the failed rank is in the exit agreement. Finding 2.
Agreement counts on a clean partition_addon Equal on every rank, and the same over three repeats: 62 per rank at np 2, 86 at np 3, and 76 at np 3 with the empty rank.
The partition's answer Identical to development at np 2 and np 3: cells per rank on every level, a hash of every level's parent record, and units moved (315 and 420).
A fault add-on solve (faulted_2d(2) split-level MG, the test_1089 fixture), np 1, 2 and 3 Bitwise identical to development: per-rank hashes of v and p, the slip, and velocity iterations 6, 7 and 7.
Cost, partition_addon at np 3, three repeats each 0.222 / 0.225 / 0.231 s on the branch against 0.203 / 0.206 / 0.233 s on development. That is about 20 ms, or under 10%, for the 86 one-integer agreement exchanges, and about 0.01 s at np 2.
builder_failure=False The PR's cases assert builder_failure False on every rank, and they pass. No caller of partition_addon catches the error. These are add_fault, _add_fault_sheets, split_faults, split_fault, place_fault_ribbon_2d, add_conforming_sheet and the 3-D band builder. None runs inside the custom-MG retry loop, so no RBF retry can follow. Callers now see a CollectiveBuildError (a RuntimeError) whose message is prefixed with "addon_partition.partition_addon: ...".
test_0052 9 passed. A bare comm.allreduce planted in _partition_addon_body is flagged, and so is an agree() under a local-size guard. An agree() under if comm.rank == 0: is not flagged here. The scan's rank-guard fix (#1236) is not yet in this branch's development; with #1236's scan the same plant is flagged.
Neighbours: 23 add-on partition, fault-MG and test_0874 files Branch: 117 passed and 3 skipped at np 2; 118 passed and 2 skipped at np 3. Development: 109/3 and 110/2. The 8 extra are the PR's new file. No failures.

Findings

  1. High: the region_marks callbacks are collective and have no agreement point in front.
    • The gap. The body computes marks = [region_marks(lev.dm) for lev in levels] after _base_parent_addresses and the unit tables. The library's markers exchange vertex values: mark_polylines calls _propagate_vertex. A rank-local failure in the unit tables, inside the callback before its exchange, or between two levels' calls leaves the failed rank in the exit agreement and the others inside the callback.
    • Measured. It hangs at np 2 and 3, for both of my points (1 and 2).
    • Why the test misses it. The PR's description says every collective-making helper has an agreement point in front. This one doesn't, and the scan cannot see it because the collective is inside a callback.
    • Fix. Make the comprehension a loop with agree() before each region_marks(lev.dm) call.
  2. Medium: _peel_balance is half-converted. The PR makes _allreduce agree, which also gives _peel_balance's load, offer and gap reductions agreement points. Each sweep still ends with a bare comm.allreduce(moved). A failure between the gap reduction and that allreduce hangs at np 2 and 3 (point 4). The PR leaves helper interiors to later Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 items, but it is this PR's _allreduce change that puts the helper half in. Making that last reduction agreed_allreduce (or _allreduce) costs one line and closes the helper.
  3. Low (until test_0052: a guard that reads the rank is always rank-local (#874) #1236 lands): a rank-guarded agree() in the body is not flagged. With comm a parameter, comm.rank == 0 is classed as an argument guard by this branch's test_0052. test_0052: a guard that reads the rank is always rank-local (#874) #1236's scan catches it, as measured.

Build

The PR is Python-only. I built the merge base c902390 fresh in its own worktree on cores 0 to 3, and overlaid the head's Python for the branch runs. Every parallel run used at most 3 ranks, on cores 0 to 3. Not run: np 4 and above.

Logs kept by the reviewer.

Underworld development team with AI support from Claude Code

From the review of d6d72ae:

- region_marks is the caller's and collective (mark_polylines reconciles
  over the point star-forest), so an agreement point now sits before each
  level's call. The collective-guard scan cannot see into a callback.
- each balance sweep's count of moved units is reduced through _allreduce,
  which agrees first, instead of a bare comm.allreduce.

Two forced-failure cases: one rank fails in the callback after the first
level's marks, and one rank fails after a sweep's gap reduction. Both hang at
np 2 and 3 on d6d72ae.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH))
(H1 is the session that reviews pull requests and runs the parallel tests.)

Verdict at 40862ef: ready to merge on green from this review.

  • What is fixed: there is now an agreement point before each region_marks call, and _peel_balance's moved count goes through the agreed _allreduce. My failure points 2 and 4 now raise the same CollectiveBuildError on every rank. So do the two new cases.
  • A correction to my first review: my point 1 still hangs. It fails inside the callback, before the callback's own exchange. An agreement point in front of the call cannot catch that, so the fix I asked for would not have closed it either. It is the same kind of gap as a failure inside a helper before the helper's first collective, which this PR leaves to later Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 items. One agree() inside mark_polylines closes it (measured below). I list it as a follow-up, not a blocker (finding 1).

Earlier findings

finding at d6d72ae at 40862ef
1. High: region_marks calls have no agreement point in front Points 1 and 2 hang at np 2 and 3 Fixed at the call site. Point 2 passes at np 2, np 3, and np 3 with an empty rank. The new between-levels case passes. Point 1 still hangs at np 2 and 3: see new finding 1.
2. Medium: bare comm.allreduce(moved) in _peel_balance Point 4 hangs at np 2 and 3 Fixed. Point 4 passes at np 2, np 3, and np 3 with an empty rank.
3. Low: a rank-guarded agree() in the body is not flagged by test_0052 Not flagged (#1236's scan not in) Fixed. #1236 is in this development. With if comm.rank == 0: agree() planted in _partition_addon_body, test_0052 fails: "addon_partition.py:905 in _partition_addon_body(): agree() is skipped when: not (comm.rank == 0)". Without the plant, 20 passed.

What I ran

item result
The PR's 10 cases (9 forced failures, including the two new ones, and a clean partition) 10/10 at np 2, at np 3, and at np 3 with an empty rank (the empty-band layout leaves the last rank with no cells on any level).
The two new cases on the new merge base e7e02b9 and on d6d72ae Both hang at np 2 and np 3 on both, caught by the supervisor (exit 124). On d6d72ae the healthy ranks sit in _propagate_vertex (callback case) or _peel_balance (sweep case); the failed rank is in the exit agreement. They also hang on the merge base at np 3 with an empty rank.
My failure point 1: in the callback, on the last rank, before mark_polylines' own exchange Hangs at np 2 and np 3. The healthy ranks are in _propagate_vertex; the failed rank is in the exit agreement. Passes at np 3 with the empty rank failing. New finding 1.
My failure points 2, 3 and 4 Pass at np 2, np 3, and np 3 with an empty rank: the same CollectiveBuildError on every rank.
Point 1 with one agree() placed inside mark_polylines, just before _propagate_vertex (a probe copy, not the branch) Passes at np 2 and np 3. The clean partition is unchanged, at 2 more agreement exchanges (75 at np 2, 107 at np 3).
Agreement counts on a clean partition_addon Equal on every rank, and the same over three repeats: 73 per rank at np 2, 105 at np 3, and 92 at np 3 with the empty rank. At d6d72ae they were 62, 86 and 76. The difference, 11, 19 and 16, is exactly one per region_marks call (2 levels) plus one per balance sweep (9, 17 and 14 sweeps). The head's own commit over the first review's build gives the same counts, so the development merge adds none.
The partition's answer Identical to the merge base at np 2, np 3, and np 3 with an empty rank: cells per rank on every level, a hash of every level's parent record, and units moved (315, 420 and 330).
A fault add-on solve (faulted_2d(2) split-level MG, the test_1089 fixture) Bitwise identical to the merge base at np 1 and np 2: per-rank hashes of v and p, the slip, and velocity iterations 6 and 7. At np 3 the merge base itself is not repeatable at round-off: three base runs gave two different results, and the slip differs at 1e-14. Two of three head runs match a base run bitwise; the third differs at the same level. Iterations are 7 every time. So the PR does not change the np 3 answer. The variation is in development (see the note below).
Cost, partition_addon at np 3, three repeats, three runs each Head 0.203 to 0.261 s (median 0.223 s). Merge base 0.204 to 0.224 s (median 0.218 s). About 5 ms, within run-to-run noise, for 100 more one-integer agreement exchanges.
test_0052 at the head 20 passed. The rank-guard plant is flagged (above). The plant was made in a copy and reverted.
Neighbours: 23 add-on partition, fault-MG and test_0874 files Head: 120 passed and 3 skipped at np 2; 121 passed and 2 skipped at np 3. Merge base: 110/3 and 111/2. The 10 extra are the PR's file. No failures.

Findings

  1. Low (follow-up): a failure inside a library region_marks marker, before its own exchange, still hangs.
    • The gap. mark_polylines' marker does local work (cell_diameters, closure_points) and then calls _propagate_vertex, which is collective. A rank-local failure in that local part leaves the failed rank in the exit agreement and the others in _propagate_vertex. The agree() in front of the call has already passed. This is my point 1. It hangs at np 2 and 3.
    • Why it is not a blocker here. It is the same kind of gap as a failure inside any helper before the helper's first collective, which the PR leaves to later Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 items. My first review's suggested fix would not have closed it.
    • The test name. The new case test_a_failure_in_the_region_marks_callback_is_raised_on_every_rank fails after the marker has returned, so after its exchange. A failure in the callback before its exchange is not covered. The 'Review fixes' wording, "callbacks count as agreement points", reads the same way: it holds at the call site, not inside the callback.
    • Fix, here or in the follow-up. One agree() in mark_polylines' marker just before _propagate_vertex closes it (measured, np 2 and 3). mark_sheets and mark_band have the same shape: they call _vertex_h_3d, which ends in _propagate_vertex, so the same one line before it would close those (read, not run). A caller's own callback can only be covered by its author.
  2. Not this PR: the np 3 fault solve varies at round-off on development. At np 3 the faulted_2d(2) split-level solve gives different v and p hashes from run to run on the merge base, with the slip changing at 1e-14 and the iterations fixed. At the first review's development (c902390), two np 3 runs (branch and development) were bitwise identical. I have not looked for the cause. It may be worth a separate note against the coarse-levels change (The coarse levels of a refined hierarchy move with the finest level #1244), which is the main change in between.
  3. Nit: _allreduce turns the moved count into a float (np.array(values, dtype=float)), so the dtype=np.int64 at the call site has no effect. It is exact for any count here.

Build

The PR is Python-only: the head differs from its merge base e7e02b9 only in addon_partition.py and the test file. No existing build matched e7e02b9's compiled sources (_plex_topology.pyx changed in development), so I built e7e02b9 fresh in its own worktree on cores 0 to 3. I laid the head's Python over a copy of that build for the branch runs, and the merge base's Python over another copy for the base runs. Every run printed the package path it imported. Every parallel run used at most 3 ranks on cores 0 to 3, under the repository's MPI supervisor. The forced-failure runs used a 60 s silence limit. A 60 s limit stopped a slow, healthy solve in the neighbour files, so those ran at 300 s.

Not run

np 4 and above. The 3-D markers (mark_sheets, mark_band) under a forced failure.

Logs kept by the reviewer.

Underworld development team with AI support from Claude Code

)

From the re-check of 40862ef: a failure inside a marker, before its own
reconciliation, was not caught by the agreement at the call site.
mark_polylines now agrees before _propagate_vertex, and mark_sheets and
mark_band before _vertex_h_3d, which reconciles collectively. agree() is a
no-op outside an agreed build, so other callers are unchanged.

A forced-failure case for each marker (inside partition_addon for
mark_polylines; directly, inside an agreed build, for the other two). All
three hang at np 2 and 3 on 40862ef.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH))
(H1 is the session that reviews pull requests and runs the parallel tests.)

Verdict at 5d23b21: ready to merge on green from this review.

  • What is fixed: mark_polylines, mark_sheets and mark_band now agree before their collectives. My failure point 1 now raises the same CollectiveBuildError on every rank. So do the three new marker cases, and a 3-D mark_band case of my own.
  • One more marker of the same shape (finding 1, Low, follow-up): place_surface._ribbon_region_marks, the marker that place_fault_ribbon_2d gives partition_addon, still hangs on a failure before its exchange. One agree() closes it (measured). The 'Markers' section's claim that the body's agreement "covers the region-mark path too" holds for the three library markers in addon_partition, not for this one or for a caller's own callback.

The earlier follow-up and the marker cases

case at 40862ef at 5d23b21
My point 1: the callback fails on the last rank before calling mark_polylines Hang at np 2 and np 3 Fixed. Passes at np 2, np 3, and np 3 with an empty rank
The PR's mark_polylines case (forced on rank 1) Hang at np 2, np 3, and np 3 with an empty rank Pass at all three
The PR's mark_sheets case (3-D box, last rank) Hang at np 2 and np 3. Passes at np 3 with an empty rank (see finding 2) Pass at all three
The PR's mark_band case (2-D box, last rank) Hang at np 2 and np 3. Passes at np 3 with an empty rank Pass at all three
Mine: mark_band on a 3-D box, failure before _tet_vertices on the last rank Hang at np 2 and np 3. Passes at np 3 with an empty rank Pass at all three
Mine: _ribbon_region_marks, failure in _cells_anticlockwise on the last rank (not run) Hang at np 2 and np 3. Passes at np 3 with an empty rank. Finding 1

In every hang at np 2 the supervisor found the healthy rank in _propagate_vertex and the failed rank in the exit agreement. The three PR cases were run one per job on 40862ef, so each hang is that case's own.

The PR's three marker cases do fail before the collective and on one rank: the failure is raised in front of cell_diameters (rank 1) or _tet_vertices / _cell_vertices (last rank), and the agreement comes after those. The 40862ef hangs confirm that the failure point is in front of the exchange.

What I ran

item result
The PR's file (13 cases) 13/13 at np 2, np 3, np 3 with an empty rank, and np 4.
My failure points 2, 3 and 4 Pass at np 2, np 3, and np 3 with an empty rank: the same CollectiveBuildError on every rank.
Agreement counts on a clean partition_addon Equal on every rank and the same over three repeats: 75 at np 2, 107 at np 3, 94 at np 3 with the empty rank (were 73, 105 and 92). The difference is 2 everywhere: one agree() per mark_polylines call, and the marker is called on 2 add-on levels. It sits outside the marker's "has cells" branch, so the empty rank makes it too. The same 75 and 107 as the probe fix measured in the last re-check.
The partition's answer Identical to the merge base at np 2, np 3, and np 3 with an empty rank: cells per rank on every level, a hash of every level's parent record, and units moved (315, 420, 330).
faulted_2d(2) split-level MG solve Bitwise identical to the merge base at np 1 and np 2 (per-rank v and p hashes, slip, velocity iterations 6 and 7). At np 3 this time one head run and one base run were also bitwise identical (7 iterations).
test_0052 20 passed.
Neighbours: the 23 add-on partition, fault-MG and test_0874 files, --silence 300 Head: 123 passed and 3 skipped at np 2; 124 passed and 2 skipped at np 3. No failures. That is 3 more than at 40862ef (120/3, 121/2): the three new cases. The merge base gave 110/3 and 111/2 in the last re-check.
_ribbon_region_marks with one agree() placed in _skin_reach_2d just before _vertex_h_3d (a probe copy, not the branch) The forced failure passes at np 2, np 3, and np 3 with an empty rank. The clean marker marks the same number of vertices as the head at np 2 (151).

Findings

  1. Low (follow-up): place_surface._ribbon_region_marks still hangs on a failure before its exchange.
    • The gap. It is the marker place_fault_ribbon_2d passes to partition_addon in its default seams="gather" mode, so it is on the production 2-D ribbon path. Its marks(level_dm) calls _skin_reach_2d, which does local work (_coords, _cells_anticlockwise) and then _vertex_h_3d, which ends in _propagate_vertex. There is no agreement in between. With a failure forced in _cells_anticlockwise on the last rank, inside an agreed build, the run hangs at np 2 and np 3: the healthy rank is in _propagate_vertex, the failed one in the exit agreement.
    • Fix. One agree() in _skin_reach_2d just before _vertex_h_3d closes it (measured in a probe copy). agree() is a no-op outside an agreed build, so the placement's own call of _skin_reach_2d is unchanged. Here, or in the later Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 item for place_surface.
    • Wording. The 'Markers' section says the body's agreement "covers the region-mark path too". That is true for mark_polylines, mark_sheets and mark_band. It is not yet true for _ribbon_region_marks, and it cannot be true for a caller's own collective callback. partition_addon's docstring says nothing about this. One sentence under region_marks would do: a callback that is collective should call agree() before its first collective, as the library markers do, or a failure before it hangs the other ranks. The docstring's list of markers could also name mark_band.
  2. Low (test note): the mark_sheets and mark_band cases do not test anything at np 3 with an empty rank. They fail on the last rank. In that layout the last rank holds no cells and shares no points, so its skipped star-forest exchange leaves no one waiting: both cases pass on 40862ef there too. The mark_polylines case, forced on rank 1, does hang on 40862ef in that layout. Forcing the other two on rank 0, or on a rank that holds cells, would make them bite in every layout. Not a blocker: at np 2 and np 3 they do discriminate.

Build

The change since 40862ef is Python-only (addon_partition.py and the test file), and the merge base is still e7e02b9. I laid the head's Python over a fresh copy of the same e7e02b9 build used in the last re-check, and reused that re-check's merge-base and 40862ef overlays. Every run printed the package path it imported. Every parallel run used at most 4 ranks on 4 cores, under the repository's MPI supervisor, with a 60 s silence limit (300 s for the neighbour files).

Not run

np 5. A forced failure inside a marker through partition_addon in 3-D (the PR's and my 3-D cases call the marker inside an agreed build directly). place_fault_ribbon_2d end to end with a forced failure.

Logs kept by the reviewer.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi merged commit 86c8c85 into development Nov 20, 2026
10 checks passed
lmoresi added a commit that referenced this pull request Nov 20, 2026
The conflict in addon_partition.py, at the end of _partition_addon_body's
level loop, is resolved as H5's re-check of fc9d4c2 gives it: this branch's
`rest = ...` block, with #1247's agree() before the _carried_reference call,
as development has it. The moved_here check uses agreed_allgather, so a
rank-local failure earlier in the level loop is agreed rather than leaving
the other ranks in a bare allgather.

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi removed the request for review from Copilot November 24, 2026 19:17
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