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

Klein-Nishina CPU performance application #57

Merged
merged 3 commits into from
Oct 22, 2020

Conversation

tmdelellis
Copy link
Contributor

This adds a CPU version of the Klein Nishina application. The same driver will work for both applications. CELERITAS_USE_CUDA must still be enabled to use the app because it will do some spurious copies to the device during the cross section setup (this does not get factored into runtime comparisons).

The same driver code works for both applications except of course that the grid_params gets ignored. To see an example and runtime comparisons between the CPU and GPU code see https://github.com/celeritas-project/benchmarks/blob/master/klein-nishina/celeritas-results-cpu/analysis.ipynb.

This app does a traditional loop-based (history) approach for the tracks. It does not implement the same event loop algorithm as in the GPU case. Generally, the history approach is more efficient on the CPU side than the event approach, so this gives a fairer optimal-to-optimal comparison of runtimes.

@tmdelellis tmdelellis added this to the Y1Q3 Goals milestone Oct 21, 2020
@tmdelellis tmdelellis self-assigned this Oct 21, 2020
@dalg24-jenkins
Copy link

Can one of the admins verify this patch?

@tmdelellis tmdelellis changed the title Kn cpu app Klein-Nishina CPU performance application Oct 21, 2020
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Looks pretty good! A couple of minor comments.

CMakeLists.txt Outdated Show resolved Hide resolved
app/CMakeLists.txt Outdated Show resolved Hide resolved
app/demo-interactor/HostKNDemoRunner.hh Outdated Show resolved Hide resolved
app/demo-interactor/detail/DetectorUtils.cu Show resolved Hide resolved
app/demo-interactor/HostKNDemoRunner.cc Outdated Show resolved Hide resolved
app/demo-interactor/HostKNDemoRunner.cc Outdated Show resolved Hide resolved
@sethrj sethrj self-requested a review October 22, 2020 01:44
@sethrj sethrj merged commit d1b6cb2 into celeritas-project:master Oct 22, 2020
@sethrj
Copy link
Member

sethrj commented Oct 22, 2020

Thanks for the CPU port @tmdelellis !

@tmdelellis tmdelellis deleted the kn-cpu-app branch October 22, 2020 02:06
@sethrj sethrj added enhancement New feature or request app Application front ends labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Application front ends enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants