ATLAS Offline Software
Loading...
Searching...
No Matches
MPIHiveEventLoopMgr Class Reference

The MPI event loop manager. More...

#include <MPIHiveEventLoopMgr.h>

Inheritance diagram for MPIHiveEventLoopMgr:
Collaboration diagram for MPIHiveEventLoopMgr:

Public Types

typedef IEvtSelector::Context EvtContext
typedef std::list< SmartIF< IAlgorithm > > ListAlg

Public Member Functions

 MPIHiveEventLoopMgr (const std::string &name, ISvcLocator *svcLoc)
 Standard Constructor.
virtual ~MPIHiveEventLoopMgr ()
 Standard Destructor.
virtual StatusCode initialize () override
 implementation of IAppMgrUI::initalize
virtual StatusCode finalize () override
 implementation of IAppMgrUI::finalize
virtual StatusCode nextEvent (int maxevt) override
 implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
StatusCode getEventRoot (IOpaqueAddress *&refpAddr)
 Create event address using event selector.
virtual StatusCode executeEvent (EventContext &&ctx) override
 implementation of IEventProcessor::executeEvent(void* par)
virtual StatusCode executeRun (int maxevt) override
 implementation of IEventProcessor::executeRun(int maxevt)
virtual StatusCode stopRun () override
 implementation of IEventProcessor::stopRun()
virtual StatusCode stop () override
 implementation of IService::stop
virtual StatusCode seek (int evt) override
 Seek to a given event.
virtual int curEvent () const override
 Return the current event count.
virtual int size () override
 Return the size of the collection.
virtual void handle (const Incident &inc) override
 IIncidentListenet interfaces.
virtual const std::string & name () const override
virtual void modifyEventContext (EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Protected Types

typedef ServiceHandle< IIncidentSvc > IIncidentSvc_t
typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t
typedef ServiceHandle< IDataManagerSvc > IDataManagerSvc_t
typedef ServiceHandle< IConversionSvc > IConversionSvc_t
typedef ServiceHandle< IEvtIdModifierSvc > IEvtIdModifierSvc_t
typedef EventID::number_type number_type
typedef IAthenaEvtLoopPreSelectTool tool_type
typedef ToolHandleArray< tool_type > tool_store
typedef tool_store::const_iterator tool_iterator
typedef std::vector< unsigned int > tool_stats
typedef tool_stats::const_iterator tool_stats_iterator

Protected Member Functions

StatusCode drainLocalScheduler ()
 Drain the local scheduler of any (at least one) completed events.
StatusCode eventFinished (const EventContext &ctx) override
 Record completion and apply MPI's tolerated-failure thresholds.
StatusCode insertEvent (int eventIdx, bool &endOfStream, std::int64_t requestTime_ns)
 Insert an event into the local scheduler.
StatusCode workerEventLoop ()
 Worker event loop (runs on worker, requests events over MPI).
StatusCode masterEventLoop (int maxEvt)
 Master event loop (runs on master, provides events over MPI).
void setupPreSelectTools (Gaudi::Details::PropertyBase &)
 property update handler:sets up the Pre-selection tools
virtual StatusCode writeHistograms (bool force=false)
 Dump out histograms as needed.
virtual StatusCode executeAlgorithms ()
 Run the algorithms for the current event.
StatusCode initializeAlgorithms ()
 Initialize all algorithms and output streams.
StatusCode clearWBSlot (int evtSlot)
 Clear a slot in the WB.
int declareEventRootAddress (EventContext &)
 Declare the root address of the event.
virtual EventContext createEventContext () override
 Create event context.
void setTimeout (Timeout &instance)
 Set timeout.
void resetTimeout (Timeout &instance)
 Reset timeout.
Event lifecycle for derived loop managers

Called on the driving thread, in the order declared below; executeEvent() is the reference composition:

  1. allocateEventContext() reserves and selects a whiteboard slot.
  2. The driver fills the slot and records the context in it (executeEvent() reads the next input event).
  3. submitEvent() hands the event to the scheduler.
  4. drainScheduler() collects finished events; finishEvent() calls the eventFinished() hook and releases the slot.
EventContext allocateEventContext (size_t eventNumber)
StatusCode submitEvent (EventContext &ctx)
 Submit a recorded context; the scheduler receives its own copy.
StatusCode finishEvent (const EventContext &ctx)
 Finish one scheduler-returned event on the driving thread.
virtual bool clearStoreOnEndAlgorithms () const
 Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result.
int drainScheduler (int &finishedEvents)
 Drain the scheduler from all actions that may be queued.

Protected Attributes

ServiceHandle< IMPIClusterSvc > m_clusterSvc
 Reference to the MPIClusterSvc.
int m_contiguousFailedEvts {0}
int m_totalFailedEvts {0}
int m_nLocalCreatedEvts {0}
int m_nLocalSkippedEvts {0}
int m_nLocalFinishedEvts {0}
IIncidentSvc_t m_incidentSvc
 Reference to the incident service.
StoreGateSvc_t m_eventStore
 Reference to StoreGateSvc;.
IEvtSelector * m_evtSelector
 Reference to the Event Selector.
EvtContext * m_evtContext
 Gaudi event selector Context (may be used as a cursor by the evt selector).
StringProperty m_evtsel
IDataManagerSvc_t m_histoDataMgrSvc
 Reference to the Histogram Data Service.
IConversionSvc_t m_histoPersSvc
IEvtIdModifierSvc_t m_evtIdModSvc
StringProperty m_histPersName
number_type m_currentRun
 current run number
bool m_firstRun
IntegerProperty m_failureMode
UnsignedIntegerProperty m_eventPrintoutInterval
tool_stats m_toolInvoke
 tool called counter
tool_stats m_toolReject
 tool returns StatusCode::FAILURE counter
tool_stats m_toolAccept
 tool returns StatusCode::SUCCESS counter
tool_store m_tools
 internal tool store
bool m_requireInputAttributeList {}
 require input attribute list
bool m_useSecondaryEventNumber {}
 read event number from secondary input
SmartIF< IHiveWhiteBoard > m_whiteboard
 Reference to the Whiteboard interface.
SmartIF< IAlgResourcePool > m_algResourcePool
 Reference to the Algorithm resource pool.
SmartIF< IAlgExecStateSvc > m_aess
 Reference to the Algorithm Execution State Svc.
SmartIF< IProperty > m_appMgrProperty
 Property interface of ApplicationMgr.
SmartIF< IScheduler > m_schedulerSvc
 A shortcut for the scheduler.
SmartIF< IIncidentListener > m_abortEventListener
 Instance of the incident listener waiting for AbortEvent.
std::string m_schedulerName
 Name of the scheduler to be used.
std::string m_whiteboardName
 Name of the Whiteboard to be used.
bool m_scheduledStop
 Scheduled stop of event processing.
bool m_terminateLoop { false }
unsigned int m_nev
 events processed
unsigned int m_proc
bool m_useTools
bool m_doEvtHeartbeat
EventContext m_lastEventContext

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

UnsignedIntegerProperty m_firstEventIndex
int m_evtSelectorCurrentPos = 0
unsigned int m_nevt
unsigned int m_timeStamp { 0 }
UnsignedIntegerProperty m_writeInterval
bool m_writeHists
bool m_firstEventAlone
unsigned int m_flmbi
unsigned int m_timeStampInt
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels).
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging).

Detailed Description

The MPI event loop manager.

As with AthenaHiveEventLoopMgr but in a multi-node MPI environment. This class is derived from and implemented in terms of AthenaHiveEventLoopMgr.

Definition at line 34 of file MPIHiveEventLoopMgr.h.

Member Typedef Documentation

◆ EvtContext

typedef IEvtSelector::Context AthenaHiveEventLoopMgr::EvtContext
inherited

Definition at line 74 of file AthenaHiveEventLoopMgr.h.

◆ IConversionSvc_t

typedef ServiceHandle<IConversionSvc> AthenaHiveEventLoopMgr::IConversionSvc_t
protectedinherited

Definition at line 96 of file AthenaHiveEventLoopMgr.h.

◆ IDataManagerSvc_t

typedef ServiceHandle<IDataManagerSvc> AthenaHiveEventLoopMgr::IDataManagerSvc_t
protectedinherited

Definition at line 92 of file AthenaHiveEventLoopMgr.h.

◆ IEvtIdModifierSvc_t

◆ IIncidentSvc_t

typedef ServiceHandle<IIncidentSvc> AthenaHiveEventLoopMgr::IIncidentSvc_t
protectedinherited

Definition at line 77 of file AthenaHiveEventLoopMgr.h.

◆ ListAlg

typedef std::list<SmartIF<IAlgorithm> > AthenaHiveEventLoopMgr::ListAlg
inherited

Definition at line 291 of file AthenaHiveEventLoopMgr.h.

◆ number_type

Definition at line 107 of file AthenaHiveEventLoopMgr.h.

◆ StoreGateSvc_t

Definition at line 81 of file AthenaHiveEventLoopMgr.h.

◆ tool_iterator

typedef tool_store::const_iterator AthenaHiveEventLoopMgr::tool_iterator
protectedinherited

Definition at line 121 of file AthenaHiveEventLoopMgr.h.

◆ tool_stats

typedef std::vector<unsigned int> AthenaHiveEventLoopMgr::tool_stats
protectedinherited

Definition at line 122 of file AthenaHiveEventLoopMgr.h.

◆ tool_stats_iterator

typedef tool_stats::const_iterator AthenaHiveEventLoopMgr::tool_stats_iterator
protectedinherited

Definition at line 123 of file AthenaHiveEventLoopMgr.h.

◆ tool_store

typedef ToolHandleArray< tool_type > AthenaHiveEventLoopMgr::tool_store
protectedinherited

Definition at line 120 of file AthenaHiveEventLoopMgr.h.

◆ tool_type

Definition at line 119 of file AthenaHiveEventLoopMgr.h.

Constructor & Destructor Documentation

◆ MPIHiveEventLoopMgr()

