C4 Golden regression
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| C4 | Contracts | C | CPU (gfortran, nvfortran, ifx; debug and optimised; R8P and R4P) | no | selah_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
| Item | Value |
|---|---|
| Cases | 41: 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 |
| Inputs | exact in binary: dyadic values |
| Files | src/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) |
| Tolerance | |
| Rule | a 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
./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 fileResults
Measured on 2026-11-17:
| Build | Bitwise equal | Worst relative difference |
|---|---|---|
| gfortran 16.2, optimised (the writer) and debug | 1312 / 1312 | 0 |
| ifx 2026.2, optimised and debug | 1312 / 1312 | 0 |
| nvfortran 26.9, optimised and debug | 1246 / 1312 | |
| gfortran 16.2, R4P (the writer of the R4P file) | 1312 / 1312 | 0 |
| nvfortran 26.9, R4P | 1232 / 1312 |
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.