Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configure-time CELERITAS_OPENMP switch to change threading #1222

Merged
merged 8 commits into from
May 7, 2024

Conversation

sethrj
Copy link
Member

@sethrj sethrj commented May 7, 2024

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

@sethrj sethrj added core Software engineering infrastructure performance Changes for performance optimization labels May 7, 2024
Copy link
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good to me.

src/celeritas/track/detail/TrackSortUtils.cc Outdated Show resolved Hide resolved
src/corecel/math/Atomics.hh Outdated Show resolved Hide resolved
src/celeritas/global/ActionLauncher.hh Outdated Show resolved Hide resolved
Co-authored-by: Amanda Lund <alund@anl.gov>
@sethrj sethrj merged commit 12c9dbe into celeritas-project:develop May 7, 2024
27 of 28 checks passed
@sethrj sethrj deleted the single-thread-qol branch May 7, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Software engineering infrastructure performance Changes for performance optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants