Fixes for error checking -- properly ignore arguments as they should
be This commit was SVN r7347.
Этот коммит содержится в:
родитель
9053790973
Коммит
c89e8c3712
@ -57,7 +57,9 @@ int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME);
|
||||
}
|
||||
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
|
||||
}
|
||||
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
|
||||
|
||||
/* Errors for the root. Some of these could have been
|
||||
|
@ -55,7 +55,7 @@ int MPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
|
||||
if ((root >= ompi_comm_size(comm)) || (root < 0)) {
|
||||
err = MPI_ERR_ROOT;
|
||||
} else {
|
||||
} else if (MPI_IN_PLACE != sendbuf) {
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
|
||||
}
|
||||
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
|
||||
|
@ -55,11 +55,13 @@ int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
/* Errors for all ranks */
|
||||
|
||||
if ((root >= ompi_comm_size(comm)) || (root < 0)) {
|
||||
err = MPI_ERR_ROOT;
|
||||
} else if (recvcount < 0) {
|
||||
err = MPI_ERR_COUNT;
|
||||
} else if (MPI_DATATYPE_NULL == recvtype) {
|
||||
err = MPI_ERR_TYPE;
|
||||
err = MPI_ERR_ROOT;
|
||||
} else if (MPI_IN_PLACE != recvbuf) {
|
||||
if (recvcount < 0) {
|
||||
err = MPI_ERR_COUNT;
|
||||
} else if (MPI_DATATYPE_NULL == recvtype) {
|
||||
err = MPI_ERR_TYPE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Errors for the root. Some of these could have been
|
||||
|
@ -57,12 +57,16 @@ int MPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ROOT, FUNC_NAME);
|
||||
}
|
||||
|
||||
if (recvcount < 0) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT, FUNC_NAME);
|
||||
}
|
||||
|
||||
if (MPI_DATATYPE_NULL == recvtype) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME);
|
||||
if (MPI_IN_PLACE != recvbuf) {
|
||||
if (recvcount < 0) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_COUNT,
|
||||
FUNC_NAME);
|
||||
}
|
||||
|
||||
if (MPI_DATATYPE_NULL == recvtype) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE,
|
||||
FUNC_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
/* Errors for the root. Some of these could have been
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user