The Gaudi Framework  master (d98a2936)
BrunelScenarioAvalancheScheduler.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
12 
13 from Configurables import (
14  AlgResourcePool,
15  AvalancheSchedulerSvc,
16  CPUCrunchSvc,
17  HiveSlimEventLoopMgr,
18  HiveWhiteBoard,
19 )
20 from Gaudi.Configuration import *
21 
22 # convenience machinery for assembling custom graphs of algorithm precedence rules (w/ CPUCrunchers as algorithms)
23 from GaudiHive import precedence
24 
25 # metaconfig
26 evtslots = 1
27 evtMax = 1
28 cardinality = 1
29 algosInFlight = 4
30 algoAvgTime = 0.02
31 
32 InertMessageSvc(OutputLevel=INFO)
33 
34 whiteboard = HiveWhiteBoard(
35  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO, ForceLeaves=True
36 )
37 
38 slimeventloopmgr = HiveSlimEventLoopMgr(
39  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO
40 )
41 
42 scheduler = AvalancheSchedulerSvc(
43  ThreadPoolSize=algosInFlight,
44  OutputLevel=DEBUG,
45  Optimizer="DRE",
46  PreemptiveBlockingTasks=False,
47  DumpIntraEventDynamics=False,
48 )
49 
50 AlgResourcePool(OutputLevel=DEBUG)
51 
52 CPUCrunchSvc(shortCalib=True)
53 
54 timeValue = precedence.UniformTimeValue(avgRuntime=algoAvgTime)
55 # timeValue = precedence.RealTimeValue(
56 # path="lhcb/reco/timing.Brunel.1kE.json", defaultTime=0.0)
58 # 296 values, biased approximately as 90% to 10% - corresponds to the .GRAPHML scenario used below
59 # (295 precedence graph algorithms, plus one fake algorithm - FetchFromFile)
60 # ifIObound = precedence.RndBiasedBoolenValue(pattern = {True: 29, False: 267}, seed=1)
61 
63  timeValue,
64  ifIObound,
65  sleepFraction=0.0,
66  cfgPath="lhcb/reco/cf.Brunel.graphml",
67  dfgPath="lhcb/reco/df.Brunel.graphml",
68  topSequencer="BrunelSequencer",
69 ).get()
70 
72  EvtMax=evtMax,
73  EvtSel="NONE",
74  ExtSvc=[whiteboard],
75  EventLoop=slimeventloopmgr,
76  TopAlg=[sequencer],
77  MessageSvcType="InertMessageSvc",
78  OutputLevel=INFO,
79 )
precedence.UniformTimeValue
Definition: precedence.py:61
GaudiPartProp.decorators.get
get
decorate the vector of properties
Definition: decorators.py:283
InertMessageSvc
Definition: InertMessageSvc.h:32
Gaudi.Configuration
Definition: Configuration.py:1
precedence.CruncherSequence
Definition: precedence.py:166
ApplicationMgr
Definition: ApplicationMgr.h:54
precedence.UniformBooleanValue
Definition: precedence.py:113