The Gaudi Framework  v32r2 (46d42edc)
OffloadCMSRecoScenario.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, IOBoundAlgSchedulerSvc
5 
6 # convenience machinery for assembling custom graphs of algorithm precedence rules (w/ CPUCrunchers as algorithms)
7 from GaudiHive import precedence
8 
9 # metaconfig
10 evtslots = 1
11 evtMax = 5
12 algosInFlight = 4
13 
14 whiteboard = HiveWhiteBoard(
15  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO)
16 
17 slimeventloopmgr = HiveSlimEventLoopMgr(
18  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO)
19 
20 AvalancheSchedulerSvc(
21  ThreadPoolSize=algosInFlight,
22  OutputLevel=DEBUG,
23  PreemptiveIOBoundTasks=True,
24  MaxIOBoundAlgosInFlight=50)
25 
26 IOBoundAlgSchedulerSvc(OutputLevel=INFO)
27 
28 #timeValue = precedence.UniformTimeValue(avgRuntime=0.1)
29 timeValue = precedence.RealTimeValue(
30  path="cms/reco/algs-time.json", defaultTime=0.0)
31 
32 #ifIObound = precedence.UniformBooleanValue(False)
33 # the CMS reco scenario has 707 algorithms in total
34 ifIObound = precedence.RndBiasedBooleanValue(
35  pattern={
36  True: 70,
37  False: 637
38  }, seed=1)
39 
40 sequencer = precedence.CruncherSequence(
41  timeValue,
42  ifIObound,
43  sleepFraction=0.9,
44  cfgPath="cms/reco/cf.graphml",
45  dfgPath="cms/reco/df.graphml",
46  topSequencer='TopSequencer').get()
47 
49  EvtMax=evtMax,
50  EvtSel='NONE',
51  ExtSvc=[whiteboard],
52  EventLoop=slimeventloopmgr,
53  TopAlg=[sequencer],
54  MessageSvcType="InertMessageSvc",
55  OutputLevel=INFO)
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
The Application Manager class.