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
Update OscarMTProducer initialisation #31022
Conversation
The code-checks are being triggered in jenkins. |
+core |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31022/17503
|
A new Pull Request was created by @civanch (Vladimir Ivantchenko) for master. It involves the following packages: SimG4Core/Application @cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
+Core |
The tests are being triggered in jenkins.
|
@makortel or @Dr15Jones , please, check that the move of Geant4 initialisation from produce(...) to beginRun(...) is done in an optimal way. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
<< " thread " << getThreadIndex() << " initializing"; | ||
edm::LogWarning("SimG4CoreApplication") | ||
<< "RunManagerMTWorker::produce(): stream " << inpevt.streamID() << " thread " << getThreadIndex() | ||
<< " initializing in the produce(..) method - there is a problem"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call to initializeG4()
in produce()
should not be an indication of a problem. The framework does not guarantee that all TBB worker threads would call the beginRun()
. Therefore it is expected that for some threads the produce()
is the first function in OscarMTProducer
they call (which is why the code was crafted that way).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@makortel , thanks for explanation. In the next PR I will substitute Warning by Verbatim. One of the reason to move initialisation at beginRun(..) is to take out initialisation from the event loop, so this will not affect CPU measurements. For the case, when streams do not coincide with threads we will still have initialisation at the 1st event.
Technically this PR should not cause problems, but the behavior is now a little bit more confusing to understand, because some threads |
PR description:
Initialisation of Geant4 in OscarMTProducer is moved to the beginRun(....) method.
Header files of producers are moved to plugins directory.
PR validation:
private
if this PR is a backport please specify the original PR and why you need to backport that PR:
no backport