NAME
MMPPIICCoommmmccoonnnneecctt - Establishes communication with a server.
SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPICommconnect(char *portname, MPIInfo info, int root, MPIComm comm, MPIComm *newcomm) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPICOMMCONNECT(PORTNAME, INFO, ROOT, COMM, NEWCOMM, IERROR)
CHARACTER*(*) PORTNAME
INTEGER INFO, ROOT, COMM, NEWCOMM, IERROR
CC++++ SSyynnttaaxx#include
MPI::Intercomm MPI::Intracomm::Connect(const char* portname, const MPI::Info& info, int root) const IINNPPUUTT PPAARRAAMMEETTEERRSS portname Port name (string, used only on root). info Options given by root for the connect (handle, used only on root). No options currently supported. root Rank in comm of root node (integer). comm Intracommunicator over which call is collective (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS newcomm Intercommunicator with client as remote group (handle)IERROR Fortran only: Error status (integer).
DESCRIPTION
MPICommconnect establishes communication with a server specified by portname. It is collective over the calling communicator and returns an intercommunicator in which the remote group participated in an MPICommaccept. The MPICommconnect call must only be called after the MPICommaccept call has been made by the MPI job acting as the server. If the named port does not exist (or has been closed), MPICommconnect raises an error of class MPIERRPORT. MPI provides no guarantee of fairness in servicing connection attempts. That is, connection attempts are not necessarily satisfied in the order in which they were initiated, and competition from other connectionattempts may prevent a particular connection attempt from being satis-
fied. The portname parameter is the address of the server. It must be the same as the name returned by MPIOpenport on the server. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. See the MPI man page for a full list of MPI error codes.SEE ALSO
MPICommaccept MPIOpenport Open MPI 1.2 March 2007 MPICommconnect(3OpenMPI)