X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e694957c5830a9f1407392fa7f76796274aa4d18..13fb4af932a02ea0bd4293d1e55ac071de326f80:/teshsuite/smpi/mpich3-test/datatype/hindexed_block.c diff --git a/teshsuite/smpi/mpich3-test/datatype/hindexed_block.c b/teshsuite/smpi/mpich3-test/datatype/hindexed_block.c index 23f8f62153..5f00009e26 100644 --- a/teshsuite/smpi/mpich3-test/datatype/hindexed_block.c +++ b/teshsuite/smpi/mpich3-test/datatype/hindexed_block.c @@ -15,9 +15,7 @@ #define TEST_HINDEXED_BLOCK 1 #endif -#if defined(TEST_HINDEXED_BLOCK) static int verbose = 0; -#endif /* tests */ int hindexed_block_contig_test(void); @@ -29,10 +27,7 @@ static int pack_and_unpack(char *typebuf, int count, MPI_Datatype datatype, int int main(int argc, char **argv) { -#if defined(TEST_HINDEXED_BLOCK) - int err; -#endif - int errs = 0; + int err, errs = 0; int rank; MPI_Init(&argc, &argv); /* MPI-1.2 doesn't allow for MPI_Init(0,0) */ @@ -54,7 +49,7 @@ int main(int argc, char **argv) if (err && verbose) fprintf(stderr, "%d errors in hindexed_block vector test.\n", err); errs += err; -#endif /*defined(TEST_HINDEXED_BLOCK)*/ +#endif /*defined(TEST_HINDEXED_BLOCK) */ /* print message and exit */ if (rank == 0) { @@ -175,19 +170,19 @@ int hindexed_block_vector_test(void) #define NELT (18) int buf[NELT] = { -1, -1, -1, - 1, -2, 2, + 1, -2, 2, -3, -3, -3, -4, -4, -4, - 3, -5, 4, - 5, -6, 6 + 3, -5, 4, + 5, -6, 6 }; int expected[NELT] = { - 0, 0, 0, - 1, 0, 2, - 0, 0, 0, - 0, 0, 0, - 3, 0, 4, - 5, 0, 6 + 0, 0, 0, + 1, 0, 2, + 0, 0, 0, + 0, 0, 0, + 3, 0, 4, + 5, 0, 6 }; int err, errs = 0; @@ -216,8 +211,7 @@ int hindexed_block_vector_test(void) err = MPI_Type_create_hindexed_block(count, 1, disp, vectype, &newtype); if (err != MPI_SUCCESS) { if (verbose) { - fprintf(stderr, - "error creating hindexed_block type in hindexed_block_contig_test()\n"); + fprintf(stderr, "error creating hindexed_block type in hindexed_block_contig_test()\n"); } errs++; } @@ -349,4 +343,4 @@ int parse_args(int argc, char **argv) verbose = 1; return 0; } -#endif /*defined(TEST_HINDEXED_BLOCK)*/ +#endif /*defined(TEST_HINDEXED_BLOCK) */