Fix the cornercase with MPI_PROC_NULL persistent requests.
This corner case is now handled in the pml so the same code is invoked for both MPI_Start and MPI_Startall. This also correctly report an error if MPI_Startall is invoked twice on a MPI_PROC_NULL persistent request. This commit was SVN r32139.
Этот коммит содержится в:
родитель
a16e4c5bf9
Коммит
8d3bea2771
@ -11,6 +11,8 @@
|
||||
* 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
|
||||
@ -37,6 +39,20 @@ 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,6 +10,8 @@
|
||||
* 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
|
||||
@ -36,10 +38,24 @@ 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 (OMPI_REQUEST_PML != requests[i]->req_type) {
|
||||
if (NULL == pml_request) {
|
||||
continue;
|
||||
}
|
||||
if (NULL == pml_request) {
|
||||
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;
|
||||
}
|
||||
/* If the persistent request is currebtly active - obtain the
|
||||
|
@ -11,6 +11,8 @@
|
||||
* 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
|
||||
@ -37,6 +39,20 @@ 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,6 +10,8 @@
|
||||
* 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
|
||||
@ -65,6 +67,7 @@ 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));
|
||||
@ -72,6 +75,7 @@ int MPI_Start(MPI_Request *request)
|
||||
OPAL_CR_EXIT_LIBRARY();
|
||||
return ret;
|
||||
|
||||
#if 0
|
||||
case OMPI_REQUEST_NOOP:
|
||||
/**
|
||||
* We deal with a MPI_PROC_NULL request. If the request is
|
||||
@ -83,6 +87,7 @@ int MPI_Start(MPI_Request *request)
|
||||
(*request)->req_state = OMPI_REQUEST_ACTIVE;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_REQUEST, FUNC_NAME);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user