Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ompi/mca/pml/cm/pml_cm_recvreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,12 @@ do { \
do { \
assert( false == recvreq->req_base.req_pml_complete ); \
\
OPAL_THREAD_LOCK(&ompi_request_lock); \
\
if( true == recvreq->req_base.req_free_called ) { \
MCA_PML_CM_THIN_RECV_REQUEST_RETURN( recvreq ); \
} else { \
recvreq->req_base.req_pml_complete = true; \
ompi_request_complete( &(recvreq->req_base.req_ompi), true ); \
} \
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
} while(0)


Expand All @@ -331,8 +328,6 @@ do { \
do { \
assert( false == recvreq->req_base.req_pml_complete ); \
\
OPAL_THREAD_LOCK(&ompi_request_lock); \
\
if( true == recvreq->req_base.req_free_called ) { \
MCA_PML_CM_HVY_RECV_REQUEST_RETURN( recvreq ); \
} else { \
Expand All @@ -345,7 +340,6 @@ do { \
recvreq->req_base.req_pml_complete = true; \
ompi_request_complete( &(recvreq->req_base.req_ompi), true ); \
} \
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
} while(0)


Expand Down
10 changes: 3 additions & 7 deletions ompi/mca/pml/cm/pml_cm_sendreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ do { \
#define MCA_PML_CM_SEND_REQUEST_START_SETUP(req_send) \
do { \
(req_send)->req_base.req_pml_complete = false; \
(req_send)->req_base.req_ompi.req_complete = false; \
(req_send)->req_base.req_ompi.req_complete = REQUEST_PENDING; \
(req_send)->req_base.req_ompi.req_state = \
OMPI_REQUEST_ACTIVE; \
(req_send)->req_base.req_ompi.req_status._cancelled = 0; \
Expand Down Expand Up @@ -409,8 +409,7 @@ do {
mca_pml_base_bsend_request_free(sendreq->req_buff); \
} \
\
OPAL_THREAD_LOCK(&ompi_request_lock); \
if( false == sendreq->req_send.req_base.req_ompi.req_complete ) { \
if( !REQUEST_COMPLETE(&sendreq->req_send.req_base.req_ompi)) { \
/* Should only be called for long messages (maybe synchronous) */ \
ompi_request_complete(&(sendreq->req_send.req_base.req_ompi), true); \
} \
Expand All @@ -426,7 +425,6 @@ do {
&offset); \
} \
} \
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
} while (0)


Expand Down Expand Up @@ -455,8 +453,7 @@ do {
do { \
assert( false == sendreq->req_send.req_base.req_pml_complete ); \
\
OPAL_THREAD_LOCK(&ompi_request_lock); \
if( false == sendreq->req_send.req_base.req_ompi.req_complete ) { \
if( !REQUEST_COMPLETE(&sendreq->req_send.req_base.req_ompi)) { \
/* Should only be called for long messages (maybe synchronous) */ \
ompi_request_complete(&(sendreq->req_send.req_base.req_ompi), true); \
} \
Expand All @@ -465,7 +462,6 @@ do { \
if( sendreq->req_send.req_base.req_free_called ) { \
MCA_PML_CM_THIN_SEND_REQUEST_RETURN( sendreq ); \
} \
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
} while (0)


Expand Down
4 changes: 0 additions & 4 deletions ompi/mca/pml/yalla/pml_yalla.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
10 changes: 1 addition & 9 deletions ompi/mca/pml/yalla/pml_yalla_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/pml/yalla/pml_yalla_request.h
Original file line number Diff line number Diff line change
@@ -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$
*
Expand Down Expand Up @@ -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; \
}

Expand Down
2 changes: 1 addition & 1 deletion oshmem/mca/atomic/mxm/atomic_mxm.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OSHMEM_MODULE_DECLSPEC extern mca_atomic_base_component_1_0_0_t
mca_atomic_mxm_component;

/* this component works with spml:ikrit only */
extern mca_spml_ikrit_t *mca_spml_self;
extern mca_spml_ikrit_t *mca_atomic_mxm_spml_self;

OSHMEM_DECLSPEC void atomic_mxm_lock(int pe);
OSHMEM_DECLSPEC void atomic_mxm_unlock(int pe);
Expand Down
4 changes: 2 additions & 2 deletions oshmem/mca/atomic/mxm/atomic_mxm_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const char *mca_atomic_mxm_component_version_string =
/*
* Global variable
*/
mca_spml_ikrit_t *mca_spml_self = NULL;
mca_spml_ikrit_t *mca_atomic_mxm_spml_self = NULL;

/*
* Local function
Expand Down Expand Up @@ -96,7 +96,7 @@ static int _mxm_open(void)
"Can not use atomic/mxm because spml ikrit component disabled");
return OSHMEM_ERR_NOT_AVAILABLE;
}
mca_spml_self = (mca_spml_ikrit_t *)mca_spml.self;
mca_atomic_mxm_spml_self = (mca_spml_ikrit_t *) mca_spml.self;

return OSHMEM_SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions oshmem/mca/atomic/mxm/atomic_mxm_cswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ int mca_atomic_mxm_cswap(void *target,

/* mxm request init */
sreq.base.state = MXM_REQ_NEW;
sreq.base.mq = mca_spml_self->mxm_mq;
sreq.base.conn = mca_spml_self->mxm_peers[pe]->mxm_hw_rdma_conn;
sreq.base.mq = mca_atomic_mxm_spml_self->mxm_mq;
sreq.base.conn = mca_atomic_mxm_spml_self->mxm_peers[pe]->mxm_hw_rdma_conn;
sreq.base.completed_cb = NULL;
sreq.base.data_type = MXM_REQ_DATA_BUFFER;

Expand Down
4 changes: 2 additions & 2 deletions oshmem/mca/atomic/mxm/atomic_mxm_fadd.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ int mca_atomic_mxm_fadd(void *target,

/* mxm request init */
sreq.base.state = MXM_REQ_NEW;
sreq.base.mq = mca_spml_self->mxm_mq;
sreq.base.conn = mca_spml_self->mxm_peers[pe]->mxm_hw_rdma_conn;
sreq.base.mq = mca_atomic_mxm_spml_self->mxm_mq;
sreq.base.conn = mca_atomic_mxm_spml_self->mxm_peers[pe]->mxm_hw_rdma_conn;
sreq.base.completed_cb = NULL;
sreq.base.data_type = MXM_REQ_DATA_BUFFER;

Expand Down