X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3928c9b3860770cd5efbaa3515e9df6d09273e52..c57842fe897f53b46f0be3da87f7c996674be7d6:/teshsuite/smpi/mpich3-test/coll/coll6.c diff --git a/teshsuite/smpi/mpich3-test/coll/coll6.c b/teshsuite/smpi/mpich3-test/coll/coll6.c index 0ab19de075..e0973f9a1b 100644 --- a/teshsuite/smpi/mpich3-test/coll/coll6.c +++ b/teshsuite/smpi/mpich3-test/coll/coll6.c @@ -54,9 +54,14 @@ int main( int argc, char **argv ) table[i][j] = rank + 10; /* Everybody gets the gathered data */ - MPI_Allgatherv(&table[begin_row][0], send_count, MPI_INT, - &table[0][0], recv_counts, displs, - MPI_INT, test_comm); + if ((char *) &table[begin_row][0] != (char *) table + displs[rank]*sizeof(int)) + MPI_Allgatherv(&table[begin_row][0], send_count, MPI_INT, + &table[0][0], recv_counts, displs, + MPI_INT, test_comm); + else + MPI_Allgatherv(MPI_IN_PLACE, send_count, MPI_INT, + &table[0][0], recv_counts, displs, + MPI_INT, test_comm); /* Everybody should have the same table now.