Refactor AdePT into 2 libraries 5: Refactor G4HepEm data management, unify initialization#520
Open
SeverinDiederichs wants to merge 5 commits intoapt-sim:masterfrom
Open
Conversation
|
Can one of the admins verify this patch? |
d523d78 to
959482a
Compare
959482a to
b605b08
Compare
2 tasks
Collaborator
Author
|
Solved: The issue was the ownership of the This is fixed by doing a deep copy of the That means: each G4 worker owns a G4HepEmTrackingManager, which owns G4HepEmParameters. At the same time, the global AdePTTransport owns its own G4HepEmParameters, which it needs it for the GPU upload. |
… it from worker, as data might be deleted before the AdePTTransport is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR belongs to the refactor of AdePT described in #516.
This PR is baed on #521 and should not be reviewed before that one is merged.
This PR moves the G4HepEm host-data preparation out of
AsyncAdePTTransportinto a dedicated host-side helper and unifies the initialization.Before the initialization was:
With this PR, the G4HepEm initialization is factored out of the AdePTTransport initialization.
This allows for a cleaner workflow:
Until now, the transport rebuilt the HepEm host data internally and then also used it to steer the remaining host-side initialization. This made the initialization flow harder to follow and mixed host preparation with device-side transport setup.
The G4HepEm data is now factored out into a
HepEmHostDataclass, which takes care of the initialization and life-time management.It was verified that this PR