BrunelScenarioGraphScheduler.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
3 from Gaudi.Configuration import *
4 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, ForwardSchedulerSvc, AlgResourcePool
5 
6 # convenience machinery for assembling custom graphs of algorithm precedence rules (w/ CPUCrunchers as algorithms)
7 try:
8  from GaudiHive import precedence
9 except ImportError:
10  # of versions of LCG/heptools do not provide the required package networkx
11  import sys
12  sys.exit(77) # consider the test skipped
13 
14 # metaconfig
15 evtslots = 1
16 evtMax = 1
17 cardinality = 1
18 algosInFlight = 4
19 algoAvgTime = 0.02
20 
21 
22 InertMessageSvc(OutputLevel=INFO)
23 
24 whiteboard = HiveWhiteBoard("EventDataSvc",
25  EventSlots = evtslots,
26  OutputLevel = INFO,
27  ForceLeaves = True)
28 
29 slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
30 
31 scheduler = ForwardSchedulerSvc(MaxEventsInFlight = evtslots,
32  MaxAlgosInFlight = algosInFlight,
33  ThreadPoolSize = algosInFlight,
34  OutputLevel = DEBUG,
35  useGraphFlowManagement = True,
36  DataFlowManagerNext = True,
37  Optimizer = "DRE",
38  PreemptiveIOBoundTasks = False,
39  DumpIntraEventDynamics = False)
40 
41 AlgResourcePool(OutputLevel = DEBUG)
42 
43 timeValue = precedence.UniformTimeValue(algoAvgTime)
44 ifIObound = precedence.UniformBooleanValue(False)
45 #ifIObound = precedence.RndBiased10BooleanValue()
46 
47 
48 sequencer = precedence.CruncherSequence(timeValue, ifIObound, sleepFraction=0.0,
49  cfgPath = "lhcb/reco/cf_dependencies.graphml",
50  dfgPath = "lhcb/reco/data_dependencies.graphml",
51  topSequencer = 'GaudiSequencer/BrunelSequencer',
52  algoDebug = False).get()
53 
54 ApplicationMgr( EvtMax = evtMax,
55  EvtSel = 'NONE',
56  ExtSvc = [whiteboard],
57  EventLoop = slimeventloopmgr,
58  TopAlg = [sequencer],
59  MessageSvcType = "InertMessageSvc",
60  OutputLevel = INFO)
Thread safe extension to the standard MessageSvc.
The Application Manager class.