| The Gaudi Framework v32r1 (f65d50dc)

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