MPIHiveEventLoopMgr::MPIHiveEventLoopMgr ( const std::string & name,
ISvcLocator * svcLoc )

Standard Constructor.

Definition at line 20 of file MPIHiveEventLoopMgr.cxx.

22 : AthenaHiveEventLoopMgr(name, svcLoc) {}
virtual const std::string & name() const override
AthenaHiveEventLoopMgr()=delete

◆ ~MPIHiveEventLoopMgr()

MPIHiveEventLoopMgr::~MPIHiveEventLoopMgr ( )
virtualdefault

Standard Destructor.

Member Function Documentation

◆ allocateEventContext()

EventContext AthenaHiveEventLoopMgr::allocateEventContext ( size_t eventNumber)
protectedinherited

Allocate/select a slot, with an index supplied by the driving loop.

Definition at line 1149 of file AthenaHiveEventLoopMgr.cxx.

1149 {
1150 const size_t slot = m_whiteboard->allocateStore(eventNumber);
1151 if (slot == std::string::npos) {
1152 ATH_MSG_ERROR("No free whiteboard slot");
1153 return EventContext{};
1154 }
1155 if (m_whiteboard->selectStore(slot).isFailure()) {
1156 ATH_MSG_ERROR("Could not select whiteboard slot {}", slot);
1157 m_whiteboard->freeStore(slot).ignore();
1158 return EventContext{};
1159 }
1160 EventContext ctx{eventNumber, slot};
1162 ctx, Atlas::ExtendedEventContext(m_eventStore->hiveProxyDict()));
1163 return ctx;
1164}
#define ATH_MSG_ERROR(x,...)
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard interface.
StoreGateSvc_t m_eventStore
Reference to StoreGateSvc;.
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.

◆ clearStoreOnEndAlgorithms()

virtual bool AthenaHiveEventLoopMgr::clearStoreOnEndAlgorithms ( ) const
inlineprotectedvirtualinherited

Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result.

Definition at line 198 of file AthenaHiveEventLoopMgr.h.

198{ return true; }

◆ clearWBSlot()

StatusCode AthenaHiveEventLoopMgr::clearWBSlot ( int evtSlot)
protectedinherited

Clear a slot in the WB.

Definition at line 1298 of file AthenaHiveEventLoopMgr.cxx.

1298 {
1299 return m_whiteboard->freeStore(evtSlot);
1300}

◆ createEventContext()

EventContext AthenaHiveEventLoopMgr::createEventContext ( )
overrideprotectedvirtualinherited

Create event context.

Definition at line 1145 of file AthenaHiveEventLoopMgr.cxx.

1145 {
1147}
EventContext allocateEventContext(size_t eventNumber)

◆ curEvent()

int AthenaHiveEventLoopMgr::curEvent ( ) const
overridevirtualinherited

Return the current event count.

Definition at line 796 of file AthenaHiveEventLoopMgr.cxx.

797{
798 return m_nevt;
799}

◆ declareEventRootAddress()

int AthenaHiveEventLoopMgr::declareEventRootAddress ( EventContext & ctx)
protectedinherited

Declare the root address of the event.

FIXME ???

Definition at line 924 of file AthenaHiveEventLoopMgr.cxx.

924 {
925
926 // return codes:
927 // -1 : error
928 // 0 : no more events in selection
929 // 1 : ok
930
931 StatusCode sc(StatusCode::SUCCESS);
932
933 //-----------------------------------------------------------------------
934 // we need an EventInfo Object to fire the incidents.
935 //-----------------------------------------------------------------------
936 std::unique_ptr<const EventInfo> pEvent{};
937 if ( m_evtContext ) {
938 // Deal with the case when an EventSelector is provided
939 //
940 // FIXME: flow control if no more events in selector, etc.
941 //
942
943 IOpaqueAddress* addr{};
944
945 sc = m_evtSelector->next(*m_evtContext);
946
947 if ( !sc.isSuccess() ) {
948 // This is the end of the loop. No more events in the selection
949 ATH_MSG_INFO ( "No more events in event selection " );
950 return 0;
951 }
952
953 if (m_evtSelector->createAddress(*m_evtContext, addr).isFailure()) {
954 ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
955 return -1;
956 }
957
958
959 // Most iterators provide the IOA of an event header (EventInfo, DataHeader)
960 if (0 != addr) {
961 //create its proxy
962 sc = m_eventStore->recordAddress(addr);
963 if( !sc.isSuccess() ) {
965 ATH_MSG_WARNING ( "Error declaring Event object" );
966 return 0;
967 }
968 } if ((sc=m_eventStore->loadEventProxies()).isFailure()) {
969 ATH_MSG_ERROR ( "Error loading Event proxies" );
970 return -1;
971 }
972
973 bool consume_modifier_stream = false;
974 // First try to build a legacy EventInfo object from the TAG information
975 // Read the attribute list
976 const AthenaAttributeList* pAttrList = m_eventStore->tryConstRetrieve<AthenaAttributeList>("Input");
977 if ( pAttrList != nullptr && pAttrList->size() > 6 ) { // Try making EventID-only EventInfo object from in-file TAG
978 try {
979 unsigned int runNumber = (*pAttrList)["RunNumber"].data<unsigned int>();
980 unsigned long long eventNumber = (*pAttrList)["EventNumber"].data<unsigned long long>();
981 unsigned int eventTime = (*pAttrList)["EventTime"].data<unsigned int>();
982 unsigned int eventTimeNS = (*pAttrList)["EventTimeNanoSec"].data<unsigned int>();
983 unsigned int lumiBlock = (*pAttrList)["LumiBlockN"].data<unsigned int>();
984 unsigned int bunchId = (*pAttrList)["BunchId"].data<unsigned int>();
985
986 ATH_MSG_DEBUG ( "use TAG with runNumber={}", runNumber );
987 consume_modifier_stream = true;
988 // an option to override primary eventNumber with the secondary one in case of DoubleEventSelector
990 unsigned long long eventNumberSecondary{};
991 if ( !(pAttrList->exists("hasSecondaryInput") && (*pAttrList)["hasSecondaryInput"].data<bool>()) ) {
992 ATH_MSG_FATAL ( "Secondary EventNumber requested, but secondary input does not exist!" );
993 return -1;
994 }
995 if ( pAttrList->exists("EventNumber_secondary") ) {
996 eventNumberSecondary = (*pAttrList)["EventNumber_secondary"].data<unsigned long long>();
997 }
998 else {
999 // try legacy EventInfo if secondary input did not have attribute list
1000 // primary input should not have this EventInfo type
1001 const EventInfo* pEventSecondary = m_eventStore->tryConstRetrieve<EventInfo>();
1002 if (pEventSecondary) {
1003 eventNumberSecondary = pEventSecondary->event_ID()->event_number();
1004 }
1005 else {
1006 ATH_MSG_FATAL ( "Secondary EventNumber requested, but it does not exist!" );
1007 return -1;
1008 }
1009 }
1010 if (eventNumberSecondary != 0) {
1011 m_doEvtHeartbeat = (m_eventPrintoutInterval.value() > 0 &&
1012 0 == (m_nev % m_eventPrintoutInterval.value()));
1013 if (m_doEvtHeartbeat) {
1014 ATH_MSG_INFO ( " ===>>> using secondary event #{} instead of #{} <<<===",
1015 eventNumberSecondary, eventNumber);
1016 }
1017 eventNumber = eventNumberSecondary;
1018 }
1019 }
1020
1021 pEvent = std::make_unique<EventInfo>(
1022 std::make_unique<EventID>(runNumber, eventNumber, eventTime,
1023 eventTimeNS, lumiBlock, bunchId),
1024 nullptr);
1025 } catch (...) {
1026 }
1027 } else if (m_requireInputAttributeList) {
1028 ATH_MSG_FATAL ( "Valid input attribute list required but not present!" );
1029 return -1;
1030 }
1031 // In the case that there is no TAG information
1032 const EventInfo* pEventObserver{pEvent.get()};
1033 if (!pEventObserver) {
1034 // Secondly try to retrieve a legacy EventInfo object from the input file
1035 // Again, m_nevt is incremented after executeEvent in the Hive manager so we don't need a -1
1037 pEventObserver = m_eventStore->tryConstRetrieve<EventInfo>();
1038 if (pEventObserver) {
1039 consume_modifier_stream = false; // stream will already have been consumed during EventInfo TP conversion
1040 ATH_MSG_DEBUG ( "use EventInfo" );
1041 } else {
1042 // Finally try to retrieve an xAOD::EventInfo object from the
1043 // input file and build a legacy EventInfo object from that.
1044 const xAOD::EventInfo* pXEvent{nullptr};
1045 sc = m_eventStore->retrieve(pXEvent);
1046 if( !sc.isSuccess() ) {
1047 ATH_MSG_ERROR ( "Unable to retrieve Event root object" );
1048 return -1;
1049 }
1050 consume_modifier_stream = true;
1051 ATH_MSG_DEBUG ( "use xAOD::EventInfo with runNumber={}", pXEvent->runNumber() );
1052 // Build the old-style Event Info object for those clients that still need it
1053 pEvent = std::make_unique<EventInfo>(
1054 std::make_unique<EventID>(eventIDFromxAOD(pXEvent)),
1055 std::make_unique<EventType>(eventTypeFromxAOD(pXEvent)));
1056 pEventObserver = pEvent.get();
1057 sc = m_eventStore->record(std::move(pEvent), "");
1058 if( !sc.isSuccess() ) {
1059 ATH_MSG_ERROR ( "Error declaring event data object" );
1060 return -1;
1061 }
1062 }
1063 }
1064
1065 modifyEventContext(ctx, *(pEventObserver->event_ID()),
1066 consume_modifier_stream);
1067
1068 }
1069 else {
1070 // No EventSelector is provided, so with no iterator it's up to us
1071 // to create an EventInfo
1072 // first event # == 1
1073 unsigned int runNmb{1}, evtNmb{m_nevt + 1};
1074
1075 // increment the run/lumiBlock number if desired
1076 if (m_flmbi != 0) {
1077 runNmb = m_nevt / m_flmbi + 1;
1078 evtNmb = m_nevt % m_flmbi + 1;
1079 }
1080 auto eid = std::make_unique<EventID> (runNmb,evtNmb, m_timeStamp);
1081 // Change lumiBlock# to match runNumber
1082 eid->set_lumi_block( runNmb );
1083
1085
1086 pEvent = std::make_unique<EventInfo>(std::move(eid),
1087 std::make_unique<EventType>());
1088
1089 bool consume_modifier_stream = true;
1090 // EventInfo TP Conversion not called in this case, so we would
1091 // want to consume the next IoV from the list in the
1092 // EvtIdModifierSvc.
1093 modifyEventContext(ctx,*(pEvent->event_ID()), consume_modifier_stream);
1094
1095 ATH_MSG_DEBUG ( "selecting store: {}", ctx.slot() );
1096
1097 m_whiteboard->selectStore( ctx.slot() ).ignore();
1098
1099 // EventInfo not working with format
1100 ATH_MSG_DEBUG ( "recording EventInfo " << *pEvent->event_ID() << " in "
1101 << m_eventStore->name() );
1102
1103 sc = m_eventStore->record(std::move(pEvent), "McEventInfo");
1104 if( !sc.isSuccess() ) {
1105 ATH_MSG_ERROR ( "Error declaring event data object" );
1106 return -1;
1107 }
1108 }
1109
1110 return 1;
1111}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
EventID eventIDFromxAOD(const xAOD::EventInfo *xaod)
Create EventID object from xAOD::EventInfo.
EventType eventTypeFromxAOD(const xAOD::EventInfo *xaod)
Create EventType object from xAOD::EventInfo.
EventInfo
static Double_t sc
UnsignedIntegerProperty m_eventPrintoutInterval
IEvtSelector * m_evtSelector
Reference to the Event Selector.
unsigned int m_nev
events processed
bool m_useSecondaryEventNumber
read event number from secondary input
bool m_requireInputAttributeList
require input attribute list
EvtContext * m_evtContext
Gaudi event selector Context (may be used as a cursor by the evt selector).
virtual void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
EventID * event_ID()
the unique identification of the event.
uint32_t runNumber() const
The current event's run number.
::StatusCode StatusCode
StatusCode definition for legacy code.
event_number_t eventIndex
EventInfo_v1 EventInfo
Definition of the latest event info version.
setTeId lumiBlock

