NAME
MMPPIIPPaacckkssiizzee - Returns the upper bound on the amount of space needed
to pack a message. SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPIPacksize(int incount, MPIDatatype datatype, MPIComm comm, int *size) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPIPACKSIZE(INCOUNT, DATATYPE, COMM, SIZE, IERROR)
INTEGER INCOUNT, DATATYPE, COMM, SIZE, IERROR
CC++++ SSyynnttaaxx#include
int Datatype::Packsize(int incount, const Comm& comm) const IINNPPUUTT PPAARRAAMMEETTEERRSS incount Count argument to packing call (integer). datatype Datatype argument to packing call (handle). comm Communicator argument to packing call (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS size Upper bound on size of packed message, in bytes (integer).IERROR Fortran only: Error status (integer).
DESCRIPTION
MPIPacksize allows the application to find out how much space is needed to pack a message. A call to MPIPacksize(incount, datatype, comm, size) returns in size an upper bound on the increment in position that would occur in a call to MPIPack, with the same values for incount, datatype, and comm. RRaattiioonnaallee:: The call returns an upper bound, rather than an exact bound, since the exact amount of space needed to pack the message may depend on the context (e.g., first message packed in a packing unit may take more space). EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.SEE ALSO
MPIPack MPIUnpack Open MPI 1.2 September 2006 MPIPacksize(3OpenMPI)