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

Bug-fix: add FOP req types.



This patch adds req types for FOP operation, and calls FOP req handler
after SRBuf is unpacked.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent f75eb4eb
......@@ -465,6 +465,8 @@ extern MPIDI_Process_t MPIDI_Process;
#define MPIDI_REQUEST_TYPE_GET_ACCUM_RECV 11 /* target is receiving GACC data */
#define MPIDI_REQUEST_TYPE_GET_ACCUM_RECV_DERIVED_DT 12 /* target is receiving derived DT info for GACC data */
#define MPIDI_REQUEST_TYPE_GET_ACCUM_RESP 13 /* target is sending GACC response data */
#define MPIDI_REQUEST_TYPE_FOP_RECV 14 /* target is receiving FOP data */
#define MPIDI_REQUEST_TYPE_FOP_RESP 15 /* target is sending FOP response data */
#define MPIDI_Request_get_type(req_) \
......
......@@ -350,6 +350,8 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPRECVCOMPLETE);
MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_FOP_RECV);
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
......@@ -359,6 +361,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
/* Create response request */
resp_req = MPID_Request_create();
MPIU_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
MPIDI_Request_set_type(resp_req, MPIDI_REQUEST_TYPE_FOP_RESP);
MPIU_Object_set_ref(resp_req, 1);
resp_req->dev.OnFinal = MPIDI_CH3_ReqHandler_FOPSendComplete;
resp_req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_FOPSendComplete;
......@@ -767,6 +770,9 @@ int MPIDI_CH3_ReqHandler_UnpackSRBufComplete(MPIDI_VC_t * vc, MPID_Request * rre
else if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_GET_ACCUM_RECV) {
mpi_errno = MPIDI_CH3_ReqHandler_GaccumRecvComplete(vc, rreq, complete);
}
else if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_FOP_RECV) {
mpi_errno = MPIDI_CH3_ReqHandler_FOPRecvComplete(vc, rreq, complete);
}
else {
/* mark data transfer as complete and decrement CC */
MPIDI_CH3U_Request_complete(rreq);
......
......@@ -1281,6 +1281,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
req = MPID_Request_create();
MPIU_Object_set_ref(req, 1);
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_FOP_RECV);
*rreqp = req;
req->dev.op = fop_pkt->op;
......
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