Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions ompi/mpi/c/ialltoall.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,15 @@ 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 == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
FUNC_NAME);
} else {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
if (MPI_IN_PLACE != sendbuf) {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcount);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
}
OMPI_CHECK_DATATYPE_FOR_RECV(err, recvtype, recvcount);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
}
Expand Down
5 changes: 3 additions & 2 deletions ompi/mpi/c/ialltoallv.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
MPI_Request *request)
{
int i, size, err;
size_t sendtype_size, recvtype_size;

MEMCHECKER(
ptrdiff_t recv_ext;
Expand Down Expand Up @@ -98,7 +97,8 @@ 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 == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

Expand All @@ -112,6 +112,7 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl

if (MPI_IN_PLACE != sendbuf && !OMPI_COMM_IS_INTER(comm)) {
int me = ompi_comm_rank(comm);
size_t sendtype_size, recvtype_size;
ompi_datatype_type_size(sendtype, &sendtype_size);
ompi_datatype_type_size(recvtype, &recvtype_size);
if ((sendtype_size*sendcounts[me]) != (recvtype_size*recvcounts[me])) {
Expand Down
5 changes: 3 additions & 2 deletions ompi/mpi/c/ialltoallw.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
MPI_Request *request)
{
int i, size, err;
size_t sendtype_size, recvtype_size;

MEMCHECKER(
ptrdiff_t recv_ext;
Expand Down Expand Up @@ -94,7 +93,8 @@ 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 == sendbuf && OMPI_COMM_IS_INTER(comm)) ||
MPI_IN_PLACE == recvbuf) {
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

Expand All @@ -108,6 +108,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl

if (MPI_IN_PLACE != sendbuf && !OMPI_COMM_IS_INTER(comm)) {
int me = ompi_comm_rank(comm);
size_t sendtype_size, recvtype_size;
ompi_datatype_type_size(sendtypes[me], &sendtype_size);
ompi_datatype_type_size(recvtypes[me], &recvtype_size);
if ((sendtype_size*sendcounts[me]) != (recvtype_size*recvcounts[me])) {
Expand Down