@@ -69,7 +69,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
6969 memchecker_datatype (recvtypes [i ]);
7070 ompi_datatype_type_extent (recvtypes [i ], & recv_ext );
7171 memchecker_call (& opal_memchecker_base_isaddressable ,
72- (char * )(recvbuf )+ sdispls [i ]* recv_ext ,
72+ (char * )(recvbuf )+ rdispls [i ]* recv_ext ,
7373 recvcounts [i ], recvtypes [i ]);
7474 }
7575 );
@@ -85,6 +85,12 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
8585 FUNC_NAME );
8686 }
8787
88+ if (MPI_IN_PLACE == sendbuf ) {
89+ sendcounts = recvcounts ;
90+ sdispls = rdispls ;
91+ sendtypes = recvtypes ;
92+ }
93+
8894 if ((NULL == sendcounts ) || (NULL == sdispls ) || (NULL == sendtypes ) ||
8995 (NULL == recvcounts ) || (NULL == rdispls ) || (NULL == recvtypes ) ||
9096 (MPI_IN_PLACE == sendbuf && OMPI_COMM_IS_INTER (comm )) ||
@@ -99,10 +105,8 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
99105
100106 size = OMPI_COMM_IS_INTER (comm )?ompi_comm_remote_size (comm ):ompi_comm_size (comm );
101107 for (i = 0 ; i < size ; ++ i ) {
102- if (MPI_IN_PLACE != sendbuf ) {
103- OMPI_CHECK_DATATYPE_FOR_SEND (err , sendtypes [i ], sendcounts [i ]);
104- OMPI_ERRHANDLER_CHECK (err , comm , err , FUNC_NAME );
105- }
108+ OMPI_CHECK_DATATYPE_FOR_SEND (err , sendtypes [i ], sendcounts [i ]);
109+ OMPI_ERRHANDLER_CHECK (err , comm , err , FUNC_NAME );
106110 OMPI_CHECK_DATATYPE_FOR_RECV (err , recvtypes [i ], recvcounts [i ]);
107111 OMPI_ERRHANDLER_CHECK (err , comm , err , FUNC_NAME );
108112 }
0 commit comments