1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
3 * (C) 2008 by Argonne National Laboratory.
4 * See COPYRIGHT in top-level directory.
11 int main(int argc, char *argv[])
15 int minsize = 2, csize, count;
17 MTest_Init(&argc, &argv);
19 while (MTestGetIntracommGeneral(&comm, minsize, 1)) {
20 if (comm == MPI_COMM_NULL)
23 MPI_Comm_size(comm, &csize);
28 ap = (int *) malloc(count * sizeof(int));
29 bp = (int *) malloc(count * sizeof(int));
31 MPI_Reduce(ap, bp, count, MPI_INT, MPI_SUM, root, comm);