# MPI_Reduce_scatter_block

## NAME

MPI_Reduce_scatter_block − Combines values and scatters the results in equal-sized blocks.

## SYNTAX

## C Syntax

#include <mpi.h>
int MPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,

|  | MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)

## Fortran Syntax

INCLUDE ’mpif.h’
MPI_REDUCE_SCATTER_BLOCK(SENDBUF, RECVBUF, RECVCOUNT, DATATYPE, OP,

|  |  | COMM, IERROR) |
|  | <type> |  | SENDBUF(*), RECVBUF(*)
|  | INTEGER |  | RECVCOUNT, DATATYPE, OP, COMM, IERROR

## C++ Syntax

#include <mpi.h>
void MPI::Comm::Reduce_scatter_block(const void* sendbuf, void* recvbuf,

| int recvcount, const MPI::Datatype& datatype,
| const MPI::Op& op) const

## INPUT PARAMETERS

| sendbuf |  | Starting address of send buffer (choice). |
| recvcount |  | Element count per block (integer). |
| datatype |  | Datatype of elements of input buffer (handle). |
| op |  | Operation (handle). |
| comm |  | Communicator (handle). |

## OUTPUT PARAMETERS

| recvbuf |  | Starting address of receive buffer (choice). |
| IERROR |  | Fortran only: Error status (integer). |

## FOR MORE INFORMATION

For more information, see page 178 of the MPI 2.2 standard.

MPI API Index