| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Member Functions | Private Attributes | List of all members
PrecedenceSvc Class Reference

A service to resolve the task execution precedence. More...

`#include <GaudiHive/PrecedenceSvc.h>`

Inheritance diagram for PrecedenceSvc:
[legend]
Collaboration diagram for PrecedenceSvc:
[legend]

## Public Member Functions
| PrecedenceSvc (const std::string &name, ISvcLocator *svcLoc)
| Constructor. More...
StatusCode | initialize () override
| Initialize. More...
StatusCode | finalize () override
| Finalize. More...
StatusCode | iterate (EventSlot &, const Cause &) override
| Infer the precedence effect caused by an execution flow event. More...
StatusCode | simulate (EventSlot &) const override
| Simulate execution flow. More...
bool | CFRulesResolved (EventSlot &) const override
| Check if the root CF decision is resolved. More...
uint | getPriority (const std::string &name) const override
| Get priority of an algorithm. More...
bool | isBlocking (const std::string &name) const override
| Check if a task is CPU-blocking. More...
void | dumpControlFlow () const override
| Dump precedence rules. More...
void | dumpDataFlow () const override
const std::string | printState (EventSlot &) const override
void | dumpPrecedenceRules (EventSlot &) override
| Dump precedence rules (available only in DEBUG mode, and must be enabled with the corresponding service property) More...
void | dumpPrecedenceTrace (EventSlot &) override
| Dump precedence trace (available only in DEBUG mode, and must be enabled with the corresponding service property) More...
const concurrency::PrecedenceRulesGraph * | getRules () const
| Precedence rules accessor. More...
Public Member Functions inherited from extends< Service, IPrecedenceSvc >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const
| Access a service by name, creating it if it doesn't already exist. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
| Declare used tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...

## Private Member Functions
StatusCode | assembleCFRules (Gaudi::Algorithm *, const std::string &, unsigned int recursionDepth=0)

## Private Attributes
SmartIF< IAlgResourcePool > | m_algResourcePool
| A shortcut to the algorithm resource pool. More...
concurrency::PrecedenceRulesGraph | m_PRGraph {"PrecedenceRulesGraph", serviceLocator()}
| Graph of precedence rules. More...
Gaudi::Property< std::string > | m_mode {this, "TaskPriorityRule", "", "Task avalanche induction strategy."}
| Scheduling strategy. More...
Gaudi::Property< bool > | m_ignoreDFRules {this, "IgnoreDFRules", false, "Ignore the data flow rules."}
| Scheduling strategy. More...
boost::filesystem::path | m_dumpDirName
| Precedence analysis facilities. More...
Gaudi::Property< bool > | m_dumpPrecTrace
Gaudi::Property< std::string > | m_dumpPrecTraceFile
Gaudi::Property< bool > | m_dumpPrecRules {this, "DumpPrecedenceRules", false, "Dump task precedence rules."}
Gaudi::Property< std::string > | m_dumpPrecRulesFile
Gaudi::Property< bool > | m_verifyRules

## Additional Inherited Members
Public Types inherited from extends< Service, IPrecedenceSvc >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
using | Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level | setUpMessaging () const
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, " unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

A service to resolve the task execution precedence.

Author
  Illya Shapoval @created Aug 7, 2017

Definition at line 21 of file PrecedenceSvc.h.

## Constructor & Destructor Documentation

## ◆ PrecedenceSvc()

PrecedenceSvc::PrecedenceSvc | ( | const std::string & | name,
|  | ISvcLocator * | svcLoc
| ) |  |
| inline

Constructor.

Definition at line 25 of file PrecedenceSvc.h.

25 : base_class( name, svcLoc ) {}
extends< Service, IPrecedenceSvc >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:14
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274

## Member Function Documentation

## ◆ assembleCFRules()

StatusCode PrecedenceSvc::assembleCFRules | ( | Gaudi::Algorithm * | algo,
|  | const std::string & | parentName,
|  | unsigned int | recursionDepth = `0`
| ) |  |
| private

Definition at line 116 of file PrecedenceSvc.cpp.

