Skip to content

Commit b4ff061

Browse files
committed
pml/yalla: update for request changes
This commit brings the pml/yalla component up to date with the request rework changes. Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from open-mpi/ompi@9d43966) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 24efffb commit b4ff061

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

ompi/mca/pml/yalla/pml_yalla.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,8 @@ int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype
478478

479479
if (mode == MCA_PML_BASE_SEND_BUFFERED) {
480480
rc = mca_pml_yalla_bsend(&sreq->mxm);
481-
OPAL_THREAD_LOCK(&ompi_request_lock);
482481
sreq->super.ompi.req_status.MPI_ERROR = rc;
483482
ompi_request_complete(&sreq->super.ompi, true);
484-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
485483
*request = &sreq->super.ompi;
486484
return rc;
487485
}
@@ -708,10 +706,8 @@ int mca_pml_yalla_start(size_t count, ompi_request_t** requests)
708706
if (req->flags & MCA_PML_YALLA_REQUEST_FLAG_BSEND) {
709707
PML_YALLA_VERBOSE(8, "start bsend request %p", (void *)sreq);
710708
rc = mca_pml_yalla_bsend(&sreq->mxm);
711-
OPAL_THREAD_LOCK(&ompi_request_lock);
712709
sreq->super.ompi.req_status.MPI_ERROR = rc;
713710
ompi_request_complete(&sreq->super.ompi, true);
714-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
715711
if (OMPI_SUCCESS != rc) {
716712
return rc;
717713
}

ompi/mca/pml/yalla/pml_yalla_request.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ static int mca_pml_yalla_send_request_free(ompi_request_t **request)
4949

5050
PML_YALLA_VERBOSE(9, "free send request *%p=%p", (void *)request, (void *)*request);
5151

52-
OPAL_THREAD_LOCK(&ompi_request_lock);
5352
if (mca_pml_yalla_check_request_state(req)) {
5453
mca_pml_yalla_request_release(req, &ompi_pml_yalla.send_reqs);
5554
}
56-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
5755

5856
*request = MPI_REQUEST_NULL;
5957
return OMPI_SUCCESS;
@@ -64,7 +62,7 @@ static int mca_pml_yalla_send_request_cancel(ompi_request_t *request, int flag)
6462
mca_pml_yalla_send_request_t *sreq = (mca_pml_yalla_send_request_t*)request;
6563
mxm_error_t error;
6664

67-
if (request->req_complete) {
65+
if (REQUEST_COMPLETE(request)) {
6866
/*
6967
* This might be a buffered send request which has completed anyway, so
7068
* we cannot cancel it anymore. Just hope for the best.
@@ -90,11 +88,9 @@ static int mca_pml_yalla_recv_request_free(ompi_request_t **request)
9088

9189
PML_YALLA_VERBOSE(9, "free receive request *%p=%p", (void *)request, (void *)*request);
9290

93-
OPAL_THREAD_LOCK(&ompi_request_lock);
9491
if (mca_pml_yalla_check_request_state(req)) {
9592
mca_pml_yalla_request_release(req, &ompi_pml_yalla.recv_reqs);
9693
}
97-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
9894

9995
*request = MPI_REQUEST_NULL;
10096
return OMPI_SUCCESS;
@@ -178,13 +174,11 @@ static void mca_pml_yalla_send_completion_cb(void *context)
178174
PML_YALLA_VERBOSE(8, "send request %p completed with status %s", (void *)sreq,
179175
mxm_error_string(sreq->mxm.base.error));
180176

181-
OPAL_THREAD_LOCK(&ompi_request_lock);
182177
ompi_request_complete(&sreq->super.ompi, true);
183178
if (sreq->super.flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED) {
184179
PML_YALLA_VERBOSE(7, "release request %p because free was already called", (void *)sreq);
185180
mca_pml_yalla_request_release(&sreq->super, &ompi_pml_yalla.send_reqs);
186181
}
187-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
188182
}
189183

190184
static void mca_pml_yalla_bsend_completion_cb(void *context)
@@ -211,13 +205,11 @@ static void mca_pml_yalla_recv_completion_cb(void *context)
211205
rreq->mxm.tag, rreq->mxm.tag_mask,
212206
rreq->mxm.completion.actual_len);
213207

214-
OPAL_THREAD_LOCK(&ompi_request_lock);
215208
ompi_request_complete(&rreq->super.ompi, true);
216209
if (rreq->super.flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED) {
217210
PML_YALLA_VERBOSE(7, "release request %p because free was already called", (void *)rreq);
218211
mca_pml_yalla_request_release(&rreq->super, &ompi_pml_yalla.recv_reqs);
219212
}
220-
OPAL_THREAD_UNLOCK(&ompi_request_lock);
221213
}
222214

223215
static void mca_pml_yalla_send_request_construct(mca_pml_yalla_send_request_t* sreq)

ompi/mca/pml/yalla/pml_yalla_request.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
4-
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
4+
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
55
* reserved.
66
* $COPYRIGHT$
77
*
@@ -53,7 +53,7 @@ void mca_pml_yalla_init_reqs(void);
5353
#define PML_YALLA_RESET_OMPI_REQ(_ompi_req, _state) \
5454
{ \
5555
(_ompi_req)->req_state = _state; \
56-
(_ompi_req)->req_complete = false; \
56+
(_ompi_req)->req_complete = REQUEST_PENDING; \
5757
(_ompi_req)->req_status._cancelled = false; \
5858
}
5959

0 commit comments

Comments
 (0)