src/missing/mpi.c
int MPI_Reduce(void * sendbuf, void * recvbuf, int count, MPI_Datatype type,
	       MPI_Op op, int root, MPI_Comm comm) {
  int rc;

  err_err_rcif(sendbuf == NULL, MPI_ERR_BUFFER);
  err_err_rcif(recvbuf == NULL, MPI_ERR_BUFFER);
  err_err_rcif(comm < 0, MPI_ERR_COMM);
  err_err_rcif(count < 0, MPI_ERR_COUNT);

  mpi_copy(sendbuf, recvbuf, count, type);

  return MPI_SUCCESS;

 err:
  mpi_errhandler_(&comm, &rc);

  return rc;
}
/*****************************************************************************
 *
 *  \brief Replacement MPI_Reduce operational for basic datatypes
 *
 *  We simply copy the source buffer to the result buffer, which is
 *  appropriate for MPI_SUM, MPI_MIN, MPI_MAX
 *
 *  \param  sendbuf     pointer to data to be reduced
 *  \param  recvbuf     pointer to result data
 *  \param  count       number of data items
 *  \param  type        MPI_Datatype of the data
 *  \param  op          MPI operation
 *  \param  root        expected to be 0
 *  \param  comm        expected to MPI_COMM_WORLD
 *
 *  \retval MPI_SUCCESS a success
 *  \retval MPI_ERR_... a failure
 *
 *****************************************************************************/
\brief Replacement MPI_Reduce operational for basic datatypes
We simply copy the source buffer to the result buffer, which is
appropriate for MPI_SUM, MPI_MIN, MPI_MAX




\ brief Replacement MPI_Reduce operational for basic datatypes We simply copy the source buffer to the result buffer which is appropriate for MPI_SUM MPI_MIN MPI_MAX
int MPI_Reduce(void * sendbuf, void * recvbuf, int count, MPI_Datatype type,
	       MPI_Op op, int root, MPI_Comm comm) {
  int rc;
  err_err_rcif(sendbuf == NULL, MPI_ERR_BUFFER);
  err_err_rcif(recvbuf == NULL, MPI_ERR_BUFFER);
  err_err_rcif(comm < 0, MPI_ERR_COMM);
  err_err_rcif(count < 0, MPI_ERR_COUNT);
  mpi_copy(sendbuf, recvbuf, count, type);
  return MPI_SUCCESS;
 err:
  mpi_errhandler_(&comm, &rc);
  return rc;
}
int MPI_Reduce ( void * sendbuf , void * recvbuf , int count , MPI_Datatype type , MPI_Op op , int root , MPI_Comm comm ) { int rc ; err_err_rcif ( sendbuf == NULL , MPI_ERR_BUFFER ) ; err_err_rcif ( recvbuf == NULL , MPI_ERR_BUFFER ) ; err_err_rcif ( comm < 0 , MPI_ERR_COMM ) ; err_err_rcif ( count < 0 , MPI_ERR_COUNT ) ; mpi_copy ( sendbuf , recvbuf , count , type ) ; return MPI_SUCCESS ; err : mpi_errhandler_ ( & comm , & rc ) ; return rc ; }
\brief Replacement MPI_Reduce operational for basic datatypes
  We simply copy the source buffer to the result buffer, which is
  appropriate for MPI_SUM, MPI_MIN, MPI_MAX
\ brief Replacement MPI_Reduce operational for basic datatypes We simply copy the source buffer to the result buffer which is appropriate for MPI_SUM MPI_MIN MPI_MAX