Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
smpi: expend a bunch of macros so that the functions' prototypes become accessible...
[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   void _XBT_CONCAT(set_, cat)(const std::string& name);                                                                \
18   extern int(*cat) args;
19
20 #define COLL_SIG(cat, ret, args, args2) int cat args;
21
22 #define COLL_DESCRIPTION(cat, ret, args, name)                                                                         \
23   {                                                                                                                    \
24     _XBT_STRINGIFY(name)                                                                                               \
25     , _XBT_STRINGIFY(cat) " " _XBT_STRINGIFY(name) " collective", (void*)_XBT_CONCAT3(cat, __, name)        \
26   }
27
28 #define COLL_PROTO(cat, ret, args, name)                                                                               \
29   ret _XBT_CONCAT3(cat, __, name) args;
30
31 #define COLL_UNPAREN(...)  __VA_ARGS__
32
33 #define COLL_APPLY(action, sig, name) action(sig, name)
34 #define COLL_COMMA ,
35 #define COLL_NOsep
36 #define COLL_NOTHING(...)
37
38 #define COLL_GATHER_SIG gather, int, \
39                       (const void *send_buff, int send_count, MPI_Datatype send_type, \
40                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
41                            int root, MPI_Comm comm)
42 #define COLL_ALLGATHER_SIG allgather, int, \
43                       (const void *send_buff, int send_count, MPI_Datatype send_type, \
44                        void *recv_buff, int recv_count, MPI_Datatype recv_type, \
45                            MPI_Comm comm)
46 #define COLL_ALLGATHERV_SIG allgatherv, int, \
47                       (const void *send_buff, int send_count, MPI_Datatype send_type, \
48                        void *recv_buff, const int *recv_count, const int *recv_disps, \
49                MPI_Datatype recv_type, MPI_Comm comm)
50 #define COLL_ALLTOALL_SIG alltoall, int, \
51                      (const void *send_buff, int send_count, MPI_Datatype send_type, \
52                       void *recv_buff, int recv_count, MPI_Datatype recv_type, \
53                           MPI_Comm comm)
54 #define COLL_ALLTOALLV_SIG alltoallv, int, \
55                      (const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, \
56                       void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, \
57                           MPI_Comm comm)
58 #define COLL_BCAST_SIG bcast, int, \
59                   (void *buf, int count, MPI_Datatype datatype, \
60                    int root, MPI_Comm comm)
61 #define COLL_REDUCE_SIG reduce, int, \
62                    (const void *buf, void *rbuf, int count, MPI_Datatype datatype, \
63                         MPI_Op op, int root, MPI_Comm comm)
64 #define COLL_ALLREDUCE_SIG allreduce, int, \
65                       (const void *sbuf, void *rbuf, int rcount, \
66                            MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
67 #define COLL_REDUCE_SCATTER_SIG reduce_scatter, int, \
68                       (const void *sbuf, void *rbuf, const int *rcounts,\
69                     MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm)
70 #define COLL_SCATTER_SIG scatter, int, \
71                 (const void *sendbuf, int sendcount, MPI_Datatype sendtype,\
72                 void *recvbuf, int recvcount, MPI_Datatype recvtype,\
73                 int root, MPI_Comm comm)
74 #define COLL_BARRIER_SIG barrier, int, \
75                 (MPI_Comm comm)
76
77 namespace simgrid{
78 namespace smpi{
79
80 struct s_mpi_coll_description_t {
81   std::string name;
82   std::string description;
83   void *coll;
84 };
85
86 namespace colls {
87 XBT_PUBLIC void coll_help(const char* category, s_mpi_coll_description_t* table);
88 XBT_PUBLIC int find_coll_description(s_mpi_coll_description_t* table, const std::string& name, const char* desc);
89 void set_collectives();
90 XBT_PUBLIC s_mpi_coll_description_t* get_smpi_coll_description(const char* name, int rank);
91
92 // for each collective type, create the set_* prototype, the description array and the function pointer
93 //  void set_gather(const std::string& name);
94 //  extern int(*gather)(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count,
95 //                      MPI_Datatype recv_type, int root, MPI_Comm comm);
96 COLL_APPLY(COLL_DEFS, COLL_GATHER_SIG, "")
97 COLL_APPLY(COLL_DEFS, COLL_ALLGATHER_SIG, "")
98 COLL_APPLY(COLL_DEFS, COLL_ALLGATHERV_SIG, "")
99 COLL_APPLY(COLL_DEFS, COLL_REDUCE_SIG, "")
100 COLL_APPLY(COLL_DEFS, COLL_ALLREDUCE_SIG, "")
101 COLL_APPLY(COLL_DEFS, COLL_REDUCE_SCATTER_SIG, "")
102 COLL_APPLY(COLL_DEFS, COLL_SCATTER_SIG, "")
103 COLL_APPLY(COLL_DEFS, COLL_BARRIER_SIG, "")
104 COLL_APPLY(COLL_DEFS, COLL_BCAST_SIG, "")
105 COLL_APPLY(COLL_DEFS, COLL_ALLTOALL_SIG, "")
106 COLL_APPLY(COLL_DEFS, COLL_ALLTOALLV_SIG, "")
107
108 // These fairly unused collectives only have one implementation in SMPI
109 int gatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
110             const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm);
111 int scatterv(const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype, void* recvbuf,
112              int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
113 int scan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
114 int exscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);
115 int alltoallw(const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes,
116               void* recvbuf, const int* recvcounts, const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm);
117
118 // async collectives
119 int ibarrier(MPI_Comm comm, MPI_Request* request, int external = 1);
120 int ibcast(void* buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request* request,
121            int external = 1);
122 int igather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
123             MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request, int external = 1);
124 int igatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
125              const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request, int external = 1);
126 int iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
127                MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request, int external = 1);
128 int iallgatherv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
129                 const int* displs, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request, int external = 1);
130 int iscatter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
131              MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request, int external = 1);
132 int iscatterv(const void* sendbuf, const int* sendcounts, const int* displs, MPI_Datatype sendtype, void* recvbuf,
133               int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request* request, int external = 1);
134 int ireduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm,
135             MPI_Request* request, int external = 1);
136 int iallreduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
137                MPI_Request* request, int external = 1);
138 int iscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
139           MPI_Request* request, int external = 1);
140 int iexscan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm,
141             MPI_Request* request, int external = 1);
142 int ireduce_scatter(const void* sendbuf, void* recvbuf, const int* recvcounts, MPI_Datatype datatype, MPI_Op op,
143                     MPI_Comm comm, MPI_Request* request, int external = 1);
144 int ireduce_scatter_block(const void* sendbuf, void* recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op,
145                           MPI_Comm comm, MPI_Request* request, int external = 1);
146 int ialltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
147               MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request, int external = 1);
148 int ialltoallv(const void* sendbuf, const int* sendcounts, const int* senddisps, MPI_Datatype sendtype, void* recvbuf,
149                const int* recvcounts, const int* recvdisps, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request,
150                int external = 1);
151 int ialltoallw(const void* sendbuf, const int* sendcounts, const int* senddisps, const MPI_Datatype* sendtypes,
152                void* recvbuf, const int* recvcounts, const int* recvdisps, const MPI_Datatype* recvtypes, MPI_Comm comm,
153                MPI_Request* request, int external = 1);
154
155 extern void (*smpi_coll_cleanup_callback)();
156 };
157
158 /*************
159  * GATHER *
160  *************/
161
162 int gather__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
163 int gather__ompi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
164 int gather__ompi_basic_linear(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
165 int gather__ompi_binomial(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
166 int gather__ompi_linear_sync(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
167 int gather__mpich(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
168 int gather__mvapich2(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
169 int gather__mvapich2_two_level(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
170 int gather__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
171 int gather__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, int root, MPI_Comm comm);
172
173 #define COLL_GATHERS(action, COLL_sep) \
174 COLL_APPLY(action, COLL_GATHER_SIG, default) COLL_sep \
175 COLL_APPLY(action, COLL_GATHER_SIG, ompi) COLL_sep \
176 COLL_APPLY(action, COLL_GATHER_SIG, ompi_basic_linear) COLL_sep \
177 COLL_APPLY(action, COLL_GATHER_SIG, ompi_binomial) COLL_sep \
178 COLL_APPLY(action, COLL_GATHER_SIG, ompi_linear_sync) COLL_sep \
179 COLL_APPLY(action, COLL_GATHER_SIG, mpich) COLL_sep \
180 COLL_APPLY(action, COLL_GATHER_SIG, mvapich2) COLL_sep \
181 COLL_APPLY(action, COLL_GATHER_SIG, mvapich2_two_level) COLL_sep \
182 COLL_APPLY(action, COLL_GATHER_SIG, impi) COLL_sep \
183 COLL_APPLY(action, COLL_GATHER_SIG, automatic)
184
185 /*************
186  * ALLGATHER *
187  *************/
188 int allgather__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
189 int allgather__2dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
190 int allgather__3dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
191 int allgather__bruck(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
192 int allgather__GB(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
193 int allgather__loosely_lr(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
194 int allgather__NTSLR(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
195 int allgather__NTSLR_NB(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
196 int allgather__pair(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
197 int allgather__rdb(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
198 int allgather__rhv(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
199 int allgather__ring(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
200 int allgather__SMP_NTS(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
201 int allgather__smp_simple(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
202 int allgather__spreading_simple(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
203 int allgather__ompi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
204 int allgather__ompi_neighborexchange (const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
205 int allgather__mvapich2(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
206 int allgather__mvapich2_smp(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
207 int allgather__mpich(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
208 int allgather__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
209 int allgather__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
210
211 #define COLL_ALLGATHERS(action, COLL_sep) \
212 COLL_APPLY(action, COLL_ALLGATHER_SIG, default) COLL_sep \
213 COLL_APPLY(action, COLL_ALLGATHER_SIG, 2dmesh) COLL_sep \
214 COLL_APPLY(action, COLL_ALLGATHER_SIG, 3dmesh) COLL_sep \
215 COLL_APPLY(action, COLL_ALLGATHER_SIG, bruck) COLL_sep \
216 COLL_APPLY(action, COLL_ALLGATHER_SIG, GB) COLL_sep \
217 COLL_APPLY(action, COLL_ALLGATHER_SIG, loosely_lr) COLL_sep \
218 COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR) COLL_sep \
219 COLL_APPLY(action, COLL_ALLGATHER_SIG, NTSLR_NB) COLL_sep \
220 COLL_APPLY(action, COLL_ALLGATHER_SIG, pair) COLL_sep \
221 COLL_APPLY(action, COLL_ALLGATHER_SIG, rdb) COLL_sep \
222 COLL_APPLY(action, COLL_ALLGATHER_SIG, rhv) COLL_sep \
223 COLL_APPLY(action, COLL_ALLGATHER_SIG, ring) COLL_sep \
224 COLL_APPLY(action, COLL_ALLGATHER_SIG, SMP_NTS) COLL_sep \
225 COLL_APPLY(action, COLL_ALLGATHER_SIG, smp_simple) COLL_sep \
226 COLL_APPLY(action, COLL_ALLGATHER_SIG, spreading_simple) COLL_sep \
227 COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi) COLL_sep \
228 COLL_APPLY(action, COLL_ALLGATHER_SIG, ompi_neighborexchange) COLL_sep \
229 COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2) COLL_sep \
230 COLL_APPLY(action, COLL_ALLGATHER_SIG, mvapich2_smp) COLL_sep \
231 COLL_APPLY(action, COLL_ALLGATHER_SIG, mpich) COLL_sep \
232 COLL_APPLY(action, COLL_ALLGATHER_SIG, impi) COLL_sep \
233 COLL_APPLY(action, COLL_ALLGATHER_SIG, automatic)
234
235 /**************
236  * ALLGATHERV *
237  **************/
238
239 #define COLL_ALLGATHERVS(action, COLL_sep) \
240 COLL_APPLY(action, COLL_ALLGATHERV_SIG, default) COLL_sep \
241 COLL_APPLY(action, COLL_ALLGATHERV_SIG, GB) COLL_sep \
242 COLL_APPLY(action, COLL_ALLGATHERV_SIG, pair) COLL_sep \
243 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ring) COLL_sep \
244 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi) COLL_sep \
245 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_neighborexchange) COLL_sep \
246 COLL_APPLY(action, COLL_ALLGATHERV_SIG, ompi_bruck) COLL_sep \
247 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich) COLL_sep \
248 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_rdb) COLL_sep \
249 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mpich_ring) COLL_sep \
250 COLL_APPLY(action, COLL_ALLGATHERV_SIG, mvapich2) COLL_sep \
251 COLL_APPLY(action, COLL_ALLGATHERV_SIG, impi) COLL_sep \
252 COLL_APPLY(action, COLL_ALLGATHERV_SIG, automatic)
253
254 int allgatherv__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
255 int allgatherv__GB(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
256 int allgatherv__pair(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
257 int allgatherv__ring(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
258 int allgatherv__ompi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
259 int allgatherv__ompi_neighborexchange(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
260 int allgatherv__ompi_bruck (const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
261 int allgatherv__mpich(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
262 int allgatherv__mpich_rdb(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
263 int allgatherv__mpich_ring(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
264 int allgatherv__mvapich2(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
265 int allgatherv__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
266 int allgatherv__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, const int *recv_count, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
267
268 /*************
269  * ALLREDUCE *
270  *************/
271
272 #define COLL_ALLREDUCES(action, COLL_sep) \
273 COLL_APPLY(action, COLL_ALLREDUCE_SIG, default) COLL_sep \
274 COLL_APPLY(action, COLL_ALLREDUCE_SIG, lr) COLL_sep \
275 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab1) COLL_sep \
276 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab2) COLL_sep \
277 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab_rdb) COLL_sep \
278 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rdb) COLL_sep \
279 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial) COLL_sep \
280 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_binomial_pipeline) COLL_sep \
281 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rdb) COLL_sep \
282 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag) COLL_sep \
283 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_lr) COLL_sep \
284 COLL_APPLY(action, COLL_ALLREDUCE_SIG, smp_rsag_rab) COLL_sep \
285 COLL_APPLY(action, COLL_ALLREDUCE_SIG, redbcast) COLL_sep \
286 COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi) COLL_sep \
287 COLL_APPLY(action, COLL_ALLREDUCE_SIG, ompi_ring_segmented) COLL_sep \
288 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mpich) COLL_sep \
289 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2) COLL_sep \
290 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_rs) COLL_sep \
291 COLL_APPLY(action, COLL_ALLREDUCE_SIG, mvapich2_two_level) COLL_sep \
292 COLL_APPLY(action, COLL_ALLREDUCE_SIG, impi) COLL_sep \
293 COLL_APPLY(action, COLL_ALLREDUCE_SIG, rab) COLL_sep \
294 COLL_APPLY(action, COLL_ALLREDUCE_SIG, automatic)
295
296 int allreduce__default(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
297 int allreduce__lr(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
298 int allreduce__rab1(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
299 int allreduce__rab2(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
300 int allreduce__rab_rdb(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
301 int allreduce__rdb(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
302 int allreduce__smp_binomial(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
303 int allreduce__smp_binomial_pipeline(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
304 int allreduce__smp_rdb(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
305 int allreduce__smp_rsag(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
306 int allreduce__smp_rsag_lr(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
307 int allreduce__smp_rsag_rab(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
308 int allreduce__redbcast(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
309 int allreduce__ompi(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
310 int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
311 int allreduce__mpich(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
312 int allreduce__mvapich2(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
313 int allreduce__mvapich2_rs(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
314 int allreduce__mvapich2_two_level(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
315 int allreduce__impi(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
316 int allreduce__rab(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
317 int allreduce__automatic(const void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
318
319 /************
320  * ALLTOALL *
321  ************/
322
323 #define COLL_ALLTOALLS(action, COLL_sep) \
324 COLL_APPLY(action, COLL_ALLTOALL_SIG, default) COLL_sep \
325 COLL_APPLY(action, COLL_ALLTOALL_SIG, 2dmesh) COLL_sep \
326 COLL_APPLY(action, COLL_ALLTOALL_SIG, 3dmesh) COLL_sep \
327 COLL_APPLY(action, COLL_ALLTOALL_SIG, basic_linear) COLL_sep \
328 COLL_APPLY(action, COLL_ALLTOALL_SIG, bruck) COLL_sep \
329 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair) COLL_sep \
330 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_rma) COLL_sep \
331 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_light_barrier) COLL_sep \
332 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_mpi_barrier) COLL_sep \
333 COLL_APPLY(action, COLL_ALLTOALL_SIG, pair_one_barrier) COLL_sep \
334 COLL_APPLY(action, COLL_ALLTOALL_SIG, rdb) COLL_sep \
335 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring) COLL_sep \
336 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_light_barrier) COLL_sep \
337 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_mpi_barrier) COLL_sep \
338 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_one_barrier) COLL_sep \
339 COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2) COLL_sep \
340 COLL_APPLY(action, COLL_ALLTOALL_SIG, mvapich2_scatter_dest) COLL_sep \
341 COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi) COLL_sep \
342 COLL_APPLY(action, COLL_ALLTOALL_SIG, mpich) COLL_sep \
343 COLL_APPLY(action, COLL_ALLTOALL_SIG, impi) COLL_sep \
344 COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
345
346 int alltoall__default(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
347 int alltoall__2dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
348 int alltoall__3dmesh(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
349 int alltoall__basic_linear(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
350 int alltoall__bruck(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
351 int alltoall__pair(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
352 int alltoall__pair_rma(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
353 int alltoall__pair_light_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
354 int alltoall__pair_mpi_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
355 int alltoall__pair_one_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
356 int alltoall__rdb(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
357 int alltoall__ring(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
358 int alltoall__ring_light_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
359 int alltoall__ring_mpi_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
360 int alltoall__ring_one_barrier(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
361 int alltoall__mvapich2(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
362 int alltoall__mvapich2_scatter_dest(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
363 int alltoall__ompi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
364 int alltoall__mpich(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
365 int alltoall__impi(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
366 int alltoall__automatic(const void *send_buff, int send_count, MPI_Datatype send_type, void *recv_buff, int recv_count, MPI_Datatype recv_type, MPI_Comm comm);
367
368 /*************
369  * ALLTOALLV *
370  *************/
371
372 #define COLL_ALLTOALLVS(action, COLL_sep) \
373 COLL_APPLY(action, COLL_ALLTOALLV_SIG, default) COLL_sep \
374 COLL_APPLY(action, COLL_ALLTOALLV_SIG, bruck) COLL_sep \
375 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair) COLL_sep \
376 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_light_barrier) COLL_sep \
377 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_mpi_barrier) COLL_sep \
378 COLL_APPLY(action, COLL_ALLTOALLV_SIG, pair_one_barrier) COLL_sep \
379 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring) COLL_sep \
380 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_light_barrier) COLL_sep \
381 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_mpi_barrier) COLL_sep \
382 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ring_one_barrier) COLL_sep \
383 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi) COLL_sep \
384 COLL_APPLY(action, COLL_ALLTOALLV_SIG, mpich) COLL_sep \
385 COLL_APPLY(action, COLL_ALLTOALLV_SIG, ompi_basic_linear) COLL_sep \
386 COLL_APPLY(action, COLL_ALLTOALLV_SIG, mvapich2) COLL_sep \
387 COLL_APPLY(action, COLL_ALLTOALLV_SIG, impi) COLL_sep \
388 COLL_APPLY(action, COLL_ALLTOALLV_SIG, automatic)
389
390 int alltoallv__default(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
391 int alltoallv__bruck(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
392 int alltoallv__pair(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
393 int alltoallv__pair_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
394 int alltoallv__pair_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
395 int alltoallv__pair_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
396 int alltoallv__ring(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
397 int alltoallv__ring_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
398 int alltoallv__ring_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
399 int alltoallv__ring_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
400 int alltoallv__ompi(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
401 int alltoallv__mpich(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
402 int alltoallv__ompi_basic_linear(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
403 int alltoallv__mvapich2(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
404 int alltoallv__impi(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
405 int alltoallv__automatic(const void *send_buff, const int *send_counts, const int *send_disps, MPI_Datatype send_type, void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm);
406
407 /*********
408  * BCAST *
409  *********/
410
411 #define COLL_BCASTS(action, COLL_sep) \
412 COLL_APPLY(action, COLL_BCAST_SIG, default) COLL_sep \
413 COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware) COLL_sep \
414 COLL_APPLY(action, COLL_BCAST_SIG, arrival_pattern_aware_wait) COLL_sep \
415 COLL_APPLY(action, COLL_BCAST_SIG, arrival_scatter) COLL_sep \
416 COLL_APPLY(action, COLL_BCAST_SIG, binomial_tree) COLL_sep \
417 COLL_APPLY(action, COLL_BCAST_SIG, flattree) COLL_sep \
418 COLL_APPLY(action, COLL_BCAST_SIG, flattree_pipeline) COLL_sep \
419 COLL_APPLY(action, COLL_BCAST_SIG, NTSB) COLL_sep \
420 COLL_APPLY(action, COLL_BCAST_SIG, NTSL) COLL_sep \
421 COLL_APPLY(action, COLL_BCAST_SIG, NTSL_Isend) COLL_sep \
422 COLL_APPLY(action, COLL_BCAST_SIG, scatter_LR_allgather) COLL_sep \
423 COLL_APPLY(action, COLL_BCAST_SIG, scatter_rdb_allgather) COLL_sep \
424 COLL_APPLY(action, COLL_BCAST_SIG, SMP_binary) COLL_sep \
425 COLL_APPLY(action, COLL_BCAST_SIG, SMP_binomial) COLL_sep \
426 COLL_APPLY(action, COLL_BCAST_SIG, SMP_linear) COLL_sep \
427 COLL_APPLY(action, COLL_BCAST_SIG, ompi) COLL_sep \
428 COLL_APPLY(action, COLL_BCAST_SIG, ompi_split_bintree) COLL_sep \
429 COLL_APPLY(action, COLL_BCAST_SIG, ompi_pipeline) COLL_sep \
430 COLL_APPLY(action, COLL_BCAST_SIG, mpich) COLL_sep \
431 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2)   COLL_sep \
432 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_inter_node)   COLL_sep \
433 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_intra_node)   COLL_sep \
434 COLL_APPLY(action, COLL_BCAST_SIG, mvapich2_knomial_intra_node)   COLL_sep \
435 COLL_APPLY(action, COLL_BCAST_SIG, impi)   COLL_sep \
436 COLL_APPLY(action, COLL_BCAST_SIG, automatic)
437
438 int bcast__default(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
439 int bcast__arrival_pattern_aware(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
440 int bcast__arrival_pattern_aware_wait(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
441 int bcast__arrival_scatter(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
442 int bcast__binomial_tree(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
443 int bcast__flattree(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
444 int bcast__flattree_pipeline(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
445 int bcast__NTSB(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
446 int bcast__NTSL(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
447 int bcast__NTSL_Isend(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
448 int bcast__scatter_LR_allgather(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
449 int bcast__scatter_rdb_allgather(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
450 int bcast__SMP_binary(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
451 int bcast__SMP_binomial(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
452 int bcast__SMP_linear(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
453 int bcast__ompi(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
454 int bcast__ompi_split_bintree(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
455 int bcast__ompi_pipeline(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
456 int bcast__mpich(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
457 int bcast__mvapich2(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
458 int bcast__mvapich2_inter_node(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
459 int bcast__mvapich2_intra_node(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
460 int bcast__mvapich2_knomial_intra_node(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
461 int bcast__impi(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
462 int bcast__automatic(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
463
464 /**********
465  * REDUCE *
466  **********/
467
468 #define COLL_REDUCES(action, COLL_sep) \
469 COLL_APPLY(action, COLL_REDUCE_SIG, default) COLL_sep \
470 COLL_APPLY(action, COLL_REDUCE_SIG, arrival_pattern_aware) COLL_sep \
471 COLL_APPLY(action, COLL_REDUCE_SIG, binomial) COLL_sep \
472 COLL_APPLY(action, COLL_REDUCE_SIG, flat_tree) COLL_sep \
473 COLL_APPLY(action, COLL_REDUCE_SIG, NTSL) COLL_sep \
474 COLL_APPLY(action, COLL_REDUCE_SIG, scatter_gather) COLL_sep \
475 COLL_APPLY(action, COLL_REDUCE_SIG, ompi) COLL_sep \
476 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_chain) COLL_sep \
477 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_pipeline) COLL_sep \
478 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_basic_linear) COLL_sep \
479 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_in_order_binary) COLL_sep \
480 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binary) COLL_sep \
481 COLL_APPLY(action, COLL_REDUCE_SIG, ompi_binomial) COLL_sep \
482 COLL_APPLY(action, COLL_REDUCE_SIG, mpich) COLL_sep \
483 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2) COLL_sep \
484 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_knomial) COLL_sep \
485 COLL_APPLY(action, COLL_REDUCE_SIG, mvapich2_two_level) COLL_sep \
486 COLL_APPLY(action, COLL_REDUCE_SIG, impi) COLL_sep \
487 COLL_APPLY(action, COLL_REDUCE_SIG, rab) COLL_sep \
488 COLL_APPLY(action, COLL_REDUCE_SIG, automatic)
489
490 int reduce__default(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
491 int reduce__arrival_pattern_aware(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
492 int reduce__binomial(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
493 int reduce__flat_tree(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
494 int reduce__NTSL(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
495 int reduce__scatter_gather(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
496 int reduce__ompi(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
497 int reduce__ompi_chain(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
498 int reduce__ompi_pipeline(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
499 int reduce__ompi_basic_linear(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
500 int reduce__ompi_in_order_binary(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
501 int reduce__ompi_binary(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
502 int reduce__ompi_binomial(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
503 int reduce__mpich(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
504 int reduce__mvapich2(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
505 int reduce__mvapich2_knomial(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
506 int reduce__mvapich2_two_level(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
507 int reduce__impi(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
508 int reduce__rab(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
509 int reduce__automatic(const void *buf, void *rbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);
510
511 /*************
512  * REDUCE_SCATTER *
513  *************/
514
515 #define COLL_REDUCE_SCATTERS(action, COLL_sep) \
516 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, default) COLL_sep \
517 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi) COLL_sep \
518 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_basic_recursivehalving) COLL_sep \
519 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, ompi_ring)  COLL_sep \
520 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich) COLL_sep \
521 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_pair) COLL_sep \
522 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_rdb) COLL_sep \
523 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mpich_noncomm) COLL_sep \
524 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, mvapich2) COLL_sep \
525 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, impi) COLL_sep \
526 COLL_APPLY(action, COLL_REDUCE_SCATTER_SIG, automatic)
527
528 int reduce_scatter__default(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
529 int reduce_scatter__ompi(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
530 int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
531 int reduce_scatter__ompi_ring(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
532 int reduce_scatter__mpich(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
533 int reduce_scatter__mpich_pair(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
534 int reduce_scatter__mpich_rdb(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
535 int reduce_scatter__mpich_noncomm(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
536 int reduce_scatter__mvapich2(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
537 int reduce_scatter__impi(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
538 int reduce_scatter__automatic(const void *sbuf, void *rbuf, const int *rcounts, MPI_Datatype dtype,MPI_Op  op,MPI_Comm  comm);
539
540 /*************
541  * SCATTER *
542  *************/
543
544 #define COLL_SCATTERS(action, COLL_sep) \
545 COLL_APPLY(action, COLL_SCATTER_SIG, default) COLL_sep \
546 COLL_APPLY(action, COLL_SCATTER_SIG, ompi) COLL_sep \
547 COLL_APPLY(action, COLL_SCATTER_SIG, ompi_basic_linear) COLL_sep \
548 COLL_APPLY(action, COLL_SCATTER_SIG, ompi_binomial)  COLL_sep \
549 COLL_APPLY(action, COLL_SCATTER_SIG, mpich)   COLL_sep \
550 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2)   COLL_sep \
551 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_binomial)   COLL_sep \
552 COLL_APPLY(action, COLL_SCATTER_SIG, mvapich2_two_level_direct)   COLL_sep \
553 COLL_APPLY(action, COLL_SCATTER_SIG, impi)   COLL_sep \
554 COLL_APPLY(action, COLL_SCATTER_SIG, automatic)
555
556 int scatter__default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
557 int scatter__ompi(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
558 int scatter__ompi_basic_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
559 int scatter__ompi_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
560 int scatter__mpich(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
561 int scatter__mvapich2(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
562 int scatter__mvapich2_two_level_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
563 int scatter__mvapich2_two_level_direct(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
564 int scatter__impi (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
565 int scatter__automatic (const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
566
567 /*************
568  * BARRIER *
569  *************/
570
571 #define COLL_BARRIERS(action, COLL_sep) \
572 COLL_APPLY(action, COLL_BARRIER_SIG, default) COLL_sep \
573 COLL_APPLY(action, COLL_BARRIER_SIG, ompi) COLL_sep \
574 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_basic_linear) COLL_sep \
575 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_two_procs)  COLL_sep \
576 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_tree)  COLL_sep \
577 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_bruck)  COLL_sep \
578 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_recursivedoubling) COLL_sep \
579 COLL_APPLY(action, COLL_BARRIER_SIG, ompi_doublering) COLL_sep \
580 COLL_APPLY(action, COLL_BARRIER_SIG, mpich_smp)   COLL_sep \
581 COLL_APPLY(action, COLL_BARRIER_SIG, mpich)   COLL_sep \
582 COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2_pair)   COLL_sep \
583 COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2)   COLL_sep \
584 COLL_APPLY(action, COLL_BARRIER_SIG, impi)   COLL_sep \
585 COLL_APPLY(action, COLL_BARRIER_SIG, automatic)
586
587 int barrier__default(MPI_Comm comm);
588 int barrier__ompi(MPI_Comm comm);
589 int barrier__ompi_basic_linear(MPI_Comm comm);
590 int barrier__ompi_two_procs(MPI_Comm comm);
591 int barrier__ompi_tree(MPI_Comm comm);
592 int barrier__ompi_bruck(MPI_Comm comm);
593 int barrier__ompi_recursivedoubling(MPI_Comm comm);
594 int barrier__ompi_doublering(MPI_Comm comm);
595 int barrier__mpich_smp(MPI_Comm comm);
596 int barrier__mpich(MPI_Comm comm);
597 int barrier__mvapich2_pair(MPI_Comm comm);
598 int barrier__mvapich2 (MPI_Comm comm);
599 int barrier__impi(MPI_Comm comm);
600 int barrier__automatic(MPI_Comm comm);
601
602 }
603 }
604 #endif