52 int rankOffset = 0)
override;
58 int requesterCommunicatorSize)
override
71 int requesterCommunicatorSize)
override;
77 int requesterRank)
override
89 virtual void reduceSum(
int itemToSend,
int &itemsToReceive,
Rank primaryRank)
override;
91 virtual void reduceSum(
int itemToSend,
int &itemsToReceive)
override;
97 virtual void allreduceSum(
double itemToSend,
double &itemsToReceive,
Rank primaryRank)
override;
99 virtual void allreduceSum(
double itemToSend,
double &itemsToReceive)
override;
101 virtual void allreduceSum(
int itemToSend,
int &itemsToReceive,
Rank primaryRank)
override;
103 virtual void allreduceSum(
int itemToSend,
int &itemsToReceive)
override;
109 virtual void broadcast(
int itemToSend)
override;
111 virtual void broadcast(
int &itemToReceive,
Rank rankBroadcaster)
override;
117 virtual void broadcast(
double itemToSend)
override;
119 virtual void broadcast(
double &itemToReceive,
Rank rankBroadcaster)
override;
121 virtual void broadcast(
bool itemToSend)
override;
123 virtual void broadcast(
bool &itemToReceive,
Rank rankBroadcaster)
override;
#define PRECICE_ASSERT(...)
Provides implementation for basic MPI point-to-point communication.
Provides connection methods for processes located in one communicator.
virtual Rank rank(int rank) override
virtual void acceptConnection(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int acceptorRank, int rankOffset=0) override
virtual void requestConnection(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int requesterRank, int requesterCommunicatorSize) override
virtual void acceptConnectionAsServer(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int acceptorRank, int requesterCommunicatorSize) override
Accepts connection from another communicator, which has to call requestConnectionAsClient().
virtual size_t getRemoteCommunicatorSize() override
Returns the number of processes in the remote communicator.
virtual void requestConnectionAsClient(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, std::set< int > const &acceptorRanks, int requesterRank) override
Connects to another communicator, which has to call acceptConnectionAsServer().
virtual void broadcast(precice::span< const int > itemsToSend) override
virtual int adjustRank(Rank rank) const override
Turn the rank adjustment into a noop for direct communication.
utils::Parallel::CommStatePtr _commState
CommState to use.
virtual void closeConnection() override
See precice::com::Communication::closeConnection().
virtual ~MPIDirectCommunication()
virtual void allreduceSum(precice::span< double const > itemsToSend, precice::span< double > itemsToReceive, Rank primaryRank) override
virtual MPI_Comm & communicator(Rank rank=0) override
Returns the communicator.
virtual void reduceSum(precice::span< double const > itemsToSend, precice::span< double > itemsToReceive, Rank primaryRank) override
Performs a reduce summation on the rank given by primaryRank.
This class provides a lightweight logger.
A C++ 11 implementation of the non-owning C++20 std::span type.
Main namespace of the precice library.