This source file includes following definitions.
- mca_coll_inter_bcast_inter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #include "ompi_config.h"
22 #include "coll_inter.h"
23
24 #include "mpi.h"
25 #include "ompi/constants.h"
26 #include "ompi/communicator/communicator.h"
27 #include "ompi/mca/coll/coll.h"
28 #include "ompi/mca/coll/base/coll_tags.h"
29 #include "ompi/mca/pml/pml.h"
30
31
32
33
34
35
36
37
38
39 int
40 mca_coll_inter_bcast_inter(void *buff, int count,
41 struct ompi_datatype_t *datatype, int root,
42 struct ompi_communicator_t *comm,
43 mca_coll_base_module_t *module)
44 {
45 int rank;
46 int err;
47
48 rank = ompi_comm_rank(comm);
49
50 if (MPI_PROC_NULL == root) {
51
52 err = OMPI_SUCCESS;
53 } else if (MPI_ROOT != root) {
54
55 if ( 0 == rank ) {
56 err = MCA_PML_CALL(recv(buff, count, datatype, root,
57 MCA_COLL_BASE_TAG_BCAST, comm,
58 MPI_STATUS_IGNORE));
59 if (OMPI_SUCCESS != err) {
60 return err;
61 }
62 }
63 err = comm->c_local_comm->c_coll->coll_bcast(buff, count, datatype, 0,
64 comm->c_local_comm,
65 comm->c_local_comm->c_coll->coll_bcast_module);
66 } else {
67
68 err = MCA_PML_CALL(send(buff, count, datatype, 0,
69 MCA_COLL_BASE_TAG_BCAST,
70 MCA_PML_BASE_SEND_STANDARD,
71 comm));
72 if (OMPI_SUCCESS != err) {
73 return err;
74 }
75 }
76
77
78 return err;
79 }
80