34 int rankOffset = 0)
override;
40 int requesterCommunicatorSize)
override;
46 int requesterCommunicatorSize)
override;
52 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 closeConnection() override
Disconnects from communication space, i.e. participant.
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 prepareEstablishment(std::string const &acceptorName, std::string const &requesterName) override
Prepare environment used to establish the communication.
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 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 cleanupEstablishment(std::string const &acceptorName, std::string const &requesterName) override
Clean-up environment used to establish the communication.
std::map< int, MPI_Comm > _communicators
Remote rank -> communicator map.
MPIPortsCommunication(std::string addressDirectory=".")
std::string _portName
Name of the port used for connection.
virtual MPI_Comm & communicator(Rank rank) override
Returns the communicator.
std::string _addressDirectory
virtual ~MPIPortsCommunication()
virtual Rank rank(int rank) override
virtual size_t getRemoteCommunicatorSize() override
Returns the number of processes in the remote communicator.
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().
This class provides a lightweight logger.
Main namespace of the precice library.