1
1

mpi: fail with MPI_ERR_INTERN if MPI_IN_PLACE is used with MPI_I*alltoall*

currently, MPI fails with MPI_ERR_ARG. This is counter intuitive since
MPI_IN_PLACE is a legitimate parameter. MPI_IN_PLACE might not be correctly
implemented by all the non blocking modules (libnbc, ...) so fail with
MPI_ERR_INTERN for the time being.
Этот коммит содержится в:
Gilles Gouaillardet 2015-10-20 14:11:06 +09:00
родитель b17c89c1e6
Коммит 2bd77ed4f9
6 изменённых файлов: 35 добавлений и 5 удалений

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

@ -70,9 +70,14 @@ 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 == sendbuf || MPI_IN_PLACE == recvbuf) {
} else if (MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
} else {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);

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

@ -92,8 +92,13 @@ 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 || MPI_IN_PLACE == recvbuf) {
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
}
size = OMPI_COMM_IS_INTER(comm)?ompi_comm_remote_size(comm):ompi_comm_size(comm);

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

@ -88,8 +88,13 @@ 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 || MPI_IN_PLACE == recvbuf) {
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
}
size = OMPI_COMM_IS_INTER(comm)?ompi_comm_remote_size(comm):ompi_comm_size(comm);

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

@ -74,6 +74,11 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send
} else if (MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
} else {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);

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

@ -98,8 +98,13 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
if ((NULL == sendcounts) || (NULL == sdispls) ||
(NULL == recvcounts) || (NULL == rdispls) ||
MPI_IN_PLACE == sendbuf || MPI_IN_PLACE == recvbuf) {
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
}
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);

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

@ -96,8 +96,13 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
if ((NULL == sendcounts) || (NULL == sdispls) || (NULL == sendtypes) ||
(NULL == recvcounts) || (NULL == rdispls) || (NULL == recvtypes) ||
MPI_IN_PLACE == sendbuf || MPI_IN_PLACE == recvbuf) {
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
} else if (MPI_IN_PLACE == sendbuf) {
/* MPI_IN_PLACE is not fully implemented yet,
return MPI_ERR_INTERN for now */
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INTERN,
FUNC_NAME);
}
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);