Skip to content

Regression suite ​

The verification cases assert the physics: an exact solution, a reference, a symmetry or a conservation property. The regression suite does a different job. It freezes 39 inputs, most of them copies of a verification input cut to a few dozen steps, and detects any change of their outputs, wanted or not.

How it works ​

Each case directory src/tests/flume/regression/<case>/ holds a frozen input.ini (a multi-realm case: a forest manifest plus one INI per realm) and the goldens golden/cpu/ and golden/fnl/:

GoldenContentComparison
digest.txtper-variable digest of every checkpoint field (src/tests/prism/regression/digest.py)within the digest tolerances (default rtol 10−6)
*-residuals.datper-iteration residualsheader verbatim, integer columns exact, float columns within the tolerances
*-conservation_history.datper-iteration volume integrals of the conservative variables (and W, E+W under self-gravity)as the residuals

The raw HDF5 checkpoints are not committed. Every case runs on 2 MPI ranks.

ScriptRole
src/tests/flume/regression/run.sh cpubuilds flume-cpu-gnu and flume-cpu-gnu-fft, runs every case, compares; runs in CI
src/tests/flume/regression/run-fnl-local.shthe same on the GPU (flume-fnl-nvf and flume-fnl-nvf-fft, --varset local_nvf); a workstation gate, since the CI runners have no GPU
src/tests/flume/regression/run-omp-bitwise.shchecks that the OpenMP build reproduces the serial one bit for bit (CI)

Two executables per backend: every case with self_gravity = .true. runs on the -fft executable (FFTW on CPU, cuFFT on FNL), since every self-gravity solve needs an FFT; the CI job installs libfftw3-dev. --no-build skips the build; REGRESSION_CASES="a b" restricts the run; REGRESSION_RUN_GOLDENLESS=1 runs a case that has no golden yet (the capture of a new case). Before running, the harness refuses an executable older than any of its sources.

A case also fails when its run exits non-zero, a crash or the hard timeout, even if its outputs match the goldens: a crash after the last checkpoint is still a crash (hcoll segfaulting in MPI_Finalize on a cluster passed unseen before). The outputs are compared anyway, for the report. The one exemption is the harness's own termination of a run that hung in MPI_Finalize after its end-of-run marker (the WSL GPU stack). REGRESSION_ALLOW_MPIRUN_FAILURE=1 turns the failure into a warning on an environment whose crash is known.

bash
src/tests/flume/regression/run.sh cpu                     # build, run, compare (CPU)
src/tests/flume/regression/run-fnl-local.sh               # the same on the GPU
REGRESSION_CASES="sod-x rotor" src/tests/flume/regression/run.sh cpu --no-build

Cases ​

CaseFreezesIssue
sod-x, sod-y, sod-zSod shock tube, along each axis#35
sod-hllcSod on weno-riemann, HLLC#47
vortex-periodicisentropic vortex, 100 steps#35
amr-periodic-refluxconservation across AMR seams: init-time AMR, reflux#35
amr-periodic-reflux-stagethe same with reflux_cadence = stage#81
shock-cylinder-ibshock over a cylinder, immersed boundary, 120 steps#35
sod-2realm, sod-2realm-blocks, sod-amr, sod-amr-2realm, sod-amr-refinedmulti-realm runs: mirror seams lined up or not, a 2:1 face, the refined coupling#37, #51, #52
rj2a-x, rj2a-y, rj2a-zRyu–Jones 2a#41
rj2a-hlldRyu–Jones 2a on weno-riemann, HLLD#47
rj2a-2realmRyu–Jones 2a in two realms#41
brio-wuBrio–Wu#41
glm-pulseGLM cleaning#41
orszag-tangOrszag–Tang#41
orszag-tang-eglmOrszag–Tang with EGLM#47
rotorMHD rotor#41
field-loopfield loop#41
rotated-shock-tuberotated shock tube#41
uniform-amr-mhdMHD on a uniform state across 2:1 faces#41
blast-limiter, blast3d-limiterthe Balsara–Spicer blast with the positivity limiter, 2-D and 3-D#47
blast-amr-limiterthe limited blast across two 2:1 seams#50
shear-viscousviscous waves#65
couetteCouette flow#65
becker-shockBecker's viscous shock#65
alfven-resistivethe visco-resistive Alfvén wave#65
seam-viscous-amrthe dissipative fluxes across 2:1 seams#65
vortex-regridruntime regrids: the vortex, 6 regrids#74
field-loop-regridruntime regrids on MHD: the field loop, 10 regrids#74
selfgravity-jeansJeans modes: the unstable mode at amplitude 10−2, FFT solver, 20 steps#81
selfgravity-amr-stageself-gravity on a static AMR grid: multigrid, the seam gravity work, per-stage reflux#81
selfgravity-starthe n = 1 polytrope, isolated boundaries, 163#81
selfgravity-star-amrthe n = 1 polytrope on AMR (SV-14): isolated boundaries by the multigrid's James step, the star of radius 0.3 collapsing, the box refined over 323, per-stage reflux, 20 steps#87

The self-gravity goldens agree across the backends to 9⋅10−14 relative in the volume integrals and E+W, and to 1.8⋅10−18 absolute in the momentum, which is round-off.

Refreshing a golden ​

Only after an intentional change, adjudicated case by case (which fields move, when, by how much, and why). The run fails against the old golden but leaves its outputs in work-cpu/ (work-fnl/ on the GPU):

bash
REGRESSION_CASES=<case> src/tests/flume/regression/run.sh cpu --no-build
mkdir -p src/tests/flume/regression/<case>/golden/cpu
cp src/tests/flume/regression/<case>/work-cpu/{digest.txt,*-residuals.dat,*-conservation_history.dat} \
   src/tests/flume/regression/<case>/golden/cpu/