|
Because of reasons already stated (see Groups, Context and Communicators) there is no support for user-defined communicators. So this section is limited to functions which return the size of a specific communicator or the rank of the calling process.
Defines | |
| #define | MOC_COMM_NULL 0 |
| Specifies a null communicator. | |
| #define | MOC_COMM_WORLD 1 |
| Specifies a constant that contains all of the processes. | |
| #define | MOC_COMM_SELF 2 |
| Specifies a constant that contains only the calling process. | |
Typedefs | |
| typedef int | MOC_Comm |
| Communicator-Handle. | |
Functions | |
| int | MOC_Comm_rank (MOC_Comm comm, int *rank) |
| Determines the rank of the calling process in the communicator. | |
| int | MOC_Comm_size (MOC_Comm comm, int *size) |
| Determines the size of the group associated with a communictor. | |
| typedef int MOC_Comm |
Communicator-Handle.
Masks the actual type which is used to encode the communicator. Char is used and therefore the maximum number of possible communicators is limited to 256. But because there are three predefined communicators (MPI_COMM_NULL, MPI_COMM_WORLD and MPI_COMM_SELF) only 253 user-defined communicators are possible.
| int MOC_Comm_rank | ( | MOC_Comm | comm, | |
| int * | rank | |||
| ) |
Determines the rank of the calling process in the communicator.
| comm | in commicator-handle | |
| rank | out rank of the calling process in group of comm |
| MOC_SUCCESS | No error; MPI routine completed successfully. | |
| MOC_ERR_COMM | Invalid communicator. A common error is to use a null communicator in a call. |
| int MOC_Comm_size | ( | MOC_Comm | comm, | |
| int * | size | |||
| ) |
Determines the size of the group associated with a communictor.
| comm | in commicator-handle | |
| size | out number of processes in the group of comm |
| MOC_SUCCESS | No error; MPI routine completed successfully. | |
| MOC_ERR_COMM | Invalid communicator. A common error is to use a null communicator in a call. |
1.5.6