ATLAS Offline Software
Loading...
Searching...
No Matches
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
12struct ClusterMessage;
13
14namespace boost::mpi3 {
15class communicator;
16}
17
19
22class 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,
54 std::size_t slot) = 0;
55
57 virtual void log_completeEvent(std::int64_t run_number,
58 std::int64_t event_number,
59 std::int64_t status) = 0;
60};
61
62#endif // ATHENAKERNEL_IMPICLUSTERSVC_H
ClusterComm
Interface for the MPIClusterSvc, which manages internode communications in AthenaMPI.
virtual boost::mpi3::communicator & data_communicator()=0
Provide the MPI3 data communicator.
virtual void sendMessage(int destRank, ClusterMessage message, ClusterComm communicator=ClusterComm::Default)=0
Send a message.
virtual void abort()=0
MPI Abort – For use if there's an error during initialization.
virtual int numRanks() const =0
Number of ranks.
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.
virtual void barrier()=0
MPI Barrier.
virtual ClusterMessage waitReceiveMessage(ClusterComm communicator=ClusterComm::Default)=0
Wait to receive a message.
virtual void log_addEvent(int eventIdx, std::int64_t run_number, std::int64_t event_number, std::int64_t request_time_ns, std::size_t slot)=0
Run at start of event to add it to the log.
DeclareInterfaceID(IMPIClusterSvc, 1, 0)
InterfaceID.
virtual int rank() const =0
MPI rank.
A class describing a message sent between nodes in a cluster.