This source file includes following definitions.
- MPI_Allreduce
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 #include "ompi/op/op.h"
29 #include "ompi/mpi/c/bindings.h"
30
31 int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
32 MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
33 {
34 char typename[MPI_MAX_OBJECT_NAME], commname[MPI_MAX_OBJECT_NAME];
35 int len;
36 int rank;
37
38 PMPI_Comm_rank(MPI_COMM_WORLD, &rank);
39 PMPI_Type_get_name(datatype, typename, &len);
40 PMPI_Comm_get_name(comm, commname, &len);
41
42 fprintf(stderr, "MPI_ALLREDUCE[%d]: sendbuf %0" PRIxPTR " recvbuf %0" PRIxPTR " count %d datatype %s op %s comm %s\n",
43 rank, (uintptr_t)sendbuf, (uintptr_t)recvbuf, count, typename, op->o_name, commname);
44 fflush(stderr);
45
46 return PMPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm);
47 }