This source file includes following definitions.
- MPI_Reduce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #include "ompi_config.h"
24
25 #include <stdio.h>
26
27 #include "opal_stdint.h"
28
29 #include "ompi/op/op.h"
30 #include "ompi/mpi/c/bindings.h"
31
32 int MPI_Reduce(const void *sendbuf, void *recvbuf, int count,
33 MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm)
34 {
35 char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME];
36 int len;
37 int rank;
38
39 PMPI_Comm_rank(MPI_COMM_WORLD, &rank);
40 PMPI_Type_get_name(datatype, typename, &len);
41 PMPI_Comm_get_name(comm, commname, &len);
42
43 fprintf(stderr,"MPI_REDUCE[%d]: sendbuf %0" PRIxPTR " recvbuf %0" PRIxPTR " count %d datatype %s op %s root %d comm %s\n",
44 rank, (uintptr_t) sendbuf, (uintptr_t) recvbuf, count, typename, op->o_name, root, commname);
45 fflush(stderr);
46
47 return PMPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
48 }