@@ -65,18 +65,13 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
6565 /* Unrooted operation -- same checks for all ranks on both
6666 intracommunicators and intercommunicators */
6767
68- if (MPI_IN_PLACE == sendbuf ) {
69- sendcount = recvcount ;
70- sendtype = recvtype ;
71- }
72-
7368 err = MPI_SUCCESS ;
7469 OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
7570 if (ompi_comm_invalid (comm ) || !(OMPI_COMM_IS_CART (comm ) || OMPI_COMM_IS_GRAPH (comm ) ||
7671 OMPI_COMM_IS_DIST_GRAPH (comm ))) {
7772 return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD , MPI_ERR_COMM ,
7873 FUNC_NAME );
79- } else if (MPI_IN_PLACE == recvbuf ) {
74+ } else if (MPI_IN_PLACE == sendbuf || MPI_IN_PLACE == recvbuf ) {
8075 return OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD , MPI_ERR_ARG ,
8176 FUNC_NAME );
8277 } else {
@@ -86,7 +81,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
8681 OMPI_ERRHANDLER_CHECK (err , comm , err , FUNC_NAME );
8782 }
8883
89- if (MPI_IN_PLACE != sendbuf && !OMPI_COMM_IS_INTER (comm )) {
84+ if (!OMPI_COMM_IS_INTER (comm )) {
9085 ompi_datatype_type_size (sendtype , & sendtype_size );
9186 ompi_datatype_type_size (recvtype , & recvtype_size );
9287 if ((sendtype_size * sendcount ) != (recvtype_size * recvcount )) {
@@ -99,8 +94,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
9994
10095 ompi_datatype_type_size (sendtype , & sendtype_size );
10196 ompi_datatype_type_size (recvtype , & recvtype_size );
102- if (((MPI_IN_PLACE == sendbuf ) ||
103- (0 == sendcount ) || (0 == sendtype_size )) &&
97+ if (((0 == sendcount ) || (0 == sendtype_size )) &&
10498 ((0 == recvcount ) || 0 == (recvtype_size ))) {
10599 return MPI_SUCCESS ;
106100 }
0 commit comments