Commit b32b36c4 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji

Bug-fix: store stream_offset in response request of GACC message.

We need to store stream_offset in the response request so that
we can use it when response data is back. Here we allocate an
extended packet header which only contains stream_offset to
achieve this purpose.
Signed-off-by: default avatarMin Si <msi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent a69d9f4a
...@@ -786,6 +786,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr, ...@@ -786,6 +786,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
resp_req->dev.datatype = rma_op->result_datatype; resp_req->dev.datatype = rma_op->result_datatype;
resp_req->dev.target_win_handle = MPI_WIN_NULL; resp_req->dev.target_win_handle = MPI_WIN_NULL;
resp_req->dev.source_win_handle = win_ptr->handle; resp_req->dev.source_win_handle = win_ptr->handle;
resp_req->dev.flags = flags;
if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) { if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) {
MPID_Datatype *result_dtp = NULL; MPID_Datatype *result_dtp = NULL;
...@@ -805,6 +806,13 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr, ...@@ -805,6 +806,13 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
/* Set extended packet header if needed. */ /* Set extended packet header if needed. */
init_get_accum_ext_pkt(flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz); init_get_accum_ext_pkt(flags, target_dtp_ptr, stream_offset, &ext_hdr_ptr, &ext_hdr_sz);
/* Note: here we need to allocate an extended packet header in response request,
* in order to store the stream_offset locally and use it in PktHandler_Get_AccumResp.
* This extended packet header only contains stream_offset and does not contain any
* other information. */
init_get_accum_ext_pkt(flags, NULL /* target_dtp_ptr */ , stream_offset,
&(resp_req->dev.ext_hdr_ptr), &(resp_req->dev.ext_hdr_sz));
mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz, mpi_errno = issue_from_origin_buffer(rma_op, vc, ext_hdr_ptr, ext_hdr_sz,
stream_offset, stream_size, &curr_req); stream_offset, stream_size, &curr_req);
if (mpi_errno != MPI_SUCCESS) if (mpi_errno != MPI_SUCCESS)
......
...@@ -1668,9 +1668,12 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, ...@@ -1668,9 +1668,12 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
MPID_Datatype_get_extent_macro(basic_type, basic_type_extent); MPID_Datatype_get_extent_macro(basic_type, basic_type_extent);
MPID_Datatype_get_size_macro(basic_type, basic_type_size); MPID_Datatype_get_size_macro(basic_type, basic_type_size);
/* get stream_offset from extended header */ /* Note: here we get the stream_offset from the extended packet header
MPIDI_CH3_ExtPkt_Gaccum_get_stream(req->dev.flags, * in the response request, which is set in issue_get_acc_op() funcion.
(!MPIR_DATATYPE_IS_PREDEFINED(req->dev.datatype)), * Note that this extended packet header only contains stream_offset and
* does not contain datatype info, so here we pass 0 to is_derived_dt
* flag. */
MPIDI_CH3_ExtPkt_Gaccum_get_stream(req->dev.flags, 0 /* is_derived_dt */ ,
req->dev.ext_hdr_ptr, &contig_stream_offset); req->dev.ext_hdr_ptr, &contig_stream_offset);
total_len = type_size * req->dev.user_count; total_len = type_size * req->dev.user_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment