Skip to content

Raise the provenance transfer's and the parent relation's rank-local failures on every rank (#874) - #1165

Merged
lmoresi merged 3 commits into
developmentfrom
bugfix/provenance-addon-collective-874
Nov 14, 2026
Merged

lmoresi merged 3 commits into
developmentfrom
bugfix/provenance-addon-collective-874

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Addresses #874 for the location and weighting sites in the add-on partition and the split-level transfers. #874 stays open, with no label change, until every site is guarded. add_fault's split is a separate item.

The review on this PR has three findings still open: 4 (rank-local statements between collectives in provenance_transfer_parallel, and the cell table read ahead of _parent_cells_local's guard), 5 (the message names neither the rank nor the level pair) and 6(b, c) (comment wording, the tier mark). Finding 6(a), the doubled import, is fixed.

The defect

Each step below is rank-local and runs ahead of a collective call. A failure on one rank raised there alone, and the other ranks waited in the next allreduce until the job was killed.

Function Rank-local step
fault_mg.provenance_transfer_parallel locates the fine cells in the mesh holding the record; weights each owned node in its recorded parent (_barycentric, _node_weights)
addon_partition._parent_cells_local locates each fine centroid in the level below
addon_partition.inherit_provenance locates a surgery's cells in the mesh it was made from; after a move, locates its vertices in the moved host
addon_partition._base_parent_addresses locates a level's cells in the mesh its record is on

The fix

Every step is caught and handed to fault_contact._collective_raise, so every rank raises the same error. _collective_raise now takes the exception class to raise.

  • Transfer builders (provenance_transfer_parallel, and cell_located_transfer_parallel from Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130) raise CollectiveBuildError without builder_failure. That is the class of the count checks beside them. In parallel, build_transfers degrades the preconditioner on it at once, on every rank together.
  • addon_partition raises RuntimeError, as its unlocated-count checks do. These run while a mesh is made or partitioned, not inside a hierarchy build, so there is nothing to retry or degrade.
  • inherit_provenance reads the child's and the host's cell tables inside a guard raised on every rank, before any location.
    • The code above that guard only reads attributes every rank holds alike (the record, the moved flag, the tail), so it can't raise on one rank alone.
    • This matters because inherit_provenance runs inside split_tail_levels, which has its own verdict on the same communicator. A one-rank exception could otherwise leave the other ranks in an inner verdict that pairs with the outer one.

Test

tests/parallel/test_0874_provenance_and_parent_collective_parallel.py (min_size 2). Each case forces the failure on the last rank only, and asserts that every rank raises the same message and the expected class. In the transfer cases it also asserts that builder_failure is off:

  • provenance weights;
  • provenance location;
  • _parent_cells_local;
  • inherit_provenance, recorded branch (add_fault on the adapt child);
  • inherit_provenance, moved-host branch (a ladder placed on a box moved by mesh.deform);
  • _base_parent_addresses.

Today's routes don't reach two of these sites, because every surgery inherits the record:

  • the transfer's record is always on the fine mesh itself;
  • a level's record is always on the level.

The tests reach them through a mesh that passes every attribute through to the real one but hides its record, so the location path runs on the real meshes. On that path, the transfer matrix equals the recorded path's exactly (difference norm 0), and so do the parent addresses.

Results on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH):

  • Development's files: each case hangs at np 2, one rank raising alone (supervisor exit 124).
  • This branch: 6 pass at np 2, 3, 4 and 5, about 25 s each. With Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130's file alongside, 11 pass at np 2 and 3.
  • No test goes through build_transfers for a fault transfer. The tests call the transfer functions directly, so the degrade path is shown by reading custom_mg, not by a run.
  • Neighbouring files at np 2: 22 pass (test_1096, test_1089, test_1173, test_1097, test_1099).
  • Serial test_1173: 12 pass.
  • scripts/check_test_coverage.py: OK.

Underworld development team with AI support from Claude Code

…failures on every rank (#874)

The rest of #874 after #1130. provenance_transfer_parallel locates the fine
cells in the recorded mesh and weights each owned node in its parent;
addon_partition._parent_cells_local locates each fine centroid in the level
below. A failure in either on one rank raised there alone, and the other
ranks waited in the next allreduce. Both now go through
fault_contact._collective_raise, so every rank raises the same error.

Test: tests/parallel/test_0874_provenance_and_parent_collective_parallel.py
forces the failure on the last rank. Development hangs (exit 124 at np 2);
with the guard, it passes at np 2 to 5.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 13, 2026 20:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@lmoresi

lmoresi commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Adversarial review of PR #1165 at c3c9f3f

Cross-review by W1 (the integration session, which owns the fault add-on and multigrid code this PR edits; it runs on one rank only), with a fresh reviewer.

Measured on: macOS, 12-core Apple M4, one rank, conda-forge PETSc 3.25.3. Nothing below was run at more than one rank.

Findings

  1. Medium. Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874 is not closed by this branch "apart from add_fault's split": two sites of the same shape remain in the file the PR edits. src/underworld3/utilities/addon_partition.py:288 (inherit_provenance) and :387 (_base_parent_addresses) each call locate_in_cells_exhaustive with no guard, and the next statement on the path is comm.allreduce(n_bad) (:290, :389). Read. Measured on one rank: with locate_in_cells_exhaustive forced to raise LinAlgError, both functions let the raw LinAlgError out, where the guarded _parent_cells_local raises the named RuntimeError. That the other ranks then wait in the allreduce is read from the code, not measured. inherit_provenance has a second unguarded locate at :302. _base_parent_addresses is called from partition_addon at :719, one line from the loop that calls the guarded function. The PR body's sentence "With Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130 this closes Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874, apart from add_fault's split" should either cover these two or name them as left open.

  2. Medium. The collective failures raise a different exception type from the collective checks beside them, and the body does not say which behaviour is meant. src/underworld3/utilities/fault_mg.py:582 and :607 raise CollectiveBuildError; the new verdicts at :603 and :658 raise the plain RuntimeError of fault_contact._collective_raise. In parallel custom_mg.build_transfers retries and degrades only on CollectiveBuildError (custom_mg.py:2965). Read. So an unlocated-node count degrades the preconditioner, while a locate or weight failure in the same function, now equally agreed by every rank, aborts the solve. The comment at custom_mg.py:2959-2964 ("Any other exception is one rank's ... It is raised") no longer describes these two, and the comment at fault_mg.py:577-578 ("both checks below ... may retry or degrade") now sits above a block with four collective outcomes of two kinds. Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130 made the same choice in cell_located_transfer_parallel; if abort is intended, say so in the body and correct the two comments.

  3. Medium. The first new guard in fault_mg has no test. fault_mg.py:596-603 (the locate on the recorded level when pre is not fine) is exercised by neither test in tests/parallel/test_0874_provenance_and_parent_collective_parallel.py: test 1 forces locate_in_cells_exhaustive only inside addon_partition._parent_cells_local, test 2 forces only _node_weights. Read. On one rank the guard raises the named error (measured, see below); nothing shows it at more than one rank, and nothing shows which branch (pre is fine or not) the test's captured call takes.

  4. Low. Rank-local statements inside provenance_transfer_parallel remain outside both guards. fault_mg.py:610 (pre._addon_parent[pcell]) through the root packing sits between the n_out allreduce and sf.setUp() at :626; gcols = cols_u[inv] at :659 sits between the verdict and the statistics allreduces at :663. Read. Measured on one rank: a record shorter than the cell count gives a raw IndexError: index 1077 is out of bounds for axis 0 with size 720 from :610. It needs a stale or corrupt record, so it is unlikely; it is the failure shape this PR is about. _cell_vertex_table in addon_partition.py, before the guard in _parent_cells_local, likewise escapes raw when forced (measured).

  5. Low. The message does not say where. _collective_raise raises problems[0] only (fault_contact.py:76-77), so the report is the lowest failing rank's, with no rank number, no level pair and no traceback of the original exception (the guard keeps type: message). Read. custom_mg._agreed_node_transfer (custom_mg.py:1213-1229) prefixes rank N: and joins every rank's message; the same here would cost one f-string.

  6. Low. Style (Charter §4, §5, §8). (a) _collective_raise is imported twice inside provenance_transfer_parallel (fault_mg.py:592 and :657), the second between the try block and its use; the other functions of the file import it once at the top. (b) The comments at fault_mg.py:590-591 and addon_partition.py:336-337 ("a rank that raised alone left the others waiting") describe the code before the change, not the code. (c) Level and tier are on the module pytestmark; the Charter says the tier goes on the test. The neighbouring Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130 test does the same, so this is noted, not asked for.

  7. Note. CI covers the new test at two ranks only. .github/workflows/build_uw3_and_test.yaml:154 runs scripts/test.sh --p 2; the three-, four- and five-rank passes are opt-in. Read. The CI log for c3c9f3f (Linux, MPICH 5.0.1, two ranks, shard 4 of 6) shows the batch holding the new file at "18 passed". The results at three to five ranks rest on the author's run.

  8. Note. The collective guard scan cannot see this change. tests/test_0052_collective_guard_scan.py: 5 passed in 6.7 s on the PR head (measured). The scan matches comm.<op> receivers and does not follow a helper (read), so the pass says nothing about the four _collective_raise sites, and it did not flag the two sites of finding 1 on development either.

Attacks that found nothing

  • Normal path, one rank, PR head against development's two functions executed in memory (unit box, 1440 fine cells, recorded as test_1173 records). _parent_cells_local: 0 of 1440 parents differ, unmoved and after a move by one fine cell; every parent has 4 children. provenance_transfer_parallel: max |head - development| = 0.0 over eight cases (degree 1, 769 x 205, 1333 nonzeros; degree 2, 2977 x 769, 9553 nonzeros; pre is fine and not; unmoved and moved); max |P Xc - Xf| = 1.2e-15 (degree 1), 4.8e-15 (degree 2).
  • Each guarded failure, emulated in memory on one rank, raises and names what failed. _parent_cells_local, locate forced: RuntimeError: addon_partition: locating the fine cells in the level below failed: LinAlgError: Singular matrix (forced); a reference of the wrong length: same prefix, IndexError: index 34 is out of bounds for axis 0 with size 3. Provenance transfer, pre is not fine, locate forced: RuntimeError: fault_mg: the provenance transfer failed to locate the fine cells: LinAlgError: .... _node_weights forced, _barycentric forced, and a natural singular nodal matrix (degree 2, coarse nodes at one point): RuntimeError: fault_mg: the provenance transfer failed to weight the fine nodes: ....
  • Serial neighbours unchanged. test_1173, test_1096, test_1087, test_1174, test_1176: 77 passed (measured). Call counts over that run: _collective_raise 718, _parent_cells_local 19, provenance_transfer_parallel 5, partition_addon 0. The two changed functions therefore add at most 29 of the 718 verdict calls, and with partition_addon never called none of them came through the partition. At one rank _collective_raise makes no MPI call (fault_contact.py:72, read).
  • Cost at more than one rank, by reading. One allgather of a None per _parent_cells_local call (one per add-on level pair per partition) and one or two per provenance transfer (one per recorded pair per hierarchy build). None is inside a per-cell or per-node loop.
  • Rank symmetry of the new calls, by reading. All four _collective_raise calls sit outside the if mine.size / if n_f and n_c conditionals, so a rank with nothing to do still reaches them. pre is fine is an object identity and the partition_addon loop runs over the level count; both are the same on every rank.
  • Tolerances (Charter §12). The PR adds none and decides nothing by distance; the guards catch exceptions. The one slack on the path, _INSIDE_TOL = 1e-8 (fault_mg.py:51), is a barycentric coordinate, so dimensionless, named once, unchanged. The body lists no tolerance, which is accurate.
  • The test can fail. It asserts on the message text on every rank and on all messages being identical, not on "did not hang". If the last rank holds no cells the forced failure never fires and the test fails on caught is None; it does not pass vacuously. The premise of test 2 is asserted (allreduce(len(calls)) == size), as is len(levels) >= 2 in test 1. On development the failure is a hang ended by the 600 s timeout, not an assertion (read; the author reports it).
  • Reach. python scripts/check_test_coverage.py: "OK: all 460 test files are reachable from scripts/test.sh". The file is picked up by the tests/parallel/test_*.py glob.
  • Drive-by. None beyond the restructuring the try needs. development has not touched addon_partition.py, fault_mg.py or fault_contact.py since the PR base.
  • Docs. docs/developer/design/parallel-addon-distribution-2026-10.md and docs/developer/subsystems/fault-split-multigrid.md describe the collective refusal for an unlocated node and say nothing about a rank-local exception; nothing there is contradicted and no page states the collective-failure contract. No capability guide names these functions.

Issue verdicts

Issue Verdict
#874 Still live. The two sites its last comment names are fixed by this branch on the author's runs and CI at two ranks; the split's rank-local raise (fault_mg.py:765) and the two sites of finding 1 are not. Leave it open with no fixed-in label; the body rightly carries no Closes.
#886 Already labelled fixed-in-development; not changed by this branch. Finding 2 is the question of whether these new verdicts should use its type.
#1091 Already labelled fixed-in-development; same file, the normal path of _parent_cells_local is unchanged (0 of 1440 parents differ, moved and unmoved).
#919 Already labelled fixed-in-development; partition_addon, not touched beyond the guarded function it calls.
#902 Already labelled fixed-in-development; a different failure (preallocation, then a rank-local fallback). Not touched.
#1120 Still live; the split-level cell-located transfer, not the provenance transfer. Not touched.
#449 Already labelled fixed-in-development; nested transfer rows. Not touched.
#940 Still live; fault_contact pooled vector. Not touched.
#1122 Still live; adapt's per-rank node_budget. Not touched.
#1132 Still live; MMPDE percentile map. Not in this territory.

No verdict here rests on a probe against development at more than one rank.

Not checked

  • The new parallel test was not run: this review had one rank. The hang on development and the passes at two to five ranks are the author's and CI's (two ranks only), not ours.
  • _collective_raise at more than one rank, including that the verdict communicator pairs correctly when one rank raised inside the guarded block.
  • Which branch (pre is fine or not) the test's captured provenance call takes at more than one rank.
  • That the two sites of finding 1 hang at more than one rank; read from the code, with the raw escape measured on one rank.
  • 3-D and embedded-surface (cdim > dim) meshes; every probe was 2-D.
  • Wall time of the new test and whether the 600 s timeout is ever approached.

Underworld development team with AI support from Claude Code

… transfers

W1's review of #1165:

1. addon_partition.inherit_provenance (the recorded branch and the moved-host
   branch) and _base_parent_addresses locate cells rank-locally ahead of an
   allreduce. A failure on one rank is now raised on every rank, as in
   _parent_cells_local. These stay RuntimeError, as the unlocated-count checks
   beside them raise: they run while a mesh is made or partitioned, not inside
   a hierarchy build.
2. fault_contact._collective_raise takes the class to raise. The transfer
   builders' verdicts (provenance_transfer_parallel and
   cell_located_transfer_parallel) raise CollectiveBuildError with
   builder_failure=True, the class of the checks beside them, so the build
   retries or degrades on every rank together. It is a RuntimeError, so
   callers catching that are unchanged.
3. Tests for every guarded site, each forcing the failure on the last rank.
   Two sites today's routes do not reach (the transfer's record on another
   mesh, a level whose record is on its parent) are reached through a mesh
   that hides its record. The location path there is checked to give exactly
   what the record gives.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Adversarial review of PR #1165, round 2, at 6a8b354

