Repository navigation
addon_partition.partition_addon agrees on failure (#874) - #1247
Conversation
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
|
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)) Verdict at d6d72ae: changes requested.
What I ran
Findings
BuildThe 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
…partition-addon-874
|
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)) Verdict at 40862ef: ready to merge on green from this review.
Earlier findings
What I ran
Findings
BuildThe PR is Python-only: the head differs from its merge base e7e02b9 only in Not runnp 4 and above. The 3-D markers ( 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
|
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)) Verdict at 5d23b21: ready to merge on green from this review.
The earlier follow-up and the marker cases
In every hang at np 2 the supervisor found the healthy rank in The PR's three marker cases do fail before the collective and on one rank: the failure is raised in front of What I ran
Findings
BuildThe change since 40862ef is Python-only ( Not runnp 5. A forced failure inside a marker through Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
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
Part of #874: the add-on partition is converted to the agreed-build mechanism (#1218), following custom_mg.build (#1225).
Change
addon_partition.partition_addonruns its parallel body (_partition_addon_body) inside oneagreed_build("addon_partition.partition_addon", builder_failure=False)context. A rank-local exception on one rank is raised on every rank as the sameCollectiveBuildError(aRuntimeError, 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.agreed_allreduce,agreed_allgather)._allreduceagrees before its arrayAllreduce.Test
tests/parallel/test_0874_agreed_partition_addon_parallel.pypartitions 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):
Regression
scripts/test.sh's np 2 parallel set: 101 passed, 3 skipped.scripts/check_test_coverage.pyis OK.Review fixes (8babf9f; development merged at 40862ef, after #1244)
From the first review:
region_markscallbacks are agreement points. The callback belongs to the caller, and it is collective:mark_polylinesreconciles 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._peel_balanceis now reduced through_allreduce, which agrees first, instead of a barecomm.allreduce.Two new forced-failure cases cover these:
Runs at this head:
test_0874_agreed_partition_addon_parallel.py(10 cases): passes at np 2, 3, 4 and 5 (before the merge).tests/parallel/test_0874_*file, after merging development: np 2, 66 passed and 1 skipped; np 3, 67 passed.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_polylinesbefore_propagate_vertex;mark_sheetsandmark_bandbefore_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, thatpartition_addon's body runs agreed, therefore covers the region-mark path too.mark_polylines, throughpartition_addonmark_sheets, inside an agreed build, 3-D boxmark_band, inside an agreed build, 2-D boxThe
mark_polylinescase fails on rank 1, becausecell_diametersruns only on a rank holding cells.The whole file (13 cases) passes:
test_0052 also passes.
Underworld development team with AI support from Claude Code