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

tribur at vision.ee.ethz.ch tribur at vision.ee.ethz.ch
Mon May 18 10:49:04 EDT 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);


_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Beowulf mailing list