Cross-review by W1 (the integration session, which owns the fault add-on and multigrid code this PR touches). Round 1 was at c3c9f3f. This round is by reading the head and the diff against development (af796d3), with the CI log. We ran nothing: the session's machine is macOS, 12-core Apple M4 (serial runs only). The hang on development at two ranks and the passes at three to five ranks are the author's; the two-rank pass is CI's (shard 4, 25 passed on both ranks).

Round-1 findings

# Finding State at 6a8b354
1 inherit_provenance and _base_parent_addresses unguarded Addressed. Three verdicts in addon_partition.py, each outside the size conditional and before the next allreduce, so a rank with no cells reaches them. The body no longer closes #874.
2 Exception class of the new verdicts Class addressed (all five transfer verdicts raise CollectiveBuildError; the body says why addon_partition keeps RuntimeError). The flag chosen is finding N1. The comment "both checks below are on allreduced counts" in provenance_transfer_parallel still sits above four collective outcomes.
3 No test for the locate guard when the record is on another mesh Addressed. test_provenance_location_failure_is_raised_on_every_rank asserts its premise, runs the other branch, compares the located operator with the recorded one exactly, then forces the failure on the last rank.
4 Rank-local statements outside the guards Open. Unchanged in provenance_transfer_parallel (the _addon_parent index before the root packing, gcols = cols_u[inv] after the verdict). The two newly guarded functions have the same shape: the centroid and reference-vertex calls run before the guard, and the _addon_parent index runs after the allreduce.
5 The message does not say which rank or level pair Open. _located_problem adds what was being located and the exception type.
6 Style Partly. addon_partition.py imports _collective_raise once; provenance_transfer_parallel still imports it twice, the second between the try and its use. The history sentence "a rank that raised alone left the others waiting" remains in two comments and is repeated in the new _located_problem docstring (Charter section 4).

