Repository navigation
Branch on the mesh's isSimplex, agreed over ranks, not the rank-local dm.isSimplex() - #1189
Conversation
… dm.isSimplex() DMPlexIsSimplex returns False on a rank with no cells. adapt(engine='nvb') refused on `not dm.isSimplex()`, so an empty rank alone raised NotImplementedError while the others went on into marking_metric's collectives and hung. The constructor already reconciles the cell family over ranks into Mesh.isSimplex; the branching sites read it now: adapt's NVB refusal, the location capability (an empty rank took the cell-face audit while the others took "exact"), and five sites in visualisation.py. The Mesh(..., simplex=dm.isSimplex()) constructor calls are left: the constructor reconciles the family over ranks itself and uses the argument only when every rank is empty. tests/parallel/test_1185_adapt_nvb_rank_without_cells_parallel.py: a box of cell size 1 with two refinements leaves a rank empty at np 3 and 4; adapt(engine='nvb') hangs there before the change (supervisor exit 124) and completes after it. scripts/test.sh runs it at np 3 always (it skips at np 2, where no rank is empty). Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
|
Parallel review of #1189 at 81b21ba: READY. From H1 (review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)), on a build of the head. The change is seven sites,
The eight The PR's test (
The case that hung on development (the reproducer in the body): ptest_0864's vertical network, placed by
Neighbours: Not run: the serial NVB, locator and visualisation sets (the author's 66), and the visualisation sites themselves on an empty rank. Underworld development team with AI support from Claude Code |
No issue exists for this defect, so this body is the bug report. H1 (the parallel review desk) found it; its attempt to file an issue was refused by its permission check.
The defect.
DMPlexIsSimplexis rank-local: it returns False on a rank with no cells. Code that branched ondm.isSimplex()therefore took a different path on an empty rank.dm.isSimplex()per rank is [F,T,T,T,F,T,T,T]. Ranks 0 and 4 raise NotImplementedError insideFaultNetwork.build→_adapt_nested→adapt, at the NVB refusal. The other six hang inmarking_metric's collectives.adapt(engine='nvb')hangs (supervisor exit 124). Measured on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH).The fix. The mesh constructor already reconciles the cell family over ranks into
Mesh.isSimplex(discretisation_mesh.py, where it allgathers each populated rank'sdm.isSimplex()). The sites that branch on the family now read that:Mesh.adapt: the NVB refusal;Mesh._location_capability: an empty rank took the cell-face audit while the others took "exact";visualisation.py: five sites (the VTK cell types and the higher-order cell maps).Left as they are: the
Mesh(..., simplex=self.dm.isSimplex())constructor calls (eight indiscretisation_mesh.py). The constructor recomputes the family from every populated rank, and uses itssimplexargument only when every rank is empty, so a wrong value from an empty rank cannot reach a branch. There are no numerics changes.Test.
tests/parallel/test_1189_adapt_nvb_rank_without_cells_parallel.py, tier B:adapt(engine='nvb')on the box above, with a rank empty (asserted).scripts/test.shruns it at np 3 always, beside test_0786.H1 reviews in parallel.
Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8)maybe_/try_/do_) and no commented-out code (S3, S4).array/mesh.X.coords— nowith ....access(...), nomesh.data(S7)pixi.toml/pixi.lockor other dependency changes riding in an unrelated PRUnderworld development team with AI support from Claude Code