Repository navigation
Nested-transfer verdicts over all ranks; a repaired adapt keeps no parent map on any rank (#961, #807) - #970
Conversation
… pass keeps no parent map ptest_0844_reconnect hung at np 2 and 4: after adapt(engine="edge_split", repair=True) one rank kept a cell-parent map and another did not, and the ranks went down different transfer builders. Two causes: - The subsampler derived each retained span's parent map from the composed vertex transfer, whether or not a repair had flipped cells in the span. It kept the map wherever every local cell had a unique parent, which held on a rank whose flips happened not to straddle two coarse cells. The engine now records which passes a repair changed (n_flips is global), and no span through such a pass gets a map. - nvb.nested_cell_parents and nvb.nested_prolongation_from_dms returned None on a rank-local verdict; both callers then take a collective fallback. Their verdict is now reduced over all ranks. A rank that owns no fine vertices returns an empty transfer, so it does not veto the others. Tests: - test_0874 (serial): a repair that reports flips but moves nothing leaves no map; on development the subsampler derives one. The same adapt without repair keeps maps. - tests/parallel/test_0874: a transfer spoiled on rank 0 only gives None on every rank; a regular refinement's transfer and map are found; an empty rank returns an empty transfer. This new parallel file shifts the later MPI batches by one. Underworld development team with AI support from Claude Code
On the 0.2 box every rank owns vertices at np 2 and 4, so the empty-rank check never reached the branch it was for (hyperion's run). A box of two triangles leaves a rank with no cell at np 3 and more; the test asserts that premise there, and that every rank recovers the transfer. Underworld development team with AI support from Claude Code
getCoordinatesLocal is collective the first time a DM's coordinates are read. The new empty-rank return in _nested_prolongation_local came before the fine DM's read, so at np 3 and 4 the empty rank went on to the verdict's reduction while its peers waited in that read: PETSc error 98 and "Message truncated" at np 3, rc 142 at np 2 and 4 (hyperion, on b34c01c). Both vectors are now read first. With hyperion's overlay of this change the parallel file gave 2 passed at np 2, 3, 4 and 8. Underworld development team with AI support from Claude Code
…mpty-rank premise holds at np 2 From hyperion's review of df84634: - #961's second defect: four asserts in ptest_0844_reconnect checked a rank-local fact ahead of a collective (the chart in test_geometry_and_conformity_survive; the prolongation and both parent-map arms in test_adapt_with_repair_runs_in_parallel). A failure on one rank left the others waiting, and read as a hang. They now reduce the fact over all ranks first. Asserts with no collective after them are left as they were. - The two-triangle box leaves a rank with no cell already at np 2 (cells per rank [0, 2]), so the premise is asserted at every rank count and the comment says so. Underworld development team with AI support from Claude Code
Adversarial review of #970Verdict: mergeable once the PR text narrows what it closes. We found no defect in the fix at df84634. Its test of an empty rank did find one earlier, now fixed: at b34c01c the early return skipped a collective Findings
Attacks that failed
CI placementThe new file is index 33, in batch 5, so every later file shifts one place. Harmless: it adds seconds, and #963 was not caused by batch order. A flake in a later batch near this merge should still be read with that in mind. The serial file falls in the Issues
Merge conditions
Could not testAdapt with a rank that owns no cells (only the helpers were exercised on an empty rank, np 3); 3-D ( Status at aba71f0Reviewed at df84634. The PR's tip answers finding 1 (the asserts ahead of a collective in Underworld development team with AI support from Claude Code |
The nested-transfer helpers decide over all ranks, and an adapt that repaired cells keeps no cell-parent map on any rank (#961, #807).
The bug
ptest_0844_reconnect_parallel.py::test_adapt_with_repair_runs_in_parallelfailed on some ranks and not others, then hung, at np 2 and 4 (#961, #807). Aftermesh.adapt(engine="edge_split", repair=True), one rank kept a cell-parent map and another did not, and the ranks then went down different transfer builders. There were three causes:_subsample_mg_levelsderived each retained span's cell-parent map from the composed vertex transfer, whether or not a repair had flipped cells in the span.nvb.nested_cell_parentsreturnedNonewhen any local cell lacked a unique parent. So a rank whose flips happened not to straddle two coarse cells kept a map, and the others did not.nested_cell_parentsandnested_prolongation_from_dmsdecidedNoneon their own rank's cells. Both callers, the subsampler andcustom_mg(the any-degree transfer), then take a fallback that is collective.The change
n_flipsis a global count. No span through such a pass gets a cell-parent map._nested_prolongation_localreads both DMs' coordinates first, because the first read is collective. Hyperion found this in review, on the new empty-rank return.Tests
tests/test_0874_repair_drops_parent_maps.py(serial, tier B):tests/parallel/test_0874_nested_transfer_verdict_parallel.py(tier B), on hyperion:Noneon every rank. On development the ranks disagree:[True, False]at np 2 and[True, False, False, False]at np 4. On this branch it passes.[0, 2]already at np 2. On development this hangs (rc 124), and the CI supervisor fails the job. On this branch it passes.ptest_0844_reconnect_parallel.py, the whole file: 7 passed at np 2 and 4 on this branch, in 15 s and 9 s; on development it hung for 840 s. It is not yet in CI; #958 lists it as deferred, and it can move once this merges.The 59 serial files that use adapt, edge_split, custom_mg or add_fault give 501 passed and 4 skipped on this branch (macOS).
This new parallel file shifts the later MPI batches by one.
Issues
Hyperion's review follows as a comment.
Underworld development team with AI support from Claude Code