Skip to content

A4 Compact operators ​

IDGroupTypeBackendsFigureProgram
A4AccuracyAPython (100 digits); CPU (gfortran R4P, R8P, R16P; nvfortran; ifx); GPU (OpenACC)noscripts/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 ​

ItemChoiceCode
L1 rowsevery row exact on xj, j≤K = order + n − 1: |∑oαoT(xj)(o)−r|≤64ε(∑|w|max|q|+∑|α|max|T|); on xK+1 the generator's exact residual (filters at αf = 0, 0.3, 0.45)gideon_test_lines.F90
L2 ordersg=sin⁡(x+0.4)+0.5cos⁡(2x−0.2)+0.3sin⁡(3x+1.1) on 8 … 65536 points of [0,2π), solved; a plateau of three resolved sizes, both observed orders ≥ design − 0.25; every operator measured in R16P (required)
Round-off floorε∑|w|max|q|/hn⋅F, F=(1+∑|α|/s)/s, s the band's smallest symbol: the right side's round-off and the solve's backward error, through the inverse band
L4 symbolson 64 points, the solve of each mode = the kernel's symbol over the band's; centred: real for an even n, imaginary for an odd one; biased: the flux difference dissipative on its side; filters: a real transfer function in [0,1], the odd-even mode removed
Mirrorspbl's right side on mirrored data = pbr's, bitwise
L5 device16384 right sides and 512 lines of 128 points per operator on the device against the host
Registrygideon_test_lines_registry.F90, generated: the bands are gideon_tables' constants

Program ​

bash
./exe/gideon_test_lines
./exe-r16/gideon_test_lines   # every order measured

Results ​

The operators, from the generator (the bands and the residuals are exact rationals):

OperatorUnknowns atOrderBandBand coefficientsRight windowRow residual on xK+1
fd_d1_p4nodes, from point values4tri1/4 1 1/4q(-1:1)1
fd_d1_p6nodes, from point values6tri1/3 1 1/3q(-2:2)−4
fd_d1_p8nodes, from point values8penta1/36 4/9 1 4/9 1/36q(-2:2)16
fd_d1_p10nodes, from point values10penta1/20 1/2 1 1/2 1/20q(-3:3)−144
fd_d2_p4nodes, from point values4tri1/10 1 1/10q(-1:1)18/5
fd_d2_p6nodes, from point values6tri2/11 1 2/11q(-2:2)−184/11
fd_d2_p8nodes, from point values8penta23/2358 344/1179 1 344/1179 23/2358q(-2:2)12640/131
fd_d2_p10nodes, from point values10penta43/1798 334/899 1 334/899 43/1798q(-3:3)−891360/899
fd_filter_p2nodes, from point values2triαf 1 αfq(-1:1)−1/2
fd_filter_p4nodes, from point values4triαf 1 αfq(-2:2)3/2
fd_filter_p6nodes, from point values6triαf 1 αfq(-3:3)−45/4
fd_filter_p8nodes, from point values8triαf 1 αfq(-4:4)315/2
fd_filter_p10nodes, from point values10triαf 1 αfq(-5:5)−14175/4
fd_face_p4faces, from point values4tri1/6 1 1/6q(0:1)1/4
fd_face_p6faces, from point values6tri3/10 1 3/10q(-1:2)−9/16
fd_face_p8faces, from point values8penta1/70 2/5 1 2/5 1/70q(-1:2)9/4
fd_face_p10faces, from point values10penta5/126 10/21 1 10/21 5/126q(-2:3)−225/16
fd_face_d1_p4faces, from point values4tri1/22 1 1/22q(0:1)17/44
fd_face_d1_p6faces, from point values6tri9/62 1 9/62q(-1:2)−549/496
fd_face_d1_p8faces, from point values8penta183/51338 6114/25669 1 6114/25669 183/51338q(-1:2)621441/102676
fd_face_d1_p10faces, from point values10penta9675/577058 96850/288529 1 96850/288529 9675/577058q(-2:3)−211299525/4616464
fv_face_p4faces, from cell averages4tri1/4 1 1/4q(0:1)1/5
fv_face_p6faces, from cell averages6tri1/3 1 1/3q(-1:2)−4/7
fv_face_p8faces, from cell averages8penta1/36 4/9 1 4/9 1/36q(-1:2)16/9
fv_face_p10faces, from cell averages10penta1/20 1/2 1 1/2 1/20q(-2:3)−144/11
fv_face_pbr5faces, from cell averages5tri1/6 1 1/2q(0:2)−1/3
fv_face_pbl5faces, from cell averages5tri1/2 1 1/6q(-1:1)1/3
fv_face_pbr7faces, from cell averages7tri1/4 1 1/2q(-1:3)3/2
fv_face_pbl7faces, from cell averages7tri1/2 1 1/4q(-2:2)−3/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:

BuildOperatorsOrders measuredUnresolvedChecksFailures
gfortran, R4P290294921660
gfortran, R8P2910194921660
gfortran, R16P292904921660
nvfortran -acc, R8P2910194921650

On the GPU:

BuildRight sides bitwise equalLines bitwise equalWorst difference / bound scale
nvfortran -acc, R8P444771 of 47513612800 of 148482.0⋅10−17

Findings ​

  • Every compact operator reaches its design order on a periodic line in quadruple precision; double precision resolves 10 of the 29 (the floor F is up to 200 for a filter at αf=0.45), 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 [0,1] and kills the odd-even mode.
  • The first version of this test had the floor 1/s: 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 (R+αA)q the device contracts to multiply-adds: within the bound, 2⋅10−17 of its scale.

Released under your choice of GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT.