1
1

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 <hjelmn@lanl.gov>
Этот коммит содержится в:
Nathan Hjelm 2016-05-25 15:42:53 -06:00
родитель 8445c885ce
Коммит 9d439664f0
3 изменённых файлов: 3 добавлений и 15 удалений

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

@ -475,10 +475,8 @@ int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype
if (mode == MCA_PML_BASE_SEND_BUFFERED) {
rc = mca_pml_yalla_bsend(&sreq->mxm);
OPAL_THREAD_LOCK(&ompi_request_lock);
sreq->super.ompi.req_status.MPI_ERROR = rc;
ompi_request_complete(&sreq->super.ompi, true);
OPAL_THREAD_UNLOCK(&ompi_request_lock);
*request = &sreq->super.ompi;
return rc;
}
@ -705,10 +703,8 @@ int mca_pml_yalla_start(size_t count, ompi_request_t** requests)
if (req->flags & MCA_PML_YALLA_REQUEST_FLAG_BSEND) {
PML_YALLA_VERBOSE(8, "start bsend request %p", (void *)sreq);
rc = mca_pml_yalla_bsend(&sreq->mxm);
OPAL_THREAD_LOCK(&ompi_request_lock);
sreq->super.ompi.req_status.MPI_ERROR = rc;
ompi_request_complete(&sreq->super.ompi, true);
OPAL_THREAD_UNLOCK(&ompi_request_lock);
if (OMPI_SUCCESS != rc) {
return rc;
}

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

@ -49,11 +49,9 @@ static int mca_pml_yalla_send_request_free(ompi_request_t **request)
PML_YALLA_VERBOSE(9, "free send request *%p=%p", (void *)request, (void *)*request);
OPAL_THREAD_LOCK(&ompi_request_lock);
if (mca_pml_yalla_check_request_state(req)) {
mca_pml_yalla_request_release(req, &ompi_pml_yalla.send_reqs);
}
OPAL_THREAD_UNLOCK(&ompi_request_lock);
*request = MPI_REQUEST_NULL;
return OMPI_SUCCESS;
@ -64,7 +62,7 @@ static int mca_pml_yalla_send_request_cancel(ompi_request_t *request, int flag)
mca_pml_yalla_send_request_t *sreq = (mca_pml_yalla_send_request_t*)request;
mxm_error_t error;
if (request->req_complete) {
if (REQUEST_COMPLETE(request)) {
/*
* This might be a buffered send request which has completed anyway, so
* 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)
PML_YALLA_VERBOSE(9, "free receive request *%p=%p", (void *)request, (void *)*request);
OPAL_THREAD_LOCK(&ompi_request_lock);
if (mca_pml_yalla_check_request_state(req)) {
mca_pml_yalla_request_release(req, &ompi_pml_yalla.recv_reqs);
}
OPAL_THREAD_UNLOCK(&ompi_request_lock);
*request = MPI_REQUEST_NULL;
return OMPI_SUCCESS;
@ -178,13 +174,11 @@ static void mca_pml_yalla_send_completion_cb(void *context)
PML_YALLA_VERBOSE(8, "send request %p completed with status %s", (void *)sreq,
mxm_error_string(sreq->mxm.base.error));
OPAL_THREAD_LOCK(&ompi_request_lock);
ompi_request_complete(&sreq->super.ompi, true);
if (sreq->super.flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED) {
PML_YALLA_VERBOSE(7, "release request %p because free was already called", (void *)sreq);
mca_pml_yalla_request_release(&sreq->super, &ompi_pml_yalla.send_reqs);
}
OPAL_THREAD_UNLOCK(&ompi_request_lock);
}
static void mca_pml_yalla_bsend_completion_cb(void *context)
@ -211,13 +205,11 @@ static void mca_pml_yalla_recv_completion_cb(void *context)
rreq->mxm.tag, rreq->mxm.tag_mask,
rreq->mxm.completion.actual_len);
OPAL_THREAD_LOCK(&ompi_request_lock);
ompi_request_complete(&rreq->super.ompi, true);
if (rreq->super.flags & MCA_PML_YALLA_REQUEST_FLAG_FREE_CALLED) {
PML_YALLA_VERBOSE(7, "release request %p because free was already called", (void *)rreq);
mca_pml_yalla_request_release(&rreq->super, &ompi_pml_yalla.recv_reqs);
}
OPAL_THREAD_UNLOCK(&ompi_request_lock);
}
static void mca_pml_yalla_send_request_construct(mca_pml_yalla_send_request_t* sreq)

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

@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
@ -61,7 +61,7 @@ void mca_pml_yalla_init_reqs(void);
#define PML_YALLA_RESET_OMPI_REQ(_ompi_req, _state) \
{ \
(_ompi_req)->req_state = _state; \
(_ompi_req)->req_complete = false; \
(_ompi_req)->req_complete = REQUEST_PENDING; \
(_ompi_req)->req_status._cancelled = false; \
}