-
Notifications
You must be signed in to change notification settings - Fork 57
ee generator slow down in develop #252
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
Comments
tl;dr All slowdowns are due to geometry. Test scenario with same geometry in master and developWith the macro
and mollerMother_test.gdml containing
where those subsystems all all their 'standard' versions (in master), I get consistent running times between develop and master (technically 2 revs before master since I needed a common base for git bisect):
Clearly there is a remaining issue, though!So, then, why for runexample.mac (with 10k events) in develop:
or about 20 times slower??? Using runexample.mac with minimal geometryWhen modifying runexample.mac (with 10k events) in develop to use the minimal geometry above, we get:
So, yeah, this is all geometry. What's in the default runexample.mac geometry that takes so long? Here is the relevant section:
We'll just look at replacing each one of those individually in the minimal version (and hope for no overlaps). Impact of larger worldInstead of a long and skinny world, we have to take a bigger world to fit hall etc
but by itself this change does not do anything:
It does have an impact below when adding the hall. Impact of subTargetRegion
No impact. Impact of hallDaughter_merged(this is an addition, not a replacement of a minimal version by a more complicated "merged" version)
Slow down by a factor 16 or so. Impact of upstreamDaughter_merged
This slows down by a factor 6. Impact of hybridDaughter_merged
No impact. Impact of physics listJust adding QGSP_BERT_HP get us no meaningful slowdown for the minimal geometry above:
Hardly an impact. Impact of stepperChanging to HypothesisI think in the end this may be a combination of a few things:
|
I find this hard to believe ... the branch where I ran into this problem (vacuum_test) I was running a geometry file, merged in develop and noticed the slowdown. It is not clear that epElastic is unaffected (since that one was running pretty quickly before anyway). That is to say, I didn't make changes to the geometry between the two situations (except to remove the folder location .. "geometry_sculpt/hybrid_*" >> "hybrid_**" |
All I can say is that I can modify a simple geometry that does 10k in 30 seconds to a more complicated geometry that does 10k in 10 minutes without changing any binary code. |
Don't you see a similar speedup when you comment out the hall and upstream daughters? Without those, the default runexample.mac (but with 10k events) runs in ~25s. I'm not saying I have a solution... |
some more debugging: branch: vacuum_test Ran 10k events for each of the following. The geometry as is takes about 158s Removing physical volumes from the US file: recompile without parallel world module in remoll. recompile with parallel world module in remoll |
I really wish geant4 had better geometry profiling tools, like producing a top 10 list of volumes where most time was spent... These studies are painful since they aren't prompt. |
figured out that my particular slow down was related to a shower max that was put in last May .. serves me right for merging in without paying close attention to the changes. @wdconinc : sorry for casting so many aspersions ... the geometry was at fault as you found and I should have been more careful. Closing issue as this is just something people have to take care of on their own. |
Environment: (where does this bug occur, have you tried other environments)
Steps to reproduce: (give a step by step account of how to trigger the bug)
Expected Result: (what do you expect when you execute the steps above)
Same computation time.
Actual Result: (what do you get when you execute the steps above)
3.5x slower simulation.
@wdconinc confirmed this:
The text was updated successfully, but these errors were encountered: