The Gaudi Framework  master (d98a2936)
AvalancheSchedulerSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
13 // Local includes
14 #include "AlgsExecutionStates.h"
15 #include "EventSlot.h"
16 #include "FiberManager.h"
17 #include "PrecedenceSvc.h"
18 
19 // Framework include files
22 #include <GaudiKernel/ICondSvc.h>
24 #include <GaudiKernel/IRunable.h>
25 #include <GaudiKernel/IScheduler.h>
27 #include <GaudiKernel/Service.h>
28 
29 // C++ include files
30 #include <functional>
31 #include <memory>
32 #include <queue>
33 #include <string>
34 #include <string_view>
35 #include <thread>
36 #include <unordered_map>
37 #include <vector>
38 
39 // External libs
40 #include <tbb/concurrent_priority_queue.h>
41 #include <tbb/concurrent_queue.h>
42 #include <tbb/task_arena.h>
43 
44 class IAlgorithm;
45 
46 //---------------------------------------------------------------------------
47 
113 class AvalancheSchedulerSvc : public extends<Service, IScheduler> {
114 
115  friend class AlgTask;
116 
117 public:
119  using extends::extends;
120 
122  StatusCode initialize() override;
123 
125  StatusCode finalize() override;
126 
128  StatusCode pushNewEvent( EventContext* eventContext ) override;
129 
130  // Make multiple events available to the scheduler
131  StatusCode pushNewEvents( std::vector<EventContext*>& eventContexts ) override;
132 
134  StatusCode popFinishedEvent( EventContext*& eventContext ) override;
135 
137  StatusCode tryPopFinishedEvent( EventContext*& eventContext ) override;
138 
140  unsigned int freeSlots() override;
141 
143  void dumpState() override;
144 
146  virtual StatusCode scheduleEventView( const EventContext* sourceContext, const std::string& nodeName,
147  std::unique_ptr<EventContext> viewContext ) override;
148 
152  virtual void recordOccupancy( int samplePeriod, std::function<void( OccupancySnapshot )> callback ) override;
153 
154 private:
155  StatusCode dumpGraphFile( const std::map<std::string, DataObjIDColl>& inDeps,
156  const std::map<std::string, DataObjIDColl>& outDeps ) const;
157 
158 private:
160  using action = std::function<StatusCode()>;
161 
162  enum ActivationState { INACTIVE = 0, ACTIVE = 1, FAILURE = 2 };
163 
164  // Occupancy snapshot data
165  std::chrono::duration<int64_t, std::milli> m_snapshotInterval = std::chrono::duration<int64_t, std::milli>::min();
166  std::chrono::system_clock::time_point m_lastSnapshot = std::chrono::system_clock::now();
167  std::function<void( OccupancySnapshot )> m_snapshotCallback;
168 
170  this, "ThreadPoolSize", -1,
171  "Size of the global thread pool initialised by TBB; a value of -1 requests to use"
172  "all available hardware threads; -100 requests to bypass TBB executing "
173  "all algorithms in the scheduler's thread." };
175  this, "maxParallelismExtra", 0,
176  "Allows to add some extra threads to the maximum parallelism set in TBB"
177  "The TBB max parallelism is set as: ThreadPoolSize + maxParallelismExtra + 1" };
178  Gaudi::Property<std::string> m_whiteboardSvcName{ this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name" };
180  this, "MaxBlockingAlgosInFlight", 0, "Maximum allowed number of simultaneously running CPU-blocking algorithms" };
182  this, "SimulateExecution", false,
183  "Flag to perform single-pass simulation of execution flow before the actual execution" };
185  "The following modes are currently available: PCE, COD, DRE, E" };
186  Gaudi::Property<bool> m_dumpIntraEventDynamics{ this, "DumpIntraEventDynamics", false,
187  "Dump intra-event concurrency dynamics to csv file" };
189  this, "PreemptiveBlockingTasks", false,
190  "Enable preemptive scheduling of CPU-blocking algorithms. Blocking algorithms must be flagged accordingly." };
192  this, "NumOffloadThreads", 2,
193  "Number of threads to use for CPU portion of asynchronous algorithms. Asynchronous algorithms must be flagged "
194  "and use Boost Fiber functionality to suspend while waiting for offloaded work." };
195  Gaudi::Property<bool> m_checkDeps{ this, "CheckDependencies", false,
196  "Runtime check of Algorithm Input Data Dependencies" };
197  Gaudi::Property<bool> m_checkOutput{ this, "CheckOutputUsage", false,
198  "Runtime check of Algorithm Output Data usage" };
200  this,
201  "CheckOutputUsageIgnoreList",
202  {},
203  "Ignore outputs of the Algorithms of this name when doing the check",
204  "OrderedSet<std::string>" };
205 
206  Gaudi::Property<std::string> m_useDataLoader{ this, "DataLoaderAlg", "",
207  "Attribute unmet input dependencies to this DataLoader Algorithm" };
208 
209  Gaudi::Property<bool> m_enableCondSvc{ this, "EnableConditions", false, "Enable ConditionsSvc" };
210 
211  Gaudi::Property<bool> m_showDataDeps{ this, "ShowDataDependencies", true,
212  "Show the INPUT and OUTPUT data dependencies of Algorithms" };
213 
214  Gaudi::Property<bool> m_showDataFlow{ this, "ShowDataFlow", false,
215  "Show the configuration of DataFlow between Algorithms" };
216 
217  Gaudi::Property<bool> m_showControlFlow{ this, "ShowControlFlow", false,
218  "Show the configuration of all Algorithms and Sequences" };
219 
220  Gaudi::Property<bool> m_verboseSubSlots{ this, "VerboseSubSlots", false, "Dump algorithm states for all sub-slots" };
221 
223  this, "DataDepsGraphFile", "",
224  "Name of the output file (.dot or .md extensions allowed) containing the data dependency graph for some selected "
225  "Algorithms" };
226 
228  this, "DataDepsGraphAlgPattern", ".*",
229  "Regex pattern for selecting desired Algorithms by name, whose data dependency has to be included in the data "
230  "deps graph" };
231 
233  this, "DataDepsGraphObjectPattern", ".*",
234  "Regex pattern for selecting desired input or output by their full key" };
235 
236  // Utils and shortcuts ----------------------------------------------------
237 
239  void activate();
240 
243 
245  std::atomic<ActivationState> m_isActive{ INACTIVE };
246 
248  std::thread m_thread;
249 
251  inline unsigned int algname2index( const std::string& algoname ) { return m_algname_index_map[algoname]; }
252 
254  std::unordered_map<std::string, unsigned int> m_algname_index_map;
255 
257  inline const std::string& index2algname( unsigned int index ) { return m_algname_vect[index]; }
258 
260  std::vector<std::string> m_algname_vect;
261 
264 
267 
269  std::vector<EventSlot> m_eventSlots;
270 
272  std::atomic_int m_freeSlots{ 0 };
273 
275  tbb::concurrent_bounded_queue<EventContext*> m_finishedEvents;
276 
279 
282 
284  unsigned int m_algosInFlight = 0;
285 
287  unsigned int m_blockingAlgosInFlight = 0;
288 
289  // States management ------------------------------------------------------
290 
293 
294  // Update algorithm state and, optionally, revise states of other downstream algorithms
295  StatusCode revise( unsigned int iAlgo, EventContext* contextPtr, AState state, bool iterate = false );
296 
298  struct TaskSpec;
300  StatusCode signoff( const TaskSpec& );
301 
303  bool isStalled( const EventSlot& ) const;
305  void eventFailed( EventContext* eventContext );
306 
308  void dumpSchedulerState( int iSlot );
309 
310  // Algos Management -------------------------------------------------------
311 
314 
315  // Actions management -----------------------------------------------------
316 
318  tbb::concurrent_bounded_queue<action> m_actionsQueue;
319 
321  struct TaskSpec {
323  TaskSpec() {}
324  TaskSpec( IAlgorithm* algPtr, unsigned int algIndex, const std::string& algName, unsigned int algRank,
325  bool asynchronous, int slotIndex, EventContext* eventContext )
326  : algPtr( algPtr )
327  , algIndex( algIndex )
328  , algName( algName )
329  , algRank( algRank )
331  , slotIndex( slotIndex )
332  , contextPtr( eventContext ) {}
334  TaskSpec( const TaskSpec& ) = default;
336  TaskSpec& operator=( const TaskSpec& ) = delete;
338  TaskSpec( TaskSpec&& ) = default;
340  TaskSpec& operator=( TaskSpec&& ) = default;
341 
342  IAlgorithm* algPtr{ nullptr };
343  unsigned int algIndex{ 0 };
344  std::string_view algName;
345  unsigned int algRank{ 0 };
346  bool asynchronous{ false };
347  int slotIndex{ 0 };
349  };
350 
352  struct AlgQueueSort {
353  bool operator()( const TaskSpec& i, const TaskSpec& j ) const { return ( i.algRank < j.algRank ); }
354  };
355 
357  tbb::concurrent_priority_queue<TaskSpec, AlgQueueSort> m_scheduledQueue;
358  tbb::concurrent_priority_queue<TaskSpec, AlgQueueSort> m_scheduledAsynchronousQueue;
359  std::queue<TaskSpec> m_retryQueue;
360 
361  // Prompt the scheduler to call updateStates
362  std::atomic<bool> m_needsUpdate{ true };
363 
364  // ------------------------------------------------------------------------
365 
366  // Service for thread pool initialization
368  tbb::task_arena* m_arena{ nullptr };
369  std::unique_ptr<FiberManager> m_fiberManager{ nullptr };
370 
371  size_t m_maxEventsInFlight{ 0 };
372  size_t m_maxAlgosInFlight{ 1 };
373 
374 public:
375  // get next schedule-able TaskSpec
376  bool next( TaskSpec& ts, bool asynchronous ) {
377  if ( asynchronous ) { return m_scheduledAsynchronousQueue.try_pop( ts ); }
378  return m_scheduledQueue.try_pop( ts );
379  }
380 };
AvalancheSchedulerSvc::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
A shortcut to the whiteboard.
Definition: AvalancheSchedulerSvc.h:266
AvalancheSchedulerSvc::TaskSpec::algPtr
IAlgorithm * algPtr
Definition: AvalancheSchedulerSvc.h:342
IAlgResourcePool.h
AvalancheSchedulerSvc::m_useDataLoader
Gaudi::Property< std::string > m_useDataLoader
Definition: AvalancheSchedulerSvc.h:206
AvalancheSchedulerSvc::TaskSpec
Struct to hold entries in the alg queues.
Definition: AvalancheSchedulerSvc.h:321
AvalancheSchedulerSvc::finalize
StatusCode finalize() override
Finalise.
Definition: AvalancheSchedulerSvc.cpp:424
AvalancheSchedulerSvc::TaskSpec::operator=
TaskSpec & operator=(const TaskSpec &)=delete
Assignment operator.
AvalancheSchedulerSvc::m_optimizationMode
Gaudi::Property< std::string > m_optimizationMode
Definition: AvalancheSchedulerSvc.h:184
AvalancheSchedulerSvc::TaskSpec::algRank
unsigned int algRank
Definition: AvalancheSchedulerSvc.h:345
AvalancheSchedulerSvc::ACTIVE
@ ACTIVE
Definition: AvalancheSchedulerSvc.h:162
EventSlot.h
AvalancheSchedulerSvc::iterate
StatusCode iterate()
Loop on all slots to schedule DATAREADY algorithms and sign off ready events.
Definition: AvalancheSchedulerSvc.cpp:666
EventSlot
Class representing an event slot.
Definition: EventSlot.h:23
AvalancheSchedulerSvc::m_scheduledAsynchronousQueue
tbb::concurrent_priority_queue< TaskSpec, AlgQueueSort > m_scheduledAsynchronousQueue
Definition: AvalancheSchedulerSvc.h:358
AvalancheSchedulerSvc::m_lastSnapshot
std::chrono::system_clock::time_point m_lastSnapshot
Definition: AvalancheSchedulerSvc.h:166
AvalancheSchedulerSvc::m_dataDepsGraphAlgoPattern
Gaudi::Property< std::string > m_dataDepsGraphAlgoPattern
Definition: AvalancheSchedulerSvc.h:227
AvalancheSchedulerSvc::m_scheduledQueue
tbb::concurrent_priority_queue< TaskSpec, AlgQueueSort > m_scheduledQueue
Queues for scheduled algorithms.
Definition: AvalancheSchedulerSvc.h:357
AvalancheSchedulerSvc::m_fiberManager
std::unique_ptr< FiberManager > m_fiberManager
Definition: AvalancheSchedulerSvc.h:369
AvalancheSchedulerSvc::schedule
StatusCode schedule(TaskSpec &&)
Definition: AvalancheSchedulerSvc.cpp:1022
AvalancheSchedulerSvc::ActivationState
ActivationState
Definition: AvalancheSchedulerSvc.h:162
AvalancheSchedulerSvc::m_showControlFlow
Gaudi::Property< bool > m_showControlFlow
Definition: AvalancheSchedulerSvc.h:217
AvalancheSchedulerSvc::m_needsUpdate
std::atomic< bool > m_needsUpdate
Definition: AvalancheSchedulerSvc.h:362
AlgsExecutionStates.h
AvalancheSchedulerSvc::m_enableCondSvc
Gaudi::Property< bool > m_enableCondSvc
Definition: AvalancheSchedulerSvc.h:209
AvalancheSchedulerSvc::deactivate
StatusCode deactivate()
Deactivate scheduler.
Definition: AvalancheSchedulerSvc.cpp:515
AvalancheSchedulerSvc::m_eventSlots
std::vector< EventSlot > m_eventSlots
Vector of events slots.
Definition: AvalancheSchedulerSvc.h:269
AvalancheSchedulerSvc::m_numOffloadThreads
Gaudi::Property< int > m_numOffloadThreads
Definition: AvalancheSchedulerSvc.h:191
AvalancheSchedulerSvc::m_arena
tbb::task_arena * m_arena
Definition: AvalancheSchedulerSvc.h:368
AvalancheSchedulerSvc::m_algExecStateSvc
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Algorithm execution state manager.
Definition: AvalancheSchedulerSvc.h:278
AvalancheSchedulerSvc::TaskSpec::algName
std::string_view algName
Definition: AvalancheSchedulerSvc.h:344
AvalancheSchedulerSvc::FAILURE
@ FAILURE
Definition: AvalancheSchedulerSvc.h:162
AvalancheSchedulerSvc::m_condSvc
SmartIF< ICondSvc > m_condSvc
A shortcut to service for Conditions handling.
Definition: AvalancheSchedulerSvc.h:281
AvalancheSchedulerSvc::eventFailed
void eventFailed(EventContext *eventContext)
Method to execute if an event failed.
Definition: AvalancheSchedulerSvc.cpp:859
AvalancheSchedulerSvc::m_threadPoolSize
Gaudi::Property< int > m_threadPoolSize
Definition: AvalancheSchedulerSvc.h:169
IScheduler.h
AvalancheSchedulerSvc::m_dataDepsGraphObjectPattern
Gaudi::Property< std::string > m_dataDepsGraphObjectPattern
Definition: AvalancheSchedulerSvc.h:232
AvalancheSchedulerSvc::m_maxEventsInFlight
size_t m_maxEventsInFlight
Definition: AvalancheSchedulerSvc.h:371
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec()
Default constructor.
Definition: AvalancheSchedulerSvc.h:323
AvalancheSchedulerSvc::m_maxBlockingAlgosInFlight
Gaudi::Property< unsigned int > m_maxBlockingAlgosInFlight
Definition: AvalancheSchedulerSvc.h:179
StatusCode
Definition: StatusCode.h:64
AvalancheSchedulerSvc::TaskSpec::operator=
TaskSpec & operator=(TaskSpec &&)=default
Move assignment.
PrecedenceSvc.h
IAlgorithm
Definition: IAlgorithm.h:36
AvalancheSchedulerSvc::TaskSpec::asynchronous
bool asynchronous
Definition: AvalancheSchedulerSvc.h:346
ProduceConsume.j
j
Definition: ProduceConsume.py:104
AvalancheSchedulerSvc::m_maxParallelismExtra
Gaudi::Property< int > m_maxParallelismExtra
Definition: AvalancheSchedulerSvc.h:174
AvalancheSchedulerSvc::AlgQueueSort::operator()
bool operator()(const TaskSpec &i, const TaskSpec &j) const
Definition: AvalancheSchedulerSvc.h:353
compareRootHistos.ts
ts
Definition: compareRootHistos.py:488
AvalancheSchedulerSvc::m_enablePreemptiveBlockingTasks
Gaudi::Property< bool > m_enablePreemptiveBlockingTasks
Definition: AvalancheSchedulerSvc.h:188
AvalancheSchedulerSvc::m_whiteboardSvcName
Gaudi::Property< std::string > m_whiteboardSvcName
Definition: AvalancheSchedulerSvc.h:178
AvalancheSchedulerSvc
Definition: AvalancheSchedulerSvc.h:113
AvalancheSchedulerSvc::m_checkOutput
Gaudi::Property< bool > m_checkOutput
Definition: AvalancheSchedulerSvc.h:197
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec(const TaskSpec &)=default
Copy constructor (to keep a lambda capturing a TaskSpec storable as a std::function value)
AvalancheSchedulerSvc::m_simulateExecution
Gaudi::Property< bool > m_simulateExecution
Definition: AvalancheSchedulerSvc.h:181
AvalancheSchedulerSvc::recordOccupancy
virtual void recordOccupancy(int samplePeriod, std::function< void(OccupancySnapshot)> callback) override
Sample occupancy at fixed interval (ms) Negative value to deactivate, 0 to snapshot every change Each...
Definition: AvalancheSchedulerSvc.cpp:1163
AvalancheSchedulerSvc::index2algname
const std::string & index2algname(unsigned int index)
Convert an integer to a name.
Definition: AvalancheSchedulerSvc.h:257
AvalancheSchedulerSvc::INACTIVE
@ INACTIVE
Definition: AvalancheSchedulerSvc.h:162
SmartIF< IPrecedenceSvc >
IHiveWhiteBoard.h
AvalancheSchedulerSvc::m_algosInFlight
unsigned int m_algosInFlight
Number of algorithms presently in flight.
Definition: AvalancheSchedulerSvc.h:284
AvalancheSchedulerSvc::tryPopFinishedEvent
StatusCode tryPopFinishedEvent(EventContext *&eventContext) override
Try to fetch an event from the scheduler.
Definition: AvalancheSchedulerSvc.cpp:646
AvalancheSchedulerSvc::scheduleEventView
virtual StatusCode scheduleEventView(const EventContext *sourceContext, const std::string &nodeName, std::unique_ptr< EventContext > viewContext) override
Method to inform the scheduler about event views.
Definition: AvalancheSchedulerSvc.cpp:1123
AvalancheSchedulerSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Cache for the algorithm resource pool.
Definition: AvalancheSchedulerSvc.h:313
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:19
AvalancheSchedulerSvc::freeSlots
unsigned int freeSlots() override
Get free slots number.
Definition: AvalancheSchedulerSvc.cpp:615
AvalancheSchedulerSvc::m_showDataDeps
Gaudi::Property< bool > m_showDataDeps
Definition: AvalancheSchedulerSvc.h:211
AvalancheSchedulerSvc::m_maxAlgosInFlight
size_t m_maxAlgosInFlight
Definition: AvalancheSchedulerSvc.h:372
AvalancheSchedulerSvc::dumpState
void dumpState() override
Dump scheduler state for all slots.
Definition: AvalancheSchedulerSvc.cpp:619
AvalancheSchedulerSvc::initialize
StatusCode initialize() override
Initialise.
Definition: AvalancheSchedulerSvc.cpp:78
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec(IAlgorithm *algPtr, unsigned int algIndex, const std::string &algName, unsigned int algRank, bool asynchronous, int slotIndex, EventContext *eventContext)
Definition: AvalancheSchedulerSvc.h:324
AvalancheSchedulerSvc::next
bool next(TaskSpec &ts, bool asynchronous)
Definition: AvalancheSchedulerSvc.h:376
Service.h
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec(TaskSpec &&)=default
Move constructor.
AvalancheSchedulerSvc::TaskSpec::contextPtr
EventContext * contextPtr
Definition: AvalancheSchedulerSvc.h:348
AvalancheSchedulerSvc::m_dumpIntraEventDynamics
Gaudi::Property< bool > m_dumpIntraEventDynamics
Definition: AvalancheSchedulerSvc.h:186
AvalancheSchedulerSvc::m_retryQueue
std::queue< TaskSpec > m_retryQueue
Definition: AvalancheSchedulerSvc.h:359
IRunable.h
AvalancheSchedulerSvc::m_snapshotInterval
std::chrono::duration< int64_t, std::milli > m_snapshotInterval
Definition: AvalancheSchedulerSvc.h:165
AvalancheSchedulerSvc::m_threadPoolSvc
SmartIF< IThreadPoolSvc > m_threadPoolSvc
Definition: AvalancheSchedulerSvc.h:367
FiberManager.h
AvalancheSchedulerSvc::m_dataDepsGraphFile
Gaudi::Property< std::string > m_dataDepsGraphFile
Definition: AvalancheSchedulerSvc.h:222
EventContext
Definition: EventContext.h:34
AlgsExecutionStates::State
State
Execution states of the algorithms Must have contiguous integer values 0, 1...
Definition: AlgsExecutionStates.h:41
AvalancheSchedulerSvc::revise
StatusCode revise(unsigned int iAlgo, EventContext *contextPtr, AState state, bool iterate=false)
Definition: AvalancheSchedulerSvc.cpp:800
AvalancheSchedulerSvc::activate
void activate()
Activate scheduler.
Definition: AvalancheSchedulerSvc.cpp:458
AvalancheSchedulerSvc::m_actionsQueue
tbb::concurrent_bounded_queue< action > m_actionsQueue
Queue where closures are stored and picked for execution.
Definition: AvalancheSchedulerSvc.h:318
AvalancheSchedulerSvc::m_algname_index_map
std::unordered_map< std::string, unsigned int > m_algname_index_map
Map to bookkeep the information necessary to the name2index conversion.
Definition: AvalancheSchedulerSvc.h:254
AvalancheSchedulerSvc::m_checkDeps
Gaudi::Property< bool > m_checkDeps
Definition: AvalancheSchedulerSvc.h:195
AvalancheSchedulerSvc::isStalled
bool isStalled(const EventSlot &) const
Check if scheduling in a particular slot is in a stall.
Definition: AvalancheSchedulerSvc.cpp:841
AvalancheSchedulerSvc::algname2index
unsigned int algname2index(const std::string &algoname)
Convert a name to an integer.
Definition: AvalancheSchedulerSvc.h:251
AlgTask
Definition: AlgTask.h:35
AvalancheSchedulerSvc::AlgQueueSort
Comparison operator to sort the queues.
Definition: AvalancheSchedulerSvc.h:352
AvalancheSchedulerSvc::m_thread
std::thread m_thread
The thread in which the activate function runs.
Definition: AvalancheSchedulerSvc.h:248
AvalancheSchedulerSvc::pushNewEvents
StatusCode pushNewEvents(std::vector< EventContext * > &eventContexts) override
Definition: AvalancheSchedulerSvc.cpp:604
AvalancheSchedulerSvc::m_showDataFlow
Gaudi::Property< bool > m_showDataFlow
Definition: AvalancheSchedulerSvc.h:214
AvalancheSchedulerSvc::m_checkOutputIgnoreList
Gaudi::Property< std::vector< std::string > > m_checkOutputIgnoreList
Definition: AvalancheSchedulerSvc.h:199
AvalancheSchedulerSvc::signoff
StatusCode signoff(const TaskSpec &)
The call to this method is triggered only from within the AlgTask.
Definition: AvalancheSchedulerSvc.cpp:1092
AvalancheSchedulerSvc::m_freeSlots
std::atomic_int m_freeSlots
Atomic to account for asyncronous updates by the scheduler wrt the rest.
Definition: AvalancheSchedulerSvc.h:272
compareRootHistos.state
state
Definition: compareRootHistos.py:496
AvalancheSchedulerSvc::m_blockingAlgosInFlight
unsigned int m_blockingAlgosInFlight
Number of algorithms presently in flight.
Definition: AvalancheSchedulerSvc.h:287
IAlgExecStateSvc.h
AvalancheSchedulerSvc::TaskSpec::algIndex
unsigned int algIndex
Definition: AvalancheSchedulerSvc.h:343
AvalancheSchedulerSvc::m_snapshotCallback
std::function< void(OccupancySnapshot)> m_snapshotCallback
Definition: AvalancheSchedulerSvc.h:167
AvalancheSchedulerSvc::pushNewEvent
StatusCode pushNewEvent(EventContext *eventContext) override
Make an event available to the scheduler.
Definition: AvalancheSchedulerSvc.cpp:546
AvalancheSchedulerSvc::action
std::function< StatusCode()> action
Definition: AvalancheSchedulerSvc.h:160
AvalancheSchedulerSvc::dumpGraphFile
StatusCode dumpGraphFile(const std::map< std::string, DataObjIDColl > &inDeps, const std::map< std::string, DataObjIDColl > &outDeps) const
Definition: AvalancheSchedulerSvc.cpp:1178
AvalancheSchedulerSvc::popFinishedEvent
StatusCode popFinishedEvent(EventContext *&eventContext) override
Blocks until an event is available.
Definition: AvalancheSchedulerSvc.cpp:625
AvalancheSchedulerSvc::m_precSvc
SmartIF< IPrecedenceSvc > m_precSvc
A shortcut to the Precedence Service.
Definition: AvalancheSchedulerSvc.h:263
AvalancheSchedulerSvc::m_isActive
std::atomic< ActivationState > m_isActive
Flag to track if the scheduler is active or not.
Definition: AvalancheSchedulerSvc.h:245
AvalancheSchedulerSvc::m_finishedEvents
tbb::concurrent_bounded_queue< EventContext * > m_finishedEvents
Queue of finished events.
Definition: AvalancheSchedulerSvc.h:275
AvalancheSchedulerSvc::m_algname_vect
std::vector< std::string > m_algname_vect
Vector to bookkeep the information necessary to the index2name conversion.
Definition: AvalancheSchedulerSvc.h:260
ICondSvc.h
AvalancheSchedulerSvc::dumpSchedulerState
void dumpSchedulerState(int iSlot)
Dump the state of the scheduler.
Definition: AvalancheSchedulerSvc.cpp:880
Gaudi::Property< int >
AvalancheSchedulerSvc::m_verboseSubSlots
Gaudi::Property< bool > m_verboseSubSlots
Definition: AvalancheSchedulerSvc.h:220
AvalancheSchedulerSvc::TaskSpec::slotIndex
int slotIndex
Definition: AvalancheSchedulerSvc.h:347
Gaudi::ParticleProperties::index
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...
Definition: IParticlePropertySvc.cpp:39
IThreadPoolSvc.h
gaudirun.callback
callback
Definition: gaudirun.py:202