mpi: MPI_IN_PLACE is not a valid argument of MPI_All* and MPI_Iall* with an inter communicator
Этот коммит содержится в:
родитель
9b31530d5c
Коммит
256976a108
@ -84,7 +84,8 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
err = MPI_ERR_TYPE;
|
||||
} else if (recvcount < 0) {
|
||||
err = MPI_ERR_COUNT;
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE != sendbuf) {
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
|
||||
|
@ -87,7 +87,8 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
if (ompi_comm_invalid(comm)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_DATATYPE_NULL == recvtype) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME);
|
||||
|
@ -79,7 +79,8 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
|
||||
int ret = OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OP, msg);
|
||||
free(msg);
|
||||
return ret;
|
||||
} else if( MPI_IN_PLACE == recvbuf ) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf ) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER,
|
||||
FUNC_NAME);
|
||||
} else if( (sendbuf == recvbuf) &&
|
||||
|
@ -74,7 +74,8 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
if (ompi_comm_invalid(comm)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
} else {
|
||||
|
@ -96,6 +96,7 @@ int MPI_Alltoallv(const void *sendbuf, const int sendcounts[],
|
||||
|
||||
if ((NULL == sendcounts) || (NULL == sdispls) ||
|
||||
(NULL == recvcounts) || (NULL == rdispls) ||
|
||||
(MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
|
||||
|
||||
if ((NULL == sendcounts) || (NULL == sdispls) || (NULL == sendtypes) ||
|
||||
(NULL == recvcounts) || (NULL == rdispls) || (NULL == recvtypes) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
(MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,8 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
err = MPI_ERR_TYPE;
|
||||
} else if (recvcount < 0) {
|
||||
err = MPI_ERR_COUNT;
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE != sendbuf) {
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
|
||||
|
@ -87,7 +87,8 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
if (ompi_comm_invalid(comm)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_DATATYPE_NULL == recvtype) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_TYPE, FUNC_NAME);
|
||||
|
@ -79,7 +79,8 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
|
||||
int ret = OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OP, msg);
|
||||
free(msg);
|
||||
return ret;
|
||||
} else if( MPI_IN_PLACE == recvbuf ) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf ) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_BUFFER,
|
||||
FUNC_NAME);
|
||||
} else if( (sendbuf == recvbuf) &&
|
||||
|
@ -70,7 +70,8 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
if (ompi_comm_invalid(comm)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == sendbuf) {
|
||||
|
@ -92,6 +92,7 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
|
||||
|
||||
if ((NULL == sendcounts) || (NULL == sdispls) ||
|
||||
(NULL == recvcounts) || (NULL == rdispls) ||
|
||||
(MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == sendbuf) {
|
||||
|
@ -88,6 +88,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
|
||||
|
||||
if ((NULL == sendcounts) || (NULL == sdispls) || (NULL == sendtypes) ||
|
||||
(NULL == recvcounts) || (NULL == rdispls) || (NULL == recvtypes) ||
|
||||
(MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
} else if (MPI_IN_PLACE == sendbuf) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user