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)
18 import AthenaCommon.AtlasUnixGeneratorJob
19 svcMgr.EventSelector.FirstEvent=1
20 svcMgr.EventSelector.RunNumber=1
21 svcMgr.EventSelector.InitialTimeStamp=0
22 svcMgr.EventSelector.TimeStampInterval=1
23 svcMgr.EventSelector.FirstLB=1
29 from AthenaServices.AthenaServicesConf
import AthenaHiveEventLoopMgr
32 from StoreGate.StoreGateConf
import StoreGateSvc
40 from StoreGate.StoreGateConf
import SG__HiveMgrSvc
43 from GaudiHive.GaudiHiveConf
import AlgResourcePool
46 from AthenaCommon.AlgScheduler
import AlgScheduler
47 AlgScheduler.OutputLevel( INFO )
48 AlgScheduler.ShowControlFlow(
True )
49 AlgScheduler.ShowDataDependencies(
True )
50 AlgScheduler.EnableConditions(
True )
51 AlgScheduler.setDataLoaderAlg(
"SGInputLoader" )
53 from IOVSvc.IOVSvcConf
import CondSvc
54 svcMgr += CondSvc( OutputLevel=VERBOSE )
75 from AthenaCommon.AlgSequence
import AlgSequence
79 topSequence+=
AlgA(OutputLevel=DEBUG)
80 topSequence+=
AlgB(OutputLevel=DEBUG, Key_R1=
"a1", Key_W1=
"a3")
81 topSequence+=
AlgC(
"AlgC1", OutputLevel=DEBUG, Key_R1=
"a2", Key_CH=
"X1")
82 topSequence+=
AlgC(
"AlgC2", OutputLevel=DEBUG, Key_R1=
"a1", Key_CH=
"X2")
83 topSequence+=
AlgD(
"AlgD1", OutputLevel=DEBUG, Key_R1=
"a3", Key_CH1=
"X1", Key_CH2=
"X2")
86 from AthenaCommon.AlgSequence
import AthSequencer
89 condSeq+=
CondAlgX(
"CondAlgX1", OutputLevel=DEBUG, Key_CH=
"X1", Key_DB=
"X1")
90 condSeq+=
CondAlgX(
"CondAlgX2", OutputLevel=DEBUG, Key_CH=
"X2", Key_DB=
"X2")
92 condSeq+=
CondAlgY(
"CondAlgY1", OutputLevel=DEBUG, Key_CH1=
"Y1", Key_CH2=
"Y2", Key_DB1=
"Y1", Key_DB2=
"Y2")
95 condDbFile =
"condDb.txt"
98 for dir
in (
".:"+os.environ.get(
'DATAPATH')).split (
':'):
99 cdb = os.path.join(dir,condDbFile)
100 if (os.path.isfile( cdb ) ) :
105 msg.fatal(
'ASCII condDb file \"' + condDbFile +
'\" not found')
106 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
108 msg.info(
"using ASCIICondDb file from " + cdb )
119 nProc = jp.ConcurrencyFlags.NumProcs()
125 import AthenaCommon.AtlasUnixGeneratorJob
131 from AthenaCommon.Logging
import log
as msg
132 if (theApp.EvtMax == -1) :
133 msg.fatal(
'EvtMax must be >0 for hybrid configuration')
134 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
136 if ( theApp.EvtMax % nProc != 0 ) :
137 msg.warning(
'EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
139 chunkSize = int (theApp.EvtMax / nProc)
141 from AthenaMP.AthenaMPFlags
import jobproperties
as jps
142 jps.AthenaMPFlags.PreCountedEvents=theApp.EvtMax
143 jps.AthenaMPFlags.ChunkSize= chunkSize
145 msg.info(
'AthenaMP workers will process %s events each',chunkSize)
149 print (
"==========================================================================================\n")
156 algCardinality = jp.ConcurrencyFlags.NumThreads()
158 if (algCardinality != 1):
159 for alg
in topSequence:
161 alg.Cardinality = algCardinality