Skip to content

CPU and FNL agree run by run ​

IDGroupMilestoneTypeBackendsFigureRegression
VV agreeDissipative terms (M4)M4 (#65)CCPU, FNLno—

Case and scope ​

Every run of the VV legs on the CPU against the same run on FNL, cell by cell on the last checkpoint.

What the case catches: the legs pass on both backends, but a pass bounds an error norm, and two backends can pass with different fields. Every dissipative kernel exists twice, as a CPU loop and an FNL device kernel (OpenACC, the flume-fnl-nvf build), so the same run on both must give the same state up to the round-off of the operation order. A device kernel that differs from its CPU twin in a term below the oracle's resolution shows here.

Models and numerics ​

ItemChoiceCode
CPU dissipative kernelsNavier–Stokes and Ohmic fluxes, orders 2 and 4add_dissipative_fluxes_o2, add_dissipative_fluxes_o4, add_resistive_fluxes_o2, add_resistive_fluxes_o4, adam_flume_cpu_dissipation_kernels.F90
FNL dissipative kernelsthe device twinsadd_dissipative_fluxes_o2_dev, add_dissipative_fluxes_o4_dev, add_resistive_fluxes_o2_dev, add_resistive_fluxes_o4_dev, adam_flume_fnl_dissipation_kernels.F90; add_dissipative_fluxes_dev, adam_flume_fnl_object.F90
Comparisonblocks matched by their origin (rank independent); each difference divided by the physical scale of its variable, not by its own maximumagree, src/tests/flume/verification/viscous/waves.py

The scales: density and energy by their maximum; the momentum by the larger of its maximum and ρ0a0 (an Ohmic wave at rest carries momentum of O(A2), far below the round-off of the state); the field by its maximum (it is the signal); ψ by chmax|B|.

Initial and boundary conditions ​

The runs of the legs, unchanged: 72 runs, every resolution of every ladder, the −A twins, the ideal twins and both sides of each forest, on 2 ranks, one clean build of each backend. The setups are on the case pages:

LegRunsSetup
VV-1 shear12viscous waves
VV-2 acoustic6viscous waves
VV-3 Couette3Couette
VV-4 Becker6Becker
VV-5 Ohmic, Alfvén, acoustic on MHD18Ohmic decay
VV-6 Ohmic budget4Ohmic heating
VV-7 conservation6seam conservation
VV-7 forests8seam conservation
VV-8 seams9seam accuracy

Input files ​

FileRole
src/tests/flume/verification/viscous/check.sh --legs agreeruns nothing: pairs every work-adam_flume_cpu-np2-* directory with its work-adam_flume_fnl-np2-* twin, after every leg has run on both executables
src/tests/flume/verification/viscous/waves.py agreethe cell-by-cell comparison
bash
cd src/tests/flume/verification/viscous
./check.sh && FLUME_EXE=$PWD/../../../../../exe/adam_flume_fnl ./check.sh && ./check.sh --legs agree

No figure: a run-by-run identity has nothing a plot would show (#85).

Results ​

Bound: 10−10 on every run.

LegRunsLargest difference
VV-1 shear125.8⋅10−15
VV-2 acoustic61.1⋅10−15
VV-3 Couette39.4⋅10−16
VV-4 Becker62.2⋅10−13
VV-5 Ohmic, Alfvén, acoustic on MHD184.8⋅10−15
VV-6 Ohmic budget42.6⋅10−15
VV-7 conservation62.7⋅10−15
VV-7 forests83.5⋅10−14
VV-8 seams92.0⋅10−14

Measured: ADAM 0bcdf870 + the night-2026-11-22 tree (the paper commit, tag pending), CPU gfortran 16.2.0 + Open MPI 5.0.11 (iac_gnu) on medooza (gnode22), FNL nvfortran 26.9, CUDA 12.9 (iac_nvf, the OpenACC build flume-fnl-nvf) on NVIDIA A30, 2026-11-23 (viscous/check.sh on both executables, then viscous/check.sh --legs agree, jobs 1369376 CPU, 1369378 FNL, 1369379 agree).

The DC contract passes on both backends as well.

The inviscid path ​

The same comparison for the inviscid runs of the order and MHD studies, on the last checkpoint of each run: make_doc_runs.sh groups vortex, order, mhd and shock-cylinder run on each executable, then src/tests/regression_ab.py <cpu run> <fnl run> --ngc 3. The measure differs from the table above: the largest difference of any dataset (one variable of one block) divided by that dataset's own maximum, a stricter scale than the physical scale of waves.py agree. Ghost cells are left out.

RunsCountLargest difference, last checkpoint
isentropic vortex, splitting and weno-riemann LLF / HLL / HLLC, N=64,128,256122.1⋅10−14
MHD linear waves, splitting and HLLD, four families, N=16,32,64242.7⋅10−14 (23 runs; see below)
field loop11.4⋅10−14
shock on a cylinder (IB), splitting / HLLC23.5⋅10−12 / 1.9⋅10−12
Orszag–Tang uniform / --amr2ψ: 2.4⋅10−7 / 1.5⋅10−11 (1.1⋅10−8 / 8⋅10−13 absolute)
rotor1ψ: 5.6⋅10−8 (5.9⋅10−9 absolute)

Measured: as above, the runs of jobs 1369375 (CPU) and 1369377 (FNL), compared in job 1369379, 2026-11-23.

  • The smooth runs (vortex, waves, field loop) agree to about a hundred units of round-off (2.2⋅10−16): the two backends integrate the same discrete operator.
  • The splitting Alfvén wave at N=16 is the exception in the count: CPU takes 321 steps and FNL 320, a round-off difference in the last time step's length near time_max, so the final checkpoints are at different steps and are not compared (the initial ones agree to 1.4⋅10−16).
  • The shocked runs differ by 10−12–10−11: round-off amplified where a WENO stencil or the IB switches.
  • On Orszag–Tang and the rotor the largest difference is in the GLM scalar ψ, measured against its own block maximum, which is small (∼0.05 on Orszag–Tang): 10−8 in absolute value. regression_ab.py reports only the largest dataset of each file, so the difference of the conserved variables there is below that and was not printed separately. These are also the runs whose symmetry defect grows from round-off to 10−9 (see Orszag–Tang and rotor).

Related cases: the Sod tube shows the same CPU–FNL round-off agreement on a Riemann problem (Sod).

Findings ​

  • The largest differences sit in the Becker shock, the steepest gradients of the suite, at 2⋅10−13 of the momentum scale: no run differs by more than about a thousand units of round-off.