12#include "gadgetconfig.h"
20#include "../data/allvars.h"
21#include "../data/dtypes.h"
22#include "../mpi_utils/mpi_utils.h"
24int myMPI_Allreduce(
const void *sendbuf,
void *recvbuf,
int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
28 MPI_Allreduce(&count, &mi, 1, MPI_INT, MPI_MIN, comm);
29 MPI_Allreduce(&count, &ma, 1, MPI_INT, MPI_MAX, comm);
34 MPI_Comm_rank(comm, &thistask);
35 MPI_Comm_size(comm, &ntask);
37 printf(
"Error in MPI_Allreduce: task=%d out of %d has size = %d\n", thistask, ntask, count);
44 return MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
int myMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)