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

Fix intermittent CI failures due to corrupt XML #1431

Closed sethrj closed 1 month ago

sethrj commented 2 months ago

Currently the CI fails occasionally due to multiple tests (the ones with "filter") writing to the same XML filename chosen by googletest's default.

Instead of using that filename, a new CMake option passed to the test generator tells google test the exact file name for each test including filter and processor count. Test outputs now look like:

celeritas_global_StepperGeant_TestEm_LeadBox_.xml
celeritas_global_StepperGeant_TestEm3Compton_.xml
celeritas_global_StepperGeant_TestEm3Msc_.xml
celeritas_global_StepperGeant_TestEm3MscNofluct_.xml
celeritas_global_StepperGeant_TestEm3NoMsc_.xml
celeritas_global_StepperGeant_TestEm15FieldMsc_.xml

instead of:

global_StepperGeant_1.xml
global_StepperGeant.xml

where multiple files may write to _1.xml at the same time due to the race condition.

github-actions[bot] commented 2 months ago

Test summary

 3 244 files   5 042 suites   3m 39s :stopwatch:  1 516 tests  1 490 :white_check_mark: 26 :zzz: 0 :x: 16 822 runs  16 760 :white_check_mark: 62 :zzz: 0 :x:

Results for commit ddd6170b.

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

sethrj commented 2 months ago

@pcanal This is ready. I've verified both the updated test names and the reduced artifact download at https://github.com/sethrj/celeritas/actions/runs/11072978145/job/30768477521 .