Edit

Share via


MPI_Pack_external function

Packs a datatype into contiguous memory, using the external32 format.

Syntax

int MPIAPI MPI_Pack_external(
       _In_z_ char                 *datarep,
  _In_ void                        *inbuf,
       int                         incount,
       MPI_Datatype                datatype,
       _Out_bytecap_(outsize) void *outbuf,
       MPI_Aint                    outsize,
       _Inout_ MPI_Aint            *position
);

Parameters

  • datarep
    Data representation.

  • 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.

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_EXTERNAL(DATAREP, INBUF, INCOUNT, DATATYPE, OUTBUF, OUTSIZE,
                POSITION, IERROR)
        INTEGER INCOUNT, DATATYPE, IERROR
        INTEGER(KIND=MPI_ADDRESS_KIND) OUTSIZE, POSITION
        CHARACTER*(*) DATAREP
        <type> INBUF(*), OUTBUF(*)

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