-
Notifications
You must be signed in to change notification settings - Fork 34
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
Create a transport interface for switching between AdePT implementations #295
Conversation
Can one of the admins verify this patch? |
ca1421d
to
4c08ef7
Compare
4c08ef7
to
b9bc15f
Compare
b9bc15f
to
9a94b6f
Compare
After the latest changes, I still get errors when linking |
9a94b6f
to
40d7123
Compare
I just did a rebase. The link error for the factory function is hopefully gone, but vecgeom linking has to be tested on Ubuntu. It works on alma9, but that doesn't say much for Ubuntu. |
Thanks for the update! Unfortunately, linking still fails for me on Ubuntu
From our last conversation, maybe we should remove the dynamically linked vecgeom? |
40d7123
to
568635d
Compare
Thanks for helping to debug this. In the end, the solution was to link against the dynamic vecgeomcuda, because the static one doesn't contain marks them as undefined. |
I can confirm that the latest pushed version works flawlessly on Ubuntu |
568635d
to
cd1e0c1
Compare
The CI builds correctly but fails on example1, we need to understand why: |
e7ef590
to
2cf3ac4
Compare
All the cuda linking errors are gone for me in the latest version, however I still get the following:
|
2cf3ac4
to
31035e6
Compare
b8091ff
to
85f9595
Compare
- Refactor the processing of hits. Instead of processing hits by passing a pointer/reference to a HostScoring instance, a loop over iterators to hits is used. In this way, hit scoring is decoupled from the specific implementation of HostScoring, and all classes with the same interface as the original GPUHit can be used for scoring. This facilitates hit scoring for the AsyncTransport implementation. - Move several Geant4 objects into the .cpp to make the integration headers simpler. - Place temporary scoring objects into a struct to go around G4's pool allocators. This prevents a destruction order fiasco (where the pool is gone but the object isn't), and keeps the scoring objects closer in memory. A few objects need to leak, unfortunately, since they are allocated in G4 pools, and the handles don't support them being on a stack. - Improve const correctness in a few places. - Add information about threadID and eventID to the scoring interface. This information is required for AsyncAdePT to score correctly, but is unused in the thread-local transport for now.
- Split the transport from the integration-related parts introducing a new source file. The integration-related parts can be reused in a different transport implementation. - Create a transport abstraction, so AdePTTrackingManager is independent of the transport implementation. - Add thread and event IDs to the transport interface. These are necessary for the async transport implementation. - Start to enumerate tracks in the tracking manager. This can be used to reproducibly seed the AdePT random sequences. - Add some const declarations for the default AdePT implementation. - Use a factory function to instantiate AdePT. Like this, different AdePT implementations can be used without changing code in the tracking manager or in AdePTPhysics. - Replace a few includes with forward declarations. - Fix device link errors that can show when using a symbol in multiple cuda translation units.
85f9595
to
8a6a82f
Compare
new library.
of the transport implementation.
necessary for the async transport implementation.
reproducibly seed the AdePT random sequences.
AdePT implementations can be used without changing code in the tracking
manager or in AdePTPhysics.
cuda translation units.
These two changes don't seem to impact the run times. Here is a diff of the full sorted output of example 1 with 8 ttbar events on 4 threads (including diffing the energy depositions):