The Gaudi Framework
master (1a7a3838)
Toggle main menu visibility
Loading...
Searching...
No Matches
detectSimpleStall.py
Go to the documentation of this file.
1
#!/usr/bin/env gaudirun.py
2
12
"""
13
The options file models an intra-event stall in algorithm scheduling.
14
An early exit from a group of algorithms called 'EarlyExitBranch' is performed due to
15
an inverted CF decision sot that A2 is not run. This results in an unmet DF dependency
16
for a downstream algorithm A3, leading to the stall.
17
"""
18
19
from
Configurables
import
(
20
AlgResourcePool,
21
AvalancheSchedulerSvc,
22
CPUCruncher,
23
CPUCrunchSvc,
24
HiveSlimEventLoopMgr,
25
HiveWhiteBoard,
26
)
27
from
Gaudi.Configuration
import
*
28
29
evtslots = 1
30
evtMax = 1
31
cardinality = 1
32
threads = 1
33
34
whiteboard =
HiveWhiteBoard
(
"EventDataSvc"
, EventSlots=evtslots)
35
36
slimeventloopmgr =
HiveSlimEventLoopMgr
(
37
SchedulerName=
"AvalancheSchedulerSvc"
, OutputLevel=DEBUG
38
)
39
40
scheduler =
AvalancheSchedulerSvc
(ThreadPoolSize=threads, OutputLevel=VERBOSE)
41
42
AlgResourcePool
(OutputLevel=DEBUG)
43
44
CPUCrunchSvc
(shortCalib=
True
)
45
46
# Set up of CPU crunchers -------------------------------------------------------
47
48
a1 =
CPUCruncher
(
"A1"
)
49
# to skip algorithm 'A2', force early exit from the branch
50
# This leads to data flow stall
51
a1.InvertDecision =
True
52
53
# this algorithm is not run due to early exit from the group it belongs to
54
a2 =
CPUCruncher
(
"A2"
)
55
a2.outKeys = [
"/Event/a2"
]
56
57
a3 =
CPUCruncher
(
"A3"
)
58
a3.inpKeys = [
"/Event/a2"
]
59
60
# Assemble control flow graph
61
branch = Gaudi__Sequencer(
62
"EarlyExitBranch"
, ModeOR=
False
, ShortCircuit=
True
, Sequential=
True
63
)
64
branch.Members = [a1, a2]
65
66
for
algo
in
[a1, a2, a3]:
67
algo.Cardinality = cardinality
68
algo.avgRuntime = 0.1
69
70
# Application Manager ----------------------------------------------------------
71
72
ApplicationMgr
(
73
EvtMax=evtMax,
74
EvtSel=
"NONE"
,
75
ExtSvc=[whiteboard],
76
EventLoop=slimeventloopmgr,
77
TopAlg=[branch, a3],
78
MessageSvcType=
"InertMessageSvc"
,
79
OutputLevel=INFO,
80
)
AlgResourcePool
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
Definition
AlgResourcePool.h:35
ApplicationMgr
The Application Manager class.
Definition
ApplicationMgr.h:54
AvalancheSchedulerSvc
Definition
AvalancheSchedulerSvc.h:114
CPUCrunchSvc
Definition
CPUCrunchSvc.h:22
CPUCruncher
A class that implements a search for prime numbers.
Definition
CPUCruncher.h:30
HiveSlimEventLoopMgr
Definition
HiveSlimEventLoopMgr.h:31
HiveWhiteBoard
Data service base class.
Definition
HiveWhiteBoard.cpp:129
Gaudi.Configuration
Definition
Configuration.py:1
GaudiHive
options
detectSimpleStall.py
Generated on
for The Gaudi Framework by
1.17.0