ATLAS Offline Software
IMPIClusterSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef ATHENAKERNEL_IMPICLUSTERSVC_H
5 #define ATHENAKERNEL_IMPICLUSTERSVC_H
6 
7 #include <cstdint>
8 #include <string>
9 
10 #include "GaudiKernel/IInterface.h"
11 
12 struct ClusterMessage;
13 
14 namespace boost::mpi3 {
15 class communicator;
16 }
17 
18 enum class ClusterComm { Default, EventData };
19 
22 class IMPIClusterSvc : virtual public IInterface {
23  public:
26 
28  virtual int numRanks() const = 0;
29 
31  virtual int rank() const = 0;
32 
34  virtual void barrier() = 0;
35 
37  virtual void abort() = 0;
38 
40  virtual void sendMessage(int destRank, ClusterMessage message,
41  ClusterComm communicator = ClusterComm::Default) = 0;
42 
45  ClusterComm communicator = ClusterComm::Default) = 0;
46 
48  virtual boost::mpi3::communicator& data_communicator() = 0;
49 
51  virtual void log_addEvent(int eventIdx, std::int64_t run_number,
52  std::int64_t event_number,
53  std::int64_t request_time_ns) = 0;
55  virtual void log_completeEvent(std::int64_t run_number,
56  std::int64_t(event_number),
57  std::int64_t status) = 0;
58 };
59 
60 #endif // ATHENAKERNEL_IMPICLUSTERSVC_H
IMPIClusterSvc::data_communicator
virtual boost::mpi3::communicator & data_communicator()=0
Provide the MPI3 data communicator.
plotting.plot_kinematics.run_number
run_number
Definition: plot_kinematics.py:29
IMPIClusterSvc::rank
virtual int rank() const =0
MPI rank.
IMPIClusterSvc::waitReceiveMessage
virtual ClusterMessage waitReceiveMessage(ClusterComm communicator=ClusterComm::Default)=0
Wait to receive a message.
IMPIClusterSvc::log_addEvent
virtual void log_addEvent(int eventIdx, std::int64_t run_number, std::int64_t event_number, std::int64_t request_time_ns)=0
Run at start of event to add it to the log.
ReweightUtils.message
message
Definition: ReweightUtils.py:15
IMPIClusterSvc
Interface for the MPIClusterSvc, which manages internode communications in AthenaMPI.
Definition: IMPIClusterSvc.h:22
IMPIClusterSvc::abort
virtual void abort()=0
MPI Abort – For use if there's an error during initialization.
boost::mpi3
Definition: IMPIClusterSvc.h:14
EventData
Definition: Trigger/TrigAccel/TrigCudaFitter/src/EventData.h:11
IMPIClusterSvc::barrier
virtual void barrier()=0
MPI Barrier.
ClusterMessage
A class describing a message sent between nodes in a cluster.
Definition: ClusterMessage.h:30
ClusterComm::Default
@ Default
ClusterComm
ClusterComm
Definition: IMPIClusterSvc.h:18
IMPIClusterSvc::log_completeEvent
virtual void log_completeEvent(std::int64_t run_number, std::int64_t(event_number), std::int64_t status)=0
Run at end of event to complete it in the log.
IMPIClusterSvc::numRanks
virtual int numRanks() const =0
Number of ranks.
merge.status
status
Definition: merge.py:16
IMPIClusterSvc::DeclareInterfaceID
DeclareInterfaceID(IMPIClusterSvc, 1, 0)
InterfaceID.
IMPIClusterSvc::sendMessage
virtual void sendMessage(int destRank, ClusterMessage message, ClusterComm communicator=ClusterComm::Default)=0
Send a message.