X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50bc81a8526eb95a52e6a4b4a2ae1be94dfb24c1..ecd5f7562caf1d443bf22788fa5f4fac408776ec:/teshsuite/smpi/mpich3-test/datatype/hvecblklen.c diff --git a/teshsuite/smpi/mpich3-test/datatype/hvecblklen.c b/teshsuite/smpi/mpich3-test/datatype/hvecblklen.c index d9a6aa53fe..cc692e9be6 100644 --- a/teshsuite/smpi/mpich3-test/datatype/hvecblklen.c +++ b/teshsuite/smpi/mpich3-test/datatype/hvecblklen.c @@ -12,79 +12,77 @@ /* Inspired by the Intel MPI_Type_hvector_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_hvector( veccount, stride, stride*64, 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_hvector(veccount, stride, stride * 64, ot2, &newtype); + MPI_Type_commit(&newtype); insize = veccount * stride * 64; outsize = insize; - inbuf = (char *)malloc( insize ); - outbuf = (char *)malloc( outsize ); - for (i=0; i