8 from AthenaCommon.Logging
import log
as msg
10 from AthenaCommon.ConcurrencyFlags
import jobproperties
as jp
11 nThreads = jp.ConcurrencyFlags.NumThreads()
13 msg.fatal(
'numThreads must be >0. Did you set the --threads=N option?')
14 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
20 from AthenaServices.AthenaServicesConf
import AthenaHiveEventLoopMgr
23 from StoreGate.StoreGateConf
import SG__HiveMgrSvc
26 from GaudiHive.GaudiHiveConf
import AlgResourcePool
29 from AthenaCommon.AlgScheduler
import AlgScheduler
30 AlgScheduler.OutputLevel( INFO )
31 AlgScheduler.ShowControlFlow(
True )
32 AlgScheduler.ShowDataDependencies(
True )
47 from AthenaCommon.AlgSequence
import AlgSequence
50 from SGComps.SGCompsConf
import SGInputLoader
51 topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=
False)
52 topSequence.SGInputLoader.Load = { (
'EventInfo',
'StoreGateSvc+McEventInfo') }
54 from xAODEventInfoCnv.xAODEventInfoCnvConf
import xAODMaker__EventInfoCnvAlg
55 topSequence += xAODMaker__EventInfoCnvAlg()
59 topSequence+=
AlgT(OutputLevel=DEBUG)
61 AlgT = topSequence.AlgT
70 AlgT.Tool1.Key_R1 =
"t1"
71 AlgT.Tool1.Key_W1 =
"t2"
76 AlgT.Tool2.Key_R1 =
"t2"
77 AlgT.Tool2.Key_W1 =
"t3"
82 AlgT.Tool3.Key_R1 =
"t3"
83 AlgT.Tool3.Key_W1 =
"t4"
92 nProc = jp.ConcurrencyFlags.NumProcs()
98 import AthenaCommon.AtlasUnixGeneratorJob
104 from AthenaCommon.Logging
import log
as msg
105 if (theApp.EvtMax == -1) :
106 msg.fatal(
'EvtMax must be >0 for hybrid configuration')
107 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
109 if ( theApp.EvtMax % nProc != 0 ) :
110 msg.warning(
'EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
112 chunkSize = int (theApp.EvtMax / nProc)
114 from AthenaMP.AthenaMPFlags
import jobproperties
as jps
115 jps.AthenaMPFlags.PreCountedEvents=theApp.EvtMax
116 jps.AthenaMPFlags.ChunkSize= chunkSize
118 msg.info(
'AthenaMP workers will process %s events each',chunkSize)
125 algCardinality = jp.ConcurrencyFlags.NumThreads()
127 if (algCardinality != 1):
128 for alg
in topSequence:
130 alg.Cardinality = algCardinality