Message Passing<< Preliminaries | Table of Contents | Message Passing Non-blocking >>
int MPI_Bcast( void *buf, int count, MPI_Datatype datatype,
(:endfnct:) (:begfnct mpi_send:) int MPI_Send( void *buf, int count, MPI_Datatype datatype,
(:endfnct:) (:begfnct mpi_recv:) int MPI_Recv( void *buf, int count, MPI_Datatype datatype,
(:endfnct:) (:begfnct mpi_reduce:) int MPI_Reduce( void *sendbuf, void *recvbuf, int count, (:endfnct:) (:begfnct mpi_probe:) int MPI_Probe( int srcPid, int tag, MPI_Comm comm, MPI_Status *status ); Blocks and waits for a message with the given data
(:endfnct:) (:begfnct mpi_getcount:) int MPI_Get_count( MPI_Status *status, MPI_Datatype datatype, int *count ) Determines the number of data items contained in a message just received or the next message to be received. This function is used with either MPI_Recv() or MPI_Probe().
The following code segment illustrates the use of this function (:source lang=cpp:)MPI_Status msgStatus; int numItems; MPI_Probe( ROOT_PROC, DATA_TAG, MPI_COMM_WORLD, &msgStatus ); MPI_Get_count( &msgStatus, MPI_DOUBLE, &numItems );
|