@@ -64,18 +64,13 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
6464        /* Unrooted operation -- same checks for all ranks on both 
6565           intracommunicators and intercommunicators */ 
6666
67-         if  (MPI_IN_PLACE  ==  sendbuf ) {
68-             sendcount  =  recvcount ;
69-             sendtype  =  recvtype ;
70-         }
71- 
7267        err  =  MPI_SUCCESS ;
7368        OMPI_ERR_INIT_FINALIZE (FUNC_NAME );
7469        if  (ompi_comm_invalid (comm ) ||  !(OMPI_COMM_IS_CART (comm ) ||  OMPI_COMM_IS_GRAPH (comm ) || 
7570                                         OMPI_COMM_IS_DIST_GRAPH (comm ))) {
7671            return  OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD , MPI_ERR_COMM ,
7772                                          FUNC_NAME );
78-         } else  if  (MPI_IN_PLACE  ==  recvbuf ) {
73+         } else  if  (MPI_IN_PLACE  ==  sendbuf   ||   MPI_IN_PLACE   ==   recvbuf ) {
7974            return  OMPI_ERRHANDLER_INVOKE (MPI_COMM_WORLD , MPI_ERR_ARG ,
8075                                          FUNC_NAME );
8176        } else  {
@@ -85,7 +80,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
8580            OMPI_ERRHANDLER_CHECK (err , comm , err , FUNC_NAME );
8681        }
8782
88-         if  (MPI_IN_PLACE   !=   sendbuf   &&   !OMPI_COMM_IS_INTER (comm )) {
83+         if  (!OMPI_COMM_IS_INTER (comm )) {
8984            ompi_datatype_type_size (sendtype , & sendtype_size );
9085            ompi_datatype_type_size (recvtype , & recvtype_size );
9186            if  ((sendtype_size * sendcount ) !=  (recvtype_size * recvcount )) {
@@ -98,8 +93,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
9893
9994    ompi_datatype_type_size (sendtype , & sendtype_size );
10095    ompi_datatype_type_size (recvtype , & recvtype_size );
101-     if  (((MPI_IN_PLACE  ==  sendbuf ) || 
102-          (0  ==  sendcount ) ||  (0  ==  sendtype_size )) && 
96+     if  (((0  ==  sendcount ) ||  (0  ==  sendtype_size )) && 
10397        ((0  ==  recvcount ) ||  0  ==  (recvtype_size ))) {
10498        return  MPI_SUCCESS ;
10599    }
0 commit comments