Edit

Share via


MPI_Pack function

Packs a datatype into contiguous memory.

Syntax

int MPIAPI MPI_Pack(
  _In_ void                        *inbuf,
       int                         incount,
       MPI_Datatype                datatype,
       _Out_bytecap_(outsize) void *outbuf,
       int                         outsize,
       _Inout_ int                 *position,
       MPI_Comm                    comm
);

Parameters

  • inbuf [in]
    Start address of the input buffer.

  • incount
    Number of input data items.

  • datatype
    Datatype of each input data item.

  • outbuf Start address of the output buffer.

  • outsize
    Output buffer size, in bytes.

  • position
    Current position in buffer, in bytes.

  • comm
    Communicator for packed message.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_PACK(INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE, POSITION, COMM, IERROR)
        <type> INBUF(*), OUTBUF(*)
        INTEGER INCOUNT, DATATYPE, OUTSIZE, POSITION, COMM, IERROR

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Datatype Functions