This source file includes following definitions.
- mca_coll_sm_allreduce_intra
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 "ompi/constants.h"
26 #include "ompi/communicator/communicator.h"
27 #include "coll_sm.h"
28
29
30
31
32
33
34
35
36 int mca_coll_sm_allreduce_intra(const void *sbuf, void *rbuf, int count,
37 struct ompi_datatype_t *dtype,
38 struct ompi_op_t *op,
39 struct ompi_communicator_t *comm,
40 mca_coll_base_module_t *module)
41 {
42 int ret;
43
44
45
46
47 if (MPI_IN_PLACE == sbuf) {
48 int rank = ompi_comm_rank(comm);
49 if (0 == rank) {
50 ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0,
51 comm, module);
52 } else {
53 ret = mca_coll_sm_reduce_intra(rbuf, NULL, count, dtype, op, 0,
54 comm, module);
55 }
56 } else {
57 ret = mca_coll_sm_reduce_intra(sbuf, rbuf, count, dtype, op, 0,
58 comm, module);
59 }
60 return (ret == OMPI_SUCCESS) ?
61 mca_coll_sm_bcast_intra(rbuf, count, dtype, 0, comm, module) : ret;
62 }