1
1

- Do additional checks in case of MPI_PARAM_CHECK for NULL pointers.

This commit was SVN r8487.
Этот коммит содержится в:
Rainer Keller 2005-12-13 08:13:13 +00:00
родитель e59291ebd3
Коммит 9b2c23bead
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -37,11 +37,17 @@ int MPI_Waitall(int count, MPI_Request *requests, MPI_Status *statuses)
{
int rc;
if ( MPI_PARAM_CHECK ) {
int i;
rc = MPI_SUCCESS;
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (requests == NULL) {
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);
}
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;
if ( MPI_PARAM_CHECK ) {
int i;
rc = MPI_SUCCESS;
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (requests == NULL) {
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);
}
rc = ompi_request_wait_any(count, requests, index, status);