◆ drainLocalScheduler()

StatusCode MPIHiveEventLoopMgr::drainLocalScheduler ( )
protected

Drain the local scheduler of any (at least one) completed events.

Wait for completions using Hive's shared lifecycle.

The result hook below supplies MPI's logging and failure policy; Hive owns incidents and cleanup.

Definition at line 380 of file MPIHiveEventLoopMgr.cxx.

380 {
382 ? StatusCode::FAILURE : StatusCode::SUCCESS;
383}
int drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.

◆ drainScheduler()

int AthenaHiveEventLoopMgr::drainScheduler ( int & finishedEvents)
protectedinherited

Drain the scheduler from all actions that may be queued.

Definition at line 1245 of file AthenaHiveEventLoopMgr.cxx.

1245 {
1246
1247 StatusCode sc(StatusCode::SUCCESS);
1248
1249 // maybe we can do better
1250 std::vector<std::unique_ptr<EventContext>> finishedEvtContexts;
1251
1252 EventContext* finishedEvtContext(nullptr);
1253
1254 // Here we wait not to loose cpu resources
1255 ATH_MSG_DEBUG ( "drainScheduler: [{}] Waiting for a context", finishedEvts);
1256 sc = m_schedulerSvc->popFinishedEvent(finishedEvtContext);
1257
1258 // We got past it: cache the pointer
1259 if (sc.isSuccess()){
1260 // EventContext not working with std::format
1261 ATH_MSG_DEBUG ( "drainScheduler: scheduler not empty: Context "
1262 << finishedEvtContext );
1263 finishedEvtContexts.emplace_back(finishedEvtContext);
1264 } else{
1265 // no more events left in scheduler to be drained
1266 ATH_MSG_DEBUG ( "drainScheduler: scheduler empty" );
1267 return 0;
1268 }
1269
1270 // Let's see if we can pop other event contexts
1271 while (m_schedulerSvc->tryPopFinishedEvent(finishedEvtContext).isSuccess()){
1272 finishedEvtContexts.emplace_back(finishedEvtContext);
1273 }
1274
1275 // Now we flush them
1276 bool fail(false);
1277 for (auto& thisFinishedEvtContext : finishedEvtContexts){
1278 if (!thisFinishedEvtContext) {
1279 ATH_MSG_FATAL ( "Detected nullptr ctxt while clearing WB!");
1280 fail = true;
1281 continue;
1282 }
1283
1284 if (finishEvent(*thisFinishedEvtContext).isFailure()) {
1285 fail = true;
1286 } else {
1287 ++finishedEvts;
1288 }
1289
1290 }
1291
1292 return ( fail ? -1 : 1 );
1293
1294}
StatusCode finishEvent(const EventContext &ctx)
Finish one scheduler-returned event on the driving thread.
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
fail(message)

◆ eventFinished()

StatusCode MPIHiveEventLoopMgr::eventFinished ( const EventContext & ctx)
overrideprotectedvirtual

Record completion and apply MPI's tolerated-failure thresholds.

Reimplemented from AthenaHiveEventLoopMgr.

Definition at line 385 of file MPIHiveEventLoopMgr.cxx.

385 {
386 const auto status = m_aess->eventStatus(ctx);
387 m_clusterSvc->log_completeEvent(ctx.evt(), ctx.eventID().run_number(),
388 ctx.eventID().event_number(), status);
389
390 if (status == EventStatus::Success) {
392 return StatusCode::SUCCESS;
393 }
394
395 ATH_MSG_ERROR("Failed event detected on " << ctx
396 << " w/ fail mode: " << status);
399 // Preserve the MPI policy: tolerate isolated failures, stop after three
400 // consecutive failures or ten in total. Even at the threshold, finishEvent()
401 // still balances EndProcessing and releases this completed event's slot.
402 if (m_contiguousFailedEvts >= 3 || m_totalFailedEvts >= 10) {
403 return StatusCode::FAILURE;
404 }
405 return StatusCode::SUCCESS;
406}
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.
ServiceHandle< IMPIClusterSvc > m_clusterSvc
Reference to the MPIClusterSvc.
status
Definition merge.py:16

◆ executeAlgorithms()

StatusCode AthenaHiveEventLoopMgr::executeAlgorithms ( )
protectedvirtualinherited

Run the algorithms for the current event.

Definition at line 479 of file AthenaHiveEventLoopMgr.cxx.

479 {
480
481 return StatusCode::SUCCESS;
482}

◆ executeEvent()

StatusCode AthenaHiveEventLoopMgr::executeEvent ( EventContext && ctx)
overridevirtualinherited

implementation of IEventProcessor::executeEvent(void* par)

Fire begin-Run incident if new run:

Definition at line 488 of file AthenaHiveEventLoopMgr.cxx.

489{
490
491 // An incident may schedule a stop, in which case is better to exit before the actual execution.
492 if ( m_scheduledStop ) {
493 ATH_MSG_ALWAYS ( "A stopRun was requested by an incidentListener. "
494 "Do not process this event." );
495 m_terminateLoop = true;
496 return (StatusCode::SUCCESS);
497 }
498
499 m_aess->reset( ctx );
500
501 // Make sure context with slot is set before calling es->next().
502 Gaudi::Hive::setCurrentContext ( ctx );
503
504 int declEvtRootSc = declareEventRootAddress( ctx );
505 if (declEvtRootSc == 0 ) { // We ran out of events!
506 m_terminateLoop = true; // we have finished!
507 return StatusCode::SUCCESS;
508 } else if ( declEvtRootSc == -1) {
509 // No std::format for EventContext
510 ATH_MSG_ERROR ( "declareEventRootAddress for context " << ctx << " failed" );
511 return StatusCode::FAILURE;
512 }
513
514 EventID::event_number_t evtNumber = ctx.eventID().event_number();
515 unsigned int conditionsRun = ctx.eventID().run_number();
516 if (!m_evtIdModSvc.isSet()) {
517 const AthenaAttributeList* attr = nullptr;
518 if (m_eventStore->contains<AthenaAttributeList> ("Input") &&
519 m_eventStore->retrieve(attr, "Input").isSuccess()) {
520 if (attr->exists ("ConditionsRun")) {
521 conditionsRun = (*attr)["ConditionsRun"].data<unsigned int>();
522 }
523 }
524 }
526 Gaudi::Hive::setCurrentContext ( ctx );
527
528 // Record EventContext in current whiteboard
529 if (m_eventStore->record(std::make_unique<EventContext> (ctx),
530 "EventContext").isFailure())
531 {
532 ATH_MSG_ERROR ( "Error recording event context object" );
533 return (StatusCode::FAILURE);
534 }
535
537 if (m_firstRun || (m_currentRun != ctx.eventID().run_number()) ) {
538 // Fire EndRun incident unless this is the first run
539 if (!m_firstRun) {
540 // FIXME!!!
541 m_incidentSvc->fireIncident(Incident(name(), IncidentType::EndRun));
542 }
543 m_firstRun=false;
544 m_currentRun = ctx.eventID().run_number();
545
546 ATH_MSG_INFO ( " ===>>> start of run {} <<<===", m_currentRun);
547
548 // FIXME!!! Fire BeginRun "Incident"
549 m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginRun,ctx));
550
551 }
552
553 bool toolsPassed=true;
554 // CGL: FIXME
555 // bool eventFailed = false;
556
557 // Call any attached tools to reject events early
558 unsigned int toolCtr=0;
559 if(m_useTools) {
560 tool_store::iterator theTool = m_tools.begin();
561 tool_store::iterator lastTool = m_tools.end();
562 while(toolsPassed && theTool!=lastTool )
563 {
564 toolsPassed = (*theTool)->passEvent(ctx.eventID());
565 m_toolInvoke[toolCtr]++;
566 {toolsPassed ? m_toolAccept[toolCtr]++ : m_toolReject[toolCtr]++;}
567 ++toolCtr;
568 ++theTool;
569 }
570 }
571
573 0 == (m_nev % m_eventPrintoutInterval.value()));
574 if (m_doEvtHeartbeat) {
575 if(!m_useTools) {
576 ATH_MSG_INFO ( " ===>>> start processing event #{}, run #{} on slot {}, {} events processed so far <<<===",
577 evtNumber, m_currentRun, ctx.slot(), m_proc);
578 }
579 else {
580 ATH_MSG_INFO ( " ===>>> start processing event #{}, run #{} on slot {}, {} events read and {} events processed so far <<<===",
581 evtNumber, m_currentRun, ctx.slot(), m_nev, m_proc);
582 }
583 }
584
585 if(toolsPassed) {
586
587 if (submitEvent(ctx).isFailure()) {
588 m_whiteboard->clearStore(ctx.slot()).ignore();
589 clearWBSlot(ctx.slot()).ignore();
590 Gaudi::Hive::setCurrentContext(EventContext());
591 return StatusCode::FAILURE;
592 }
593
594 } else {
595 ++m_nev;
596 ++m_nevt;
597 }
598
599 // invalidate thread local context once outside of event execute loop
600 Gaudi::Hive::setCurrentContext( EventContext() );
601
602 return StatusCode::SUCCESS;
603
604}
#define ATH_MSG_ALWAYS(x,...)
number_type m_currentRun
current run number
tool_stats m_toolAccept
tool returns StatusCode::SUCCESS counter
tool_stats m_toolInvoke
tool called counter
IIncidentSvc_t m_incidentSvc
Reference to the incident service.
StatusCode submitEvent(EventContext &ctx)
Submit a recorded context; the scheduler receives its own copy.
int declareEventRootAddress(EventContext &)
Declare the root address of the event.
bool m_scheduledStop
Scheduled stop of event processing.
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
tool_store m_tools
internal tool store
tool_stats m_toolReject
tool returns StatusCode::FAILURE counter
IEvtIdModifierSvc_t m_evtIdModSvc
void setConditionsRun(EventIDBase::number_type conditionsRun)
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.

