12#include "gadgetconfig.h"
20#include "../data/allvars.h"
21#include "../data/dtypes.h"
22#include "../data/mymalloc.h"
23#include "../mpi_utils/mpi_utils.h"
28 MPI_Allreduce(MPI_IN_PLACE, res, n, MPI_LONG_LONG, MPI_MIN, comm);
30 MPI_Allreduce(src, res, n, MPI_LONG_LONG, MPI_MIN, comm);
35 long long *numlist = (
long long *)
Mem.mymalloc(
"numlist", n *
sizeof(
long long));
37 for(
int j = 0; j < n; j++)
39 MPI_Allreduce(numlist, res, n, MPI_LONG_LONG, MPI_SUM, comm);
44void sumup_longs(
int n,
long long *src,
long long *res, MPI_Comm comm)
47 MPI_Allreduce(MPI_IN_PLACE, res, n, MPI_LONG_LONG, MPI_SUM, comm);
49 MPI_Allreduce(src, res, n, MPI_LONG_LONG, MPI_SUM, comm);
void sumup_large_ints(int n, int *src, long long *res, MPI_Comm comm)
void minimum_large_ints(int n, long long *src, long long *res, MPI_Comm comm)
void sumup_longs(int n, long long *src, long long *res, MPI_Comm comm)