New findings

N1. Medium. builder_failure=True on the five transfer verdicts triggers a retry that cannot succeed. CollectiveBuildError's docstring says the flag marks "the one case a different builder can change", and the handler in build_transfers says "an agreed check elsewhere (the provenance transfer, the operator sizes) would fail again after a full rebuild". CustomMGHierarchy.build calls provenance_transfer_parallel and cell_located_transfer_parallel with no builder argument, so the retry under rbf calls the same function with the same inputs. Read, not run. A locate or weight failure in either transfer therefore costs one full hierarchy rebuild, records a fallback to "rbf (local kd-tree RBF)" that changed nothing, warns about barycentric stencils, and then degrades. The checks beside these verdicts in the same function raise with the default builder_failure=False and degrade at once, so the body's "That is the class of the checks beside them" holds for the class and not for the flag. Round 1 asked about the class only; the flag is new in this round. Either drop the flag at the five sites, or keep it and change the docstring, the handler comment and the body to say a retry is meant and what it can change.

N2. Low. The three cell-located sites from #1130 change from stopping the solve to degrading it, and no test goes through build_transfers. On development they raise RuntimeError, which build_transfers does not catch in parallel. At the head they retry, then degrade with warnings. All six new tests and test_0874_fault_mg_collective_failures_parallel.py call the builders directly and catch RuntimeError; test_1108 tests retry and degrade, but not for a fault transfer. The body does not say that these three sites change behaviour.

