diff options
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 2 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 85 | ||||
-rw-r--r-- | tools/lib/io_timer.h | 10 | ||||
-rw-r--r-- | tools/src/h5diff/ph5diff_main.c | 3 | ||||
-rw-r--r-- | tools/test/misc/repart_test.c | 6 | ||||
-rw-r--r-- | tools/test/misc/talign.c | 10 | ||||
-rw-r--r-- | tools/test/misc/vds/UC_1_one_dim_gen.c | 16 | ||||
-rw-r--r-- | tools/test/misc/vds/UC_2_two_dims_gen.c | 16 | ||||
-rw-r--r-- | tools/test/misc/vds/UC_3_gaps_gen.c | 20 | ||||
-rw-r--r-- | tools/test/misc/vds/UC_4_printf_gen.c | 16 | ||||
-rw-r--r-- | tools/test/misc/vds/UC_5_stride_gen.c | 16 | ||||
-rw-r--r-- | tools/test/perform/iopipe.c | 2 | ||||
-rw-r--r-- | tools/test/perform/pio_engine.c | 36 | ||||
-rw-r--r-- | tools/test/perform/pio_standalone.h | 4 | ||||
-rw-r--r-- | tools/test/perform/sio_engine.c | 28 | ||||
-rw-r--r-- | tools/test/perform/sio_standalone.h | 10 |
16 files changed, 145 insertions, 135 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 885e4f7..6440c81 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -201,7 +201,7 @@ endif () if (TEST_REF_FILTER) #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif () diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index cb89019..472824b 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -138,43 +138,43 @@ io_time_set(io_time_t *pt, timer_type t, int start_stop) switch(pt->type){ #ifdef H5_HAVE_PARALLEL case MPI_CLOCK: - if (start_stop == TSTART) { - pt->mpi_timer[t] = MPI_Wtime(); - - /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS - * we compute the time it took to only open the file */ - if(t == HDF5_FINE_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS]; - else if(t == HDF5_FINE_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS]; - - } else { - pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t]; - pt->mpi_timer[t] = MPI_Wtime(); - - /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS - * we compute the time it took to close the file after the last read/write finished */ - if(t == HDF5_GROSS_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS]; - else if(t == HDF5_GROSS_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS]; - } - break; + if (start_stop == TSTART) { + pt->mpi_timer[t] = MPI_Wtime(); + + /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS + * we compute the time it took to only open the file */ + if(t == HDF5_FINE_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_WRITE_FIXED_DIMS]; + else if(t == HDF5_FINE_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_OPEN] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_GROSS_READ_FIXED_DIMS]; + + } else { + pt->total_time[t] += MPI_Wtime() - pt->mpi_timer[t]; + pt->mpi_timer[t] = MPI_Wtime(); + + /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS + * we compute the time it took to close the file after the last read/write finished */ + if(t == HDF5_GROSS_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_WRITE_FIXED_DIMS]; + else if(t == HDF5_GROSS_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_CLOSE] += pt->mpi_timer[t] - pt->mpi_timer[HDF5_FINE_READ_FIXED_DIMS]; + } + break; #else case MPI_CLOCK: - HDfprintf(stderr, "MPI clock set in serial library\n"); - return NULL; + HDfprintf(stderr, "MPI clock set in serial library\n"); + return NULL; #endif /* H5_HAVE_PARALLEL */ case SYS_CLOCK: if (start_stop == TSTART) { HDgettimeofday(&pt->sys_timer[t], NULL); - /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS - * we compute the time it took to only open the file */ - if(t == HDF5_FINE_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS])); - else if(t == HDF5_FINE_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS])); + /* When we start the timer for HDF5_FINE_WRITE_FIXED_DIMS or HDF5_FINE_READ_FIXED_DIMS + * we compute the time it took to only open the file */ + if(t == HDF5_FINE_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_WRITE_FIXED_DIMS])); + else if(t == HDF5_FINE_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_OPEN] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_GROSS_READ_FIXED_DIMS])); } else { @@ -183,19 +183,19 @@ io_time_set(io_time_t *pt, timer_type t, int start_stop) HDgettimeofday(&sys_t, NULL); pt->total_time[t] += sub_time(&sys_t, &(pt->sys_timer[t])); - /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS - * we compute the time it took to close the file after the last read/write finished */ - if(t == HDF5_GROSS_WRITE_FIXED_DIMS) - pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS])); - else if(t == HDF5_GROSS_READ_FIXED_DIMS) - pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS])); + /* When we stop the timer for HDF5_GROSS_WRITE_FIXED_DIMS or HDF5_GROSS_READ_FIXED_DIMS + * we compute the time it took to close the file after the last read/write finished */ + if(t == HDF5_GROSS_WRITE_FIXED_DIMS) + pt->total_time[HDF5_FILE_WRITE_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_WRITE_FIXED_DIMS])); + else if(t == HDF5_GROSS_READ_FIXED_DIMS) + pt->total_time[HDF5_FILE_READ_CLOSE] += sub_time(&(pt->sys_timer[t]), &(pt->sys_timer[HDF5_FINE_READ_FIXED_DIMS])); } - break; + break; default: - HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type); - return NULL; + HDfprintf(stderr, "Unknown time clock type (%d)\n", pt->type); + return NULL; } /* end switch */ #if 0 @@ -221,10 +221,3 @@ io_time_get(io_time_t *pt, timer_type t) return pt->total_time[t]; } - -#if 0 -/* standalone is not working yet. Need fix later. -AKC- */ -#ifdef STANDALONE -#include "pio_standalone.c" -#endif -#endif diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h index 78bf676..c1fa58e 100644 --- a/tools/lib/io_timer.h +++ b/tools/lib/io_timer.h @@ -28,6 +28,7 @@ #ifdef H5_HAVE_WINSOCK2_H # include <winsock2.h> #endif /* H5_HAVE_WINSOCK2_H */ + /* The different types of timers we can have */ typedef enum timer_type_ { HDF5_FILE_OPENCLOSE, @@ -70,10 +71,19 @@ typedef struct io_time_t { #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ + +#ifdef STANDALONE +io_time_t *io_time_new(clock_type t); +void io_time_destroy(io_time_t *pt); +io_time_t *io_time_set(io_time_t *pt, timer_type t, int start_stop); +double io_time_get(io_time_t *pt, timer_type t); +#else H5TOOLS_DLL io_time_t *io_time_new(clock_type t); H5TOOLS_DLL void io_time_destroy(io_time_t *pt); H5TOOLS_DLL io_time_t *io_time_set(io_time_t *pt, timer_type t, int start_stop); H5TOOLS_DLL double io_time_get(io_time_t *pt, timer_type t); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 380ab3b..5ba5fb3 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -126,7 +126,8 @@ int main(int argc, const char *argv[]) static void ph5diff_worker(int nID) { - hid_t file1_id = -1, file2_id = -1; + hid_t file1_id = H5I_INVALID_HID; + hid_t file2_id = H5I_INVALID_HID; while(1) { diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c index b8e0292..7227de0 100644 --- a/tools/test/misc/repart_test.c +++ b/tools/test/misc/repart_test.c @@ -47,8 +47,8 @@ herr_t test_single_h5repart_opens(void); herr_t test_family_h5repart_opens(void) { - hid_t fid = -1; - hid_t fapl_id = -1; + hid_t fid = H5I_INVALID_HID; + hid_t fapl_id = H5I_INVALID_HID; /* open 1st file(single member file) with correct family size(20000 byte) */ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -102,7 +102,7 @@ error: herr_t test_single_h5repart_opens(void) { - hid_t fid = -1; + hid_t fid = H5I_INVALID_HID; /* open the single file */ if ((fid = H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT)) < 0) diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c index 7f1f038..d6774dc 100644 --- a/tools/test/misc/talign.c +++ b/tools/test/misc/talign.c @@ -32,11 +32,11 @@ const char *setname = "align"; int main(void) { - hid_t fil=-1, spc=-1, set=-1; - hid_t cs6=-1, cmp=-1, fix=-1; - hid_t cmp1=-1, cmp2=-1, cmp3=-1; - hid_t plist=-1; - hid_t array_dt=-1; + hid_t fil=-1, spc=-1, set=H5I_INVALID_HID; + hid_t cs6=-1, cmp=-1, fix=H5I_INVALID_HID; + hid_t cmp1=-1, cmp2=-1, cmp3=H5I_INVALID_HID; + hid_t plist=H5I_INVALID_HID; + hid_t array_dt=H5I_INVALID_HID; hsize_t dim[2]; hsize_t cdim[4]; diff --git a/tools/test/misc/vds/UC_1_one_dim_gen.c b/tools/test/misc/vds/UC_1_one_dim_gen.c index b997280..b5ddae3 100644 --- a/tools/test/misc/vds/UC_1_one_dim_gen.c +++ b/tools/test/misc/vds/UC_1_one_dim_gen.c @@ -59,16 +59,16 @@ static int UC_1_VDS_FILL_VALUE = -9; int main(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t src_dcplid = -1; /* source dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ - hid_t msid = -1; /* memory dataspace ID */ - hid_t fsid = -1; /* file dataspace ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ + hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */ + hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */ hsize_t extent[RANK]; /* dataset extents */ hsize_t start[RANK]; /* starting point for hyperslab */ diff --git a/tools/test/misc/vds/UC_2_two_dims_gen.c b/tools/test/misc/vds/UC_2_two_dims_gen.c index bd70fda..8e1554b 100644 --- a/tools/test/misc/vds/UC_2_two_dims_gen.c +++ b/tools/test/misc/vds/UC_2_two_dims_gen.c @@ -68,16 +68,16 @@ static int UC_2_VDS_FILL_VALUE = -9; int main(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t src_dcplid = -1; /* source dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ - hid_t msid = -1; /* memory dataspace ID */ - hid_t fsid = -1; /* file dataspace ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ + hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */ + hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */ hsize_t start[RANK]; /* starting point for hyperslab */ hsize_t extent[RANK]; /* dataset extents */ diff --git a/tools/test/misc/vds/UC_3_gaps_gen.c b/tools/test/misc/vds/UC_3_gaps_gen.c index e6e7226..74a23dc 100644 --- a/tools/test/misc/vds/UC_3_gaps_gen.c +++ b/tools/test/misc/vds/UC_3_gaps_gen.c @@ -29,12 +29,12 @@ static herr_t create_3_1_vds(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ hsize_t start[RANK]; /* source starting point for hyperslab */ hsize_t position[RANK]; /* vds mapping positions */ @@ -136,12 +136,12 @@ error: static herr_t create_3_2_vds(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ hsize_t start[RANK]; /* source starting point for hyperslab */ diff --git a/tools/test/misc/vds/UC_4_printf_gen.c b/tools/test/misc/vds/UC_4_printf_gen.c index b328046..24451e9 100644 --- a/tools/test/misc/vds/UC_4_printf_gen.c +++ b/tools/test/misc/vds/UC_4_printf_gen.c @@ -27,16 +27,16 @@ int main(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t src_dcplid = -1; /* source dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ - hid_t msid = -1; /* memory dataspace ID */ - hid_t fsid = -1; /* file dataspace ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ + hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */ + hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */ /* Hyperslab arrays */ hsize_t start[RANK] = {0, 0, 0}; diff --git a/tools/test/misc/vds/UC_5_stride_gen.c b/tools/test/misc/vds/UC_5_stride_gen.c index a105bbd..726ce6e 100644 --- a/tools/test/misc/vds/UC_5_stride_gen.c +++ b/tools/test/misc/vds/UC_5_stride_gen.c @@ -27,16 +27,16 @@ int main(void) { - hid_t src_sid = -1; /* source dataset's dataspace ID */ - hid_t src_dcplid = -1; /* source dataset property list ID */ + hid_t src_sid = H5I_INVALID_HID; /* source dataset's dataspace ID */ + hid_t src_dcplid = H5I_INVALID_HID; /* source dataset property list ID */ - hid_t vds_sid = -1; /* VDS dataspace ID */ - hid_t vds_dcplid = -1; /* VDS dataset property list ID */ + hid_t vds_sid = H5I_INVALID_HID; /* VDS dataspace ID */ + hid_t vds_dcplid = H5I_INVALID_HID; /* VDS dataset property list ID */ - hid_t fid = -1; /* HDF5 file ID */ - hid_t did = -1; /* dataset ID */ - hid_t msid = -1; /* memory dataspace ID */ - hid_t fsid = -1; /* file dataspace ID */ + hid_t fid = H5I_INVALID_HID; /* HDF5 file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ + hid_t msid = H5I_INVALID_HID; /* memory dataspace ID */ + hid_t fsid = H5I_INVALID_HID; /* file dataspace ID */ hsize_t extent[RANK]; /* source dataset extents */ hsize_t start[RANK]; /* starting point for hyperslab */ diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index 2d9c44f..57c0d52 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -168,7 +168,7 @@ main (void) static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS; unsigned char *the_data = NULL; - hid_t file, dset, file_space = -1; + hid_t file, dset, file_space = H5I_INVALID_HID; herr_t status; #ifdef H5_HAVE_GETRUSAGE struct rusage r_start, r_stop; diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c index 5d8474b..d000f60 100644 --- a/tools/test/perform/pio_engine.c +++ b/tools/test/perform/pio_engine.c @@ -557,16 +557,16 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, /* HDF5 variables */ herr_t hrc; /*HDF5 return code */ hsize_t h5dims[2]; /*dataset dim sizes */ - hid_t h5dset_space_id = -1; /*dataset space ID */ - hid_t h5mem_space_id = -1; /*memory dataspace ID */ - hid_t h5ds_id = -1; /*dataset handle */ + hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */ + hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */ + hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */ hsize_t h5block[2]; /*dataspace selection */ hsize_t h5stride[2]; hsize_t h5count[2]; hsize_t h5start[2]; hssize_t h5offset[2]; /* Selection offset within dataspace */ - hid_t h5dcpl = -1; /* Dataset creation property list */ - hid_t h5dxpl = -1; /* Dataset transfer property list */ + hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */ + hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */ /* Get the parameters from the parameter block */ blk_size=parms->blk_size; @@ -1402,7 +1402,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, GOTOERROR(FAIL); } - h5ds_id = -1; + h5ds_id = H5I_INVALID_HID; } /* end if */ } /* end for */ @@ -1458,7 +1458,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Space Close failed\n"); ret_code = FAIL; } else { - h5dset_space_id = -1; + h5dset_space_id = H5I_INVALID_HID; } } @@ -1468,7 +1468,7 @@ done: HDfprintf(stderr, "HDF5 Memory Space Close failed\n"); ret_code = FAIL; } else { - h5mem_space_id = -1; + h5mem_space_id = H5I_INVALID_HID; } } @@ -1478,7 +1478,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n"); ret_code = FAIL; } else { - h5dxpl = -1; + h5dxpl = H5I_INVALID_HID; } } @@ -1537,15 +1537,15 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, /* HDF5 variables */ herr_t hrc; /*HDF5 return code */ hsize_t h5dims[2]; /*dataset dim sizes */ - hid_t h5dset_space_id = -1; /*dataset space ID */ - hid_t h5mem_space_id = -1; /*memory dataspace ID */ - hid_t h5ds_id = -1; /*dataset handle */ + hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */ + hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */ + hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */ hsize_t h5block[2]; /*dataspace selection */ hsize_t h5stride[2]; hsize_t h5count[2]; hsize_t h5start[2]; hssize_t h5offset[2]; /* Selection offset within dataspace */ - hid_t h5dxpl = -1; /* Dataset transfer property list */ + hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */ /* Get the parameters from the parameter block */ blk_size=parms->blk_size; @@ -2357,7 +2357,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, GOTOERROR(FAIL); } - h5ds_id = -1; + h5ds_id = H5I_INVALID_HID; } /* end if */ } /* end for */ @@ -2413,7 +2413,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Space Close failed\n"); ret_code = FAIL; } else { - h5dset_space_id = -1; + h5dset_space_id = H5I_INVALID_HID; } } @@ -2423,7 +2423,7 @@ done: HDfprintf(stderr, "HDF5 Memory Space Close failed\n"); ret_code = FAIL; } else { - h5mem_space_id = -1; + h5mem_space_id = H5I_INVALID_HID; } } @@ -2433,7 +2433,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n"); ret_code = FAIL; } else { - h5dxpl = -1; + h5dxpl = H5I_INVALID_HID; } } @@ -2451,7 +2451,7 @@ done: do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags) { int ret_code = SUCCESS, mrc; - hid_t acc_tpl = -1; /* file access templates */ + hid_t acc_tpl = H5I_INVALID_HID; /* file access templates */ switch (param->io_type) { case POSIXIO: diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index e6db2e8..cf6d980 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -483,8 +483,8 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ #endif #ifdef H5_HAVE_PARALLEL -H5TEST_DLL int h5_set_info_object(void); -H5TEST_DLL void h5_dump_info_object(MPI_Info info); +int h5_set_info_object(void); +void h5_dump_info_object(MPI_Info info); #endif diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index 4dc4d0b..69409bb 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -114,11 +114,11 @@ static const char *multi_letters = "msbrglo"; /* string for multi driver */ /* HDF5 global variables */ static hsize_t h5count[MAX_DIMS]; /*selection count */ static hssize_t h5offset[MAX_DIMS]; /* Selection offset within dataspace */ -static hid_t h5dset_space_id = -1; /*dataset space ID */ -static hid_t h5mem_space_id = -1; /*memory dataspace ID */ -static hid_t h5ds_id = -1; /*dataset handle */ -static hid_t h5dcpl = -1; /* Dataset creation property list */ -static hid_t h5dxpl = -1; /* Dataset transfer property list */ +static hid_t h5dset_space_id = H5I_INVALID_HID; /*dataset space ID */ +static hid_t h5mem_space_id = H5I_INVALID_HID; /*memory dataspace ID */ +static hid_t h5ds_id = H5I_INVALID_HID; /*dataset handle */ +static hid_t h5dcpl = H5I_INVALID_HID; /* Dataset creation property list */ +static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property list */ /* * Function: do_sio @@ -575,7 +575,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer) GOTOERROR(FAIL); } - h5ds_id = -1; + h5ds_id = H5I_INVALID_HID; } /* end if */ done: @@ -587,7 +587,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Space Close failed\n"); ret_code = FAIL; } else { - h5dset_space_id = -1; + h5dset_space_id = H5I_INVALID_HID; } } @@ -597,7 +597,7 @@ done: HDfprintf(stderr, "HDF5 Memory Space Close failed\n"); ret_code = FAIL; } else { - h5mem_space_id = -1; + h5mem_space_id = H5I_INVALID_HID; } } @@ -607,7 +607,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n"); ret_code = FAIL; } else { - h5dxpl = -1; + h5dxpl = H5I_INVALID_HID; } } @@ -894,7 +894,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) GOTOERROR(FAIL); } - h5ds_id = -1; + h5ds_id = H5I_INVALID_HID; } /* end if */ done: @@ -906,7 +906,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Space Close failed\n"); ret_code = FAIL; } else { - h5dset_space_id = -1; + h5dset_space_id = H5I_INVALID_HID; } } @@ -916,7 +916,7 @@ done: HDfprintf(stderr, "HDF5 Memory Space Close failed\n"); ret_code = FAIL; } else { - h5mem_space_id = -1; + h5mem_space_id = H5I_INVALID_HID; } } @@ -926,7 +926,7 @@ done: HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n"); ret_code = FAIL; } else { - h5dxpl = -1; + h5dxpl = H5I_INVALID_HID; } } @@ -1137,7 +1137,7 @@ done: hid_t set_vfd(parameters *param) { - hid_t my_fapl = -1; + hid_t my_fapl = H5I_INVALID_HID; vfdtype vfd; vfd = param->vfd; diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index 248ef9a..45f6d25 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -498,8 +498,8 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ #endif #ifdef H5_HAVE_PARALLEL -H5TEST_DLL int h5_set_info_object(void); -H5TEST_DLL void h5_dump_info_object(MPI_Info info); +int h5_set_info_object(void); +void h5_dump_info_object(MPI_Info info); #endif @@ -527,4 +527,10 @@ typedef struct long_options { extern int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt); + +extern int nCols; /*max number of columns for outputting */ + +/* Definitions of useful routines */ +extern void print_version(const char *progname); + #endif |