X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c57842fe897f53b46f0be3da87f7c996674be7d6..73e97710413bba3ee2ae8baab0537fbd78811016:/teshsuite/smpi/mpich3-test/datatype/vecblklen.c diff --git a/teshsuite/smpi/mpich3-test/datatype/vecblklen.c b/teshsuite/smpi/mpich3-test/datatype/vecblklen.c index cfe0733ce8..61637ad432 100644 --- a/teshsuite/smpi/mpich3-test/datatype/vecblklen.c +++ b/teshsuite/smpi/mpich3-test/datatype/vecblklen.c @@ -12,79 +12,77 @@ /* Inspired by the Intel MPI_Type_vector_blklen test. Added to include a test of a dataloop optimization that failed. */ -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { MPI_Datatype ot, ot2, newtype; int position, psize, insize, outsize; - signed char *inbuf=0, *outbuf=0, *pbuf=0, *p; - int i, j, k; - int errs = 0; - int veccount=16, stride=16; + char *inbuf = 0, *outbuf = 0, *pbuf = 0, *p; + int i, j, k; + int errs = 0; + int veccount = 16, stride = 16; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); /* * Create a type with some padding */ - MPI_Type_contiguous( 59, MPI_CHAR, &ot ); - MPI_Type_create_resized( ot, 0, 64, &ot2 ); + MPI_Type_contiguous(59, MPI_CHAR, &ot); + MPI_Type_create_resized(ot, 0, 64, &ot2); /* - Use a vector type with a block size equal to the stride - thus - tiling the target memory with copies of old type. This is not - a contiguous copy since oldtype has a gap at the end. - */ - MPI_Type_vector( veccount, stride, stride, ot2, &newtype ); - MPI_Type_commit( &newtype ); + * Use a vector type with a block size equal to the stride - thus + * tiling the target memory with copies of old type. This is not + * a contiguous copy since oldtype has a gap at the end. + */ + MPI_Type_vector(veccount, stride, stride, ot2, &newtype); + MPI_Type_commit(&newtype); insize = veccount * stride * 64; outsize = insize; - inbuf = (char *)malloc( insize ); - outbuf = (char *)malloc( outsize ); - for (i=0; i