Repository navigation
The FAC cover gate takes a split fault level's patch up to 98 % of its rows (#918) - #932
Conversation
test_1017's NVB band hierarchy, with the band widened to half-width 0.3: the finest level's subdomain is 355 of 417 rows (85 %), over the 75 % gate, while 62 background rows lie outside it. On development the gate declines it. The uniform level (225 rows, all in the subdomain) must still decline, and both verdicts are to be recorded on the hierarchy (fac_gate). Underworld development team with AI support from Claude Code
The gate declined the finest level's patch when patch plus halo exceeded 75 % of the rows, and said nothing. A locally refined fault level crosses 75 % by size alone: UWTN 2026-022's linear fixture at h_b/S = 48 and 97 lost its patch and took 909 and 1487 velocity iterations against 66 with it. A uniform pair, which the gate exists to skip, has no row outside patch plus halo; those fault levels kept 24 % and 14 % outside. _fac_patch_split and _fac_patch_split_parallel now decline only when fewer than background_min (2 %) of the level's rows lie outside patch plus halo, from the global counts in parallel. The UW_FAC_COVER campaign knob is gone, and the zone paths pass background_min=0 where they passed cover_max=1.01. Each verdict is recorded on hierarchy.fac_gate (rows, patch+halo rows, taken), and set_custom_fmg(..., verbose=True) prints it. test_1134 runs in CI batch 4; the subsystem doc says how the gate decides. Underworld development team with AI support from Claude Code
…ne keeps the gate The review found that the background rule (decline under 2 % outside) takes 95-98 % patches on wide adapt children, an LU over nearly the whole level, unmeasured, and still declines a split level once its band is fine enough (the 909-iteration case returns past h_b/S of about 800 in 2-D). The measurements behind #918 were all on split levels. tests/parallel/test_1134: the linear fault on a 1/16 base at 160 rungs, whose split level's patch and halo are 85 % of its rows, must take its patch at any rank count; development declines it. tests/test_1134: the NVB band at 85 %, which has no split, now must decline, as on development, and both verdicts are recorded on fac_gate. The 2 % rule of cec822d takes the band, so this test fails on it. Underworld development team with AI support from Claude Code
…els keep the gate cec822d declined a patch only when under 2 % of the level lay outside patch plus halo. The review found two problems with that rule, measured serially: - a wide adapt child on the default route (no set_custom_fmg) now took patches of 94.7 % and 97.8 % of its rows, one LU block over nearly the whole level, where the old gate declined; - a split level still declines once its band is fine enough, because the background shrinks as the band refines (38, 24, 14 % at h_b/S 24, 48, 97). The measurements behind #918 were all on split levels, so the change is now made there only. A level that carries a split fault (fault_mg.is_split_level, the same on every rank) passes cover_max=None and takes its structural patch whatever its size; its rows are rows the coarse level cannot represent, and whole-level SOR does not converge them. Every other level keeps the 75 % gate (_FAC_COVER_MAX), exactly as on development. The zone paths pass None where they passed 1.01. UW_FAC_COVER stays removed. Also from the review: fac_gate holds None wherever the gate did not run (it held {} on two paths); its comment says it is the gate's verdict, before install drops a renumbered coarse level's patch; the comment on the zone path says the structural rows are added only under UW_FAC_STRUCTURAL (#921 is still open); test_1106's docstring no longer describes the 0.75 gate as current. The subsystem doc says what ships. Underworld development team with AI support from Claude Code
add_fault on a refined base keeps the base's coarse levels, so the split finest pair is a uniform refinement plus the cut and its patch and halo are the whole level (3896 of 3896 rows on fault_fixtures' base_2d). c8ecbf9 takes it, one LU over the entire level; development declines it, and whole-level SOR converges it (test_1095's serial baseline, 4 velocity iterations). The split level must decline when under 2 % of its rows lie outside patch and halo. Underworld development team with AI support from Claude Code
…rs keep 0.75 c8ecbf9 took a split level's patch at any size. The second review found the default add_fault / split_fault route on a refined base: the cut child keeps the base's coarse levels, its finest pair is a uniform refinement plus the cut, and its patch and halo are the whole level (3896/3896 rows in 2-D, 11035/11035 on test_1095's 3-D patch box). That level now got one LU over everything, where development declined it and whole-level SOR converged it in 4 velocity iterations. A level that carries a split fault now declines when under 2 % of its rows lie outside patch and halo (_FAC_COVER_MAX_SPLIT = 0.98): a placed fault level keeps 14-38 % outside at h_b/S 24-97 and takes its patch; a cut uniform pair declines, in parallel too where the rank-local halo can leave a few rows outside. Every other level keeps 0.75 (_FAC_COVER_MAX). CustomMGHierarchy._fac_cover_max(l) picks the threshold. The claim that whole-level SOR does not converge a split's rows is scoped to the placed band, 24-97 times finer than the coarse level. The doc says the rotated path drops every coarse patch after the gate records it, that only verbose=True prints the verdict, and that a band fine enough declines again (#895). set_custom_fmg documents verbose. Underworld development team with AI support from Claude Code
From the third review: - The welded add-on (an adapt child, then add_fault(split_levels=False)) is split over unsplit coarse levels and gets the 98 % gate. Its patch and halo grow with the metric's width (30 % at 0.08, 82 % at 0.6, 96 % at 1.0); taken, the 96 % case is one LU over 96 % of the level for 2 velocity iterations against 13 with whole-level SOR. The doc now names this route and its numbers; tests/parallel/test_1134 adds it, which with the cut pair at 100 % pins the split threshold between 0.963 and 1. - "Whole-level SOR does not converge" the placed band was too strong: the declined runs converged, in 909 and 1487 velocity iterations summed over 17 applications (about 53 and 87 each) against 66. - The cut pair's SOR count is cited from this 2-D base (8 iterations), with test_1095's 3-D patch box (4) beside it. - The decline limit is quoted per base (about h_b/S 200 on 1/16, 800 on 1/32, in 2-D), with the band's (h_b/S)^2 growth in 3-D. - verbose=True prints on either path; mesh-owned and auto-injected hierarchies do not. Serial builds gate every level the split runs on. - The tier marks sit on each test (Charter section 8); test_1106's docstring states the 98 % gate; a redundant import is gone. Underworld development team with AI support from Claude Code
Kaiju (Linux x86_64, PETSc 3.25.0) counts 356 patch+halo rows on the NVB band level where macOS arm64 counts 355; the level's 417 rows and the declined verdict agree. The test keeps those exact and accepts the recorded count of either host, as test_1106 does. Underworld development team with AI support from Claude Code
…k solver (#929) The cover gate's record (fac_gate) and the patch summary's reset sit side by side at build; test.sh's batch 4 carries test_1133 and test_1134. Underworld development team with AI support from Claude Code
The doc and test_1134's docstring cited test_1095 under "add_fault on a refined base". test_1095 cuts its 3-D patch box with split_fault; the mechanism is the same (a uniform pair plus the cut), so the case now names both. Underworld development team with AI support from Claude Code
Pre-PR adversarial reviewThree rounds by independent reviewers, each followed by fixes: round 1 on cec822d (the 2 % rule on every level, over 25d6281), round 2 on c8ecbf9, round 3 on e793bdf. Rounds 2 and 3 also covered #921, which is stacked on this branch. The reviewers' probes were serial; kaiju ran the parallel cases afterwards. Round 1 (cec822d: decline under 2 % background, every level)
Round 2 (c8ecbf9: split levels at any size, other levels 0.75)
Round 3 (e793bdf: 0.98 on split levels, 0.75 elsewhere)
faf80fe was reviewed through the final check of #921's branch, which merges it (d0590d2); that check found nothing in the repo. 00f0668 records the band level's count per host (356 on kaiju, 355 on macOS). bcf8955 merges development (#928, #929): Attacks that failed
Verified on kaiju (Linux)
Merge condition
Issues in this territory
Underworld development team with AI support from Claude Code |
There was a problem hiding this comment.
🔵 Needs a closer look
Louis's required acceptance of the solver policy using 0.98 for split levels and 0.75 elsewhere remains pending in the available PR and issue discussion.
No open issues 🎉
What changed in this PR
This PR addresses #918 by allowing larger FAC patches on split-fault multigrid levels while retaining the existing limit on unsplit levels. It implements a narrower rule than the issue’s proposal.
Changes:
- Raises the patch-plus-halo limit to 98% for split levels, keeps 75% elsewhere, and removes
UW_FAC_COVER. - Records per-level gate verdicts in
hierarchy.fac_gate, with printing enabled byverbose=True. - Adds serial and parallel regression coverage and documents the thresholds and affected hierarchy routes.
| File | Description |
|---|---|
tests/test_1134_fac_cover_gate_structure.py |
Tests rejection and recorded verdicts for unsplit band and uniform levels. |
tests/parallel/test_1134_fac_cover_gate_split_parallel.py |
Tests split-patch acceptance, cut-uniform rejection, and rank-consistent verdicts. |
tests/parallel/test_1106_fac_cover_partition_parallel.py |
Updates the docstring to describe the 98% split-level limit. |
src/underworld3/utilities/custom_mg.py |
Implements split-aware thresholds, verdict recording, and verbose reporting. |
scripts/test.sh |
Adds the new regression tests to serial batch 4. |
docs/developer/subsystems/fault-split-multigrid.md |
Documents gate behavior, measurements, and diagnostic access. |
Review effort: Balanced
One conflict in scripts/test.sh, adjacent batch-4 lines (test_1138 from #930, test_1134 from this branch); both kept. Underworld development team with AI support from Claude Code
CI's shard 4 timed out on this branch inside test_1097 (development's 3-D sheet on a partitioned adapt child): 2:21 on development, still running after 4:57 here. Serially, its split level's patch and halo are 84435 of 89520 rows (94 %). The 0.98 gate takes them: one 3-D LU, 463 s and 6.3 GB, against 35 s and 1.6 GB declined at 0.75. The 0.98 evidence is all 2-D. The test builds a small 3-D split box (test_1095's geometry, 2.4 s) and asserts its split level's threshold is 0.75. It fails here (0.98). Underworld development team with AI support from Claude Code
_fac_cover_max takes 0.98 only on a 2-D level that carries a split fault. On development's test_1097 (a 3-D sheet on a partitioned adapt child) the split level's patch and halo are 94 % of its rows. At 0.98 the gate took them: one 3-D LU over 84 435 rows, 463 s and 6.3 GB serially, against 35 s and 1.6 GB with whole-level SOR. In CI that pushed shard 4 past its 60 min cap. The 0.98 evidence (row 3, the welded and cut-pair cases) is all 2-D. - test_1134 (tests/parallel): a 3-D split box gets 0.75 (failed first, previous commit). - test_1097: its fault solve asserts that the split level declines and that its patch and halo sit above 0.75, so the 3-D gate cannot widen silently. This costs nothing extra: the test already solves that level. - fault-split-multigrid.md and the custom_mg comments state the 2-D scope. The 3-D threshold is a placeholder until the 3-D add-on is measured; that measurement decides between a different threshold and a bounded block (#895). Serial: test_1134 (both files) 6 passed. test_1097's solve is np >= 2 (CI). Underworld development team with AI support from Claude Code
Review addendum: the 0.98 gate regressed 3-D, fixed on this branchCI's shard 4 hit its 60-minute cap on all three stacked PRs. The log stopped inside development's test_1097, a 3-D sheet on a partitioned adapt child. That test took 2:21 on development and was still running after 4:57 here. We ran its fault solve serially on this branch's library at both thresholds. The split level's patch and halo are 84 435 of 89 520 rows (94 %):
Every measurement behind 0.98 is 2-D, so 0.98 now applies to 2-D split levels only. A 3-D split level keeps development's 0.75 (15340c0).
The 3-D threshold is a placeholder until the 3-D add-on is measured. That measurement decides between a different threshold and a bounded block (#895). The body's rule section and merge gate now say 2-D. #933 and #934 carry the fix (998ff4a, e4eee30). Underworld development team with AI support from Claude Code |
…fix/custom-mg-many-ranks Clean merge; 99 commits behind before it. Underworld development team with AI support from Claude Code
The FAC cover gate declined a level's patch when the patch plus its halo exceeded 75 % of the level's rows, and said nothing. The gate exists for uniform refinements, whose halo reaches every row. A placed split fault level crosses 75 % by size alone, yet keeps an untouched background outside its patch and halo: 38, 24 and 14 % of the rows at h_b/S = 24, 48 and 97 on UWTN 2026-022's linear fixture. Declined, the finest level falls back to whole-level SOR, which converges the band slowly: 909 and 1487 velocity iterations at h_b/S = 48 and 97, summed over 17 applications, against 66 with the patch.
The rule as shipped
CustomMGHierarchy._fac_cover_max(l)picks the threshold (_FAC_COVER_MAX,_FAC_COVER_MAX_SPLITincustom_mg). The split marker,fault_mg.is_split_level, is the same on every rank, and the parallel verdict comes from global counts.hierarchy.fac_gate: rows, patch and halo rows, taken.set_custom_fmg(..., verbose=True)prints it. The mesh-owned and auto-injected hierarchies do not print; their record is atsolver._custom_mg["hierarchy"].fac_gate. The FAC cover gate declines a large fault patch silently, and the velocity solve then takes 14-22 times the iterations #918 asked for the verdict to be logged either way; it is recorded on every route and printed only underverbose.UW_FAC_COVERis removed. A campaign driver that sets it now gets this rule without a message.fault-split-multigrid.mdgains "When a level takes the FAC patch", which names every route below.The rule is narrower than #918's proposal
#918 proposed taking the patch on every level whenever at least 2 % of its rows lie outside the patch and halo. Two routes that the issue's fixture never reached fail under that rule, so it ships on split levels only.
Merge gate: Louis accepts this narrowing (0.98 on 2-D split levels, 0.75 elsewhere, 3-D included) in place of the 2 % rule on every level.
mesh.adaptchild with a widened metric, on the default route with noset_custom_fmgcall, had its patch and halo at 94.7 % and 97.8 % of the finest level. The 2 % rule took both. In the first, the live LU block after PCASM's overlap held 99.6 % of the level's rows. The measurements behind The FAC cover gate declines a large fault patch silently, and the velocity solve then takes 14-22 times the iterations #918 were all on split levels, so a level without a split keeps 0.75. These adapt children are a library route, not the add-on's method; the tests keep them as a guard for that route.add_fault(2-D) orsplit_fault(3-D) on a refined base keeps the base's coarse levels. The finest pair is then a uniform refinement plus the cut, and its patch and halo are the whole level: 3896 of 3896 rows onfault_fixtures.base_2d, 11035 of 11035 on test_1095's 3-D patch box. Taking it is one LU over the whole level, where whole-level SOR converges it in 8 velocity iterations (2-D) and 4 (3-D). So a split level still declines above 98 %.The welded add-on (an adapt child, then
add_fault(split_levels=False)) is split over unsplit coarse levels and falls under 0.98 too. Its patch and halo grow with the metric's width: 30 % at 0.08, 82 % at 0.6, 96 % at 1.0. At 96 % it takes one LU block over 96 % of the level and converges in 2 velocity iterations, against 13 with the gate forced to decline (whole-level SOR). With the cut pair at 100 %, that pins the split threshold between 0.963 and 1.The background outside a placed band shrinks as the band refines, so a band fine enough declines again: by extrapolation near h_b/S = 200 on a 1/16 base and 800 on a 1/32 base, in 2-D. In 3-D the band's rows grow as (h_b/S)². Bounding the block instead of declining it is #895.
Row 3 of the add-on matrix
UWTN 2026-022's problem A: a unit box in simple shear with a straight frictionless fault, base h_b = 1/32, the band refined through the rung count. The hierarchy is the welded base, then the split S level with the FAC LU patch. Velocity iterations are summed over the second solve's applications (17 serially).
The development column ran on the laptop (macOS; development 25d6281 with #906, inert here). The branch column ran on kaiju (Linux): np 1 and 2 before the development merge, np 4 at bcf8955. On the laptop, with the gate forced open, the same solves took 66, 74 and 66.
Tests
tests/test_1134_fac_cover_gate_structure.py(level 2, tier B, serial batch 4) builds test_1017's NVB band hierarchy with the band widened to half-width 0.3.fac_gate. The test fails if a level without a split takes an 85 % patch, as under the 2 % rule.tests/parallel/test_1134_fac_cover_gate_split_parallel.py(level 2, tier B; np 1 in CI's serial phase, np 2 in the MPI phase):add_faultonbase_2d) declines above 98 %.On kaiju (Linux):
scripts/test.shgains two lines in serial batch 4. The branch carries development through #927 (26056a5); batch 4 keeps bothtests/test_1134*pyand #927'stests/test_1136*py.Closes #918. Left open in this territory: #895, #897, and #921 (the next PR in this stack); verdicts in the review comment.
Underworld development team with AI support from Claude Code