NAME
MMPPIICCoommmmddiissccoonnnneecctt - Deallocates communicator object and sets handle
to MPICOMMNULL. SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPICommdisconnect(MPIComm *comm) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPICOMMDISCONNECT(COMM, IERROR)
INTEGER COMM, IERROR
CC++++ SSyynnttaaxx#include
void MPI::Comm::Disconnect() IINNPPUUTT//OOUUTTPPUUTT PPAARRAAMMEETTEERR comm Communicator (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRIERROR Fortran only: Error status (integer).
DESCRIPTION
MPICommdisconnect waits for all pending communication on comm to com-
plete internally, deallocates the communicator object, and sets the handle to MPICOMMNULL. It is a collective operation. It may not be called with the communicator MPICOMMWORLD or MPICOMMSELF. MPICommdisconnect may be called only if all communication is complete and matched, so that buffered data can be delivered to its destination. This requirement is the same as for MPIFinalize. MPICommdisconnect has the same action as MPICommfree, except that it waits for pending communication to finish internally and enables the guarantee about the behavior of disconnected processes. NNOOTTEESS To disconnect two processes you may need to call MPICommdisconnect, MPIWinfree, and MPIFileclose to remove all communication paths between the two processes. Note that it may be necessary to disconnect several communicators (or to free several windows or files) before two processes are completely independent. 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 ALSO
MPICommconnect MPICommaccept Open MPI 1.2 September 2006 MPICommdisconnect(3OpenMPI)