◆ executeRun()

StatusCode AthenaHiveEventLoopMgr::executeRun ( int maxevt)
overridevirtualinherited

implementation of IEventProcessor::executeRun(int maxevt)

Definition at line 609 of file AthenaHiveEventLoopMgr.cxx.

610{
611
613 bool eventfailed = false;
614
615 // Call now the nextEvent(...)
616 sc = nextEvent(maxevt);
617 if (!sc.isSuccess())
618 eventfailed = true;
619
620 if (eventfailed)
621 return StatusCode::FAILURE;
622
623 m_incidentSvc->fireIncident(Incident(name(),"EndEvtLoop"));
624 return StatusCode::SUCCESS;
625}
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately

◆ finalize()

StatusCode MPIHiveEventLoopMgr::finalize ( )
overridevirtual

implementation of IAppMgrUI::finalize

Finalize Finalizes AthenaHiveEventLoopMgr.

Reimplemented from AthenaHiveEventLoopMgr.

Definition at line 37 of file MPIHiveEventLoopMgr.cxx.

37 {
39}
virtual StatusCode finalize() override
implementation of IAppMgrUI::finalize

◆ finishEvent()

StatusCode AthenaHiveEventLoopMgr::finishEvent ( const EventContext & ctx)
protectedinherited

Finish one scheduler-returned event on the driving thread.

Calls the result hook with its store selected, then releases the slot even if the hook reports failure. Does not wait for or delete the context.

Definition at line 1197 of file AthenaHiveEventLoopMgr.cxx.

1197 {
1198 StatusCode result = m_whiteboard->selectStore(ctx.slot());
1199 if (result.isSuccess()) {
1200 Gaudi::Hive::setCurrentContext(ctx);
1201 result = eventFinished(ctx);
1202 m_incidentSvc->fireIncident(
1203 Incident(name(), IncidentType::EndProcessing, ctx));
1204 } else {
1205 ATH_MSG_ERROR("Could not select completed slot {}", ctx.slot());
1206 }
1207
1208 // Result handling may fail; the event has nevertheless left the scheduler
1209 // and must relinquish its slot. Successful batch jobs already cleared at
1210 // EndAlgorithms, but a failed/stalled graph may never fire that incident.
1211 // Clear failed events here as well so drivers which tolerate failure can
1212 // reuse the slot without stale EventInfo or payload objects.
1214 m_aess->eventStatus(ctx) != EventStatus::Success) {
1215 result &= m_whiteboard->clearStore(ctx.slot());
1216 }
1217 result &= clearWBSlot(ctx.slot());
1218 if (result.isFailure()) {
1219 Gaudi::Hive::setCurrentContext(EventContext());
1220 return result;
1221 }
1222 writeHistograms().ignore();
1223 ++m_proc;
1224 if (m_doEvtHeartbeat) {
1225 const auto n_evt = ctx.eventID().event_number();
1226 const auto n_run = ctx.eventID().run_number();
1227 ATH_MSG_INFO(" ===>>> done processing event #{}, run #{} on slot {}, {} events processed so far <<<===",
1228 n_evt, n_run, ctx.slot(), m_proc);
1229 std::ofstream outfile("eventLoopHeartBeat.txt");
1230 if (!outfile) {
1231 ATH_MSG_ERROR("Unable to open eventLoopHeartBeat.txt");
1232 Gaudi::Hive::setCurrentContext(EventContext());
1233 return StatusCode::FAILURE;
1234 }
1235 std::println(outfile, " done processing event #{}, run #{} {} events read so far <<<===",
1236 n_evt, n_run, m_nev);
1237 }
1238 Gaudi::Hive::setCurrentContext(EventContext());
1239 return StatusCode::SUCCESS;
1240}
virtual StatusCode eventFinished(const EventContext &ctx)
Process an event's result and decide whether the driving loop may continue.
virtual bool clearStoreOnEndAlgorithms() const
Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished(...
virtual StatusCode writeHistograms(bool force=false)
Dump out histograms as needed.

◆ getEventRoot()

StatusCode AthenaHiveEventLoopMgr::getEventRoot ( IOpaqueAddress *& refpAddr)
inherited

Create event address using event selector.

Definition at line 902 of file AthenaHiveEventLoopMgr.cxx.

902 {
903 refpAddr = 0;
905 if ( !sc.isSuccess() ) {
906 return sc;
907 }
908 // Create root address and assign address to data service
909 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr);
910 if( !sc.isSuccess() ) {
911 sc = m_evtSelector->next(*m_evtContext);
912 if ( sc.isSuccess() ) {
913 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr);
914 if ( !sc.isSuccess() ) {
915 ATH_MSG_WARNING ( "Error creating IOpaqueAddress." );
916 }
917 }
918 }
919 return sc;
920}

◆ handle()

void AthenaHiveEventLoopMgr::handle ( const Incident & inc)
overridevirtualinherited

IIncidentListenet interfaces.

Definition at line 826 of file AthenaHiveEventLoopMgr.cxx.

827{
828
829 if(inc.type() == "EndAlgorithms") {
830 if (!clearStoreOnEndAlgorithms()) return;
831 // Clear the store at the end of the event.
832 // Do it here so that it executes in an algorithm context and thus
833 // multiple stores can be cleared at the same time.
834 StatusCode sc = m_whiteboard->clearStore(inc.context().slot());
835 if( !sc.isSuccess() ) {
836 ATH_MSG_WARNING ( "Clear of Event data store failed" );
837 }
838 return;
839 }
840
841 if(inc.type()!="BeforeFork")
842 return;
843
844 if(!m_evtContext || !m_firstRun) {
845 ATH_MSG_WARNING ( "Skipping BeforeFork handler. Either no event selector is provided or begin run has already passed" );
846 }
847
848 // Initialize Algorithms and Output Streams
850 if(sc.isFailure()) {
851 ATH_MSG_ERROR ( "Failed to initialize Algorithms" );
852 return;
853 }
854
855 // Construct EventInfo
856 sc = m_evtSelector->next(*m_evtContext);
857 if(!sc.isSuccess()) {
858 ATH_MSG_INFO ( "No more events in event selection " );
859 return;
860 }
861 IOpaqueAddress* addr{nullptr};
862 sc = m_evtSelector->createAddress(*m_evtContext, addr);
863 if (sc.isFailure()) {
864 ATH_MSG_ERROR ( "Could not create an IOpaqueAddress" );
865 return;
866 }
867 if (0 != addr) {
868 //create its proxy
869 sc = m_eventStore->recordAddress(addr);
870 if(!sc.isSuccess()) {
871 ATH_MSG_ERROR ( "Error declaring Event object" );
872 return;
873 }
874 }
875
876 if(m_eventStore->loadEventProxies().isFailure()) {
877 ATH_MSG_WARNING ( "Error loading Event proxies" );
878 return;
879 }
880
881 // Retrieve the legacy EventInfo object
882 const EventInfo* pEvent{nullptr};
883 sc = m_eventStore->retrieve(pEvent);
884 if(!sc.isSuccess()) {
885 ATH_MSG_ERROR ( "Unable to retrieve Event root object" );
886 return;
887 }
888
889 m_firstRun=false;
890 m_currentRun = pEvent->event_ID()->run_number();
891
892 // Clear Store
893 sc = m_eventStore->clearStore();
894 if(!sc.isSuccess()) {
895 ATH_MSG_ERROR ( "Clear of Event data store failed" );
896 }
897}
StatusCode initializeAlgorithms()
Initialize all algorithms and output streams.

◆ initialize()

StatusCode MPIHiveEventLoopMgr::initialize ( )
overridevirtual

implementation of IAppMgrUI::initalize

