The Gaudi Framework  v32r2 (46d42edc)
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, CPUCrunchSvc
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 InertMessageSvc(OutputLevel=INFO)
22 
23 whiteboard = HiveWhiteBoard(
24  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO, ForceLeaves=True)
25 
26 slimeventloopmgr = HiveSlimEventLoopMgr(
27  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO)
28 
29 scheduler = AvalancheSchedulerSvc(
30  ThreadPoolSize=algosInFlight,
31  OutputLevel=DEBUG,
32  Optimizer="DRE",
33  PreemptiveIOBoundTasks=False,
34  DumpIntraEventDynamics=False)
35 
36 AlgResourcePool(OutputLevel=DEBUG)
37 
38 CPUCrunchSvc(shortCalib=True)
39 
40 timeValue = precedence.UniformTimeValue(avgRuntime=algoAvgTime)
41 #timeValue = precedence.RealTimeValue(
42 # path="lhcb/reco/timing.Brunel.1kE.json", defaultTime=0.0)
43 ifIObound = precedence.UniformBooleanValue(False)
44 # 296 values, biased approximately as 90% to 10% - corresponds to the .GRAPHML scenario used below
45 # (295 precedence graph algorithms, plus one fake algorithm - FetchFromFile)
46 #ifIObound = precedence.RndBiasedBoolenValue(pattern = {True: 29, False: 267}, seed=1)
47 
48 sequencer = precedence.CruncherSequence(
49  timeValue,
50  ifIObound,
51  sleepFraction=0.0,
52  cfgPath="lhcb/reco/cf.Brunel.graphml",
53  dfgPath="lhcb/reco/df.Brunel.graphml",
54  topSequencer='BrunelSequencer').get()
55 
57  EvtMax=evtMax,
58  EvtSel='NONE',
59  ExtSvc=[whiteboard],
60  EventLoop=slimeventloopmgr,
61  TopAlg=[sequencer],
62  MessageSvcType="InertMessageSvc",
63  OutputLevel=INFO)
Thread safe extension to the standard MessageSvc.
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
The Application Manager class.