Purpose
Returns the number of bytes required to hold the data.
C synopsis
#include <mpi.h> 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
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
Related information