OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

coll_basic.h
1 /*
2 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2006 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2005 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef MCA_COLL_BASIC_EXPORT_H
21 #define MCA_COLL_BASIC_EXPORT_H
22
23 #include "ompi_config.h"
24
25 #include "mpi.h"
26 #include "opal/mca/mca.h"
27 #include "ompi/mca/coll/coll.h"
28 #include "ompi/request/request.h"
29 #include "ompi/communicator/communicator.h"
30
31 BEGIN_C_DECLS
32
33 /* Globally exported variables */
34
35 OMPI_MODULE_DECLSPEC extern const mca_coll_base_component_2_0_0_t
36 mca_coll_basic_component;
37 extern int mca_coll_basic_priority;
38 extern int mca_coll_basic_crossover;
39
40 /* API functions */
41
42 int mca_coll_basic_init_query(bool enable_progress_threads,
43 bool enable_mpi_threads);
44 mca_coll_base_module_t
45 *mca_coll_basic_comm_query(struct ompi_communicator_t *comm,
46 int *priority);
47
48 int mca_coll_basic_module_enable(mca_coll_base_module_t *module,
49 struct ompi_communicator_t *comm);
50
51 int mca_coll_basic_allgather_intra(void *sbuf, int scount,
52 struct ompi_datatype_t *sdtype,
53 void *rbuf, int rcount,
54 struct ompi_datatype_t *rdtype,
55 struct ompi_communicator_t *comm,
56 mca_coll_base_module_t *module);
57 int mca_coll_basic_allgather_inter(void *sbuf, int scount,
58 struct ompi_datatype_t *sdtype,
59 void *rbuf, int rcount,
60 struct ompi_datatype_t *rdtype,
61 struct ompi_communicator_t *comm,
62 mca_coll_base_module_t *module);
63
64 int mca_coll_basic_allgatherv_intra(void *sbuf, int scount,
65 struct ompi_datatype_t *sdtype,
66 void *rbuf, int *rcounts,
67 int *disps,
68 struct ompi_datatype_t *rdtype,
69 struct ompi_communicator_t *comm,
70 mca_coll_base_module_t *module);
71 int mca_coll_basic_allgatherv_inter(void *sbuf, int scount,
72 struct ompi_datatype_t *sdtype,
73 void *rbuf, int *rcounts,
74 int *disps,
75 struct ompi_datatype_t *rdtype,
76 struct ompi_communicator_t *comm,
77 mca_coll_base_module_t *module);
78
79 int mca_coll_basic_allreduce_intra(void *sbuf, void *rbuf, int count,
80 struct ompi_datatype_t *dtype,
81 struct ompi_op_t *op,
82 struct ompi_communicator_t *comm,
83 mca_coll_base_module_t *module);
84 int mca_coll_basic_allreduce_inter(void *sbuf, void *rbuf, int count,
85 struct ompi_datatype_t *dtype,
86 struct ompi_op_t *op,
87 struct ompi_communicator_t *comm,
88 mca_coll_base_module_t *module);
89
90 int mca_coll_basic_alltoall_intra(void *sbuf, int scount,
91 struct ompi_datatype_t *sdtype,
92 void *rbuf, int rcount,
93 struct ompi_datatype_t *rdtype,
94 struct ompi_communicator_t *comm,
95 mca_coll_base_module_t *module);
96 int mca_coll_basic_alltoall_inter(void *sbuf, int scount,
97 struct ompi_datatype_t *sdtype,
98 void *rbuf, int rcount,
99 struct ompi_datatype_t *rdtype,
100 struct ompi_communicator_t *comm,
101 mca_coll_base_module_t *module);
102
103 int mca_coll_basic_alltoallv_intra(void *sbuf, int *scounts,
104 int *sdisps,
105 struct ompi_datatype_t *sdtype,
106 void *rbuf, int *rcounts,
107 int *rdisps,
108 struct ompi_datatype_t *rdtype,
109 struct ompi_communicator_t *comm,
110 mca_coll_base_module_t *module);
111 int mca_coll_basic_alltoallv_inter(void *sbuf, int *scounts,
112 int *sdisps,
113 struct ompi_datatype_t *sdtype,
114 void *rbuf, int *rcounts,
115 int *rdisps,
116 struct ompi_datatype_t *rdtype,
117 struct ompi_communicator_t *comm,
118 mca_coll_base_module_t *module);
119
120 int mca_coll_basic_alltoallw_intra(void *sbuf, int *scounts,
121 int *sdisps,
122 struct ompi_datatype_t **sdtypes,
123 void *rbuf, int *rcounts,
124 int *rdisps,
125 struct ompi_datatype_t **rdtypes,
126 struct ompi_communicator_t *comm,
127 mca_coll_base_module_t *module);
128 int mca_coll_basic_alltoallw_inter(void *sbuf, int *scounts,
129 int *sdisps,
130 struct ompi_datatype_t **sdtypes,
131 void *rbuf, int *rcounts,
132 int *rdisps,
133 struct ompi_datatype_t **rdtypes,
134 struct ompi_communicator_t *comm,
135 mca_coll_base_module_t *module);
136
137 int mca_coll_basic_barrier_intra_lin(struct ompi_communicator_t *comm,
138 mca_coll_base_module_t *module);
139
140 int mca_coll_basic_barrier_inter_lin(struct ompi_communicator_t *comm,
141 mca_coll_base_module_t *module);
142
143 int mca_coll_basic_barrier_intra_log(struct ompi_communicator_t *comm,
144 mca_coll_base_module_t *module);
145
146 int mca_coll_basic_bcast_lin_intra(void *buff, int count,
147 struct ompi_datatype_t *datatype,
148 int root,
149 struct ompi_communicator_t *comm,
150 mca_coll_base_module_t *module);
151
152 int mca_coll_basic_bcast_lin_inter(void *buff, int count,
153 struct ompi_datatype_t *datatype,
154 int root,
155 struct ompi_communicator_t *comm,
156 mca_coll_base_module_t *module);
157
158 int mca_coll_basic_bcast_log_intra(void *buff, int count,
159 struct ompi_datatype_t *datatype,
160 int root,
161 struct ompi_communicator_t *comm,
162 mca_coll_base_module_t *module);
163
164 int mca_coll_basic_bcast_log_inter(void *buff, int count,
165 struct ompi_datatype_t *datatype,
166 int root,
167 struct ompi_communicator_t *comm,
168 mca_coll_base_module_t *module);
169
170 int mca_coll_basic_exscan_intra(void *sbuf, void *rbuf, int count,
171 struct ompi_datatype_t *dtype,
172 struct ompi_op_t *op,
173 struct ompi_communicator_t *comm,
174 mca_coll_base_module_t *module);
175
176 int mca_coll_basic_exscan_inter(void *sbuf, void *rbuf, int count,
177 struct ompi_datatype_t *dtype,
178 struct ompi_op_t *op,
179 struct ompi_communicator_t *comm,
180 mca_coll_base_module_t *module);
181
182 int mca_coll_basic_gather_intra(void *sbuf, int scount,
183 struct ompi_datatype_t *sdtype,
184 void *rbuf, int rcount,
185 struct ompi_datatype_t *rdtype,
186 int root,
187 struct ompi_communicator_t *comm,
188 mca_coll_base_module_t *module);
189 int mca_coll_basic_gather_inter(void *sbuf, int scount,
190 struct ompi_datatype_t *sdtype,
191 void *rbuf, int rcount,
192 struct ompi_datatype_t *rdtype,
193 int root,
194 struct ompi_communicator_t *comm,
195 mca_coll_base_module_t *module);
196
197 int mca_coll_basic_gatherv_intra(void *sbuf, int scount,
198 struct ompi_datatype_t *sdtype,
199 void *rbuf, int *rcounts, int *disps,
200 struct ompi_datatype_t *rdtype,
201 int root,
202 struct ompi_communicator_t *comm,
203 mca_coll_base_module_t *module);
204
205 int mca_coll_basic_gatherv_inter(void *sbuf, int scount,
206 struct ompi_datatype_t *sdtype,
207 void *rbuf, int *rcounts, int *disps,
208 struct ompi_datatype_t *rdtype,
209 int root,
210 struct ompi_communicator_t *comm,
211 mca_coll_base_module_t *module);
212
213 int mca_coll_basic_reduce_lin_intra(void *sbuf, void *rbuf, int count,
214 struct ompi_datatype_t *dtype,
215 struct ompi_op_t *op,
216 int root,
217 struct ompi_communicator_t *comm,
218 mca_coll_base_module_t *module);
219 int mca_coll_basic_reduce_lin_inter(void *sbuf, void *rbuf, int count,
220 struct ompi_datatype_t *dtype,
221 struct ompi_op_t *op,
222 int root,
223 struct ompi_communicator_t *comm,
224 mca_coll_base_module_t *module);
225
226 int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
227 struct ompi_datatype_t *dtype,
228 struct ompi_op_t *op,
229 int root,
230 struct ompi_communicator_t *comm,
231 mca_coll_base_module_t *module);
232 int mca_coll_basic_reduce_log_inter(void *sbuf, void *rbuf, int count,
233 struct ompi_datatype_t *dtype,
234 struct ompi_op_t *op,
235 int root,
236 struct ompi_communicator_t *comm,
237 mca_coll_base_module_t *module);
238
239 int mca_coll_basic_reduce_scatter_intra(void *sbuf, void *rbuf,
240 int *rcounts,
241 struct ompi_datatype_t *dtype,
242 struct ompi_op_t *op,
243 struct ompi_communicator_t *comm,
244 mca_coll_base_module_t *module);
245 int mca_coll_basic_reduce_scatter_inter(void *sbuf, void *rbuf,
246 int *rcounts,
247 struct ompi_datatype_t *dtype,
248 struct ompi_op_t *op,
249 struct ompi_communicator_t *comm,
250 mca_coll_base_module_t *module);
251
252 int mca_coll_basic_scan_intra(void *sbuf, void *rbuf, int count,
253 struct ompi_datatype_t *dtype,
254 struct ompi_op_t *op,
255 struct ompi_communicator_t *comm,
256 mca_coll_base_module_t *module);
257 int mca_coll_basic_scan_inter(void *sbuf, void *rbuf, int count,
258 struct ompi_datatype_t *dtype,
259 struct ompi_op_t *op,
260 struct ompi_communicator_t *comm,
261 mca_coll_base_module_t *module);
262
263 int mca_coll_basic_scatter_intra(void *sbuf, int scount,
264 struct ompi_datatype_t *sdtype,
265 void *rbuf, int rcount,
266 struct ompi_datatype_t *rdtype,
267 int root,
268 struct ompi_communicator_t *comm,
269 mca_coll_base_module_t *module);
270 int mca_coll_basic_scatter_inter(void *sbuf, int scount,
271 struct ompi_datatype_t *sdtype,
272 void *rbuf, int rcount,
273 struct ompi_datatype_t *rdtype,
274 int root,
275 struct ompi_communicator_t *comm,
276 mca_coll_base_module_t *module);
277
278 int mca_coll_basic_scatterv_intra(void *sbuf, int *scounts, int *disps,
279 struct ompi_datatype_t *sdtype,
280 void *rbuf, int rcount,
281 struct ompi_datatype_t *rdtype,
282 int root,
283 struct ompi_communicator_t *comm,
284 mca_coll_base_module_t *module);
285 int mca_coll_basic_scatterv_inter(void *sbuf, int *scounts, int *disps,
286 struct ompi_datatype_t *sdtype,
287 void *rbuf, int rcount,
288 struct ompi_datatype_t *rdtype,
289 int root,
290 struct ompi_communicator_t *comm,
291 mca_coll_base_module_t *module);
292
293 int mca_coll_basic_ft_event(int status);
294
295
296 /* Utility functions */
297
298 static inline void mca_coll_basic_free_reqs(ompi_request_t ** reqs,
299 int count)
300 {
301 int i;
302 for (i = 0; i < count; ++i)
303 ompi_request_free(&reqs[i]);
304 }
305
306
307 struct mca_coll_basic_module_t {
308 mca_coll_base_module_t super;
309
310 ompi_request_t **mccb_reqs;
311 int mccb_num_reqs;
312 };
313 typedef struct mca_coll_basic_module_t mca_coll_basic_module_t;
314 OBJ_CLASS_DECLARATION(mca_coll_basic_module_t);
315
316 END_C_DECLS
317
318 #endif /* MCA_COLL_BASIC_EXPORT_H */
mca_coll_base_module_2_0_0_t
Collective module interface.
Definition: coll.h:316
ompi_datatype_t
Definition: ompi_datatype.h:68
mca_coll_base_component_2_0_0_t
Collective component interface.
Definition: coll.h:283
mca_coll_basic_module_t
Definition: coll_basic.h:307
mca.h
Top-level interface for all MCA components.
coll.h
Collective Communication Interface.
request.h
Top-level description of requests.
ompi_request_free
static int ompi_request_free(ompi_request_t **request)
Free a request.
Definition: request.h:371
ompi_communicator_t
Definition: communicator.h:118
ompi_request_t
Main top-level request struct definition.
Definition: request.h:100
ompi_op_t
Back-end type of MPI_Op.
Definition: op.h:100
OBJ_CLASS_DECLARATION
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236