celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/
Other
65 stars 35 forks source link

Loosen numerically iffy test tolerance #1435

Closed esseivaju closed 1 month ago

esseivaju commented 1 month ago

The InvoluteSolver test fails on Perlmutter because the precision is too strict.

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:392: Failure
Value of: dist_on[0]
  Actual: 0.0017713715293239856
Expected: 0.0017713715293786088
Which is: 0.0017713715293786088
(Relative error -3.0836664554021502e-11 exceeds tolerance 9.9999999999999998e-13)

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:409: Failure
Value of: dist_off[0]
  Actual: 0.0017713715293239856
Expected: 0.0017713715293786088
Which is: 0.0017713715293786088
(Relative error -3.0836664554021502e-11 exceeds tolerance 9.9999999999999998e-13)

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:432: Failure
Value of: dist_on[0]
  Actual: 0.00053216327768802003
Expected: 0.00053216327674743909
Which is: 0.00053216327674743909
(Relative error 1.7674668425285303e-09 exceeds tolerance 9.9999999999999998e-13)

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:449: Failure
Value of: dist_off[0]
  Actual: 0.00053216327768802003
Expected: 0.00053216327674743909
Which is: 0.00053216327674743909
(Relative error 1.7674668425285303e-09 exceeds tolerance 9.9999999999999998e-13)

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:573: Failure
Value of: dist_on[0]
  Actual: 0.00195043766381975
Expected: 0.0019504376639951655
Which is: 0.0019504376639951655
(Relative error -8.9936457836800689e-11 exceeds tolerance 9.9999999999999998e-13)

/global/cfs/cdirs/atlas/esseivaj/devel/celeritas/test/orange/surf/detail/InvoluteSolver.test.cc:590: Failure
Value of: dist_off[0]
  Actual: 0.00195043766381975
Expected: 0.0019504376639951655
Which is: 0.0019504376639951655
(Relative error -8.9936457836800689e-11 exceeds tolerance 9.9999999999999998e-13)

I have to significantly reduce the precision for the test to pass. Maybe we can refactor the computation so that we don't lose that much precision?

github-actions[bot] commented 1 month ago

Test summary

 3 249 files   5 047 suites   3m 42s :stopwatch:  1 520 tests  1 493 :white_check_mark: 27 :zzz: 0 :x: 16 838 runs  16 776 :white_check_mark: 62 :zzz: 0 :x:

Results for commit c8e7404b.

:recycle: This comment has been updated with latest results.