You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/amr_action_plan.md
+246Lines changed: 246 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8110,6 +8110,252 @@ residual halves -> ~2-2.5x, at or below AMReX's 3.40x on its own protocol. Floor
8110
8110
already at parity (per-cell arithmetic 0.96x uniform at cap 64) — everything above 1.0x is
8111
8111
infrastructure, and every line of it is now attributed.
8112
8112
8113
+
## 2026-09-12 (150) — FIVE LEADS FROM THE CODE REVIEW, EACH TAKEN TO A VERDICT: case-optimization is −12.4 %, the reflux bridge moved 75x its payload, and three of the six items are corrections to my own measurements
8114
+
8115
+
Every number below was re-derived by me from the logs or the binary; the reviewers found them, I did not take
8116
+
them on trust. Pin `a6dd813c` throughout. Deck: WENO1 rung deck (per GOAL v8's split this is statement-1
8117
+
territory only; nothing here is an AMReX comparison).
8118
+
8119
+
## 0. FIRST, A RETRACTION: the np8/np16 census was profiler-contaminated
8120
+
8121
+
`census_rank0.sbatch` attaches `rocprof-sys-sample` to **rank 0 only**. I did that deliberately, because
8122
+
profiling every rank crashed three of four arms with an OpenMP offload `reportMemoryAccessError`
8123
+
(job 416081; job 416093 proved the same arms are clean unprofiled). But a sampler on one rank of a
8124
+
bulk-synchronous code makes that rank the straggler, and every wait row then measures it:
8125
+
8126
+
| np8, 140-step arm | rank 0 | other 7 ranks | |
8127
+
|---|---|---|---|
8128
+
| `[phase-rank] rhs` | 362.6 s | 273.4 s | **1.33x slower** |
8129
+
| `[phase-rank] reflux` | 1.4 s | 70.0 s | **0.02x -- waits for nobody** |
8130
+
| `[mpiwait] reflux` min | 0.000 | mean 59.2 | rank 0 |
8131
+
| `[mpiwait] TOTAL` min | 142.0 | mean 256.6 | rank 0 |
8132
+
8133
+
And the total MPI wait is CONSERVED across the doubling -- 2040.7 -> 1998.4 ms/step (0.98x). Reflux's
8134
+
-255 ms is b:halo's +172 ms. **Nothing was growing; skew relocated.** That also explains a tension I had
8135
+
flagged but not resolved: this pair's differenced wall was FLAT (5779 -> 5669 ms/step, 0.98x) against
8136
+
ledger 128's 1.23x/doubling on the same deck. It was flat because the profiled rank set the pace at both rungs.
8137
+
8138
+
**WITHDRAWN from ledger 149's follow-up reporting:** "the base-grid halo is the growth term" (from this
8139
+
dataset), reflux's 0.58x drop, and every per-row wait value.
8140
+
**SURVIVES:** the budget still closes (99.3 / 99.1 % of wall, residual < 1 %), and any row with no MPI and
8141
+
low imbalance is untouched -- which is exactly where the two best leads landed.
`rs:wave` is the level>=2 flux-register wire and `rs:rfp` is the level>=2 Berger-Colella apply -- **both are
8306
+
reflux**. Only `rs:rest` is restriction. So **190.6 of 462.4 ms/step (41.2 %) of a phase named `restr` is
8307
+
reflux cost**, and AMR's true reflux total is the `reflux` row plus these two.
8308
+
8309
+
Growth across the doubling: `rs:wave` **1.22x** (the only grower in the family), `rs:rest` 0.87x, `rs:rfp` 0.98x.
8310
+
8311
+
## 5. The stale comment -- VERIFIED and FIXED
8312
+
8313
+
`m_phase_timing.fpp:144-146` claimed `rs:wave` was "the deleted standalone freg wave (**0** since the faces
8314
+
ride the restrict-parent wave)". `s_amr_freg_wave` is called unconditionally off the subcycle path
8315
+
(`m_time_steppers.fpp:859`) and differences to 114.1 ms/step at np8, 139.1 at np16 -- a quarter of `restr`
8316
+
and the fastest-growing row in the family. **Landed as `b2be4951`** (comment only, +9/-3, precheck green).
8317
+
8318
+
## 6. A correction to ledger 149 that the review surfaced
8319
+
8320
+
Ledger 149 concluded "the store host round trip is a startup ramp, 0.80 ms/step". That is right for the
8321
+
bracket I looked at and wrong as a generalisation:
8322
+
8323
+
| bracket | np8 differenced | np16 | what it is |
8324
+
|---|---|---|---|
8325
+
| `rb:slot` | **-0.1 ms/step** | +0.5 | rebuild-path slot alloc -- ramp, as ledger 149 said |
8326
+
| **`mg:slot`** | **144.3 ms/step** | **166.2** | **migration-path store growth -- LIVE steady state** |
8327
+
8328
+
4 bracket entries over 100 steps = 2 migration events, so **~7.2 s per migration**. Same routine
8329
+
(`s_amr_st_reserve`), different caller (`m_amr_regrid.fpp:2517-2522`). Mechanism is the one ledger 149
8330
+
already characterised: a store column is 0.103 GiB, the host fallback fires when
8331
+
`oldcap * col_bytes > amr_grow_dev_bytes` (4 GiB) i.e. `oldcap > ~38`, and the real `oldcap` is ~110-130 --
8332
+
so **every** growth on this deck takes the full PCIe round trip. At 144.3 ms/step this is **2.5 % of wall
8333
+
and the largest single item found anywhere in gather or regrid ON THIS DECK.**
8334
+
8335
+
**Bounded afterwards, and the superlative does not travel.** On the primary WENO5 deck the same row differences
8336
+
to **6.6 ms/step**, 22x smaller. The rung deck regrids into a much churnier box population, so `mg:slot` is a
8337
+
property of that deck's regrid behaviour and not a standing AMR cost. "The largest single AMR item" was my
8338
+
phrasing and it is withdrawn; the measurement itself stands for the deck it was taken on. This is the same
8339
+
error as section 6's own subject -- a bracket-local number promoted to a general claim -- committed twice in
8340
+
one ledger.
8341
+
8342
+
## Conclusion
8343
+
8344
+
Two of the three leads survived contact with the evidence, one in a weaker form than advertised:
8345
+
8346
+
- **Lead 1's mechanism is confirmed and is the most interesting thing here** -- the hot Riemann kernel spills
8347
+
60 doubles per thread, which explains probe C's entire counter profile -- but `--case-optimization` is a
8348
+
partial fix (43 %), not the fix, and its timing value is now an open measurement rather than an estimate.
8349
+
- **Lead 2 is the most actionable**: a verified 75x-oversized memory round trip, on a row that is provably
8350
+
free of the profiler confound, with the fix already patterned in the same file, bit-identical.
8351
+
- **Lead 3 is not a win, it is a retraction**: the prior experiment was void, so the question is open, not closed.
8352
+
- Both defects are real; one is fixed.
8353
+
- And the review caught a real over-generalisation of mine (section 6), which is the larger of the two
8354
+
memory-traffic items.
8355
+
8356
+
The through-line: **three of the six items here are corrections to measurements, not new optimisations.**
8357
+
The instrument has been the bottleneck more often than the code.
8358
+
8113
8359
## 2026-09-12 (151) — STATEMENT 2 RE-READ CASE-OPTIMIZED: 1.71x AMReX, AND THE EXCESS IS ROBUST TO BUILD CONFIGURATION (a prediction of this campaign's own goal, falsified)
8114
8360
8115
8361
**Why.** GOAL v10 made case-optimized the primary build configuration after ledger 150 measured `--case-optimization`
0 commit comments