Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
2760da7
feat(sim): add active_box parameter and m_active_box skeleton (no beh…
sbryngelson Jun 28, 2026
f257117
fix(sim): export ab_ambient from m_active_box per documented interface
sbryngelson Jun 28, 2026
2078c55
feat(sim): detect ambient state and initialize active box from IC sup…
sbryngelson Jun 28, 2026
5891b94
feat(sim): grow active box by light-cone with single device-update ch…
sbryngelson Jun 28, 2026
19c06a2
feat(sim): restrict RK update and convert window to the active box
sbryngelson Jun 28, 2026
0beb6b1
feat(sim): restrict reconstruction and Riemann windows to the active box
sbryngelson Jun 28, 2026
c79c45b
feat(sim): add debug envelope tripwire for active-box under-growth
sbryngelson Jun 29, 2026
1896baa
fix(sim): active-box tripwire checks inner margin (outer layer is fro…
sbryngelson Jun 29, 2026
a72f6b5
test(sim): golden regression for active_box on a 3D shock case
sbryngelson Jun 29, 2026
1f37c90
test(sim): strengthen active_box golden so box stays a strict subset …
sbryngelson Jun 29, 2026
e1f7ad5
fix(sim): make active-box convert bounds device-resident (GPU present…
sbryngelson Jun 29, 2026
2bb5fdc
fix(sim): active-box final-review fixes (init ab_active, tighten gate…
sbryngelson Jun 29, 2026
bbf6b2a
feat(sim): add load_weight_wrt param and m_load_weight skeleton (no b…
sbryngelson Jun 29, 2026
e474a22
feat(sim): load_weight base + active-box contributor with field output
sbryngelson Jun 29, 2026
796f884
feat(sim): per-rank load-imbalance metric
sbryngelson Jun 29, 2026
fa1629b
feat(sim): bubble (EE/EL) load-weight contributors
sbryngelson Jun 29, 2026
e54c161
fix(sim): gate bubble load-weight contributions by the active box
sbryngelson Jun 29, 2026
7c2fb22
feat(sim): IB load-weight contributor
sbryngelson Jun 29, 2026
a12b5f5
feat(sim): phase-change Newton-iteration load-weight contributor
sbryngelson Jun 29, 2026
14b837c
fix(sim): load-weight metric on parallel_io path + EE reads q_cons (f…
sbryngelson Jun 29, 2026
0161fac
feat(sim): add sfc_partition params and m_sfc_partition skeleton (no …
sbryngelson Jun 29, 2026
5b30010
fix(sim): export m_sfc_partition state + guard partition_tile_size>=1
sbryngelson Jun 29, 2026
71b503d
feat(sim): aggregate per-cell load weight into global tile weights
sbryngelson Jun 29, 2026
0d2ac75
feat(sim): Morton space-filling-curve tile ordering
sbryngelson Jun 29, 2026
0ba87e2
feat(sim): chains-on-chains balanced contiguous SFC partition
sbryngelson Jun 29, 2026
f7617e8
feat(sim): report SFC-partition predicted imbalance + call wiring
sbryngelson Jun 29, 2026
2795e26
fix(sim): self-contained SFC report (current + predicted + gain)
sbryngelson Jun 29, 2026
6df9c1f
spike(sim): prove weighted re-decompose + re-read mechanism
sbryngelson Jun 30, 2026
5570a71
feat(sim): weighted-split function for load-balanced decomposition
sbryngelson Jun 30, 2026
8c01acb
feat(sim): global axis marginals from per-cell load weight
sbryngelson Jun 30, 2026
b992103
feat(sim): wire load_balance weighted decomposition (param, checks, o…
sbryngelson Jun 30, 2026
c00c8b2
feat(sim): minimal probe read for functional weighted decomposition
sbryngelson Jun 30, 2026
69227fe
fix(sim): load_balance min-cells floor only applies to axes split acr…
sbryngelson Jun 30, 2026
ffadfe0
fix(sim): conforming sizes_glb/loc assignment in probe; drop supersed…
sbryngelson Jun 30, 2026
c43c02a
fix(sim): scope num_procs_x/y/z to simulation (post_process build), a…
sbryngelson Jun 30, 2026
95398eb
feat(sim): rank_time_wrt param + m_rank_timing per-rank RHS-time diag…
sbryngelson Jun 30, 2026
adacca1
feat(sim): wire per-rank RHS-time diagnostic into stepper and data ou…
sbryngelson Jun 30, 2026
b637627
fix(sim): drop EE bubble load-weight term (calibration: K_bub*void ov…
sbryngelson Jun 30, 2026
f8cfe78
feat(sim): broaden rank-timing to include phase-change relaxation (t_…
sbryngelson Jun 30, 2026
cc7882d
fix(sim): rank-timing measures compute only (exclude halo exchange) +…
sbryngelson Jun 30, 2026
21c60ff
feat(sim): hybrid_weno + hybrid_weno_eps params and checks
sbryngelson Jun 30, 2026
99fd63e
feat(sim): WENO discontinuity sensor (density+pressure Jameson, stenc…
sbryngelson Jun 30, 2026
f94573c
feat(sim): hybrid WENO branch (linear-optimal in smooth cells) + sens…
sbryngelson Jun 30, 2026
0d1337e
fix(sim): allocate hybrid-WENO sensor scratch once (module-level weno…
sbryngelson Jun 30, 2026
33bd3aa
fix(sim): hybrid-WENO covers buffered domain (halo flagging) + PROHIB…
sbryngelson Jul 1, 2026
7efb010
feat(sim): hybrid_riemann + hybrid_smooth_flux params, defaults, and …
sbryngelson Jul 1, 2026
1ec23ae
feat(sim): generalize discontinuity sensor to velocity+volume-fractio…
sbryngelson Jul 1, 2026
08502db
feat(sim): hybrid_riemann cheap central/Rusanov flux in the 5-equatio…
sbryngelson Jul 1, 2026
9e484ac
feat(sim): hybrid_riemann cheap flux in the 6-equation HLLC block
sbryngelson Jul 1, 2026
5082b53
fix(sim): prohibit hybrid_riemann/hybrid_weno with non-WENO recon, we…
sbryngelson Jul 1, 2026
74b5877
feat(common): add m_box (t_box + partition arithmetic); relocate f_we…
sbryngelson Jul 1, 2026
f727133
refactor(common): s_mpi_decompose computes equal split via m_box (t_b…
sbryngelson Jul 1, 2026
ac2edef
test(sim): load_balance manual validation; document diagnostic gate
sbryngelson Jul 1, 2026
de24440
fix(common): explicit allocate for equal-split offsets (Intel noreall…
sbryngelson Jul 1, 2026
352f564
feat(sim): amr param + static-patch spec + SP1 gate (default off)
sbryngelson Jul 2, 2026
69f5c36
feat(sim): m_amr two-level static hierarchy (inert refined level-1); …
sbryngelson Jul 2, 2026
3bc4d4b
feat(sim): AMR conservative restriction + conservative-linear prolong…
sbryngelson Jul 2, 2026
66b209d
feat(sim): AMR fine-advance infrastructure (stage storage, globals sw…
sbryngelson Jul 2, 2026
ff1d75a
feat(sim): AMR no-subcycle two-level advance (per-stage coupling, end…
sbryngelson Jul 2, 2026
434eec1
feat(sim): AMR refluxing - per-stage flux registers close conservatio…
sbryngelson Jul 2, 2026
8269e79
refactor(sim): AMR region-based indexing + fixed max-size preallocati…
sbryngelson Jul 2, 2026
622b37b
feat(sim): AMR dynamic regrid - gradient tagging, padded bounding box…
sbryngelson Jul 2, 2026
e015a34
feat(sim): AMR subcycling groundwork - accumulating flux registers, s…
sbryngelson Jul 2, 2026
5f65b62
feat(sim): AMR subcycling - coarse at case dt, two dt/2 fine substeps…
sbryngelson Jul 2, 2026
8e1f8c3
fix(sim): prohibit amr + acoustic_source (dt-dependent RHS source, un…
sbryngelson Jul 2, 2026
247b2f3
feat(sim): AMR multi-rank owner model - containment, global-local ind…
sbryngelson Jul 2, 2026
725f50b
feat(sim): AMR multi-rank regrid - allreduced tag box, owner-window c…
sbryngelson Jul 2, 2026
2c1dd4e
refactor(sim): AMR copy-based coordinate swap (GPU-safe semantics, be…
sbryngelson Jul 2, 2026
2048cdb
feat(sim): AMR on GPU builds - device-resident fine fields, transfer-…
sbryngelson Jul 3, 2026
cc9719f
chore: AMR upstream hygiene - docs, python validation, message cleanu…
sbryngelson Jul 3, 2026
b203dc8
feat(sim): AMR GPU kernel-ported coupling (M2) - device-resident regi…
sbryngelson Jul 3, 2026
41530c4
feat(sim): AMR mirror-decomposed fine level (T1) - spanning patches, …
sbryngelson Jul 3, 2026
316c28b
feat(sim): AMR rank-local regrid under mirror decomposition (T2) - sp…
sbryngelson Jul 3, 2026
03b5951
feat(sim): AMR-weighted decomposition (SP7c) - fine-work-aware load_b…
sbryngelson Jul 3, 2026
a1a7e3a
Merge remote-tracking branch 'upstream/master' into up/mega
sbryngelson Jul 3, 2026
2b1e8a9
test(sim): AMR 3D validation - free-stream/blast/spanning/subcycle ga…
sbryngelson Jul 3, 2026
8dddd82
feat(sim): multi-fluid AMR (SP9a) - per-fluid conservative reflux, su…
sbryngelson Jul 3, 2026
9e936de
merge: multi-fluid AMR (SP9a) with 3D validation
sbryngelson Jul 3, 2026
a57dcb6
merge: 3D validation + multi-fluid AMR (SP9a) into the upstream PR br…
sbryngelson Jul 3, 2026
9064ecd
feat(sim): AMR restart - fine-level save/restore with regridded-box p…
sbryngelson Jul 3, 2026
b8a14ae
merge: AMR restart (SP10) into the PR branch
sbryngelson Jul 3, 2026
3003068
feat(sim): viscous AMR (SP11) - viscous flux registers, c/f-matched t…
sbryngelson Jul 3, 2026
6129592
fix(sim): AMR fine ghost coordinates for viscous stencil (SP11 np=2 e…
sbryngelson Jul 3, 2026
3c6e77d
merge: viscous AMR (SP11) + fine-ghost-coordinate fix into the PR branch
sbryngelson Jul 3, 2026
931470d
refactor(sim): AMR patch slots (amr_fine -> amr_slots, fixed pool arr…
sbryngelson Jul 3, 2026
bc32128
merge: AMR patch-slot infrastructure (SP12a T1) into PR branch
sbryngelson Jul 3, 2026
8bb32ed
feat(sim): AMR multi-patch - Berger-Rigoutsos clustering, min-separat…
sbryngelson Jul 4, 2026
11d46e3
refactor: rename AMR "patch" -> "block" (params, symbols, docs) to di…
sbryngelson Jul 4, 2026
fc65bad
merge: AMR multi-patch (SP12a) + patch->block rename into PR branch
sbryngelson Jul 4, 2026
7bf7bee
feat(sim): Euler-Euler bubbles AMR (SP13) - realizability-preserving …
sbryngelson Jul 4, 2026
00c9378
merge: Euler-Euler bubbles AMR (SP13) into PR branch
sbryngelson Jul 4, 2026
7bc7cde
feat(sim): phase-change (relax) AMR (SP15) - per-block pressure relax…
sbryngelson Jul 4, 2026
17a8e51
merge: phase-change (relax) AMR (SP15) into PR branch
sbryngelson Jul 4, 2026
a429c68
test(sim): AMR cross-feature golden coverage (viscous+multifluid+mult…
sbryngelson Jul 4, 2026
b816bc3
merge: AMR GPU-correctness + cross-feature golden coverage (blind spo…
sbryngelson Jul 4, 2026
5b72e1d
docs(sim): document AMR+surface_tension limitation as an explicit pro…
sbryngelson Jul 4, 2026
86c1038
feat(sim): chemistry AMR (SP16) - species sum/positivity prolongation…
sbryngelson Jul 4, 2026
37265de
merge: chemistry AMR (SP16, multi-rank) + surface-tension limitation …
sbryngelson Jul 4, 2026
267660c
docs: AMR feature documentation page
sbryngelson Jul 4, 2026
8354b1f
merge: AMR documentation page into PR branch
sbryngelson Jul 4, 2026
cdf9239
feat(sim): chemistry diffusion under AMR (SP17) - flux_src reflux at …
sbryngelson Jul 4, 2026
dbb1331
feat(sim): non-polytropic + polydisperse bubbles AMR (SP18) - per-blo…
sbryngelson Jul 4, 2026
f16d52d
docs: update AMR support matrix - chemistry diffusion + non-polytropi…
sbryngelson Jul 4, 2026
5522823
merge: finish chemistry (diffusion, SP17) + bubbles (non-polytropic/p…
sbryngelson Jul 4, 2026
1a5193d
feat(sim): QBMM bubbles AMR (SP19) - fine-resolution moment inversion…
sbryngelson Jul 4, 2026
21d5965
feat(sim): static immersed-boundary AMR (SP20) - per-block fine IB ma…
sbryngelson Jul 4, 2026
49db985
fix(sim): gate IB body straddling a rank seam under AMR (fine-IB imag…
sbryngelson Jul 4, 2026
e035a10
docs(amr): support matrix for QBMM-polytropic + static IB; seam-strad…
sbryngelson Jul 4, 2026
2dacb4b
fix(test): remove stray merge marker left in cases.py during SP20 che…
sbryngelson Jul 4, 2026
83a6f01
style: format m_checker AMR prohibit block after SP19/SP20 fold
sbryngelson Jul 4, 2026
b4463ef
merge: QBMM (SP19) + static IB (SP20) AMR into PR branch
sbryngelson Jul 4, 2026
2c43eb8
fix(test): restore dropped cases.append/stack.pop for QBMM AMR golden…
sbryngelson Jul 4, 2026
01d640b
fix(test): restore dropped cases.append/stack.pop for QBMM AMR golden…
sbryngelson Jul 4, 2026
87ef798
fix(sim): device-attach IB fine-swap under AMR GPU - detach/attach ib…
sbryngelson Jul 4, 2026
1f9a9bc
fix(sim): device-attach IB fine-swap under AMR GPU - detach/attach ib…
sbryngelson Jul 4, 2026
9fbe760
feat(sim): prescribed-motion moving IB under AMR (SP21) - per-substep…
sbryngelson Jul 4, 2026
53220a1
test(amr): moving-IB golden (SP21, 13945217) + non-poly bubble GPU to…
sbryngelson Jul 4, 2026
781aac9
feat(sim): prescribed-motion moving IB under AMR (SP21) - per-substep…
sbryngelson Jul 4, 2026
ac06c72
test(amr): moving-IB golden (SP21, 13945217) + non-poly bubble GPU to…
sbryngelson Jul 4, 2026
8192acf
fix(amr): restart sys_size guard (3-int header) + AMR restart golden …
sbryngelson Jul 4, 2026
e2d9dfe
feat(post): AMR-aware post_process - fine blocks as Silo/binary overl…
sbryngelson Jul 5, 2026
2e955f8
fix(amr): reconcile post-process reader to 3-int restart header + non…
sbryngelson Jul 5, 2026
ea56daa
merge: shippability batch - restart hardening + AMR-aware post_proces…
sbryngelson Jul 5, 2026
cf3733f
fix(sim): IB-AMR OMP-offload crash - explicit copyin(ib_markers%sf) o…
sbryngelson Jul 5, 2026
4d5df1e
merge: IB-AMR OpenMP-offload fix (copyin ib_markers - validated CPU/A…
sbryngelson Jul 5, 2026
09a4d5d
cleanup(gpu): drop the OMP attach/detach macro change - copyin(ib_mar…
sbryngelson Jul 5, 2026
2e8ffe6
merge: IB-OMP fix cleanup (copyin alone; drop shared omp_macros change)
sbryngelson Jul 5, 2026
59d6e86
fix(post): seed q_T for AMR fine-block chemistry cons->prim (was unin…
sbryngelson Jul 5, 2026
d0d20b2
fix(sim): clamp interior-only fd_coeff cell index in mibm IB-drag str…
sbryngelson Jul 5, 2026
654897d
feat(amr): support multi-body IB under AMR (lift num_ibs>1 gate); add…
sbryngelson Jul 5, 2026
7d8342d
feat(amr): support hypoelasticity under AMR - recompute spacing-depen…
sbryngelson Jul 5, 2026
cafdaab
test(amr): golden-protect the reachable-but-untested AMR combos - con…
sbryngelson Jul 5, 2026
bb38235
feat(amr): support acoustic sources with a static block - source acts…
sbryngelson Jul 5, 2026
d03ddb2
feat(amr): support acoustic sources under dynamic regrid - source sup…
sbryngelson Jul 5, 2026
ce534fb
feat(amr): support non-polytropic QBMM on a static block - per-block …
sbryngelson Jul 5, 2026
60fc4c7
feat(amr): support the 6-equation model (model_eqns=3) - per-stage pr…
sbryngelson Jul 5, 2026
c955673
fix: address PR review findings - allocate start_idx in all builds (s…
sbryngelson Jul 5, 2026
b8bad51
fix: harden AMR restart/overlay I/O and feature-combination edges fro…
sbryngelson Jul 5, 2026
5d96390
refactor(weno): deduplicate the hybrid-sensor nonlinear-weight blocks…
sbryngelson Jul 5, 2026
43e4b6c
fix: apply toolkit-review round-2 findings - Cray GPU attach for stor…
sbryngelson Jul 5, 2026
354f244
test(amr): close the review's top coverage gaps - first execution of …
sbryngelson Jul 5, 2026
8a0c23b
fix(ci): moving-IB ghost-point guard compares against the ACTIVE arra…
sbryngelson Jul 5, 2026
c08e8c9
test: honor explicit parallel_io in the golden template (the off-para…
sbryngelson Jul 5, 2026
d84254c
fix(post): exchange the chemistry q_T seam ghosts for EVERY chemistry…
sbryngelson Jul 5, 2026
03ea1f3
feat(amr): support 2D axisymmetric (cyl_coord, p=0) - per-block WENO …
sbryngelson Jul 5, 2026
155b57e
feat(amr): complete non-polytropic QBMM - subcycle time-lerps the pb/…
sbryngelson Jul 5, 2026
f3814e5
feat(amr): dynamic regrid with static immersed bodies - candidate box…
sbryngelson Jul 5, 2026
1e917c0
feat(amr): stretched-grid support - fine ghost-shell coordinates exte…
sbryngelson Jul 5, 2026
7042c54
Merge remote-tracking branch 'upstream/master' into up/mega
sbryngelson Jul 5, 2026
7717b05
feat(amr): support hybrid_weno/hybrid_riemann - remove the unvalidate…
sbryngelson Jul 5, 2026
c3eac4c
feat(amr): moving bodies (prescribed motion) with dynamic regrid - th…
sbryngelson Jul 6, 2026
6f518df
feat(amr): Lagrangian bubbles with the cloud excluded from fine block…
sbryngelson Jul 6, 2026
a38447c
feat(amr): IGR solver support with restriction-only coarse/fine coupl…
sbryngelson Jul 6, 2026
c7fbc1d
fix(amr): non-polytropic QBMM side-state on GPU - passing amr_slots(a…
sbryngelson Jul 6, 2026
cfe7935
fix(amr): nonpoly QBMM slot side-state uses the pres_field + ACC_SETU…
sbryngelson Jul 6, 2026
a0de508
fix(amr): nonpoly QBMM pbmv kernels take argument dummies; prolongati…
sbryngelson Jul 6, 2026
4794356
fix(test): the POST_PROCESS_OFF_PARAMS honor-exemption is per-test op…
sbryngelson Jul 6, 2026
9e0765a
fix(amr): apply review round-3 findings - (1) the Lagrangian-cloud re…
sbryngelson Jul 6, 2026
d3687dd
fix(amr): grid-uniformity tolerance is epsilon-scaled - the absolute …
sbryngelson Jul 6, 2026
5d9c459
fix(amr): fine slot rhs arrays widen collapsed dims to -1:+1 under IG…
sbryngelson Jul 6, 2026
f5eea61
fix(amr): IGR sigma swap/restore kernels hoist bounds to scalars - th…
sbryngelson Jul 6, 2026
a2ff192
fix(test): consequential-eps hybrid goldens and the AMR acoustic stat…
sbryngelson Jul 6, 2026
72b7807
docs(test): record the nvhpc 24.1/24.3 compat-lane NaN as a known non…
sbryngelson Jul 6, 2026
67e8ee6
fix(test): AMR+hybrid consequential goldens override_tol 1e-8 -> 1e-6…
sbryngelson Jul 6, 2026
b255923
fix(sim): device-map hybrid_* sensor flags so the Cray-GPU hybrid sen…
sbryngelson Jul 6, 2026
f55ccb9
fix(sim): seed active_box exterior primitives once so the full-domain…
sbryngelson Jul 6, 2026
198db81
fix(ibm): ghost_points device-mapping lifecycle uses the paired macro…
sbryngelson Jul 6, 2026
610c6a3
fix(test): consequential hybrid goldens override_tol -> 5e-5, sized b…
sbryngelson Jul 6, 2026
726d644
feat(amr): support active_box - blocks must sit strictly inside the a…
sbryngelson Jul 6, 2026
ac203b1
docs(amr): MHD stays gated ON MEASURED EVIDENCE - attempted support a…
sbryngelson Jul 6, 2026
b8bdb94
feat(amr): support 1D MHD/RMHD - div(B) = d(Bx)/dx and 1D evolves onl…
sbryngelson Jul 6, 2026
30aefdd
docs(amr): correct the stretched-grid + Lagrangian/IB gate rationale …
sbryngelson Jul 6, 2026
6c301d9
feat(amr): fine-level distribution map, phase 1 (computed, not applie…
sbryngelson Jul 6, 2026
ba8f964
docs(amr): fine-distribution note tracks up/mega (not a separate branch)
sbryngelson Jul 6, 2026
ea1a879
fix(sim): isolate fine-IB AMR state into m_ibm_fine to fix Cray plain…
sbryngelson Jul 7, 2026
33e9745
fix(sim): make AMR fine-IB swap device-stable (copy, not move_alloc/p…
sbryngelson Jul 7, 2026
443d550
fix(sim): sync moving-IB body position to host before the AMR subcycl…
sbryngelson Jul 7, 2026
165d9a9
amr: make moving-IB fine-block ghost ordering deterministic across ba…
sbryngelson Jul 8, 2026
16ea304
amr: fine-level SFC distribution - point-to-point coarse<->fine coupl…
sbryngelson Jul 8, 2026
59ecdc6
amr: block-splitting (max_grid_size tiling) + fine-fine halo + reflux…
sbryngelson Jul 8, 2026
2b97a35
amr: point-to-point cross-rank regrid fine-state migration (stretched…
sbryngelson Jul 8, 2026
bc3789d
test: regenerate B7704247 golden (2D stretched-y AMR regrid) for bloc…
sbryngelson Jul 7, 2026
b2aaa2c
docs: B7704247 resolved (tiling refines full tag vs old np=1 clamp - …
sbryngelson Jul 7, 2026
ddafc31
amr: gate non-polytropic QBMM at np>=2 (fail-closed) - The pb/mv quad…
sbryngelson Jul 7, 2026
764c01a
docs: QBMM+AMR np>=2 now gated fail-closed (was ungated/untested)
sbryngelson Jul 7, 2026
0a61574
amr: device-native fine->coarse restriction at np=1 (fixes GPU AMR re…
sbryngelson Jul 7, 2026
bd94035
amr: device-native restriction at np>=2 (fixes GPU whole-coarse clobb…
sbryngelson Jul 7, 2026
a4704f9
test: regenerate 660FFBFE golden (2D IGR igr_order=3 dynamic-regrid) …
sbryngelson Jul 7, 2026
f84b41f
amr: point-to-point cross-rank regrid migration (replaces all-ranks b…
sbryngelson Jul 8, 2026
c644d8b
amr: repartition-on-restart across rank counts (parallel_io) - s_read…
sbryngelson Jul 8, 2026
7d317e1
amr: factor per-slot field alloc/free into s_amr_alloc_slot/s_amr_fre…
sbryngelson Jul 8, 2026
66eb896
amr: lazy owned-only slot allocation - right-size fine memory to ~1/n…
sbryngelson Jul 8, 2026
ace2285
amr: warn when amr_max_blocks < num_procs (fine-level load balance ca…
sbryngelson Jul 8, 2026
45796fd
test/hybrid: place sensor eps in a phi gap (0.5 -> 0.3) to kill cross…
sbryngelson Jul 8, 2026
cf4deb1
amr: move_alloc amr_cg to avoid CCE-OMP uninitialized-descriptor crash
sbryngelson Jul 9, 2026
d8c2548
ibm: order ghost points deterministically for reproducible moving AMR-IB
sbryngelson Jul 9, 2026
7c27641
Merge remote-tracking branch 'upstream/master' into up/mega
sbryngelson Jul 9, 2026
9303ddb
amr/ib: update only ghost_points(1:num_gps) to fix amdflang IBM+AMR o…
sbryngelson Jul 9, 2026
4fafd7f
ibm: park AMR ghost points on-device to drop the swap host round-trip
sbryngelson Jul 9, 2026
4c877aa
test: soften moving-IB circle case to avoid the un-GCL'd CFL blow-up …
sbryngelson Jul 10, 2026
0f22386
amr: tear down ACC_SETUP scalar-field mappings on slot free (Cray pre…
sbryngelson Jul 10, 2026
5e51d3f
test: keep two-body moving-IB (43AF9F25) at its original wall speed
sbryngelson Jul 10, 2026
e19677b
Merge remote-tracking branch 'upstream/master' into up/mega
sbryngelson Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ TKE = "TKE"
HSA = "HSA"
infp = "infp"
Sur = "Sur"
thi = "thi" # AMR clustering local: tagged-box hi index (tlo/thi)
alo = "alo" # AMR clustering local: accepted-box lo array (alo/ahi)
thr = "thr" # AMR clustering local: min-separation merge threshold
chioces = "chioces" # typo for "choices" - tests constraint key validation
reqires = "reqires" # typo for "requires" - tests dependency key validation
choises = "choises" # appears in comment explaining validation purpose
Expand Down
316 changes: 316 additions & 0 deletions docs/documentation/amr.md

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions docs/documentation/amr_fine_distribution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# AMR fine-level distribution (design note)

**Status:** in progress on `up/mega` (part of the AMR effort). Phase 1 landed (map computed, not applied); Phase 2 is the apply + gather/scatter checkpoint.

## Problem

MFC's AMR uses a **mirror decomposition**: the fine level reuses the coarse rank
decomposition, so each rank owns exactly the fine cells over its coarse subdomain's
intersection with the blocks (`s_amr_compute_isect` → `amr_rank_owns_block`). This makes
coarse↔fine coupling entirely rank-local (zero communication) but leaves fine work
**unbalanced**: if refinement concentrates in a sub-region, only the ranks owning that
region do the fine advance while the rest idle. At scale this caps AMR speedup.

## Target

Give the fine level its **own distribution**, decoupled from the coarse decomposition, so
fine blocks spread across all ranks by measured work — the AMReX per-level
`DistributionMapping` idea. MFC already enforces an invariant that makes this far simpler
than the general case: **blocks are kept ≥ `buff_size` apart** (regrid merge), so with
**whole-block-per-rank** assignment there is *no fine–fine halo at all*
(`s_mpi_sendrecv_amr_fine_halo` disappears). The only coupling that becomes communication
is coarse↔fine, block-granular.

## Coupling changes (whole-block-per-rank)

| Step | Today (mirror, local) | Decoupled |
|---|---|---|
| Ownership | intersection, multi-owner (`amr_rank_owns_block`) | single owner (`amr_block_owner(k) == proc_rank`) |
| Ghost fill / prolong (coarse→fine) | read local coarse `q_cons` | **gather** coarse patch (block + `buff_size` halo) from coarse owner(s) to block owner |
| Reflux + restriction (fine→coarse) | write local coarse cells | **scatter** corrections from block owner back to coarse owner(s) |
| Fine–fine halo | coarse Cartesian neighbors | none (blocks separated) |
| Regrid | cluster (global) → mirror | cluster → **assign** (`amr_block_owner`) → **migrate** fine state |

The gather/scatter is the only new communication surface. SFC-ordered assignment keeps a
block's coarse patch on an SFC-nearby rank, bounding the cost. Conservation exactness is
preserved because the scatter applies the *same* reflux add / restrict overwrite the
mirror model applied locally — a pure data-movement change, not a numerics change.

## Reuse

`m_load_weight` (per-cell cost field) and `m_sfc_partition` (Morton order + chains-on-chains
balanced partition) already exist as an init-time diagnostic. They become the fine-level
distributor: feed the block list + per-block fine-work weight, return `amr_block_owner(:)`.

## Phasing (each independently mergeable)

1. **Distribution map, computed but not applied** (behavior-preserving). Add
`amr_block_owner(:)` + SFC assignment + an imbalance diagnostic; mirror ownership and all
coupling unchanged. Goldens bit-identical. *(this note's first increment)*
2. **Apply the map**: switch `amr_rank_owns_block` to single-owner, add the coarse↔fine
gather/scatter, drop the fine–fine halo. Validate conservation + assignment-independence.
3. **Dynamic rebalance each regrid**; optionally drop the fixed max-size slot pool for
right-sized boxes.

Phase 2 carries the correctness risk (gather/scatter exactness) and is the checkpoint gate.

## Phase 2 implementation status (branch `amr-fine-dist-wip`)

Done and np=1 bit-identical (the gather reduces to the local read when the owner is the sole rank):

- **Gather** (`s_amr_gather_coarse_patch`): per-block coarse patch `[region_lo-nmar : region_hi+nmar]`
assembled by a sentinel-MAX allreduce into `amr_cg` (a drop-in `scalar_field`). Contribution rule
`f_amr_own_coarse` claims interior cells + physical-boundary ghosts only (never inter-rank ghosts), so
there is one authoritative contributor per cell and no coarse-ghost halo dependence. `pull_host` flag
stages device-resident coarse to host for the runtime callers.
- **Read side rerouted**: init/regrid host prolongation (`s_interpolate_coarse_to_fine`) and the runtime
device ghost-fill (`s_amr_fill_fine_ghosts`, stage + subcycle) now prolong from `amr_cg`.
- **Restriction scatter** (`s_restrict_fine_to_coarse`): owner restricts on host into the `amr_cg_wp`
scratch (sole contributor), sentinel-MAX assembles, each rank overwrites the covered coarse cells it
owns. `s_restrict_all_vars` (old local device kernel) deleted.
- **Fine–fine halo dropped**: `s_mpi_sendrecv_amr_fine_halo` calls removed (whole-block owner has no
continuation faces; blocks ≥ buff_size apart). Routine in `m_mpi_proxy` now dead — remove with the
reflux rework.

Remaining (the conservation crux — reflux is NOT yet decoupling-correct):

- **Reflux redesign.** `s_amr_reflux_face_flags` derives transverse participation `tv` from `amr_isect`,
which is owner-only in the decoupled model, so `own_lo/own_hi` (gating BOTH `creg` capture and the
reflux apply) is true only on the block owner — which does not own the outside coarse cells. Fix:
(1) recompute `tv` from the replicated block range (`amr_region_lo/hi(t)` overlap with `sidx:sidx+ext`),
so any coarse-outside-owner participates; (2) the owner captures `freg` (already correct) and BROADCASTS
it (allreduce, replacing the cart-neighbor `s_mpi_sendrecv_amr_reflux_faces`); (3) coarse-outside-owners
capture `creg` locally and apply `(freg-creg)` to their owned outside cells — verify the apply's
block-relative transverse indexing maps onto each receiver's local coarse slice. Conservation-critical.
- **QBMM pb/mv** gather/scatter for np≥2 (currently local; non-polytropic QBMM+AMR now **gated fail-closed** at np≥2 in
`m_checker` — see "Known open" for the scatter follow-up).
- np=2 conservation + assignment-independence validation once reflux lands (acceptance goldens:
BD21A5C0, 5EFB3277, 79B334C7 — they pass on `up/mega` via the mirror).

## Phase 2 status: DONE and validated (reflux + scalability)

The reflux redesign above landed (block-relative frame, participation from the replicated block range), and the
whole coupling is now **point-to-point + right-sized** — the fine level distributes with no global collective per
stage and per-rank memory that scales with the decomposition.

- **Reflux**: `s_amr_reflux_face_flags` derives `tv`/`tlo`/`thi` from the replicated block range; `creg` capture +
both applies index block-relative; the owner's `freg` is delivered to the applying coarse-outside-owners.
- **Point-to-point coupling** (replaced the correctness-first global collectives): a replicated coarse-decomposition
table `amr_decomp` (allgathered once at init) lets any rank compute which ranks hold a coarse-cell range.
- gather: owner `Irecv`s patch slices from the coarse-owners (`f_amr_rank_coarse_range`).
- restriction: owner `Isend`s each coarse-owner its covered slice (`f_amr_rank_interior`).
- reflux: owner `Isend`s `freg` only to participants (`f_amr_reflux_participates` = `own_lo/hi` parameterized by
rank via `amr_decomp`); `s_amr_p2p_reflux_faces` in `m_amr`.
Non-participants exchange nothing.
- **Right-sized memory**: fine/coord/register arrays sized to `amr_maxc_fit` (min-over-ranks local half-extent = the
max block a rank can own, enforced by the scratch-constraint abort), not the global half-domain `amr_maxc` — about
`1/num_procs` (and `1/num_procs^(d-1)` for the face registers) the memory at scale.
- **Coordinate fix**: `s_amr_swap_to_fine` extends fine ghost coords from the global boundaries `amr_g?cb` (the owner
need not hold the block's local coarse coord slice).

Validated: np=1 1D/2D/3D goldens bit-identical; np=2 conservation exact in 1D (energy 1.9e-16) and 2D with
transverse-face appliers (mass 1.4e-14), bounds-clean. `s_mpi_allreduce_array_max` remains only for the
once-at-init coordinate assembly.

## Phase 3

1. **Block-splitting / tiling** (the coverage gap) — DONE.
- **Tiling**: `s_amr_tile_box` splits any box > `amr_maxc_fit` into contiguous ≤`amr_maxc_fit` sub-blocks, wired into
the initial-block setup and the regrid pipeline (non-IB); `s_populate_amr_fine` loops over all blocks refreshing
per-block mirrors via `s_amr_select_slot`.
- **Block-to-block fine-fine halo**: the fine advance is three driver phases — **fill all** (gather + coarse
ghost-fill), **`s_amr_fine_fine_halo`** (overwrite each seam ghost with the neighbour's *stage-entry* interior,
buff_size-deep, `MPI_Sendrecv` between owners or a local copy when one rank owns both; adjacency from the
replicated `amr_region_*_all` via `f_amr_seam`), **advance all** (RHS + RK). `s_advance_amr_fine_stage` split into
`s_amr_fine_stage_fill` / `s_amr_fine_stage_advance`.
- **Reflux seam-exclusion**: `f_amr_face_is_seam` drops a sub-block face shared with another fine sub-block from
`s_amr_reflux_face_flags` `own_lo/own_hi` (fine-fine, not c/f).
- **Owner-ordering fix**: `s_amr_assign_block_owners` runs BEFORE the owner-dependent `s_set_amr_fine_geometry` in
init, regrid, AND restart — the stale default (rank-0) owner map otherwise sized multi-block owners wrong (only
surfaces once tiling makes several blocks). Restart (`s_read_amr_restart`) is a two-pass read (regions → assign →
place data) for both the parallel_io and non-parallel_io paths.
2. **Regrid cross-rank fine-state migration** — DONE (the stretched-np≥2 correctness fix). The regrid overlap-copy
preserves a covering old block's fine detail by reading `amr_slots(kk)%%q_cons_stor`, but that was local-only
(`if (.not. old_owns(kk)) cycle`). Under fine-level distribution an old block can be owned by a rank *other* than the
one now owning a covering new block, so the copy was silently skipped and the new block kept only its
coarse-prolonged values — **exact on uniform grids** (prolongation reproduces the fine field) but **~O(1e-4) wrong on
stretched grids** (prolongation is not exact). Fix: broadcast every old block's stashed fine state from its owner
into the replicated slot's `q_cons_stor` on all ranks (`num_procs>1`; no-op at np=1), copy the overlap from *every*
covering old block regardless of ownership, and take `old_ilo`/`old_ext` from the global replicated region (not the
owner-only isect). Correctness-first collective; a per-block P2P version mirroring `s_amr_gather_coarse_patch` is
future work. Validated (`-b mpirun`): 79B334C7 (1D stretched dynamic-regrid, 2 ranks) passes; F0DDE1B4 (np=1 twin),
5EFB3277 + BD21A5C0 (uniform np=2 tiled + restart), and the np=1 AMR batch all pass.

## Golden regeneration note (tiling refines more at np=1)

At np=1, tiling adds a capability the mirror never had: refining a tagged region **larger than `amr_maxc`** (half the
domain per dim). The old regrid **clamped** any box to `amr_maxc_fit` (`hi = lo + amr_maxc_fit - 1`), so a big tag was
only partially refined; block-splitting **tiles** it and refines the whole tag. Any np=1 AMR golden whose tag exceeds
`amr_maxc(dim)` therefore changes (more cells refined) and must be regenerated with the tiled binary — an *intended*
solution change, not a regression (the tiled advance is bit-identical to the mirror where footprints match, conservation
is exact, and the seam is exact). Example: **B7704247** (2D stretched-y regrid) — the mirror refined `y4:23` (20 cells,
clamped); tiling refines the full `y4:35` (`y4:19` + `y20:35`). Golden regenerated. np≥2 goldens are unaffected: the
mirror splits a block across ranks there, so its footprint already matches tiling.

## Known open

- **QBMM pb/mv** gather/scatter for np≥2 — the pb/mv side-state coarse↔fine coupling (`s_amr_prolong_pbmv` /
`s_restrict_pbmv`) and the regrid QBMM overlap-copy are still LOCAL-only (same bug class as the q_cons migration
above). Now **gated fail-closed**: `m_checker` PROHIBITs `qbmm .and. .not. polytropic .and. num_procs > 1` for `amr`,
so np≥2 non-polytropic QBMM+AMR aborts at case load instead of silently coupling to the wrong coarse side-state.
Distributing pb/mv (gather/scatter/migration, mirroring q_cons) is future work for when np≥2 QBMM+AMR is needed and
testable. Polytropic QBMM+AMR at np≥2 is unaffected (its moments ride q_cons, which is already distributed).
- **`amr_g?cb` lacks physical-boundary ghost coords** (sized `-1:m_glb`; the base grid's `x/y/z_cb` carry BC-aware ghosts
via `s_populate_grid_variables_buffers`). A near-domain-edge **whole** (untiled) block can drive the fine ghost-coord
build out of `amr_gycb` bounds — surfaced only by artificially disabling tiling; tiled blocks stay in bounds. Fix if
untiled near-edge whole blocks ever become reachable.
- Minor: the P2P routines scan all `num_procs` to find participants (integer-only, O(P) per block per stage); the regrid
migration broadcasts (correctness-first, → P2P); patch-only device transfers instead of whole-field host round-trips
(GPU only); own-only slot allocation.
Loading
Loading