From 441915f443dced0007831470bc1307e5310c21b6 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Mon, 6 Sep 2010 15:45:47 +0000 Subject: [PATCH] - Removed some parallel tests from serial code - fix some warnings --- test/h5b_read.c | 8 ++++---- test/h5b_write.c | 5 +++-- test/h5u_read.c | 4 ++-- test/h5u_write.c | 2 +- test/testframe.c | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/h5b_read.c b/test/h5b_read.c index 9d0d5c9..5f8f909 100644 --- a/test/h5b_read.c +++ b/test/h5b_read.c @@ -83,7 +83,7 @@ test_read_data64(h5_file_t *file, int step) TEST("Verifying dataset info"); -#if PARALLEL_IO +#if defined(PARALLEL_IO) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); #else @@ -133,7 +133,7 @@ test_read_data64(h5_file_t *file, int step) } } -#if PARALLEL_IO +#if defined(PARALLEL_IO) TEST("Setting throttle"); status = H5SetThrottle(file, 3); RETURN(status, H5_SUCCESS, "H5SetThrottle"); @@ -211,13 +211,13 @@ test_read_data32(h5_file_t *file, int step) RETURN(status, H5_SUCCESS, "H5SetStep"); test_read_field_attribs(file, "e", t); - +#if defined(PARALLEL_IO) status = H5Block3dSetGrid(file, grid[0], grid[1], grid[2]); RETURN(status, H5_SUCCESS, "H5Block3dSetGrid"); status = H5Block3dSetDims(file, NBLOCKX, NBLOCKY, NBLOCKZ); RETURN(status, H5_SUCCESS, "H5Block3dSetDims"); - +#endif status = H5Block3dReadScalarFieldFloat32(file, "e", e); RETURN(status, H5_SUCCESS, "H5Block3dReadScalarFieldFloat32"); diff --git a/test/h5b_write.c b/test/h5b_write.c index d512304..33a93a5 100644 --- a/test/h5b_write.c +++ b/test/h5b_write.c @@ -66,7 +66,7 @@ test_write_data64(h5_file_t *file, int step) ez=(double*)malloc(nelems*sizeof(double)); id=(h5_int64_t*)malloc(nelems*sizeof(h5_int64_t)); -#if PARALLEL_IO +#if defined(PARALLEL_IO) TEST("Setting throttle"); status = H5SetThrottle(file, 2); RETURN(status, H5_SUCCESS, "H5SetThrottle"); @@ -157,12 +157,13 @@ test_write_data32(h5_file_t *file, int step) if (val == 0) test_write_field_attribs(file, "e", t); +#if defined(PARALLEL_IO) status = H5Block3dSetGrid(file, grid[0], grid[1], grid[2]); RETURN(status, H5_SUCCESS, "H5Block3dSetGrid"); status = H5Block3dSetDims(file, NBLOCKX, NBLOCKY, NBLOCKZ); RETURN(status, H5_SUCCESS, "H5Block3dSetDims"); - +#endif status = H5Block3dSetHalo(file, 0, 1, 2); RETURN(status, H5_SUCCESS, "H5Block3dSetHalo"); diff --git a/test/h5u_read.c b/test/h5u_read.c index f51f4fb..33ae42e 100644 --- a/test/h5u_read.c +++ b/test/h5u_read.c @@ -113,7 +113,7 @@ test_read_data64(h5_file_t *file, int nparticles, int step) TEST("Verifying dataset info"); -#if PARALLEL_IO +#if defined(PARALLEL_IO) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); #else @@ -145,7 +145,7 @@ test_read_data64(h5_file_t *file, int nparticles, int step) else IVALUE(type, H5_FLOAT64_T, "dataset type"); } -#if PARALLEL_IO +#if defined(PARALLEL_IO) TEST("Setting throttle"); status = H5SetThrottle(file, 3); RETURN(status, H5_SUCCESS, "H5SetThrottle"); diff --git a/test/h5u_write.c b/test/h5u_write.c index 2e0169a..3a2f063 100644 --- a/test/h5u_write.c +++ b/test/h5u_write.c @@ -218,7 +218,7 @@ test_write_data32(h5_file_t *file, int nparticles, int step) status = H5PartSetNumParticles(file, nparticles); RETURN(status, H5_SUCCESS, "H5PartSetNumParticles"); -#if PARALLEL_IO +#if defined(PARALLEL_IO) /* will generate a warning since we are in MPI-IO Collective mode */ TEST("Setting throttle"); status = H5SetThrottle(file, 2); diff --git a/test/testframe.c b/test/testframe.c index c570295..b1c198f 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -530,7 +530,7 @@ TestPrintf(const char *format, ...) va_list arglist; int ret_value; -#if PARALLEL_IO +#if defined(PARALLEL_IO) int nproc; MPI_Comm_rank(MPI_COMM_WORLD, &nproc); if ( nproc == 0 || VERBOSE_HI ) {