Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 ifIObound = precedence.UniformBooleanValue(False)
42 # 278 values, biased approximately as 90% to 10% - corresponds to the .GRAPHML scenario used below
43 # (276 precedence graph algorithms, plus two fake algorithms - DstWriter and Framework)
44 #ifIObound = precedence.RndBiasedBoolenValue(pattern = {True: 29, False: 249}, seed=1)
45 
46 sequencer = precedence.CruncherSequence(
47  timeValue,
48  ifIObound,
49  sleepFraction=0.0,
50  cfgPath="lhcb/reco/cf_dependencies.graphml",
51  dfgPath="lhcb/reco/data_dependencies.graphml",
52  topSequencer='GaudiSequencer/BrunelSequencer').get()
53 
55  EvtMax=evtMax,
56  EvtSel='NONE',
57  ExtSvc=[whiteboard],
58  EventLoop=slimeventloopmgr,
59  TopAlg=[sequencer],
60  MessageSvcType="InertMessageSvc",
61  OutputLevel=INFO)
Thread safe extension to the standard MessageSvc.
The Application Manager class.