Re: use of MPI_Status and MPI_Status

John M May (johnmay@coral.llnl.gov)
Fri, 15 Mar 1996 17:23:00 -0800 (PST)

> | This sounds very promising. How will MPI_Pack_size compute an upper
> | bound on the size of an MPI_DATATYPE string when a datatype can be
> | arbitrarily complex? After all, to compute the packed size of a
> | datatype object, a program will call
> |
> | MPI_Pack_size( 1, MPI_DATATYPE, ... )
> |
> | not
> |
> | MPI_Pack_size( 1, datatype_object_to_be_packed, ... )
>
> I said there were some sticky points... . This is a good point. I'll have to
> think about this. It may need a new routine, but I'd prefer a
> MPI_Pack_data_dependent_size for the general case rather than
> MPI_Datatype_pack_size.

Rats! I was hoping you already had an answer to this question.
We're designing some code right now that has to address this
problem for our MPICH-dependent version of MPI-IO.

If the packing size has to be data dependent, that opens up
all kinds of problems. For example, if you build an MPI
structure that contains datatypes, you have to pick the
indices of subsequent elements based on the maximum expected
size of the datatype representation. And if you send any
object containing a datatype, you have to probe for the size
at the receiving end and possibly reallocate a buffer before
you can receive the object.

Sorry to present more questions that answers here. If we
come up with any solutions, I'll let you know.

John