A4 Compact operators
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| A4 | Accuracy | A | Python (100 digits); CPU (gfortran R4P, R8P, R16P; nvfortran; ifx); GPU (OpenACC) | no | scripts/gen_gideon.py, gideon_test_lines |
Case and scope
The 29 compact operators: their rows by their meaning, their orders on periodic lines, their symbols, their right sides and solves on the device (roadmap #2, gates L1, L2, L4, L5). A compact operator is a right-side kernel and a band; the test drives both through a generated registry whose band constants are the library's own.
Models and numerics
| Item | Choice | Code |
|---|---|---|
| L1 rows | every row exact on | gideon_test_lines.F90 |
| L2 orders | ||
| Round-off floor | ||
| L4 symbols | on 64 points, the solve of each mode = the kernel's symbol over the band's; centred: real for an even | |
| Mirrors | pbl's right side on mirrored data = pbr's, bitwise | |
| L5 device | 16384 right sides and 512 lines of 128 points per operator on the device against the host | |
| Registry | gideon_test_lines_registry.F90, generated: the bands are gideon_tables' constants |
Program
bash
./exe/gideon_test_lines
./exe-r16/gideon_test_lines # every order measuredResults
The operators, from the generator (the bands and the residuals are exact rationals):
| Operator | Unknowns at | Order | Band | Band coefficients | Right window | Row residual on |
|---|---|---|---|---|---|---|
fd_d1_p4 | nodes, from point values | 4 | tri | q(-1:1) | ||
fd_d1_p6 | nodes, from point values | 6 | tri | q(-2:2) | ||
fd_d1_p8 | nodes, from point values | 8 | penta | q(-2:2) | ||
fd_d1_p10 | nodes, from point values | 10 | penta | q(-3:3) | ||
fd_d2_p4 | nodes, from point values | 4 | tri | q(-1:1) | ||
fd_d2_p6 | nodes, from point values | 6 | tri | q(-2:2) | ||
fd_d2_p8 | nodes, from point values | 8 | penta | q(-2:2) | ||
fd_d2_p10 | nodes, from point values | 10 | penta | q(-3:3) | ||
fd_filter_p2 | nodes, from point values | 2 | tri | q(-1:1) | ||
fd_filter_p4 | nodes, from point values | 4 | tri | q(-2:2) | ||
fd_filter_p6 | nodes, from point values | 6 | tri | q(-3:3) | ||
fd_filter_p8 | nodes, from point values | 8 | tri | q(-4:4) | ||
fd_filter_p10 | nodes, from point values | 10 | tri | q(-5:5) | ||
fd_face_p4 | faces, from point values | 4 | tri | q(0:1) | ||
fd_face_p6 | faces, from point values | 6 | tri | q(-1:2) | ||
fd_face_p8 | faces, from point values | 8 | penta | q(-1:2) | ||
fd_face_p10 | faces, from point values | 10 | penta | q(-2:3) | ||
fd_face_d1_p4 | faces, from point values | 4 | tri | q(0:1) | ||
fd_face_d1_p6 | faces, from point values | 6 | tri | q(-1:2) | ||
fd_face_d1_p8 | faces, from point values | 8 | penta | q(-1:2) | ||
fd_face_d1_p10 | faces, from point values | 10 | penta | q(-2:3) | ||
fv_face_p4 | faces, from cell averages | 4 | tri | q(0:1) | ||
fv_face_p6 | faces, from cell averages | 6 | tri | q(-1:2) | ||
fv_face_p8 | faces, from cell averages | 8 | penta | q(-1:2) | ||
fv_face_p10 | faces, from cell averages | 10 | penta | q(-2:3) | ||
fv_face_pbr5 | faces, from cell averages | 5 | tri | q(0:2) | ||
fv_face_pbl5 | faces, from cell averages | 5 | tri | q(-1:1) | ||
fv_face_pbr7 | faces, from cell averages | 7 | tri | q(-1:3) | ||
fv_face_pbl7 | faces, from cell averages | 7 | tri | q(-2:2) |
- 29 rows, residual orders at 100 digits, smallest margin -0.000 (gideon_fv_face_pbr7, observed 7.000)
- Pirozzoli (2002) as recalled, tier A, agrees: gideon_fv_face_pbl5 [['1/2', '1/6'], ['1/18', '19/18', '5/9']]
- Lele (1992) as recalled, tier A, agrees: gideon_fd_d1_p4, gideon_fd_d1_p6, gideon_fd_d1_p8, gideon_fd_d1_p10, gideon_fd_d2_p4, gideon_fd_d2_p6, gideon_fd_face_p4, gideon_fd_face_p6, gideon_fd_face_d1_p4, gideon_fd_face_d1_p6
- Gaitonde and Visbal (2000) as recalled, tier A, agrees: gideon_fd_filter_p2, gideon_fd_filter_p4, gideon_fd_filter_p6, gideon_fd_filter_p8, gideon_fd_filter_p10
The compiled operators:
| Build | Operators | Orders measured | Unresolved | Checks | Failures |
|---|---|---|---|---|---|
| gfortran, R4P | 29 | 0 | 29 | 492166 | 0 |
| gfortran, R8P | 29 | 10 | 19 | 492166 | 0 |
| gfortran, R16P | 29 | 29 | 0 | 492166 | 0 |
| nvfortran -acc, R8P | 29 | 10 | 19 | 492165 | 0 |
On the GPU:
| Build | Right sides bitwise equal | Lines bitwise equal | Worst difference / bound scale |
|---|---|---|---|
| nvfortran -acc, R8P | 444771 of 475136 | 12800 of 14848 |
Findings
- Every compact operator reaches its design order on a periodic line in quadruple precision; double precision resolves 10 of the 29 (the floor
is up to 200 for a filter at ), single precision none. - Each centred operator is non-dissipative to round-off, each biased one dissipative on its upwind side at every mode, each filter's transfer function lies in
and kills the odd-even mode. - The first version of this test had the floor
: it omitted the solve's backward error, and the symbol check failed by up to 1.3 times on the fourth-order operators before any change of the operators. The derivation was corrected (a missing term, not a looser constant), stated in the program's header. - The first version of the registry carried the bands as literals: a wrong library band passed. The registry now reads the library's constants, and a planted wrong band fails L1 and L2.
- On the device the right sides are bitwise equal to the host's except for the filters, whose
the device contracts to multiply-adds: within the bound, of its scale.