BrunelScenarioAvalancheScheduler.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, AvalancheSchedulerSvc, 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(SchedulerName = "AvalancheSchedulerSvc", OutputLevel=INFO)
30 
31 scheduler = AvalancheSchedulerSvc(MaxEventsInFlight = evtslots,
32  MaxAlgosInFlight = algosInFlight,
33  ThreadPoolSize = algosInFlight,
34  OutputLevel = DEBUG,
35  Optimizer = "DRE",
36  PreemptiveIOBoundTasks = False,
37  DumpIntraEventDynamics = False)
38 
39 AlgResourcePool(OutputLevel = DEBUG)
40 
41 timeValue = precedence.UniformTimeValue(algoAvgTime)
42 ifIObound = precedence.UniformBooleanValue(False)
43 #ifIObound = precedence.RndBiased10BooleanValue()
44 
45 
46 sequencer = precedence.CruncherSequence(timeValue, ifIObound, sleepFraction=0.0,
47  cfgPath = "lhcb/reco/cf_dependencies.graphml",
48  dfgPath = "lhcb/reco/data_dependencies.graphml",
49  topSequencer = 'GaudiSequencer/BrunelSequencer').get()
50 
51 ApplicationMgr( EvtMax = evtMax,
52  EvtSel = 'NONE',
53  ExtSvc = [whiteboard],
54  EventLoop = slimeventloopmgr,
55  TopAlg = [sequencer],
56  MessageSvcType = "InertMessageSvc",
57  OutputLevel = INFO)
Thread safe extension to the standard MessageSvc.
The Application Manager class.