From 2ed8ad093c11c9d4e70bf35e26beeb464369d7e4 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Thu, 27 Jul 2017 18:31:34 +0200 Subject: [PATCH] use the H5_HAVE_PARALLEL macro from hdf5 instead of the macro PARALLEL_IO --- examples/H5Fed/map_tet2globalid.c | 2 +- examples/H5Fed/map_triangle2globalid.c | 2 +- examples/H5Fed/tetmesh_write1.c | 2 +- examples/H5Fed/trimesh_2gnuplot.c | 4 ++-- examples/H5Fed/trimesh_read.c | 4 ++-- examples/H5Fed/write_boundary.c | 2 +- examples/include/examples.h | 2 +- src/Fortran/H5.c | 2 +- src/Fortran/H5Block_model.c | 2 +- src/h5core/h5_err.c | 2 +- src/h5core/h5_file.c | 18 +++++++++--------- src/h5core/h5b_io.c | 4 ++-- src/h5core/h5b_model.c | 24 ++++++++++++++++-------- src/h5core/h5u_model.c | 12 ++++++------ src/h5core/private/h5_hdf5.h | 2 +- src/h5core/private/h5_init.c | 2 +- src/h5core/private/h5_model.h | 6 +++--- src/h5core/private/h5_mpi.h | 2 +- src/h5core/private/h5_types.h | 2 +- src/h5core/private/h5t_octree.h | 2 +- src/include/H5Block_model.h | 11 +++++++++-- test/h5b_read.c | 6 +++--- test/h5b_test.c | 10 +++++----- test/h5b_write.c | 4 ++-- test/h5u_read.c | 6 +++--- test/h5u_test.c | 4 ++-- test/h5u_write.c | 10 +++++----- test/testframe.c | 4 ++-- 28 files changed, 84 insertions(+), 69 deletions(-) diff --git a/examples/H5Fed/map_tet2globalid.c b/examples/H5Fed/map_tet2globalid.c index 65a16c1..68f7d4f 100644 --- a/examples/H5Fed/map_tet2globalid.c +++ b/examples/H5Fed/map_tet2globalid.c @@ -3,7 +3,7 @@ #include "H5hut.h" -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL #ifndef MPI_COMM_WORLD #define MPI_COMM_WORLD 0 #endif diff --git a/examples/H5Fed/map_triangle2globalid.c b/examples/H5Fed/map_triangle2globalid.c index aa33f7b..2f49344 100644 --- a/examples/H5Fed/map_triangle2globalid.c +++ b/examples/H5Fed/map_triangle2globalid.c @@ -3,7 +3,7 @@ #include "H5hut.h" -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL #ifndef MPI_COMM_WORLD #define MPI_COMM_WORLD 0 #endif diff --git a/examples/H5Fed/tetmesh_write1.c b/examples/H5Fed/tetmesh_write1.c index 1fe66b6..cb1ddd8 100644 --- a/examples/H5Fed/tetmesh_write1.c +++ b/examples/H5Fed/tetmesh_write1.c @@ -4,7 +4,7 @@ #include "H5hut.h" -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL #ifndef MPI_COMM_WORLD #define MPI_COMM_WORLD 0 #endif diff --git a/examples/H5Fed/trimesh_2gnuplot.c b/examples/H5Fed/trimesh_2gnuplot.c index 83dffad..1c5ccd4 100644 --- a/examples/H5Fed/trimesh_2gnuplot.c +++ b/examples/H5Fed/trimesh_2gnuplot.c @@ -2,7 +2,7 @@ #include #include "H5hut.h" -#if defined (PARALLEL_IO) +#if defined (H5_HAVE_PARALLEL) #include #endif @@ -87,7 +87,7 @@ done: H5FedCloseMesh (m); H5CloseFile (f); -#if defined (PARALLEL_IO) +#if defined (H5_HAVE_PARALLEL) MPI_Finalize (); #endif diff --git a/examples/H5Fed/trimesh_read.c b/examples/H5Fed/trimesh_read.c index c237d9e..5e96368 100644 --- a/examples/H5Fed/trimesh_read.c +++ b/examples/H5Fed/trimesh_read.c @@ -2,7 +2,7 @@ #include #include "H5hut.h" -#if defined (PARALLEL_IO) +#if defined (H5_HAVE_PARALLEL) #include #endif @@ -253,7 +253,7 @@ main ( /* done */ H5CloseFile (f); -#if defined (PARALLEL_IO) +#if defined (H5_HAVE_PARALLEL) MPI_Finalize (); #endif diff --git a/examples/H5Fed/write_boundary.c b/examples/H5Fed/write_boundary.c index 54f8144..7c42671 100644 --- a/examples/H5Fed/write_boundary.c +++ b/examples/H5Fed/write_boundary.c @@ -3,7 +3,7 @@ #include "H5hut.h" -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL #ifndef MPI_COMM_WORLD #define MPI_COMM_WORLD 0 #endif diff --git a/examples/include/examples.h b/examples/include/examples.h index abed2c1..cabd117 100644 --- a/examples/include/examples.h +++ b/examples/include/examples.h @@ -1,7 +1,7 @@ #ifndef __EXAMPLES_H #define __EXAMPLES_H -#if !defined (PARALLEL_IO) +#if !defined (H5_HAVE_PARALLEL) #define MPI_COMM_WORLD (0) #define MPI_Init(argc, argv) diff --git a/src/Fortran/H5.c b/src/Fortran/H5.c index 0002726..575cf92 100644 --- a/src/Fortran/H5.c +++ b/src/Fortran/H5.c @@ -25,7 +25,7 @@ h5_createprop_file ( H5_API_RETURN ((h5_int64_t)h5_create_prop (H5_PROP_FILE)); } -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) #define h5_setprop_file_mpio FC_MANGLING( \ h5_setprop_file_mpio, \ H5_SETPROP_FILE_MPIO) diff --git a/src/Fortran/H5Block_model.c b/src/Fortran/H5Block_model.c index b002554..86dcb22 100755 --- a/src/Fortran/H5Block_model.c +++ b/src/Fortran/H5Block_model.c @@ -188,7 +188,7 @@ h5bl_3d_getchunk ( } -#ifdef PARALLEL_IO +#if defined(H5_HAVE_PARALLEL) #define h5bl_3d_setgrid FC_MANGLING ( \ h5bl_3d_setgrid, \ h5bl_3d_setgrid) diff --git a/src/h5core/h5_err.c b/src/h5core/h5_err.c index 6a121cd..12bf5c7 100644 --- a/src/h5core/h5_err.c +++ b/src/h5core/h5_err.c @@ -145,7 +145,7 @@ h5_abort_errorhandler ( if (h5_log_level > 0) { h5_verror (fmt, ap); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL MPI_Abort(MPI_COMM_WORLD, -(int)h5_errno); #else exit (-(int)h5_errno); diff --git a/src/h5core/h5_file.c b/src/h5core/h5_file.c index 279a268..1131d76 100644 --- a/src/h5core/h5_file.c +++ b/src/h5core/h5_file.c @@ -80,7 +80,7 @@ mpi_init ( const h5_file_p f ) { H5_INLINE_FUNC_ENTER (h5_err_t); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL TRY (h5priv_mpi_comm_size (f->props->comm, &f->nprocs)); TRY (h5priv_mpi_comm_rank (f->props->comm, &f->myproc)); @@ -141,7 +141,7 @@ mpi_init ( TRY (h5_optimize_for_lustre(f, filename)); } #endif -#endif /* PARALLEL_IO */ +#endif /* H5_HAVE_PARALLEL */ H5_RETURN (H5_SUCCESS); } @@ -181,7 +181,7 @@ set_default_file_props ( H5_STEPNAME, H5_STEPNAME_LEN - 1); props->width_step_idx = H5_STEPWIDTH; -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL props->comm = MPI_COMM_WORLD; #endif H5_RETURN (H5_SUCCESS); @@ -201,7 +201,7 @@ h5_set_prop_file_mpio_collective ( "Invalid property class: %lld", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL props->flags &= ~(H5_VFD_MPIO_POSIX | H5_VFD_MPIO_INDEPENDENT | H5_VFD_CORE); props->flags |= H5_VFD_MPIO_COLLECTIVE; props->comm = *comm; @@ -229,7 +229,7 @@ h5_set_prop_file_mpio_independent ( "Invalid property class: %lld", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE); props->flags |= H5_VFD_MPIO_INDEPENDENT; props->comm = *comm; @@ -254,7 +254,7 @@ h5_set_prop_file_mpio_posix ( "Invalid property class: %lld", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_POSIX | H5_VFD_CORE); props->flags |= H5_VFD_MPIO_INDEPENDENT; props->comm = *comm; @@ -279,7 +279,7 @@ h5_set_prop_file_core_vfd ( "Invalid property class: %lld", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL props->flags &= ~(H5_VFD_MPIO_COLLECTIVE | H5_VFD_MPIO_INDEPENDENT | H5_VFD_MPIO_POSIX); props->flags |= H5_VFD_MPIO_INDEPENDENT; props->comm = MPI_COMM_SELF; @@ -352,7 +352,7 @@ h5_set_prop_file_throttle ( "Invalid property class: %lld", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL // throttle only if VFD is MPIO independent od POSIX h5_int64_t mask = H5_VFD_MPIO_INDEPENDENT; #if H5_VERSION_LE(1,8,12) @@ -519,7 +519,7 @@ h5_open_file2 ( "Invalid property class: %lld.", (long long int)props->class); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL f->props->comm = props->comm; #endif f->props->flags = props->flags; diff --git a/src/h5core/h5b_io.c b/src/h5core/h5b_io.c index 93b039b..40b3045 100644 --- a/src/h5core/h5b_io.c +++ b/src/h5core/h5b_io.c @@ -47,7 +47,7 @@ h5bpriv_open_file ( b = f->b; memset (b, 0, sizeof (*b)); -#if defined(PARALLEL_IO) +#ifdef H5_HAVE_PARALLEL size_t n = sizeof (struct h5b_partition) / sizeof (h5_int64_t); TRY (h5priv_mpi_type_contiguous(n, MPI_LONG_LONG, &b->partition_mpi_t)); #endif @@ -88,7 +88,7 @@ h5bpriv_close_file ( TRY (hdf5_close_dataspace (b->diskshape)); TRY (hdf5_close_dataspace (b->memshape)); TRY (hdf5_close_property (b->dcreate_prop)); -#if defined(PARALLEL_IO) +#ifdef H5_HAVE_PARALLEL TRY (h5priv_mpi_type_free (&b->partition_mpi_t)); #endif TRY (h5_free (f->b)); diff --git a/src/h5core/h5b_model.c b/src/h5core/h5b_model.c index 24b142e..bc9b3c5 100644 --- a/src/h5core/h5b_model.c +++ b/src/h5core/h5b_model.c @@ -74,7 +74,7 @@ _normalize_partition ( } } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL /* MLH: this could be improved with an MPI_Reduce and MAX operator... * but the user_layout array-of-structs would need to be a struct-of-arrays */ static void @@ -571,7 +571,7 @@ h5b_3d_set_view ( b->user_layout[0].k_end = k_end; _normalize_partition(&b->user_layout[0]); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL h5b_partition_t *user_layout; h5b_partition_t *write_layout; @@ -762,7 +762,6 @@ h5b_3d_get_chunk ( H5_RETURN (H5_SUCCESS); } -#ifdef PARALLEL_IO h5_err_t h5b_3d_set_grid ( const h5_file_t fh, /*!< IN: File handle */ @@ -796,11 +795,13 @@ h5b_3d_set_grid ( int dims[3] = { k, j, i }; int period[3] = { 0, 0, 0 }; +#ifdef H5_HAVE_PARALLEL TRY( h5priv_mpi_cart_create( f->props->comm, 3, dims, period, 0, &f->b->cart_comm) ); - +#else + h5_warn ("Defining a grid in serial case doesn't make much sense!"); +#endif f->b->have_grid = 1; - H5_RETURN (H5_SUCCESS); } @@ -824,11 +825,16 @@ h5b_3d_get_grid_coords ( "%s", "Grid dimensions have not been set!"); +#ifdef H5_HAVE_PARALLEL int coords[3]; TRY( h5priv_mpi_cart_coords(f->b->cart_comm, proc, 3, coords) ); *k = coords[0]; *j = coords[1]; *i = coords[2]; +#else + *k = *j = *i = 1; + h5_warn ("Defining grid in serial case doesn't make much sense!"); +#endif H5_RETURN (H5_SUCCESS); } @@ -855,11 +861,14 @@ h5b_3d_set_dims ( "Grid dimensions have not been set!"); h5_size_t dims[3] = { k, j, i }; +#ifdef H5_HAVE_PARALLEL h5_size_t check_dims[3] = { k, j, i }; - TRY( h5priv_mpi_bcast( check_dims, 3, MPI_LONG_LONG, 0, f->props->comm) ); - +#else + h5_size_t check_dims[3] = { 1, 1, 1 }; + h5_warn ("Defining grid in serial case doesn't make much sense!"); +#endif if ( dims[0] != check_dims[0] || dims[1] != check_dims[1] || dims[2] != check_dims[2] @@ -899,7 +908,6 @@ h5b_3d_set_dims ( H5_RETURN (H5_SUCCESS); } -#endif h5_err_t h5b_3d_set_halo ( diff --git a/src/h5core/h5u_model.c b/src/h5core/h5u_model.c index 61fb9ff..e4e0453 100644 --- a/src/h5core/h5u_model.c +++ b/src/h5core/h5u_model.c @@ -136,7 +136,7 @@ h5u_set_num_points ( "Invalid number of particles: %lld!\n", (long long)nparticles); -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL /* if we are not using parallel-IO, there is enough information to know that we can short circuit this routine. However, @@ -174,12 +174,12 @@ h5u_set_num_points ( NULL)); } -#ifndef PARALLEL_IO +#ifndef H5_HAVE_PARALLEL count = u->nparticles; TRY( u->shape = hdf5_create_dataspace (1, &count, NULL)); u->viewstart = 0; u->viewend = nparticles - 1; // view range is *inclusive* -#else /* PARALLEL_IO */ +#else /* H5_HAVE_PARALLEL */ /* The Gameplan here is to declare the overall size of the on-disk data structure the same way we do for the serial case. But @@ -317,7 +317,7 @@ h5u_set_view ( (long long)end, (long long)start); } -#if PARALLEL_IO +#if H5_HAVE_PARALLEL TRY ( h5priv_mpi_allreduce_max ( &end, &total, 1, MPI_LONG_LONG, f->props->comm) @@ -575,7 +575,7 @@ h5u_set_canonical_view ( u->nparticles = total / f->nprocs; -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL h5_int64_t remainder = 0; remainder = total % f->nprocs; start = f->myproc * u->nparticles; @@ -588,7 +588,7 @@ h5u_set_canonical_view ( start += f->myproc; else start += remainder; -#endif // PARALLEL_IO +#endif // H5_HAVE_PARALLEL h5_int64_t length = u->nparticles; TRY (h5u_set_view_length (fh, start, length)); diff --git a/src/h5core/private/h5_hdf5.h b/src/h5core/private/h5_hdf5.h index 448846d..bef501e 100644 --- a/src/h5core/private/h5_hdf5.h +++ b/src/h5core/private/h5_hdf5.h @@ -1048,7 +1048,7 @@ hdf5_set_layout_property ( H5_RETURN (H5_SUCCESS); } -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL static inline h5_err_t hdf5_set_fapl_mpio_property ( hid_t fapl_id, diff --git a/src/h5core/private/h5_init.c b/src/h5core/private/h5_init.c index 45be4ec..b83f055 100644 --- a/src/h5core/private/h5_init.c +++ b/src/h5core/private/h5_init.c @@ -671,7 +671,7 @@ h5priv_initialize ( h5_initialized = 1; H5_CORE_API_ENTER (h5_err_t, "%s", "void"); ret_value = H5_SUCCESS; -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL int mpi_is_initialized; MPI_Initialized (&mpi_is_initialized); if (!mpi_is_initialized) { diff --git a/src/h5core/private/h5_model.h b/src/h5core/private/h5_model.h index 6c451e1..8dfa517 100644 --- a/src/h5core/private/h5_model.h +++ b/src/h5core/private/h5_model.h @@ -31,7 +31,7 @@ #include "private/h5_mpi.h" #include "private/h5_hdf5.h" -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL static inline h5_err_t h5priv_start_throttle ( const h5_file_p f @@ -98,7 +98,7 @@ h5priv_end_throttle ( } H5_RETURN (H5_SUCCESS); } -#else // PARALLEL_IO +#else // H5_HAVE_PARALLEL static inline h5_err_t h5priv_start_throttle (const h5_file_p f) { UNUSED_ARGUMENT (f); @@ -111,7 +111,7 @@ h5priv_end_throttle (const h5_file_p f) { return H5_SUCCESS; } -#endif // PARALLEL_IO +#endif // H5_HAVE_PARALLEL h5_err_t diff --git a/src/h5core/private/h5_mpi.h b/src/h5core/private/h5_mpi.h index 96f33f1..d631482 100644 --- a/src/h5core/private/h5_mpi.h +++ b/src/h5core/private/h5_mpi.h @@ -10,7 +10,7 @@ #ifndef __PRIVATE_H5_MPI_H #define __PRIVATE_H5_MPI_H -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL #include "h5core/h5_types.h" #include "h5core/h5_err.h" diff --git a/src/h5core/private/h5_types.h b/src/h5core/private/h5_types.h index de2d411..6f1a48b 100644 --- a/src/h5core/private/h5_types.h +++ b/src/h5core/private/h5_types.h @@ -35,7 +35,7 @@ struct h5_prop_file { // file property h5_int64_t align; // HDF5 alignment h5_int64_t increment; // increment for core vfd h5_int64_t throttle; -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL MPI_Comm comm; #endif hid_t xfer_prop; // dataset transfer properties diff --git a/src/h5core/private/h5t_octree.h b/src/h5core/private/h5t_octree.h index 55b3c7f..13af8cc 100644 --- a/src/h5core/private/h5t_octree.h +++ b/src/h5core/private/h5t_octree.h @@ -14,7 +14,7 @@ #include "h5core/h5_types.h" #include "h5core/h5t_octree.h" -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) #include #endif diff --git a/src/include/H5Block_model.h b/src/include/H5Block_model.h index 3ad7307..24c8aaf 100644 --- a/src/include/H5Block_model.h +++ b/src/include/H5Block_model.h @@ -336,7 +336,6 @@ H5Block3dGetChunkSize ( i, j, k)); } -#ifdef PARALLEL_IO /** Define an underlying 3D Cartesian grid on the processors with dimensions (\c i,\c j,\c k). You can look up a processor's index into the grid @@ -347,6 +346,9 @@ H5Block3dGetChunkSize ( The product of the dimensions must equal the size of the MPI communicator. + \note This function is also available in a serial version of H5hut - even it + doesn't make much sense. + \return \c H5_SUCCESS on success \return \c H5_FAILURE on error */ @@ -373,6 +375,9 @@ H5Block3dSetGrid ( Look up the index (\c i, \c j, \c k) in the grid belonging to MPI processor \c proc. + \note This function is also available in a serial version of H5hut - even it + doesn't make much sense. + \return \c H5_SUCCESS on success \return \c H5_FAILURE on error */ @@ -401,6 +406,9 @@ H5Block3dGetGridCoords ( A grid must be already set with \ref H5Block3dSetGrid, and all processors must specify the same dimensions. + \note This function is also available in a serial version of H5hut - even it + doesn't make much sense. + \return \c H5_SUCCESS on success \return \c H5_FAILURE on error */ @@ -422,7 +430,6 @@ H5Block3dSetDims ( f, i, j, k)); } -#endif /** Sets the additional cells (\c i, \c j, \c k) in each direction to use as diff --git a/test/h5b_read.c b/test/h5b_read.c index 92ecdb6..36a11f4 100644 --- a/test/h5b_read.c +++ b/test/h5b_read.c @@ -82,7 +82,7 @@ test_read_data64(h5_file_t file, int step) TEST("Verifying dataset info"); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) int rank, nprocs; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); @@ -202,7 +202,7 @@ 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) +#if defined(H5_HAVE_PARALLEL) status = H5Block3dSetGrid(file, grid[0], grid[1], grid[2]); RETURN(status, H5_SUCCESS, "H5Block3dSetGrid"); @@ -239,7 +239,7 @@ void h5b_test_read1(void) TEST("Opening file once, read-only"); h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOCollective (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective"); diff --git a/test/h5b_test.c b/test/h5b_test.c index 4139b0f..6575fc0 100644 --- a/test/h5b_test.c +++ b/test/h5b_test.c @@ -18,7 +18,7 @@ void h5b_test_write2(void); void h5b_test_read1(void); void h5b_test_read2(void); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL static int _nth_root_int_divisor (const int m, const int n) { @@ -39,7 +39,7 @@ _nth_root_int_divisor (const int m, const int n) int main(int argc, char **argv) { extern h5_size_t layout[6]; -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL MPI_Init(&argc, &argv); int procs, rank; @@ -69,7 +69,7 @@ int main(int argc, char **argv) layout[3] = (j+1)*NBLOCKY - 1; layout[4] = k*NBLOCKZ; layout[5] = (k+1)*NBLOCKZ - 1; -#else // PARALLEL_IO +#else // H5_HAVE_PARALLEL grid[0] = 1; grid[1] = 1; grid[2] = 1; @@ -88,7 +88,7 @@ int main(int argc, char **argv) /* Tests are generally arranged from least to most complexity... */ AddTest("write1", h5b_test_write1, NULL, "Write 64-bit data", NULL); AddTest("read1", h5b_test_read1, NULL, "Read 64-bit data", NULL); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL AddTest("write2", h5b_test_write2, NULL, "Write 32-bit data", NULL); AddTest("read2", h5b_test_read2, NULL, "Read 32-bit data", NULL); #endif @@ -111,7 +111,7 @@ int main(int argc, char **argv) //if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) // TestCleanup(); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL TestPrintf ("reached end\n"); fflush(stdout); MPI_Finalize(); diff --git a/test/h5b_write.c b/test/h5b_write.c index faa522d..852d4be 100644 --- a/test/h5b_write.c +++ b/test/h5b_write.c @@ -149,7 +149,7 @@ test_write_data32(h5_file_t file, int step) if (val == 0) test_write_field_attribs(file, "e", t); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) extern h5_size_t grid[3]; status = H5Block3dSetGrid(file, grid[0], grid[1], grid[2]); @@ -181,7 +181,7 @@ void h5b_test_write1(void) TEST("Opening file once, write-truncate"); h5_prop_t props = H5CreateFileProp (); -#if defined (PARALLEL_IO) +#if defined (H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOCollective (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective"); diff --git a/test/h5u_read.c b/test/h5u_read.c index 6a121dd..93cee06 100644 --- a/test/h5u_read.c +++ b/test/h5u_read.c @@ -106,7 +106,7 @@ test_read_data64(h5_file_t file, int nparticles, int step) TEST("Verifying dataset info"); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); #else @@ -479,7 +479,7 @@ void h5u_test_read3(void) TEST("Opening file once, read-only, MPI-POSIX VFD"); h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOPosix (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix"); @@ -508,7 +508,7 @@ void h5u_test_read4(void) TEST("Opening file twice, read-only, MPI-IO Independent VFD"); h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOIndependent (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent"); diff --git a/test/h5u_test.c b/test/h5u_test.c index e730c8d..4543f7b 100644 --- a/test/h5u_test.c +++ b/test/h5u_test.c @@ -20,7 +20,7 @@ void h5u_test_read4(void); int main(int argc, char **argv) { -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL MPI_Init(&argc, &argv); int procs; MPI_Comm_size(MPI_COMM_WORLD, &procs); @@ -66,7 +66,7 @@ int main(int argc, char **argv) //if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) // TestCleanup(); -#ifdef PARALLEL_IO +#ifdef H5_HAVE_PARALLEL TestPrintf ("reached end\n"); fflush(stdout); MPI_Finalize(); diff --git a/test/h5u_write.c b/test/h5u_write.c index e9d4f61..8bb3d54 100644 --- a/test/h5u_write.c +++ b/test/h5u_write.c @@ -211,7 +211,7 @@ test_write_data32(h5_file_t file, int nparticles, int step) status = H5PartSetNumParticles(file, nparticles); RETURN(status, H5_SUCCESS, "H5PartSetNumParticles"); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) int rank, nprocs; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nprocs); @@ -358,7 +358,7 @@ void h5u_test_write1(void) TEST("Opening file once, write-truncate"); h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOCollective (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective"); @@ -386,7 +386,7 @@ void h5u_test_write2(void) TEST("Opening file twice, write-append + read-only"); h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOCollective (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective"); @@ -421,7 +421,7 @@ void h5u_test_write3(void) h5_prop_t props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOPosix (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix"); @@ -457,7 +457,7 @@ void h5u_test_write4(void) TEST("Opening file twice, write-append + read-only, MPI-IO Independent VFD"); props = H5CreateFileProp (); -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) MPI_Comm comm = MPI_COMM_WORLD; status = H5SetPropFileMPIOIndependent (props, &comm); RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent"); diff --git a/test/testframe.c b/test/testframe.c index 41dbf81..cbd8873 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -530,7 +530,7 @@ TestPrintf(const char *format, ...) va_list arglist; int ret_value = -1; -#if defined(PARALLEL_IO) +#if defined(H5_HAVE_PARALLEL) int nproc; MPI_Comm_rank(MPI_COMM_WORLD, &nproc); if ( nproc == 0 || VERBOSE_HI ) { @@ -564,7 +564,7 @@ TestErrPrintf(const char *format, ...) /* Increment the error count */ num_errs++; -#if PARALLEL_IO +#if H5_HAVE_PARALLEL int nproc; MPI_Comm_rank(MPI_COMM_WORLD, &nproc); if ( nproc == 0 || VERBOSE_HI ) {