The Gaudi Framework  v36r1 (3e2fb5a8)
BrunelScenarioAvalancheScheduler.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
12 
13 from Gaudi.Configuration import *
14 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, AvalancheSchedulerSvc, AlgResourcePool, CPUCrunchSvc
15 
16 # convenience machinery for assembling custom graphs of algorithm precedence rules (w/ CPUCrunchers as algorithms)
17 try:
18  from GaudiHive import precedence
19 except ImportError:
20  # of versions of LCG/heptools do not provide the required package networkx
21  import sys
22  sys.exit(77) # consider the test skipped
23 
24 # metaconfig
25 evtslots = 1
26 evtMax = 1
27 cardinality = 1
28 algosInFlight = 4
29 algoAvgTime = 0.02
30 
31 InertMessageSvc(OutputLevel=INFO)
32 
33 whiteboard = HiveWhiteBoard(
34  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO, ForceLeaves=True)
35 
36 slimeventloopmgr = HiveSlimEventLoopMgr(
37  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO)
38 
39 scheduler = AvalancheSchedulerSvc(
40  ThreadPoolSize=algosInFlight,
41  OutputLevel=DEBUG,
42  Optimizer="DRE",
43  PreemptiveBlockingTasks=False,
44  DumpIntraEventDynamics=False)
45 
46 AlgResourcePool(OutputLevel=DEBUG)
47 
48 CPUCrunchSvc(shortCalib=True)
49 
50 timeValue = precedence.UniformTimeValue(avgRuntime=algoAvgTime)
51 #timeValue = precedence.RealTimeValue(
52 # path="lhcb/reco/timing.Brunel.1kE.json", defaultTime=0.0)
53 ifIObound = precedence.UniformBooleanValue(False)
54 # 296 values, biased approximately as 90% to 10% - corresponds to the .GRAPHML scenario used below
55 # (295 precedence graph algorithms, plus one fake algorithm - FetchFromFile)
56 #ifIObound = precedence.RndBiasedBoolenValue(pattern = {True: 29, False: 267}, seed=1)
57 
58 sequencer = precedence.CruncherSequence(
59  timeValue,
60  ifIObound,
61  sleepFraction=0.0,
62  cfgPath="lhcb/reco/cf.Brunel.graphml",
63  dfgPath="lhcb/reco/df.Brunel.graphml",
64  topSequencer='BrunelSequencer').get()
65 
67  EvtMax=evtMax,
68  EvtSel='NONE',
69  ExtSvc=[whiteboard],
70  EventLoop=slimeventloopmgr,
71  TopAlg=[sequencer],
72  MessageSvcType="InertMessageSvc",
73  OutputLevel=INFO)
InertMessageSvc
Definition: InertMessageSvc.h:36
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:391
Gaudi.Configuration
Definition: Configuration.py:1
ApplicationMgr
Definition: ApplicationMgr.h:57