Repository navigation
The add-on partition's copy of a moved level keeps that level's as-built record - #1276
Conversation
…ilt record Stage 2 of the coarse levels, H5's point 1 (#1091 case 2a). The partition redistributes each level onto new ranks and wraps it as a new Mesh, which recorded the coordinates it was given as where it was made. For a level that had moved, the copy then stood where it was made in its own record, while the same level on one rank (no partition) is read where it was made: the transfers of the pair differed between np 1 and np > 1. A level that moved since it was made now carries its transfer geometry and as-built vertices through redistribute_by_assignment, beside its reference; the copy takes them as its own record (_moved_since_built True). The flag is checked equal on every rank before it rides. _carried_reference returns every field after the coordinates it checks the order on. tests/parallel/test_1173: the moved base's partition copy holds the base's as-built vertices and transfer geometry, equal to the reference it carries. Not run here (no MPI); H5 checks last_parent_rows at np 1 to 3. Underworld development team with AI support from Claude Code
|
Adversarial review, round 1 (head 56e435f)
Findings: 1 (medium, above), to be settled by the reviewer's run. Issue state:
Underworld development team with AI support from Claude Code |
|
Parallel check of 56e435f, run by H5 (a debugging session) on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH). The branch is behind development, so only its own diff ( Verdict: the change does what it says, and in parallel it brings the unrepaired counts to the serial ones (case 2a). One change needed: test_1173 (the PR's version).
test_1111's moved child. Build notes after the solve, with
The #1206 fixture. Neighbours. At np 2 and 3: the parallel test_1120, test_0874_provenance_and_parent_collective and test_1096, 29 passed each. The serial test_1120 gives 8 passed. Low, not this PR. At np 3 with an empty rank, test_1173 hangs on development and on the PR alike. A helper in Underworld development team with AI support from Claude Code |
…ree on an empty rank H5's np 2 and 3 run of #1276: the unrepaired fault-copy counts in parallel now equal serial (7, 8, 11 at the first three moved cases; development 1, 8, 4), so case 2a's repair difference is gone, and test_1111's np > 1 "merged == 0" (the old parallel side of case 2a) fails, as expected. It now asserts unrepaired == the serial count at every case, measured serially here (7, 8, 11, 14, 13, 28). The merged count still differs (H5: 2 against 4 serially at (0, 0.005); 17 against 19 at np 3 at (0, 0.01)): stated in the test as open, not asserted. fault_fixtures.parents_contain_centroids and children_per_parent took their widths from the arrays; on a rank with no cell reshape(0, -1) raised there alone, and test_1173 hung at np 3 with an empty rank (H5, on development and on this branch). The widths now come from the mesh, the same on every rank, and every rank reaches the star forest and the allreduce. Underworld development team with AI support from Claude Code
|
Re-check of fc9d4c2, by H5 (a debugging session) on the same 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH). Verdict: passes. One thing to do before the merge: development now conflicts with this branch in Method. The branch was merged with current development (86c8c85) in a scratch worktree, the conflict was resolved as described below, and the result was run as a Python overlay on a fresh build of development. 1. test_1111, all six cases. Build notes after the solve, unrepaired fault copies (merged unknowns in brackets), on level 2:
2. test_1173 at np 3 with an empty rank (a test-only shell partition of every gmsh mesh that leaves the last rank with no cells): 7 passed, with no hang. At np 2 and 3 without an empty rank, 7 passed. The conflict with development (#1247). Both changes touch the end of the level loop in There is also one point to change while resolving. The new Underworld development team with AI support from Claude Code |
The conflict in addon_partition.py, at the end of _partition_addon_body's level loop, is resolved as H5's re-check of fc9d4c2 gives it: this branch's `rest = ...` block, with #1247's agree() before the _carried_reference call, as development has it. The moved_here check uses agreed_allgather, so a rank-local failure earlier in the level loop is agreed rather than leaving the other ranks in a bare allgather. Underworld development team with AI support from Claude Code
|
Merged development into this branch: b5d2aa7 (parents fc9d4c2, 66fd34c). The conflict in Serial runs on the merge (macOS, 12-core Apple M4): the 11 test files that use the add-on partition, including test_1111, test_1173, test_0874 and the collective-guard scan test_0052: 126 passed. Underworld development team with AI support from Claude Code |
|
Confirmed: merge b5d2aa7 resolves the conflict as described. Underworld development team with AI support from Claude Code |
In parallel, the add-on partition's copy of a level that has moved now keeps that level's own record of where it was made. A pair's transfers are then the same at np 1 and np > 1. This is the first standalone piece of stage 2 of moving coarse levels with the fine mesh (#1091 case 2a; H5's point 1).
This is a parallel change written without a parallel run. We do not run MPI on the machine it was written on, so its first runs at np 2 and 3 are the reviewer's.
What changes
On development.
addon_partition.partition_addonredistributes each level and wraps the result as a new Mesh (_moved_wrap). The new Mesh records the coordinates it was given as where it was made._moved_since_builtwas False, andfault_mg.as_built_nodesreturned None.Now.
redistribute_by_assignment, beside the reference it already carried._moved_since_built = True), as the level holds them on one rank._carried_referencestill checks the vertex order on the carried coordinates._record_as_builtdocstring says which is which.Tolerances and coordinate matches
Tests
tests/parallel/test_1173_addon_record_after_a_move_parallel.py, the moved-base partition test, gains three assertions for each of its three movers:Not run here. For the reviewer, at np 2 and 3:
fault_mg.last_parent_rowsis identical at np 1, 2 and 3 on the Split-level transfer: the recorded parent's rows where a fault copy has no fine image (#1120) #1206 fixture.Serial runs (macOS, 12-core Apple M4): test_1120, 1173, 1176 and 1240, 56 passed. The partition is skipped on one rank, so this checks only that the serial route is untouched.
After the reviewer's np 2 and 3 run (H5)
merged == 0was the old parallel side of case 2a. It now asserts that unrepaired equals the serial count at every moved case, measured serially: 7, 8, 11, 14, 13 and 28. The last three are not yet measured in parallel.fault_fixtures.parents_contain_centroidstook its widths from arrays, which a rank with no cell cannot reshape. The widths now come from the mesh, so every rank reaches the star forest and the allreduce.children_per_parentgets the same guard.Review
Adversarial review, below.
Issue state
#1091: case 2a's as-built record, by this branch. The issue stays open for the rest of stage 2.
Underworld development team with AI support from Claude Code