NAME
MMPPIICCoommmmtteessttiinntteerr - Tests to see if a comm is an intercommunicator.
SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPICommtestinter(MPIComm comm, int *flag) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPICOMMTESTINTER(COMM, FLAG, IERROR)
INTEGER COMM, IERROR
LOGICAL FLAG CC++++ SSyynnttaaxx#include
bool Comm::Isinter() const IINNPPUUTT PPAARRAAMMEETTEERR comm Communicator (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS flag (Logical.)IERROR Fortran only: Error status (integer).
DESCRIPTION
This local routine allows the calling process to determine the type of a communicator. It returns true for an intercommunicator, false for an intracommunicator. The type of communicator also affects the value returned by three otherfunctions. When dealing with an intracommunicator (enables communica-
tion within a single group), the functions listed below return the expected values, group size, group, and rank. When dealing with aninter-communicator, however, they return the following values:
MPICommsize Returns the size of the local group. MPICommgroup Returns the local group. MPICommrank Returns the rank in the local group.To return the remote group and remote group size of an inter-communica-
tor, use the MPICommremotegroup and MPICommremotesize functions. The operation MPICommcompare is valid for intercommunicators. Bothcommunicators must be either intra- or intercommunicators, or else
MPIUNEQUAL results. Both corresponding local and remote groups must compare correctly to get the results MPICONGRUENT and MPISIMILAR. In particular, it is possible for MPISIMILAR to result because either the local or remote groups were similar but not identical. The following accessors provide consistent access to the remote group of an intercommunicator: MPICommremotesize, MPICommremotegroup. The intercommunicator accessors (MPICommtestinter, MPICommremotesize, MPICommremotegroup) are all local operations. 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
MPICommremotegroup MPICommremotesize MPIIntercommcreate MPIIntercommmerge Open MPI 1.2 September 2006 MPICommtestinter(3OpenMPI)