Skip to content

Commit 231e320

Browse files
committed
portals4: Upgrade the coll-portals4 component to be Big Count compliant
Signed-off-by: Todd Kordenbrock <[email protected]>
1 parent 20b900e commit 231e320

File tree

5 files changed

+37
-17
lines changed

5 files changed

+37
-17
lines changed

ompi/mca/coll/portals4/coll_portals4.h

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,31 @@ struct mca_coll_portals4_module_t {
9595
opal_atomic_size_t coll_count;
9696

9797
/* record handlers dedicated to fallback if offloaded operations are not supported */
98+
mca_coll_base_module_barrier_fn_t previous_barrier;
99+
mca_coll_base_module_t *previous_barrier_module;
100+
mca_coll_base_module_ibarrier_fn_t previous_ibarrier;
101+
mca_coll_base_module_t *previous_ibarrier_module;
102+
103+
mca_coll_base_module_bcast_fn_t previous_bcast;
104+
mca_coll_base_module_t *previous_bcast_module;
105+
mca_coll_base_module_ibcast_fn_t previous_ibcast;
106+
mca_coll_base_module_t *previous_ibcast_module;
107+
108+
mca_coll_base_module_gather_fn_t previous_gather;
109+
mca_coll_base_module_t *previous_gather_module;
110+
mca_coll_base_module_igather_fn_t previous_igather;
111+
mca_coll_base_module_t *previous_igather_module;
112+
98113
mca_coll_base_module_reduce_fn_t previous_reduce;
99114
mca_coll_base_module_t *previous_reduce_module;
100115
mca_coll_base_module_ireduce_fn_t previous_ireduce;
101116
mca_coll_base_module_t *previous_ireduce_module;
102117

118+
mca_coll_base_module_scatter_fn_t previous_scatter;
119+
mca_coll_base_module_t *previous_scatter_module;
120+
mca_coll_base_module_iscatter_fn_t previous_iscatter;
121+
mca_coll_base_module_t *previous_iscatter_module;
122+
103123
mca_coll_base_module_allreduce_fn_t previous_allreduce;
104124
mca_coll_base_module_t *previous_allreduce_module;
105125
mca_coll_base_module_iallreduce_fn_t previous_iallreduce;
@@ -187,34 +207,34 @@ int ompi_coll_portals4_ibarrier_intra(struct ompi_communicator_t *comm,
187207
mca_coll_base_module_t *module);
188208
int ompi_coll_portals4_ibarrier_intra_fini(struct ompi_coll_portals4_request_t *request);
189209

190-
int ompi_coll_portals4_bcast_intra(void *buff, int count,
210+
int ompi_coll_portals4_bcast_intra(void *buff, size_t count,
191211
struct ompi_datatype_t *datatype, int root,
192212
struct ompi_communicator_t *comm,mca_coll_base_module_t *module);
193-
int ompi_coll_portals4_ibcast_intra(void *buff, int count,
213+
int ompi_coll_portals4_ibcast_intra(void *buff, size_t count,
194214
struct ompi_datatype_t *datatype, int root,
195215
struct ompi_communicator_t *comm,
196216
ompi_request_t **request,
197217
mca_coll_base_module_t *module);
198218
int ompi_coll_portals4_ibcast_intra_fini(struct ompi_coll_portals4_request_t *request);
199219

200-
int ompi_coll_portals4_reduce_intra(const void *sbuf, void *rbuf, int count,
220+
int ompi_coll_portals4_reduce_intra(const void *sbuf, void *rbuf, size_t count,
201221
MPI_Datatype dtype, MPI_Op op,
202222
int root,
203223
struct ompi_communicator_t *comm,
204224
mca_coll_base_module_t *module);
205-
int ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, int count,
225+
int ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, size_t count,
206226
MPI_Datatype dype, MPI_Op op,
207227
int root,
208228
struct ompi_communicator_t *comm,
209229
ompi_request_t ** ompi_request,
210230
mca_coll_base_module_t *module);
211231
int ompi_coll_portals4_ireduce_intra_fini(struct ompi_coll_portals4_request_t *request);
212232

213-
int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, int count,
233+
int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, size_t count,
214234
MPI_Datatype dtype, MPI_Op op,
215235
struct ompi_communicator_t *comm,
216236
mca_coll_base_module_t *module);
217-
int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, int count,
237+
int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, size_t count,
218238
MPI_Datatype dtype, MPI_Op op,
219239
struct ompi_communicator_t *comm,
220240
ompi_request_t ** ompi_request,

ompi/mca/coll/portals4/coll_portals4_allreduce.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define COLL_PORTALS4_ALLREDUCE_MAX_CHILDREN 2
3333

3434
static int
35-
allreduce_kary_tree_top(const void *sendbuf, void *recvbuf, int count,
35+
allreduce_kary_tree_top(const void *sendbuf, void *recvbuf, size_t count,
3636
MPI_Datatype dtype, MPI_Op op,
3737
struct ompi_communicator_t *comm,
3838
ompi_coll_portals4_request_t *request,
@@ -380,7 +380,7 @@ allreduce_kary_tree_bottom(ompi_coll_portals4_request_t *request)
380380
return (OMPI_SUCCESS);
381381
}
382382

383-
int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, int count,
383+
int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, size_t count,
384384
MPI_Datatype dtype, MPI_Op op,
385385
struct ompi_communicator_t *comm,
386386
mca_coll_base_module_t *module)
@@ -409,7 +409,7 @@ int ompi_coll_portals4_allreduce_intra(const void* sendbuf, void* recvbuf, int c
409409
}
410410

411411

412-
int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, int count,
412+
int ompi_coll_portals4_iallreduce_intra(const void* sendbuf, void* recvbuf, size_t count,
413413
MPI_Datatype dtype, MPI_Op op,
414414
struct ompi_communicator_t *comm,
415415
ompi_request_t ** ompi_request,

ompi/mca/coll/portals4/coll_portals4_bcast.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ bcast_pipeline_bottom(ompi_coll_portals4_request_t *request)
834834

835835

836836
int
837-
ompi_coll_portals4_bcast_intra(void *buff, int count,
837+
ompi_coll_portals4_bcast_intra(void *buff, size_t count,
838838
struct ompi_datatype_t *datatype, int root,
839839
struct ompi_communicator_t *comm,
840840
mca_coll_base_module_t *module)
@@ -878,7 +878,7 @@ ompi_coll_portals4_bcast_intra(void *buff, int count,
878878

879879

880880
int
881-
ompi_coll_portals4_ibcast_intra(void *buff, int count,
881+
ompi_coll_portals4_ibcast_intra(void *buff, size_t count,
882882
struct ompi_datatype_t *datatype, int root,
883883
struct ompi_communicator_t *comm,
884884
ompi_request_t **ompi_request,

ompi/mca/coll/portals4/coll_portals4_component.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ptl_datatype_t ompi_coll_portals4_atomic_datatype [OMPI_DATATYPE_MPI_MAX_PREDEFI
135135
{ \
136136
opal_output_verbose(1, ompi_coll_base_framework.framework_output, \
137137
"(%d/%s): no underlying " #__api "; disqualifying myself", \
138-
__comm->c_contextid, __comm->c_name); \
138+
ompi_comm_get_local_cid(__comm), __comm->c_name); \
139139
__module->previous_##__api = NULL; \
140140
__module->previous_##__api##_module = NULL; \
141141
} \
@@ -144,7 +144,7 @@ ptl_datatype_t ompi_coll_portals4_atomic_datatype [OMPI_DATATYPE_MPI_MAX_PREDEFI
144144
/* save the current selected collective */ \
145145
MCA_COLL_SAVE_API(__comm, __api, __module->previous_##__api, __module->previous_##__api##_module, "portals"); \
146146
/* install our own */ \
147-
MCA_COLL_INSTALL_API(__comm, __api, __module->super.coll##__api, &__module->super, "portals"); \
147+
MCA_COLL_INSTALL_API(__comm, __api, __module->super.coll_##__api, &__module->super, "portals"); \
148148
} \
149149
} while (0)
150150

@@ -187,7 +187,7 @@ mca_coll_portals4_component_t mca_coll_portals4_component = {
187187
* about the component itself */
188188

189189
.collm_version = {
190-
MCA_COLL_BASE_VERSION_2_4_0,
190+
MCA_COLL_BASE_VERSION_3_0_0,
191191

192192
/* Component name and version */
193193
.mca_component_name = "portals4",

ompi/mca/coll/portals4/coll_portals4_reduce.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
static int
35-
reduce_kary_tree_top(const void *sendbuf, void *recvbuf, int count,
35+
reduce_kary_tree_top(const void *sendbuf, void *recvbuf, size_t count,
3636
MPI_Datatype dtype, MPI_Op op,
3737
int root,
3838
struct ompi_communicator_t *comm,
@@ -377,7 +377,7 @@ reduce_kary_tree_bottom(ompi_coll_portals4_request_t *request)
377377

378378

379379
int
380-
ompi_coll_portals4_reduce_intra(const void *sendbuf, void *recvbuf, int count,
380+
ompi_coll_portals4_reduce_intra(const void *sendbuf, void *recvbuf, size_t count,
381381
MPI_Datatype dtype, MPI_Op op,
382382
int root,
383383
struct ompi_communicator_t *comm,
@@ -412,7 +412,7 @@ ompi_coll_portals4_reduce_intra(const void *sendbuf, void *recvbuf, int count,
412412

413413

414414
int
415-
ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, int count,
415+
ompi_coll_portals4_ireduce_intra(const void* sendbuf, void* recvbuf, size_t count,
416416
MPI_Datatype dtype, MPI_Op op,
417417
int root,
418418
struct ompi_communicator_t *comm,

0 commit comments

Comments
 (0)