Skip to content

Commit 79b4a60

Browse files
committed
[to be squashed] remove weird packing case
1 parent 20219bd commit 79b4a60

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

src/mpid/ch4/netmod/ucx/ucx_am.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,14 @@ int MPIDI_UCX_do_am_recv(MPIR_Request * rreq)
8989
};
9090

9191
MPIDIG_get_recv_buffer(&recv_buf, &data_sz, &is_contig, &in_data_sz, rreq);
92-
if (in_data_sz > data_sz) {
93-
/* ucx will error out if buffer size is less than the promised data size,
94-
* use a pack buffer in this case */
95-
/* FIXME: what? how does UCX know the buffer size differs? */
96-
recv_buf = MPL_malloc(in_data_sz, MPL_MEM_OTHER);
97-
MPIR_Assert(recv_buf);
98-
MPIDI_UCX_AM_RECV_REQUEST(rreq, pack_buffer) = recv_buf;
99-
} else {
100-
MPIDI_UCX_AM_RECV_REQUEST(rreq, pack_buffer) = NULL;
101-
if (!is_contig) {
102-
MPIR_Datatype *dt_ptr;
103-
MPIR_Datatype_get_ptr(MPIDIG_REQUEST(rreq, datatype), dt_ptr);
104-
param.op_attr_mask |= UCP_OP_ATTR_FIELD_DATATYPE;
105-
param.datatype = dt_ptr->dev.netmod.ucx.ucp_datatype;
106-
MPIR_Datatype_ptr_add_ref(dt_ptr);
107-
}
92+
MPIDI_UCX_AM_RECV_REQUEST(rreq, pack_buffer) = NULL;
93+
if (!is_contig) {
94+
MPIR_Datatype *dt_ptr;
95+
MPIR_Datatype_get_ptr(MPIDIG_REQUEST(rreq, datatype), dt_ptr);
96+
param.op_attr_mask |= UCP_OP_ATTR_FIELD_DATATYPE;
97+
param.datatype = dt_ptr->dev.netmod.ucx.ucp_datatype;
98+
MPIR_Datatype_ptr_add_ref(dt_ptr);
99+
in_data_sz = MPIDIG_REQUEST(rreq, count);
108100
}
109101

110102
void *data_desc = MPIDI_UCX_AM_RECV_REQUEST(rreq, data_desc);

0 commit comments

Comments
 (0)