Golden values
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| R1 | Regression | C | CPU (gfortran R4P, R8P, R16P; nvfortran); the CI matrix | no | gideon_test_golden, gideon_test_lines_golden |
Case and scope
The verification cases assert exactness, orders and identities. A change of a few ulp, or an error that grows inside a bound, passes them. The golden test pins the values themselves: every kernel of the registry on fixed windows, compared with a file written once by a reference build.
Setup
| Item | Value |
|---|---|
| Kernels | every kernel of the registry (apply) |
| Windows | 8 windows of 33 values, made by an integer linear congruential generator: multiples of random_number); |
| Comparison | |
| Reported | the values bitwise equal to the file, the worst difference relative to the magnitude |
| Files | src/tests/golden/, chosen by the build's kind: gideon_golden_v3.txt (R8P), gideon_golden_r4_v3.txt (R4P), gideon_golden_r16_v3.txt (R16P); each starts with the compiler and options that wrote it |
| Compact operators | gideon_test_lines_golden: every compact operator's right side on 8 windows of the same generator, and one periodic line of 16 values solved with its band (a filter's gideon_golden_lines_v1.txt, _r4_v1, _r16_v1 |
332 kernels × 8 windows = 2656 values per file.
| File | Kind | Values | Written by | Tolerance (of the magnitude) | Read by |
|---|---|---|---|---|---|
gideon_golden_lines_r16_v1.txt | R16P | 696 | GCC version 16.2.0, -O3 | gideon_test_lines_golden | |
gideon_golden_lines_r4_v1.txt | R4P | 696 | GCC version 16.2.0, -O3 | gideon_test_lines_golden | |
gideon_golden_lines_v1.txt | R8P | 696 | GCC version 16.2.0, -O3 | gideon_test_lines_golden | |
gideon_golden_r16_v1.txt | R16P | 1944 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_r16_v2.txt | R16P | 2304 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_r16_v3.txt | R16P | 2656 | GCC version 16.2.0, -O3 | gideon_test_golden | |
gideon_golden_r4_v1.txt | R4P | 1944 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_r4_v2.txt | R4P | 2304 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_r4_v3.txt | R4P | 2656 | GCC version 16.2.0, -O3 | gideon_test_golden | |
gideon_golden_v1.txt | R8P | 1944 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_v2.txt | R8P | 2304 | GCC version 16.2.0, -O3 | no (kept) | |
gideon_golden_v3.txt | R8P | 2656 | GCC version 16.2.0, -O3 | gideon_test_golden |
A new version
A golden file is never edited. A deliberate change of results (a new kernel, a changed row) gets a new file, written by the test itself, and the test's default path moves to it:
./exe/gideon_test_golden write src/tests/golden/gideon_golden_v4.txt # refuses to overwrite an existing fileThe writer opens the file with status='new': an existing file stops it with an error, so a committed version cannot be replaced by accident. The new file is reviewed like code: for the kernels already in the previous version, its lines must equal the previous ones character for character when written by the same build, and the new lines are the values of the new kernels.
v1 holds the first release's 243 kernels. v2 (phase 2) adds the FD face derivatives and the one-sided and biased FD face values, 288 kernels; written by the same three builds and options as v1, its first 243 kernels equal v1's line for line in all three kinds. v3 (roadmap #2) adds the face differences, the FV biased face values, the dissipation parts and the explicit filters, 332 kernels; its first 288 equal v2's line for line in all three kinds. v1 and v2 are kept. Then GOLDEN in gideon_test_golden.F90 points to the newest, for each kind. The compact operators have their own files, v1, read by gideon_test_lines_golden.
Program
./exe/gideon_test_golden # from the repository root (the path is relative)Results
| Build | Values | Bitwise equal | Worst difference / magnitude | Failures |
|---|---|---|---|---|
| gfortran, R4P | 2656 | 2656 (100.0 %) | 0 | 0 |
| gfortran, R8P | 2656 | 2656 (100.0 %) | 0 | 0 |
| gfortran, R16P | 2656 | 2656 (100.0 %) | 0 | 0 |
| nvfortran -acc, R8P | 2656 | 2071 (78.0 %) | 0 |
The compact operators:
| Build | Values | Bitwise | Worst difference / magnitude | Failures |
|---|---|---|---|---|
| gfortran, R4P | 696 | 696 | 0 | 0 |
| gfortran, R8P | 696 | 696 | 0 | 0 |
| gfortran, R16P | 696 | 696 | 0 | 0 |
| nvfortran -acc, R8P | 696 | 380 | 0 |
Findings
- The gfortran builds that wrote the files reproduce them bitwise, in all three kinds.
- The nvfortran OpenACC build (its host code, strict IEEE) differs from the gfortran writer in the last bits of a share of the values, within the tolerance: the reason the comparison is a tolerance and the bitwise count is reported. The CI matrix runs the test with gfortran, nvfortran and ifx on every push (Continuous integration).
- The data are exact in binary on purpose, so that the test measures the kernels and not libm: SETH's first golden file, built with libm, differed between gfortran
-O0and-O3before any kernel ran.