Skip to content

Canonical RANS CTests: run without FFT in CI; terrain-height wall distance on z-split layouts - #409

Merged
hgopalan merged 3 commits into
ERF-Hazardfrom
rans-ci-fft
Sep 11, 2026
Merged

Canonical RANS CTests: run without FFT in CI; terrain-height wall distance on z-split layouts#409
hgopalan merged 3 commits into
ERF-Hazardfrom
rans-ci-fft

Conversation

@hgopalan

Copy link
Copy Markdown
Owner

Canonical RANS CTests: run without FFT in CI; terrain-height wall distance on z-split layouts

Hazard-side copy of the two fixes pushed to erf-model#3971 today (cherry-picks 3eff4c7 and 9a9207f, plus the RANS_Neutral_ABL_Flat_Implicit entry that only exists here).

Why

No CI configuration builds with ERF_ENABLE_FFT, and every Canonical_RANS deck ran the anelastic projection with the FFT solver, so all ten RANS entries merged in #405 abort at start-up in CI: the flat decks in ReadParameters on erf.use_fft, the 2D hill deck (which already sets use_fft = false) in project_momenta, because the general-terrain projection is the FFT-preconditioned GMRES with no non-FFT path. The harness also swallowed the run log, so ctest -VV showed nothing. The upstream PR's CI run of 2026-09-10 failed 9 of 9 on macOS, Linux and Windows; every later run was cancelled or queued, so it went unnoticed.

Changes

  • The four flat entries pass erf.use_fft=false (MLMG projection) and run in every build; the six terrain-fitted entries are registered only under if(ERF_ENABLE_FFT).
  • The test command echoes the tail of the run log when the executable exits non-zero.
  • erf.wall_dist_type = terrain_height read the surface nodes z_nd(:,:,klo) from every box, but boxes above a z split of the BoxArray do not hold them (778 m error on the 3D hill at amr.max_grid_size_z = 10). The surface slab is now gathered onto every box first, with a guard that reduces over the slab's own ghost width.
  • PLAN.md phase 6, the 3D hill README, RESULTS.md, the deck and the Poisson-solver comment no longer attribute the 1.788e139 pre-projection divergence to dz != dx; it was the z-split layout (Fix momenta ghost faces and planar surface-layer arrays on z-split BoxArrays (terrain-fitted meshes) erf-model/ERF#3970). The Poisson wall-distance multigrid does still diverge at dx = 2 dz.

Verification

  • Debug build without FFT: 4 entries registered under -L rans, 4 pass (the three Timestep_Limits dt-sweep entries, whose spin-up deck also uses FFT, are now gated the same way).
  • Release FFT build: 13 entries pass (10 regression plus the 3 dt-sweep).
  • 3D hill, max_step = 0, amr.max_grid_size_z = 10 vs one box per column: wall distance bit-identical with the fix (778 m apart without it); the unsplit distance is unchanged.
  • Codespell clean; the trailing-whitespace lines in CTestList.cmake predate this branch.

🤖 Generated with Claude Code

hgopalan and others added 3 commits September 11, 2026 15:09
…ain cases on FFT

No CI configuration builds with ERF_ENABLE_FFT, and every Canonical_RANS
deck ran the anelastic projection with the FFT solver, so all nine RANS
entries aborted at start-up in CI (the 2026-09-10 run: 9 of 9 on macOS,
Linux GCC and Windows). The flat decks abort in ReadParameters on
erf.use_fft; the 2D hill deck sets use_fft = false but its general-terrain
projection is the FFT-preconditioned GMRES, which has no non-FFT path.

- The three flat entries pass erf.use_fft=false (MLMG projection) and run
  in every build; the six terrain-fitted entries are registered only under
  if(ERF_ENABLE_FFT).
- The test command echoes the tail of the run log when the executable
  exits non-zero, so ctest -VV shows the reason instead of nothing.
- RegressionTests.rst and the Canonical_RANS README say so.

Checked with a Debug build without FFT (3 entries registered, 3 pass), a
configure with MPI off (3 entries), and a Release FFT build (9 pass).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 3eff4c7)
…; correct the dz != dx notes

The terrain_height wall distance read z_nd(:,:,klo) from every box, but
boxes above a z split of the BoxArray do not hold the surface nodes, so
their distance was garbage (778 m error on the 3D hill deck at
amr.max_grid_size_z = 10, clamped to epsilon). Gather the surface slab onto
every box with a ParallelCopy first, and guard the gathered slab with a
reduction over its own ghost width (a scalar-ghost MultiFab::max would read
past the slab, which has no z ghosts). With the fix the split and unsplit
layouts give bit-identical wall distances, and the unsplit distance is
unchanged.

The 1.788e139 pre-projection divergence recorded in PLAN.md phase 6, the
3D hill README, RESULTS.md, the deck and the Poisson solver comment as a
dz != dx failure was the same z-split layout (unfilled momenta ghost faces
in the initial projection and duplicated planar surface-layer arrays,
fixed in erf-model#3970), not the aspect ratio; the text now says so.
The Poisson wall-distance multigrid does still diverge at dx = 2 dz.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 9a9207f)
The sweep's spin-up deck runs the anelastic projection with the FFT solver,
so in a build without ERF_ENABLE_FFT the three RANS_Timestep_Limits entries
abort at start-up; gate them like the terrain-fitted Canonical_RANS entries.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hgopalan
hgopalan merged commit c40709a into ERF-Hazard Sep 11, 2026
0 of 78 checks passed
@hgopalan
hgopalan deleted the rans-ci-fft branch September 11, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant