Commit f68228a9 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

Several updates to the rportals code.



We now use a target structure for each target ID that we want to send
data to.  This allows us to separate out target-specific states and
more cleanly manage operations to a single target.
Signed-off-by: default avatarAntonio Pena Monferrer <apenya@mcs.anl.gov>
parent 50873835
......@@ -461,7 +461,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
MPIU_ERR_POP(mpi_errno);
/* Notify we're done */
ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, 0, 0, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->ptc,
DONE_TAG(recvbufs[buf_idx].tag), 0, done_req, MPIDI_Process.my_pg_rank, 0);
DONE_TAG(recvbufs[buf_idx].tag), 0, done_req, MPIDI_Process.my_pg_rank, 1);
MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s",
MPID_nem_ptl_strerror(ret));
MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST,
......@@ -531,7 +531,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
/* Notify we're done */
ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, 0, 0, PTL_NO_ACK_REQ, vc_ptl->id, vc_ptl->ptc,
DONE_TAG(rreq->dev.match.parts.tag), 0, done_req, MPIDI_Process.my_pg_rank, 0);
DONE_TAG(rreq->dev.match.parts.tag), 0, done_req, MPIDI_Process.my_pg_rank, 1);
MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlput", "**ptlput %s",
MPID_nem_ptl_strerror(ret));
MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST,
......
......@@ -30,6 +30,7 @@
} \
}
struct rptl_target;
struct rptl_op {
enum {
RPTL_OP_PUT,
......@@ -73,6 +74,7 @@ struct rptl_op {
} u;
int events_ready;
struct rptl_target *target;
struct rptl_op *next;
struct rptl_op *prev;
......@@ -85,7 +87,7 @@ struct rptl_op {
struct rptl {
/* local portal state */
enum {
RPTL_LOCAL_STATE_NORMAL,
RPTL_LOCAL_STATE_ACTIVE,
RPTL_LOCAL_STATE_AWAITING_PAUSE_ACKS
} local_state;
uint64_t pause_ack_counter;
......@@ -122,6 +124,37 @@ struct rptl {
struct rptl *prev;
};
#define RPTL_OP_POOL_SEGMENT_COUNT (1024)
struct rptl_target {
ptl_process_t id;
enum rptl_target_state {
RPTL_TARGET_STATE_ACTIVE,
RPTL_TARGET_STATE_DISABLED,
RPTL_TARGET_STATE_RECEIVED_PAUSE,
RPTL_TARGET_STATE_PAUSE_ACKED
} state;
/* when we get a pause message, we need to know which rptl it came
* in on, so we can figure out what the corresponding target
* portal is. for this, we store the local rptl */
struct rptl *rptl;
struct rptl_op_pool_segment {
struct rptl_op op[RPTL_OP_POOL_SEGMENT_COUNT];
struct rptl_op_pool_segment *next;
struct rptl_op_pool_segment *prev;
} *op_segment_list;
struct rptl_op *op_pool;
struct rptl_op *data_op_list;
struct rptl_op *control_op_list;
struct rptl_target *next;
struct rptl_target *prev;
};
int MPID_nem_ptl_rptl_init(int world_size, uint64_t max_origin_events,
int (*get_target_info) (int rank, ptl_process_t * id,
ptl_pt_index_t local_data_pt,
......
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