Skip to content

Commit f6f525e

Browse files
committed
coll-portals4: remove unneeded code from gather
This commit removes two pieces of unneeded code from gather. First it removes destroy_tree() calls from linear_top(), because the linear algorithm does not create a tree, so there is no need to destroy it. Second it removes unpack_bytes from the gather request because it was calculated but never used.
1 parent 80f0251 commit f6f525e

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

ompi/mca/coll/portals4/coll_portals4_gather.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ setup_gather_buffers_binomial(struct ompi_communicator_t *comm,
177177
/* Setup Gather Buffers */
178178
/**********************************/
179179
if (vrank == 0) {
180-
request->u.gather.unpack_bytes=
181-
request->u.gather.unpack_dst_true_extent +
182-
((ptrdiff_t)request->u.gather.unpack_dst_count * (ptrdiff_t)request->u.gather.size - 1) * request->u.gather.unpack_dst_extent;
183-
184180
request->u.gather.gather_bytes=request->u.gather.packed_size * (ptrdiff_t)request->u.gather.size;
185181

186182
/*
@@ -282,10 +278,6 @@ setup_gather_buffers_linear(struct ompi_communicator_t *comm,
282278
/* Setup Gather Buffers */
283279
/**********************************/
284280
if (i_am_root) {
285-
request->u.gather.unpack_bytes=
286-
request->u.gather.unpack_dst_true_extent +
287-
((ptrdiff_t)request->u.gather.unpack_dst_count * (ptrdiff_t)request->u.gather.size - 1) * request->u.gather.unpack_dst_extent;
288-
289281
request->u.gather.gather_bytes=request->u.gather.packed_size * (ptrdiff_t)request->u.gather.size;
290282

291283
/*
@@ -1005,8 +997,6 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
1005997
"completed CTWait(expected_ops=%d)\n", expected_ops);
1006998
}
1007999

1008-
ompi_coll_portals4_destroy_tree(&(portals4_module->cached_in_order_bmtree));
1009-
10101000
OPAL_OUTPUT((ompi_coll_base_framework.framework_output,
10111001
"coll:portals4:gather_intra_linear_top exit rank %d", request->u.gather.my_rank));
10121002

@@ -1016,8 +1006,6 @@ ompi_coll_portals4_gather_intra_linear_top(const void *sbuf, int scount, struct
10161006
if (NULL != request->u.gather.gather_buf)
10171007
free(request->u.gather.gather_buf);
10181008

1019-
ompi_coll_portals4_destroy_tree(&(portals4_module->cached_in_order_bmtree));
1020-
10211009
opal_output(ompi_coll_base_framework.framework_output,
10221010
"%s:%4d:%4d\tError occurred ret=%d, rank %2d",
10231011
__FILE__, __LINE__, line, ret, request->u.gather.my_rank);

ompi/mca/coll/portals4/coll_portals4_request.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ struct ompi_coll_portals4_request_t {
114114
MPI_Aint pack_src_lb;
115115
MPI_Aint pack_src_true_lb;
116116
MPI_Aint pack_src_offset;
117-
uint64_t unpack_bytes;
118117
char *unpack_dst_buf;
119118
int unpack_dst_count;
120119
struct ompi_datatype_t *unpack_dst_dtype;

0 commit comments

Comments
 (0)