[mpich-devel] MPI_Pack/MPI_Unpack/MPI_Pack_size and large datatypes

Pavan Balaji balaji at mcs.anl.gov
Fri Oct 18 16:44:32 CDT 2013


Hi Rob,

I totally agree with adding this into MPICH.

However, with respect to the MPI standard, can one not implement MPIX_Pack_x on top of current MPI-3 using appropriate datatype creation?

  -- Pavan

On Oct 18, 2013, at 4:40 PM, Rob Latham wrote:

> No one on the mpi forum had much to say when I mentioned the oddity
> that is MPI_Pack:  'int' used to describe position in a bytestream.
> 'int' used to describe a memory address...
> 
> When Jeff brought up MPI_Pack a year ago, the response was "it took us
> 3 years to do MPI_Count.  we're not touching MPI_Pack".  Fair enough.
> 
> Except! the practice of packing mpi datatypes into a contiguous buffer
> is rather common in the MPICH code.
> 
> I propose promoting the 'outsize', 'position' and 'size' parameters of
> the internal routines (MPIR_Pack_impl, MPIR_Unpack_impl,
> MPIR_Pack_size_impl) to MPI_Aint:
> 
> int MPIR_Pack_impl(const void *inbuf, int incount, MPI_Datatype
> datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position);
> 
> void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype,
>        MPI_Aint *size);
> 
> int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize,
> 	MPI_Aint *position, void *outbuf, int outcount,
> 	MPI_Datatype datatype);
> 
> I would have used MPI_Count, but Dave and Jim had some concerns about
> 128-bit math in places.   Is pack/unpack ever on the critical path?
> 
> I've added this change to the
> mpich-review/large-count-large-typesize-combo review branch.
> 
> ==rob
> 
> -- 
> Rob Latham
> Mathematics and Computer Science Division
> Argonne National Lab, IL USA

--
Pavan Balaji
http://www.mcs.anl.gov/~balaji



More information about the devel mailing list