Initialize Initializes AthenaHiveEventLoop and MPIClusterSvc.

Reimplemented from AthenaHiveEventLoopMgr.

Definition at line 29 of file MPIHiveEventLoopMgr.cxx.

29 {
30 // Initialize cluster svc
31 ATH_CHECK(m_clusterSvc.retrieve());
33}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
implementation of IAppMgrUI::initalize

◆ initializeAlgorithms()

StatusCode AthenaHiveEventLoopMgr::initializeAlgorithms ( )
protectedinherited

Initialize all algorithms and output streams.

Definition at line 471 of file AthenaHiveEventLoopMgr.cxx.

471 {
472
473 return StatusCode::SUCCESS;
474}

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)
int outputLevel(const IMessageSvc *ims, const std::string &source)

◆ insertEvent()

StatusCode MPIHiveEventLoopMgr::insertEvent ( int eventIdx,
bool & endOfStream,
std::int64_t requestTime_ns )
protected

Insert an event into the local scheduler.

Insert event into local scheduler.

Definition at line 333 of file MPIHiveEventLoopMgr.cxx.

334 {
335 // fast-forward to event
336 // Create the event context now so next writes into the next slot when
337 // skipping, not the one that's being used
338 endOfStream = false;
339 auto ctx = createEventContext();
340 Gaudi::Hive::setCurrentContext(ctx);
341 ctx.setEvt(
342 eventIdx); // Make the event numbers in the log actually make sense
343 if (!ctx.valid()) {
344 endOfStream = true; // BUG: Doesn't actually mean end of stream. Remove
345 // after making sure!
346 return StatusCode::FAILURE;
347 }
348
349 const std::size_t slot = ctx.slot(); // Need this for later
350 // Codex (GPT 5.6-sol) identified use of seek should be reverted since that
351 // function isn't implemented properly
352 if (m_evtSelector != nullptr) {
353 const int nToJump = (eventIdx - 1) - m_evtSelectorCurrentPos;
354 if (nToJump < 0) {
355 ATH_MSG_ERROR("Cannot jump backwards by {} events", nToJump);
356 return StatusCode::FAILURE;
357 }
358 if (nToJump > 0) {
359 ATH_CHECK(m_evtSelector->next(*m_evtContext, nToJump));
360 }
361 m_evtSelectorCurrentPos = eventIdx;
362 }
363 // execute event
364 StatusCode sc = executeEvent(std::move(ctx));
365 const auto evtID =
366 m_lastEventContext.eventID(); // Set in AthenaHiveEventLoopMgr
367 m_clusterSvc->log_addEvent(eventIdx, evtID.run_number(), evtID.event_number(),
368 requestTime_ns, slot);
369
370 if (sc.isRecoverable()) {
372 } else if (sc.isSuccess()) {
374 }
375 return sc;
376}
virtual StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(void* par)
virtual EventContext createEventContext() override
Create event context.

◆ masterEventLoop()

StatusCode MPIHiveEventLoopMgr::masterEventLoop ( int maxEvt)
protected

Master event loop (runs on master, provides events over MPI).

Master event loop.

Definition at line 61 of file MPIHiveEventLoopMgr.cxx.

61 {
62 ATH_MSG_INFO("Running with " << m_clusterSvc->numRanks() << " ranks");
63 // Determine number of events to process
64 int skipEvts = int(m_firstEventIndex.value());
65 if (m_evtSelector != nullptr) {
66 int evt = size();
67 if (evt == -1) {
68 m_clusterSvc->abort();
69 return StatusCode::FAILURE;
70 }
71 if (maxEvt < 0 || (skipEvts + maxEvt) > evt) {
72 maxEvt = evt - skipEvts;
73 }
74 ATH_MSG_INFO("Will be processing " << maxEvt << " events");
75 }
76
77 // Setup worker status DB (Spare one at start)
78 std::vector<bool> workers_done(m_clusterSvc->numRanks(), false);
79 workers_done[0] =
80 true; // Set 0 to true because it doesn't correspond to a worker
81 int num_workers_done = 1; // Init to 1 so we can compare to numRanks
82 std::vector<ClusterMessage::WorkerStatus> statuses(m_clusterSvc->numRanks());
83
84 // Entering event loop
85 m_clusterSvc->barrier();
86 // Note: no ++evt. This is because this is really a message loop, and we don't
87 // want to increment evt if we haven't provided an event
88 auto start = Clock::now();
89 for (int evt = skipEvts; evt < skipEvts + maxEvt;) {
90 ClusterMessage msg = m_clusterSvc->waitReceiveMessage();
91 // Messages we can get are RequestEvent, FinalWorkerStatus, or WorkerError
92 if (msg.messageType == ClusterMessageType::RequestEvent) {
93 ATH_MSG_DEBUG("Starting event " << evt << " on " << msg.source);
94 m_clusterSvc->sendMessage(
95 msg.source, ClusterMessage(ClusterMessageType::ProvideEvent, evt));
96 ++evt;
97 continue;
98 }
99
100 if (msg.messageType == ClusterMessageType::WorkerError) {
101 ATH_MSG_ERROR("Received WorkerError message from " << msg.source);
103 workers_done.at(msg.source) =
104 true; // If a worker hits an error, it's done
105 ++num_workers_done;
106 for (int i = 1; i < m_clusterSvc->numRanks(); ++i) {
107 if (!workers_done.at(i)) {
108 // Tell workers that aren't done to emergency stop
109 m_clusterSvc->sendMessage(
110 i, ClusterMessage(ClusterMessageType::EmergencyStop));
111 workers_done[i] = true;
112 ++num_workers_done;
113 }
114 }
115 break;
116 }
117
118 if (msg.messageType == ClusterMessageType::FinalWorkerStatus) {
119 ATH_MSG_INFO("Received FinalWorkerStatus from " << msg.source);
121 workers_done.at(msg.source) = true; // Worker hit end of stream
122 ++num_workers_done;
123 continue;
124 }
125
126 // Other message types are an error
127 ATH_MSG_ERROR("Received unexpected message {} from {}",
128 msg.messageType, msg.source);
129 }
130 auto all_provided = Clock::now() - start;
131 ATH_MSG_INFO("Provided all events to workers, waiting for them to complete.");
132 // Event loop done, tell remaining workers
133 while (num_workers_done < m_clusterSvc->numRanks()) {
134 ClusterMessage msg = m_clusterSvc->waitReceiveMessage();
135 // Messages we can get are RequestEvent, FinalWorkerStatus, or WorkerError
136 if (msg.messageType == ClusterMessageType::RequestEvent) {
137 m_clusterSvc->sendMessage(msg.source,
138 ClusterMessage(ClusterMessageType::EventsDone));
139 continue;
140 }
141
142 if (msg.messageType == ClusterMessageType::WorkerError) {
143 ATH_MSG_ERROR("Received WorkerError message from {}", msg.source);
145 workers_done.at(msg.source) =
146 true; // If a worker hits an error, it's done
147 ++num_workers_done;
148 for (int i = 1; i < m_clusterSvc->numRanks(); ++i) {
149 if (!workers_done.at(i)) {
150 // Tell workers that aren't done to emergency stop
151 m_clusterSvc->sendMessage(
152 i, ClusterMessage(ClusterMessageType::EmergencyStop));
153 workers_done[i] = true;
154 ++num_workers_done;
155 }
156 }
157 break;
158 }
159
160 if (msg.messageType == ClusterMessageType::FinalWorkerStatus) {
161 ATH_MSG_INFO("Received FinalWorkerStatus from {}", msg.source);
163 workers_done.at(msg.source) = true; // Told worker we're done
164 ++num_workers_done;
165 continue;
166 }
167
168 // Other message types are an error
169 ATH_MSG_ERROR("Received unexpected message {} from {}",
170 msg.messageType, msg.source);
171 }
172 auto all_done = Clock::now() - start;
173 // Collate status
174 int n_created = 0;
175 int n_skipped = 0;
176 int n_finished = 0;
177
178 StatusCode sc = StatusCode::SUCCESS;
179 int worker_idx = 0;
180 for (const auto& worker_status : statuses) {
181 if (worker_status.status.isFailure() &&
182 worker_status.status != StatusCode(9999)) {
183 sc = worker_status.status;
184 }
185 n_created += worker_status.createdEvents;
186 n_skipped += worker_status.skippedEvents;
187 n_finished += worker_status.finishedEvents;
188
189 if ((worker_idx++) != 0) {
190 ATH_MSG_INFO("Worker " << worker_idx << ": SC " << worker_status.status
191 << ", created " << worker_status.createdEvents
192 << ", skipped " << worker_status.skippedEvents
193 << ", finished " << worker_status.finishedEvents);
194 }
195 }
196
197 ATH_MSG_INFO("Overall: SC " << sc << ", created " << n_created << ", skipped "
198 << n_skipped << ", finished " << n_finished);
199 ATH_MSG_INFO("MASTER: Took {} to provide all events.",
200 std::chrono::hh_mm_ss(all_provided));
201 ATH_MSG_INFO("MASTER: Took {} to complete all events.",
202 std::chrono::hh_mm_ss(all_done));
203 return sc;
204}
MsgStream & msg() const
The standard message stream.
virtual int size() override
Return the size of the collection.
UnsignedIntegerProperty m_firstEventIndex
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132
list statuses

◆ modifyEventContext()

void AthenaHiveEventLoopMgr::modifyEventContext ( EventContext & ctx,
const EventID & eID,
bool consume_modifier_stream )
virtualinherited

Definition at line 1115 of file AthenaHiveEventLoopMgr.cxx.

