9 from AthenaCommon.Logging
import log
as msg
11 from AthenaCommon.ConcurrencyFlags
import jobproperties
as jp
12 nThreads = jp.ConcurrencyFlags.NumThreads()
14 msg.fatal(
'numThreads must be >0. Did you set the --threads=N option?')
15 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
21 from AthenaServices.AthenaServicesConf
import AthenaHiveEventLoopMgr
24 from StoreGate.StoreGateConf
import SG__HiveMgrSvc
27 from GaudiHive.GaudiHiveConf
import AlgResourcePool
30 from AthenaCommon.AlgScheduler
import AlgScheduler
31 AlgScheduler.OutputLevel( INFO )
32 AlgScheduler.ShowControlFlow(
True )
33 AlgScheduler.ShowDataDependencies(
True )
34 AlgScheduler.setDataLoaderAlg(
"SGInputLoader" )
38 from GaudiHive.GaudiHiveConf
import ThreadPoolSvc
39 svcMgr += ThreadPoolSvc(
"ThreadPoolSvc")
40 svcMgr.ThreadPoolSvc.ThreadInitTools = [
"ThreadInitTool"]
42 from GaudiHive.GaudiHiveConf
import AlgResourcePool
43 svcMgr += AlgResourcePool(OutputLevel=DEBUG)
61 from AthenaCommon.AlgSequence
import AlgSequence
64 from SGComps.SGCompsConf
import SGInputLoader
65 topSequence+=SGInputLoader(OutputLevel=INFO, ShowEventDump=
False)
68 HA =
HiveAlgA(
"AlgA",OutputLevel=DEBUG,Time=20)
69 HB =
HiveAlgB(
"AlgB",OutputLevel=DEBUG,Time=10)
70 HC =
HiveAlgC(
"AlgC",OutputLevel=DEBUG,Time=190)
71 HE =
HiveAlgE(
"AlgE",OutputLevel=DEBUG,Time=10)
74 from AthenaCommon.AlgSequence
import AthSequencer
78 HL1 =
HiveAlgL1(
"AlgL1",OutputLevel=DEBUG,Key_W1=loopKey,Time=110)
79 HL2 =
HiveAlgL2(
"AlgL2",OutputLevel=DEBUG,Key_R1=loopKey,Key_U1=loopKey,Time=320)
80 HL3 =
HiveAlgL3(
"AlgL3",OutputLevel=DEBUG,Key_U1=loopKey,Time=120)
83 HM =
HiveAlgM(
"AlgM",OutputLevel=DEBUG,Key_R2=loopKey,Offset=3,Time=30)
103 nProc = jp.ConcurrencyFlags.NumProcs()
109 import AthenaCommon.AtlasUnixGeneratorJob
115 from AthenaCommon.Logging
import log
as msg
116 if (theApp.EvtMax == -1) :
117 msg.fatal(
'EvtMax must be >0 for hybrid configuration')
118 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
120 if ( theApp.EvtMax % nProc != 0 ) :
121 msg.warning(
'EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
123 chunkSize = int (theApp.EvtMax / nProc)
125 from AthenaMP.AthenaMPFlags
import jobproperties
as jps
126 jps.AthenaMPFlags.PreCountedEvents=theApp.EvtMax
127 jps.AthenaMPFlags.ChunkSize= chunkSize
129 msg.info(
'AthenaMP workers will process %s events each',chunkSize)
133 print "==========================================================================================\n"
140 algCardinality = jp.ConcurrencyFlags.NumThreads()
142 if (algCardinality != 1):
143 for alg
in topSequence:
145 alg.Cardinality = algCardinality