Skip to content

Commit b25a8c3

Browse files
author
Thananon Patinyasakdikul
committed
Completely removed ompi_request_lock and ompi_request_cond as we dont need them anymore.
Signed-off-by: Thananon Patinyasakdikul <[email protected]>
1 parent 0c8359b commit b25a8c3

File tree

13 files changed

+2
-36
lines changed

13 files changed

+2
-36
lines changed

ompi/mca/bcol/iboffload/bcol_iboffload_component.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,8 @@ static int progress_one_device(mca_bcol_iboffload_device_t *device)
931931

932932
if (coll_request->n_frag_mpi_complete ==
933933
coll_request->n_fragments) {
934-
coll_request->super.req_complete = true;
935-
opal_condition_broadcast(&ompi_request_cond);
936-
IBOFFLOAD_VERBOSE(10, ("After opal_condition_broadcast.\n"));
934+
OPAL_ATOMIC_SWAP_PTR(&coll_request->super.reg_complete, REQUEST_COMPLETED);
935+
IBOFFLOAD_VERBOSE(10, ("After request completion.\n"));
937936
}
938937

939938
rc = handle_collfrag_done(coll_frag, coll_request, device);

ompi/mca/coll/libnbc/coll_libnbc_component.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ ompi_coll_libnbc_progress(void)
283283
else {
284284
request->super.req_status.MPI_ERROR = res;
285285
}
286-
OPAL_THREAD_LOCK(&ompi_request_lock);
287286
ompi_request_complete(&request->super, true);
288-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
289287
}
290288
OPAL_THREAD_LOCK(&mca_coll_libnbc_component.lock);
291289
}

ompi/mca/coll/portals4/coll_portals4_allreduce.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,7 @@ int
417417
ompi_coll_portals4_iallreduce_intra_fini(struct ompi_coll_portals4_request_t *request)
418418
{
419419
allreduce_kary_tree_bottom(request);
420-
421-
OPAL_THREAD_LOCK(&ompi_request_lock);
422420
ompi_request_complete(&request->super, true);
423-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
424421

425422
return (OMPI_SUCCESS);
426423
}

ompi/mca/coll/portals4/coll_portals4_barrier.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ ompi_coll_portals4_ibarrier_intra_fini(ompi_coll_portals4_request_t *request)
311311
return OMPI_ERROR;
312312
}
313313

314-
OPAL_THREAD_LOCK(&ompi_request_lock);
315314
ompi_request_complete(&request->super, true);
316-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
317315

318316
return OMPI_SUCCESS;
319317
}

ompi/mca/coll/portals4/coll_portals4_bcast.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,9 +941,7 @@ ompi_coll_portals4_ibcast_intra_fini(ompi_coll_portals4_request_t *request)
941941

942942
post_bcast_data(request);
943943

944-
OPAL_THREAD_LOCK(&ompi_request_lock);
945944
ompi_request_complete(&request->super, true);
946-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
947945

948946
opal_output_verbose(10, ompi_coll_base_framework.framework_output, "ibcast_intra_fini");
949947
return (OMPI_SUCCESS);

ompi/mca/coll/portals4/coll_portals4_gather.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,9 +1132,7 @@ ompi_coll_portals4_gather_intra_binomial_bottom(struct ompi_communicator_t *comm
11321132

11331133
request->super.req_status.MPI_ERROR = OMPI_SUCCESS;
11341134

1135-
OPAL_THREAD_LOCK(&ompi_request_lock);
11361135
ompi_request_complete(&request->super, true);
1137-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
11381136

11391137
OPAL_OUTPUT_VERBOSE((10, ompi_coll_base_framework.framework_output,
11401138
"coll:portals4:gather_intra_binomial_bottom exit rank %d", request->u.gather.my_rank));
@@ -1195,9 +1193,7 @@ ompi_coll_portals4_gather_intra_linear_bottom(struct ompi_communicator_t *comm,
11951193

11961194
request->super.req_status.MPI_ERROR = OMPI_SUCCESS;
11971195

1198-
OPAL_THREAD_LOCK(&ompi_request_lock);
11991196
ompi_request_complete(&request->super, true);
1200-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
12011197

12021198
OPAL_OUTPUT_VERBOSE((10, ompi_coll_base_framework.framework_output,
12031199
"coll:portals4:gather_intra_linear_bottom exit rank %d", request->u.gather.my_rank));

ompi/mca/coll/portals4/coll_portals4_reduce.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,7 @@ ompi_coll_portals4_ireduce_intra_fini(ompi_coll_portals4_request_t *request)
441441
if (OMPI_SUCCESS != ret)
442442
return ret;
443443

444-
OPAL_THREAD_LOCK(&ompi_request_lock);
445444
ompi_request_complete(&request->super, true);
446-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
447445

448446
return (OMPI_SUCCESS);
449447
}

ompi/mca/coll/portals4/coll_portals4_scatter.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,7 @@ ompi_coll_portals4_scatter_intra_linear_bottom(struct ompi_communicator_t *comm,
637637

638638
request->super.req_status.MPI_ERROR = OMPI_SUCCESS;
639639

640-
OPAL_THREAD_LOCK(&ompi_request_lock);
641640
ompi_request_complete(&request->super, true);
642-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
643641

644642
OPAL_OUTPUT_VERBOSE((10, ompi_coll_base_framework.framework_output,
645643
"coll:portals4:scatter_intra_linear_bottom exit rank %d", request->u.scatter.my_rank));

ompi/mca/osc/portals4/osc_portals4_component.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ progress_callback(void)
229229
opal_atomic_add_size_t(&req->super.req_status._ucount, ev.mlength);
230230
ops = opal_atomic_add_32(&req->ops_committed, 1);
231231
if (ops == req->ops_expected) {
232-
OPAL_THREAD_LOCK(&ompi_request_lock);
233232
ompi_request_complete(&req->super, true);
234-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
235233
}
236234
}
237235
}

ompi/mca/pml/cm/pml_cm_recvreq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mca_pml_cm_recv_request_free(struct ompi_request_t** request)
2828

2929
assert( false == recvreq->req_free_called );
3030

31-
OPAL_THREAD_LOCK(&ompi_request_lock);
3231
recvreq->req_free_called = true;
3332
if( true == recvreq->req_pml_complete ) {
3433
if( MCA_PML_CM_REQUEST_RECV_THIN == recvreq->req_pml_type ) {
@@ -38,8 +37,6 @@ mca_pml_cm_recv_request_free(struct ompi_request_t** request)
3837
}
3938
}
4039

41-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
42-
4340
*request = MPI_REQUEST_NULL;
4441
return OMPI_SUCCESS;
4542
}

0 commit comments

Comments
 (0)