48 int rankOffset = 0)
override;
54 int requesterCommunicatorSize)
override;
60 int requesterCommunicatorSize)
override;
66 int requesterRank)
override;
Provides implementation for basic MPI point-to-point communication.
Provides connection methods based on MPI ports (part of MPI 2.0).
virtual void prepareEstablishment(std::string const &acceptorName, std::string const &requesterName) override
Prepare environment used to establish the communication.
std::string _addressDirectory
virtual void requestConnection(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int requesterRank, int requesterCommunicatorSize) override
Connects to another communicator, which has to call acceptConnection().
MPI_Comm _global
The global inter-communicator that connects all ranks.
virtual Rank rank(int rank) override
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 MPI_Comm & communicator(Rank rank) override
Returns the communicator.
virtual ~MPISinglePortsCommunication()
std::string _portName
Name of the port used for connection.
virtual size_t getRemoteCommunicatorSize() override
Returns the number of processes in the remote communicator.
int _initialCommSize
The communicator size known from acceptConnection and requestConnection.
virtual void closeConnection() override
Disconnects from communication space, i.e. participant.
virtual void acceptConnectionAsServer(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int acceptorRank, int requesterCommunicatorSize) override
requesterCommunicatorSize is not used, since connection is always made on the entire communicator
std::map< int, MPI_Comm > _direct
A map of direct communication channels based on MPI_COMM_SELF on both sides.
virtual void acceptConnection(std::string const &acceptorName, std::string const &requesterName, std::string const &tag, int acceptorRank, int rankOffset=0) override
Accepts connection from another communicator, which has to call requestConnection().
virtual void cleanupEstablishment(std::string const &acceptorName, std::string const &requesterName) override
Clean-up environment used to establish the communication.
MPISinglePortsCommunication(std::string addressDirectory=".")
This class provides a lightweight logger.
Main namespace of the precice library.