Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit a544975

Browse files
Joshua Laddjladd-mlnx
authored andcommitted
Adding entry points for Allgatherv, iAllgatherv, Reduce, and iReduce.
Signed-off-by: Joshua Ladd <[email protected]> Conflicts: ompi/mca/coll/hcoll/coll_hcoll.h ompi/mca/coll/hcoll/coll_hcoll_ops.c
1 parent 44bcd87 commit a544975

File tree

3 files changed

+272
-8
lines changed

3 files changed

+272
-8
lines changed

ompi/mca/coll/hcoll/coll_hcoll.h

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,12 @@ struct mca_coll_hcoll_module_t {
137137
mca_coll_base_module_t *previous_ibarrier_module;
138138
mca_coll_base_module_iallgather_fn_t previous_iallgather;
139139
mca_coll_base_module_t *previous_iallgather_module;
140+
mca_coll_base_module_iallgatherv_fn_t previous_iallgatherv;
141+
mca_coll_base_module_t *previous_iallgatherv_module;
140142
mca_coll_base_module_iallreduce_fn_t previous_iallreduce;
141143
mca_coll_base_module_t *previous_iallreduce_module;
144+
mca_coll_base_module_ireduce_fn_t previous_ireduce;
145+
mca_coll_base_module_t *previous_ireduce_module;
142146
mca_coll_base_module_igatherv_fn_t previous_igatherv;
143147
mca_coll_base_module_t *previous_igatherv_module;
144148
mca_coll_base_module_ialltoall_fn_t previous_ialltoall;
@@ -175,7 +179,15 @@ int mca_coll_hcoll_allgather(void *sbuf, int scount,
175179
struct ompi_communicator_t *comm,
176180
mca_coll_base_module_t *module);
177181

178-
int mca_coll_hcoll_gather(void *sbuf, int scount,
182+
int mca_coll_hcoll_allgatherv(const void *sbuf, int scount,
183+
struct ompi_datatype_t *sdtype,
184+
void *rbuf, const int *rcount,
185+
const int *displs,
186+
struct ompi_datatype_t *rdtype,
187+
struct ompi_communicator_t *comm,
188+
mca_coll_base_module_t *module);
189+
190+
int mca_coll_hcoll_gather(const void *sbuf, int scount,
179191
struct ompi_datatype_t *sdtype,
180192
void *rbuf, int rcount,
181193
struct ompi_datatype_t *rdtype,
@@ -189,7 +201,14 @@ int mca_coll_hcoll_allreduce(void *sbuf, void *rbuf, int count,
189201
struct ompi_communicator_t *comm,
190202
mca_coll_base_module_t *module);
191203

192-
int mca_coll_hcoll_alltoall(void *sbuf, int scount,
204+
int mca_coll_hcoll_reduce(const void *sbuf, void *rbuf, int count,
205+
struct ompi_datatype_t *dtype,
206+
struct ompi_op_t *op,
207+
int root,
208+
struct ompi_communicator_t *comm,
209+
mca_coll_base_module_t *module);
210+
211+
int mca_coll_hcoll_alltoall(const void *sbuf, int scount,
193212
struct ompi_datatype_t *sdtype,
194213
void* rbuf, int rcount,
195214
struct ompi_datatype_t *rdtype,
@@ -231,14 +250,31 @@ int mca_coll_hcoll_iallgather(void *sbuf, int scount,
231250
ompi_request_t** request,
232251
mca_coll_base_module_t *module);
233252

234-
int mca_coll_hcoll_iallreduce(void *sbuf, void *rbuf, int count,
253+
int mca_coll_hcoll_iallgatherv(const void *sbuf, int scount,
254+
struct ompi_datatype_t *sdtype,
255+
void *rbuf, const int *rcount,
256+
const int *displs,
257+
struct ompi_datatype_t *rdtype,
258+
struct ompi_communicator_t *comm,
259+
ompi_request_t** request,
260+
mca_coll_base_module_t *module);
261+
262+
int mca_coll_hcoll_iallreduce(const void *sbuf, void *rbuf, int count,
263+
struct ompi_datatype_t *dtype,
264+
struct ompi_op_t *op,
265+
struct ompi_communicator_t *comm,
266+
ompi_request_t** request,
267+
mca_coll_base_module_t *module);
268+
269+
int mca_coll_hcoll_ireduce(const void *sbuf, void *rbuf, int count,
235270
struct ompi_datatype_t *dtype,
236271
struct ompi_op_t *op,
272+
int root,
237273
struct ompi_communicator_t *comm,
238274
ompi_request_t** request,
239275
mca_coll_base_module_t *module);
240276

241-
int mca_coll_hcoll_ialltoall(void *sbuf, int scount,
277+
int mca_coll_hcoll_ialltoall(const void *sbuf, int scount,
242278
struct ompi_datatype_t *sdtype,
243279
void* rbuf, int rcount,
244280
struct ompi_datatype_t *rdtype,

ompi/mca/coll/hcoll/coll_hcoll_module.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ static void mca_coll_hcoll_module_clear(mca_coll_hcoll_module_t *hcoll_module)
4141
hcoll_module->previous_alltoall = NULL;
4242
hcoll_module->previous_alltoallv = NULL;
4343
hcoll_module->previous_alltoallw = NULL;
44+
hcoll_module->previous_reduce = NULL;
4445
hcoll_module->previous_reduce_scatter = NULL;
4546
hcoll_module->previous_ibarrier = NULL;
4647
hcoll_module->previous_ibcast = NULL;
4748
hcoll_module->previous_iallreduce = NULL;
4849
hcoll_module->previous_iallgather = NULL;
50+
hcoll_module->previous_iallgatherv = NULL;
4951
hcoll_module->previous_igatherv = NULL;
52+
hcoll_module->previous_ireduce = NULL;
5053
}
5154

5255
static void mca_coll_hcoll_module_construct(mca_coll_hcoll_module_t *hcoll_module)
@@ -80,17 +83,21 @@ static void mca_coll_hcoll_module_destruct(mca_coll_hcoll_module_t *hcoll_module
8083
OBJ_RELEASE(hcoll_module->previous_bcast_module);
8184
OBJ_RELEASE(hcoll_module->previous_allreduce_module);
8285
OBJ_RELEASE(hcoll_module->previous_allgather_module);
86+
OBJ_RELEASE(hcoll_module->previous_allgatherv_module);
8387
OBJ_RELEASE(hcoll_module->previous_gatherv_module);
8488
OBJ_RELEASE(hcoll_module->previous_alltoall_module);
8589
OBJ_RELEASE(hcoll_module->previous_alltoallv_module);
90+
OBJ_RELEASE(hcoll_module->previous_reduce_module);
8691

8792
OBJ_RELEASE(hcoll_module->previous_ibarrier_module);
8893
OBJ_RELEASE(hcoll_module->previous_ibcast_module);
8994
OBJ_RELEASE(hcoll_module->previous_iallreduce_module);
9095
OBJ_RELEASE(hcoll_module->previous_iallgather_module);
96+
OBJ_RELEASE(hcoll_module->previous_iallgatherv_module);
9197
OBJ_RELEASE(hcoll_module->previous_igatherv_module);
9298
OBJ_RELEASE(hcoll_module->previous_ialltoall_module);
9399
OBJ_RELEASE(hcoll_module->previous_ialltoallv_module);
100+
OBJ_RELEASE(hcoll_module->previous_ireduce_module);
94101

95102
/*
96103
OBJ_RELEASE(hcoll_module->previous_allgatherv_module);
@@ -127,15 +134,19 @@ static int mca_coll_hcoll_save_coll_handlers(mca_coll_hcoll_module_t *hcoll_modu
127134
HCOL_SAVE_PREV_COLL_API(barrier);
128135
HCOL_SAVE_PREV_COLL_API(bcast);
129136
HCOL_SAVE_PREV_COLL_API(allreduce);
137+
HCOL_SAVE_PREV_COLL_API(reduce);
130138
HCOL_SAVE_PREV_COLL_API(allgather);
139+
HCOL_SAVE_PREV_COLL_API(allgatherv);
131140
HCOL_SAVE_PREV_COLL_API(gatherv);
132141
HCOL_SAVE_PREV_COLL_API(alltoall);
133142
HCOL_SAVE_PREV_COLL_API(alltoallv);
134143

135144
HCOL_SAVE_PREV_COLL_API(ibarrier);
136145
HCOL_SAVE_PREV_COLL_API(ibcast);
137146
HCOL_SAVE_PREV_COLL_API(iallreduce);
147+
HCOL_SAVE_PREV_COLL_API(ireduce);
138148
HCOL_SAVE_PREV_COLL_API(iallgather);
149+
HCOL_SAVE_PREV_COLL_API(iallgatherv);
139150
HCOL_SAVE_PREV_COLL_API(igatherv);
140151
HCOL_SAVE_PREV_COLL_API(ialltoall);
141152
HCOL_SAVE_PREV_COLL_API(ialltoallv);
@@ -312,14 +323,26 @@ mca_coll_hcoll_comm_query(struct ompi_communicator_t *comm, int *priority)
312323
hcoll_module->super.coll_barrier = hcoll_collectives.coll_barrier ? mca_coll_hcoll_barrier : NULL;
313324
hcoll_module->super.coll_bcast = hcoll_collectives.coll_bcast ? mca_coll_hcoll_bcast : NULL;
314325
hcoll_module->super.coll_allgather = hcoll_collectives.coll_allgather ? mca_coll_hcoll_allgather : NULL;
326+
hcoll_module->super.coll_allgatherv = hcoll_collectives.coll_allgatherv ? mca_coll_hcoll_allgatherv : NULL;
315327
hcoll_module->super.coll_allreduce = hcoll_collectives.coll_allreduce ? mca_coll_hcoll_allreduce : NULL;
316328
hcoll_module->super.coll_alltoall = hcoll_collectives.coll_alltoall ? mca_coll_hcoll_alltoall : NULL;
317329
hcoll_module->super.coll_alltoallv = hcoll_collectives.coll_alltoallv ? mca_coll_hcoll_alltoallv : NULL;
318330
hcoll_module->super.coll_gatherv = hcoll_collectives.coll_gatherv ? mca_coll_hcoll_gatherv : NULL;
331+
hcoll_module->super.coll_reduce = hcoll_collectives.coll_reduce ? mca_coll_hcoll_reduce : NULL;
319332
hcoll_module->super.coll_ibarrier = hcoll_collectives.coll_ibarrier ? mca_coll_hcoll_ibarrier : NULL;
320333
hcoll_module->super.coll_ibcast = hcoll_collectives.coll_ibcast ? mca_coll_hcoll_ibcast : NULL;
321334
hcoll_module->super.coll_iallgather = hcoll_collectives.coll_iallgather ? mca_coll_hcoll_iallgather : NULL;
335+
#if HCOLL_API >= HCOLL_VERSION(3,5)
336+
hcoll_module->super.coll_iallgatherv = hcoll_collectives.coll_iallgatherv ? mca_coll_hcoll_iallgatherv : NULL;
337+
#else
338+
hcoll_module->super.coll_iallgatherv = NULL;
339+
#endif
322340
hcoll_module->super.coll_iallreduce = hcoll_collectives.coll_iallreduce ? mca_coll_hcoll_iallreduce : NULL;
341+
#if HCOLL_API >= HCOLL_VERSION(3,5)
342+
hcoll_module->super.coll_ireduce = hcoll_collectives.coll_ireduce ? mca_coll_hcoll_ireduce : NULL;
343+
#else
344+
hcoll_module->super.coll_ireduce = NULL;
345+
#endif
323346
hcoll_module->super.coll_gather = /*hcoll_collectives.coll_gather ? mca_coll_hcoll_gather :*/ NULL;
324347
hcoll_module->super.coll_igatherv = hcoll_collectives.coll_igatherv ? mca_coll_hcoll_igatherv : NULL;
325348
hcoll_module->super.coll_ialltoall = /*hcoll_collectives.coll_ialltoall ? mca_coll_hcoll_ialltoall : */ NULL;

0 commit comments

Comments
 (0)