Repository navigation
Facet-surface slip restores onto the label's facets over all ranks (#1103) - #1109
Conversation
…1103) A slip boundary with no registered analytic surface restores its vertices onto a facet surface built from the rank's own facets of the label. A vertex that slid past the end of its rank's facets was clamped there, so the moved mesh was 3e-2 to 5e-2 off serial at np 2 to 4, and a rank owning slip vertices of a label without any of its facets raised alone while the others waited (the natural np 5 partition of a 42-cell box hung). Each label's facets are now gathered over the ranks, so every rank restores onto the serial set; the usable labels are then the same everywhere too. Test: unit boxes with the plane surfaces removed, against serial to 1e-10: 2D at np 2-5, a random scatter at np 3 and 4, 3D at np 2 and 3. All 8 fail before the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1109 review (fix for #1103): facet-surface slip restores onto the label's facets over all ranksVerdict: NOT READY at a62c720. The fix does what #1103 asked: the crash and hang are gone, and box facet slip now matches serial to rounding. But the PR and the test docstring claim the gathered set is "the serial set" on "any partition", and that is measured false on a stock mesh, BoxInternalBoundary(simplex=True). A partition seam lying on an internal label becomes a "boundary facet", so parallel slips vertices that serial pins (2.3e-2 off serial). This is pre-existing (#1106 gives the same 2.3e-2), but it sits in the lines this PR changes, and a small change fixes it (F1). Scope: a62c720 against bc9d67c only. Check 1: crash and hang (box2d cs 0.25, 42 cells, plane surfaces deleted)
Check 2: facet slip against serial (max |x_np − x_serial|; serial move 7.2e-2)
Check 3: collectives and cost
Check 4: restore correctness
Check 5: the new test
The test discriminates well. Its only gap is F1: it has no case with an internal label, so Check 6: regressions, branch against #1106 (each from its own git-archive copy)
There are no regressions. The np 4 branch run has 4 warnings against #1106's 3. All of them are numpy "Mean of empty slice" (discretisation_mesh.py:6655 and numpy internals), outside this diff. FindingsF1 (medium, blocks the stated claim): the gathered set is not the serial set when a partition seam lies on a label.
F2 (low): the test has no internal-label case. Add BoxInternalBoundary(simplex=True), cs 0.2, at np 4 (natural) and np 4 with a scatter. Both fail at a62c720 with 2.28e-2. F3 (low, note only): restore cost is O(m_local × N_label_facets). It is negligible at 23k cells (0.26 s of 18.5 s), and no rank is slower than serial. A note in the docstring would do, or a KD-tree on facet centroids later. F4 (low, text): the commit message and PR body say "every rank restores onto the serial set". Qualify that after F1, or make it true by fixing F1. Merge conditions
With F1 handled, I would mark this READY. The crash and hang fix, the box, curved, disjoint-label and 3D agreement, the collective structure and the test's sensitivity are all good. Underworld development team with AI support from Claude Code |
…review) smoothing._boundary_facets finds a rank's boundary facets as those in one local cell, so a facet between two ranks' cells counted as a boundary facet on both. On BoxInternalBoundary (2D, simplex) a seam along "Internal" gave that internal surface facets serial lacks, and its vertices slid where serial pins them: 2.0e-2 off serial at np 2 and 4, natural and scattered. A true boundary facet is held by one rank only; a seam facet by the two beside it. Mesh._drop_seam_facets keeps the facets whose vertex coordinates (the same bytes on every rank) occur on one rank only; it runs on every rank, including one with no cells. test_1103: BoxInternalBoundary at np 2 and 4 and a random scatter at np 4, against serial to 1e-10; all three fail without this (0.0204). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verdict: NOT READY at de797ca. F1 is fixed (measured, details below). But the seam test drops true boundary facets on split-node fault meshes, and it does so silently. That is new in de797ca, and a one-line change fixes it (N1). #1109 re-check at de797ca (fix for #1103): partition-seam facetsRe-check by H1 (review and parallel test runs on a 96-thread Linux workstation, Intel Xeon Gold 6240R, AVX-512; MPICH). Scope.
Method.
Probes.
1. F1 fixed: BoxInternalBoundary(simplex=True), cs 0.2, facet slip against serialSerial move is 4.95e-2. Values are max |x_np − x_serial|.
2. Is the seam test right?What it does [read].
Measured against two independent truths.
Moved and deformed meshes.
N1 (new, medium-low; introduced by de797ca): coincident replica facets of split-node faults are dropped.
3. Collectives
Measured, no hang:
H5's first version, skipping empty ranks (mutant
4. The first review's results still hold (branch at de797ca against serial)
5. The tests
The new cases discriminate F1 exactly, and the old mutants are all still caught. The test has no split-fault case (N1). 6. Cost (23k cells, np 4, natural partition)
7. Regressions, branch against base (each from its own git-archive copy)
Findings
Merge conditions
With N1 handled, I would mark this READY. F1, the collective structure, the 3D path, the cost and the regressions are all good. Underworld development team with AI support from Claude Code |
…iew N1) _drop_seam_facets keyed facets by their vertices' coordinates. A split fault's Plus and Minus replicas coincide by design, so their keys were equal and both were dropped, even on one rank: with FltPlus and FltMinus as explicit slip surfaces, 26 vertices slip in serial and none did in parallel. A seam facet is now one shared through the point star forest (a leaf here, or a root with leaves elsewhere), found from the facet's mesh point; the identity is the point, not its coordinates. Test: test_1103_split_fault_slip_parallel (serial and the parallel batches): a box with a split fault, FltPlus/FltMinus as slip surfaces, the number of vertices that slip equals serial's 26. de797ca gives 0 at np 2 and 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verdict: NOT READY at 64ca14e. N1 is fixed in 2-D (measured below). In 3-D, though, the new seam test drops nothing at all, because it uses #1109 re-check of N1 at 64ca14eRe-check by H1 (review and parallel test runs on a 96-thread Linux workstation, Intel Xeon Gold 6240R, AVX-512; MPICH). The scope is N1 and what the new code changes. Build and method.
The change [read].
1. N1 (split-fault replicas): fixed
The new test, test_1103_split_fault_slip_parallel:
The test pins N1. 2. The seam test against the truths: right in 2-D, a no-op in 3-D (new defect, N4)
The two truths agree with each other on every layout. Cause, measured directly. On box3d, Effect (N4): F1 is back on 3-D internal boundaries. BoxInternalBoundary 3-D, simplex, cs 0.25, facet slip, 5 outer iterations; serial move 4.1e-2. Values are max |x_np − x_serial|.
Fix direction, measured with
Test gap. test_1103 has no 3-D internal-boundary case. A BoxInternalBoundary 3-D (simplex) case at np 2 with a scatter (rand7 np 2 gives 1.2e-2 at 64ca14e) would pin N4. N3 (pre-existing, outside this PR). With a correct seam test (de797ca, or
3. Collectives
Measured, all complete with no hang:
test_1082
test_0052 (collective-guard scan) passes. 4. F1 in 2-D: still fixedBoxInternalBoundary 2-D, cs 0.2; serial move 4.95e-2.
5. N2: moot
6. Tests and regressions (64ca14e against base ba68af0)
Cost (23k cells, np 4): 0.79 ms (2-D) and 5.4 ms (3-D) per call. The 3-D figure is with the defect, i.e. nothing dropped. It is negligible next to Findings
Merge conditions
With those, I would mark this READY. N3 should be filed as its own issue. Underworld development team with AI support from Claude Code |
…iew N4) getJoin walks one level up the DAG, so the three vertices of a tet facet have no common edge and joined to nothing: in 3-D no seam facet was dropped, and on a 3-D BoxInternalBoundary "Internal" gained seam facets and its vertices slid where serial pins them (1.2e-2 off serial at np 2). getFullJoin walks up to the facet. Test: test_1103 gains a 3-D BoxInternalBoundary case on a random scatter at np 2; 0.0125 off serial before this, matching after. Underworld development team with AI support from Claude Code
|
Verdict: READY at c3e1cd2. N4 is fixed. The 3-D kept set now matches both truths on all 32 layouts I ran, the N4 part of the 3-D internal-boundary error is gone, and the new test case catches the old behaviour. #1109 re-check of N4 at c3e1cd2Re-check by H1 (review and parallel test runs on a 96-thread Linux workstation, Intel Xeon Gold 6240R, AVX-512; MPICH). The scope is N4 and the new test case. What changed.
Method.
1. 3-D seam test against the truthsThe two truths are: the facet point is not shared in the point SF (found with
2. 3-D BoxInternalBoundary moves against serialFacet slip, 5 outer iterations; serial move 4.1e-2. Values are max |x_np − x_serial|.
3. The new case and the test files
4. 2-D spot checks (getFullJoin on edges)
5. Collective scan, coverage, attribution
Findings
There are no new findings. Underworld development team with AI support from Claude Code |
CI runs the parallel shard at np 2 without --full-parallel, so after the serial driver stopped launching four ranks, the np 4 seam layouts (where #1109's 3-D defect showed) ran nowhere in CI. This file now runs at np 4 in the parallel shard on every run. np 5 is run locally only. Underworld development team with AI support from Claude Code
Fixes #1103. #1106, which this built on, is merged, and development is merged in. Round 1 of the review by H1 (review and parallel test runs on a 96-thread Linux workstation) is answered below (F1); the re-check is in progress.
What and why
A slip boundary with no registered analytic surface restores its vertices onto a
facetBoundingSurface: the nearest point on the label's boundary facets. Each rank built that surface from its own facets of the label only. This had two effects:argmin of an empty sequencealone, while the others waited. The natural np 5 partition of a 42-cell box hung.The facets of each label are now gathered over the ranks (one allgather per label per
boundary_slipcall), so every rank restores onto the serial set. The usable labels are then the same on every rank too, as the collective normal projection needs.Cost: the gathered facets are the label's boundary facets, a surface-sized array, sent once per mover outer iteration.
Partition-seam facets (review F1). A rank finds its boundary facets as those in one local cell, so a facet between two ranks' cells counted as a boundary facet on both. On
BoxInternalBoundarya seam alongInternalgave that internal surface facets serial lacks, and its vertices slid where serial pins them: 2.0e-2 off serial at np 2 and 4.A true boundary facet is held by one rank only, and a seam facet by the two beside it. So the gathered facets keep only those whose vertex coordinates occur on one rank. This runs on every rank, a rank with no cells included. Every rank then restores onto the serial set.
Which facets are seam facets (review N1). A seam facet is one shared through the point star forest: a leaf on this rank, or a root with leaves on another. It is found from the facet's mesh point.
An earlier commit keyed facets by their vertices' coordinates. A split fault's Plus and Minus replicas coincide by design, so their keys were equal and both were dropped, even on one rank. With FltPlus and FltMinus as explicit slip surfaces, 26 vertices slip in serial and none did in parallel.
Of the two fixes measured in review, I took the point-SF test over de-duplicating the coordinate keys per rank. Coordinates are the wrong identity on a mesh with coincident replicas by design, and the SF test is about as short.
Tests
tests/test_1103_facet_slip_matches_serial.pyuses unit boxes with the registered plane surfaces removed, run serially and in parallel through the MPI supervisor and compared vertex by vertex to 1e-10:BoxInternalBoundaryat np 2 and 4, and a random scatter at np 4: all three fail without F1 (0.0204).tests/parallel/test_1103_split_fault_slip_parallel.py(serial and the parallel batches): a box with a split fault, FltPlus and FltMinus as slip surfaces. The number of vertices that slip must equal serial's 26. With coordinate keys it is 0 at np 2 and 3; with the SF test it is 26 at np 1 to 5.The original 8 fail without the fix (np 5 by the hang); all 11 pass with it.
Regressions: the 16 serial test files that touch slip or bounding surfaces (including test_1082, test_1086 and test_1103) gave 179 passed. The parallel ones, with test_1082's parallel file, pass at np 2 and 4.
test_0052(the collective-guard scan) passes.check_test_coverage: OK.Checklist
level_2/tier_bmarkers (S8)mesh.X.coords(S7)Underworld development team with AI support from Claude Code