N3. Low. A rank-local raise before the new inner verdict can leave the ranks one verdict out of step inside split_tail_levels. split_tail_levels wraps add_fault in its own verdict on the same communicator, and inherit_provenance's new verdicts are reached through add_fault. If one rank raises in the unguarded statements of finding 4, it goes to the outer verdict while the others are at the inner one; the two allgather calls can complete as one collective, and the others then call the outer verdict with no partner. Inferred from reading, not run. Before this PR the same raise left the others in an allreduce, so the class of outcome is unchanged. When the failure is inside the guarded try, the nesting is clean. This is a reason to close finding 4 rather than a defect of the guards.

N4. Low. The moved-host verdict is a new collective under if reference is not None:. Every rank reaching it rests on the mesh records (_addon_reference, _as_built_vertices, _moved_since_built) being the same on all ranks. The setters we read set them with no rank-local condition. partition_addon checks the same uniformity with an allgather before relying on it; inherit_provenance relies on it unchecked. tests/test_0052_collective_guard_scan.py does not follow _collective_raise, so the scan cannot see this.

N5. Low, tests. Two tests choose the branch of inherit_provenance by a local variable's name ("taken_back" in frame.f_locals); a rename fails loudly, so this is fragile and not silent. One test does not destroy the three matrices it builds.

