If you are using Gigabit Ethernet with jumbo frames (9000 bytes for
example):
A will send 3 packets with 4000 bytes and
B will send one of 9000 bytes and one of 7000 bytes.

For the cpu B is better, because will generate one system call and A will
generate three and
as many high speed interconnects today need large packets to fully utilize
their bandwidth, I think that B should be faster.
But the only way to be sure is testing.


2009/5/18 <tri...@vision.ee.ethz.ch>

> 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@beowulf.org sponsored by Penguin Computing
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf
>
_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf

Reply via email to