Early steps to migrate Generators code to use IAthRNGSvc
The main purpose of this merge request is to allow Generator interfaces to use 64-bit random seeds and in so doing properly support seeding using larger event numbers INT_MAX
. This is a deliverable for MC23.
All Generators have been migrated to use the thread-safe IAthRNGSvc
. However, currently all generators are only run in serial Athena. In order to avoid excessive calls to Gaudi::Hive::currentContext()
, the approach taken to interface the random number calls of the various generators with the CLHEP::HepRandomEngine
instance(s) provided by IAthRNGSvc
is unfortunately still very much thread-unsafe.
Suggestions for a more thread-safe interface are very much welcomed, but we would prefer to leave this for a follow-up merge request.
Merge request reports
Activity
added 308 commits
-
79d58005...5a934e24 - 303 commits from branch
atlas:master
- 9ce789c1 - Migrate GenModule to IAthRNGSvc
- 4bdf91d5 - Migrate BeamHaloGenerator to IAthRNGSvc
- 44b07fef - Migrate ParticleDecayer to IAthRNGSvc
- 3a73a1aa - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 79fb274b - Migrate Herwig7_i to use IAthRNGSvc
Toggle commit list-
79d58005...5a934e24 - 303 commits from branch
added 413 commits
-
79fb274b...d66bfada - 408 commits from branch
atlas:master
- bf18dd6d - Migrate GenModule to IAthRNGSvc
- edf6dc56 - Migrate BeamHaloGenerator to IAthRNGSvc
- fcac8ea0 - Migrate ParticleDecayer to IAthRNGSvc
- 7e38834f - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 2d408b77 - Migrate Herwig7_i to use IAthRNGSvc
Toggle commit list-
79fb274b...d66bfada - 408 commits from branch
added 14 commits
- 470f2ce2 - Migrate GenModule to IAthRNGSvc
- 87155ba0 - Migrate BeamHaloGenerator to IAthRNGSvc
- cce7bd2b - Migrate ParticleDecayer to IAthRNGSvc
- 392d57d8 - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- b846cb80 - Migrate Herwig7_i to use IAthRNGSvc
- 65418e20 - Helper functions from random seed calculation
- e48d9ccd - Use RandomSeed rather than RandomSeedTfArg property
- 20d25ecb - DSID should be an int (MCChannelNumber)
- f3ad1455 - Migrate GeneratorFilters to IAthRNGSvc (part 2)
- 4033bfe8 - Migrate CavernBkgGenerator to IAthRNGSvc
- 1b7ad1c7 - Migrate CosmicGenerator to IAthRNGSvc
- 0cd92fb3 - Migrate Pythia8_i to IAthRNGSvc
- 518b30e7 - Migrate Starlight_i to IAthRNGSvc
- 06e5166d - Migrate Sherpa_i to IAthRNGSvc
Toggle commit listadded 85 commits
-
06e5166d...4c1e11e9 - 71 commits from branch
atlas:master
- 71181b85 - Migrate GenModule to IAthRNGSvc
- 624bd988 - Migrate BeamHaloGenerator to IAthRNGSvc
- d44bcf2e - Migrate ParticleDecayer to IAthRNGSvc
- 92df652a - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 28df4e16 - Migrate Herwig7_i to use IAthRNGSvc
- 1c0f5ccd - Helper functions from random seed calculation
- 0b01a88a - Use RandomSeed rather than RandomSeedTfArg property
- 72e7a277 - DSID should be an int (MCChannelNumber)
- e1ddedeb - Migrate GeneratorFilters to IAthRNGSvc (part 2)
- 6cf19a93 - Migrate CavernBkgGenerator to IAthRNGSvc
- cb729c5c - Migrate CosmicGenerator to IAthRNGSvc
- 057d22b6 - Migrate Pythia8_i to IAthRNGSvc
- 5b40a16a - Migrate Starlight_i to IAthRNGSvc
- ff386dfc - Migrate Sherpa_i to IAthRNGSvc
Toggle commit list-
06e5166d...4c1e11e9 - 71 commits from branch
This merge request affects 15 packages:
- Control/AthenaKernel
- Generators/BeamHaloGenerator
- Generators/CavernBkgGenerator
- Generators/CosmicGenerator
- Generators/Epos_i
- Generators/EvgenJobTransforms
- Generators/GeneratorFilters
- Generators/GeneratorModules
- Generators/Herwig7_i
- Generators/ParticleDecayer
- Generators/Pythia8B_i
- Generators/Pythia8_i
- Generators/QGSJet_i
- Generators/Sherpa_i
- Generators/Starlight_i
Affected files list will not be printed in this case
Adding @martindl ,@adbailey ,@xiaozhon ,@ssnyder as watchers
added Core Generators JetEtmiss Tau master labels
CI Result FAILURE (hash ff386dfc)Athena AthSimulation AthGeneration AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 3, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 1, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 62261]added 21 commits
-
ff386dfc...b95d33ac - 4 commits from branch
atlas:master
- 74562359 - Migrate GenModule to IAthRNGSvc
- b6781fcb - Migrate BeamHaloGenerator to IAthRNGSvc
- 3f9e6395 - Migrate ParticleDecayer to IAthRNGSvc
- 6ab16356 - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 831c41db - Migrate Herwig7_i to use IAthRNGSvc
- 48537388 - Helper functions from random seed calculation
- de16320f - Use RandomSeed rather than RandomSeedTfArg property
- 723d8790 - DSID should be an int (MCChannelNumber)
- 14b8ef4c - Migrate GeneratorFilters to IAthRNGSvc (part 2)
- 4620d94e - Migrate CavernBkgGenerator to IAthRNGSvc
- 7f6c02f6 - Migrate CosmicGenerator to IAthRNGSvc
- 87e87714 - Migrate Pythia8_i to IAthRNGSvc
- bb359f1a - Migrate Starlight_i to IAthRNGSvc
- 505ab1ce - Migrate Sherpa_i to IAthRNGSvc
- df248006 - Migrate TrackRecordGenerator to IAthRNGSvc
- 8de6780c - Migrate FastChainPileup to IAthRNGSvc
- 3a0ff591 - Tidy up Pythia8_i constructor
Toggle commit list-
ff386dfc...b95d33ac - 4 commits from branch
added 17 commits
- 81df7db2 - Migrate GeneratorFilters to IAthRNGSvc (part 2)
- 335f6654 - Helper functions from random seed calculation
- 33105f15 - Use RandomSeed rather than RandomSeedTfArg property
- 38b3ca96 - DSID should be an int (MCChannelNumber)
- 21ae410c - Migrate GenModule to IAthRNGSvc
- 2bcacec0 - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 675a449b - Migrate BeamHaloGenerator to IAthRNGSvc
- b7feac15 - Migrate ParticleDecayer to IAthRNGSvc
- d84ed67e - Migrate Herwig7_i to use IAthRNGSvc
- 76b0004c - Migrate CavernBkgGenerator to IAthRNGSvc
- 99cd356c - Migrate CosmicGenerator to IAthRNGSvc
- b5f9480e - Migrate Pythia8_i to IAthRNGSvc
- 51f559ab - Tidy up Pythia8_i constructor
- d16a9114 - Migrate Starlight_i to IAthRNGSvc
- 3ed068b6 - Migrate Sherpa_i to IAthRNGSvc
- 6512f75b - Migrate TrackRecordGenerator to IAthRNGSvc
- bebba408 - Migrate FastChainPileup to IAthRNGSvc
Toggle commit list- Resolved by John Derek Chapman
Hi @jchapman I tested using H7 generator with: Gen_tf.py --jobConfig=421106 --maxEvents=10 --outputEVNTFile=bla.root --randomSeed=123123 > bla.out &
One needs to comment out this line: https://gitlab.cern.ch/jchapman/athena/-/blob/GenModuleRNG_master/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py#L520
H7 crashed on https://gitlab.cern.ch/jchapman/athena/-/blob/GenModuleRNG_master/Generators/Herwig7_i/src/Herwig7.cxx#L74 but accepted when I used instead of https://gitlab.cern.ch/jchapman/athena/-/blob/GenModuleRNG_master/Generators/Herwig7_i/src/Herwig7.cxx#L74-79 long combined_seed = engine->getSeed();
Unfortunately later crashed on FixHepMC, which may be connected with some wrong initialisation of H7, because normally the JOs work without problems.
A log from normal running in HepMC3 master: https://atlas-art-data.web.cern.ch/atlas-art-data/local-output/master--HepMC3/AthGeneration/x86_64-centos7-gcc11-opt/2022-11-23T2001/EvgenJobTransforms/test_gen_herwig7_dijet/stdout.txt
Edited by Ewelina Maria Lobodzinska
- Resolved by John Derek Chapman
- Resolved by John Derek Chapman
- Resolved by John Derek Chapman
- Resolved by John Derek Chapman
- Resolved by John Derek Chapman
added 48 commits
-
3334f5e0...f01404ff - 26 commits from branch
atlas:master
- f01ab1d9 - Migrate GeneratorFilters to IAthRNGSvc (part 2)
- 972f5151 - Helper functions from random seed calculation
- 2548b2c3 - Use RandomSeed rather than RandomSeedTfArg property
- 5ea23e16 - DSID should be an int (MCChannelNumber)
- b5fc3e16 - Migrate GenModule to IAthRNGSvc
- ea47f3fc - Add a method to GenModule to provide a CLHEP::HepRandomEngine during initialize
- 7dc2e297 - Migrate BeamHaloGenerator to IAthRNGSvc
- 14e38ce6 - Migrate ParticleDecayer to IAthRNGSvc
- 303305b8 - Migrate Herwig7_i to use IAthRNGSvc
- fe583983 - Migrate CavernBkgGenerator to IAthRNGSvc
- c9775ae1 - Migrate CosmicGenerator to IAthRNGSvc
- 4ab42c06 - Migrate Pythia8_i to IAthRNGSvc
- 94a27447 - Tidy up Pythia8_i constructor
- 3230adc2 - Migrate Starlight_i to IAthRNGSvc
- 5f630e29 - Migrate Sherpa_i to IAthRNGSvc
- 3f4f356e - Migrate TrackRecordGenerator to IAthRNGSvc
- f3e15b6a - Migrate FastChainPileup to IAthRNGSvc
- 87e5c05c - Migrate Pythia8B_i to IAthRNGSvc
- ee45ed9c - Fix typo random seed setting
- a97b5f28 - Comment out setting seeds for non-thread-safe random number service
- b53902df - Set slot to zero when retrieving random number streams during init
- 56c2d4c6 - Fix Pythia8B_i
Toggle commit list-
3334f5e0...f01404ff - 26 commits from branch