maintain reference count on communicator for duration of request
This commit was SVN r1907.
Этот коммит содержится в:
родитель
90ec5bada0
Коммит
1b6a2a59c1
@ -74,6 +74,7 @@ static int mca_mpool_sm_param_register_int(
|
||||
*/
|
||||
static int mca_mpool_sm_open(void)
|
||||
{
|
||||
fprintf(stderr, "mca_mpool_sm_open\n");
|
||||
/* register SM component parameters */
|
||||
mca_mpool_sm_component.sm_size =
|
||||
mca_mpool_sm_param_register_int("size", 512*1024*1024);
|
||||
|
@ -61,6 +61,9 @@ typedef struct mca_pml_base_recv_request_t mca_pml_base_recv_request_t;
|
||||
(request)->req_base.req_mpi_done = false; \
|
||||
(request)->req_base.req_pml_done = false; \
|
||||
(request)->req_base.req_free_called = false; \
|
||||
\
|
||||
/* increment reference count on communicator */ \
|
||||
OBJ_RETAIN(comm); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -23,7 +23,7 @@ struct mca_pml_base_send_request_t {
|
||||
size_t req_bytes_packed; /**< packed size of a message given the datatype and count */
|
||||
size_t req_bytes_sent; /**< number of bytes that have been sent */
|
||||
mca_pml_base_send_mode_t req_send_mode; /**< type of send */
|
||||
struct mca_ptl_base_module_t* req_ptl; /**< PTL that is selected for first fragment */
|
||||
struct mca_ptl_base_module_t* req_ptl; /**< PTL that is selected for first fragment */
|
||||
struct mca_ptl_base_peer_t* req_peer; /**< PTL peer instance that will be used for first fragment */
|
||||
ompi_ptr_t req_peer_match; /**< matched receive at peer */
|
||||
ompi_ptr_t req_peer_addr; /**< peers remote buffer address */
|
||||
@ -58,6 +58,9 @@ typedef struct mca_pml_base_send_request_t mca_pml_base_send_request_t;
|
||||
mode, \
|
||||
persistent) \
|
||||
{ \
|
||||
/* increment reference count on communicator */ \
|
||||
OBJ_RETAIN(comm); \
|
||||
\
|
||||
OMPI_REQUEST_INIT(&(request)->req_base.req_ompi); \
|
||||
request->req_offset = 0; \
|
||||
request->req_bytes_sent = 0; \
|
||||
|
@ -69,8 +69,9 @@ void mca_pml_teg_recv_request_match_specific(mca_pml_base_recv_request_t* reques
|
||||
/* We didn't find any matches. Record this irecv so we can match
|
||||
* it when the message comes in.
|
||||
*/
|
||||
if(request->req_base.req_type != MCA_PML_REQUEST_IPROBE)
|
||||
if(request->req_base.req_type != MCA_PML_REQUEST_IPROBE) {
|
||||
ompi_list_append(pml_comm->c_specific_receives+req_peer, (ompi_list_item_t*)request);
|
||||
}
|
||||
OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock);
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
* @param rc (OUT) OMPI_SUCCESS or error status on failure.
|
||||
* @return Receive request.
|
||||
*/
|
||||
#define MCA_PML_TEG_RECV_REQUEST_ALLOC(recvreq, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
OMPI_FREE_LIST_GET(&mca_pml_teg.teg_recv_requests, item, rc); \
|
||||
recvreq = (mca_pml_base_recv_request_t*)item; \
|
||||
#define MCA_PML_TEG_RECV_REQUEST_ALLOC(recvreq, rc) \
|
||||
{ \
|
||||
ompi_list_item_t* item; \
|
||||
OMPI_FREE_LIST_GET(&mca_pml_teg.teg_recv_requests, item, rc); \
|
||||
recvreq = (mca_pml_base_recv_request_t*)item; \
|
||||
}
|
||||
|
||||
/**
|
||||
@ -31,9 +31,12 @@
|
||||
*
|
||||
* @param request (IN) Receive request.
|
||||
*/
|
||||
#define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)request);
|
||||
|
||||
#define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \
|
||||
{ \
|
||||
OBJ_RELEASE(request->req_base.req_comm); \
|
||||
OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)request); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to match the request against the unexpected fragment list
|
||||
* for all source ranks w/in the communicator.
|
||||
|
@ -63,6 +63,10 @@
|
||||
{ \
|
||||
mca_ptl_base_module_t* ptl = sendreq->req_ptl; \
|
||||
mca_pml_base_ptl_t* ptl_base = ptl->ptl_base; \
|
||||
\
|
||||
/* Decrement reference count on communicator. */ \
|
||||
OBJ_RELEASE(request->req_base.req_comm); \
|
||||
\
|
||||
/* \
|
||||
* If there is a cache associated with the ptl - first attempt \
|
||||
* to return the send descriptor to the cache. \
|
||||
|
@ -41,8 +41,9 @@ static inline bool mca_ptl_base_recv_frag_match(
|
||||
bool matched;
|
||||
ompi_list_t matched_frags;
|
||||
OBJ_CONSTRUCT(&matched_frags, ompi_list_t);
|
||||
if((matched = mca_ptl_base_match(header, frag, &matched_frags)) == false)
|
||||
if((matched = mca_ptl_base_match(header, frag, &matched_frags)) == false) {
|
||||
frag = (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags);
|
||||
}
|
||||
|
||||
while(NULL != frag) {
|
||||
mca_ptl_base_module_t* ptl = frag->frag_base.frag_owner;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user