X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c81c99a491282f76757c2673961e3cdee6853539..90f50bba185f1c86225aa498dcc3a01c9080b52b:/teshsuite/smpi/mpich3-test/coll/allgatherv3.c diff --git a/teshsuite/smpi/mpich3-test/coll/allgatherv3.c b/teshsuite/smpi/mpich3-test/coll/allgatherv3.c index 7ba9a66b6c..25066aab11 100644 --- a/teshsuite/smpi/mpich3-test/coll/allgatherv3.c +++ b/teshsuite/smpi/mpich3-test/coll/allgatherv3.c @@ -10,63 +10,60 @@ #include #include -/* Gather data from a vector to contiguous. This is +/* Gather data from a vector to contiguous. This is the trivial version based on the allgather test (allgatherv but with constant data sizes) */ -int main( int argc, char **argv ) +int main(int argc, char **argv) { double *vecout, *invec; MPI_Comm comm; - int count, minsize = 2; - int i, errs = 0; - int rank, size; - int *displs, *recvcounts; + int count, minsize = 2; + int i, errs = 0; + int rank, size; + int *displs, *recvcounts; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); - while (MTestGetIntracommGeneral( &comm, minsize, 1 )) { - if (comm == MPI_COMM_NULL) continue; - /* Determine the sender and receiver */ - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); + while (MTestGetIntracommGeneral(&comm, minsize, 1)) { + if (comm == MPI_COMM_NULL) + continue; + /* Determine the sender and receiver */ + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); + + displs = (int *) malloc(size * sizeof(int)); + recvcounts = (int *) malloc(size * sizeof(int)); - displs = (int *)malloc( size * sizeof(int) ); - recvcounts = (int *)malloc( size * sizeof(int) ); - for (count = 1; count < 9000; count = count * 2) { - invec = (double *)malloc( count * sizeof(double) ); - vecout = (double *)malloc( size * count * sizeof(double) ); - - for (i=0; i