Communicator Management
[Groups, Context and Communicators]

Collaboration diagram for Communicator Management:

Detailed Description

Funktions for managing communicators.

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.


Define Documentation

#define MOC_COMM_NULL   0

Specifies a null communicator.

Definition at line 291 of file moc.h.

#define MOC_COMM_SELF   2

Specifies a constant that contains only the calling process.

Definition at line 301 of file moc.h.

Referenced by MOC_Barrier(), MOC_Bcast(), MOC_Comm_rank(), and MOC_Comm_size().

#define MOC_COMM_WORLD   1

Specifies a constant that contains all of the processes.

Definition at line 296 of file moc.h.

Referenced by MOC_Barrier(), MOC_Comm_rank(), and MOC_Comm_size().


Typedef Documentation

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.

Definition at line 286 of file moc.h.


Function Documentation

int MOC_Comm_rank ( MOC_Comm  comm,
int *  rank 
)

Determines the rank of the calling process in the communicator.

Parameters:
comm in commicator-handle
rank out rank of the calling process in group of comm
Return values:
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.

Definition at line 8 of file moc_comm_rank.c.

References MOC_COMM_SELF, MOC_COMM_WORLD, MOC_ERR_COMM, node_handle, and moc_node_handle_ppu_struct::rank.

int MOC_Comm_size ( MOC_Comm  comm,
int *  size 
)

Determines the size of the group associated with a communictor.

Parameters:
comm in commicator-handle
size out number of processes in the group of comm
Return values:
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.

Definition at line 8 of file moc_comm_size.c.

References moc_node_handle_ppu_struct::comm_size, MOC_COMM_SELF, MOC_COMM_WORLD, MOC_ERR_COMM, and node_handle.


Generated on Thu Feb 12 13:51:02 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6