Logo AND Algorithmique Numérique Distribuée

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