Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 237da73

Browse files
committed
Merge pull request #1104 from hjelmn/v2.x_threads
v2.x thread updates for one-sided
2 parents b7f4c24 + 15918c1 commit 237da73

File tree

5 files changed

+16
-20
lines changed

5 files changed

+16
-20
lines changed

ompi/mca/osc/pt2pt/osc_pt2pt_data_move.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,8 +1622,6 @@ static int ompi_osc_pt2pt_callback (ompi_request_t *request)
16221622
size_t incoming_length = request->req_status._ucount;
16231623
int source = request->req_status.MPI_SOURCE;
16241624

1625-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
1626-
16271625
assert(incoming_length >= sizeof(ompi_osc_pt2pt_header_base_t));
16281626

16291627
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
@@ -1666,8 +1664,6 @@ static int ompi_osc_pt2pt_callback (ompi_request_t *request)
16661664
osc_pt2pt_gc_add_request (module, request);
16671665
ompi_osc_pt2pt_frag_start_receive (module);
16681666

1669-
OPAL_THREAD_LOCK(&ompi_request_lock);
1670-
16711667
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
16721668
"finished posting receive request"));
16731669

ompi/mca/pml/ob1/pml_ob1_recvreq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ do { \
123123
*/
124124
#define MCA_PML_OB1_RECV_REQUEST_MPI_COMPLETE( recvreq ) \
125125
do { \
126-
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \
127-
&(recvreq->req_recv.req_base), PERUSE_RECV ); \
126+
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \
127+
&(recvreq->req_recv.req_base), PERUSE_RECV ); \
128128
ompi_request_complete( &(recvreq->req_recv.req_base.req_ompi), true ); \
129129
} while (0)
130130

ompi/mca/pml/ob1/pml_ob1_sendreq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ do {
209209
(sendreq)->req_send.req_base.req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \
210210
(sendreq)->req_send.req_base.req_ompi.req_status._ucount = \
211211
(sendreq)->req_send.req_bytes_packed; \
212-
ompi_request_complete( &((sendreq)->req_send.req_base.req_ompi), (with_signal) ); \
213-
\
214212
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \
215213
&(sendreq->req_send.req_base), PERUSE_SEND); \
214+
\
215+
ompi_request_complete( &((sendreq)->req_send.req_base.req_ompi), (with_signal) ); \
216216
} while(0)
217217

218218
static inline void mca_pml_ob1_send_request_fini (mca_pml_ob1_send_request_t *sendreq)

ompi/request/request.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ opal_pointer_array_t ompi_request_f_to_c_table = {{0}};
3636
size_t ompi_request_waiting = 0;
3737
size_t ompi_request_completed = 0;
3838
size_t ompi_request_failed = 0;
39-
opal_mutex_t ompi_request_lock = {{0}};
39+
opal_recursive_mutex_t ompi_request_lock = {{0}};
4040
opal_condition_t ompi_request_cond = {{0}};
4141
ompi_predefined_request_t ompi_request_null = {{{{{0}}}}};
4242
ompi_predefined_request_t *ompi_request_null_addr = &ompi_request_null;
@@ -109,7 +109,7 @@ OBJ_CLASS_INSTANCE(
109109

110110
int ompi_request_init(void)
111111
{
112-
OBJ_CONSTRUCT(&ompi_request_lock, opal_mutex_t);
112+
OBJ_CONSTRUCT(&ompi_request_lock, opal_recursive_mutex_t);
113113
OBJ_CONSTRUCT(&ompi_request_cond, opal_condition_t);
114114

115115
OBJ_CONSTRUCT(&ompi_request_null, ompi_request_t);

ompi/request/request.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,18 +306,18 @@ typedef struct ompi_request_fns_t {
306306
/**
307307
* Globals used for tracking requests and request completion.
308308
*/
309-
OMPI_DECLSPEC extern opal_pointer_array_t ompi_request_f_to_c_table;
310-
OMPI_DECLSPEC extern size_t ompi_request_waiting;
311-
OMPI_DECLSPEC extern size_t ompi_request_completed;
312-
OMPI_DECLSPEC extern size_t ompi_request_failed;
313-
OMPI_DECLSPEC extern int32_t ompi_request_poll;
314-
OMPI_DECLSPEC extern opal_mutex_t ompi_request_lock;
315-
OMPI_DECLSPEC extern opal_condition_t ompi_request_cond;
309+
OMPI_DECLSPEC extern opal_pointer_array_t ompi_request_f_to_c_table;
310+
OMPI_DECLSPEC extern size_t ompi_request_waiting;
311+
OMPI_DECLSPEC extern size_t ompi_request_completed;
312+
OMPI_DECLSPEC extern size_t ompi_request_failed;
313+
OMPI_DECLSPEC extern int32_t ompi_request_poll;
314+
OMPI_DECLSPEC extern opal_recursive_mutex_t ompi_request_lock;
315+
OMPI_DECLSPEC extern opal_condition_t ompi_request_cond;
316316
OMPI_DECLSPEC extern ompi_predefined_request_t ompi_request_null;
317317
OMPI_DECLSPEC extern ompi_predefined_request_t *ompi_request_null_addr;
318-
OMPI_DECLSPEC extern ompi_request_t ompi_request_empty;
319-
OMPI_DECLSPEC extern ompi_status_public_t ompi_status_empty;
320-
OMPI_DECLSPEC extern ompi_request_fns_t ompi_request_functions;
318+
OMPI_DECLSPEC extern ompi_request_t ompi_request_empty;
319+
OMPI_DECLSPEC extern ompi_status_public_t ompi_status_empty;
320+
OMPI_DECLSPEC extern ompi_request_fns_t ompi_request_functions;
321321

322322
/**
323323
* Initialize the MPI_Request subsystem; invoked during MPI_INIT.

0 commit comments

Comments
 (0)