- Do additional checks in case of MPI_PARAM_CHECK for NULL pointers.
This commit was SVN r8487.
Этот коммит содержится в:
родитель
e59291ebd3
Коммит
9b2c23bead
@ -37,11 +37,17 @@ int MPI_Waitall(int count, MPI_Request *requests, MPI_Status *statuses)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
if ( MPI_PARAM_CHECK ) {
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
int i;
|
||||||
rc = MPI_SUCCESS;
|
rc = MPI_SUCCESS;
|
||||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||||
if (requests == NULL) {
|
if (requests == NULL) {
|
||||||
rc = MPI_ERR_REQUEST;
|
rc = MPI_ERR_REQUEST;
|
||||||
}
|
}
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
if (NULL == requests[i]) {
|
||||||
|
rc = MPI_ERR_REQUEST;
|
||||||
|
}
|
||||||
|
}
|
||||||
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
||||||
}
|
}
|
||||||
rc = ompi_request_wait_all(count, requests, statuses);
|
rc = ompi_request_wait_all(count, requests, statuses);
|
||||||
|
@ -39,11 +39,17 @@ int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
if ( MPI_PARAM_CHECK ) {
|
if ( MPI_PARAM_CHECK ) {
|
||||||
|
int i;
|
||||||
rc = MPI_SUCCESS;
|
rc = MPI_SUCCESS;
|
||||||
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
||||||
if (requests == NULL) {
|
if (requests == NULL) {
|
||||||
rc = MPI_ERR_REQUEST;
|
rc = MPI_ERR_REQUEST;
|
||||||
}
|
}
|
||||||
|
for (i = 0; i < count; i++) {
|
||||||
|
if (NULL == requests[i]) {
|
||||||
|
rc = MPI_ERR_REQUEST;
|
||||||
|
}
|
||||||
|
}
|
||||||
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
|
||||||
}
|
}
|
||||||
rc = ompi_request_wait_any(count, requests, index, status);
|
rc = ompi_request_wait_any(count, requests, index, status);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user