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

Move predefined datatype check to the MPI layer.



The check was originally in the ch3 layer, but doesn't seem to use any
ch3 specific information.  This macro will be useful at the upper
layers for optimizations, e.g., in the localcopy routine.
Signed-off-by: default avatarXin Zhao <xinzhao3@illinois.edu>
parent f8e7f47f
......@@ -509,6 +509,12 @@ int MPIU_Handle_free( void *((*)[]), int );
#define MPID_Request_valid_ptr(ptr,err) MPID_Valid_ptr_class(Request,ptr,MPI_ERR_REQUEST,err)
#define MPID_Keyval_valid_ptr(ptr,err) MPID_Valid_ptr_class(Keyval,ptr,MPI_ERR_KEYVAL,err)
#define MPIR_DATATYPE_IS_PREDEFINED(type) \
((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \
(type == MPI_FLOAT_INT) || (type == MPI_DOUBLE_INT) || \
(type == MPI_LONG_INT) || (type == MPI_SHORT_INT) || \
(type == MPI_LONG_DOUBLE_INT))
/* FIXME:
Generic pointer test. This is applied to any address, not just one from
an MPI object.
......
......@@ -1219,14 +1219,6 @@ int MPIDI_CH3_Start_rma_op_target(MPID_Win *win_ptr, MPIDI_CH3_Pkt_flags_t flags
int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle);
#define MPIDI_CH3I_DATATYPE_IS_PREDEFINED(type, predefined) \
if ((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \
(type == MPI_FLOAT_INT) || (type == MPI_DOUBLE_INT) || \
(type == MPI_LONG_INT) || (type == MPI_SHORT_INT) || \
(type == MPI_LONG_DOUBLE_INT)) \
predefined = 1; \
else predefined = 0;
int MPIDI_CH3I_Progress_finalize(void);
/*@
......
......@@ -366,7 +366,6 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
{
void *base = NULL;
int disp_unit, shm_op = 0;
int origin_predefined, target_predefined;
MPI_User_function *uop = NULL;
MPID_Datatype *dtp;
int mpi_errno = MPI_SUCCESS;
......@@ -375,9 +374,6 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_ACC_OP);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
if (win_ptr->shm_allocated == TRUE) {
shm_op = 1;
base = win_ptr->shm_base_addrs[target_rank];
......@@ -407,7 +403,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
/* get the function by indexing into the op table */
uop = MPIR_OP_HDL_TO_FN(op);
if (origin_predefined && target_predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) && MPIR_DATATYPE_IS_PREDEFINED(target_datatype))
{
/* Cast away const'ness for origin_address in order to
* avoid changing the prototype for MPI_User_function */
......@@ -450,7 +446,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
if (target_predefined) {
if (MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
/* target predefined type, origin derived datatype */
if (shm_op) MPIDI_CH3I_SHM_MUTEX_LOCK(win_ptr);
......@@ -520,19 +516,12 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
void *base = NULL;
MPI_User_function *uop = NULL;
MPID_Datatype *dtp;
int origin_predefined, target_predefined;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(2);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_GET_ACC_OP);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_GET_ACC_OP);
origin_predefined = TRUE; /* quiet uninitialized warnings (b/c goto) */
if (op != MPI_NO_OP) {
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
if (win_ptr->shm_allocated == TRUE) {
base = win_ptr->shm_base_addrs[target_rank];
disp_unit = win_ptr->disp_units[target_rank];
......@@ -582,7 +571,8 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
/* get the function by indexing into the op table */
uop = MPIR_OP_HDL_TO_FN(op);
if (origin_predefined && target_predefined) {
if ((op == MPI_NO_OP || MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) &&
MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
/* Cast away const'ness for origin_address in order to
* avoid changing the prototype for MPI_User_function */
(*uop)((void *) origin_addr, (char *) base + disp_unit*target_disp,
......@@ -620,7 +610,7 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
}
if (target_predefined) {
if (MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
/* target predefined type, origin derived datatype */
(*uop)(tmp_buf, (char *) base + disp_unit * target_disp,
......
......@@ -90,7 +90,7 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
/* Perform get in get-accumulate */
if (rreq->dev.resp_request_handle != MPI_REQUEST_NULL) {
int predefined, type_size;
int type_size;
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
MPID_Request *resp_req;
......@@ -100,7 +100,6 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
get_accum_resp_pkt->request_handle = rreq->dev.resp_request_handle;
MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rreq->dev.datatype, predefined);
/* Copy data into a temporary buffer */
resp_req = MPID_Request_create();
......@@ -110,7 +109,7 @@ int MPIDI_CH3_ReqHandler_PutAccumRespComplete( MPIDI_VC_t *vc,
MPIU_CHKPMEM_MALLOC(resp_req->dev.user_buf, void *, rreq->dev.user_count * type_size,
mpi_errno, "GACC resp. buffer");
if (predefined) {
if (MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype)) {
MPIU_Memcpy(resp_req->dev.user_buf, rreq->dev.real_user_buf,
rreq->dev.user_count * type_size);
} else {
......@@ -778,7 +777,7 @@ static int create_derived_datatype(MPID_Request *req, MPID_Datatype **dtp)
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int do_accumulate_op(MPID_Request *rreq)
{
int mpi_errno = MPI_SUCCESS, predefined;
int mpi_errno = MPI_SUCCESS;
MPI_Aint true_lb, true_extent;
MPI_User_function *uop;
MPIDI_STATE_DECL(MPID_STATE_DO_ACCUMULATE_OP);
......@@ -812,8 +811,7 @@ static int do_accumulate_op(MPID_Request *rreq)
/* --END ERROR HANDLING-- */
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rreq->dev.datatype, predefined);
if (predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype))
{
(*uop)(rreq->dev.user_buf, rreq->dev.real_user_buf,
&(rreq->dev.user_count), &(rreq->dev.datatype));
......
......@@ -23,7 +23,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int rank, origin_predefined, result_predefined, target_predefined;
int rank;
int dt_contig ATTRIBUTE((unused));
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
......@@ -53,13 +53,6 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
rank = win_ptr->comm_ptr->rank;
origin_predefined = TRUE; /* quiet uninitialized warnings (b/c goto) */
if (op != MPI_NO_OP) {
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(result_datatype, result_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
/* check if target is local and shared memory is allocated on window,
if so, we directly perform this operation on shared memory region. */
......@@ -115,15 +108,15 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
/* if source or target datatypes are derived, increment their
reference counts */
if (!origin_predefined) {
if (op != MPI_NO_OP && !MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
if (!result_predefined) {
if (!MPIR_DATATYPE_IS_PREDEFINED(result_datatype)) {
MPID_Datatype_get_ptr(result_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
if (!target_predefined) {
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
......
......@@ -120,7 +120,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
int target_count, MPI_Datatype target_datatype, MPID_Win *win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused)), rank, predefined;
int dt_contig ATTRIBUTE((unused)), rank;
MPID_Datatype *dtp;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
......@@ -199,14 +199,12 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
/* if source or target datatypes are derived, increment their
reference counts */
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype))
{
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype))
{
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
......@@ -235,7 +233,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
{
int mpi_errno = MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig ATTRIBUTE((unused)), rank, predefined;
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
......@@ -310,14 +308,12 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
/* if source or target datatypes are derived, increment their
reference counts */
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype))
{
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype))
{
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
......@@ -347,7 +343,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
{
int mpi_errno=MPI_SUCCESS;
MPIDI_msg_sz_t data_sz;
int dt_contig ATTRIBUTE((unused)), rank, origin_predefined, target_predefined;
int dt_contig ATTRIBUTE((unused)), rank;
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPID_Datatype *dtp;
MPIDI_VC_t *orig_vc, *target_vc;
......@@ -376,9 +372,6 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
rank = win_ptr->comm_ptr->rank;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
if (win_ptr->shm_allocated == TRUE && target_rank != rank && win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
/* check if target is local and shared memory is allocated on window,
if so, we directly perform this operation on shared memory region. */
......@@ -414,7 +407,8 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
/* If predefined and contiguous, use a simplified element */
if (origin_predefined && target_predefined && enableShortACC) {
if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
MPIR_DATATYPE_IS_PREDEFINED(target_datatype) && enableShortACC) {
MPIU_INSTR_DURATION_START(rmaqueue_set);
new_ptr->type = MPIDI_RMA_ACC_CONTIG;
/* Only the information needed for the contig/predefined acc */
......@@ -448,12 +442,12 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
/* if source or target datatypes are derived, increment their
reference counts */
if (!origin_predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype))
{
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
}
if (!target_predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype))
{
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
......
......@@ -553,7 +553,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
MPIDI_CH3_Pkt_put_t *put_pkt = &upkt.put;
MPIDI_CH3_Pkt_accum_t *accum_pkt = &upkt.accum;
MPID_IOV iov[MPID_IOV_LIMIT];
int mpi_errno=MPI_SUCCESS, predefined;
int mpi_errno=MPI_SUCCESS;
int origin_dt_derived, target_dt_derived, origin_type_size, iovcnt;
MPIDI_VC_t * vc;
MPID_Comm *comm_ptr;
......@@ -598,8 +598,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
resp_req->dev.target_win_handle = target_win_handle;
resp_req->dev.source_win_handle = source_win_handle;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype, predefined);
if (!predefined) {
if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) {
MPID_Datatype *result_dtp = NULL;
MPID_Datatype_get_ptr(resp_req->dev.datatype, result_dtp);
resp_req->dev.datatype_ptr = result_dtp;
......@@ -648,8 +647,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
comm_ptr = win_ptr->comm_ptr;
MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype))
{
origin_dt_derived = 1;
MPID_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp);
......@@ -659,8 +657,7 @@ static int MPIDI_CH3I_Send_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
origin_dt_derived = 0;
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rma_op->target_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(rma_op->target_datatype))
{
target_dt_derived = 1;
MPID_Datatype_get_ptr(rma_op->target_datatype, target_dtp);
......@@ -1135,7 +1132,7 @@ static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_t *get_pkt = &upkt.get;
int mpi_errno=MPI_SUCCESS, predefined;
int mpi_errno=MPI_SUCCESS;
MPIDI_VC_t * vc;
MPID_Comm *comm_ptr;
MPID_Request *req = NULL;
......@@ -1165,8 +1162,7 @@ static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
req->dev.datatype = rma_op->origin_datatype;
req->dev.target_win_handle = MPI_WIN_NULL;
req->dev.source_win_handle = source_win_handle;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(req->dev.datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(req->dev.datatype))
{
MPID_Datatype_get_ptr(req->dev.datatype, dtp);
req->dev.datatype_ptr = dtp;
......@@ -1192,8 +1188,7 @@ static int MPIDI_CH3I_Recv_rma_msg(MPIDI_RMA_Op_t *rma_op, MPID_Win *win_ptr,
comm_ptr = win_ptr->comm_ptr;
MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rma_op->target_datatype, predefined);
if (predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(rma_op->target_datatype))
{
/* basic datatype on target. simply send the get_pkt. */
MPIU_THREAD_CS_ENTER(CH3COMM,vc);
......@@ -2046,18 +2041,16 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
* do an optimization where the lock and the RMA operation are
* sent in a single packet. Otherwise, we send a separate lock
* request first. */
int type_size, predefined;
int type_size;
MPIDI_VC_t *vc;
MPIDI_RMA_Op_t *curr_op = rma_op;
MPIDI_Comm_get_vc_set_active(win_ptr->comm_ptr, dest, &vc);
MPID_Datatype_get_size_macro(curr_op->origin_datatype, type_size);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(curr_op->target_datatype, predefined);
/* msg_sz typically = 65480 */
if ( predefined &&
if (MPIR_DATATYPE_IS_PREDEFINED(curr_op->target_datatype) &&
(type_size * curr_op->origin_count <= vc->eager_max_msg_sz) ) {
single_op_opt = 1;
/* Set the lock granted flag to 1 */
......@@ -2976,7 +2969,7 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
MPID_IOV iov[MPID_IOV_LIMIT];
MPID_Comm *comm_ptr;
MPID_Datatype *origin_dtp=NULL;
int origin_type_size, predefined;
int origin_type_size;
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_lock_put_unlock_t *lock_put_unlock_pkt =
&upkt.lock_put_unlock;
......@@ -3062,8 +3055,7 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
comm_ptr = win_ptr->comm_ptr;
MPIDI_Comm_get_vc_set_active(comm_ptr, rma_op->target_rank, &vc);
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype))
{
origin_dt_derived = 1;
MPID_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp);
......@@ -3176,7 +3168,7 @@ static int MPIDI_CH3I_Send_lock_put_or_acc(MPID_Win *win_ptr, int target_rank)
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int MPIDI_CH3I_Send_lock_get(MPID_Win *win_ptr, int target_rank)
{
int mpi_errno=MPI_SUCCESS, lock_type, predefined;
int mpi_errno=MPI_SUCCESS, lock_type;
MPIDI_RMA_Op_t *rma_op;
MPID_Request *rreq=NULL, *sreq=NULL;
MPIDI_VC_t * vc;
......@@ -3211,8 +3203,7 @@ static int MPIDI_CH3I_Send_lock_get(MPID_Win *win_ptr, int target_rank)
rreq->dev.target_win_handle = MPI_WIN_NULL;
rreq->dev.source_win_handle = win_ptr->handle;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(rreq->dev.datatype, predefined);
if (!predefined)
if (!MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype))
{
MPID_Datatype_get_ptr(rreq->dev.datatype, dtp);
rreq->dev.datatype_ptr = dtp;
......@@ -3353,7 +3344,6 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
{
MPIDI_CH3_Pkt_put_t * put_pkt = &pkt->put;
MPID_Request *req = NULL;
int predefined;
int type_size;
int complete = 0;
char *data_buf = NULL;
......@@ -3398,8 +3388,7 @@ int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.source_win_handle = put_pkt->source_win_handle;
req->dev.flags = put_pkt->flags;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(put_pkt->datatype, predefined);
if (predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(put_pkt->datatype))
{
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_PUT_RESP);
req->dev.datatype = put_pkt->datatype;
......@@ -3520,7 +3509,6 @@ int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPIDI_CH3_Pkt_get_t * get_pkt = &pkt->get;
MPID_Request *req = NULL;
MPID_IOV iov[MPID_IOV_LIMIT];
int predefined;
int complete;
char *data_buf = NULL;
MPIDI_msg_sz_t data_len;
......@@ -3545,8 +3533,7 @@ int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.source_win_handle = get_pkt->source_win_handle;
req->dev.flags = get_pkt->flags;
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(get_pkt->datatype, predefined);
if (predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(get_pkt->datatype))
{
/* basic datatype. send the data. */
MPIDI_CH3_Pkt_t upkt;
......@@ -3655,7 +3642,6 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
MPID_Request *req = NULL;
MPI_Aint true_lb, true_extent, extent;
void *tmp_buf = NULL;
int predefined;
int complete = 0;
char *data_buf = NULL;
MPIDI_msg_sz_t data_len;
......@@ -3693,8 +3679,7 @@ int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
req->dev.resp_request_handle = MPI_REQUEST_NULL;
}
MPIDI_CH3I_DATATYPE_IS_PREDEFINED(accum_pkt->datatype, predefined);
if (predefined)
if (MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype))
{
MPIU_INSTR_DURATION_START(rmapkt_acc_predef);
MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_ACCUM_RESP);
......
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