MPI_COMM_TEST_INTER is a local routine that allows the calling process
to determine if a communicator is an intercommunicator or an
intracommunicator. It returns
true if it is an intercommunicator, otherwise false.

When an intercommunicator is used as an input argument to the
communicator accessors described in
Section ,
the following table describes the behavior.

Furthermore, the operation MPI_COMM_COMPARE is valid
for intercommunicators. Both communicators must be either intra- or
intercommunicators, or else MPI_UNEQUAL results. Both corresponding
MPI_UNEQUAL
local and remote groups must compare correctly to get the results
MPI_CONGRUENT and MPI_SIMILAR. In particular, it is
MPI_CONGRUENT
MPI_SIMILAR
possible for MPI_SIMILAR 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; they are all local operations.

MPI_COMM_REMOTE_SIZE(comm, size)
IN comm intercommunicator
OUT size number of process in the remote
group of comm

MPI_Comm_remote_size(MPI_Comm comm, int *size)

MPI_COMM_REMOTE_SIZE(COMM, SIZE, IERROR)INTEGER
COMM, SIZE, IERROR

MPI_COMM_REMOTE_SIZE returns the size of the remote group in the
intercommunicator. Note that the size of the local group is given by
MPI_COMM_SIZE.

MPI_COMM_REMOTE_GROUP(comm, group)
IN comm intercommunicator
OUT group remote group corresponding
to comm

MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group)

MPI_COMM_REMOTE_GROUP(COMM, GROUP, IERROR)INTEGER
COMM, GROUP, IERROR

MPI_COMM_REMOTE_GROUP returns the remote group in the
intercommunicator. Note that the local group is give by
MPI_COMM_GROUP.