-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
radiation_map_setup Performance with Bunch Tracking #523
Comments
A quick running of the revised code shows a time improvement of around 12%. I will investigate further... |
Fixed based upon PR #532 implemented. |
Thanks! Looks like things scale with the number of particles. Got a pretty solid speedup with the new code for my application. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey folks, I am debugging a performance problem related to bunch tracking with radiation fluctuations turned on and thought I would open a github issue related to this.
I have made a minimal working example of tracking a bunch with CSR and radiation fluctuations which is on the CLASSE file system at the path
/nfs/acc/temp/electronsandstuff/csr-radiation-profiling
. In order to profile the code, I was able to compile bmad + tao with debugging symbols enabled and can then run it with the OSX "Instruments" tool due to grpof not being available on that OS.The results are below.
One of the most expensive parts of the calculation is the subroutine
radiation_map_setup
which takes up about 20% of the programs running time. It seems to be called for every particle in the bunch and at first I thought it was the calculation of the map itself that was causing performance problems. However, looking into the code it seems like there is some caching already there (ie theele%rad_map%stale
check).Instead, it seems like all of the time is getting spent in memory operations related to the two
ele_struct
objects which are performed regardless of whether it computes the radiation map or not. If there was a way to avoid doing these memory operations for every particle, the tracking could probably be sped up quite a bit. Maybe the stale check could be done intrack1_radiation
instead before the setup code is called?The text was updated successfully, but these errors were encountered: