Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mostly cosmetics
[simgrid.git] / src / smpi / smpi_coll.hpp
1 /*High level handling of collective algorithms*/
2 /* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team.
3  * All rights reserved.                                                     */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef SMPI_COLL_HPP
9 #define SMPI_COLL_HPP
10
11 #include "xbt/base.h"
12
13 /** \brief MPI collective description */
14
15 #define COLL_DEFS(cat, ret, args, args2)\
16     static void set_##cat(const char* name);\
17     static s_mpi_coll_description_t mpi_coll_##cat##_description[];\
18     static int (*cat ) args;
19
20 #define COLL_SIG(cat, ret, args, args2)\
21     static int cat args;
22
23
24 #define COLL_DESCRIPTION(cat, ret, args, name) \
25   {# name,\
26    # cat " " # name " collective",\
27    (void*) Coll_ ## cat ## _ ## name::cat }
28
29 #define COLL_PROTO(cat, ret, args, name) \
30 class Coll_ ## cat ## _ ## name : public Coll { \
31 public: \
32 static ret cat  (COLL_UNPAREN args); \
33 };
34
35 #define COLL_UNPAREN(...)  __VA_ARGS__
36
37 #define COLL_APPLY(action, sig, name) action(sig, name)
38 #define COLL_COMMA ,
39 #define COLL_NOsep
40 #define COLL_NOTHING(...)
41
42 #define COLL_GATHER_SIG gather, int, \
43                       (void *send_buff, int send_count, MPI_Datatype send_type, \
44                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
45                            int root, MPI_Comm comm)
46 #define COLL_ALLGATHER_SIG allgather, int, \
47                       (void *send_buff, int send_count, MPI_Datatype send_type, \
48                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
49                            MPI_Comm comm)
50 #define COLL_ALLGATHERV_SIG allgatherv, int, \
51                       (void *send_buff, int send_count, MPI_Datatype send_type, \
52                        void *recv_buff, int *recv_count, int *recv_disps, \
53                MPI_Datatype recv_type, MPI_Comm comm)
54 #define COLL_ALLTOALL_SIG alltoall, int, \
55                      (void *send_buff, int send_count, MPI_Datatype send_type, \
56                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
57                           MPI_Comm comm)
58 #define COLL_ALLTOALLV_SIG alltoallv, int, \
59                      (void *send_buff, int *send_counts, int *send_disps, MPI_Datatype send_type, \
60                       void *recv_buff, int *recv_counts, int *recv_disps, MPI_Datatype recv_type, \
61                           MPI_Comm comm)
62 #define COLL_BCAST_SIG bcast, int, \
63                   (void *buf, int count, MPI_Datatype datatype, \
64                    int root, MPI_Comm comm)
65 #define COLL_REDUCE_SIG reduce, int, \
66                    (void *buf, void *rbuf, int count, MPI_Datatype datatype, \
67                         MPI_Op op, int root, MPI_Comm comm)
68 #define COLL_ALLREDUCE_SIG allreduce, int, \
69                       (void *sbuf, void *rbuf, int rcount, \
70                            MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
71 #define COLL_REDUCE_SCATTER_SIG reduce_scatter, int, \
72                       (void *sbuf, void *rbuf, int *rcounts,\
73                     MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
74 #define COLL_SCATTER_SIG scatter, int, \
75                 (void *sendbuf, int sendcount, MPI_Datatype sendtype,\
76                 void *recvbuf, int recvcount, MPI_Datatype recvtype,\
77                 int root, MPI_Comm comm)
78 #define COLL_BARRIER_SIG barrier, int, \
79                 (MPI_Comm comm)
80
81 namespace simgrid{
82 namespace smpi{
83
84 struct mpi_coll_description {
85   const char *name;
86   const char *description;
87   void *coll;
88 };
89 typedef struct mpi_coll_description  s_mpi_coll_description_t;
90
91 class Colls{
92   public:
93     static XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
94     static XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, const char *name, const char *desc);
95     static void set_collectives();
96
97     // for each collective type, create the set_* prototype, the description array and the function pointer
98     COLL_APPLY(COLL_DEFS, COLL_GATHER_SIG, "");
99     COLL_APPLY(COLL_DEFS, COLL_ALLGATHER_SIG, "");
100     COLL_APPLY(COLL_DEFS, COLL_ALLGATHERV_SIG, "");
101     COLL_APPLY(COLL_DEFS, COLL_REDUCE_SIG, "");
102     COLL_APPLY(COLL_DEFS, COLL_ALLREDUCE_SIG, "");
103     COLL_APPLY(COLL_DEFS, COLL_REDUCE_SCATTER_SIG, "");
104     COLL_APPLY(COLL_DEFS, COLL_SCATTER_SIG, "");
105     COLL_APPLY(COLL_DEFS, COLL_BARRIER_SIG, "");
106     COLL_APPLY(COLL_DEFS, COLL_BCAST_SIG, "");
107     COLL_APPLY(COLL_DEFS, COLL_ALLTOALL_SIG, "");
108     COLL_APPLY(COLL_DEFS, COLL_ALLTOALLV_SIG, "");
109
110     // These fairly unused collectives only have one implementation in SMPI
111     static int gatherv(void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int* recvcounts, int* displs,
112                        MPI_Datatype recvtype, int root, MPI_Comm comm);
113     static int scatterv(void* sendbuf, int* sendcounts, int* displs, MPI_Datatype sendtype, void* recvbuf,
114                         int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
115     static int scan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
116     static int exscan(void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
117
118     static void (*smpi_coll_cleanup_callback)();
119 };
120
121 class Coll {
122   public:
123     // for each collective type, create a function member
124     COLL_APPLY(COLL_SIG,COLL_GATHER_SIG,"");
125     COLL_APPLY(COLL_SIG,COLL_ALLGATHER_SIG,"");
126     COLL_APPLY(COLL_SIG,COLL_ALLGATHERV_SIG,"");
127     COLL_APPLY(COLL_SIG,COLL_REDUCE_SIG,"");
128     COLL_APPLY(COLL_SIG,COLL_ALLREDUCE_SIG,"");
129     COLL_APPLY(COLL_SIG,COLL_REDUCE_SCATTER_SIG,"");
130     COLL_APPLY(COLL_SIG,COLL_SCATTER_SIG,"");
131     COLL_APPLY(COLL_SIG,COLL_BARRIER_SIG,"");
132     COLL_APPLY(COLL_SIG,COLL_BCAST_SIG,"");
133     COLL_APPLY(COLL_SIG,COLL_ALLTOALL_SIG,"");
134     COLL_APPLY(COLL_SIG,COLL_ALLTOALLV_SIG,"");
135 };
136
137
138 /*************
139  * GATHER *
140  *************/
141
142 #define COLL_GATHERS(action, COLL_sep) \
143 COLL_APPLY(action, COLL_GATHER_SIG, default) COLL_sep \
144 COLL_APPLY(action, COLL_GATHER_SIG, ompi) COLL_sep \
145 COLL_APPLY(action, COLL_GATHER_SIG, ompi_basic_linear) COLL_sep \
146 COLL_APPLY(action, COLL_GATHER_SIG, ompi_binomial) COLL_sep \
147 COLL_APPLY(action, COLL_GATHER_SIG, ompi_linear_sync) COLL_sep \
148 COLL_APPLY(action, COLL_GATHER_SIG, mpich) COLL_sep \
149 COLL_APPLY(action, COLL_GATHER_SIG, mvapich2) COLL_sep \
150 COLL_APPLY(action, COLL_GATHER_SIG, mvapich2_two_level) COLL_sep \
151 COLL_APPLY(action, COLL_GATHER_SIG, impi) COLL_sep \
152 COLL_APPLY(action, COLL_GATHER_SIG, automatic)
153
154 COLL_GATHERS(COLL_PROTO, COLL_NOsep)
155
156 /*************
157  * ALLGATHER *
158  *************/
159
160 #define COLL_ALLGATHERS(action, COLL_sep) \
161 COLL_APPLY(action, COLL_ALLGATHER_SIG, default) COLL_sep \
162 COLL_APPLY(action, COLL_ALLGATHER_SIG, 2dmesh) COLL_sep \
163 COLL_APPLY(action, COLL_ALLGATHER_SIG, 3dmesh) COLL_sep \
164 COLL_APPLY(action, COLL_ALLGATHER_SIG, bruck) COLL_sep \
165 COLL_APPLY(action, COLL_ALLGATHER_SIG, GB) COLL_sep \
166 COLL_APPLY(action, COLL_ALLGATHER_SIG, loosely_lr) COLL_sep \
167 COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR) COLL_sep \
168 COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR_NB) COLL_sep \
169 COLL_APPLY(action, COLL_ALLGATHER_SIG, pair) COLL_sep \
170 COLL_APPLY(action, COLL_ALLGATHER_SIG, rdb) COLL_sep \
171 COLL_APPLY(action, COLL_ALLGATHER_SIG, rhv) COLL_sep \
172 COLL_APPLY(action, COLL_ALLGATHER_SIG, ring) COLL_sep \
173 COLL_APPLY(action, COLL_ALLGATHER_SIG, SMP_NTS) COLL_sep \
174 COLL_APPLY(action, COLL_ALLGATHER_SIG, smp_simple) COLL_sep \
175 COLL_APPLY(action, COLL_ALLGATHER_SIG, spreading_simple) COLL_sep \
176 COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi) COLL_sep \
177 COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi_neighborexchange) COLL_sep \
178 COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2) COLL_sep \
179 COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2_smp) COLL_sep \
180 COLL_APPLY(action, COLL_ALLGATHER_SIG, mpich) COLL_sep \
181 COLL_APPLY(action, COLL_ALLGATHER_SIG, impi) COLL_sep \
182 COLL_APPLY(action, COLL_ALLGATHER_SIG, automatic)
183
184 COLL_ALLGATHERS(COLL_PROTO, COLL_NOsep)
185
186 /**************
187  * ALLGATHERV *
188  **************/
189
190 #define COLL_ALLGATHERVS(action, COLL_sep) \
191 COLL_APPLY(action, COLL_ALLGATHERV_SIG, default) COLL_sep \
192 COLL_APPLY(action, COLL_ALLGATHERV_SIG, GB) COLL_sep \
193 COLL_APPLY(action, COLL_ALLGATHERV_SIG, pair) COLL_sep \
194 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ring) COLL_sep \
195 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi) COLL_sep \
196 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_neighborexchange) COLL_sep \
197 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_bruck) COLL_sep \
198 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich) COLL_sep \
199 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_rdb) COLL_sep \
200 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_ring) COLL_sep \
201 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mvapich2) COLL_sep \
202 COLL_APPLY(action, COLL_ALLGATHERV_SIG, impi) COLL_sep \
203 COLL_APPLY(action, COLL_ALLGATHERV_SIG, automatic)
204
205 COLL_ALLGATHERVS(COLL_PROTO, COLL_NOsep)
206
207 /*************
208  * ALLREDUCE *
209  *************/
210
211 #define COLL_ALLREDUCES(action, COLL_sep) \
212 COLL_APPLY(action, COLL_ALLREDUCE_SIG, default) COLL_sep \
213 COLL_APPLY(action, COLL_ALLREDUCE_SIG, lr) COLL_sep \
214 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab1) COLL_sep \
215 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab2) COLL_sep \
216 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab_rdb) COLL_sep \
217 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rdb) COLL_sep \
218 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial) COLL_sep \
219 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial_pipeline) COLL_sep \
220 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rdb) COLL_sep \
221 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag) COLL_sep \
222 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_lr) COLL_sep \
223 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_rab) COLL_sep \
224 COLL_APPLY(action, COLL_ALLREDUCE_SIG, redbcast) COLL_sep \
225 COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi) COLL_sep \
226 COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi_ring_segmented) COLL_sep \
227 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mpich) COLL_sep \
228 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2) COLL_sep \
229 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_rs) COLL_sep \
230 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_two_level) COLL_sep \
231 COLL_APPLY(action, COLL_ALLREDUCE_SIG, impi) COLL_sep \
232 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab) COLL_sep \
233 COLL_APPLY(action, COLL_ALLREDUCE_SIG, automatic)
234
235 COLL_ALLREDUCES(COLL_PROTO, COLL_NOsep)
236
237 /************
238  * ALLTOALL *
239  ************/
240
241 #define COLL_ALLTOALLS(action, COLL_sep) \
242 COLL_APPLY(action, COLL_ALLTOALL_SIG, default) COLL_sep \
243 COLL_APPLY(action, COLL_ALLTOALL_SIG, 2dmesh) COLL_sep \
244 COLL_APPLY(action, COLL_ALLTOALL_SIG, 3dmesh) COLL_sep \
245 COLL_APPLY(action, COLL_ALLTOALL_SIG, basic_linear) COLL_sep \
246 COLL_APPLY(action, COLL_ALLTOALL_SIG, bruck) COLL_sep \
247 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair) COLL_sep \
248 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_rma) COLL_sep \
249 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_light_barrier) COLL_sep \
250 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_mpi_barrier) COLL_sep \
251 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_one_barrier) COLL_sep \
252 COLL_APPLY(action, COLL_ALLTOALL_SIG, rdb) COLL_sep \
253 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring) COLL_sep \
254 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_light_barrier) COLL_sep \
255 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_mpi_barrier) COLL_sep \
256 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_one_barrier) COLL_sep \
257 COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2) COLL_sep \
258 COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2_scatter_dest) COLL_sep \
259 COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi) COLL_sep \
260 COLL_APPLY(action, COLL_ALLTOALL_SIG, mpich) COLL_sep \
261 COLL_APPLY(action, COLL_ALLTOALL_SIG, impi) COLL_sep \
262 COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
263
264 COLL_ALLTOALLS(COLL_PROTO, COLL_NOsep)
265
266 /*************
267  * ALLTOALLV *
268  *************/
269
270 #define COLL_ALLTOALLVS(action, COLL_sep) \
271 COLL_APPLY(action, COLL_ALLTOALLV_SIG, default) COLL_sep \
272 COLL_APPLY(action, COLL_ALLTOALLV_SIG, bruck) COLL_sep \
273 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair) COLL_sep \
274 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_light_barrier) COLL_sep \
275 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_mpi_barrier) COLL_sep \
276 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_one_barrier) COLL_sep \
277 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring) COLL_sep \
278 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_light_barrier) COLL_sep \
279 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_mpi_barrier) COLL_sep \
280 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_one_barrier) COLL_sep \
281 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi) COLL_sep \
282 COLL_APPLY(action, COLL_ALLTOALLV_SIG, mpich) COLL_sep \
283 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi_basic_linear) COLL_sep \
284 COLL_APPLY(action, COLL_ALLTOALLV_SIG, mvapich2) COLL_sep \
285 COLL_APPLY(action, COLL_ALLTOALLV_SIG, impi) COLL_sep \
286 COLL_APPLY(action, COLL_ALLTOALLV_SIG, automatic)
287
288 COLL_ALLTOALLVS(COLL_PROTO, COLL_NOsep)
289
290 /*********
291  * BCAST *
292  *********/
293
294 #define COLL_BCASTS(action, COLL_sep) \
295 COLL_APPLY(action, COLL_BCAST_SIG, default) COLL_sep \
296 COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware) COLL_sep \
297 COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware_wait) COLL_sep \
298 COLL_APPLY(action, COLL_BCAST_SIG, arrival_scatter) COLL_sep \
299 COLL_APPLY(action, COLL_BCAST_SIG, binomial_tree) COLL_sep \
300 COLL_APPLY(action, COLL_BCAST_SIG, flattree) COLL_sep \
301 COLL_APPLY(action, COLL_BCAST_SIG, flattree_pipeline) COLL_sep \
302 COLL_APPLY(action, COLL_BCAST_SIG, NTSB) COLL_sep \
303 COLL_APPLY(action, COLL_BCAST_SIG, NTSL) COLL_sep \
304 COLL_APPLY(action, COLL_BCAST_SIG, NTSL_Isend) COLL_sep \
305 COLL_APPLY(action, COLL_BCAST_SIG, scatter_LR_allgather) COLL_sep \
306 COLL_APPLY(action, COLL_BCAST_SIG, scatter_rdb_allgather) COLL_sep \
307 COLL_APPLY(action, COLL_BCAST_SIG, SMP_binary) COLL_sep \
308 COLL_APPLY(action, COLL_BCAST_SIG, SMP_binomial) COLL_sep \
309 COLL_APPLY(action, COLL_BCAST_SIG, SMP_linear) COLL_sep \
310 COLL_APPLY(action, COLL_BCAST_SIG, ompi) COLL_sep \
311 COLL_APPLY(action, COLL_BCAST_SIG, ompi_split_bintree) COLL_sep \
312 COLL_APPLY(action, COLL_BCAST_SIG, ompi_pipeline) COLL_sep \
313 COLL_APPLY(action, COLL_BCAST_SIG, mpich) COLL_sep \
314 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2)   COLL_sep \
315 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_inter_node)   COLL_sep \
316 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_intra_node)   COLL_sep \
317 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_knomial_intra_node)   COLL_sep \
318 COLL_APPLY(action, COLL_BCAST_SIG, impi)   COLL_sep \
319 COLL_APPLY(action, COLL_BCAST_SIG, automatic)
320
321 COLL_BCASTS(COLL_PROTO, COLL_NOsep)
322
323 /**********
324  * REDUCE *
325  **********/
326
327 #define COLL_REDUCES(action, COLL_sep) \
328 COLL_APPLY(action, COLL_REDUCE_SIG, default) COLL_sep \
329 COLL_APPLY(action, COLL_REDUCE_SIG, arrival_pattern_aware) COLL_sep \
330 COLL_APPLY(action, COLL_REDUCE_SIG, binomial) COLL_sep \
331 COLL_APPLY(action, COLL_REDUCE_SIG, flat_tree) COLL_sep \
332 COLL_APPLY(action, COLL_REDUCE_SIG, NTSL) COLL_sep \
333 COLL_APPLY(action, COLL_REDUCE_SIG, scatter_gather) COLL_sep \
334 COLL_APPLY(action, COLL_REDUCE_SIG, ompi) COLL_sep \
335 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_chain) COLL_sep \
336 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_pipeline) COLL_sep \
337 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_basic_linear) COLL_sep \
338 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_in_order_binary) COLL_sep \
339 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binary) COLL_sep \
340 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binomial) COLL_sep \
341 COLL_APPLY(action, COLL_REDUCE_SIG, mpich) COLL_sep \
342 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2) COLL_sep \
343 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_knomial) COLL_sep \
344 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_two_level) COLL_sep \
345 COLL_APPLY(action, COLL_REDUCE_SIG, impi) COLL_sep \
346 COLL_APPLY(action, COLL_REDUCE_SIG, rab) COLL_sep \
347 COLL_APPLY(action, COLL_REDUCE_SIG, automatic)
348
349 COLL_REDUCES(COLL_PROTO, COLL_NOsep)
350
351 /*************
352  * REDUCE_SCATTER *
353  *************/
354
355 #define COLL_REDUCE_SCATTERS(action, COLL_sep) \
356 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, default) COLL_sep \
357 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi) COLL_sep \
358 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_basic_recursivehalving) COLL_sep \
359 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_ring)  COLL_sep \
360 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich) COLL_sep \
361 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_pair) COLL_sep \
362 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_rdb) COLL_sep \
363 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_noncomm) COLL_sep \
364 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mvapich2) COLL_sep \
365 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, impi) COLL_sep \
366 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, automatic)
367
368 COLL_REDUCE_SCATTERS(COLL_PROTO, COLL_NOsep)
369
370 /*************
371  * SCATTER *
372  *************/
373
374 #define COLL_SCATTERS(action, COLL_sep) \
375 COLL_APPLY(action, COLL_SCATTER_SIG, default) COLL_sep \
376 COLL_APPLY(action, COLL_SCATTER_SIG, ompi) COLL_sep \
377 COLL_APPLY(action, COLL_SCATTER_SIG, ompi_basic_linear) COLL_sep \
378 COLL_APPLY(action, COLL_SCATTER_SIG, ompi_binomial)  COLL_sep \
379 COLL_APPLY(action, COLL_SCATTER_SIG, mpich)   COLL_sep \
380 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2)   COLL_sep \
381 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_binomial)   COLL_sep \
382 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_direct)   COLL_sep \
383 COLL_APPLY(action, COLL_SCATTER_SIG, impi)   COLL_sep \
384 COLL_APPLY(action, COLL_SCATTER_SIG, automatic)
385
386 COLL_SCATTERS(COLL_PROTO, COLL_NOsep)
387
388 /*************
389  * BARRIER *
390  *************/
391
392 #define COLL_BARRIERS(action, COLL_sep) \
393 COLL_APPLY(action, COLL_BARRIER_SIG, default) COLL_sep \
394 COLL_APPLY(action, COLL_BARRIER_SIG, ompi) COLL_sep \
395 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_basic_linear) COLL_sep \
396 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_two_procs)  COLL_sep \
397 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_tree)  COLL_sep \
398 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_bruck)  COLL_sep \
399 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_recursivedoubling) COLL_sep \
400 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_doublering) COLL_sep \
401 COLL_APPLY(action, COLL_BARRIER_SIG, mpich)   COLL_sep \
402 COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2_pair)   COLL_sep \
403 COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2)   COLL_sep \
404 COLL_APPLY(action, COLL_BARRIER_SIG, impi)   COLL_sep \
405 COLL_APPLY(action, COLL_BARRIER_SIG, automatic)
406
407 COLL_BARRIERS(COLL_PROTO, COLL_NOsep)
408
409 }
410 }
411 #endif