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 GaudiHive.GaudiHiveConf
import ForwardSchedulerSvc
31 svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
32 svcMgr.ForwardSchedulerSvc.CheckDependencies =
True
68 from AthenaCommon.AlgSequence
import AlgSequence
71 from SGComps.SGCompsConf
import SGInputLoader
72 topSequence+=SGInputLoader(OutputLevel=INFO, ShowEventDump=
False)
73 topSequence.SGInputLoader.Load = { (
'EventInfo',
'McEventInfo') }
75 from xAODEventInfoCnv.xAODEventInfoCnvConf
import xAODMaker__EventInfoCnvAlg
76 topSequence += xAODMaker__EventInfoCnvAlg()
79 topSequence+=
HiveAlgR(OutputLevel=DEBUG)
80 topSequence+=
HiveAlgA(OutputLevel=DEBUG,Time=20)
81 topSequence+=
HiveAlgB(OutputLevel=DEBUG,Time=10)
82 topSequence+=
HiveAlgC(OutputLevel=DEBUG,Time=190)
90 nProc = jp.ConcurrencyFlags.NumProcs()
96 import AthenaCommon.AtlasUnixGeneratorJob
102 from AthenaCommon.Logging
import log
as msg
103 if (theApp.EvtMax == -1) :
104 msg.fatal(
'EvtMax must be >0 for hybrid configuration')
105 sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
107 if ( theApp.EvtMax % nProc != 0 ) :
108 msg.warning(
'EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
110 chunkSize = int (theApp.EvtMax / nProc)
112 from AthenaMP.AthenaMPFlags
import jobproperties
as jps
113 jps.AthenaMPFlags.PreCountedEvents=theApp.EvtMax
114 jps.AthenaMPFlags.ChunkSize= chunkSize
116 msg.info(
'AthenaMP workers will process %s events each',chunkSize)
120 print "==========================================================================================\n"
127 algCardinality = jp.ConcurrencyFlags.NumThreads()
129 if (algCardinality != 1):
130 for alg
in topSequence:
132 alg.Cardinality = algCardinality