The Gaudi Framework  master (37c0b60a)
AvalancheSchedulerSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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 #ifndef GAUDIHIVE_AVALANCHESCHEDULERSVC_H
12 #define GAUDIHIVE_AVALANCHESCHEDULERSVC_H
13 
14 // Local includes
15 #include "AlgsExecutionStates.h"
16 #include "EventSlot.h"
17 #include "FiberManager.h"
18 #include "PrecedenceSvc.h"
19 
20 // Framework include files
23 #include <GaudiKernel/ICondSvc.h>
25 #include <GaudiKernel/IRunable.h>
26 #include <GaudiKernel/IScheduler.h>
28 #include <GaudiKernel/Service.h>
29 
30 // C++ include files
31 #include <functional>
32 #include <memory>
33 #include <queue>
34 #include <string>
35 #include <string_view>
36 #include <thread>
37 #include <unordered_map>
38 #include <vector>
39 
40 // External libs
41 #include <tbb/concurrent_priority_queue.h>
42 #include <tbb/concurrent_queue.h>
43 #include <tbb/task_arena.h>
44 
45 class IAlgorithm;
46 
47 //---------------------------------------------------------------------------
48 
114 class AvalancheSchedulerSvc : public extends<Service, IScheduler> {
115 
116  friend class AlgTask;
117 
118 public:
120  using extends::extends;
121 
123  StatusCode initialize() override;
124 
126  StatusCode finalize() override;
127 
129  StatusCode pushNewEvent( EventContext* eventContext ) override;
130 
131  // Make multiple events available to the scheduler
132  StatusCode pushNewEvents( std::vector<EventContext*>& eventContexts ) override;
133 
135  StatusCode popFinishedEvent( EventContext*& eventContext ) override;
136 
138  StatusCode tryPopFinishedEvent( EventContext*& eventContext ) override;
139 
141  unsigned int freeSlots() override;
142 
144  void dumpState() override;
145 
147  virtual StatusCode scheduleEventView( const EventContext* sourceContext, const std::string& nodeName,
148  std::unique_ptr<EventContext> viewContext ) override;
149 
153  virtual void recordOccupancy( int samplePeriod, std::function<void( OccupancySnapshot )> callback ) override;
154 
155 private:
157  const std::map<std::string, DataObjIDColl>& outDeps ) const;
158 
159 private:
162 
163  enum ActivationState { INACTIVE = 0, ACTIVE = 1, FAILURE = 2 };
164 
165  // Occupancy snapshot data
167  std::chrono::system_clock::time_point m_lastSnapshot = std::chrono::system_clock::now();
168  std::function<void( OccupancySnapshot )> m_snapshotCallback;
169 
171  this, "ThreadPoolSize", -1,
172  "Size of the global thread pool initialised by TBB; a value of -1 requests to use"
173  "all available hardware threads; -100 requests to bypass TBB executing "
174  "all algorithms in the scheduler's thread." };
176  this, "maxParallelismExtra", 0,
177  "Allows to add some extra threads to the maximum parallelism set in TBB"
178  "The TBB max parallelism is set as: ThreadPoolSize + maxParallelismExtra + 1" };
179  Gaudi::Property<std::string> m_whiteboardSvcName{ this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name" };
181  this, "MaxBlockingAlgosInFlight", 0, "Maximum allowed number of simultaneously running CPU-blocking algorithms" };
183  this, "SimulateExecution", false,
184  "Flag to perform single-pass simulation of execution flow before the actual execution" };
186  "The following modes are currently available: PCE, COD, DRE, E" };
187  Gaudi::Property<bool> m_dumpIntraEventDynamics{ this, "DumpIntraEventDynamics", false,
188  "Dump intra-event concurrency dynamics to csv file" };
190  this, "PreemptiveBlockingTasks", false,
191  "Enable preemptive scheduling of CPU-blocking algorithms. Blocking algorithms must be flagged accordingly." };
193  this, "NumOffloadThreads", 2,
194  "Number of threads to use for CPU portion of asynchronous algorithms. Asynchronous algorithms must be flagged "
195  "and use Boost Fiber functionality to suspend while waiting for offloaded work." };
196  Gaudi::Property<bool> m_checkDeps{ this, "CheckDependencies", false,
197  "Runtime check of Algorithm Input Data Dependencies" };
198  Gaudi::Property<bool> m_checkOutput{ this, "CheckOutputUsage", false,
199  "Runtime check of Algorithm Output Data usage" };
201  this,
202  "CheckOutputUsageIgnoreList",
203  {},
204  "Ignore outputs of the Algorithms of this name when doing the check",
205  "OrderedSet<std::string>" };
206 
207  Gaudi::Property<std::string> m_useDataLoader{ this, "DataLoaderAlg", "",
208  "Attribute unmet input dependencies to this DataLoader Algorithm" };
209 
210  Gaudi::Property<bool> m_enableCondSvc{ this, "EnableConditions", false, "Enable ConditionsSvc" };
211 
212  Gaudi::Property<bool> m_showDataDeps{ this, "ShowDataDependencies", true,
213  "Show the INPUT and OUTPUT data dependencies of Algorithms" };
214 
215  Gaudi::Property<bool> m_showDataFlow{ this, "ShowDataFlow", false,
216  "Show the configuration of DataFlow between Algorithms" };
217 
218  Gaudi::Property<bool> m_showControlFlow{ this, "ShowControlFlow", false,
219  "Show the configuration of all Algorithms and Sequences" };
220 
221  Gaudi::Property<bool> m_verboseSubSlots{ this, "VerboseSubSlots", false, "Dump algorithm states for all sub-slots" };
222 
224  this, "DataDepsGraphFile", "",
225  "Name of the output file (.dot or .md extensions allowed) containing the data dependency graph for some selected "
226  "Algorithms" };
227 
229  this, "DataDepsGraphAlgPattern", ".*",
230  "Regex pattern for selecting desired Algorithms by name, whose data dependency has to be included in the data "
231  "deps graph" };
232 
234  this, "DataDepsGraphObjectPattern", ".*",
235  "Regex pattern for selecting desired input or output by their full key" };
236 
237  // Utils and shortcuts ----------------------------------------------------
238 
240  void activate();
241 
244 
247 
250 
252  inline unsigned int algname2index( const std::string& algoname ) { return m_algname_index_map[algoname]; }
253 
256 
258  inline const std::string& index2algname( unsigned int index ) { return m_algname_vect[index]; }
259 
262 
265 
268 
271 
273  std::atomic_int m_freeSlots{ 0 };
274 
276  tbb::concurrent_bounded_queue<EventContext*> m_finishedEvents;
277 
280 
283 
285  unsigned int m_algosInFlight = 0;
286 
288  unsigned int m_blockingAlgosInFlight = 0;
289 
290  // States management ------------------------------------------------------
291 
294 
295  // Update algorithm state and, optionally, revise states of other downstream algorithms
296  StatusCode revise( unsigned int iAlgo, EventContext* contextPtr, AState state, bool iterate = false );
297 
299  struct TaskSpec;
301  StatusCode signoff( const TaskSpec& );
302 
304  bool isStalled( const EventSlot& ) const;
306  void eventFailed( EventContext* eventContext );
307 
309  void dumpSchedulerState( int iSlot );
310 
311  // Algos Management -------------------------------------------------------
312 
315 
316  // Actions management -----------------------------------------------------
317 
319  tbb::concurrent_bounded_queue<action> m_actionsQueue;
320 
322  struct TaskSpec {
324  TaskSpec() {}
325  TaskSpec( IAlgorithm* algPtr, unsigned int algIndex, const std::string& algName, unsigned int algRank,
326  bool asynchronous, int slotIndex, EventContext* eventContext )
327  : algPtr( algPtr )
328  , algIndex( algIndex )
329  , algName( algName )
330  , algRank( algRank )
332  , slotIndex( slotIndex )
333  , contextPtr( eventContext ) {}
335  TaskSpec( const TaskSpec& ) = default;
337  TaskSpec& operator=( const TaskSpec& ) = delete;
339  TaskSpec( TaskSpec&& ) = default;
341  TaskSpec& operator=( TaskSpec&& ) = default;
342 
343  IAlgorithm* algPtr{ nullptr };
344  unsigned int algIndex{ 0 };
345  std::string_view algName;
346  unsigned int algRank{ 0 };
347  bool asynchronous{ false };
348  int slotIndex{ 0 };
350  };
351 
353  struct AlgQueueSort {
354  bool operator()( const TaskSpec& i, const TaskSpec& j ) const { return ( i.algRank < j.algRank ); }
355  };
356 
358  tbb::concurrent_priority_queue<TaskSpec, AlgQueueSort> m_scheduledQueue;
359  tbb::concurrent_priority_queue<TaskSpec, AlgQueueSort> m_scheduledAsynchronousQueue;
361 
362  // Prompt the scheduler to call updateStates
364 
365  // ------------------------------------------------------------------------
366 
367  // Service for thread pool initialization
369  tbb::task_arena* m_arena{ nullptr };
371 
372  size_t m_maxEventsInFlight{ 0 };
373  size_t m_maxAlgosInFlight{ 1 };
374 
375 public:
376  // get next schedule-able TaskSpec
377  bool next( TaskSpec& ts, bool asynchronous ) {
378  if ( asynchronous ) { return m_scheduledAsynchronousQueue.try_pop( ts ); }
379  return m_scheduledQueue.try_pop( ts );
380  }
381 };
382 
383 #endif // GAUDIHIVE_AVALANCHESCHEDULERSVC_H
AvalancheSchedulerSvc::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
A shortcut to the whiteboard.
Definition: AvalancheSchedulerSvc.h:267
AvalancheSchedulerSvc::TaskSpec::algPtr
IAlgorithm * algPtr
Definition: AvalancheSchedulerSvc.h:343
IAlgResourcePool.h
AvalancheSchedulerSvc::m_useDataLoader
Gaudi::Property< std::string > m_useDataLoader
Definition: AvalancheSchedulerSvc.h:207
std::string
STL class.
AvalancheSchedulerSvc::TaskSpec
Struct to hold entries in the alg queues.
Definition: AvalancheSchedulerSvc.h:322
AvalancheSchedulerSvc::finalize
StatusCode finalize() override
Finalise.
Definition: AvalancheSchedulerSvc.cpp:423
AvalancheSchedulerSvc::TaskSpec::operator=
TaskSpec & operator=(const TaskSpec &)=delete
Assignment operator.
AvalancheSchedulerSvc::m_optimizationMode
Gaudi::Property< std::string > m_optimizationMode
Definition: AvalancheSchedulerSvc.h:185
AvalancheSchedulerSvc::TaskSpec::algRank
unsigned int algRank
Definition: AvalancheSchedulerSvc.h:346
AvalancheSchedulerSvc::ACTIVE
@ ACTIVE
Definition: AvalancheSchedulerSvc.h:163
EventSlot.h
std::vector
STL class.
AvalancheSchedulerSvc::iterate
StatusCode iterate()
Loop on all slots to schedule DATAREADY algorithms and sign off ready events.
Definition: AvalancheSchedulerSvc.cpp:665
EventSlot
Class representing an event slot.
Definition: EventSlot.h:24
std::chrono::duration< int64_t, std::milli >
AvalancheSchedulerSvc::m_scheduledAsynchronousQueue
tbb::concurrent_priority_queue< TaskSpec, AlgQueueSort > m_scheduledAsynchronousQueue
Definition: AvalancheSchedulerSvc.h:359
AvalancheSchedulerSvc::m_lastSnapshot
std::chrono::system_clock::time_point m_lastSnapshot
Definition: AvalancheSchedulerSvc.h:167
AvalancheSchedulerSvc::m_dataDepsGraphAlgoPattern
Gaudi::Property< std::string > m_dataDepsGraphAlgoPattern
Definition: AvalancheSchedulerSvc.h:228
std::function
AvalancheSchedulerSvc::m_scheduledQueue
tbb::concurrent_priority_queue< TaskSpec, AlgQueueSort > m_scheduledQueue
Queues for scheduled algorithms.
Definition: AvalancheSchedulerSvc.h:358
AvalancheSchedulerSvc::m_fiberManager
std::unique_ptr< FiberManager > m_fiberManager
Definition: AvalancheSchedulerSvc.h:370
AvalancheSchedulerSvc::schedule
StatusCode schedule(TaskSpec &&)
Definition: AvalancheSchedulerSvc.cpp:1021
AvalancheSchedulerSvc::ActivationState
ActivationState
Definition: AvalancheSchedulerSvc.h:163
AvalancheSchedulerSvc::m_showControlFlow
Gaudi::Property< bool > m_showControlFlow
Definition: AvalancheSchedulerSvc.h:218
AvalancheSchedulerSvc::m_needsUpdate
std::atomic< bool > m_needsUpdate
Definition: AvalancheSchedulerSvc.h:363
std::queue
STL class.
AlgsExecutionStates.h
AvalancheSchedulerSvc::m_enableCondSvc
Gaudi::Property< bool > m_enableCondSvc
Definition: AvalancheSchedulerSvc.h:210
AvalancheSchedulerSvc::deactivate
StatusCode deactivate()
Deactivate scheduler.
Definition: AvalancheSchedulerSvc.cpp:514
AvalancheSchedulerSvc::m_eventSlots
std::vector< EventSlot > m_eventSlots
Vector of events slots.
Definition: AvalancheSchedulerSvc.h:270
AvalancheSchedulerSvc::m_numOffloadThreads
Gaudi::Property< int > m_numOffloadThreads
Definition: AvalancheSchedulerSvc.h:192
AvalancheSchedulerSvc::m_arena
tbb::task_arena * m_arena
Definition: AvalancheSchedulerSvc.h:369
AvalancheSchedulerSvc::m_algExecStateSvc
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Algorithm execution state manager.
Definition: AvalancheSchedulerSvc.h:279
AvalancheSchedulerSvc::TaskSpec::algName
std::string_view algName
Definition: AvalancheSchedulerSvc.h:345
AvalancheSchedulerSvc::FAILURE
@ FAILURE
Definition: AvalancheSchedulerSvc.h:163
AvalancheSchedulerSvc::m_condSvc
SmartIF< ICondSvc > m_condSvc
A shortcut to service for Conditions handling.
Definition: AvalancheSchedulerSvc.h:282
AvalancheSchedulerSvc::eventFailed
void eventFailed(EventContext *eventContext)
Method to execute if an event failed.
Definition: AvalancheSchedulerSvc.cpp:858
AvalancheSchedulerSvc::m_threadPoolSize
Gaudi::Property< int > m_threadPoolSize
Definition: AvalancheSchedulerSvc.h:170
IScheduler.h
AvalancheSchedulerSvc::m_dataDepsGraphObjectPattern
Gaudi::Property< std::string > m_dataDepsGraphObjectPattern
Definition: AvalancheSchedulerSvc.h:233
AvalancheSchedulerSvc::m_maxEventsInFlight
size_t m_maxEventsInFlight
Definition: AvalancheSchedulerSvc.h:372
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec()
Default constructor.
Definition: AvalancheSchedulerSvc.h:324
AvalancheSchedulerSvc::m_maxBlockingAlgosInFlight
Gaudi::Property< unsigned int > m_maxBlockingAlgosInFlight
Definition: AvalancheSchedulerSvc.h:180
StatusCode
Definition: StatusCode.h:65
std::thread
STL class.
AvalancheSchedulerSvc::TaskSpec::operator=
TaskSpec & operator=(TaskSpec &&)=default
Move assignment.
PrecedenceSvc.h
IAlgorithm
Definition: IAlgorithm.h:38
AvalancheSchedulerSvc::TaskSpec::asynchronous
bool asynchronous
Definition: AvalancheSchedulerSvc.h:347
ProduceConsume.j
j
Definition: ProduceConsume.py:104
AvalancheSchedulerSvc::m_maxParallelismExtra
Gaudi::Property< int > m_maxParallelismExtra
Definition: AvalancheSchedulerSvc.h:175
AvalancheSchedulerSvc::AlgQueueSort::operator()
bool operator()(const TaskSpec &i, const TaskSpec &j) const
Definition: AvalancheSchedulerSvc.h:354
compareRootHistos.ts
ts
Definition: compareRootHistos.py:488
AvalancheSchedulerSvc::m_enablePreemptiveBlockingTasks
Gaudi::Property< bool > m_enablePreemptiveBlockingTasks
Definition: AvalancheSchedulerSvc.h:189
AvalancheSchedulerSvc::m_whiteboardSvcName
Gaudi::Property< std::string > m_whiteboardSvcName
Definition: AvalancheSchedulerSvc.h:179
AvalancheSchedulerSvc
Definition: AvalancheSchedulerSvc.h:114
AvalancheSchedulerSvc::m_checkOutput
Gaudi::Property< bool > m_checkOutput
Definition: AvalancheSchedulerSvc.h:198
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:182
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:1162
AvalancheSchedulerSvc::index2algname
const std::string & index2algname(unsigned int index)
Convert an integer to a name.
Definition: AvalancheSchedulerSvc.h:258
AvalancheSchedulerSvc::INACTIVE
@ INACTIVE
Definition: AvalancheSchedulerSvc.h:163
SmartIF< IPrecedenceSvc >
IHiveWhiteBoard.h
AvalancheSchedulerSvc::m_algosInFlight
unsigned int m_algosInFlight
Number of algorithms presently in flight.
Definition: AvalancheSchedulerSvc.h:285
std::atomic< ActivationState >
std::map
STL class.
AvalancheSchedulerSvc::tryPopFinishedEvent
StatusCode tryPopFinishedEvent(EventContext *&eventContext) override
Try to fetch an event from the scheduler.
Definition: AvalancheSchedulerSvc.cpp:645
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:1122
AvalancheSchedulerSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Cache for the algorithm resource pool.
Definition: AvalancheSchedulerSvc.h:314
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
AvalancheSchedulerSvc::freeSlots
unsigned int freeSlots() override
Get free slots number.
Definition: AvalancheSchedulerSvc.cpp:614
AvalancheSchedulerSvc::m_showDataDeps
Gaudi::Property< bool > m_showDataDeps
Definition: AvalancheSchedulerSvc.h:212
AvalancheSchedulerSvc::m_maxAlgosInFlight
size_t m_maxAlgosInFlight
Definition: AvalancheSchedulerSvc.h:373
AvalancheSchedulerSvc::dumpState
void dumpState() override
Dump scheduler state for all slots.
Definition: AvalancheSchedulerSvc.cpp:618
AvalancheSchedulerSvc::initialize
StatusCode initialize() override
Initialise.
Definition: AvalancheSchedulerSvc.cpp:77
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:325
AvalancheSchedulerSvc::next
bool next(TaskSpec &ts, bool asynchronous)
Definition: AvalancheSchedulerSvc.h:377
Service.h
std::chrono::duration::min
T min(T... args)
AvalancheSchedulerSvc::TaskSpec::TaskSpec
TaskSpec(TaskSpec &&)=default
Move constructor.
AvalancheSchedulerSvc::TaskSpec::contextPtr
EventContext * contextPtr
Definition: AvalancheSchedulerSvc.h:349
AvalancheSchedulerSvc::m_dumpIntraEventDynamics
Gaudi::Property< bool > m_dumpIntraEventDynamics
Definition: AvalancheSchedulerSvc.h:187
AvalancheSchedulerSvc::m_retryQueue
std::queue< TaskSpec > m_retryQueue
Definition: AvalancheSchedulerSvc.h:360
IRunable.h
AvalancheSchedulerSvc::m_snapshotInterval
std::chrono::duration< int64_t, std::milli > m_snapshotInterval
Definition: AvalancheSchedulerSvc.h:166
AvalancheSchedulerSvc::m_threadPoolSvc
SmartIF< IThreadPoolSvc > m_threadPoolSvc
Definition: AvalancheSchedulerSvc.h:368
FiberManager.h
AvalancheSchedulerSvc::m_dataDepsGraphFile
Gaudi::Property< std::string > m_dataDepsGraphFile
Definition: AvalancheSchedulerSvc.h:223
EventContext
Definition: EventContext.h:34
AlgsExecutionStates::State
State
Execution states of the algorithms Must have contiguous integer values 0, 1...
Definition: AlgsExecutionStates.h:42
AvalancheSchedulerSvc::revise
StatusCode revise(unsigned int iAlgo, EventContext *contextPtr, AState state, bool iterate=false)
Definition: AvalancheSchedulerSvc.cpp:799
AvalancheSchedulerSvc::activate
void activate()
Activate scheduler.
Definition: AvalancheSchedulerSvc.cpp:457
AvalancheSchedulerSvc::m_actionsQueue
tbb::concurrent_bounded_queue< action > m_actionsQueue
Queue where closures are stored and picked for execution.
Definition: AvalancheSchedulerSvc.h:319
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:255
AvalancheSchedulerSvc::m_checkDeps
Gaudi::Property< bool > m_checkDeps
Definition: AvalancheSchedulerSvc.h:196
AvalancheSchedulerSvc::isStalled
bool isStalled(const EventSlot &) const
Check if scheduling in a particular slot is in a stall.
Definition: AvalancheSchedulerSvc.cpp:840
AvalancheSchedulerSvc::algname2index
unsigned int algname2index(const std::string &algoname)
Convert a name to an integer.
Definition: AvalancheSchedulerSvc.h:252
AlgTask
Definition: AlgTask.h:36
AvalancheSchedulerSvc::AlgQueueSort
Comparison operator to sort the queues.
Definition: AvalancheSchedulerSvc.h:353
AvalancheSchedulerSvc::m_thread
std::thread m_thread
The thread in which the activate function runs.
Definition: AvalancheSchedulerSvc.h:249
AvalancheSchedulerSvc::pushNewEvents
StatusCode pushNewEvents(std::vector< EventContext * > &eventContexts) override
Definition: AvalancheSchedulerSvc.cpp:603
AvalancheSchedulerSvc::m_showDataFlow
Gaudi::Property< bool > m_showDataFlow
Definition: AvalancheSchedulerSvc.h:215
AvalancheSchedulerSvc::m_checkOutputIgnoreList
Gaudi::Property< std::vector< std::string > > m_checkOutputIgnoreList
Definition: AvalancheSchedulerSvc.h:200
AvalancheSchedulerSvc::signoff
StatusCode signoff(const TaskSpec &)
The call to this method is triggered only from within the AlgTask.
Definition: AvalancheSchedulerSvc.cpp:1091
AvalancheSchedulerSvc::m_freeSlots
std::atomic_int m_freeSlots
Atomic to account for asyncronous updates by the scheduler wrt the rest.
Definition: AvalancheSchedulerSvc.h:273
compareRootHistos.state
state
Definition: compareRootHistos.py:496
AvalancheSchedulerSvc::m_blockingAlgosInFlight
unsigned int m_blockingAlgosInFlight
Number of algorithms presently in flight.
Definition: AvalancheSchedulerSvc.h:288
IAlgExecStateSvc.h
AvalancheSchedulerSvc::TaskSpec::algIndex
unsigned int algIndex
Definition: AvalancheSchedulerSvc.h:344
AvalancheSchedulerSvc::m_snapshotCallback
std::function< void(OccupancySnapshot)> m_snapshotCallback
Definition: AvalancheSchedulerSvc.h:168
AvalancheSchedulerSvc::pushNewEvent
StatusCode pushNewEvent(EventContext *eventContext) override
Make an event available to the scheduler.
Definition: AvalancheSchedulerSvc.cpp:545
AvalancheSchedulerSvc::dumpGraphFile
StatusCode dumpGraphFile(const std::map< std::string, DataObjIDColl > &inDeps, const std::map< std::string, DataObjIDColl > &outDeps) const
Definition: AvalancheSchedulerSvc.cpp:1177
AvalancheSchedulerSvc::popFinishedEvent
StatusCode popFinishedEvent(EventContext *&eventContext) override
Blocks until an event is available.
Definition: AvalancheSchedulerSvc.cpp:624
std::unique_ptr< EventContext >
std::unordered_map< std::string, unsigned int >
AvalancheSchedulerSvc::m_precSvc
SmartIF< IPrecedenceSvc > m_precSvc
A shortcut to the Precedence Service.
Definition: AvalancheSchedulerSvc.h:264
AvalancheSchedulerSvc::m_isActive
std::atomic< ActivationState > m_isActive
Flag to track if the scheduler is active or not.
Definition: AvalancheSchedulerSvc.h:246
AvalancheSchedulerSvc::m_finishedEvents
tbb::concurrent_bounded_queue< EventContext * > m_finishedEvents
Queue of finished events.
Definition: AvalancheSchedulerSvc.h:276
AvalancheSchedulerSvc::m_algname_vect
std::vector< std::string > m_algname_vect
Vector to bookkeep the information necessary to the index2name conversion.
Definition: AvalancheSchedulerSvc.h:261
ICondSvc.h
AvalancheSchedulerSvc::dumpSchedulerState
void dumpSchedulerState(int iSlot)
Dump the state of the scheduler.
Definition: AvalancheSchedulerSvc.cpp:879
Gaudi::Property< int >
AvalancheSchedulerSvc::m_verboseSubSlots
Gaudi::Property< bool > m_verboseSubSlots
Definition: AvalancheSchedulerSvc.h:221
AvalancheSchedulerSvc::TaskSpec::slotIndex
int slotIndex
Definition: AvalancheSchedulerSvc.h:348
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
std::chrono::system_clock::now
T now(T... args)