Skip to content
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

First steps for using Geant4 MT #4370

Merged
merged 24 commits into from Jun 25, 2014

Conversation

makortel
Copy link
Contributor

This PR takes first steps towards using Geant4MT in CMSSW. Most modifications are in OscarMTProducer and in new MT-specific classes in order to not interfere with the current OscarProducer. DDDWorld was, however, slightly modified, but the changes should be fine for OscarProducer.

What is implemented:

  • std::thread launched from OscarMTProducer::globalBeginRun() for the Geant4 "master thread"
    • Encapsulated in OscarMTMasterThread (edm::RunCache of OscarMTProducer)
    • synchronization with the CMSSW thread and the master thread with mutex+condition variable
  • Geant4 initialization in the master thread (RunManagerMT)
  • Sharing geometry and physics list to RunManagerMTWorker, run in the CMSSW threads

Changes have been tested such that when splitting the step1 of wf 1.0 to GEN and SIM parts, the SIM job does not crash with OscarMTProducer.

Should not affect regular OscarProducer.

Presented in Simulation meeting June 24 2014 https://indico.cern.ch/event/323926/

FYI @civanch, @davidlange6, @Dr15Jones

…nagerMTInit

The Service object and the objects from EventSetup must be retrieved
in a CMSSW thread.
Using edm::ParameterSet as a global cache feels a bit dirty, but
currently it is needed in globalBeginRun. Maybe OscarMTMasterThread
object should be the global cache and have some kind of hooks for
begin/endRun().
…roducer

Because the SimProducers have to register what they produce
In order to use it from RunManagerMTWorker
Introduces a memory leak, but avoids a semi-random segfault.
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @makortel (Matti Kortelainen) for CMSSW_7_2_X.

First steps for using Geant4 MT

It involves the following packages:

SimG4Core/Application
SimG4Core/Geometry

@cmsbuild, @civanch, @Degano, @mdhildreth, @nclopezo can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.

@civanch
Copy link
Contributor

civanch commented Jun 25, 2014

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes or unless it breaks tests.

davidlange6 added a commit that referenced this pull request Jun 25, 2014
First steps for using Geant4 MT
@davidlange6 davidlange6 merged commit 2b95f4a into cms-sw:CMSSW_7_2_X Jun 25, 2014
@makortel makortel deleted the geant10mt_step1 branch October 20, 2016 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants