[Beowulf] MPI - time for packing, unpacking, creating a message...

tribur at vision.ee.ethz.ch tribur at vision.ee.ethz.ch
Mon May 18 07:49:04 PDT 2009


Hi all,

is there anyone who can tell me if A) or B) is probably faster?

A)
process 0 sends 3x500 elements, e.g. doubles, to 3 different  
processors using something like
if(rank==0){
MPI_Send(sendbuf, 500, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD);
MPI_Send(sendbuf, 500, MPI_DOUBLE, 2, 2, MPI_COMM_WORLD);
MPI_Send(sendbuf, 500, MPI_DOUBLE, 3, 3, MPI_COMM_WORLD);
}
else
MPI_Recv(recvbuf, 500, MPI_DOUBLE, 0, rank, MPI_COMM_WORLD, status);


B)
process 0 sends 2000 elements to process 1 using
if(rank==0)
MPI_Send(sendbuf, 2000, MPI_DOUBLE, 1, 1, MPI_COMM_WORLD);
else
MPI_Recv(recvbuf, 2000, MPI_DOUBLE, 0, rank, MPI_COMM_WORLD, status);





More information about the Beowulf mailing list