Fix a cornercase with MPI_PROC_NULL persistent requests
Handle OMPI_REQUEST_NOOP in MPI_Startall rather than PML cmr=v1.8.2:reviewer=bosilca:ticket=4764 This commit was SVN r32213. The following Trac tickets were found above: Ticket 4764 --> https://svn.open-mpi.org/trac/ompi/ticket/4764
Этот коммит содержится в:
родитель
d3ff5d77e1
Коммит
77184b5c4c
@ -11,8 +11,6 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,20 +37,6 @@ int mca_pml_bfo_start(size_t count, ompi_request_t** requests)
|
||||
if(NULL == pml_request) {
|
||||
continue;
|
||||
}
|
||||
if (OMPI_REQUEST_NOOP == requests[i]->req_type) {
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
* already active, return OMPI_ERR_REQUEST err.
|
||||
* Otherwise, mark it active so we can correctly handle it in
|
||||
* the wait*.
|
||||
*/
|
||||
if( OMPI_REQUEST_INACTIVE == requests[i]->req_state ) {
|
||||
requests[i]->req_state = OMPI_REQUEST_ACTIVE;
|
||||
continue;
|
||||
} else {
|
||||
return OMPI_ERR_REQUEST;
|
||||
}
|
||||
}
|
||||
if (OMPI_REQUEST_PML != requests[i]->req_type) {
|
||||
continue;
|
||||
}
|
||||
|
@ -10,8 +10,6 @@
|
||||
* Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -38,24 +36,10 @@ mca_pml_cm_start(size_t count, ompi_request_t** requests)
|
||||
for (i = 0 ; i < count ; i++) {
|
||||
mca_pml_cm_request_t *pml_request =
|
||||
(mca_pml_cm_request_t*)requests[i];
|
||||
if (NULL == pml_request) {
|
||||
if (OMPI_REQUEST_PML != requests[i]->req_type) {
|
||||
continue;
|
||||
}
|
||||
if (OMPI_REQUEST_NOOP == requests[i]->req_type) {
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
* already active, return OMPI_ERR_REQUEST err.
|
||||
* Otherwise, mark it active so we can correctly handle it in
|
||||
* the wait*.
|
||||
*/
|
||||
if( OMPI_REQUEST_INACTIVE == requests[i]->req_state ) {
|
||||
requests[i]->req_state = OMPI_REQUEST_ACTIVE;
|
||||
continue;
|
||||
} else {
|
||||
return OMPI_ERR_REQUEST;
|
||||
}
|
||||
}
|
||||
if (OMPI_REQUEST_PML != requests[i]->req_type) {
|
||||
if (NULL == pml_request) {
|
||||
continue;
|
||||
}
|
||||
/* If the persistent request is currebtly active - obtain the
|
||||
|
@ -11,8 +11,6 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -39,20 +37,6 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests)
|
||||
if(NULL == pml_request) {
|
||||
continue;
|
||||
}
|
||||
if (OMPI_REQUEST_NOOP == requests[i]->req_type) {
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
* already active, return OMPI_ERR_REQUEST err.
|
||||
* Otherwise, mark it active so we can correctly handle it in
|
||||
* the wait*.
|
||||
*/
|
||||
if( OMPI_REQUEST_INACTIVE == requests[i]->req_state ) {
|
||||
requests[i]->req_state = OMPI_REQUEST_ACTIVE;
|
||||
continue;
|
||||
} else {
|
||||
return OMPI_ERR_REQUEST;
|
||||
}
|
||||
}
|
||||
if (OMPI_REQUEST_PML != requests[i]->req_type) {
|
||||
continue;
|
||||
}
|
||||
|
@ -10,8 +10,6 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -67,7 +65,6 @@ int MPI_Start(MPI_Request *request)
|
||||
|
||||
switch((*request)->req_type) {
|
||||
case OMPI_REQUEST_PML:
|
||||
case OMPI_REQUEST_NOOP:
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
ret = MCA_PML_CALL(start(1, request));
|
||||
@ -75,6 +72,18 @@ int MPI_Start(MPI_Request *request)
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return ret;
|
||||
|
||||
case OMPI_REQUEST_NOOP:
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
* already active, fall back to the error case in the default.
|
||||
* Otherwise, mark it active so we can correctly handle it in
|
||||
* the wait*.
|
||||
*/
|
||||
if( OMPI_REQUEST_INACTIVE == (*request)->req_state ) {
|
||||
(*request)->req_state = OMPI_REQUEST_ACTIVE;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
default:
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME);
|
||||
}
|
||||
|
@ -12,6 +12,8 @@
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -42,6 +44,7 @@ static const char FUNC_NAME[] = "MPI_Startall";
|
||||
|
||||
int MPI_Startall(int count, MPI_Request requests[])
|
||||
{
|
||||
int i;
|
||||
int ret = OMPI_SUCCESS;
|
||||
|
||||
MEMCHECKER(
|
||||
@ -52,7 +55,6 @@ int MPI_Startall(int count, MPI_Request requests[])
|
||||
);
|
||||
|
||||
if ( MPI_PARAM_CHECK ) {
|
||||
int i;
|
||||
int rc = MPI_SUCCESS;
|
||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||
if (NULL == requests) {
|
||||
@ -74,6 +76,19 @@ int MPI_Startall(int count, MPI_Request requests[])
|
||||
|
||||
OPAL_CR_ENTER_LIBRARY();
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
if (OMPI_REQUEST_NOOP == requests[i]->req_type) {
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
* already active, fall back to the error case in the default.
|
||||
* Otherwise, mark it active so we can correctly handle it in
|
||||
* the wait*.
|
||||
*/
|
||||
if( OMPI_REQUEST_INACTIVE == requests[i]->req_state ) {
|
||||
requests[i]->req_state = OMPI_REQUEST_ACTIVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = MCA_PML_CALL(start(count, requests));
|
||||
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user