Skip to content

Commit b43145f

Browse files
committed
COLL HAN: fix minor errors in handling MPI_IN_PLACE
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent 356e089 commit b43145f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ompi/mca/coll/han/coll_han_gather.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mca_coll_han_gather_intra(const void *sbuf, int scount,
102102

103103
w_rank = ompi_comm_rank(comm);
104104
w_size = ompi_comm_size(comm);
105-
ompi_datatype_t *dtype = (w_rank == root) ? rdtype : sdtype;
105+
106106
/* Set up request */
107107
temp_request = OBJ_NEW(ompi_request_t);
108108
temp_request->req_state = OMPI_REQUEST_ACTIVE;
@@ -156,7 +156,7 @@ mca_coll_han_gather_intra(const void *sbuf, int scount,
156156
ptrdiff_t block_size = rextent * (ptrdiff_t)rcount;
157157
ptrdiff_t src_shift = block_size * w_rank;
158158
ptrdiff_t dest_shift = block_size * w_rank;
159-
ompi_datatype_copy_content_same_ddt(dtype,
159+
ompi_datatype_copy_content_same_ddt(rdtype,
160160
(ptrdiff_t)rcount,
161161
(char *)rbuf + dest_shift,
162162
reorder_rbuf + src_shift);
@@ -202,8 +202,8 @@ mca_coll_han_gather_intra(const void *sbuf, int scount,
202202
ptrdiff_t dest_shift = block_size * (ptrdiff_t)topo[i * 2 + 1];
203203
ompi_datatype_copy_content_same_ddt(rdtype,
204204
(ptrdiff_t)rcount,
205-
(char *)rbuf + dest_shift,
206-
reorder_rbuf + src_shift);
205+
reorder_rbuf + src_shift,
206+
(char *)rbuf + dest_shift);
207207
}
208208
free(reorder_buf);
209209
}
@@ -242,7 +242,7 @@ int mca_coll_han_gather_lg_task(void *task_args)
242242
tmp_buf = (char *) malloc(rsize);
243243
tmp_rbuf = tmp_buf - rgap;
244244
if (t->w_rank == t->root) {
245-
if (t->is_mapbycore && MPI_IN_PLACE == t->sbuf) {
245+
if (MPI_IN_PLACE == t->sbuf) {
246246
ptrdiff_t rextent;
247247
ompi_datatype_type_extent(dtype, &rextent);
248248
ptrdiff_t block_size = rextent * (ptrdiff_t)count;

0 commit comments

Comments
 (0)