diff --git a/test/h5b_read.c b/test/h5b_read.c index 7bdbacd..820da2c 100644 --- a/test/h5b_read.c +++ b/test/h5b_read.c @@ -60,7 +60,6 @@ test_read_data64(h5_file_t file, int step) extern h5_size_t layout[6]; int i,t; - int rank, nprocs; h5_err_t status; h5_int64_t val, type[2]; char name[4]; @@ -84,11 +83,9 @@ test_read_data64(h5_file_t file, int step) TEST("Verifying dataset info"); #if defined(PARALLEL_IO) + int rank, nprocs; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); -#else - nprocs = 1; - rank = 2; #endif status = H5SetStep(file, step); diff --git a/test/h5b_test.c b/test/h5b_test.c index 0dadc77..5f67a54 100644 --- a/test/h5b_test.c +++ b/test/h5b_test.c @@ -18,6 +18,7 @@ void h5b_test_write2(void); void h5b_test_read1(void); void h5b_test_read2(void); +#ifdef PARALLEL_IO static int _nth_root_int_divisor (const int m, const int n) { @@ -33,6 +34,7 @@ _nth_root_int_divisor (const int m, const int n) return i; } +#endif int main(int argc, char **argv) { diff --git a/test/h5b_write.c b/test/h5b_write.c index cfccf27..8f66b38 100644 --- a/test/h5b_write.c +++ b/test/h5b_write.c @@ -108,8 +108,6 @@ test_write_data64(h5_file_t file, int step) static void test_write_data32(h5_file_t file, int step) { - extern h5_size_t grid[3]; - int i,j,k,t; h5_int64_t status, val; @@ -152,6 +150,8 @@ test_write_data32(h5_file_t file, int step) if (val == 0) test_write_field_attribs(file, "e", t); #if defined(PARALLEL_IO) + extern h5_size_t grid[3]; + status = H5Block3dSetGrid(file, grid[0], grid[1], grid[2]); RETURN(status, H5_SUCCESS, "H5Block3dSetGrid"); diff --git a/test/h5u_write.c b/test/h5u_write.c index 0a3106e..ef73097 100644 --- a/test/h5u_write.c +++ b/test/h5u_write.c @@ -195,7 +195,6 @@ test_write_data32(h5_file_t file, int nparticles, int step) int i,t; h5_err_t status; h5_size_t val; - int rank, nprocs; float *x,*y,*z; float *px,*py,*pz; @@ -213,11 +212,11 @@ test_write_data32(h5_file_t file, int nparticles, int step) RETURN(status, H5_SUCCESS, "H5PartSetNumParticles"); #if defined(PARALLEL_IO) + int rank, nprocs; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); #else - rank = 0; - nprocs = 1; + int rank = 0; #endif TEST("Writing 32-bit data"); diff --git a/test/testframe.h b/test/testframe.h index 3633c64..61089f9 100644 --- a/test/testframe.h +++ b/test/testframe.h @@ -8,10 +8,6 @@ #include -#ifndef PARALLEL_IO -#define MPI_COMM_WORLD 0 -#endif - /* * Predefined test verbosity levels. *