Commit 7eac974f authored by Xin Zhao's avatar Xin Zhao
Browse files

Add a flag in op struct to indicate derived datatype.



Add flag is_dt in op structure which is set when any
buffers involved in RMA operations contains derived
datatype data. It is convenient for us to enqueue
issued but not completed operation to the DT specific
list.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 1d873639
......@@ -39,6 +39,7 @@ static inline MPIDI_RMA_Op_t *MPIDI_CH3I_Win_op_alloc(MPID_Win * win_ptr)
e->dataloop = NULL;
e->request = NULL;
e->is_dt = 0;
return e;
}
......
......@@ -80,6 +80,7 @@ typedef struct MPIDI_RMA_Op {
MPIDI_CH3_Pkt_t pkt;
MPIDI_RMA_Pool_type_t pool_type;
int is_dt;
} MPIDI_RMA_Op_t;
typedef struct MPIDI_RMA_Target {
......
......@@ -104,10 +104,12 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
}
......@@ -216,10 +218,12 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
}
......@@ -364,10 +368,12 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
}
......@@ -504,14 +510,17 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
if (op != MPI_NO_OP && !MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
MPID_Datatype_get_ptr(origin_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
if (!MPIR_DATATYPE_IS_PREDEFINED(result_datatype)) {
MPID_Datatype_get_ptr(result_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
MPID_Datatype_get_ptr(target_datatype, dtp);
MPID_Datatype_add_ref(dtp);
new_ptr->is_dt = 1;
}
}
......
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