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

Pavan Balaji balaji at mcs.anl.gov
Sat Oct 19 08:13:03 CDT 2013


On Oct 18, 2013, at 8:15 PM, Rob Latham wrote:

> On Fri, Oct 18, 2013 at 04:44:32PM -0500, Pavan Balaji wrote:
>> 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?
> 
> It'd have to be "next to" or "inside", but not "on top of".  The usual
> trick of "just describe big type with a smaller number of CONTIGs
> won't work:
> 
> MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype,
>        void * outbuf, int outcount int *position);
> 
> We're ok on inputs: a normal buf, count, datatype tuple. 
> 
> How do you work around the output, though?  outcount is a count of
> bytes, not a count of datatypes.  Position is a plain old pointer to
> memory.

I meant, one can write a higher-level function that takes Aint, which internally uses a combination of MPI_Pack and MPI_Get_elements_x.  No?

  -- Pavan

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


More information about the devel mailing list