8.6.1. Inter-Communicator Accessors
Up: Inter-Communication
Next: Inter-Communicator Operations
Previous: Inter-Communication
MPI_COMM_TEST_INTER(comm, flag) |
IN comm | communicator (handle) |
OUT flag | true if comm is an inter-communicator (logical) |
C binding
int MPI_Comm_test_inter(MPI_Comm comm, int *flag)
Fortran 2008 binding
MPI_Comm_test_inter(comm, flag, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
LOGICAL, INTENT(OUT) :: flag
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_COMM_TEST_INTER(COMM, FLAG, IERROR)
INTEGER COMM, IERROR
LOGICAL FLAG
This local routine allows the calling MPI process to determine if a
communicator is an inter-communicator or an intra-communicator. It returns
true if it is an inter-communicator, otherwise false.
Table 6: MPI_COMM_* function behavior (in inter-communication
mode)
MPI_COMM_SIZE | returns the size of the local group. |
MPI_COMM_GROUP | returns the local group. |
MPI_COMM_RANK | returns the rank in the local group |
|
Table 6 describes the behavior when an
inter-communicator is used as an input argument to the
communicator accessors described above under intra-communication.
Furthermore, the operation MPI_COMM_COMPARE is valid
for inter-communicators. Both communicators must be either intra- or
inter-communicators, or else MPI_UNEQUAL results. Both corresponding
local and remote groups must compare correctly to get the results
MPI_CONGRUENT or
MPI_SIMILAR. In particular, it is
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 inter-communicator.
The following are all local operations.
MPI_COMM_REMOTE_SIZE(comm, size) |
IN comm | inter-communicator (handle) |
OUT size | number of MPI processes in the remote group of comm (integer) |
C binding
int MPI_Comm_remote_size(MPI_Comm comm, int *size)
Fortran 2008 binding
MPI_Comm_remote_size(comm, size, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(OUT) :: size
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_COMM_REMOTE_SIZE(COMM, SIZE, IERROR)
INTEGER COMM, SIZE, IERROR
MPI_COMM_REMOTE_GROUP(comm, group) |
IN comm | inter-communicator (handle) |
OUT group | remote group corresponding to comm (handle) |
C binding
int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group)
Fortran 2008 binding
MPI_Comm_remote_group(comm, group, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Group), INTENT(OUT) :: group
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_COMM_REMOTE_GROUP(COMM, GROUP, IERROR)
INTEGER COMM, GROUP, IERROR
Rationale.
Symmetric access to both the local and remote groups of an inter-communicator
is important, so this function, as well as MPI_COMM_REMOTE_SIZE have
been provided.
( End of rationale.)
Up: Inter-Communication
Next: Inter-Communicator Operations
Previous: Inter-Communication
Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page
(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023