1115 {
1116
1117 if(m_evtIdModSvc.isSet()) {
1118 EventID new_eID(eID);
1119 // In Hive EventLoopMgr ctx.evt() gets set to m_nevt and *then* m_nevt is
1120 // incremented later so it's zero-indexed and we don't need to subtract one
1121 m_evtIdModSvc->modify_evtid(new_eID, ctx.evt(), consume_modifier_stream);
1122 if (msgLevel(MSG::DEBUG)) {
1123 unsigned int oldrunnr=eID.run_number();
1124 unsigned int oldLB=eID.lumi_block();
1125 unsigned int oldTS=eID.time_stamp();
1126 unsigned int oldTSno=eID.time_stamp_ns_offset();
1127 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc runnr={} -> {}",
1128 oldrunnr, new_eID.run_number());
1129 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc LB={} -> {}",
1130 oldLB, new_eID.lumi_block());
1131 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp={} -> {}",
1132 oldTS, new_eID.time_stamp());
1133 ATH_MSG_DEBUG ( "modifyEventContext: use evtIdModSvc TimeStamp ns Offset={} -> {}",
1134 oldTSno, new_eID.time_stamp_ns_offset());
1135 }
1136 ctx.setEventID( new_eID );
1137 Atlas::getExtendedEventContext(ctx).setConditionsRun( ctx.eventID().run_number() );
1138 return;
1139 }
1140
1141 ctx.setEventID( eID );
1142}

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 92 of file AthMessaging.h.

168{
169 MsgStream* ms = m_msg_tls.get();
170 if (!ms) {
171 if (!m_initialized.test_and_set()) initMessaging();
172 ms = new MsgStream(m_imsg,m_nm);
173 m_msg_tls.reset( ms );
174 }
175
176 ms->setLevel (m_lvl);
177 return *ms;
178}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels).
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 99 of file AthMessaging.h.

