Skip to content

Commit dadc6fb

Browse files
author
Ralph Castain
authored
Merge pull request #2448 from thananon/remove_request_lock
Completely removed ompi_request_lock and ompi_request_cond
2 parents 33d2988 + 6c5553c commit dadc6fb

15 files changed

+2
-55
lines changed

ompi/debuggers/ompi_mpihandles_dll.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ struct mpidbg_name_map_t *mpidbg_status_name_map = NULL;
8686
* cases like the above with compilers that require the symbol (like
8787
* Sun Studio) we add in these definitions here.
8888
*/
89-
size_t ompi_request_completed;
90-
opal_condition_t ompi_request_cond;
91-
size_t ompi_request_waiting;
92-
opal_mutex_t ompi_request_lock;
9389
opal_mutex_t opal_event_lock;
9490
int opal_progress_spin_count;
9591
bool opal_mutex_check_locks;

ompi/debuggers/ompi_msgq_dll.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,10 +1066,6 @@ static void dump_request( mqs_taddr_t current_item, mqs_pending_operation *res )
10661066
printf( "+===============================================+\n\n" );
10671067
}
10681068

1069-
/**
1070-
* TODO: ompi_request_completed can be used to detect any changes in the request handles.
1071-
*/
1072-
10731069
/**
10741070
* Handle the send queue as well as the receive queue. The unexpected queue
10751071
* is a whole different story ...

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
@@ -286,9 +286,7 @@ ompi_coll_libnbc_progress(void)
286286
else {
287287
request->super.req_status.MPI_ERROR = res;
288288
}
289-
OPAL_THREAD_LOCK(&ompi_request_lock);
290289
ompi_request_complete(&request->super, true);
291-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
292290
}
293291
OPAL_THREAD_LOCK(&mca_coll_libnbc_component.lock);
294292
}

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));

0 commit comments

Comments
 (0)