The Gaudi Framework  master (37c0b60a)
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 from GaudiTesting import SKIP_RETURN_CODE
22 
23 # convenience machinery for assembling custom graphs of algorithm precedence rules (w/ CPUCrunchers as algorithms)
24 try:
25  from GaudiHive import precedence
26 except ImportError:
27  # of versions of LCG/heptools do not provide the required package networkx
28  import sys
29 
30  sys.exit(SKIP_RETURN_CODE) # consider the test skipped
31 
32 # metaconfig
33 evtslots = 1
34 evtMax = 1
35 cardinality = 1
36 algosInFlight = 4
37 algoAvgTime = 0.02
38 
39 InertMessageSvc(OutputLevel=INFO)
40 
41 whiteboard = HiveWhiteBoard(
42  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO, ForceLeaves=True
43 )
44 
45 slimeventloopmgr = HiveSlimEventLoopMgr(
46  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO
47 )
48 
49 scheduler = AvalancheSchedulerSvc(
50  ThreadPoolSize=algosInFlight,
51  OutputLevel=DEBUG,
52  Optimizer="DRE",
53  PreemptiveBlockingTasks=False,
54  DumpIntraEventDynamics=False,
55 )
56 
57 AlgResourcePool(OutputLevel=DEBUG)
58 
59 CPUCrunchSvc(shortCalib=True)
60 
61 timeValue = precedence.UniformTimeValue(avgRuntime=algoAvgTime)
62 # timeValue = precedence.RealTimeValue(
63 # path="lhcb/reco/timing.Brunel.1kE.json", defaultTime=0.0)
65 # 296 values, biased approximately as 90% to 10% - corresponds to the .GRAPHML scenario used below
66 # (295 precedence graph algorithms, plus one fake algorithm - FetchFromFile)
67 # ifIObound = precedence.RndBiasedBoolenValue(pattern = {True: 29, False: 267}, seed=1)
68 
70  timeValue,
71  ifIObound,
72  sleepFraction=0.0,
73  cfgPath="lhcb/reco/cf.Brunel.graphml",
74  dfgPath="lhcb/reco/df.Brunel.graphml",
75  topSequencer="BrunelSequencer",
76 ).get()
77 
79  EvtMax=evtMax,
80  EvtSel="NONE",
81  ExtSvc=[whiteboard],
82  EventLoop=slimeventloopmgr,
83  TopAlg=[sequencer],
84  MessageSvcType="InertMessageSvc",
85  OutputLevel=INFO,
86 )
precedence.UniformTimeValue
Definition: precedence.py:61
GaudiPartProp.decorators.get
get
decorate the vector of properties
Definition: decorators.py:283
InertMessageSvc
Definition: InertMessageSvc.h:36
Gaudi.Configuration
Definition: Configuration.py:1
precedence.CruncherSequence
Definition: precedence.py:166
ApplicationMgr
Definition: ApplicationMgr.h:57
precedence.UniformBooleanValue
Definition: precedence.py:113