N6. Low, docs. docs/developer/subsystems/rotated-freeslip.md describes two kinds of verdict for the parallel build (a builder failure, a check on allreduced sizes). An agreed rank-local exception is now a third. Whether the sentence needs extending depends on N1.

N7. Note. The round-2 commit message opens "W1's review of #1165:" with no explanation of the code in that message.

Checked and found nothing

  • Reduce before branch at all three new verdicts in addon_partition.py; early returns before them are on object identities and mesh records, not on array sizes.
  • The message is built from the exception's type and text on the raising rank; no rank-local array is indexed. Every rank raises the same string.
  • CollectiveBuildError subclasses RuntimeError, so no except RuntimeError handler in the library loses anything; custom_mg.py makes no call into addon_partition; no new import cycle.
  • Each of the six tests forces its own site and fails without its guard (an unguarded LinAlgError is not caught by the helper's except RuntimeError). The file is reachable from scripts/test.sh and CI collected it.
  • The diff adds no tolerance and no coordinate match; the new tests compare exactly.
  • development has not changed the touched files since the merge base.

Not checked by us

  • Any run at more than one rank.
  • The retry-then-degrade path for a fault-transfer verdict through build_transfers: what a failed first build of a split-level hierarchy leaves behind, and how the fault solve behaves on the default preconditioner afterwards.
  • The pairing of the nested verdicts in N3.
  • 3-D and embedded-surface meshes; the new tests are 2-D.

Issue state

#874 stays open, as the body says: finding 4's statements and add_fault's split are unguarded. No label changes from this round.

Conclusion

Ready with conditions:

  1. Settle builder_failure at the five transfer sites (N1).
  2. Correct the "both checks below" comment and remove the second import in provenance_transfer_parallel.
  3. Say in the body that the three Collective failures in the split-level transfer, and a global winding vote in the line cut (#874) #1130 sites now degrade where they stopped the solve, and that round-1 findings 4 to 6 stay open.

N3 to N7 need no change to merge.

Underworld development team with AI support from Claude Code

… cells under the guard

W1's round-2 conditions on #1165:

- N1: the five transfer verdicts no longer pass builder_failure. Another
  builder cannot change a failed location or weight, so a retry under rbf
  would fail the same way; the build now degrades at once, like the count
  checks beside them. The test asserts the flag is off.
- The stale "both checks below" comment in provenance_transfer_parallel is
  rewritten, and _collective_raise is imported once there.
- N3: inherit_provenance reads the child's and the host's cell tables inside
  a guard raised on every rank, before any location. What runs above it
  reads attributes every rank holds alike. A one-rank exception there could
  otherwise leave the other ranks in a verdict that pairs with an enclosing
  one (split_tail_levels) on the same communicator.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

Review of PR #1165, round 3, at ad18d6d: the N1 and N3 hunks

Cross-review by W1 (the integration session, which owns the fault add-on and multigrid code this PR touches). Scope: the diff from 6a8b354 to ad18d6d only, by reading. We ran nothing; the parallel passes at two to five ranks are the author's, and CI was still running when this was written.

N1, cleared. builder_failure=True is gone from all five transfer verdicts (three in cell_located_transfer_parallel, two in provenance_transfer_parallel), so they raise CollectiveBuildError with the default flag and the hierarchy build degrades at once, as the checks beside them do. The comment above the checks in provenance_transfer_parallel now describes all four outcomes and says why none passes the flag. _collective_raise is imported once. The test helper asserts the flag is off on the error it catches.

N3, cleared. inherit_provenance reads the cell tables of the child and the host inside a try, followed by a verdict every rank reaches. What runs above it reads mesh records and level lists (_addon_parent, _addon_below, _moved_since_built, _addon_reference, reference_vertices, _levels_of), with no arithmetic on a rank's own arrays. The two early returns above the new verdict are on those records.

Left, no change needed to merge.

  • One comment in provenance_transfer_parallel, above the locate verdict, still says the build "retries or degrades"; with the flag off it degrades.
  • child._addon_parent = np.asarray(parent, dtype=np.int64)[cell] runs after the allreduce, outside a guard. cell comes from the locate that just passed its count check, so we see no way for it to fail on one rank. This is the rest of round-1 finding 4, which the body lists as open.

Issue state. #874 stays open, as the body says. No label change.

Conclusion. The three round-2 conditions are met at ad18d6d. Ready on green CI.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi merged commit 533c7f4 into development Nov 14, 2026
10 checks passed
jcgraciosa pushed a commit to jcgraciosa/underworld3 that referenced this pull request Nov 17, 2026
…reads it (underworldcode#874)

Finding 4 of the underworldcode#1165 review. provenance_transfer_parallel read
pre._addon_parent[pcell] and packed the coarse cells between two collective
calls, unchecked. On one rank, a short record raised an IndexError and an
address out of range gave a PETSc error or an MPI abort, while the other
ranks waited (np 2).

The record is now checked before the star forest is built on it: one entry
per cell of pre, each a (rank, local cell) that exists (the coarse cell
counts are allgathered). The check and the packing are under one guard, and
a failure is a CollectiveBuildError on every rank. addon_partition.
_parent_cells_local now reads its cell tables inside its guard as well.

Tests (in test_0874_provenance_and_parent_collective_parallel.py): the
record damaged on the last rank only (short, a rank that does not exist, a
cell that does not exist), and a cell-table failure before the parent
location. On development each fails at np 2: IndexError on one rank, a
PETSc error on one rank and a hang, an MPI abort, a hang. Branch: 10 passed
at np 2 to 5.

Underworld development team with AI support from Claude Code
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.

3 participants