Sun MPI 4.0 Programming and Reference Guide

The bytes Argument

The meaning of the bytes argument varies slightly depending on the situation. Here is some general information for different types of sends and receives, followed by some examples of how the byte argument works with them.

sendbytes - Number of bytes to be sent from this process.

recvbytes - Total number of bytes to be received at any process from all processes.

bytes - Number of bytes on any process to be reduced.

sendbytes - Total number of bytes to be sent from this process to all processes.

recvbytes - Total number of bytes to be received at this process from all processes.

bytes - Number of bytes to be broadcast.

sendbytes - Root reports total number of bytes to be sent; other processes report 0.

recvbytes - Root reports total number of bytes to be received; other processes report 0.

bytes - Number of bytes contributed by any process.

sendbytes - Root reports total number of bytes to be sent; other processes report 0.

recvbytes - Number of bytes to be received at this process from the root.

Examples:

call MPI_Send(x,m,MPI_REAL8,...)

Probe mpi_send_start reports that 8*m bytes are to be sent.

call MPI_Recv(x,n,MPI_REAL8,...)

Probe mpi_recv_end reports the number of bytes that were actually received, which must be at most 8*n.

call MPI_Sendrecv(x,m,MPI_REAL8,...,y,n,MPI_REAL8,...)

Probe mpi_sendrecv_start reports that 8*m bytes are to be sent, and probe mpi_sendrecv_end reports the number of bytes that were actually received, which must be at most 8*n.

integer req
call MPI_Irecv(x,n,MPI_REAL8,...,req,...)
call MPI_Wait(req,...) 

Probe mpi_wait_end reports the number of bytes that were actually received, which must be at most 8*n.

integer reqs(2)
call MPI_Isend(x,m,MPI_REAL8,...,reqs(1),...)
call MPI_Irecv(Y,N,MPI_REAL8,...,reqs(2),...)
call MPI_Waitany(2,reqs,...)
call MPI_Waitany(2,reqs,...) 

Probe mpi_isend_start reports that 8*m bytes are to be sent. The MPI_Waitany call that completes the receive will show the number of bytes that were actually received, which must be at most 8*n, in its mpi_waitany_end probe. The other MPI_Waitany call, which completes the send, will report 0 bytes received.

integer reqs(8)
call MPI_Isend(x1,m,MPI_REAL8,...,reqs(1),...)
call MPI_Isend(x2,m,MPI_REAL8,...,reqs(2),...)
call MPI_Isend(x3,m,MPI_REAL8,...,reqs(3),...)
call MPI_Isend(x4,m,MPI_REAL8,...,reqs(4),...)
call MPI_Irecv(x5,n,MPI_REAL8,...,reqs(5),...)
call MPI_Irecv(x6,n,MPI_REAL8,...,reqs(6),...)
call MPI_Irecv(x7,n,MPI_REAL8,...,reqs(7),...)
call MPI_Irecv(x8,n,MPI_REAL8,...,reqs(8),...)
call MPI_Waitall(8,reqs,..) 

Probe mpi_isend_start reports that 8*m bytes are to be sent in each of the four MPI_Isend cases. Probe mpi_waitall_end reports the number of bytes that were actually received, which must be at most 4*8*n.