Commit 125304f7 authored by Xin Zhao's avatar Xin Zhao
Browse files

Fix in Nemesis: assign sreq to shm_active_send when headers are sent.

In Nemesis, MPIDI_CH3I_shm_active_send stores the request pointer
that is currently involved in active sending, which means the headers
are already sent out, but the data is not sent out yet.
MPIDI_CH3I_Shm_send_progress() function will go over the request
queue and make progress when either (1) MPIDI_CH3I_shm_active_send
is not NULL or (2) queue head is not NULL. For (1), API that
only sends the data is called, otherwise, API that sends both
headers and data is called.

Originally in MPIDI_CH3I_iSendv(), MPIDI_CH3I_shm_active_send is set
even though headers are not sent out, which is not correct since
MPIDI_CH3I_Shm_send_progress() function will trigger the API
that only tries to send the data. This patch fixes this issue.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <>
parent 910b30b0
...@@ -110,7 +110,12 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i ...@@ -110,7 +110,12 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
sreq-> = vc; sreq-> = vc;
MPIDI_CH3I_Sendq_enqueue(&MPIDI_CH3I_shm_sendq, sreq); MPIDI_CH3I_Sendq_enqueue(&MPIDI_CH3I_shm_sendq, sreq);
MPIU_Assert (MPIDI_CH3I_shm_active_send == NULL); MPIU_Assert (MPIDI_CH3I_shm_active_send == NULL);
MPIDI_CH3I_shm_active_send = sreq;
if (remaining_iov != iov) {
/* headers are sent, mark current sreq as active_send req */
MPIDI_CH3I_shm_active_send = sreq;
} }
else else
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