Correct the thin and heavy requests management for the CM PML.
This commit was SVN r15361.
Этот коммит содержится в:
родитель
ef7d17d814
Коммит
9ed3ede73e
@ -45,8 +45,7 @@ mca_pml_cm_recv_request_free(struct ompi_request_t** request)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request)
|
||||
void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request)
|
||||
{
|
||||
mca_pml_cm_request_t *base_request =
|
||||
(mca_pml_cm_request_t*) mtl_request->ompi_req;
|
||||
@ -60,9 +59,6 @@ mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request)
|
||||
static void
|
||||
mca_pml_cm_recv_request_construct(mca_pml_cm_thin_recv_request_t* recvreq)
|
||||
{
|
||||
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq;
|
||||
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_request_completion;
|
||||
|
||||
recvreq->req_base.req_ompi.req_free = mca_pml_cm_recv_request_free;
|
||||
recvreq->req_base.req_ompi.req_cancel = mca_pml_cm_cancel;
|
||||
OBJ_CONSTRUCT( &(recvreq->req_base.req_convertor), ompi_convertor_t );
|
||||
|
@ -57,6 +57,8 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_recv_request_t);
|
||||
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item, rc); \
|
||||
recvreq = (mca_pml_cm_thin_recv_request_t*) item; \
|
||||
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_THIN; \
|
||||
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
|
||||
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_request_completion; \
|
||||
} while (0)
|
||||
|
||||
#define MCA_PML_CM_HVY_RECV_REQUEST_ALLOC(recvreq, rc) \
|
||||
@ -65,6 +67,8 @@ do { \
|
||||
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item, rc); \
|
||||
recvreq = (mca_pml_cm_hvy_recv_request_t*) item; \
|
||||
recvreq->req_base.req_pml_type = MCA_PML_CM_REQUEST_RECV_HEAVY; \
|
||||
recvreq->req_mtl.ompi_req = (ompi_request_t*) recvreq; \
|
||||
recvreq->req_mtl.completion_callback = mca_pml_cm_recv_request_completion; \
|
||||
} while (0)
|
||||
|
||||
|
||||
@ -290,6 +294,7 @@ do { \
|
||||
(ompi_free_list_item_t*)(recvreq)); \
|
||||
}
|
||||
|
||||
extern void mca_pml_cm_recv_request_completion(struct mca_mtl_request_t *mtl_request);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -51,7 +51,7 @@ mca_pml_cm_send_request_free(struct ompi_request_t** request)
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
mca_pml_cm_send_request_completion(struct mca_mtl_request_t *mtl_request)
|
||||
{
|
||||
mca_pml_cm_send_request_t *base_request =
|
||||
@ -66,8 +66,6 @@ mca_pml_cm_send_request_completion(struct mca_mtl_request_t *mtl_request)
|
||||
static void mca_pml_cm_send_request_construct(mca_pml_cm_hvy_send_request_t* sendreq)
|
||||
{
|
||||
/* no need to reinit for every send -- never changes */
|
||||
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq;
|
||||
sendreq->req_mtl.completion_callback = mca_pml_cm_send_request_completion;
|
||||
sendreq->req_send.req_base.req_ompi.req_free = mca_pml_cm_send_request_free;
|
||||
sendreq->req_send.req_base.req_ompi.req_cancel = mca_pml_cm_cancel;
|
||||
}
|
||||
|
@ -71,6 +71,8 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_send_request_t);
|
||||
item, rc); \
|
||||
sendreq = (mca_pml_cm_thin_send_request_t*)item; \
|
||||
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_THIN; \
|
||||
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
|
||||
sendreq->req_mtl.completion_callback = mca_pml_cm_send_request_completion; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
@ -89,6 +91,8 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_cm_hvy_send_request_t);
|
||||
item, rc); \
|
||||
sendreq = (mca_pml_cm_hvy_send_request_t*)item; \
|
||||
sendreq->req_send.req_base.req_pml_type = MCA_PML_CM_REQUEST_SEND_HEAVY; \
|
||||
sendreq->req_mtl.ompi_req = (ompi_request_t*) sendreq; \
|
||||
sendreq->req_mtl.completion_callback = mca_pml_cm_send_request_completion; \
|
||||
} \
|
||||
}
|
||||
|
||||
@ -351,4 +355,7 @@ do { \
|
||||
(ompi_free_list_item_t*)sendreq); \
|
||||
}
|
||||
|
||||
extern void
|
||||
mca_pml_cm_send_request_completion(struct mca_mtl_request_t *mtl_request);
|
||||
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user