Repository navigation
#874: guard the provenance transfer's opening reads; range-check _resolve_parents - #1216
Conversation
…olve_parents The two follow-ups from the #1201 review. - provenance_transfer_parallel read its level tables (vertex tables, the layout reshapes, the node-to-cell map) unguarded before its first allreduce. They are now read under one guard, raised on every rank as a CollectiveBuildError. The node tables build a basis DM, which is collective, so they are read on every rank first (they are cached). - addon_partition._resolve_parents built two star forests from the recorded old addresses with no check. Each record is now checked on every rank first: one entry per cell (the level below's cells, and the fine level's), each a (rank, old local cell) that exists, against the allgathered old cell counts. A failure raises the same RuntimeError on every rank. Tests (test_0874_provenance_and_parent_collective_parallel.py): an opening read failing on the last rank; the old parent addresses short, naming a rank that does not exist, or a cell that does not exist, on the last rank. Development at np 2: a hang; a short record passing silently; a hang; an MPI abort. Branch: 14 passed at np 2 to 5. 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 on e0d9d04: changes requested. One small change is needed.
How it was runBuilds:
Probes run the real meshes of the test file's captured calls, with one failure forced on the last rank only. That is the same method the PR's tests use. FindingsBlocking
Should fix here, or note under #874
Follow-ups for #874 (not this PR)
Nit
Confirmed correct
Development fails the new cases (np 2, run here)
What was run (this branch)
In total: 126 passed, 0 failed, and 2 skipped by design at np 2. Probes:
Every parallel run was under the MPI supervisor with a timeout, pinned to four cores. Not run:
Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
Underworld development team with AI support from Claude Code
…nce-opening-reads-874
…t as nodes H1's review of #1216 and point (B) of the #1206 review. - provenance_transfer_parallel: every statement from the fetched parents to the weights (the reshapes, Xw, reference_vertices) is under one guard that every rank enters, a rank with no owned node too. - cell_located_transfer_parallel: the opening reads under one guard, the node tables (collective) read first, as in the provenance transfer. - level_pair_rotation: the guard catches any exception (an IndexError from an offset escaped it) and covers the CSR build ahead of createAIJ. - level_wall_rotation: the per-node blocks and the CSR build are guarded. - inherit_provenance and _base_parent_addresses: the host's record is checked (one entry per cell) and indexed under the guard, before the collectives. - _carried_reference: a failure reading the table refuses on every rank. - The parallel fault-copy repair counts copy NODES (by their global columns), as serial does, not node x component columns. Every guard raises a CollectiveBuildError on every rank (addon_partition's RuntimeError where its checks raise one). Tests: a forced failure on the last rank at each site (test_0874_provenance_and_parent_collective_parallel.py, now 24 cases, the _resolve_parents ones over both records), and the node count checked against the located transfer (test_1120 parallel). Development hangs or aborts on every new case 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 on f060cb0: ready to merge on green from this review.
How it was runBuild:
Probes: each probe forces one failure on one rank, through the real meshes of the test file's captured calls. Every run was under the MPI supervisor with a timeout, pinned to four cores. After every timeout we checked for leftover ranks; none were left. Item by item (np 2 probes)
Error classes:
On item 7: our first probe for it used a point that is not in the level DM. That ends in a segmentation fault inside Point (B): serial and parallel count the same thingWe used the fixture of
Observation for #1120, not this PR: in the moved case, serial and parallel do not repair the same rows.
Spot-check of the "agreed arithmetic" triage
Still open, as the PR says: Tests (this branch)
Serial: In total: 184 passed (74 at np 2, 24 at np 3, 76 at np 4, 10 serial), 0 failed; 2 skipped by design at np 2, and 1 serial skip. On development:
Not run:
Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
Addresses #874: the follow-ups from the #1201 review, H1's review of this PR, and point (B) of the #1206 review. Review: H1 (review and parallel test runs on a 96-thread Linux workstation).
The rule
Every rank-local step of these builders that can raise sits inside a guard. The guard turns the failure into the same error on every rank before the next collective call:
CollectiveBuildErrorin the transfers and the rotations;RuntimeErrorofaddon_partition's own checks there.A step that is itself collective (a basis DM built by
_cell_node_indices, the move check, a node lookup that evaluates collectively) is read on every rank before the guard.Sites
fault_mg.provenance_transfer_parallel, openingfault_mg.provenance_transfer_parallel, after the star forestgotreshapes,Xwandreference_verticesunguardedfault_mg.cell_located_transfer_parallel, openingfault_mg.level_pair_rotationRuntimeErrorandValueError; CSR build unguardedcreateAIJfault_mg.level_wall_rotationaddon_partition._resolve_parentsaddon_partition.inherit_provenanceparent[cell]after the allreduce, uncheckedaddon_partition._base_parent_addressesrecord[cell]on returnaddon_partition._carried_referencePoint (B) of the #1206 review: the parallel fault-copy repair now counts copy nodes, identified by their global columns, as the serial transfer does. Before, it counted node × component columns, twice the serial count in 2-D.
Test
tests/parallel/test_0874_provenance_and_parent_collective_parallel.py, now 24 cases. Each new case forces one failure on the last rank and asserts that every rank raises the same message and class:_resolve_parents, short, naming no such rank, or naming no such cell, for both records (H1's nit);tests/parallel/test_1120_split_transfer_fault_copies_parallel.pygainstest_the_weak_copies_are_counted_as_nodes_as_in_serial. It checks the repair's count against the copy nodes whose located column is weak.Results on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH):
fault_mg.pyandaddon_partition.py, np 2: every new case fails. The record cases on the parent addresses: a hang, a short record passing silently, and an MPI abort. Every other case hangs (exit 124), except the two rotations, which abort (exit 142).test_1120parallel gives 2 passed at np 2 and 3; serial gives 8 passed.test_0874_fault_mg_collective_failures,test_0874_mirrored_mesh_cut,test_0874_nested_transfer_verdict,test_1089,test_1096,test_1097_place_sheet,test_1099,test_1173,test_1176,test_1111,test_1101,test_1131,test_1064.scripts/check_test_coverage.py: OK.Not in this PR
An inventory of the three files lists 45 functions with an unguarded step ahead of a collective. The rest is triaged in the #874 comment:
partition_addonand its balancing helpers;add_fault's split (Fault-split multigrid: rank-local raises before collectives in the cell-located transfer and the line cut's orientation vote #874's original item);H1's three nits on #1212's
_seam_points(the no-overlap assumption, height-1 only, one exterior label compared vertex by vertex) follow once #1212 merges.Underworld development team with AI support from Claude Code