Commit c292eca9 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Correct usage of req's segment_first and segment_size in Nemesis

Originally the implementation of sendNoncontig() in Nemesis
assume that req->dev.segment_first is 0 and req->dev.segment_size
is the size of data, which potentially asssumes that the data passed
from upper layer must be the entire data, prohibiting the possibility
of streaming that data in the upper layer. The general way to use them
should be that req->dev.segment_first specifies the current starting
location and req->dev.segment_size specifies the current ending location.

We fixed this issue in commit 5132e070

, but
there are some places missed in that fixing. Here we fixed those places.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 19bdecfa
......@@ -22,6 +22,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
{
int mpi_errno = MPI_SUCCESS;
int again = 0;
int orig_segment_first = sreq->dev.segment_first;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
......@@ -58,7 +59,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
/* we didn't finish sending everything */
sreq->ch.noncontig = TRUE;
sreq->ch.vc = vc;
if (sreq->dev.segment_first == 0) /* nothing was sent, save header */
if (sreq->dev.segment_first == orig_segment_first) /* nothing was sent, save header */
{
sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header;
sreq->ch.header_sz = hdr_sz;
......
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