183{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 86 of file AthMessaging.h.

152{
153 // If user did not set explicit message level we have to initialize
154 // the messaging and retrieve the default via the MessageSvc.
155 if (m_lvl==MSG::NIL && !m_initialized.test_and_set()) initMessaging();
156
157 if (m_lvl <= lvl) {
158 msg() << lvl;
159 return true;
160 } else {
161 return false;
162 }
163}

◆ name()

virtual const std::string & AthenaHiveEventLoopMgr::name ( ) const
inlineoverridevirtualinherited

Definition at line 255 of file AthenaHiveEventLoopMgr.h.

255{ return Service::name(); } //FIXME

◆ nextEvent()

StatusCode MPIHiveEventLoopMgr::nextEvent ( int maxevt)
overridevirtual

implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately

nextEvent Dispatches to either masterEventLoop or workerEventLoop

Reimplemented from AthenaHiveEventLoopMgr.

Definition at line 43 of file MPIHiveEventLoopMgr.cxx.

43 {
44 // make nextEvent(0) a dummy call
45 if (0 == maxevt) {
46 return StatusCode::SUCCESS;
47 }
48
49 // Reset the application return code.
50 Gaudi::setAppReturnCode(m_appMgrProperty, Gaudi::ReturnCode::Success, true)
51 .ignore();
52 ATH_MSG_INFO("Starting loop on events");
53
54 if (m_clusterSvc->rank() == 0) {
55 return masterEventLoop(maxevt);
56 }
57 return workerEventLoop();
58}
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
StatusCode workerEventLoop()
Worker event loop (runs on worker, requests events over MPI).
StatusCode masterEventLoop(int maxEvt)
Master event loop (runs on master, provides events over MPI).

◆ resetTimeout()

void Athena::TimeoutMaster::resetTimeout ( Timeout & instance)
inlineprotectedinherited

Reset timeout.

Definition at line 83 of file Timeout.h.

83{ instance.reset(); }
std::map< std::string, double > instance

◆ seek()

StatusCode AthenaHiveEventLoopMgr::seek ( int evt)
overridevirtualinherited

Seek to a given event.

Definition at line 764 of file AthenaHiveEventLoopMgr.cxx.

765{
766 IEvtSelectorSeek* is = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
767 if (is == 0) {
768 ATH_MSG_ERROR ( "Seek failed; unsupported by event selector" );
769 return StatusCode::FAILURE;
770 }
771 //cppcheck-suppress nullPointerRedundantCheck
772 if (!m_evtContext) {
773 if (m_evtSelector->createContext(m_evtContext).isFailure()) {
774 ATH_MSG_FATAL ( "Can not create the event selector Context." );
775 return StatusCode::FAILURE;
776 }
777 }
778 //m_evtContext cannot be null if createContext succeeded
779 //cppcheck-suppress nullPointerRedundantCheck
780 StatusCode sc = is->seek (*m_evtContext, evt);
781 if (sc.isSuccess()) {
782 m_incidentSvc->fireIncident(ContextIncident<std::tuple<int, int>>(
783 name(), "SkipEvents", std::tuple<int, int>(m_nevt, evt)));
784 m_nevt = evt;
785 }
786 else {
787 ATH_MSG_ERROR ( "Seek failed." );
788 }
789 return sc;
790}
virtual StatusCode seek(IEvtSelector::Context &c, int evtnum) const =0
Seek to a given event number.

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setTimeout()

void Athena::TimeoutMaster::setTimeout ( Timeout & instance)
inlineprotectedinherited

Set timeout.

Definition at line 80 of file Timeout.h.

80{ instance.set(); }

◆ setupPreSelectTools()

void AthenaHiveEventLoopMgr::setupPreSelectTools ( Gaudi::Details::PropertyBase & )
protectedinherited

property update handler:sets up the Pre-selection tools

Definition at line 323 of file AthenaHiveEventLoopMgr.cxx.

323 {
324
325 m_toolInvoke.clear();
326 m_toolReject.clear();
327 m_toolAccept.clear();
328
329 m_tools.retrieve().ignore();
330 if(m_tools.size() > 0) {
331 m_useTools=true;
332 m_toolInvoke.resize(m_tools.size());
333 m_toolReject.resize(m_tools.size());
334 m_toolAccept.resize(m_tools.size());
335
336 tool_iterator firstTool = m_tools.begin();
337 tool_iterator lastTool = m_tools.end();
338 unsigned int toolCtr = 0;
339 for ( ; firstTool != lastTool; ++firstTool )
340 {
341 // reset statistics
342 m_toolInvoke[toolCtr] = 0;
343 m_toolReject[toolCtr] = 0;
344 m_toolAccept[toolCtr] = 0;
345 toolCtr++;
346 }
347 }
348
349 return;
350
351}
tool_store::const_iterator tool_iterator

◆ size()

int AthenaHiveEventLoopMgr::size ( )
overridevirtualinherited

Return the size of the collection.

Definition at line 804 of file AthenaHiveEventLoopMgr.cxx.

805{
806 IEvtSelectorSeek* cs = dynamic_cast<IEvtSelectorSeek*> (m_evtSelector);
807 if (cs == 0) {
808 ATH_MSG_ERROR ( "Collection size unsupported by event selector" );
809 return -1;
810 }
811 //cppcheck-suppress nullPointerRedundantCheck
812 if (!m_evtContext) {
813 if (m_evtSelector->createContext(m_evtContext).isFailure()) {
814 ATH_MSG_FATAL ( "Can not create the event selector Context." );
815 return -1;
816 }
817 }
818 //m_evtContext cannot be null if createContext succeeded
819 //cppcheck-suppress nullPointerRedundantCheck
820 return cs->size (*m_evtContext);
821}
virtual int size(IEvtSelector::Context &c) const =0
Return the size of the collection, or -1 if we can't get the size.

◆ stop()

StatusCode AthenaHiveEventLoopMgr::stop ( )
overridevirtualinherited

implementation of IService::stop

Definition at line 644 of file AthenaHiveEventLoopMgr.cxx.

645{
646 // To enable conditions access during stop we set an invalid EventContext
647 // (no event/slot number) but with valid EventID (and extended EventContext).
648 m_lastEventContext.setValid(false);
649 Gaudi::Hive::setCurrentContext( m_lastEventContext );
650
651 StatusCode sc = MinimalEventLoopMgr::stop();
652
653 // If we exit the event loop early due to an error, some event stores
654 // may not have been cleared. This can lead to segfaults later,
655 // as DetectorStore will usually get finalized before HiveSvcMgr.
656 // So make sure that all stores have been cleared at this point.
657 size_t nslot = m_whiteboard ? m_whiteboard->getNumberOfStores() : 0;
658 for (size_t islot = 0; islot < nslot; islot++) {
659 sc &= clearWBSlot (islot);
660 }
661
662 Gaudi::Hive::setCurrentContext( EventContext() );
663 return sc;
664}

◆ stopRun()

StatusCode AthenaHiveEventLoopMgr::stopRun ( )
overridevirtualinherited

implementation of IEventProcessor::stopRun()

Definition at line 629 of file AthenaHiveEventLoopMgr.cxx.

629 {
630 // Set the application return code
631 SmartIF<IProperty> appmgr(serviceLocator());
632 if(Gaudi::setAppReturnCode(appmgr, Gaudi::ReturnCode::ScheduledStop, true).isFailure()) {
633 ATH_MSG_ERROR ( "Could not set return code of the application ({})",
634 Gaudi::ReturnCode::ScheduledStop);
635 }
636 m_scheduledStop = true;
637 return StatusCode::SUCCESS;
638}

◆ submitEvent()

StatusCode AthenaHiveEventLoopMgr::submitEvent ( EventContext & ctx)
protectedinherited

Submit a recorded context; the scheduler receives its own copy.

On success ctx is invalidated, as the scheduler now owns the slot. On failure ctx stays valid and the caller still owns the slot; no scheduler context is leaked and BeginProcessing is balanced.

Definition at line 1166 of file AthenaHiveEventLoopMgr.cxx.

1166 {
1167 CHECK(m_conditionsCleaner->event(ctx, true));
1169 m_lastEventContext = ctx;
1170
1171 auto submitted = std::make_unique<EventContext>(ctx);
1172 m_incidentSvc->fireIncident(
1173 Incident(name(), IncidentType::BeginProcessing, ctx));
1174 if (m_schedulerSvc->pushNewEvent(submitted.get()).isFailure()) {
1175 m_incidentSvc->fireIncident(
1176 Incident(name(), IncidentType::EndProcessing, ctx));
1177 ATH_MSG_ERROR("Scheduler refused event {}", ctx.evt());
1178 return StatusCode::FAILURE;
1179 }
1180 submitted.release(); // Ownership transferred to the scheduler.
1181 ++m_nev;
1182 ++m_nevt;
1183 ctx = EventContext();
1184 return StatusCode::SUCCESS;
1185}
#define CHECK(...)
Evaluate an expression and check for errors.
ServiceHandle< Athena::IConditionsCleanerSvc > m_conditionsCleaner
void resetTimeout(Timeout &instance)
Reset timeout.
Definition Timeout.h:83
static Timeout & instance()
Get reference to Timeout singleton.
Definition Timeout.h:64

◆ workerEventLoop()

StatusCode MPIHiveEventLoopMgr::workerEventLoop ( )
protected

Worker event loop (runs on worker, requests events over MPI).

Worker event loop.

Definition at line 207 of file MPIHiveEventLoopMgr.cxx.

207 {
208 bool end_of_stream = false;
209 // barrier so all ranks enter message loop together
210 m_clusterSvc->barrier();
211 auto start = Clock::now();
213 while (true) {
214 // Drain the scheduler (wait for at least one event to complete, then free
215 // up completed slots) in two circumstances
216 // 1. Have created exactly one event, so the first event runs to completion
217 // before any more are scheduled
218 // 2. There are no free slots left
219 bool haveFreeSlots =
220 m_schedulerSvc->freeSlots() > 0 && m_whiteboard->freeSlots() > 0;
221 if (!haveFreeSlots || m_nLocalCreatedEvts == 1) {
223 if (sc.isFailure()) {
224 ClusterMessage::WorkerStatus status{};
225 status.status = sc;
226 status.createdEvents = m_nLocalCreatedEvts;
227 status.skippedEvents = m_nLocalSkippedEvts;
228 status.finishedEvents = m_nLocalFinishedEvts;
229 m_clusterSvc->sendMessage(
230 0, ClusterMessage(ClusterMessageType::WorkerError, status));
231 return sc;
232 }
233 }
234
235 auto start_time = Clock::now();
236 m_clusterSvc->sendMessage(0,
237 ClusterMessage(ClusterMessageType::RequestEvent));
238 ClusterMessage msg = m_clusterSvc->waitReceiveMessage();
239 auto request_time = Clock::now() - start_time;
240 if (msg.messageType == ClusterMessageType::EmergencyStop) {
241 // Emergency stop, return FAILURE after fully draining the scheduler to
242 // prevent segfault
243 std::size_t numSlots = m_whiteboard->getNumberOfStores();
244 while (m_schedulerSvc->freeSlots() < numSlots) {
245 // Ignore StatusCode, going to return FAILURE anyway
246 (void)(drainLocalScheduler());
247 }
248 ATH_MSG_ERROR("Received EmergencyStop message!");
249 return StatusCode::FAILURE;
250 }
251
252 if (msg.messageType == ClusterMessageType::EventsDone) {
253 auto loop_time = Clock::now() - start;
254 ATH_MSG_INFO("Worker {} DONE. Loop took {} to process {} events.",
255 m_clusterSvc->rank(),
256 std::chrono::hh_mm_ss(loop_time),
258 // Been told we've reached end
259 // Provide status to master
260 ClusterMessage::WorkerStatus status{};
261 // At end of stream, we need to *fully* drain the scheduler
262 StatusCode sc = StatusCode::SUCCESS;
263 std::size_t numSlots = m_whiteboard->getNumberOfStores();
264 while (sc.isSuccess() && m_schedulerSvc->freeSlots() < numSlots) {
266 }
267 status.status = sc;
268 status.createdEvents = m_nLocalCreatedEvts;
269 status.skippedEvents = m_nLocalSkippedEvts;
270 status.finishedEvents = m_nLocalFinishedEvts;
271 m_clusterSvc->sendMessage(
272 0, ClusterMessage(ClusterMessageType::FinalWorkerStatus, status));
273 return sc;
274 }
275
276 // Any other message other than ProvideEvent would now be an error
277 if (msg.messageType != ClusterMessageType::ProvideEvent ||
278 msg.source != 0) {
279 ATH_MSG_ERROR("Received unexpected message {} from {}",
280 msg.messageType, msg.source);
281 ClusterMessage::WorkerStatus status{};
282 status.status = StatusCode::FAILURE;
283 status.createdEvents = m_nLocalCreatedEvts;
284 status.skippedEvents = m_nLocalSkippedEvts;
285 status.finishedEvents = m_nLocalFinishedEvts;
286 m_clusterSvc->sendMessage(
287 0, ClusterMessage(ClusterMessageType::WorkerError, status));
288 return StatusCode::FAILURE;
289 }
290
291 int evt = get<int>(msg.payload);
292 ATH_MSG_INFO("Starting event {}", evt);
294 evt, end_of_stream,
295 std::chrono::duration_cast<std::chrono::nanoseconds>(request_time)
296 .count());
297 if (sc.isFailure() && !sc.isRecoverable()) {
298 ClusterMessage::WorkerStatus status{};
299 status.status = sc;
300 status.createdEvents = m_nLocalCreatedEvts;
301 status.skippedEvents = m_nLocalSkippedEvts;
302 status.finishedEvents = m_nLocalFinishedEvts;
303 m_clusterSvc->sendMessage(
304 0, ClusterMessage(ClusterMessageType::WorkerError, status));
305 return sc;
306 }
307 if (end_of_stream || m_terminateLoop) {
308 auto loop_time = Clock::now() - start;
309 ATH_MSG_INFO("Worker {} DONE. Loop took to process events.",
310 m_clusterSvc->rank(),
311 std::chrono::hh_mm_ss(loop_time),
313 // reached end of stream, drain scheduler
314 ClusterMessage::WorkerStatus status{};
315 // At end of stream, we need to *fully* drain the scheduler
316 StatusCode sc = StatusCode::SUCCESS;
317 std::size_t numSlots = m_whiteboard->getNumberOfStores();
318 while (sc.isSuccess() && m_schedulerSvc->freeSlots() < numSlots) {
320 }
321 status.status = sc;
322 status.createdEvents = m_nLocalCreatedEvts;
323 status.skippedEvents = m_nLocalSkippedEvts;
324 status.finishedEvents = m_nLocalFinishedEvts;
325 m_clusterSvc->sendMessage(
326 0, ClusterMessage(ClusterMessageType::FinalWorkerStatus, status));
327 return sc;
328 }
329 }
330}
StatusCode drainLocalScheduler()
Drain the local scheduler of any (at least one) completed events.
StatusCode insertEvent(int eventIdx, bool &endOfStream, std::int64_t requestTime_ns)
Insert an event into the local scheduler.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148

◆ writeHistograms()

StatusCode AthenaHiveEventLoopMgr::writeHistograms ( bool force = false)
protectedvirtualinherited

Dump out histograms as needed.

Definition at line 415 of file AthenaHiveEventLoopMgr.cxx.

415 {
416
417 StatusCode sc (StatusCode::SUCCESS);
418
419 if ( 0 != m_histoPersSvc && m_writeHists ) {
420 std::vector<DataObject*> objects;
421 sc = m_histoDataMgrSvc->traverseTree( [&objects]( IRegistry* reg, int ) {
422 DataObject* obj = reg->object();
423 if ( !obj || obj->clID() == CLID_StatisticsFile ) return false;
424 objects.push_back( obj );
425 return true;
426 } );
427
428 if ( !sc.isSuccess() ) {
429 ATH_MSG_ERROR ( "Error while traversing Histogram data store" );
430 return sc;
431 }
432
433 if ( objects.size() > 0) {
434 int writeInterval(m_writeInterval.value());
435
436 if ( m_nevt == 1 || force ||
437 (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
438
439 // skip /stat entry!
440 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
441 IOpaqueAddress* pAddr = nullptr;
442 StatusCode iret = m_histoPersSvc->createRep( i, pAddr );
443 if ( iret.isFailure() ) return iret;
444 i->registry()->setAddress( pAddr );
445 return isc;
446 } );
447 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode isc, auto& i ) {
448 IRegistry* reg = i->registry();
449 StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
450 return iret.isFailure() ? iret : isc;
451 } );
452 if ( ! sc.isSuccess() ) {
453 ATH_MSG_ERROR ( "Error while saving Histograms." );
454 }
455 }
456
457 if (force || (writeInterval != 0 && m_nevt%writeInterval == 0) ) {
458 ATH_MSG_DEBUG ( "committing Histograms" );
459 m_histoPersSvc->conversionSvc()->commitOutput("",true).ignore();
460 }
461 }
462
463 }
464
465 return sc;
466}
UnsignedIntegerProperty m_writeInterval
IDataManagerSvc_t m_histoDataMgrSvc
Reference to the Histogram Data Service.

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging).

Definition at line 141 of file AthMessaging.h.

◆ m_abortEventListener

SmartIF< IIncidentListener > AthenaHiveEventLoopMgr::m_abortEventListener
protectedinherited

Instance of the incident listener waiting for AbortEvent.

Definition at line 203 of file AthenaHiveEventLoopMgr.h.

◆ m_aess

SmartIF<IAlgExecStateSvc> AthenaHiveEventLoopMgr::m_aess
protectedinherited

Reference to the Algorithm Execution State Svc.

Definition at line 160 of file AthenaHiveEventLoopMgr.h.

◆ m_algResourcePool

SmartIF<IAlgResourcePool> AthenaHiveEventLoopMgr::m_algResourcePool
protectedinherited

Reference to the Algorithm resource pool.

Definition at line 157 of file AthenaHiveEventLoopMgr.h.

◆ m_appMgrProperty

SmartIF<IProperty> AthenaHiveEventLoopMgr::m_appMgrProperty
protectedinherited

Property interface of ApplicationMgr.

Definition at line 163 of file AthenaHiveEventLoopMgr.h.

◆ m_clusterSvc

ServiceHandle<IMPIClusterSvc> MPIHiveEventLoopMgr::m_clusterSvc
protected
Initial value:
{this, "MPIClusterSvc", "",
"MPIClusterSvc"}

Reference to the MPIClusterSvc.

Definition at line 38 of file MPIHiveEventLoopMgr.h.

38 {this, "MPIClusterSvc", "",
39 "MPIClusterSvc"};

◆ m_conditionsCleaner

ServiceHandle<Athena::IConditionsCleanerSvc> AthenaHiveEventLoopMgr::m_conditionsCleaner
privateinherited

Definition at line 297 of file AthenaHiveEventLoopMgr.h.

◆ m_contiguousFailedEvts

int MPIHiveEventLoopMgr::m_contiguousFailedEvts {0}
protected

Definition at line 54 of file MPIHiveEventLoopMgr.h.

54{0};

◆ m_currentRun

number_type AthenaHiveEventLoopMgr::m_currentRun
protectedinherited

current run number

Definition at line 109 of file AthenaHiveEventLoopMgr.h.

◆ m_doEvtHeartbeat

bool AthenaHiveEventLoopMgr::m_doEvtHeartbeat
protectedinherited

Definition at line 278 of file AthenaHiveEventLoopMgr.h.

◆ m_eventPrintoutInterval

UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_eventPrintoutInterval
protectedinherited

Definition at line 116 of file AthenaHiveEventLoopMgr.h.

◆ m_eventStore

StoreGateSvc_t AthenaHiveEventLoopMgr::m_eventStore
protectedinherited

Reference to StoreGateSvc;.

Property

Definition at line 83 of file AthenaHiveEventLoopMgr.h.

◆ m_evtContext

EvtContext* AthenaHiveEventLoopMgr::m_evtContext
protectedinherited

Gaudi event selector Context (may be used as a cursor by the evt selector).

Definition at line 88 of file AthenaHiveEventLoopMgr.h.

◆ m_evtIdModSvc

IEvtIdModifierSvc_t AthenaHiveEventLoopMgr::m_evtIdModSvc
protectedinherited

Definition at line 102 of file AthenaHiveEventLoopMgr.h.

◆ m_evtsel

StringProperty AthenaHiveEventLoopMgr::m_evtsel
protectedinherited

Definition at line 90 of file AthenaHiveEventLoopMgr.h.

◆ m_evtSelector

IEvtSelector* AthenaHiveEventLoopMgr::m_evtSelector
protectedinherited

Reference to the Event Selector.

Definition at line 86 of file AthenaHiveEventLoopMgr.h.

◆ m_evtSelectorCurrentPos

int MPIHiveEventLoopMgr::m_evtSelectorCurrentPos = 0
private

Definition at line 77 of file MPIHiveEventLoopMgr.h.

◆ m_failureMode

IntegerProperty AthenaHiveEventLoopMgr::m_failureMode
protectedinherited

Definition at line 113 of file AthenaHiveEventLoopMgr.h.

◆ m_firstEventAlone

bool AthenaHiveEventLoopMgr::m_firstEventAlone
privateinherited

Definition at line 285 of file AthenaHiveEventLoopMgr.h.

◆ m_firstEventIndex

UnsignedIntegerProperty MPIHiveEventLoopMgr::m_firstEventIndex
private
Initial value:
{
this, "FirstEventIndex", 0, "First event index (Exec.SkipEvents)"}

Definition at line 75 of file MPIHiveEventLoopMgr.h.

75 {
76 this, "FirstEventIndex", 0, "First event index (Exec.SkipEvents)"};

◆ m_firstRun

bool AthenaHiveEventLoopMgr::m_firstRun
protectedinherited

Definition at line 110 of file AthenaHiveEventLoopMgr.h.

◆ m_flmbi

unsigned int AthenaHiveEventLoopMgr::m_flmbi
privateinherited

Definition at line 287 of file AthenaHiveEventLoopMgr.h.

◆ m_histoDataMgrSvc

IDataManagerSvc_t AthenaHiveEventLoopMgr::m_histoDataMgrSvc
protectedinherited

Reference to the Histogram Data Service.

Definition at line 94 of file AthenaHiveEventLoopMgr.h.

◆ m_histoPersSvc

IConversionSvc_t AthenaHiveEventLoopMgr::m_histoPersSvc
protectedinherited

Definition at line 98 of file AthenaHiveEventLoopMgr.h.

◆ m_histPersName

StringProperty AthenaHiveEventLoopMgr::m_histPersName
protectedinherited

Definition at line 105 of file AthenaHiveEventLoopMgr.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_incidentSvc

IIncidentSvc_t AthenaHiveEventLoopMgr::m_incidentSvc
protectedinherited

Reference to the incident service.

Definition at line 79 of file AthenaHiveEventLoopMgr.h.

◆ m_lastEventContext

EventContext AthenaHiveEventLoopMgr::m_lastEventContext
protectedinherited

Definition at line 282 of file AthenaHiveEventLoopMgr.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels).

Definition at line 132 of file AthMessaging.h.

◆ m_nev

unsigned int AthenaHiveEventLoopMgr::m_nev
protectedinherited

events processed

Definition at line 275 of file AthenaHiveEventLoopMgr.h.

◆ m_nevt

unsigned int AthenaHiveEventLoopMgr::m_nevt
privateinherited

Definition at line 264 of file AthenaHiveEventLoopMgr.h.

◆ m_nLocalCreatedEvts

int MPIHiveEventLoopMgr::m_nLocalCreatedEvts {0}
protected

Definition at line 57 of file MPIHiveEventLoopMgr.h.

57{0};

◆ m_nLocalFinishedEvts

int MPIHiveEventLoopMgr::m_nLocalFinishedEvts {0}
protected

Definition at line 59 of file MPIHiveEventLoopMgr.h.

59{0};

◆ m_nLocalSkippedEvts

int MPIHiveEventLoopMgr::m_nLocalSkippedEvts {0}
protected

Definition at line 58 of file MPIHiveEventLoopMgr.h.

58{0};

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_proc

unsigned int AthenaHiveEventLoopMgr::m_proc
protectedinherited

Definition at line 276 of file AthenaHiveEventLoopMgr.h.

◆ m_requireInputAttributeList

bool AthenaHiveEventLoopMgr::m_requireInputAttributeList {}
protectedinherited

require input attribute list

Definition at line 134 of file AthenaHiveEventLoopMgr.h.

134{};

◆ m_scheduledStop

bool AthenaHiveEventLoopMgr::m_scheduledStop
protectedinherited

Scheduled stop of event processing.

Definition at line 209 of file AthenaHiveEventLoopMgr.h.

◆ m_schedulerName

std::string AthenaHiveEventLoopMgr::m_schedulerName
protectedinherited

Name of the scheduler to be used.

Definition at line 205 of file AthenaHiveEventLoopMgr.h.

◆ m_schedulerSvc

SmartIF<IScheduler> AthenaHiveEventLoopMgr::m_schedulerSvc
protectedinherited

A shortcut for the scheduler.

Definition at line 166 of file AthenaHiveEventLoopMgr.h.

◆ m_terminateLoop

bool AthenaHiveEventLoopMgr::m_terminateLoop { false }
protectedinherited

Definition at line 273 of file AthenaHiveEventLoopMgr.h.

273{ false };

◆ m_timeStamp

unsigned int AthenaHiveEventLoopMgr::m_timeStamp { 0 }
privateinherited

Definition at line 265 of file AthenaHiveEventLoopMgr.h.

265{ 0 };

◆ m_timeStampInt

unsigned int AthenaHiveEventLoopMgr::m_timeStampInt
privateinherited

Definition at line 287 of file AthenaHiveEventLoopMgr.h.

◆ m_toolAccept

tool_stats AthenaHiveEventLoopMgr::m_toolAccept
protectedinherited

tool returns StatusCode::SUCCESS counter

Definition at line 127 of file AthenaHiveEventLoopMgr.h.

◆ m_toolInvoke

tool_stats AthenaHiveEventLoopMgr::m_toolInvoke
protectedinherited

tool called counter

Definition at line 125 of file AthenaHiveEventLoopMgr.h.

◆ m_toolReject

tool_stats AthenaHiveEventLoopMgr::m_toolReject
protectedinherited

tool returns StatusCode::FAILURE counter

Definition at line 126 of file AthenaHiveEventLoopMgr.h.

◆ m_tools

tool_store AthenaHiveEventLoopMgr::m_tools
protectedinherited

internal tool store

Definition at line 128 of file AthenaHiveEventLoopMgr.h.

◆ m_totalFailedEvts

int MPIHiveEventLoopMgr::m_totalFailedEvts {0}
protected

Definition at line 55 of file MPIHiveEventLoopMgr.h.

55{0};

◆ m_useSecondaryEventNumber

bool AthenaHiveEventLoopMgr::m_useSecondaryEventNumber {}
protectedinherited

read event number from secondary input

Definition at line 137 of file AthenaHiveEventLoopMgr.h.

137{};

◆ m_useTools

bool AthenaHiveEventLoopMgr::m_useTools
protectedinherited

Definition at line 277 of file AthenaHiveEventLoopMgr.h.

◆ m_whiteboard

SmartIF<IHiveWhiteBoard> AthenaHiveEventLoopMgr::m_whiteboard
protectedinherited

Reference to the Whiteboard interface.

Definition at line 154 of file AthenaHiveEventLoopMgr.h.

◆ m_whiteboardName

std::string AthenaHiveEventLoopMgr::m_whiteboardName
protectedinherited

Name of the Whiteboard to be used.

Definition at line 207 of file AthenaHiveEventLoopMgr.h.

◆ m_writeHists

bool AthenaHiveEventLoopMgr::m_writeHists
privateinherited

Definition at line 268 of file AthenaHiveEventLoopMgr.h.

◆ m_writeInterval

UnsignedIntegerProperty AthenaHiveEventLoopMgr::m_writeInterval
privateinherited

Definition at line 267 of file AthenaHiveEventLoopMgr.h.


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