Skip to content

C4 Golden regression ​

IDGroupTypeBackendsFigureProgram
C4ContractsCCPU (gfortran, nvfortran, ifx; debug and optimised; R8P and R4P)noselah_test_golden

Case and scope ​

The verification cases assert orders, properties and bounds. A change of a few ulp, or an error that grows inside its bound, passes them. The golden test pins the values themselves: what every scheme, form and kernel computes on fixed inputs.

Setup ​

ItemValue
Cases41: every Runge–Kutta scheme in every form it has (3 steps of a periodic linear system, 32 values; its operator is 0.25 times GIDEON's centred second derivative plus 0.125 u); every splitting (3 steps of a partitioned linear system); every kernel, box V_FIRST unmasked and V_LAST masked, and flat
Inputsexact in binary: dyadic values ((37i+11s)mod61−30)/32 and dyadic coefficients and steps (no libm, no random numbers), so the inputs are the same bits on every compiler and option
Filessrc/tests/golden/selah_golden_v2.txt (R8P) and selah_golden_r4_v2.txt (R4P), 1312 values each, written by gfortran 16.2 -O3 (compiler and options in the header)
Tolerance1000ε(RP) relative to $\max(
Rulea golden file is never edited. selah_test_golden write FILE refuses to overwrite one. A deliberate change of results gets a new file (v2) and a new default path in the test

Program ​

bash
./exe/selah_test_golden                                    # from the source root, or with SELAH_SRC set
./exe/selah_test_golden write src/tests/golden/selah_golden_v2.txt   # only for a deliberate change, new file

Results ​

Measured on 2026-11-17:

BuildBitwise equalWorst relative difference
gfortran 16.2, optimised (the writer) and debug1312 / 13120
ifx 2026.2, optimised and debug1312 / 13120
nvfortran 26.9, optimised and debug1246 / 13126.7⋅10−16
gfortran 16.2, R4P (the writer of the R4P file)1312 / 13120
nvfortran 26.9, R4P1232 / 13124.2⋅10−7

Findings ​

  • v2 (2026-11-19). The linear system's operator became GIDEON's (issue #2): the same operator, written through gideon_fd_d2_c2, rounds differently. 12 of the 1312 R8P values moved by 1 ulp (worst relative difference 1.11e-16) and 21 of the R4P values by about 1 ulp (1.49e-7), all in Runge–Kutta cases (the kernels and the splittings do not use the operator). Inside the tolerance, but a deliberate change of results: new files, v2, written by gfortran 16.2 -O3; v1 removed, nothing reads it.

  • gfortran and ifx agree bit for bit at every optimisation level: the kernels' private-sum-then-store order leaves the compilers nothing to reorder. nvfortran contracts some products into fused multiply–adds, a rounding per affected value.

  • In the mutation run (C6) the golden test alone kills 21 of the 28 mutants. The seven it misses change what its cases do not record:

    • the SSP coefficient, the stage weight, the register count and the stages-on-q flags;
    • a mask branch its masked case does not take;
    • a 13th-digit change of a 2N coefficient;
    • the unread Shu–Osher coefficient.

    It is the cheapest net, and the least explanatory one: the case pages say what broke.

GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice