[mpich-discuss] MPI_Send/Recv vs MPI_un/pack performance

William Gropp gropp at mcs.anl.gov
Sat Aug 2 11:07:02 CDT 2008


Roberto,

Pack and Unpack were provided for applications that were used to the  
PVM style of building messages - as others have mentioned, MPI  
provided datatypes to permit a good MPI implementation to optimize  
the handling of non-contiguous data.

Bill

On Jul 31, 2008, at 12:18 PM, Roberto Fichera wrote:

> Hi All on the list,
>
> My apologies if this argument was already well discussed many times
> before in the list, but playing around the
> MPI_Send() and MPI_Recv() I end up on trying to optimize both  
> transfert
> and receive parts for our
> serialization/deserialization functions. So looking around I decide to
> use the MPI_Pack() and MPI_Unpack() into
> an already allocated buffer and send/receive it in one "big shot".  
> After
> getting it working I finally created a test program
> for profiling the performances in both cases. My results was quite
> stunning, working with various sizes in Mb of serialized
> data, the MPI_Send() is ~2 to 4 times faster than paired MPI_Pack() &
> MPI_Send()!!! So, my understanding for the
> MPI_Pack() is that it can be usefull for packing and unpacking data to
> send/receive for performance reasons, maybe
> do I'm missing something (o.s. tuning)?
>
> I'm using mpich2 v1.0.7 with channel ch3:socket on Fedora 8 x86_64.
>
> Best regards,
> Roberto Fichera.
>
> <char.png><double.png><int.png>

William Gropp
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080802/53cc646d/attachment.htm>


More information about the mpich-discuss mailing list