Support multithreading in Geant4EDM4hepOutput plugin - #1417
Merged
MarkusFrankATcernch merged 3 commits intoMar 13, 2025
Conversation
Test Results 16 files 16 suites 6h 13m 12s ⏱️ Results for commit d6d8030. ♻️ This comment has been updated with latest results. |
Contributor
|
@tmadlener Thomas, could you please verify? |
Contributor
|
@tmadlener Ooops sorry, I did not realize that the change is actually trivial before asking you. Sorry. |
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 adds multithreading support to Geant4EDM4hepOutput. This is approached by:
m_fileunique_ptr to podio::ROOTWriter is only made once,Additional notes:
context()->run()fails becauserunPtr()is null in multithreaded running; this leads to missingrunsandmetaframes. EDIT: this is not consistent... not sure why not...m_particlesinto the frame, the collection is left with a nullm_storageMtxmutex pointer; this is avoided by not usingclear()butmovingassigning a clean new collection in place (Line 322). I suspect theclear()was added in analogy to theclear()calls below, but those are onmaps, not podio collections.Testing:
DG4/examples/SiDSim_MT.pywith the following diff:TODO:
SiDSim.pynorSiDSim_MT.pyis already used for tests. Suggestions welcome.BEGINRELEASENOTES
ENDRELEASENOTES