Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
38  EvtMax=evtMax,
39  EvtSel='NONE',
40  ExtSvc=[whiteboard],
41  EventLoop=slimeventloopmgr,
42  TopAlg=[blockingAlg],
43  MessageSvcType="InertMessageSvc",
44  OutputLevel=INFO)
The Application Manager class.