Skip to content

Commit eddd356

Browse files
authored
Merge pull request #12768 from wenduwan/fix_han_large_count
coll/han: post large-count code cleanup and bugfix
2 parents f2efd55 + f877e51 commit eddd356

File tree

5 files changed

+5
-91
lines changed

5 files changed

+5
-91
lines changed

ompi/mca/coll/han/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ coll_han_algorithms.c \
3535
coll_han_dynamic.c \
3636
coll_han_dynamic_file.c \
3737
coll_han_topo.c \
38-
coll_han_subcomms.c \
39-
coll_han_utils.c
38+
coll_han_subcomms.c
4039

4140
# Make the output library in this directory, and name it either
4241
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la

ompi/mca/coll/han/coll_han.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -561,13 +561,6 @@ ompi_coll_han_reorder_gather(const void *sbuf,
561561
struct ompi_communicator_t *comm,
562562
int * topo);
563563

564-
size_t
565-
coll_han_utils_gcd(const uint64_t *numerators, const size_t size);
566-
567-
int
568-
coll_han_utils_create_contiguous_datatype(size_t count, const ompi_datatype_t *oldType,
569-
ompi_datatype_t **newType);
570-
571564
static inline struct mca_smsc_endpoint_t *mca_coll_han_get_smsc_endpoint (struct ompi_proc_t *proc) {
572565
extern opal_mutex_t mca_coll_han_lock;
573566
if (NULL == proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_SMSC]) {

ompi/mca/coll/han/coll_han_gatherv.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ int mca_coll_han_gatherv_intra(const void *sbuf, size_t scount, struct ompi_data
129129
int need_bounce_buf = 0;
130130
size_t total_up_rcounts = 0;
131131
ptrdiff_t *up_displs = NULL;
132-
size_t *up_rcounts = NULL, *up_peer_lb = NULL, *up_peer_ub = NULL;
132+
size_t *up_rcounts = NULL, *up_peer_ub = NULL;
133133
ompi_count_array_t up_rcounts_desc;
134134
ompi_disp_array_t up_displs_desc;
135135
char *bounce_buf = NULL;
@@ -170,7 +170,7 @@ int mca_coll_han_gatherv_intra(const void *sbuf, size_t scount, struct ompi_data
170170
}
171171

172172
for (up_peer = 0; up_peer < up_size; ++up_peer) {
173-
up_displs[up_peer] = INT_MAX;
173+
up_displs[up_peer] = PTRDIFF_MAX;
174174
}
175175

176176
/* Calculate recv counts for the inter-node gatherv - no need to gather
@@ -273,9 +273,6 @@ int mca_coll_han_gatherv_intra(const void *sbuf, size_t scount, struct ompi_data
273273
if (up_rcounts) {
274274
free(up_rcounts);
275275
}
276-
if (up_peer_lb) {
277-
free(up_peer_lb);
278-
}
279276
if (up_peer_ub) {
280277
free(up_peer_ub);
281278
}

ompi/mca/coll/han/coll_han_scatterv.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ int mca_coll_han_scatterv_intra(const void *sbuf, ompi_count_array_t scounts, om
143143
int need_bounce_buf = 0;
144144
size_t total_up_scounts = 0;
145145
ptrdiff_t *up_displs = NULL;
146-
size_t *up_scounts = NULL, *up_peer_lb = NULL, *up_peer_ub = NULL;
146+
size_t *up_scounts = NULL, *up_peer_ub = NULL;
147147
ompi_count_array_t up_scounts_desc;
148148
ompi_disp_array_t up_displs_desc;
149149
char *reorder_sbuf = (char *) sbuf, *bounce_buf = NULL;
@@ -174,7 +174,7 @@ int mca_coll_han_scatterv_intra(const void *sbuf, ompi_count_array_t scounts, om
174174
}
175175

176176
for (up_peer = 0; up_peer < up_size; ++up_peer) {
177-
up_displs[up_peer] = SIZE_MAX;
177+
up_displs[up_peer] = PTRDIFF_MAX;
178178
}
179179

180180
/* Calculate send counts for the inter-node scatterv */
@@ -290,9 +290,6 @@ int mca_coll_han_scatterv_intra(const void *sbuf, ompi_count_array_t scounts, om
290290
if (up_scounts) {
291291
free(up_scounts);
292292
}
293-
if (up_peer_lb) {
294-
free(up_peer_lb);
295-
}
296293
if (up_peer_ub) {
297294
free(up_peer_ub);
298295
}

ompi/mca/coll/han/coll_han_utils.c

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)