[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
| 3 | .TH MPI_Comm_test_inter 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Comm_test_inter \fP \- Tests to see if a comm is an intercommunicator. |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .SH C Syntax |
---|
| 10 | .nf |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_Comm_test_inter(MPI_Comm \fIcomm\fP, int\fI *flag\fP) |
---|
| 13 | |
---|
| 14 | .SH Fortran Syntax |
---|
| 15 | .nf |
---|
| 16 | INCLUDE 'mpif.h' |
---|
| 17 | MPI_COMM_TEST_INTER(\fICOMM, FLAG, IERROR\fP) |
---|
| 18 | INTEGER \fICOMM, IERROR\fP |
---|
| 19 | LOGICAL \fIFLAG \fP |
---|
| 20 | |
---|
| 21 | .SH C++ Syntax |
---|
| 22 | .nf |
---|
| 23 | #include <mpi.h> |
---|
| 24 | bool Comm::Is_inter() const |
---|
| 25 | |
---|
| 26 | .SH INPUT PARAMETER |
---|
| 27 | .ft R |
---|
| 28 | .TP 1i |
---|
| 29 | comm |
---|
| 30 | Communicator (handle). |
---|
| 31 | |
---|
| 32 | .SH OUTPUT PARAMETERS |
---|
| 33 | .ft R |
---|
| 34 | .TP 1i |
---|
| 35 | flag (Logical.) |
---|
| 36 | .ft R |
---|
| 37 | .TP 1i |
---|
| 38 | IERROR |
---|
| 39 | Fortran only: Error status (integer). |
---|
| 40 | |
---|
| 41 | .SH DESCRIPTION |
---|
| 42 | .ft R |
---|
| 43 | This local routine allows the calling process to determine the type of a communicator. It returns true for an intercommunicator, false for an intracommunicator. |
---|
| 44 | .sp |
---|
| 45 | The type of communicator also affects the value returned by three other functions. When dealing with an intracommunicator (enables communication within a single group), the functions listed below return the expected values, group size, group, and rank. When dealing with an inter-communicator, however, they return the following values: |
---|
| 46 | .sp |
---|
| 47 | .nf |
---|
| 48 | MPI_Comm_size Returns the size of the local group. |
---|
| 49 | MPI_Comm_group Returns the local group. |
---|
| 50 | MPI_Comm_rank Returns the rank in the local group. |
---|
| 51 | .fi |
---|
| 52 | .sp |
---|
| 53 | To return the remote group and remote group size of an inter-communicator, use the MPI_Comm_remote_group and MPI_Comm_remote_size functions. |
---|
| 54 | .sp |
---|
| 55 | The operation MPI_Comm_compare is valid for intercommunicators. Both communicators must be either intra- or intercommunicators, or else MPI_UNEQUAL results. Both corresponding local and remote groups must compare correctly to get the results MPI_CONGRUENT and MPI_SIMILAR. In particular, it is possible for MPI_SIMILAR to result because either the local or remote groups were similar but not identical. |
---|
| 56 | .sp |
---|
| 57 | The following accessors provide consistent access to the remote group of an |
---|
| 58 | intercommunicator: MPI_Comm_remote_size, MPI_Comm_remote_group. |
---|
| 59 | .sp |
---|
| 60 | The intercommunicator accessors (MPI_Comm_test_inter, MPI_Comm_remote_size, MPI_Comm_remote_group) are all local operations. |
---|
| 61 | |
---|
| 62 | .SH ERRORS |
---|
| 63 | Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. |
---|
| 64 | .sp |
---|
| 65 | Before the error value is returned, the current MPI error handler is |
---|
| 66 | called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN 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. |
---|
| 67 | |
---|
| 68 | .SH SEE ALSO |
---|
| 69 | .ft R |
---|
| 70 | .sp |
---|
| 71 | .nf |
---|
| 72 | MPI_Comm_remote_group |
---|
| 73 | MPI_Comm_remote_size |
---|
| 74 | MPI_Intercomm_create |
---|
| 75 | MPI_Intercomm_merge |
---|
| 76 | |
---|