MPI_Reduce

--- Reduces values on all processes to a single value

Input Parameters

sendbuf
address of send buffer (choice)
count
number of elements in send buffer (integer)
datatype
data type of elements of send buffer (handle)
op
reduce operation (handle)
root
rank of root process (integer)
comm
communicator (handle)

Output Parameter

recvbuf
address of receive buffer (choice, significant only at root)

Algorithm

This implementation currently uses a simple tree algorithm.

Synopsis


#include "mpi.h"
int MPI_Reduce ( sendbuf, recvbuf, count, datatype, op, root, comm )
void             *sendbuf;
void             *recvbuf;
int               count;
MPI_Datatype      datatype;
MPI_Op            op;
int               root;
MPI_Comm          comm;

Location: reduce.c