PPT Slide
MPI_Comm_rank returns the rank of a process in its second argument.
int MPI_Comm_rank(MPI_Comm comm, int *rank)
The first argument is a communicator.
MPI_Comm_size determines the number of processes executing the program. Its first argument is a communicator in its second argument.
int MPI_Comm_size(MPI_Comm comm, int *size)
MPI messages are one dimensional array of items and are the first argument of the send (MPI_Send) and receive (MPI_Recv) functions. In addition to passing an argument to indicate where the array starts, arguments that indicate
the number of elements in the array (count) and the type of each element (datatype) are also passed to the MPI functions. The tag and comm arguments are used to differentiate multiple messages originating from the same processor. The status argurment in the receive function stores information about the source, size, and tag of the message. This is useful in cases where the receive is allowed to receive a set of possible sources.