Repository navigation
Check the add-on record on every rank before the provenance transfer reads it (#874) - #1201
Conversation
…reads it (#874) Finding 4 of the #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
|
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 0292449: ready to merge on green from this review (a comment, not a GitHub approval). Finding 4 is fixed. A short, out-of-range or wrong-rank record on one rank is now the same How it was runThe two changed modules were laid over a development install (176958a). Two Python files from fafbecb, the PR's base, were added too ( FindingsNo blocking findings.Minor
Confirmed correct
Development fails the four new cases (np 2, run here)
What was run (this branch)
In total:
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 |
…nge-check _resolve_parents The two follow-ups from the underworldcode#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
Addresses #874: finding 4 of the #1165 review. Review: H1 (review and parallel test runs on a 96-thread Linux workstation).
The defect
fault_mg.provenance_transfer_parallelreadpre._addon_parent[pcell]and packed the coarse cells for the star forest between two collective calls, with no check. A damaged record on one rank failed there alone, and the other ranks waited:IndexErroron that rankaddon_partition._parent_cells_localalso read its cell tables just before its guard.The fix
The record is checked before the star forest is built on it.
pre.The check and the packing sit under one guard. A failure is a
CollectiveBuildErroron every rank together, the class of the checks beside it, so the hierarchy build degrades on all ranks._parent_cells_localnow reads its cell tables inside its guard as well.The statement after the weight verdict,
gcols = cols_u[inv], needs no guard:invcomes fromnp.uniqueover the same rows, so it can't index out of range.Test
Four cases are added to
tests/parallel/test_0874_provenance_and_parent_collective_parallel.py. Each damages the last rank only, and asserts that every rank raises the same message:Results on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH):
IndexErroron one rank. A bad rank is a PETSc error on one rank and then a hang (supervisor exit 124). A bad cell is an MPI abort. The cell-table failure hangs.test_1096,test_1089,test_1173,test_1097,test_1099).test_1173: 12 pass.scripts/check_test_coverage.py: OK.#874 stays open:
add_fault's split is still to be guarded, and findings 5 and 6(b, c) of the #1165 review are still open.Underworld development team with AI support from Claude Code