Edit

Share via


MPI_Reduce_scatter function

Combines values and scatters the results.

Syntax

int MPIAPI MPI_Reduce_scatter(
  _In_  void         *sendbuf,
  _Out_ void         *recvbuf,
  _In_  int          *recvcounts,
        MPI_Datatype datatype,
        MPI_Op       op,
        MPI_Comm     comm
);

Parameters

  • sendbuf [in]
    Starting address of send buffer.

  • recvbuf [out]
    Starting address of receive buffer.

  • recvcounts [in]
    Integer array specifying the number of elements in result distributed to each process.

  • datatype
    Datatype of elements of input buffer.

  • op
    Operation.

  • comm
    Communicator.

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_REDUCE_SCATTER(SENDBUF, RECVBUF, RECVCOUNTS, DATATYPE, OP, COMM, IERROR)
        <type> SENDBUF(*), RECVBUF(*)
        INTEGER RECVCOUNTS(*), DATATYPE, OP, 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 Collective Functions