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/user/index.html
Other
58 stars 32 forks source link

Add configure-time `CELERITAS_OPENMP` switch to change threading #1222

Closed sethrj closed 2 months ago

sethrj commented 2 months ago

Event-level OpenMP was added in #774 to more accurately represent the behavior of Geant4 integration. Unfortunately we found that OpenMP isn't up to the task of efficiently threading both track-parallel and event-parallel (see also #1073). This adds a configure option to switch between track-level parallelism (inside a kernel) and event-level (for now, only in celer-sim). Since track-level parallelism isn't ideal for CPU (striding, integration, etc.) the default is set to event-level, and furthermore a warning is emitted at configure time if track-level parallelism is enabled alongside Geant4 MT (see #1056).

Supersedes #1220