Commit bb9884d
authored
Print maximum relative error when checksums fail (#6252)
This PR adds a print of the maximum relative error when checksums fail,
which I think is quite useful when they fail for many "keys" and/or many
tests (e.g., #5955, #6248) - the maximum relative error gives a glimpse
of how good or bad things are.
This is an example of the new output, with the extra line printing the
maximum relative error:
```
...
ERROR: Benchmark and output file checksum have different value for key [lev=0,Ex]
Benchmark: [lev=0,Ex] 9.408402900367834e+05
Test file: [lev=0,Ex] 9.409402900367834e+05
Absolute error: 1.00e+02
Relative error: 1.06e-04
ERROR: Benchmark and output file checksum have different value for key [lev=0,Ez]
Benchmark: [lev=0,Ez] 6.654423300420902e+05
Test file: [lev=0,Ez] 6.754423300420902e+05
Absolute error: 1.00e+04
Relative error: 1.50e-02
ERROR: Benchmark and output file checksum have different value for key [lev=0,jx]
Benchmark: [lev=0,jx] 9.956269465957083e+03
Test file: [lev=0,jx] 9.956269365957083e+03
Absolute error: 1.00e-04
Relative error: 1.00e-08
Maximum relative error: 1.50e-02
New checksums file test_2d_larmor.json:
...
```
Feel free to close the PR without merging if you think this is not
useful.1 parent 4a62fe0 commit bb9884d
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| 298 | + | |
| 299 | + | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| |||
0 commit comments