X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50130868c2f0c10d86bf368ede7154f6845b0d51..HEAD:/teshsuite/smpi/mpich3-test/datatype/tresized.c diff --git a/teshsuite/smpi/mpich3-test/datatype/tresized.c b/teshsuite/smpi/mpich3-test/datatype/tresized.c index ffaccad469..1c64d60718 100644 --- a/teshsuite/smpi/mpich3-test/datatype/tresized.c +++ b/teshsuite/smpi/mpich3-test/datatype/tresized.c @@ -13,66 +13,69 @@ static char MTEST_Descrip[] = "Test of type resized"; */ -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { int errs = 0, i; int rank, size, source, dest; - int count; - int *buf; - MPI_Comm comm; - MPI_Status status; - MPI_Datatype newtype; + int count; + int *buf; + MPI_Comm comm; + MPI_Status status; + MPI_Datatype newtype; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); comm = MPI_COMM_WORLD; /* Determine the sender and receiver */ - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); source = 0; - dest = size - 1; - - MPI_Type_create_resized( MPI_INT, 0, 3 * sizeof(int), &newtype ); - MPI_Type_commit( &newtype ); + dest = size - 1; + + MPI_Type_create_resized(MPI_INT, 0, 3 * sizeof(int), &newtype); + MPI_Type_commit(&newtype); for (count = 1; count < 65000; count = count * 2) { - buf = (int *)malloc( count * 3 * sizeof(int) ); - if (!buf) { - MPI_Abort( comm, 1 ); - exit(1); - } - for (i=0; i<3*count; i++) buf[i] = -1; - if (rank == source) { - for (i=0; i