"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/mpid/ch3/src/ch3u_handle_recv_req.c" between
mvapich2-2.3.1.tar.gz and mvapich2-2.3.2.tar.gz

About: MVAPICH2 offers "MPI over InfiniBand, 10GigE/iWARP and RDMA over Converged Ethernet (RoCE)" to achieve best performance, scalability and fault tolerance for high-end computing systems and servers.

ch3u_handle_recv_req.c  (mvapich2-2.3.1):ch3u_handle_recv_req.c  (mvapich2-2.3.2)
skipping to change at line 64 skipping to change at line 64
} }
#else /* defined(CHANNEL_MRAIL) */ #else /* defined(CHANNEL_MRAIL) */
MPIU_Assert(in_routine == FALSE); MPIU_Assert(in_routine == FALSE);
#endif /* defined(CHANNEL_MRAIL) */ #endif /* defined(CHANNEL_MRAIL) */
in_routine = TRUE; in_routine = TRUE;
reqFn = rreq->dev.OnDataAvail; reqFn = rreq->dev.OnDataAvail;
if (!reqFn) { if (!reqFn) {
#if defined(CHANNEL_MRAIL) #if defined(CHANNEL_MRAIL)
if(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_RECV if(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_RECV
&& MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_IRECV
&& MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_ACCUM_RECV && MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_ACCUM_RECV
&& MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_ACCUM_RECV) { && MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_ACCUM_RECV) {
MPIR_ERR_SETFATALANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**fail", MPIR_ERR_SETFATALANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**fail",
"**fail %s", "**fail %s",
"MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_RECV"); "MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_RECV");
} }
#else /* defined(CHANNEL_MRAIL) */ #else /* defined(CHANNEL_MRAIL) */
MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV); MPIU_Assert((MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV) ||
(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_IRECV));
#endif /* defined(CHANNEL_MRAIL) */ #endif /* defined(CHANNEL_MRAIL) */
mpi_errno = MPID_Request_complete(rreq); mpi_errno = MPID_Request_complete(rreq);
if (mpi_errno != MPI_SUCCESS) { if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno); MPIR_ERR_POP(mpi_errno);
} }
*complete = TRUE; *complete = TRUE;
} }
else { else {
#if defined (_ENABLE_CUDA_) #if defined (_ENABLE_CUDA_)
if (rdma_enable_cuda && reqFn == MPIDI_CH3_ReqHandler_unpack_cudabuf) { if (rdma_enable_cuda && reqFn == MPIDI_CH3_ReqHandler_unpack_cudabuf) {
skipping to change at line 331 skipping to change at line 333
#define FUNCNAME MPIDI_CH3_ReqHandler_GaccumRecvComplete #define FUNCNAME MPIDI_CH3_ReqHandler_GaccumRecvComplete
#undef FCNAME #undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME) #define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq , int *complete) int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq , int *complete)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr; MPID_Win *win_ptr;
MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp; MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
MPID_Request *resp_req; MPID_Request *resp_req;
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
int iovcnt; int iovcnt;
int is_contig; int is_contig;
MPI_Datatype basic_type; MPI_Datatype basic_type;
MPI_Aint predef_count, predef_dtp_size; MPI_Aint predef_count, predef_dtp_size;
MPI_Aint dt_true_lb; MPI_Aint dt_true_lb;
MPI_Aint stream_offset; MPI_Aint stream_offset;
int is_empty_origin = FALSE; int is_empty_origin = FALSE;
MPI_Aint extent, type_size; MPI_Aint extent, type_size;
MPI_Aint stream_data_len, total_len; MPI_Aint stream_data_len, total_len;
MPIU_CHKPMEM_DECL(1); MPIU_CHKPMEM_DECL(1);
skipping to change at line 562 skipping to change at line 564
#undef FUNCNAME #undef FUNCNAME
#define FUNCNAME MPIDI_CH3_ReqHandler_FOPRecvComplete #define FUNCNAME MPIDI_CH3_ReqHandler_FOPRecvComplete
#undef FCNAME #undef FCNAME
#define FCNAME MPL_QUOTE(FUNCNAME) #define FCNAME MPL_QUOTE(FUNCNAME)
int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i nt *complete) int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i nt *complete)
{ {
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
MPID_Win *win_ptr = NULL; MPID_Win *win_ptr = NULL;
MPI_Aint type_size; MPI_Aint type_size;
MPID_Request *resp_req = NULL; MPID_Request *resp_req = NULL;
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
int iovcnt; int iovcnt;
MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp; MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp;
int is_contig; int is_contig;
int is_empty_origin = FALSE; int is_empty_origin = FALSE;
int reqtype;
MPIU_CHKPMEM_DECL(1); MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPRECVCOMPLETE); MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPRECVCOMPLETE);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPRECVCOMPLETE); MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_REQHANDLER_FOPRECVCOMPLETE);
/* Judge if origin buffer is empty */ /* Judge if origin buffer is empty */
if (rreq->dev.op == MPI_NO_OP) { if (rreq->dev.op == MPI_NO_OP) {
is_empty_origin = TRUE; is_empty_origin = TRUE;
} }
MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_FOP_RECV); reqtype = MPIDI_Request_get_type(rreq);
MPIU_Assert(reqtype == MPIDI_REQUEST_TYPE_RECV ||
reqtype == MPIDI_REQUEST_TYPE_FOP_RECV);
MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr); MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size); MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig); MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
/* Create response request */ /* Create response request */
resp_req = MPID_Request_create(); resp_req = MPID_Request_create();
MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq" ); MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq" );
skipping to change at line 1181 skipping to change at line 1186
get_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE; get_resp_pkt->flags = MPIDI_CH3_PKT_FLAG_NONE;
if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED || if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED ||
rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE) rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE)
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED; get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED;
if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) || if ((rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH) ||
(rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK)) (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK; get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
#if defined (CHANNEL_PSM) #if defined (CHANNEL_PSM)
{ {
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
/* GET_RESP packet. send packet & data. Pack if needed */ /* GET_RESP packet. send packet & data. Pack if needed */
iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt; iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt); iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
MPIDI_CH3_Pkt_get_t *get_pkt = vc->ch.pkt_active; MPIDI_CH3_Pkt_get_t *get_pkt = vc->ch.pkt_active;
//get_resp_pkt->target_rank = get_pkt->source_rank; //get_resp_pkt->target_rank = get_pkt->source_rank;
get_resp_pkt->source_rank = get_pkt->target_rank; get_resp_pkt->source_rank = get_pkt->target_rank;
get_resp_pkt->source_win_handle = get_pkt->source_win_handle; get_resp_pkt->source_win_handle = get_pkt->source_win_handle;
get_resp_pkt->target_win_handle = get_pkt->target_win_handle; get_resp_pkt->target_win_handle = get_pkt->target_win_handle;
skipping to change at line 1261 skipping to change at line 1266
mpi_errno = vc->sendNoncontig_fn(vc, sreq, get_resp_pkt, sizeof(*get_res p_pkt)); mpi_errno = vc->sendNoncontig_fn(vc, sreq, get_resp_pkt, sizeof(*get_res p_pkt));
/* MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); */ /* MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex); */
/* --BEGIN ERROR HANDLING-- */ /* --BEGIN ERROR HANDLING-- */
if (mpi_errno != MPI_SUCCESS) { if (mpi_errno != MPI_SUCCESS) {
MPID_Request_release(sreq); MPID_Request_release(sreq);
sreq = NULL; sreq = NULL;
MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg"); MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
} }
/* --END ERROR HANDLING-- */ /* --END ERROR HANDLING-- */
#if defined(CHANNEL_MRAIL) #if defined(CHANNEL_MRAIL)
} else if (sreq->mrail.protocol == MV2_RNDV_PROTOCOL_RPUT } else {
|| sreq->mrail.protocol == MV2_RNDV_PROTOCOL_R3) {
sreq->dev.iov_count = MPL_IOV_LIMIT; sreq->dev.iov_count = MPL_IOV_LIMIT;
mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq,sreq->dev.iov,&sreq->d ev.iov_count); mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq,sreq->dev.iov,&sreq->d ev.iov_count);
if (mpi_errno == MPI_SUCCESS) { if (mpi_errno == MPI_SUCCESS) {
MPIDI_CH3_Get_rndv_push(vc, (MPIDI_CH3_Pkt_t *)get_resp_pkt, sreq); MPIDI_CH3_Get_rndv_push(vc, (MPIDI_CH3_Pkt_t *)get_resp_pkt, sreq);
} else { } else {
MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|loadsendiov"); MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|loadsendiov");
} }
} }
else
{
MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|loadrecviov");
}
#endif //defined(CHANNEL_MRAIL) #endif //defined(CHANNEL_MRAIL)
/* mark receive data transfer as complete and decrement CC in receive /* mark receive data transfer as complete and decrement CC in receive
* request */ * request */
fn_exit: fn_exit:
mpi_errno = MPID_Request_complete(rreq); mpi_errno = MPID_Request_complete(rreq);
if (mpi_errno != MPI_SUCCESS) { if (mpi_errno != MPI_SUCCESS) {
MPIR_ERR_POP(mpi_errno); MPIR_ERR_POP(mpi_errno);
} }
skipping to change at line 1539 skipping to change at line 1539
static inline int perform_get_in_lock_queue(MPID_Win * win_ptr, static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
MPIDI_RMA_Target_lock_entry_t * targ et_lock_entry) MPIDI_RMA_Target_lock_entry_t * targ et_lock_entry)
{ {
MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &upkt.get_resp; MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &upkt.get_resp;
MPIDI_CH3_Pkt_get_t *get_pkt = &((target_lock_entry->pkt).get); MPIDI_CH3_Pkt_get_t *get_pkt = &((target_lock_entry->pkt).get);
MPID_Request *sreq = NULL; MPID_Request *sreq = NULL;
MPI_Aint type_size; MPI_Aint type_size;
size_t len; size_t len;
int iovcnt; int iovcnt;
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
int is_contig; int is_contig;
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
/* Piggyback candidate should have basic datatype for target datatype. */ /* Piggyback candidate should have basic datatype for target datatype. */
MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_pkt->datatype)); MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_pkt->datatype));
/* Make sure that all data is received for this op. */ /* Make sure that all data is received for this op. */
MPIU_Assert(target_lock_entry->all_data_recved == 1); MPIU_Assert(target_lock_entry->all_data_recved == 1);
sreq = MPID_Request_create(); sreq = MPID_Request_create();
skipping to change at line 1712 skipping to change at line 1712
static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr, static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
MPIDI_RMA_Target_lock_entry_t * target_lock_entry) MPIDI_RMA_Target_lock_entry_t * target_lock_entry)
{ {
MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp; MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
MPIDI_CH3_Pkt_get_accum_t *get_accum_pkt = &((target_lock_entry->pkt).get_ac cum); MPIDI_CH3_Pkt_get_accum_t *get_accum_pkt = &((target_lock_entry->pkt).get_ac cum);
MPID_Request *sreq = NULL; MPID_Request *sreq = NULL;
MPI_Aint type_size; MPI_Aint type_size;
size_t len; size_t len;
int iovcnt; int iovcnt;
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
int is_contig; int is_contig;
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
MPI_Aint type_extent; MPI_Aint type_extent;
MPI_Aint total_len, recv_count; MPI_Aint total_len, recv_count;
/* Piggyback candidate should have basic datatype for target datatype. */ /* Piggyback candidate should have basic datatype for target datatype. */
MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype)); MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype));
/* Make sure that all data is received for this op. */ /* Make sure that all data is received for this op. */
MPIU_Assert(target_lock_entry->all_data_recved == 1); MPIU_Assert(target_lock_entry->all_data_recved == 1);
skipping to change at line 1901 skipping to change at line 1901
} }
static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr, static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
MPIDI_RMA_Target_lock_entry_t * targ et_lock_entry) MPIDI_RMA_Target_lock_entry_t * targ et_lock_entry)
{ {
MPIDI_CH3_Pkt_t upkt; MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp; MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp;
MPIDI_CH3_Pkt_fop_t *fop_pkt = &((target_lock_entry->pkt).fop); MPIDI_CH3_Pkt_fop_t *fop_pkt = &((target_lock_entry->pkt).fop);
MPID_Request *resp_req = NULL; MPID_Request *resp_req = NULL;
MPI_Aint type_size; MPI_Aint type_size;
MPL_IOV iov[MPL_IOV_LIMIT]; MPL_IOV iov[MPL_IOV_LIMIT] = {0};
int iovcnt; int iovcnt;
int is_contig; int is_contig;
int mpi_errno = MPI_SUCCESS; int mpi_errno = MPI_SUCCESS;
/* Piggyback candidate should have basic datatype for target datatype. */ /* Piggyback candidate should have basic datatype for target datatype. */
MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(fop_pkt->datatype)); MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(fop_pkt->datatype));
/* Make sure that all data is received for this op. */ /* Make sure that all data is received for this op. */
MPIU_Assert(target_lock_entry->all_data_recved == 1); MPIU_Assert(target_lock_entry->all_data_recved == 1);
 End of changes. 12 change blocks. 
14 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)