MPI_PACK_SIZE, MPI_Pack_size Purpose Returns the number of bytes required to hold the data. C synopsis #include int MPI_Pack_size(int incount,MPI_Datatype datatype,MPI_Comm comm, int *size); C++ synopsis #include mpi.h int MPI::Datatype::Pack_size(int incount, const MPI::Comm& comm) const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_PACK_SIZE(INTEGER INCOUNT,INTEGER DATATYPE,INTEGER COMM, INTEGER SIZE,INTEGER IERROR) Parameters incount is an integer specifying the count argument to a packing call (IN) datatype is the datatype argument to a packing call (handle) (IN) comm is the communicator to a packing call (handle) (IN) size is the size of packed message in bytes (integer) (OUT) IERROR is the FORTRAN return code. It is always the last argument. Description This subroutine returns the number of bytes required to pack incount replications of the datatype. You can use MPI_PACK_SIZE to determine the size required for a packing buffer or to track space needed for buffered sends. Notes MPI_PACK_SIZE must be used with some care in 64-bit applications because the size argument is an integer and can be subject to overflow. Errors Invalid datatype Type is not committed MPI not initialized MPI already finalized Invalid communicator Invalid incount incount < 0 Size overflow 64-bit applications only Related information