1
1

maintain reference count on communicator for duration of request

This commit was SVN r1907.
Этот коммит содержится в:
Tim Woodall 2004-08-05 19:35:10 +00:00
родитель 90ec5bada0
Коммит 1b6a2a59c1
7 изменённых файлов: 27 добавлений и 11 удалений

Просмотреть файл

@ -74,6 +74,7 @@ static int mca_mpool_sm_param_register_int(
*/ */
static int mca_mpool_sm_open(void) static int mca_mpool_sm_open(void)
{ {
fprintf(stderr, "mca_mpool_sm_open\n");
/* register SM component parameters */ /* register SM component parameters */
mca_mpool_sm_component.sm_size = mca_mpool_sm_component.sm_size =
mca_mpool_sm_param_register_int("size", 512*1024*1024); 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_mpi_done = false; \
(request)->req_base.req_pml_done = false; \ (request)->req_base.req_pml_done = false; \
(request)->req_base.req_free_called = false; \ (request)->req_base.req_free_called = false; \
\
/* increment reference count on communicator */ \
OBJ_RETAIN(comm); \
} }
#endif #endif

Просмотреть файл

@ -58,6 +58,9 @@ typedef struct mca_pml_base_send_request_t mca_pml_base_send_request_t;
mode, \ mode, \
persistent) \ persistent) \
{ \ { \
/* increment reference count on communicator */ \
OBJ_RETAIN(comm); \
\
OMPI_REQUEST_INIT(&(request)->req_base.req_ompi); \ OMPI_REQUEST_INIT(&(request)->req_base.req_ompi); \
request->req_offset = 0; \ request->req_offset = 0; \
request->req_bytes_sent = 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 /* We didn't find any matches. Record this irecv so we can match
* it when the message comes in. * 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_list_append(pml_comm->c_specific_receives+req_peer, (ompi_list_item_t*)request);
}
OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock); OMPI_THREAD_UNLOCK(&pml_comm->c_matching_lock);
} }

Просмотреть файл

@ -32,7 +32,10 @@
* @param request (IN) Receive request. * @param request (IN) Receive request.
*/ */
#define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \ #define MCA_PML_TEG_RECV_REQUEST_RETURN(request) \
OMPI_FREE_LIST_RETURN(&mca_pml_teg.teg_recv_requests, (ompi_list_item_t*)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 * Attempt to match the request against the unexpected fragment list

Просмотреть файл

@ -63,6 +63,10 @@
{ \ { \
mca_ptl_base_module_t* ptl = sendreq->req_ptl; \ mca_ptl_base_module_t* ptl = sendreq->req_ptl; \
mca_pml_base_ptl_t* ptl_base = ptl->ptl_base; \ 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 \ * If there is a cache associated with the ptl - first attempt \
* to return the send descriptor to the cache. \ * to return the send descriptor to the cache. \

Просмотреть файл

@ -41,8 +41,9 @@ static inline bool mca_ptl_base_recv_frag_match(
bool matched; bool matched;
ompi_list_t matched_frags; ompi_list_t matched_frags;
OBJ_CONSTRUCT(&matched_frags, ompi_list_t); 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); frag = (mca_ptl_base_recv_frag_t*)ompi_list_remove_first(&matched_frags);
}
while(NULL != frag) { while(NULL != frag) {
mca_ptl_base_module_t* ptl = frag->frag_base.frag_owner; mca_ptl_base_module_t* ptl = frag->frag_base.frag_owner;