117 {
118 using namespace concurrency;
119
120 StatusCode sc = StatusCode::SUCCESS;
121
122 ++recursionDepth;
123
124 bool isGaudiSequencer( false );
125 bool isAthSequencer( false );
126
127 if ( !algo->isSequence() ) {
128 ON_DEBUG debug() << std::string( recursionDepth, ' ' ) << "Algorithm '" << algo->name() << "' discovered" << endmsg;
129 sc = m_PRGraph.addAlgorithmNode( algo, parentName, false, false );
130 return sc;
131 } else {
132 if ( algo->hasProperty( "ShortCircuit" ) )
133 isGaudiSequencer = true;
134 else if ( algo->hasProperty( "StopOverride" ) )
135 isAthSequencer = true;
136 }
137
138 auto seq = dynamic_cast<Gaudi::Sequence*>( algo );
139 if ( seq == 0 ) {
140 error() << "Algorithm " << algo->name() << " has isSequence==true, but unable to dcast to Sequence" << endmsg;
141 return StatusCode::FAILURE;
142 }
143
144 auto subAlgorithms = seq->subAlgorithms();
145
146 // Recursively unroll
147 ON_DEBUG debug() << std::string( recursionDepth, ' ' ) << "Decision hub '" << algo->name() << "' discovered"
148 << endmsg;
149 bool modeOr = false;
150 bool allPass = false;
151 bool promptDecision = false;
152 bool isSequential = false;
153 bool isInverted = false;
154
155 if ( isGaudiSequencer ) {
156 modeOr = ( algo->getProperty( "ModeOR" ).toString() == "True" );
157 allPass = ( algo->getProperty( "IgnoreFilterPassed" ).toString() == "True" );
158 promptDecision = ( algo->getProperty( "ShortCircuit" ).toString() == "True" );
159 isInverted = ( algo->getProperty( "Invert" ).toString() == "True" );
160 if ( allPass ) promptDecision = false; // standard GaudiSequencer behavior on all pass is to execute everything
161 isSequential = ( algo->hasProperty( "Sequential" ) && ( algo->getProperty( "Sequential" ).toString() == "True" ) );
162 } else if ( isAthSequencer ) {
163 modeOr = ( algo->getProperty( "ModeOR" ).toString() == "True" );
164 allPass = ( algo->getProperty( "IgnoreFilterPassed" ).toString() == "True" );
165 promptDecision = ( algo->getProperty( "StopOverride" ).toString() == "False" );
166 isSequential = ( algo->hasProperty( "Sequential" ) && ( algo->getProperty( "Sequential" ).toString() == "True" ) );
167 }
168 sc = m_PRGraph.addDecisionHubNode( algo, parentName, Concurrent{!isSequential}, PromptDecision{promptDecision},
169 ModeOr{modeOr}, AllPass{allPass}, Inverted{isInverted} );
170 if ( sc.isFailure() ) {
171 error() << "Failed to add DecisionHub " << algo->name() << " to graph of precedence rules" << endmsg;
172 return sc;
173 }
174
175 for ( auto subalgo : *subAlgorithms ) {
176 sc = assembleCFRules( subalgo, algo->name(), recursionDepth );
177 if ( sc.isFailure() ) {
178 error() << "Algorithm " << subalgo->name() << " could not be flattened" << endmsg;
179 return sc;
180 }
181 }
182 return sc;
183 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
PrecedenceSvc::assembleCFRules
StatusCode assembleCFRules(Gaudi::Algorithm *, const std::string &, unsigned int recursionDepth=0)
Definition: PrecedenceSvc.cpp:116
concurrency::PrecedenceRulesGraph::addAlgorithmNode
StatusCode addAlgorithmNode(Gaudi::Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass)
Add algorithm node.
Definition: PrecedenceRulesGraph.cpp:309
concurrency
Definition: PrecedenceRulesGraph.cpp:27
ManySmallAlgs.seq
seq
Definition: ManySmallAlgs.py:89
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:10
PropertyHolder::hasProperty
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
Definition: PropertyHolder.h:256
concurrency::ModeOr
Gaudi::tagged_bool< class ModeOr_tag > ModeOr
Definition: PrecedenceRulesGraph.h:31
std::string
STL class.
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
concurrency::Inverted
Gaudi::tagged_bool< class Inverted_tag > Inverted
Definition: PrecedenceRulesGraph.h:33
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
concurrency::Concurrent
Gaudi::tagged_bool< class Concurrent_tag > Concurrent
Definition: PrecedenceRulesGraph.h:29
concurrency::PrecedenceRulesGraph::addDecisionHubNode
StatusCode addDecisionHubNode(Gaudi::Algorithm *daughterAlgo, const std::string &parentName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted)
Add a node, which aggregates decisions of direct daughter nodes.
Definition: PrecedenceRulesGraph.cpp:392
concurrency::PromptDecision
Gaudi::tagged_bool< class PromptDecision_tag > PromptDecision
Definition: PrecedenceRulesGraph.h:30
concurrency::AllPass
Gaudi::tagged_bool< class AllPass_tag > AllPass
Definition: PrecedenceRulesGraph.h:32
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
Gaudi::Algorithm::isSequence
bool isSequence() const override
Are we a Sequence?
Definition: Algorithm.h:208
PropertyHolder::getProperty
StatusCode getProperty(Gaudi::Details::PropertyBase *p) const override
get the property
Definition: PropertyHolder.h:219
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:645

## ◆ CFRulesResolved()

bool PrecedenceSvc::CFRulesResolved | ( | EventSlot & | slot | ) | const
| override

Check if the root CF decision is resolved.

Definition at line 255 of file PrecedenceSvc.cpp.

255 {
256 return ( -1 != slot.controlFlowState[m_PRGraph.getHeadNode()->getNodeIndex()] ? true : false );
257 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:77
concurrency::PrecedenceRulesGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: PrecedenceRulesGraph.h:644
concurrency::ControlFlowNode::getNodeIndex
const unsigned int & getNodeIndex() const
Get node index.
Definition: PrecedenceRulesGraph.h:418

## ◆ dumpControlFlow()

void PrecedenceSvc::dumpControlFlow | ( |  | ) | const
| override

Dump precedence rules.

Definition at line 260 of file PrecedenceSvc.cpp.

260 {
261
262 info() << std::endl << "==================== Control Flow Configuration ==================" << std::endl << std::endl;
263 info() << m_PRGraph.dumpControlFlow() << endmsg;
264 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
std::endl
T endl(T... args)
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
concurrency::PrecedenceRulesGraph::dumpControlFlow
std::string dumpControlFlow() const
Print out control flow of Algorithms and Sequences.
Definition: PrecedenceRulesGraph.cpp:501
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ dumpDataFlow()

void PrecedenceSvc::dumpDataFlow | ( |  | ) | const
| override

Definition at line 266 of file PrecedenceSvc.cpp.

266 {
267 info() << std::endl << "===================== Data Flow Configuration ====================" << std::endl;
268 info() << m_PRGraph.dumpDataFlow() << endmsg;
269 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
std::endl
T endl(T... args)
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
concurrency::PrecedenceRulesGraph::dumpDataFlow
std::string dumpDataFlow() const
Print out all data origins and destinations, as reflected in the EF graph.
Definition: PrecedenceRulesGraph.cpp:534
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ dumpPrecedenceRules()

void PrecedenceSvc::dumpPrecedenceRules | ( | EventSlot & | slot | ) |
| override

Dump precedence rules (available only in DEBUG mode, and must be enabled with the corresponding service property)

Definition at line 280 of file PrecedenceSvc.cpp.

280 {
281
282 if ( !m_dumpPrecRules ) {
283 warning() << "To trace temporal and topological aspects of execution flow, "
284 << "set DumpPrecedenceRules property to True " << endmsg;
285 return;
286 }
287
288 ON_DEBUG debug() << "Dumping temporal precedence rules" << endmsg;
289
290 std::string fileName;
291 if ( m_dumpPrecRulesFile.empty() ) {
292 const auto& eventID = slot.eventContext->eventID();
293 fileName = "rules.evt-" + std::to_string( eventID.event_number() ) + "." + "run-" +
294 std::to_string( eventID.run_number() ) + ".graphml";
295 } else {
296 fileName = m_dumpPrecRulesFile;
297 }
298
299 boost::filesystem::path pth{m_dumpDirName};
300 pth.append( fileName );
301
302 m_PRGraph.dumpPrecRules( pth, slot );
303 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
concurrency::PrecedenceRulesGraph::dumpPrecRules
void dumpPrecRules(const boost::filesystem::path &, const EventSlot &slot)
dump to file the precedence rules
Definition: PrecedenceRulesGraph.cpp:561
std::to_string
T to_string(T... args)
PrecedenceSvc::m_dumpDirName
boost::filesystem::path m_dumpDirName
Precedence analysis facilities.
Definition: PrecedenceSvc.h:78
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:10
std::string
STL class.
PrecedenceSvc::m_dumpPrecRulesFile
Gaudi::Property< std::string > m_dumpPrecRulesFile
Definition: PrecedenceSvc.h:88
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
PrecedenceSvc::m_dumpPrecRules
Gaudi::Property< bool > m_dumpPrecRules
Definition: PrecedenceSvc.h:87
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:73
EventContext::eventID
const EventIDBase & eventID() const
Definition: EventContext.h:45

## ◆ dumpPrecedenceTrace()

void PrecedenceSvc::dumpPrecedenceTrace | ( | EventSlot & | slot | ) |
| override

Dump precedence trace (available only in DEBUG mode, and must be enabled with the corresponding service property)

Definition at line 306 of file PrecedenceSvc.cpp.

306 {
307
308 if ( !m_dumpPrecTrace ) {
309 warning() << "To trace task precedence patterns, set DumpPrecedenceTrace "
310 << "property to True " << endmsg;
311 return;
312 }
313
314 ON_DEBUG debug() << "Dumping temporal precedence trace" << endmsg;
315
316 std::string fileName;
317 if ( m_dumpPrecTraceFile.empty() ) {
318 const auto& eventID = slot.eventContext->eventID();
319 fileName = "trace.evt-" + std::to_string( eventID.event_number() ) + "." + "run-" +
320 std::to_string( eventID.run_number() ) + ".graphml";
321 } else {
322 fileName = m_dumpPrecTraceFile;
323 }
324
325 boost::filesystem::path pth{m_dumpDirName};
326 pth.append( fileName );
327
328 m_PRGraph.dumpPrecTrace( pth );
329 }
PrecedenceSvc::m_dumpPrecTrace
Gaudi::Property< bool > m_dumpPrecTrace
Definition: PrecedenceSvc.h:80
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:932
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
std::to_string
T to_string(T... args)
PrecedenceSvc::m_dumpDirName
boost::filesystem::path m_dumpDirName
Precedence analysis facilities.
Definition: PrecedenceSvc.h:78
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:10
std::string
STL class.
concurrency::PrecedenceRulesGraph::dumpPrecTrace
void dumpPrecTrace(const boost::filesystem::path &)
dump to file the precedence trace
Definition: PrecedenceRulesGraph.cpp:602
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
PrecedenceSvc::m_dumpPrecTraceFile
Gaudi::Property< std::string > m_dumpPrecTraceFile
Definition: PrecedenceSvc.h:82
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EventSlot::eventContext
std::unique_ptr< EventContext > eventContext
Cache for the eventContext.
Definition: EventSlot.h:73
EventContext::eventID
const EventIDBase & eventID() const
Definition: EventContext.h:45

## ◆ finalize()

StatusCode PrecedenceSvc::finalize | ( |  | ) |
| override

Finalize.

Definition at line 334 of file PrecedenceSvc.cpp.

334 { return Service::finalize(); }
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:164

## ◆ getPriority()

uint PrecedenceSvc::getPriority | ( | const std::string & | name | ) | const
| inline override

Get priority of an algorithm.

Definition at line 43 of file PrecedenceSvc.h.

43 {
44 return (int)m_PRGraph.getAlgorithmNode( name )->getRank();
45 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
concurrency::PrecedenceRulesGraph::getAlgorithmNode
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
Definition: PrecedenceRulesGraph.h:649
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
concurrency::AlgorithmNode::getRank
const float & getRank() const
Get Algorithm rank.
Definition: PrecedenceRulesGraph.h:508

## ◆ getRules()

const concurrency::PrecedenceRulesGraph* PrecedenceSvc::getRules | ( |  | ) | const
| inline

Precedence rules accessor.

Definition at line 63 of file PrecedenceSvc.h.

63 { return &m_PRGraph; };
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72

## ◆ initialize()

StatusCode PrecedenceSvc::initialize | ( |  | ) |
| override

Initialize.

Definition at line 18 of file PrecedenceSvc.cpp.

18 {
19 using namespace concurrency;
20
21 auto sc = Service::initialize(); // parent class must be initialized first
22 if ( sc.isFailure() ) {
23 fatal() << "Base class failed to initialize" << endmsg;
24 return sc;
25 }
26
27 // prepare a directory to dump precedence analysis files to.
28 if ( m_dumpPrecTrace || m_dumpPrecRules ) {
29 if ( !boost::filesystem::create_directory( m_dumpDirName ) ) {
30 error() << "Could not create directory " << m_dumpDirName
31 << "required "
32 "for task precedence tracing"
33 << endmsg;
34 return StatusCode::FAILURE;
35 }
36 }
37
38 if ( m_dumpPrecRules ) m_PRGraph.enableAnalysis();
39
40 // Get the algo resource pool
41 m_algResourcePool = serviceLocator()->service( "AlgResourcePool" );
42 if ( !m_algResourcePool.isValid() ) {
43 fatal() << "Error retrieving AlgoResourcePool" << endmsg;
44 return StatusCode::FAILURE;
45 }
46
47 info() << "Assembling CF and DF task precedence rules" << endmsg;
48
49 ON_DEBUG debug() << "Assembling CF precedence realm:" << endmsg;
50 // create the root CF node
51 m_PRGraph.addHeadNode( "RootDecisionHub", Concurrent{true}, PromptDecision{false}, ModeOr{true}, AllPass{true},
52 Inverted{false} );
53 // assemble the CF rules
54 for ( const auto& ialgoPtr : m_algResourcePool->getTopAlgList() ) {
55 auto algorithm = dynamic_cast<Gaudi::Algorithm*>( ialgoPtr );
56 if ( !algorithm ) fatal() << "Conversion from IAlgorithm to Gaudi::Algorithm failed" << endmsg;
57 sc = assembleCFRules( algorithm, "RootDecisionHub" );
58 if ( sc.isFailure() ) {
59 fatal() << "Could not assemble the CF precedence realm" << endmsg;
60 return sc;
61 }
62 }
63
64 if ( m_ignoreDFRules ) {
65 warning() << "Ignoring DF precedence rules, disabling all associated features" << endmsg;
66 return StatusCode::SUCCESS;
67 }
68
69 ON_DEBUG debug() << "Assembling DF precedence realm:" << endmsg;
70 sc = m_PRGraph.initialize();
71 if ( sc.isFailure() ) {
72 fatal() << "Could not assemble the DF precedence realm" << endmsg;
73 return sc;
74 }
75
76 // Rank algorithms if a prioritization rule is supplied
77 if ( m_mode == "PCE" ) {
78 auto ranker = concurrency::RankerByProductConsumption();
79 m_PRGraph.rankAlgorithms( ranker );
80 } else if ( m_mode == "COD" ) {
81 auto ranker = concurrency::RankerByCummulativeOutDegree();
82 m_PRGraph.rankAlgorithms( ranker );
83 } else if ( m_mode == "E" ) {
84 auto ranker = concurrency::RankerByEccentricity();
85 m_PRGraph.rankAlgorithms( ranker );
86 } else if ( m_mode == "T" ) {
87 auto ranker = concurrency::RankerByTiming();
88 m_PRGraph.rankAlgorithms( ranker );
89 } else if ( m_mode == "DRE" ) {
90 auto ranker = concurrency::RankerByDataRealmEccentricity();
91 m_PRGraph.rankAlgorithms( ranker );
92 } else if ( !m_mode.empty() ) {
93 error() << "Requested prioritization rule '" << m_mode << "' is unknown" << endmsg;
94 return StatusCode::FAILURE;
95 }
96
97 ON_DEBUG debug() << m_PRGraph.dumpDataFlow() << endmsg;
98
99 if ( m_verifyRules ) {
100 ON_DEBUG debug() << "Verifying task precedence rules" << endmsg;
101
102 auto propValidator = concurrency::NodePropertiesValidator();
103 m_PRGraph.accept( propValidator );
104 if ( !propValidator.passed() )
105 warning() << propValidator.reply() << endmsg;
106 else
107 ON_DEBUG debug() << propValidator.reply() << endmsg;
108 }
109
110 if ( sc.isSuccess() ) info() << "PrecedenceSvc initialized successfully" << endmsg;
111
112 return sc;
113 }
PrecedenceSvc::m_dumpPrecTrace
Gaudi::Property< bool > m_dumpPrecTrace
Definition: PrecedenceSvc.h:80
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:60
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:277
PrecedenceSvc::assembleCFRules
StatusCode assembleCFRules(Gaudi::Algorithm *, const std::string &, unsigned int recursionDepth=0)
Definition: PrecedenceSvc.cpp:116
CommonMessagingBase::warning
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
Definition: CommonMessaging.h:101
concurrency
Definition: PrecedenceRulesGraph.cpp:27
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:62
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
PrecedenceSvc::m_dumpDirName
boost::filesystem::path m_dumpDirName
Precedence analysis facilities.
Definition: PrecedenceSvc.h:78
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:10
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
concurrency::ModeOr
Gaudi::tagged_bool< class ModeOr_tag > ModeOr
Definition: PrecedenceRulesGraph.h:31
PrecedenceSvc::m_ignoreDFRules
Gaudi::Property< bool > m_ignoreDFRules
Scheduling strategy.
Definition: PrecedenceSvc.h:76
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
concurrency::PrecedenceRulesGraph::initialize
StatusCode initialize()
Initialize graph.
Definition: PrecedenceRulesGraph.cpp:199
concurrency::RankerByTiming
Definition: Rankers.h:31
PrecedenceSvc::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
A shortcut to the algorithm resource pool.
Definition: PrecedenceSvc.h:70
concurrency::RankerByDataRealmEccentricity
Definition: Rankers.h:47
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
IAlgResourcePool::getTopAlgList
virtual std::list< IAlgorithm * > getTopAlgList()=0
Get top list of algorithms.
PrecedenceSvc::m_verifyRules
Gaudi::Property< bool > m_verifyRules
Definition: PrecedenceSvc.h:90
concurrency::Inverted
Gaudi::tagged_bool< class Inverted_tag > Inverted
Definition: PrecedenceRulesGraph.h:33
concurrency::PrecedenceRulesGraph::enableAnalysis
void enableAnalysis()
BGL-based facilities.
Definition: PrecedenceRulesGraph.h:679
PrecedenceSvc::m_mode
Gaudi::Property< std::string > m_mode
Scheduling strategy.
Definition: PrecedenceSvc.h:74
concurrency::RankerByEccentricity
Definition: Rankers.h:39
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
concurrency::Concurrent
Gaudi::tagged_bool< class Concurrent_tag > Concurrent
Definition: PrecedenceRulesGraph.h:29
concurrency::PrecedenceRulesGraph::accept
void accept(IGraphVisitor &visitor) const
An entry point to visit all graph nodes.
Definition: PrecedenceRulesGraph.cpp:479
concurrency::PromptDecision
Gaudi::tagged_bool< class PromptDecision_tag > PromptDecision
Definition: PrecedenceRulesGraph.h:30
PrecedenceSvc::m_dumpPrecRules
Gaudi::Property< bool > m_dumpPrecRules
Definition: PrecedenceSvc.h:87
concurrency::RankerByProductConsumption
Definition: Rankers.h:10
concurrency::AllPass
Gaudi::tagged_bool< class AllPass_tag > AllPass
Definition: PrecedenceRulesGraph.h:32
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
concurrency::PrecedenceRulesGraph::dumpDataFlow
std::string dumpDataFlow() const
Print out all data origins and destinations, as reflected in the EF graph.
Definition: PrecedenceRulesGraph.cpp:534
concurrency::NodePropertiesValidator
Definition: Validators.h:13
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:92
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
concurrency::RankerByCummulativeOutDegree
Definition: Rankers.h:18
concurrency::PrecedenceRulesGraph::addHeadNode
void addHeadNode(const std::string &headName, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted)
Add a node, which has no parents.
Definition: PrecedenceRulesGraph.cpp:445
concurrency::PrecedenceRulesGraph::rankAlgorithms
void rankAlgorithms(IGraphVisitor &ranker) const
Rank Algorithm nodes by the number of data outputs.
Definition: PrecedenceRulesGraph.cpp:491

## ◆ isBlocking()

bool PrecedenceSvc::isBlocking | ( | const std::string & | name | ) | const
| inline override

Check if a task is CPU-blocking.

Definition at line 48 of file PrecedenceSvc.h.

48 { return m_PRGraph.getAlgorithmNode( name )->isIOBound(); }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
concurrency::PrecedenceRulesGraph::getAlgorithmNode
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
Definition: PrecedenceRulesGraph.h:649
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:274
concurrency::AlgorithmNode::isIOBound
bool isIOBound() const
Check if algorithm is I/O-bound.
Definition: PrecedenceRulesGraph.h:518

## ◆ iterate()

StatusCode PrecedenceSvc::iterate | ( | EventSlot & | slot,
|  | const Cause & | cause
| ) |  |
| override

Infer the precedence effect caused by an execution flow event.

Definition at line 186 of file PrecedenceSvc.cpp.

186 {
187
188 if ( LIKELY( Cause::source::Task == cause.m_source ) ) {
189 ON_VERBOSE verbose() << "Triggering bottom-up traversal at node '" << cause.m_sourceName << "'" << endmsg;
190 auto visitor = concurrency::DecisionUpdater( slot, cause, m_dumpPrecTrace );
191 m_PRGraph.getAlgorithmNode( cause.m_sourceName )->accept( visitor );
192 } else {
193 ON_VERBOSE verbose() << "Triggering top-down traversal at the root node" << endmsg;
194 auto visitor = concurrency::Supervisor( slot, cause, m_dumpPrecTrace );
195 m_PRGraph.getHeadNode()->accept( visitor );
196 }
197
198 if ( UNLIKELY( m_dumpPrecTrace ) )
199 if ( UNLIKELY( CFRulesResolved( slot.parentSlot ? *slot.parentSlot : slot ) ) )
200 dumpPrecedenceTrace( slot.parentSlot ? *slot.parentSlot : slot );
201
202 if ( UNLIKELY( m_dumpPrecRules ) )
203 if ( UNLIKELY( CFRulesResolved( slot.parentSlot ? *slot.parentSlot : slot ) ) )
204 dumpPrecedenceRules( slot.parentSlot ? *slot.parentSlot : slot );
205
206 return StatusCode::SUCCESS;
207 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
PrecedenceSvc::m_dumpPrecTrace
Gaudi::Property< bool > m_dumpPrecTrace
Definition: PrecedenceSvc.h:80
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
PrecedenceSvc::dumpPrecedenceRules
void dumpPrecedenceRules(EventSlot &) override
Dump precedence rules (available only in DEBUG mode, and must be enabled with the corresponding servi...
Definition: PrecedenceSvc.cpp:280
Cause::source::Task
concurrency::PrecedenceRulesGraph::getAlgorithmNode
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
Definition: PrecedenceRulesGraph.h:649
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
Cause::m_source
source m_source
Definition: PrecedenceRulesGraph.h:390
concurrency::DecisionNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:54
ON_VERBOSE
#define ON_VERBOSE
Definition: PrecedenceSvc.cpp:11
CommonMessagingBase::verbose
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
Definition: CommonMessaging.h:110
concurrency::DecisionUpdater
Definition: Promoters.h:38
PrecedenceSvc::CFRulesResolved
bool CFRulesResolved(EventSlot &) const override
Check if the root CF decision is resolved.
Definition: PrecedenceSvc.cpp:255
PrecedenceSvc::dumpPrecedenceTrace
void dumpPrecedenceTrace(EventSlot &) override
Dump precedence trace (available only in DEBUG mode, and must be enabled with the corresponding servi...
Definition: PrecedenceSvc.cpp:306
LIKELY
#define LIKELY(x)
Definition: Kernel.h:95
PrecedenceSvc::m_dumpPrecRules
Gaudi::Property< bool > m_dumpPrecRules
Definition: PrecedenceSvc.h:87
concurrency::PrecedenceRulesGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: PrecedenceRulesGraph.h:644
EventSlot::parentSlot
EventSlot * parentSlot
Pointer to parent slot (null for top level)
Definition: EventSlot.h:86
concurrency::AlgorithmNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:170
concurrency::Supervisor
Definition: Promoters.h:54
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Cause::m_sourceName
std::string m_sourceName
Definition: PrecedenceRulesGraph.h:391

## ◆ printState()

const std::string PrecedenceSvc::printState | ( | EventSlot & | slot | ) | const
| override

Definition at line 272 of file PrecedenceSvc.cpp.

272 {
273
274 std::stringstream ss;
275 m_PRGraph.printState( ss, slot, 0 );
276 return ss.str();
277 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
std::stringstream
STL class.
concurrency::PrecedenceRulesGraph::printState
void printState(std::stringstream &output, EventSlot &slot, const unsigned int &recursionLevel) const
Print a string representing the control flow state.
Definition: PrecedenceRulesGraph.h:668
std::stringstream::str
T str(T... args)

## ◆ simulate()

StatusCode PrecedenceSvc::simulate | ( | EventSlot & | slot | ) | const
| override

Simulate execution flow.

Definition at line 210 of file PrecedenceSvc.cpp.

210 {
211
212 Cause cs = {Cause::source::Root, "RootDecisionHub"};
213 auto visitor = concurrency::RunSimulator( slot, cs );
214
215 auto& nodeDecisions = slot.controlFlowState;
216
217 std::vector<int> prevNodeDecisions;
218 int cntr = 0;
219 std::vector<int> counters;
220
221 while ( !CFRulesResolved( slot ) ) {
222 cntr += 1;
223 int prevAlgosNum = visitor.m_nodesSucceeded;
224 ON_DEBUG debug() << " Proceeding with iteration #" << cntr << endmsg;
225 prevNodeDecisions = slot.controlFlowState;
226 m_PRGraph.getHeadNode()->accept( visitor );
227 if ( prevNodeDecisions == nodeDecisions ) {
228 error() << " No progress on iteration " << cntr << " detected, node decisions are:" << nodeDecisions << endmsg;
229 return StatusCode::FAILURE;
230 }
231 info() << " Iteration #" << cntr << " finished, total algorithms executed: " << visitor.m_nodesSucceeded
232 << endmsg;
233
234 std::stringstream s;
235 s << cntr << ", " << ( visitor.m_nodesSucceeded - prevAlgosNum ) << "\n";
236
237 std::ofstream myfile;
238 myfile.open( "RunSimulation.csv", std::ios::app );
239 myfile << s.str();
240 myfile.close();
241
242 if ( visitor.m_nodesSucceeded != prevAlgosNum ) counters.push_back( visitor.m_nodesSucceeded );
243 }
244
245 info() << "Asymptotical intra-event speedup: " << (float)visitor.m_nodesSucceeded / (float)counters.size() << endmsg;
246
247 // Reset algorithm states and node decisions
248 slot.algsStates.reset();
249 nodeDecisions.assign( nodeDecisions.size(), -1 );
250
251 return StatusCode::SUCCESS;
252 }
PrecedenceSvc::m_PRGraph
concurrency::PrecedenceRulesGraph m_PRGraph
Graph of precedence rules.
Definition: PrecedenceSvc.h:72
std::ofstream::open
T open(T... args)
concurrency::RunSimulator
Definition: Promoters.h:77
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
EventSlot::controlFlowState
std::vector< int > controlFlowState
State of the control flow.
Definition: EventSlot.h:77
ON_DEBUG
#define ON_DEBUG
Definition: PrecedenceSvc.cpp:10
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:104
std::stringstream
STL class.
concurrency::DecisionNode::accept
bool accept(IGraphVisitor &visitor) override
Visitor entry point.
Definition: PrecedenceRulesGraph.cpp:54
std::vector::push_back
T push_back(T... args)
std::ofstream
STL class.
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
Cause
Definition: PrecedenceRulesGraph.h:387
Cause::source::Root
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:107
PrecedenceSvc::CFRulesResolved
bool CFRulesResolved(EventSlot &) const override
Check if the root CF decision is resolved.
Definition: PrecedenceSvc.cpp:255
std::vector::size
T size(T... args)
std::vector< int >
concurrency::PrecedenceRulesGraph::getHeadNode
DecisionNode * getHeadNode() const
Get head node.
Definition: PrecedenceRulesGraph.h:644
AlgsExecutionStates::reset
void reset()
Definition: AlgsExecutionStates.h:44
gaudirun.s
string s
Definition: gaudirun.py:316
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
EventSlot::algsStates
AlgsExecutionStates algsStates
Vector of algorithms states.
Definition: EventSlot.h:75

## Member Data Documentation

## ◆ m_algResourcePool

SmartIF<IAlgResourcePool> PrecedenceSvc::m_algResourcePool
| private

A shortcut to the algorithm resource pool.

Definition at line 70 of file PrecedenceSvc.h.

## ◆ m_dumpDirName

boost::filesystem::path PrecedenceSvc::m_dumpDirName
| private

Initial value:
{
boost::filesystem::unique_path( boost::filesystem::path( "precedence.analysis.%%%%" ) )}

Precedence analysis facilities.

Definition at line 78 of file PrecedenceSvc.h.

## ◆ m_dumpPrecRules

Gaudi::Property<bool> PrecedenceSvc::m_dumpPrecRules {this, "DumpPrecedenceRules", false, "Dump task precedence rules."}
| private

Definition at line 87 of file PrecedenceSvc.h.

## ◆ m_dumpPrecRulesFile

Gaudi::Property<std::string> PrecedenceSvc::m_dumpPrecRulesFile
| private

Initial value:
{this, "PrecedenceRulesFile", "",
"Override default name of the GRAPHML precedence rules file."}

Definition at line 88 of file PrecedenceSvc.h.

## ◆ m_dumpPrecTrace

Gaudi::Property<bool> PrecedenceSvc::m_dumpPrecTrace
| private

Initial value:
{this, "DumpPrecedenceTrace", false,
"Dump task precedence traces for each event."}

Definition at line 80 of file PrecedenceSvc.h.

## ◆ m_dumpPrecTraceFile

Gaudi::Property<std::string> PrecedenceSvc::m_dumpPrecTraceFile
| private

Initial value:
{
this, "PrecedenceTraceFile", "",
"Override default name of the GRAPHML trace file. NOTE: if more than "
"1 event is processed, the setting forces creation of a single file "
"with cumulative precedence trace."}

Definition at line 82 of file PrecedenceSvc.h.

## ◆ m_ignoreDFRules

Gaudi::Property<bool> PrecedenceSvc::m_ignoreDFRules {this, "IgnoreDFRules", false, "Ignore the data flow rules."}
| private

Scheduling strategy.

Definition at line 76 of file PrecedenceSvc.h.

## ◆ m_mode

Gaudi::Property<std::string> PrecedenceSvc::m_mode {this, "TaskPriorityRule", "", "Task avalanche induction strategy."}
| private

Scheduling strategy.

Definition at line 74 of file PrecedenceSvc.h.

## ◆ m_PRGraph

concurrency::PrecedenceRulesGraph PrecedenceSvc::m_PRGraph {"PrecedenceRulesGraph", serviceLocator()}
| private

Graph of precedence rules.

Definition at line 72 of file PrecedenceSvc.h.

## ◆ m_verifyRules

Gaudi::Property<bool> PrecedenceSvc::m_verifyRules
| private

Initial value:
{this, "VerifyTaskPrecedenceRules", true,
"Verify task precedence rules for common errors."}

Definition at line 90 of file PrecedenceSvc.h.

The documentation for this class was generated from the following files:

- GaudiHive/src/PrecedenceSvc.h
- GaudiHive/src/PrecedenceSvc.cpp