Repository navigation
The add-on record of a moved mesh is read where the mesh was made (#1091) - #1094
Conversation
) A move (mesh.deform, the smoothing and MMPDE movers) writes the finest level's coordinates and leaves the levels below where they were built. addon_partition located each fine cell's parent at its moved centroid: at np >= 2 the partition refused wherever that parent was on another rank ("N fine cell(s) have no local parent cell on the level below"), and recorded a wrong parent where it was local. The provenance transfer weighted a moved node in its unmoved parent. - Mesh keeps the vertex coordinates it had before its first move (_as_built_vertices, taken in _deform_mesh; none on a periodic mesh). - fault_mg.reference_vertices(mesh, below) returns the geometry a mesh is read on against the level below it; _parent_cells_local and provenance_transfer_parallel use it. - The partition carries the reference with each level it moves, vertex by vertex (redistribute_by_assignment(vertex_fields=...), which now returns five values), and checks the order it arrives in. - inherit_provenance takes the vertices of a cut, placed or split mesh back through its host's cells (_addon_reference, held with the level it is valid against), from a host with no record as well, so a cut child that takes a moved mesh's place is partitioned on the right parents when a second fault is added. tests/test_1173 holds the parents, the transfer at degree 1 and 2, the cut child and the child of a host with no record in serial; the parallel file holds the partition, the reference riding the move and a placed, split and solved ribbon on a moved base. Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
…the move undone The weights of such a node are kept inside its parent, moved or not, so the assertion on them could not fail. The parallel file reads the reference from the mesh, so that it imports on development and fails there on the refusal. Underworld development team with AI support from Claude Code
…ests - Mesh.add_fault replaces each add-on level under an adapt child by its split copy; the child's reference named the level replaced and was no longer read, so the next fault's partition took 1,411 of 2,506 parents where the cells had moved to. The reference now passes to the copy. - test_1173 holds that case, and the case of a mesh that keeps the moved one as its level below (the rule that a reference serves one level only had no test: 938 of 1,516 parents wrong without it). - The parallel test asserts the parents before it reads the reference, so that it fails on the behaviour on a build without the fix. - _holds_cell_coordinates is one helper for the periodic check; _addon_reference is initialised with the mesh and read plainly. - The design note no longer lists a case the code handles. Underworld development team with AI support from Claude Code
Adversarial review, round 1 (before the first commit)Serial probes on the built change; statements about np > 1 are traces. Probes:
Checked and found sound: never-moved box and annulus keep no record; a base moved twice keeps its first record (0 parents changed); 3-D box refinement 1 moved 0.06, eight children a parent, max change of the degree-2 transfer 3.3e-15 (255 of 2,960 parents would change located where they stand); a variable added after the move; both callers of Underworld development team with AI support from Claude Code |
Adversarial review, round 2 (head b2e4422)Serial probes; statements about np > 1 are traces. Probes:
Checked and found sound, on a moved host with no record (parents against the located truth): Not attacked: After 82a769e (serial): test_1173 8 passed; each new test fails under its mutant; the fault, placement, custom-MG, adapt and deform files 269 passed, 7 skipped. Underworld development team with AI support from Claude Code |
The solve's iteration and slip bounds were serial values. Measured on the moved base at np 2, 3, 4 and 5: 19 to 20 pressure iterations, 3 velocity iterations an application, peak slip 0.159472 at every rank count. The pressure bound is 24 (four iterations for another host's PETSc build), the velocity bound 4, and the slip is held to 5e-5 of the measured value. Underworld development team with AI support from Claude Code
… move (#1091) At more than one rank the MMPDE mover and the Laplacian smoother write the coordinate vector of the DM for their halo exchange before they call _deform_mesh. The record of the built grid was taken at that call, so under both movers it was a grid already moved: wrong parents after the smoother, weights off the nested set after MMPDE. Mesh._record_as_built takes the record at construction (before a reload's coordinate stamp) and wherever the mesh is given another DM, and _deform_mesh marks the mesh moved. reference_vertices returns the record only for a marked mesh. The cost is one copy of the vertex coordinates per mesh. partition_addon checks, collectively, that the reference it carries is held on every rank with one row per vertex. Tests: a serial case that writes the DM coordinates before the move (fails on the previous head, 0.0417 against 0.0), the record under node_redistribution and smooth_mesh_interior, and a reloaded mesh. The parallel file runs its two cases under mesh.deform, node_redistribution and smooth_mesh_interior, and adds a second fault on a moved adapt child. The parallel cases have not been run; the mover baselines are serial measurements. A periodic mesh still keeps no record. Underworld development team with AI support from Claude Code
… every recorded level is read The case now follows the reviewer's probe of it: an adapt child with two add-on levels, moved by mesh.deform, takes two faults through Mesh.add_fault. The first fault's reference has to sit on a level of its own tail, the second has to place, and on every level that records its parents each cell lies inside the parent recorded for it, in the geometry the level was made in. With the hand-over to the split copy removed the second fault refuses 96 cells at np 2. Not run in parallel here. In serial the partition records nothing, and the body runs as far as that assertion. Underworld development team with AI support from Claude Code
Adversarial review, round 3: the record taken at construction (797e28e, 9a39ce6)Reviewed in serial, before the push, on the working tree that became 797e28e; 9a39ce6 on top changes one parallel test and no library code. Nothing here was run at more than one rank; every statement about parallel behaviour is from reading, or from a serial probe with the movers' halo path forced. No high or medium finding. Eight low ones:
What held, run in serial:
Issue verdicts, on reading and serial probes:
Underworld development team with AI support from Claude Code |
…reference The second add_fault points the finest level's reference at the split copy of the level under it, while its recorded parents are still addressed on that level as the partition left it. The loop asked for the reference against the level the parents name, got none, fell back to the moved centroids and counted 1,466 cells outside their parents at np 2 to 5. It now takes the geometry from the level's own reference, whichever of the two objects it names, and asserts that the second mesh's reference names a level of its tail. Underworld development team with AI support from Claude Code
PR #1094 (#1091 fix): parallel measurements on hyperion (H1, 2026-11-12)Builds: How the runs were made:
What the numbers are:
1. test_1173Parallel test
Test 2 calls
Serial test
2. repro_min, refinement 2 (
|
| case | np | branch | development f8c6014 |
|---|---|---|---|
| rotate 3 | 2 | PLACED (2100 cells) | REFUSED, 30 cells |
| rotate 3 | 4 | PLACED (2100 cells) | REFUSED, 60 cells |
| mmpde 20 | 2 | FAILED in the carve ("cavity reached the domain wall") | not run |
| mmpde 20 | 4 | PLACED (2072 cells) | not run |
- The DIAG line in repro_min measures the old located-at-current-coordinates route, not the branch's. Under the 3° rotation it reports 1448 of 1984 fine centroids outside their true parent: no_local 30 and wrong_local 1418 at np 2, and no_local 60 and wrong_local 1388 at np 4. Development refuses exactly these no_local counts; the branch places.
- mmpde 20 at np 2 fails in the carve, not in the partition. Item 4 has more on this.
3. K1's small case at np 4
The driver is fault_small_1094.sh, a copy of H1's fault_small_h1w.sh pointed at the build.
Columns:
- "dev+fix" is development f8c6014 run through
fix_wrapper.py, the numbering-parent patch. - "vel" and "pres" are KSP iterations summed over the nonlinear iterations of each step.
- "N" is the nonlinear iteration count, written as total (Picard+Newton).
- The step a fault is placed and the base moved is shown as "placed, moved".
There were no partition refusals ("no local parent") in any driver run, on either build.
Refinement 3, -uw_mmpde_every 2 -uw_steps 8
Each build was run twice. Logs: br3_np4, br3_np4_r2, dfix3_np4, dfix3_np4_r2.
| step | branch run 1 | branch run 2 | dev+fix run 1 | dev+fix run 2 |
|---|---|---|---|---|
| 0 | placed; N 4 (3+1); vel 22; pres 54; vrms 150.553 | identical | identical | identical |
| 1 | placed, moved; N 4; vel 15; pres 52; vrms 212.147; slip 726.24 | identical (2e-14) | identical | identical |
| 2 | placed; N 4 (3+1); vel 17; pres 49; vrms 217.64; slip 702.33 | FAILED: assembly area (old fault kept); N 3; vel 13; pres 29; vrms 322.28; slip 1561.8 | FAILED: assembly area; N 3; vel 13; pres 29; vrms 322.28; slip 1561.8 | FAILED: assembly area; same |
| 3 | placed, moved; N 4; vel 13; pres 53; vrms 242.01; slip 847.4 | placed, moved; N 4; vel 18; pres 57; vrms 246.50; slip 847.2 | placed, moved; N 4; vel 18; pres 57; vrms 246.50; slip 847.2 | placed, moved; N 4; vel 18; pres 56; vrms 246.47; slip 846.6 |
| 4 | placed; N 6 (3+3); vel 22; pres 65; vrms 270.00; slip 889.1 | placed; N 5; vel 21; pres 61; vrms 271.95; slip 957.4 | placed; N 5; vel 21; pres 62; vrms 271.85; slip 955.5 | placed; N 5; vel 22; pres 60; vrms 271.61; slip 954.7 |
| 5 | placed, moved; N 6; vel 23; pres 64; vrms 302.33; slip 1124.1 | moved, no new fault; N 2; vel 14; pres 22; vrms 358.40; slip 1466.7 | moved, no new fault; N 2; vel 13; pres 23; vrms 357.17; slip 1460.9 | moved, no new fault; N 3; vel 17; pres 29; vrms 357.17; slip 1463.2 |
| 6 | placed; N 8 (6+2); vel 27; pres 116; vrms 362.75; slip 1447.5 | placed; N 7; vel 22; pres 90; vrms 357.31; slip 1372.1 | placed; N 7; vel 22; pres 99; vrms 353.28; slip 1346.8 | placed; N 7; vel 24; pres 97; vrms 353.55; slip 1343.4 |
| 7 | placed, moved; N 4; vel 24; pres 43; vrms 450.28; slip 1912.4 | moved, no new fault; N 3; vel 17; pres 27; vrms 438.95; slip 1778.4 | moved, no new fault; N 3; vel 17; pres 27; vrms 434.37; slip 1750.3 | moved, no new fault; N 2; vel 13; pres 22; vrms 434.31; slip 1745.8 |
| total, steps 2–7 | N 32; vel 126; pres 390 | N 24; vel 105; pres 286 | N 24; vel 104; pres 297 | N 25; vel 107; pres 293 |
- "moved, no new fault" means the driver's detection kept the fault in place ("no slab top reaching the cap"). It is not a refusal.
- The step 2 failure is the same in all three runs that hit it:
place_thin_volume assembly failed: RuntimeError: the ribbon assembly meshed to area 6.283405877065e-03 against CAD 6.283.- It is not the partition record.
- It happens on both builds and does not repeat reliably on the branch (1 of 2 runs placed).
- It was not seen on 93e66ee with the fix (H1's fix8_np4).
- On the same trajectory (branch run 2 against the two dev+fix runs), the per-step iterations agree within the run-to-run spread of dev+fix itself:
- vel 105 against 104 and 107; pres 286 against 297 and 293.
- vrms and slip agree to 0.4–2.0 %.
- Branch run 1 placed at step 2 and so followed a different trajectory. Its iterations cannot be compared step by step.
Refinement 4, -uw_mmpde_every 2 -uw_steps 6
Each build was run once.
| step | branch | dev+fix |
|---|---|---|
| 0 | placed; N 5 (4+1); vel 33; pres 73; vrms 167.940 | identical |
| 1 | placed, moved; N 4 (3+1); vel 18; pres 52; vrms 221.663; slip 656.56 | identical (6e-15) |
| 2 | placed; N 4 (2+2); vel 23; pres 44; vrms 207.290; slip 558.53 | placed; N 3 (2+1); vel 20; pres 34; vrms 207.331; slip 559.02 |
| 3 | placed, moved; N 5 (3+2); vel 24; pres 51; vrms 211.510; slip 550.46 | placed, moved; N 5 (3+2); vel 20; pres 50; vrms 211.694; slip 551.27 |
| 4 | placed; N 5 (3+2); vel 22; pres 50; vrms 214.913; slip 576.05 | placed; N 4 (2+2); vel 18; pres 46; vrms 214.959; slip 580.84 |
| 5 | placed, moved; N 5 (3+2); vel 22; pres 65; vrms 219.254; slip 612.27 | placed, moved; N 4 (2+2); vel 19; pres 56; vrms 219.533; slip 612.52 |
| total, steps 2–5 | N 19; vel 91; pres 210 | N 16; vel 77; pres 186 |
- Every step places on both builds.
- vrms agrees to within 1.3e-3 and slip to within 8e-3.
- The branch takes more iterations: 3 more nonlinear iterations in total, vel +18 % and pres +13 %.
- Per nonlinear iteration they are the same: vel 4.8 and 4.8; pres 11.1 on the branch against 11.6.
- This is a single run each. Run-to-run spread at np 4 (refinement 3 above) is ±3 vel and ±10 pres over 6 steps.
4. MMPDE amplitude 20 and 40, refinement 2, on the branch
repro_min_depth.py is repro_min with a depth=D option; the trace starts at A = [r_o − D, 0].
| amp | start depth | np 2 | np 3 | np 4 |
|---|---|---|---|---|
| 20 | 0.30 | FAILED: carve ("cavity reached the domain wall") | FAILED: carve | PLACED (2072) |
| 20 | 0.40 | FAILED: carve | FAILED: carve | FAILED: carve |
| 40 | 0.30 | FAILED: carve | FAILED: carve | FAILED: carve |
| 40 | 0.40 | FAILED: carve | FAILED: carve | FAILED: carve |
These are extra probes I added, beyond the brief (amplitude 20 unless marked none):
| case | np 1 | np 2 |
|---|---|---|
| none, depth 0.30 | not run | PLACED (2104) |
| none, depth 0.35 | not run | PLACED (2114) |
| none, depth 0.40 | not run | PLACED (2096) |
| mmpde 20, depth 0.30 | PLACED (2068) | FAILED: carve (table above) |
| mmpde 20, depth 0.35 | FAILED: carve | PLACED (2068) |
| mmpde 20, depth 0.40 | FAILED: carve | FAILED: carve |
- There are no partition refusals anywhere in item 4. Every failure is the carve's clearance refusal.
- The 0.40 start does not place. This goes against the expectation, at every np and amplitude, and also in serial at amplitude 20.
- Without a move, the trace places at 0.30, 0.35 and 0.40. So the refusal follows from where the mover puts the nodes, not from the trace alone.
- Whether it places varies with np and depth and follows no order:
- at 0.30 it places at np 1 and 4 and refuses at np 2 and 3;
- at 0.35 it places at np 2 and refuses at np 1.
- This fits W1's reading that the refusal is the clearance limit and not a parallel defect: serial refuses too.
- The trace is 0.4 deep from its start. Starting it at 0.40 moves its end from about 0.35 to about 0.25 from the inner wall. That is my geometric estimate, not a measurement. The message does not say which wall the cavity reached, so a deeper start is not a clean "more clearance" probe.
5. tests/parallel test_1096, test_1132, test_1172
| test | np | branch | development |
|---|---|---|---|
| test_1096_addon_partition_parallel | 2 | 3 passed | 3 passed |
| test_1096_addon_partition_parallel | 4 | 3 passed | 3 passed |
| test_1132_addon_partition_static_mark_parallel | 2 | 1 passed | 1 passed |
| test_1132_addon_partition_static_mark_parallel | 4 | 1 passed | 1 passed |
| test_1172_moved_refined_mesh_solves_on_moved_geometry_parallel | 2 | 13 passed, 2 skipped | 13 passed, 2 skipped |
| test_1172_moved_refined_mesh_solves_on_moved_geometry_parallel | 4 | 13 passed, 2 skipped | 13 passed, 2 skipped |
In test_1172, the 2 skips on both builds are "geometric multigrid needs a hierarchy".
Verdict
- Fault placement refuses a moved base in parallel: the add-on partition locates each cell's parent at its moved centroid #1091 is fixed in parallel on what was measured.
- The branch passes the parallel test_1173 at np 2, 3, 4 and 5, and with the Zen kernels. units_moved is between 98 and 593 at every np.
- Development refuses at every np, 61–134 cells.
- The serial test_1173 passes 8/8 on the branch and fails 8/8 on development.
- repro_min rotate 3 places at np 2 and 4, where development refuses 30 and 60 cells.
- No driver run on the branch refused in the partition.
- The iteration and slip bounds hold at np 2–5, with pres 19–20 against ≤ 22, vel 3, and slip 0.159472. The pressure margin is only 2–3 iterations, so W1 may want ≤ 23 or ≤ 24 for the CI host. The np 2 run with the Zen kernels gave pres 19.
- W1's claim that the as-built transfer is "no worse in iterations" than the numbering patch:
- Refinement 3: no worse. On the shared trajectory the counts agree within dev+fix's own run-to-run spread.
- Refinement 4, single run: the branch took 3 more nonlinear iterations over 4 steps, with vel +18 % and pres +13 % in total. Per nonlinear iteration it is equal.
- Neither result shows a gain from the nested transfer in iterations.
- Two failures remain, and neither is the partition record:
- An intermittent ribbon assembly area failure at the first placement after a move. It occurred at refinement 3, np 4, step 2, on both builds: 1 of 2 runs on the branch, 2 of 2 on dev+fix.
- The carve's clearance refusal under MMPDE amplitude 20–40. It also occurs in serial, does not order with np or depth, and is not cured by starting the trace at 0.40.
Underworld development team with AI support from Claude Code
PR #1094 (#1091): adversarial cross-review, round 3, at 82a769e (hyperion)NOT READY at 82a769e. At np > 1 the as-built record is stale under both movers that #1091 names. Under the Laplacian smoother the parents are as wrong as on development (51 of 2,592). Under MMPDE the parents are right, but the transfer of the moved pair is not the nested one. The Everything below was measured unless it is marked [read]. Branch: Findings by severity1. HIGH: the Laplacian smoother at np > 1 leaves #1091 unfixed (silent wrong parents)Cause. Measured (
So the record equals the moved grid, and the branch behaves exactly like development. The solve still converged (vel 3, pres 16), so no refusal flags it. 2. HIGH: the MMPDE mover at np > 1 leaves a stale record, and the moved pair's transfer is not nestedCause. Measured with
Measured with
What this means:
So the cost today is a wrong MG transfer with no measured iteration penalty. I did not test whether a larger first step, or anisotropic cells, would let parents flip. Why no test catches it. The tests move only by 3. MEDIUM: round 2's fix has no parallel guardMutants were run as monkeypatches from
The dropped check is a guard, so no test is expected to see it go. I confirmed it is live and collective: rows permuted on rank 1 ( 4. LOW / [read]: consistency of the new collectivesThe new collectives are:
Each is gated on Two rank-local paths could still raise before a collective and hang the other ranks [read, not reproduced]:
Suggestion: make the vertex-field gate an Scenarios (branch against base)
The record is stale in every MMPDE run of (f) (finding 2), even though the parents are right. Staleness attacks (np 2 unless stated, box, ribbon)All of these placed, with the base pair at k // 4 mismatch 0 and 0 cells outside at the reference centroid:
Moving the adapt child by one fine cell raises velocity iterations to 10–13 against 2 unmoved. That is the same in serial (10), where the partition does not run, so it comes from the move and not from this PR. Development refuses that case (66 cells). Not run:
Other observations (pre-existing, out of scope)
Merge conditions
Underworld development team with AI support from Claude Code |
PR #1094 at 9e6712f: first parallel runs of the new bounds (test_1173)9e6712f changes only the parallel test's bounds (pressure ≤ 24, velocity ≤ 4, slip within 5e-5 of 0.159472). I ran it on the 82a769e build, since the library is unchanged, with the test file taken from 9e6712f. Both tests pass on every rank at np 2, 3, 4 and 5:
These are identical to the 82a769e runs. Logs: Underworld development team with AI support from Claude Code |
PR #1094 (#1091): round 3 runs at 9a39ce6 (hyperion)NOT READY at 9a39ce6. The fix in 797e28e works at every np I ran. The new parallel test fails at np 2, 3, 4 and 5 in case (c), Everything below was measured unless it is marked [read].
Files, all under
Findings by severity1. HIGH (blocks merge): case (c) of the parallel test fails at every np, and the cause is the testWhat fails.
How this produces the failure:
The parents themselves are right.
So the test asserts something the library never promised: a reference for the split child against Partition dependence.
What the transfer actually uses [read]:
A third fault ( Remedy for W1 (test-side). Read each recorded level where its reference exists. Either:
Then re-run at np 2–5. If W1 wants the library invariant "a recorded level has its reference against 2. MEDIUM: as it stands, the r2 mutant cannot be told apart from the unmutated code in the parallel test
Under r2 at np 2:
So the test does see the mutant, but at a different line than without it. Unmutated, case (c) also fails (finding 1). Once finding 1 is fixed, line 142 will be the parallel guard for round 2 that merge condition 3 asked for. 3. Resolved: the as-built record is the built grid under both movers (merge condition 1)
Under MMPDE the moved pair now has 24,498 weights, the same as 4. Resolved: the new mover cases catch a lazy record (merge condition 2)The lazy mutant (
It reproduces 82a769e. Parallel test_1173 under lazy at np 2: 5 failed, 2 passed. Only the two
Serial test_1173 under lazy: 1 failed, 11 passed. The failure is Note that iterations do not flag the lazy record. Under lazy, node_redistribution still gives 20 / 3, slip 0.159525. The weights assertion is the guard. 5. Resolved [read]: the collective gate on vertex_fields (merge condition 4)
This turns H1's paths (i) ( One condition remains: every rank must run the same 6. LOW [read]: leftovers of the rework
test_1173 parallel: per case per np (9a39ce6)T1 is T1 (partition)Each cell gives units_moved; parents with ≠ 4 children; outside at the current centroid; outside at the reference centroid. "Max move" is the test's first
T2 (solve)Each cell gives units_moved (placement, split); pres / vel; slip. The moved-pair count was 1 (level 2) in every run. Every pair had 0 weights off the nested set: 24,498 weights for deform and node_redistribution, 31,554 for the smoother, at max distance 1.07–1.42e-14.
(c)
Serial Mutants
repro_min (refinement 2, 9a39ce6)
These are the same as 82a769e in K1's small case, np 4 (driver 31c7e08 plus the uncommitted hook, as before)Refinement 3,
|
| step | 9a39ce6 run 1 (b3_np4) |
82a769e run 1 (br3_np4) |
|---|---|---|
| 0 | placed; N 4 (3+1); vel 22; pres 54; vrms 150.553 | identical |
| 1 | placed, moved; N 4; vel 15; pres 52; vrms 212.147; slip 726.24 | identical (1e-14) |
| 2 | placed; N 4; vel 17; pres 49; vrms 217.637; slip 702.33 | identical (6e-13) |
| 3 | placed, moved; N 4; vel 13; pres 53; vrms 241.962; slip 846.25 | vrms 242.011 (−2e-4), slip 847.36 |
| 4 | placed; N 5 (3+2); vel 24; pres 59; vrms 269.881; slip 890.91 | N 6; vel 22; pres 65; vrms 270.00; slip 889.10 |
| 5 | moved, no new fault ("no slab top reaching the cap"); N 2; vel 14; pres 23; vrms 342.80; slip 1300.75 | placed, moved; N 6; vel 23; pres 64; vrms 302.33 |
| 6 | placed; N 8 (6+2); vel 24; pres 112; vrms 347.85; slip 1331.17 | N 8; vel 27; pres 116; vrms 362.75 |
| 7 | placed, moved; N 7 (5+2); vel 28; pres 98; vrms 397.06; slip 1459.55 | N 4; vel 24; pres 43; vrms 450.28 |
| total, steps 2–7 | N 30; vel 120; pres 394 | N 32; vel 126; pres 390 |
- This run took 82a769e run 1's trajectory: it placed at step 2, where 82a769e run 2 and both dev+fix runs failed on assembly area.
- It is bit-identical through step 2 and drifts from step 3 (2e-4). At step 5 the detection keeps the fault in place, so the two runs follow different trajectories after that.
- Totals are within 6 % on vel and 1 % on pres.
Repeat at 9a39ce6 (b3_np4_r2, run once H1 raised the core limit).
- It placed at every step and had no refusals.
- Through step 6 it is identical to 82a769e run 1, to the 4 decimals printed: vrms 362.7465, slip 1447.49, N 8, vel 27, pres 116.
- At step 7 the detection kept the fault in place: N 2; vel 14; pres 22; vrms 449.85; slip 1908.31.
- So the two 9a39ce6 runs split at step 3 (2e-4), as 82a769e's two runs did. That is run-to-run nondeterminism at np 4, not a difference between builds.
Refinement 4, -uw_mmpde_every 2 -uw_steps 6
There were no partition refusals and no assembly failures. Each build was run once.
| step | 9a39ce6 (b4_np4) |
82a769e (br4_np4) |
dev+fix (dfix4_np4) |
|---|---|---|---|
| 0 | placed; N 5 (4+1); vel 33; pres 73; vrms 167.940 | identical | identical |
| 1 | placed, moved; N 4 (3+1); vel 18; pres 52; vrms 221.663; slip 656.56 | identical | identical |
| 2 | placed; N 3 (2+1); vel 20; pres 34; vrms 207.331; slip 559.02 | N 4 (2+2); vel 23; pres 44; vrms 207.290; slip 558.53 | identical to 9a39ce6 |
| 3 | placed, moved; N 5 (3+2); vel 20; pres 50; vrms 211.694; slip 551.27 | N 5; vel 24; pres 51; vrms 211.510 | identical |
| 4 | placed; N 4 (2+2); vel 18; pres 48; vrms 214.882; slip 579.76 | N 5; vel 22; pres 50; vrms 214.913 | N 4; vel 18; pres 46; vrms 214.959; slip 580.84 |
| 5 | placed, moved; N 4 (2+2); vel 18; pres 56; vrms 219.616; slip 613.48 | N 5; vel 22; pres 65; vrms 219.254 | N 4; vel 19; pres 56; vrms 219.533 |
| total, steps 2–5 | N 16; vel 76; pres 188 | N 19; vel 91; pres 210 | N 16; vel 77; pres 186 |
- 82a769e took 3 more nonlinear iterations here, with vel +18 % and pres +13 %. That excess is gone at 9a39ce6.
- Through step 3, 9a39ce6 follows dev+fix to the printed digits, and from step 2 it differs from 82a769e.
- This fits the stale MMPDE record at 82a769e (H1 round 3, finding 2) costing iterations at refinement 4. That is my inference from one run per build; I did not trace it.
Merge conditions
- Fix case (c) of the parallel test (finding 1). Read each recorded level where it has a reference to
_addon_below: the placed meshsecond.parent, or the first ancestor whose reference matches. Then run it at np 2–5. Expectastray > 0fromsecond.parent(1,466 at current centroids) and 0 at the reference centroid. - Re-run r2 on the fixed test at np 2. Case (c) must then fail at line 142 only under r2, and pass without it.
- Nothing else blocks:
- The construction-time record holds at np 2–5 under deform, node_redistribution and smooth_mesh_interior.
- The mover cases catch the lazy record.
- The vertex_fields gate is collective [read].
- repro_min behaves as at 82a769e.
- K1's case places at every step at refinement 3 and 4, and at refinement 4 it is back to dev+fix's iteration counts.
- Optional:
- Note in the test or the code that a split child's
_addon_belownames a level that is no longer in the hierarchy. - Drop the duplicate
cKDTreeimport.
- Note in the test or the code that a split child's
Underworld development team with AI support from Claude Code
PR #1094 at a176f94: READYa176f94 changes only
Mover cases (pres/vel, slip), unchanged from 9a39ce6 and within the bounds:
On how case (c) reads the parents: W1's reading is right. The addresses in Logs: Underworld development team with AI support from Claude Code |
What was wrong (#1091)
In parallel the fault routes (
Mesh.add_fault,place_fault_ribbon_2dwithseams="gather",FaultNetwork.build) start withaddon_partition.partition_addon, which records each finest cell's parent on the level below and moves the fault's cells onto one rank. A move of the mesh (mesh.deform, the smoothing and MMPDE movers) writes the finest level's coordinates and leaves every level below where it was built. The partition located each parent at the cell's moved centroid:provenance_transfer_parallelthen weighted each moved node in a parent that never moved.On an annulus refined four times, the MMPDE mover took 10,342 of 40,448 cells into the cell of another parent. A rigid rotation by 3 degrees is enough at refinement 2.
The record has two readers: the partition's unit grouping, and the provenance transfer, which
CustomMGHierarchy.buildturns into the multigrid interpolation, the Galerkin coarse operators and the FAC patch rows. A wrong record costs iterations or convergence. No field is transferred through it.The fix
The relation is read in the geometry the mesh was made in.
mesh._as_built_vertices, taken byMesh._record_as_builtwhen the mesh is constructed and wherever it is given another DM), and_deform_meshmarks it moved. The record is read only for a marked mesh; an unmarked one takes the old path. See "When the record is taken" below._parent_cells_locallocates the centroids of those vertices.provenance_transfer_paralleltakes each node back before it weights it: its barycentric coordinates in its own cell as the cell stands, applied to the cell's as-built vertices. The transfer of a moved pair is the transfer it had unmoved.redistribute_by_assignment(vertex_fields=...)). The carried current coordinates are compared with the moved level's own; a mismatch is a collective error.mesh._addon_reference = (level, vertices)byinherit_provenanceand is read against that level object only (fault_mg.reference_vertices(mesh, below)). The key is the level because the routes differ: a cut or split child takes the host's place over the unmoved level below, where the reference applies; a placed mesh keeps the host's finest level, which is in the moved frame, as its own level below, where current coordinates are right. WhereMesh.add_faultreplaces an add-on level under an adapt child by its split copy, the reference passes to the copy, which stands where the level stood.partition=False, or a partition that moved nothing) passes the geometry on too, against the level under it in its own hierarchy. Without this the first fault on a moved base was sound and the second, partitioned through the first one's child, recorded wrong parents (655 of 1,464 in the review's probe).redistribute_by_assignmentnow returns five values; its other caller (meshing/extrude.py) is updated.When the record is taken
Up to 9e6712f the record was taken at the first
_deform_mesh. The review of that head found that at more than one rank both movers write the coordinate vector of the DM for their halo exchange before they call_deform_mesh(the Laplacian smoother insmoothing/api.py, the MMPDE mover's_halo_sync), so the record was a grid already moved, in whole under the smoother and in part under MMPDE. At np 2 the smoother left 51 of 2,592 parents wrong, and the transfer of a mesh moved by MMPDE was weighted off the nested set. The route throughmesh.deform, which the tests of that head drove, was sound.From 797e28e the record is taken at construction. We chose this over a hook in each mover and over a scratch vector in the halo exchanges:
A mesh reloaded with its refinement hierarchy is recorded before its saved coordinates are stamped on. A mesh built over a DM that had already moved (the partition's copy of a level, a cut) records the coordinates it was given and reaches the level below through
_addon_reference, as before.partition_addonnow checks collectively that the reference it carries is held on every rank with one row per vertex; no route in the library produces the state it refuses.Why coordinates and not the refinement's numbering
The parent of a regularly refined cell can also be read from its number (
k // 2^dim), with no coordinates. It was run as a patch on hyperion and it places at np 1, 2 and 4. We did not take it:adapthave no such numbering, and reach the level below through positions in any case;Tests
tests/test_1173_addon_record_after_a_move.py(serial, tier B, twelve cases). On development: 635 of 1,440 parents wrong; the transfer of the moved pair differs from the unmoved one by 0.90 (degree 1) and 1.125 (degree 2); a cut child's shared nodes are off by 0.046. The vertices a cut adds are held to the move undone (measured 9.7e-5 for a move of 0.04, bound 2e-4). The cut child of a moved mesh with no record, moved again or not, is partitioned on the parents of the host cells it lies in; with the oldinherit_provenanceboth cases fail. A placed surface that keeps the moved mesh as its level below is read where it stands (938 of 1,516 parents wrong if the reference is read for any level). An adapt child with two add-on levels, moved and then cut, keeps its parents on the split copy of the level below (1,411 of 2,506 wrong if the reference stays with the level replaced; 8 are cut cells that straddle two parents).Added at 797e28e: a case that writes the DM coordinates by hand before
_deform_mesh, as the movers' halo exchanges do (on 9e6712f the record is off the built grid by 0.0417, the whole move); the record and the parents undernode_redistributionandsmooth_mesh_interior; and the record of a reloaded mesh. A serial mover makes no early write, so the two mover cases guard the record and the mark under the real movers and cannot fail on the defect itself; the hand-written case and the parallel file carry that.tests/parallel/test_1173_addon_record_after_a_move_parallel.py(np >= 2, tier B): the partition of a moved base moves units; the reference rides the move (every vertex is its reference position plus the analytic shift, to 1e-12); every parent has four children and holds each child where it was made; a ribbon placed and split on the moved base solves with the nested weights on the pair the partition separated.At 797e28e both cases run under
mesh.deform,node_redistribution(the MMPDE mover) andsmooth_mesh_interior, each asserting that the record is the built grid on every rank (difference 0.0), four children per parent and nested weights. A third case (9a39ce6) puts two faults throughMesh.add_faulton an adapt child with two add-on levels, moved bymesh.deform: the first fault's reference sits on a level of its own tail, the second places, and on every level that records its parents each cell lies inside the recorded parent in the geometry the level was made in. With the hand-over to the split copy removed, the second fault refuses 96 cells at np 2 (the reviewer's probe of this case; the probe passes at np 2 and 4 on 9e6712f). None of the seven cases at this head has been run in parallel. The baselines of the two mover cases are serial measurements (19 and 15 pressure iterations, slip 0.159522 and 0.159507, bound +5 iterations); whether the mover's grid, and so these numbers, changes with the rank count is not known and is to be set from the first parallel run.Serial, at 797e28e:
tests/test_1173_addon_record_after_a_move.py12 passed;-m "level_1 and tier_a"1,485 passed, 59 skipped; the fault, placement, custom-MG, adapt, deform and checkpoint-reload test files 192 passed, 8 skipped, 0 failed. The two suites ran before the last edits to this commit, which were comments, the refusal's message, test baselines, and the position of the record call at the two DM replacements (remeshand the submesh re-extraction it calls, both mmg-only and not run here).Parallel, on hyperion at 82a769e, two heads back (this branch was written on a serial-only host; the runner posts its own record here). These runs move the mesh by
mesh.deformor precede the rework; they say nothing about 797e28e under the movers. Each case at a fixed rank count; the mover's result depends on the rank count, so nothing is compared against serial.tests/parallel/test_1173_addon_record_after_a_move_parallel.pypasses at np 2, 3, 4 and 5. On development every case fails with "no local parent" (61, 108, 134 and 133 cells). The serial file is 8 of 8 on the branch and 0 of 8 on development.The test's bounds are set from this table in 9e6712f (pressure <= 24, velocity <= 4, slip within 5e-5); that commit has not been run in parallel yet.
The issue's reproducer (
repro_min rotate 3 2) places at np 2 and 4. Development refuses 30 and 60 cells.The zg95 small case at np 4, against development with the numbering patch (
k // 4, see above). Neither refuses in the partition. Refinement 3, 8 steps: 105 velocity iterations against 104 and 107, 286 pressure iterations against 297 and 293. Refinement 4, 6 steps: every step places and vrms agrees to 1.3e-3; the branch's totals are 18 % more velocity and 13 % more pressure iterations, at equal counts per nonlinear iteration (velocity 4.8 on both, pressure 11.1 against 11.6). The as-built transfer is no worse per iteration than the numbering patch, and it gives no gain in iterations on this case. Those extra iterations came from the record taken at the first move, which the MMPDE mover had already written past: at 9a39ce6 the same case over steps 2 to 5 gives 16 nonlinear, 76 velocity and 188 pressure iterations against 16, 77 and 186 for the patched development.MMPDE amplitude 20 to 40: no refusal in the partition at any amplitude. The carve refuses at 0.30 and at 0.40 from the wall, in serial too at amplitude 20; see "Not covered". Starting the trace deeper moves its other end towards the inner wall, so the 0.40 case does not test more clearance.
tests/paralleltest_1096, test_1132, test_1172 at np 2 and 4: the same on the branch and on development.On the small case at refinement 3, the first placement after a move failed in 3 of 4 runs with "ribbon assembly meshed to area ... against CAD", once in two runs of this branch and in both runs of the patched development. That is the failure of Ladder outcrop cap: area mismatch or missing rung vertex when a rail point is within ~1e-7 of the wall #1090 and it occurs with and without this change.
Not reported yet, from the reviews: a first fault interior to one rank (no units moved) then a second across a seam; a ribbon then
add_fault; an adapt child with split levels then a second fault; a rank with no cells of the fault's region;_add_fault_sheetson a moved 3-D base; a moved annulus at np 4 and 8.At 9a39ce6 in parallel (np 2 to 5) the two-fault case failed in its own loop, not in the library: the loop asked for the finest level's geometry against the level its parents are addressed on, while the reference names the split copy that replaced that level, so it fell back to the moved centroids (1,466 cells outside). a176f94 reads the geometry from the level's own reference; it is a test-only commit and has not been run in parallel yet.
Not covered
Mesh.add_faultreplaces an add-on level by its split copy, the finest mesh's reference names the copy, and its recorded parents (_addon_parent,_addon_below) still name the level as the partition left it. The pair is consistent, and no transfer reads it: the split copy is not the level it names, so the next partition locates the parents again through the reference. Pointing_addon_belowat the copy without renumbering the parents onto the copy's cells would make that record wrong where it is now unused, so it is left as it is.TODO(BUG)infault_mg.reference_vertices._deform_meshhas run, not that the coordinates differ. A reload with a hierarchy, andephemeral_coords, set it on a mesh that stands where it was built; a cut or a placement on such a mesh then runs the search for a reference equal to its own vertices. This costs time and changes no answer (transfer equal to 6e-15 in the review's probe).remesh, the submesh re-extraction) is untested: both are reached through mmg only._deform_mesh, so its record is the grid the reload refined again. That is the right reference for the reload's own levels. Those levels are not snapped to a curved boundary the way the run's were, so on a curved refined base a restart's transfer differs from the run's.Issues
fixed-in-PR) for a base moved bymesh.deform: the serial tests, and the parallel test and the issue's reproducer at np 2 to 5, pass at 82a769e and fail on development. For a base moved by the MMPDE mover or the smoother the fix is 797e28e, shown in serial with the early write made by hand and not yet run in parallel. Left open in it: a moved periodic base.pull_vertex_ontomoves a domain-boundary vertexfixed-in-developmentalready; not in the change's path and not re-probed (parallel only).Underworld development team with AI support from Claude Code