The Gaudi Framework  v30r3 (a5ef0a68)
SingleBlockingTaskAvalancheScheduler.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
3 """
4 The simplest possible configuration for asynchronous scheduling of single blocking algorithm.
5 """
6 
7 from Gaudi.Configuration import *
8 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, AvalancheSchedulerSvc, CPUCruncher
9 
10 # metaconfig
11 evtMax = 7
12 evtslots = 3
13 algosInFlight = 0
14 blockingAlgosInFlight = 3
15 
16 
17 whiteboard = HiveWhiteBoard("EventDataSvc",
18  EventSlots=evtslots,
19  OutputLevel=INFO)
20 
21 slimeventloopmgr = HiveSlimEventLoopMgr(SchedulerName="AvalancheSchedulerSvc",
22  OutputLevel=INFO)
23 
24 AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight,
25  PreemptiveIOBoundTasks=True,
26  MaxIOBoundAlgosInFlight=blockingAlgosInFlight,
27  OutputLevel=VERBOSE)
28 
29 
30 blockingAlg = CPUCruncher(name="BlockingAlg",
31  shortCalib=True,
32  avgRuntime=2.,
33  Cardinality=3,
34  IsIOBound=True, # tag algorithm as blocking
35  SleepFraction=0.7, # simulate blocking nature
36  OutputLevel=DEBUG)
37 
38 ApplicationMgr(EvtMax=evtMax,
39  EvtSel='NONE',
40  ExtSvc=[whiteboard],
41  EventLoop=slimeventloopmgr,
42  TopAlg=[blockingAlg],
43  MessageSvcType="InertMessageSvc",
44  OutputLevel=INFO)
The Application Manager class.