Fixes trac:532
* Remove an extra OMPI_REQUEST_INIT() from the grequest constructor (it was already invoked by the parent MPI_Request constructor) * Set the state of the generalized request to ACTIVE (because this is invoked from MPI_GREQUEST_START -- analogous to MPI_START) * Before invoking the query function in MPI_REQUEST_COMPLETE, set the status on the base request to ompi_status_empty. This gives a set of default values for the request, including one for status.MPI_ERROR = MPI_SUCCESS (because we check the value of MPI_ERROR in MPI_TEST* and MPI_WAIT* processing, and use it to determine whether the upper-level API call should raise an MPI exception or not). This commit was SVN r12337. The following Trac tickets were found above: Ticket 532 --> https://svn.open-mpi.org/trac/ompi/ticket/532
Этот коммит содержится в:
родитель
14c49b226a
Коммит
477424c537
@ -44,7 +44,6 @@ static int ompi_grequest_cancel(ompi_request_t* req, int flag)
|
|||||||
|
|
||||||
static void ompi_grequest_construct(ompi_grequest_t* greq)
|
static void ompi_grequest_construct(ompi_grequest_t* greq)
|
||||||
{
|
{
|
||||||
OMPI_REQUEST_INIT(&greq->greq_base, false);
|
|
||||||
greq->greq_base.req_free = ompi_grequest_free;
|
greq->greq_base.req_free = ompi_grequest_free;
|
||||||
greq->greq_base.req_cancel = ompi_grequest_cancel;
|
greq->greq_base.req_cancel = ompi_grequest_cancel;
|
||||||
greq->greq_base.req_type = OMPI_REQUEST_GEN;
|
greq->greq_base.req_type = OMPI_REQUEST_GEN;
|
||||||
@ -75,6 +74,7 @@ int ompi_grequest_start(
|
|||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
greq->greq_base.req_state = OMPI_REQUEST_ACTIVE;
|
||||||
greq->greq_state = gstate;
|
greq->greq_state = gstate;
|
||||||
greq->greq_query.c_query = gquery_fn;
|
greq->greq_query.c_query = gquery_fn;
|
||||||
greq->greq_free.c_free = gfree_fn;
|
greq->greq_free.c_free = gfree_fn;
|
||||||
@ -88,6 +88,7 @@ int ompi_grequest_complete(ompi_grequest_t* grequest)
|
|||||||
int rc = OMPI_SUCCESS;
|
int rc = OMPI_SUCCESS;
|
||||||
OPAL_THREAD_LOCK(&ompi_request_lock);
|
OPAL_THREAD_LOCK(&ompi_request_lock);
|
||||||
grequest->greq_base.req_complete = true;
|
grequest->greq_base.req_complete = true;
|
||||||
|
grequest->greq_base.req_status = ompi_status_empty;
|
||||||
if(grequest->greq_query.c_query != NULL)
|
if(grequest->greq_query.c_query != NULL)
|
||||||
rc = grequest->greq_query.c_query(grequest->greq_state, &grequest->greq_base.req_status);
|
rc = grequest->greq_query.c_query(grequest->greq_state, &grequest->greq_base.req_status);
|
||||||
if(ompi_request_waiting)
|
if(ompi_request_waiting)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user