diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2021-09-29 18:28:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 18:28:12 (GMT) |
commit | 3da0802c40d58759995916bf9d0880e19f0af44d (patch) | |
tree | 809ada78cec1cbaaf6ec2ace5b4429a56d0f6574 /tools | |
parent | 0fa5836cc5f037dd9f2cdd7f9a1051ddcc1c9ad0 (diff) | |
download | hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.zip hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.gz hdf5-3da0802c40d58759995916bf9d0880e19f0af44d.tar.bz2 |
VFD plugins (#602)
* Implement support for loading of Virtual File Drivers as plugins
Fix plugin caching for VOL connector and VFD plugins
Fix plugin iteration to skip paths that can't be opened
* Enable dynamic loading of VFDs with HDF5_DRIVER environment variable
* Temporarily disable error reporting during H5F_open double file open
* Default to using HDstat in h5_get_file_size for unknown VFDs
* Use macros for some environment variables that HDF5 interprets
* Update "null" and "ctl testing" VFDs
Diffstat (limited to 'tools')
47 files changed, 1101 insertions, 586 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 0ad319e..74db58f 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -648,14 +648,16 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char *------------------------------------------------------------------------- */ /* open file 1 */ - if (opts->custom_vol[0]) { - if ((fapl1_id = h5tools_get_fapl(H5P_DEFAULT, &(opts->vol_info[0]), NULL)) < 0) { + if (opts->custom_vol[0] || opts->custom_vfd[0]) { + if ((fapl1_id = h5tools_get_fapl(H5P_DEFAULT, opts->custom_vol[0] ? &(opts->vol_info[0]) : NULL, + opts->custom_vfd[0] ? &(opts->vfd_info[0]) : NULL)) < 0) { parallel_print("h5diff: unable to create fapl for input file\n"); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "unable to create input fapl\n"); } } - if ((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, fapl1_id, FALSE, NULL, (size_t)0)) < 0) { + if ((file1_id = h5tools_fopen(fname1, H5F_ACC_RDONLY, fapl1_id, (fapl1_id != H5P_DEFAULT), NULL, + (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname1); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "<%s>: unable to open file\n", fname1); } @@ -663,14 +665,16 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* open file 2 */ - if (opts->custom_vol[1]) { - if ((fapl2_id = h5tools_get_fapl(H5P_DEFAULT, &(opts->vol_info[1]), NULL)) < 0) { + if (opts->custom_vol[1] || opts->custom_vfd[1]) { + if ((fapl2_id = h5tools_get_fapl(H5P_DEFAULT, opts->custom_vol[1] ? &(opts->vol_info[1]) : NULL, + opts->custom_vfd[1] ? &(opts->vfd_info[1]) : NULL)) < 0) { parallel_print("h5diff: unable to create fapl for output file\n"); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "unable to create output fapl\n"); } } - if ((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, fapl2_id, FALSE, NULL, (size_t)0)) < 0) { + if ((file2_id = h5tools_fopen(fname2, H5F_ACC_RDONLY, fapl2_id, (fapl2_id != H5P_DEFAULT), NULL, + (size_t)0)) < 0) { parallel_print("h5diff: <%s>: unable to open file\n", fname2); H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "<%s>: unable to open file\n", fname2); } diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 7b41538..8d7ac13 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -89,7 +89,9 @@ typedef struct { char * obj_name[2]; /* name for object */ struct subset_t * sset[2]; /* subsetting parameters */ h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */ + h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */ hbool_t custom_vol[2]; /* Using a custom input, output VOL? */ + hbool_t custom_vfd[2]; /* Using a custom input, output VFD? */ } diff_opt_t; /*------------------------------------------------------------------------- diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index eee9c53..4de2c5c 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -459,8 +459,8 @@ h5tools_set_error_file(const char *fname, int is_bin) /*------------------------------------------------------------------------- * Function: h5tools_set_fapl_vfd * - * Purpose: Given a VFL driver name, sets the appropriate driver on the - * specified FAPL. + * Purpose: Given a VFL driver name or ID, sets the appropriate driver on + * the specified FAPL. * * Return: positive - succeeded * negative - failed @@ -471,107 +471,139 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info) { herr_t ret_value = SUCCEED; - /* Determine which driver the user wants to open the file with */ - if (!HDstrcmp(vfd_info->name, drivernames[SEC2_VFD_IDX])) { - /* SEC2 Driver */ - if (H5Pset_fapl_sec2(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[DIRECT_VFD_IDX])) { + switch (vfd_info->type) { + case VFD_BY_NAME: + /* Determine which driver the user wants to open the file with */ + if (!HDstrcmp(vfd_info->u.name, drivernames[SEC2_VFD_IDX])) { + /* SEC2 Driver */ + if (H5Pset_fapl_sec2(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[DIRECT_VFD_IDX])) { #ifdef H5_HAVE_DIRECT - /* Direct Driver */ - if (H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_direct failed"); + /* Direct Driver */ + if (H5Pset_fapl_direct(fapl_id, 1024, 4096, 8 * 4096) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_direct failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[LOG_VFD_IDX])) { - unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC; + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[LOG_VFD_IDX])) { + unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC; - /* Log Driver */ - if (H5Pset_fapl_log(fapl_id, NULL, log_flags, (size_t)0) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_log failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[WINDOWS_VFD_IDX])) { + /* Log Driver */ + if (H5Pset_fapl_log(fapl_id, NULL, log_flags, (size_t)0) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_log failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[WINDOWS_VFD_IDX])) { #ifdef H5_HAVE_WINDOWS - /* There is no Windows VFD - use SEC2 */ - if (H5Pset_fapl_sec2(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); + /* There is no Windows VFD - use SEC2 */ + if (H5Pset_fapl_sec2(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[STDIO_VFD_IDX])) { - /* Stdio Driver */ - if (H5Pset_fapl_stdio(fapl_id) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[CORE_VFD_IDX])) { - /* Core Driver */ - if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[FAMILY_VFD_IDX])) { - /* FAMILY Driver */ - /* Set member size to be 0 to indicate the current first member size - * is the member size. - */ - if (H5Pset_fapl_family(fapl_id, (hsize_t)0, H5P_DEFAULT) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[SPLIT_VFD_IDX])) { - /* SPLIT Driver */ - if (H5Pset_fapl_split(fapl_id, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[MULTI_VFD_IDX])) { - /* MULTI Driver */ - if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed"); - } - else if (!HDstrcmp(vfd_info->name, drivernames[MPIO_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[STDIO_VFD_IDX])) { + /* Stdio Driver */ + if (H5Pset_fapl_stdio(fapl_id) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[CORE_VFD_IDX])) { + /* Core Driver */ + if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[FAMILY_VFD_IDX])) { + /* FAMILY Driver */ + /* Set member size to be 0 to indicate the current first member size + * is the member size. + */ + if (H5Pset_fapl_family(fapl_id, (hsize_t)0, H5P_DEFAULT) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[SPLIT_VFD_IDX])) { + /* SPLIT Driver */ + if (H5Pset_fapl_split(fapl_id, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[MULTI_VFD_IDX])) { + /* MULTI Driver */ + if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed"); + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[MPIO_VFD_IDX])) { #ifdef H5_HAVE_PARALLEL - int mpi_initialized, mpi_finalized; + int mpi_initialized, mpi_finalized; - /* MPI-I/O Driver */ + /* MPI-I/O Driver */ - /* check if MPI is available. */ - MPI_Initialized(&mpi_initialized); - MPI_Finalized(&mpi_finalized); + /* check if MPI is available. */ + MPI_Initialized(&mpi_initialized); + MPI_Finalized(&mpi_finalized); - if (mpi_initialized && !mpi_finalized) { - if (H5Pset_fapl_mpio(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_mpio failed"); - } + if (mpi_initialized && !mpi_finalized) { + if (H5Pset_fapl_mpio(fapl_id, MPI_COMM_WORLD, MPI_INFO_NULL) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_mpio failed"); + } #else - H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled"); #endif /* H5_HAVE_PARALLEL */ - } - else if (!HDstrcmp(vfd_info->name, drivernames[ROS3_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[ROS3_VFD_IDX])) { #ifdef H5_HAVE_ROS3_VFD - if (!vfd_info->info) - H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid"); - if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed"); + if (!vfd_info->info) + H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid"); + if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled"); #endif - } - else if (!HDstrcmp(vfd_info->name, drivernames[HDFS_VFD_IDX])) { + } + else if (!HDstrcmp(vfd_info->u.name, drivernames[HDFS_VFD_IDX])) { #ifdef H5_HAVE_LIBHDFS - if (!vfd_info->info) - H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid"); - if (H5Pset_fapl_hdfs(fapl_id, (H5FD_hdfs_fapl_t *)vfd_info->info) < 0) - H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed"); + if (!vfd_info->info) + H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid"); + if (H5Pset_fapl_hdfs(fapl_id, (H5FD_hdfs_fapl_t *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed"); #else - H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled"); + H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled"); #endif + } + else { + /* + * Try to load VFD plugin. + * + * Currently, driver configuration strings are unsupported. + */ + if (H5Pset_driver_by_name(fapl_id, vfd_info->u.name, (const char *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver name '%s'", vfd_info->u.name); + } + + break; + + case VFD_BY_VALUE: + /* + * Try to load VFD plugin. + * + * Currently, driver configuration strings are unsupported. + */ + if (H5Pset_driver_by_value(fapl_id, vfd_info->u.value, (const char *)vfd_info->info) < 0) + H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver value '%ld'", + (long int)vfd_info->u.value); + break; + + default: + H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD retrieval type"); } - else - H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD name"); done: + if (ret_value < 0) { + /* Clear error message unless asked for */ + if (enable_error_stack <= 1) + H5Epop(H5tools_ERR_STACK_g, 1); + } + return ret_value; } @@ -671,6 +703,10 @@ done: if (ret_value < 0) { if (connector_id >= 0 && H5Idec_ref(connector_id) < 0) H5TOOLS_ERROR(FAIL, "failed to decrement refcount on VOL connector ID"); + + /* Clear error message unless asked for */ + if (enable_error_stack <= 1) + H5Epop(H5tools_ERR_STACK_g, 1); } return ret_value; @@ -719,9 +755,15 @@ h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vol_info_t *vol_info, h5tools_vfd_i ret_value = new_fapl_id; done: - if ((new_fapl_id >= 0) && (ret_value < 0)) { - H5Pclose(new_fapl_id); - new_fapl_id = H5I_INVALID_HID; + if (ret_value < 0) { + if (new_fapl_id >= 0) { + H5Pclose(new_fapl_id); + new_fapl_id = H5I_INVALID_HID; + } + + /* Clear error message unless asked for */ + if (enable_error_stack <= 1) + H5Epop(H5tools_ERR_STACK_g, 1); } return ret_value; @@ -937,8 +979,9 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec if (drivernum == LOG_VFD_IDX) continue; - vfd_info.info = NULL; - vfd_info.name = drivernames[drivernum]; + vfd_info.type = VFD_BY_NAME; + vfd_info.info = NULL; + vfd_info.u.name = drivernames[drivernum]; /* Get a fapl reflecting the selected VOL connector and VFD */ if ((tmp_fapl_id = h5tools_get_fapl(fapl_id, &vol_info, &vfd_info)) < 0) @@ -989,6 +1032,10 @@ done: if (tmp_fapl_id >= 0) H5Pclose(tmp_fapl_id); + /* Clear error message unless asked for */ + if (ret_value < 0 && enable_error_stack <= 1) + H5Epop(H5tools_ERR_STACK_g, 1); + return ret_value; } diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 9d065f3..dde4026 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -553,6 +553,7 @@ typedef struct h5tools_context_t { */ typedef enum { VOL_BY_NAME, VOL_BY_VALUE } h5tools_vol_info_type_t; +typedef enum { VFD_BY_NAME, VFD_BY_VALUE } h5tools_vfd_info_type_t; typedef struct h5tools_vol_info_t { h5tools_vol_info_type_t type; @@ -568,12 +569,16 @@ typedef struct h5tools_vol_info_t { } h5tools_vol_info_t; typedef struct h5tools_vfd_info_t { + h5tools_vfd_info_type_t type; /* Pointer to information to be passed to the driver for its setup */ const void *info; - /* Name of the VFD */ - const char *name; + /* Field specifying either the driver's name or value (ID) */ + union { + const char * name; + H5FD_class_value_t value; + } u; } h5tools_vfd_info_t; /* This enum should match the entries in the above 'volnames' diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 37d38fd..1a15a47 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -1201,9 +1201,10 @@ test_set_configured_fapl(void) #endif /* UTIL_TEST_DEBUG */ /* test */ - vfd_info.info = C.conf_fa; - vfd_info.name = C.vfdname; - result = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info); + vfd_info.type = VFD_BY_NAME; + vfd_info.info = C.conf_fa; + vfd_info.u.name = C.vfdname; + result = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info); if (C.expected == 0) JSVERIFY(result, H5I_INVALID_HID, C.message) else diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index b669087..3d89936 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -48,6 +48,12 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"vol-value-2", require_arg, '4'}, {"vol-name-2", require_arg, '5'}, {"vol-info-2", require_arg, '6'}, + {"vfd-value-1", require_arg, '7'}, + {"vfd-name-1", require_arg, '8'}, + {"vfd-info-1", require_arg, '9'}, + {"vfd-value-2", require_arg, '0'}, + {"vfd-name-2", require_arg, 'Y'}, + {"vfd-info-2", require_arg, 'Z'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -432,6 +438,38 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char case '6': opts->vol_info[1].info_string = H5_optarg; break; + + case '7': + opts->vfd_info[0].type = VFD_BY_VALUE; + opts->vfd_info[0].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->custom_vfd[0] = TRUE; + break; + + case '8': + opts->vfd_info[0].type = VFD_BY_NAME; + opts->vfd_info[0].u.name = H5_optarg; + opts->custom_vol[0] = TRUE; + break; + + case '9': + opts->vfd_info[0].info = (const void *)H5_optarg; + break; + + case '0': + opts->vfd_info[1].type = VFD_BY_VALUE; + opts->vfd_info[1].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->custom_vfd[1] = TRUE; + break; + + case 'Y': + opts->vfd_info[1].type = VFD_BY_NAME; + opts->vfd_info[1].u.name = H5_optarg; + opts->custom_vfd[1] = TRUE; + break; + + case 'Z': + opts->vfd_info[1].info = (const void *)H5_optarg; + break; } } @@ -657,6 +695,24 @@ usage(void) PRINTVALSTREAM(rawoutstream, " --vol-info-2 VOL-specific info to pass to the VOL connector used for\n"); PRINTVALSTREAM(rawoutstream, " opening the second HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-value-1 Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " first HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-name-1 Name of the VFL driver to use for opening the first\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-info-1 VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the first HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-value-2 Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " second HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-name-2 Name of the VFL driver to use for opening the second\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-info-2 VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the second HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, " --follow-symlinks\n"); PRINTVALSTREAM(rawoutstream, " Follow symbolic links (soft links and external links and compare the)\n"); diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 36114ba..e6d1de3 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -18,14 +18,15 @@ /* Name of tool */ #define PROGRAMNAME "h5dump" -static const char *driver_name_g = NULL; /* The driver to open the file with. */ const char * outfname_g = NULL; static hbool_t doxml_g = FALSE; static hbool_t useschema_g = TRUE; static const char *xml_dtd_uri_g = NULL; static hbool_t use_custom_vol_g = FALSE; +static hbool_t use_custom_vfd_g = FALSE; static h5tools_vol_info_t vol_info_g; +static h5tools_vfd_info_t vfd_info_g; #ifdef H5_HAVE_ROS3_VFD /* Default "anonymous" S3 configuration */ @@ -127,6 +128,9 @@ static struct h5_long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"vol-value", require_arg, '1'}, {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, + {"vfd-value", require_arg, '4'}, + {"vfd-name", require_arg, '5'}, + {"vfd-info", require_arg, '6'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -196,6 +200,14 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " --vol-info VOL-specific info to pass to the VOL connector used for\n"); PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-value Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vfd-name Name of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-info VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, "--------------- Object Options ---------------\n"); PRINTVALSTREAM(rawoutstream, " -a P, --attribute=P Print the specified attribute\n"); PRINTVALSTREAM(rawoutstream, @@ -943,7 +955,10 @@ parse_start: last_was_dset = TRUE; break; case 'f': - driver_name_g = H5_optarg; + vfd_info_g.type = VFD_BY_NAME; + vfd_info_g.u.name = H5_optarg; + vfd_info_g.info = NULL; + use_custom_vfd_g = TRUE; break; case 'g': dump_opts.display_all = 0; @@ -1264,6 +1279,22 @@ end_collect: vol_info_g.info_string = H5_optarg; break; + case '4': + vfd_info_g.type = VFD_BY_VALUE; + vfd_info_g.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + use_custom_vfd_g = TRUE; + break; + + case '5': + vfd_info_g.type = VFD_BY_NAME; + vfd_info_g.u.name = H5_optarg; + use_custom_vfd_g = TRUE; + break; + + case '6': + vfd_info_g.info = (const void *)H5_optarg; + break; + case '?': default: usage(h5tools_getprogname()); @@ -1378,40 +1409,9 @@ main(int argc, const char *argv[]) /* Initialize indexing options */ h5trav_set_index(sort_by, sort_order); - if (driver_name_g != NULL) { - h5tools_vfd_info_t vfd_info; - - vfd_info.info = NULL; - vfd_info.name = driver_name_g; - - if (!HDstrcmp(driver_name_g, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa_g; -#else - error_msg("Read-Only S3 VFD not enabled.\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; -#endif - } - else if (!HDstrcmp(driver_name_g, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa_g; -#else - error_msg("The HDFS VFD is not enabled.\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; -#endif - } - - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { - error_msg("unable to create FAPL for file access\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - } /* driver name defined */ - - if (use_custom_vol_g) { - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &vol_info_g, NULL)) < 0) { + if (use_custom_vol_g || use_custom_vfd_g) { + if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, use_custom_vol_g ? &vol_info_g : NULL, + use_custom_vfd_g ? &vfd_info_g : NULL)) < 0) { error_msg("unable to create FAPL for file access\n"); h5tools_setstatus(EXIT_FAILURE); goto done; @@ -1421,7 +1421,7 @@ main(int argc, const char *argv[]) while (H5_optind < argc) { fname = HDstrdup(argv[H5_optind++]); - fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0); + fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0); if (fid < 0) { error_msg("unable to open file \"%s\"\n", fname); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 4392d85..2ec8da2 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -240,6 +240,12 @@ usage(void) PRINTVALSTREAM(rawoutstream, " --vol-info VOL-specific info to pass to the VOL connector used for\n"); PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vfd-value Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vfd-name Name of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vfd-info VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " file/OBJECT\n"); PRINTVALSTREAM(rawoutstream, " Each object consists of an HDF5 file name optionally followed by a\n"); @@ -2649,11 +2655,12 @@ main(int argc, const char *argv[]) int argno; static char root_name[] = "/"; char drivername[50]; - const char * preferred_driver = NULL; - int err_exit = 0; - hid_t fapl_id = H5P_DEFAULT; - hbool_t custom_vol_fapl = FALSE; + int err_exit = 0; + hid_t fapl_id = H5P_DEFAULT; + hbool_t custom_vol_fapl = FALSE; + hbool_t custom_vfd_fapl = FALSE; h5tools_vol_info_t vol_info; + h5tools_vfd_info_t vfd_info; #ifdef H5_HAVE_ROS3_VFD /* Default "anonymous" S3 configuration */ @@ -2684,8 +2691,9 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); - /* Initialize fapl info struct */ + /* Initialize fapl info structs */ HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Build object display table */ DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL); @@ -2747,9 +2755,6 @@ main(int argc, const char *argv[]) else if (!HDstrcmp(argv[argno], "--string")) { string_g = TRUE; } - else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) { - preferred_driver = argv[argno] + 6; - } else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) { vol_info.type = VOL_BY_VALUE; vol_info.u.value = (H5VL_class_value_t)HDatoi(argv[argno] + 12); @@ -2763,6 +2768,25 @@ main(int argc, const char *argv[]) else if (!HDstrncmp(argv[argno], "--vol-info=", (size_t)11)) { vol_info.info_string = argv[argno] + 11; } + else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) { + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = argv[argno] + 6; + vfd_info.info = NULL; + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) { + vfd_info.type = VFD_BY_VALUE; + vfd_info.u.value = (H5FD_class_value_t)HDatoi(argv[argno] + 12); + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) { + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = argv[argno] + 11; + custom_vfd_fapl = TRUE; + } + else if (!HDstrncmp(argv[argno], "--vfd-info=", (size_t)11)) { + vfd_info.info = (const void *)(argv[argno] + 11); + } else if (!HDstrncmp(argv[argno], "--width=", (size_t)8)) { width_g = (int)HDstrtol(argv[argno] + 8, &rest, 0); @@ -2959,42 +2983,14 @@ main(int argc, const char *argv[]) } /* Setup a custom fapl for file accesses */ - if (custom_vol_fapl) { - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &vol_info, NULL)) < 0) { + if (custom_vol_fapl || custom_vfd_fapl) { + if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, custom_vol_fapl ? &vol_info : NULL, + custom_vfd_fapl ? &vfd_info : NULL)) < 0) { error_msg("failed to setup file access property list (fapl) for file\n"); leave(EXIT_FAILURE); } } - if (preferred_driver) { - h5tools_vfd_info_t vfd_info; - - vfd_info.info = NULL; - vfd_info.name = preferred_driver; - - if (!HDstrcmp(preferred_driver, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa; -#else - HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n"); - leave(EXIT_FAILURE); -#endif - } - else if (!HDstrcmp(preferred_driver, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa; -#else - HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n"); - leave(EXIT_FAILURE); -#endif - } - - if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { - HDfprintf(rawerrorstream, "Error: Unable to create FAPL for file access\n\n"); - leave(EXIT_FAILURE); - } - } - /* Each remaining argument is an hdf5 file followed by an optional slash * and object name. * @@ -3019,8 +3015,8 @@ main(int argc, const char *argv[]) file_id = H5I_INVALID_HID; while (fname && *fname) { - file_id = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, - drivername, sizeof drivername); + file_id = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), drivername, + sizeof drivername); if (file_id >= 0) { if (verbose_g) diff --git a/tools/src/h5perf/perf.c b/tools/src/h5perf/perf.c index 83d4ab0..50b18bc 100644 --- a/tools/src/h5perf/perf.c +++ b/tools/src/h5perf/perf.c @@ -605,7 +605,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu * we are using the split driver since both of those * use the multi VFD under the hood. */ - env = HDgetenv("HDF5_DRIVER"); + env = HDgetenv(HDF5_DRIVER); #ifdef HDF5_DRIVER /* Use the environment variable, then the compile-time constant */ if (!env) diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index cac36d7..f890c7d 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -2676,7 +2676,7 @@ do_cleanupfile(iotype iot, char *fname) return; if (clean_file_g == -1) - clean_file_g = (getenv("HDF5_NOCLEANUP") == NULL) ? 1 : 0; + clean_file_g = (getenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0; if (clean_file_g) { switch (iot) { diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c index e69a7cd..3ebacc0 100644 --- a/tools/src/h5perf/sio_engine.c +++ b/tools/src/h5perf/sio_engine.c @@ -1272,7 +1272,7 @@ do_cleanupfile(iotype iot, char *filename) hid_t driver; if (clean_file_g == -1) - clean_file_g = (HDgetenv("HDF5_NOCLEANUP") == NULL) ? 1 : 0; + clean_file_g = (HDgetenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0; if (clean_file_g) { diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 7cad36b..d75b1cf 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -758,8 +758,8 @@ check_objects(const char *fname, pack_opt_t *options) * open the file *------------------------------------------------------------------------- */ - if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, options->fin_fapl, - (options->fin_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) + if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, options->fin_fapl, (options->fin_fapl != H5P_DEFAULT), + NULL, 0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname, H5FOPENERROR); /*------------------------------------------------------------------------- diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index 934b4d1..3806a4e 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -81,8 +81,8 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options) * open input file *------------------------------------------------------------------------- */ - if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, options->fin_fapl, - (options->fin_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, (size_t)0)) < 0) + if ((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, options->fin_fapl, (options->fin_fapl != H5P_DEFAULT), + NULL, (size_t)0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fnamein, H5FOPENERROR); /* get user block size and file space strategy/persist/threshold */ diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 3526268..08568cd 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -31,7 +31,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:vz:EG:LM:P:S:T:VXW1:2:3:4:5:6:"; +static const char *s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:vz:EG:LM:P:S:T:VXWY:Z:1:2:3:4:5:6:7:8:9:0:"; static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'}, {"block", require_arg, 'b'}, {"compact", require_arg, 'c'}, @@ -68,6 +68,12 @@ static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'}, {"dst-vol-value", require_arg, '4'}, {"dst-vol-name", require_arg, '5'}, {"dst-vol-info", require_arg, '6'}, + {"src-vfd-value", require_arg, '7'}, + {"src-vfd-name", require_arg, '8'}, + {"src-vfd-info", require_arg, '9'}, + {"dst-vfd-value", require_arg, '0'}, + {"dst-vfd-name", require_arg, 'Y'}, + {"dst-vfd-info", require_arg, 'Z'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -112,6 +118,24 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " --dst-vol-info VOL-specific info to pass to the VOL connector used for\n"); PRINTVALSTREAM(rawoutstream, " opening the output HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --src-vfd-value Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " input HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --src-vfd-name Name of the VFL driver to use for opening the input\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --src-vfd-info VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the input HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --dst-vfd-value Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " output HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --dst-vfd-name Name of the VFL driver to use for opening the output\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --dst-vfd-info VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the output HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, " -L, --latest Use latest version of file format\n"); PRINTVALSTREAM(rawoutstream, " This option will take precedence over the options\n"); @@ -486,15 +510,21 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options) { h5tools_vol_info_t in_vol_info; h5tools_vol_info_t out_vol_info; - hbool_t custom_in_fapl = FALSE; - hbool_t custom_out_fapl = FALSE; - hid_t tmp_fapl = H5I_INVALID_HID; + h5tools_vfd_info_t in_vfd_info; + h5tools_vfd_info_t out_vfd_info; + hbool_t custom_in_vol = FALSE; + hbool_t custom_in_vfd = FALSE; + hbool_t custom_out_vol = FALSE; + hbool_t custom_out_vfd = FALSE; + hid_t tmp_fapl = H5I_INVALID_HID; int bound, opt; int ret_value = 0; /* Initialize fapl info structs */ HDmemset(&in_vol_info, 0, sizeof(h5tools_vol_info_t)); HDmemset(&out_vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t)); + HDmemset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* parse command line options */ while (EOF != (opt = H5_get_option(argc, argv, s_opts, l_opts))) { @@ -741,13 +771,13 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options) case '1': in_vol_info.type = VOL_BY_VALUE; in_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_in_fapl = TRUE; + custom_in_vol = TRUE; break; case '2': in_vol_info.type = VOL_BY_NAME; in_vol_info.u.name = H5_optarg; - custom_in_fapl = TRUE; + custom_in_vol = TRUE; break; case '3': @@ -757,19 +787,51 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options) case '4': out_vol_info.type = VOL_BY_VALUE; out_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_out_fapl = TRUE; + custom_out_vol = TRUE; break; case '5': out_vol_info.type = VOL_BY_NAME; out_vol_info.u.name = H5_optarg; - custom_out_fapl = TRUE; + custom_out_vol = TRUE; break; case '6': out_vol_info.info_string = H5_optarg; break; + case '7': + in_vfd_info.type = VFD_BY_VALUE; + in_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_in_vfd = TRUE; + break; + + case '8': + in_vfd_info.type = VFD_BY_NAME; + in_vfd_info.u.name = H5_optarg; + custom_in_vfd = TRUE; + break; + + case '9': + in_vfd_info.info = (const void *)H5_optarg; + break; + + case '0': + out_vfd_info.type = VFD_BY_VALUE; + out_vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_out_vfd = TRUE; + break; + + case 'Y': + out_vfd_info.type = VFD_BY_NAME; + out_vfd_info.u.name = H5_optarg; + custom_out_vfd = TRUE; + break; + + case 'Z': + out_vfd_info.info = (const void *)H5_optarg; + break; + default: break; } /* end switch */ @@ -803,8 +865,9 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options) } /* Setup FAPL for input and output file accesses */ - if (custom_in_fapl) { - if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, &in_vol_info, NULL)) < 0) { + if (custom_in_vol || custom_in_vfd) { + if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, custom_in_vol ? &in_vol_info : NULL, + custom_in_vfd ? &in_vfd_info : NULL)) < 0) { error_msg("failed to setup FAPL for input file\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = -1; @@ -823,8 +886,9 @@ parse_command_line(int argc, const char **argv, pack_opt_t *options) options->fin_fapl = tmp_fapl; } - if (custom_out_fapl) { - if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, &out_vol_info, NULL)) < 0) { + if (custom_out_vol || custom_out_vfd) { + if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, custom_out_vol ? &out_vol_info : NULL, + custom_out_vfd ? &out_vfd_info : NULL)) < 0) { error_msg("failed to setup FAPL for output file\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = -1; diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 0542d03..8c54dde 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -378,11 +378,11 @@ h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t *------------------------------------------------------------------------- */ /* Open the files */ - if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, - (fname1_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) + if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, (fname1_fapl != H5P_DEFAULT), NULL, 0)) < + 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR); - if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, - (fname2_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) + if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, (fname2_fapl != H5P_DEFAULT), NULL, 0)) < + 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR); /*------------------------------------------------------------------------- diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index efc80b6..d745c0f 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1702,25 +1702,9 @@ main(int argc, const char *argv[]) if (drivername) { h5tools_vfd_info_t vfd_info; - vfd_info.info = NULL; - vfd_info.name = drivername; - - if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX])) { -#ifdef H5_HAVE_ROS3_VFD - vfd_info.info = (void *)&ros3_fa; -#else - error_msg("Read-Only S3 VFD not enabled.\n"); - goto done; -#endif - } - else if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX])) { -#ifdef H5_HAVE_LIBHDFS - vfd_info.info = (void *)&hdfs_fa; -#else - error_msg("HDFS VFD not enabled.\n"); - goto done; -#endif - } + vfd_info.type = VFD_BY_NAME; + vfd_info.info = NULL; + vfd_info.u.name = drivername; if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) { error_msg("Unable to create FAPL for file access\n"); @@ -1737,7 +1721,7 @@ main(int argc, const char *argv[]) HDprintf("Filename: %s\n", fname); - fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0); + fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0); if (fid < 0) { error_msg("unable to open file \"%s\"\n", fname); diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c index a85ee4d..1e66fce 100644 --- a/tools/src/misc/h5mkgrp.c +++ b/tools/src/misc/h5mkgrp.c @@ -26,7 +26,8 @@ static const char * s_opts = "hlpvV"; static struct h5_long_options l_opts[] = { {"help", no_arg, 'h'}, {"latest", no_arg, 'l'}, {"parents", no_arg, 'p'}, {"verbose", no_arg, 'v'}, {"version", no_arg, 'V'}, {"vol-value", require_arg, '1'}, - {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, {NULL, 0, '\0'}}; + {"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, {"vfd-value", require_arg, '4'}, + {"vfd-name", require_arg, '5'}, {"vfd-info", require_arg, '6'}, {NULL, 0, '\0'}}; /* Command line parameter settings */ typedef struct mkgrp_opt_t { @@ -105,6 +106,14 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " --vol-info VOL-specific info to pass to the VOL connector used for\n"); PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-value Value (ID) of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vfd-name Name of the VFL driver to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, + " --vfd-info VFD-specific info to pass to the VFL driver used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, "\n"); } /* end usage() */ @@ -126,8 +135,10 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) { int opt; /* Option from command line */ size_t curr_group; /* Current group name to copy */ - hbool_t custom_fapl = FALSE; + hbool_t custom_vol = FALSE; + hbool_t custom_vfd = FALSE; h5tools_vol_info_t vol_info; + h5tools_vfd_info_t vfd_info; hid_t tmp_fapl_id = H5I_INVALID_HID; /* Check for empty command line */ @@ -136,8 +147,9 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) leave(EXIT_SUCCESS); } - /* Initialize fapl info struct */ + /* Initialize fapl info structs */ HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t)); + HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t)); /* Parse command line options */ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { @@ -172,19 +184,35 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) case '1': vol_info.type = VOL_BY_VALUE; vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg); - custom_fapl = TRUE; + custom_vol = TRUE; break; case '2': vol_info.type = VOL_BY_NAME; vol_info.u.name = H5_optarg; - custom_fapl = TRUE; + custom_vol = TRUE; break; case '3': vol_info.info_string = H5_optarg; break; + case '4': + vfd_info.type = VFD_BY_VALUE; + vfd_info.u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + custom_vfd = TRUE; + break; + + case '5': + vfd_info.type = VFD_BY_NAME; + vfd_info.u.name = H5_optarg; + custom_vfd = TRUE; + break; + + case '6': + vfd_info.info = (const void *)H5_optarg; + break; + /* Bad command line argument */ default: usage(h5tools_getprogname()); @@ -223,8 +251,9 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options) } /* Setup a custom fapl for file accesses */ - if (custom_fapl) { - if ((tmp_fapl_id = h5tools_get_fapl(options->fapl_id, &vol_info, NULL)) < 0) { + if (custom_vol || custom_vfd) { + if ((tmp_fapl_id = h5tools_get_fapl(options->fapl_id, custom_vol ? &vol_info : NULL, + custom_vfd ? &vfd_info : NULL)) < 0) { error_msg("failed to setup file access property list (fapl) for file\n"); leave(EXIT_FAILURE); } @@ -296,7 +325,8 @@ main(int argc, const char *argv[]) } /* Attempt to open an existing HDF5 file first */ - fid = h5tools_fopen(params_g.fname, H5F_ACC_RDWR, params_g.fapl_id, FALSE, NULL, 0); + fid = h5tools_fopen(params_g.fname, H5F_ACC_RDWR, params_g.fapl_id, (params_g.fapl_id != H5P_DEFAULT), + NULL, 0); /* If we couldn't open an existing file, try creating file */ /* (use "EXCL" instead of "TRUNC", so we don't blow away existing non-HDF5 file) */ diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt index 3631db7..c8e8560 100644 --- a/tools/test/h5diff/testfiles/h5diff_10.txt +++ b/tools/test/h5diff/testfiles/h5diff_10.txt @@ -36,6 +36,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt index 8a4ce6d..c8190ce 100644 --- a/tools/test/h5diff/testfiles/h5diff_600.txt +++ b/tools/test/h5diff/testfiles/h5diff_600.txt @@ -36,6 +36,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt index d4c7336..03c23e7 100644 --- a/tools/test/h5diff/testfiles/h5diff_603.txt +++ b/tools/test/h5diff/testfiles/h5diff_603.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt index 3123587..0e9d5be 100644 --- a/tools/test/h5diff/testfiles/h5diff_606.txt +++ b/tools/test/h5diff/testfiles/h5diff_606.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt index ce2d887..ac19926 100644 --- a/tools/test/h5diff/testfiles/h5diff_612.txt +++ b/tools/test/h5diff/testfiles/h5diff_612.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt index 61fd036..44eba43 100644 --- a/tools/test/h5diff/testfiles/h5diff_615.txt +++ b/tools/test/h5diff/testfiles/h5diff_615.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt index dc8655d..32310eb 100644 --- a/tools/test/h5diff/testfiles/h5diff_621.txt +++ b/tools/test/h5diff/testfiles/h5diff_621.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt index f20ffbe..630184f 100644 --- a/tools/test/h5diff/testfiles/h5diff_622.txt +++ b/tools/test/h5diff/testfiles/h5diff_622.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt index f73d202..82c4ce2 100644 --- a/tools/test/h5diff/testfiles/h5diff_623.txt +++ b/tools/test/h5diff/testfiles/h5diff_623.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt index 903b738..a675ec6 100644 --- a/tools/test/h5diff/testfiles/h5diff_624.txt +++ b/tools/test/h5diff/testfiles/h5diff_624.txt @@ -37,6 +37,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] HDF5 file specified --vol-info-2 VOL-specific info to pass to the VOL connector used for opening the second HDF5 file specified + --vfd-value-1 Value (ID) of the VFL driver to use for opening the + first HDF5 file specified + --vfd-name-1 Name of the VFL driver to use for opening the first + HDF5 file specified + --vfd-info-1 VFD-specific info to pass to the VFL driver used for + opening the first HDF5 file specified + --vfd-value-2 Value (ID) of the VFL driver to use for opening the + second HDF5 file specified + --vfd-name-2 Name of the VFL driver to use for opening the second + HDF5 file specified + --vfd-info-2 VFD-specific info to pass to the VFL driver used for + opening the second HDF5 file specified --follow-symlinks Follow symbolic links (soft links and external links and compare the) links' target objects. diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake index e26941b..4f6e51d 100644 --- a/tools/test/h5repack/CMakeVFDTests.cmake +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -24,11 +24,28 @@ set (VFD_LIST split multi family + splitter + #log - log VFD currently has file space allocation bugs ) if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif () +if (H5_HAVE_PARALLEL) + set (VFD_LIST ${VFD_LIST} mpio) +endif () +if (H5_HAVE_MIRROR_VFD) + set (VFD_LIST ${VFD_LIST} mirror) +endif () +if (H5_HAVE_ROS3_VFD) + set (VFD_LIST ${VFD_LIST} ros3) +endif () +if (H5_HAVE_LIBHDFS) + set (VFD_LIST ${VFD_LIST} hdfs) +endif () +if (H5_HAVE_WINDOWS) + set (VFD_LIST ${VFD_LIST} windows) +endif () ############################################################################## ############################################################################## diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index b62fa53..ed3fedd 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -272,98 +272,100 @@ main(void) GOERROR; PASSED(); - TESTING(" files with file space info setting-- options -S and -P are set & -L"); - ++j; /* #3 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */ - pack_options.fs_persist = TRUE; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (h5_using_default_driver(NULL)) { + TESTING(" files with file space info setting-- options -S and -P are set & -L"); + ++j; /* #3 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */ + pack_options.fs_persist = TRUE; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -P and -T are set & -L"); - ++j; /* #4 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 2; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -P and -T are set & -L"); + ++j; /* #4 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 2; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S and -G are set & -L"); - ++j; /* #5 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; - pack_options.fs_pagesize = 8192; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S and -G are set & -L"); + ++j; /* #5 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; + pack_options.fs_pagesize = 8192; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); - ++j; /* #6 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; - pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ - pack_options.fs_threshold = 1; - pack_options.fs_pagesize = 8192; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S, -P, -T, -G are set"); + ++j; /* #6 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE; + pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */ + pack_options.fs_threshold = 1; + pack_options.fs_pagesize = 8192; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); - TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); - ++j; /* #7 */ - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - fname = H5REPACK_FSPACE_FNAMES[j]; - if (h5repack_init(&pack_options, 0, TRUE) < 0) - GOERROR; - pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR; - pack_options.fs_threshold = 1; - pack_options.fs_pagesize = 4096; - if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) - GOERROR; - if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + TESTING(" files with file space info setting-- options -S, -T, -G are set & -L"); + ++j; /* #7 */ + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + fname = H5REPACK_FSPACE_FNAMES[j]; + if (h5repack_init(&pack_options, 0, TRUE) < 0) + GOERROR; + pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR; + pack_options.fs_threshold = 1; + pack_options.fs_pagesize = 4096; + if (h5repack(fname, FSPACE_OUT, &pack_options) < 0) + GOERROR; + if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(fname, FSPACE_OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * file with fill values @@ -389,20 +391,22 @@ main(void) * file with all kinds of dataset datatypes *------------------------------------------------------------------------- */ - TESTING(" copy of datasets (all datatypes)"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (!h5_using_parallel_driver(NULL)) { + TESTING(" copy of datasets (all datatypes)"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_cmp_pl(FNAME1, pack_options.fin_fapl, FNAME1OUT, pack_options.fout_fapl) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * file with attributes @@ -1487,49 +1491,53 @@ main(void) GOERROR; PASSED(); - /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ - TESTING(" file with userblock"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0) - GOERROR; - if (verify_userblock(FNAME16OUT) < 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test file with userblock + *------------------------------------------------------------------------- + */ + TESTING(" file with userblock"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0) + GOERROR; + if (verify_userblock(FNAME16OUT) < 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * test --latest options *------------------------------------------------------------------------- */ - TESTING(" latest file format options"); - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.latest = 1; - pack_options.grp_compact = 10; - pack_options.grp_indexed = 5; - pack_options.msg_size[0] = 10; - pack_options.msg_size[1] = 20; - pack_options.msg_size[2] = 30; - pack_options.msg_size[3] = 40; - pack_options.msg_size[4] = 50; - if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + if (!h5_using_parallel_driver(NULL)) { + TESTING(" latest file format options"); + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.latest = 1; + pack_options.grp_compact = 10; + pack_options.grp_indexed = 5; + pack_options.msg_size[0] = 10; + pack_options.msg_size[1] = 20; + pack_options.msg_size[2] = 30; + pack_options.msg_size[3] = 40; + pack_options.msg_size[4] = 50; + if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME1, FNAME1OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME1, FNAME1OUT, &pack_options) <= 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * test several global filters @@ -1560,36 +1568,38 @@ main(void) SKIPPED(); #endif - /*------------------------------------------------------------------------- - * test file with userblock - *------------------------------------------------------------------------- - */ - TESTING(" file with added userblock"); + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test file with userblock + *------------------------------------------------------------------------- + */ + TESTING(" file with added userblock"); #ifdef H5_HAVE_FILTER_DEFLATE - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; - /* add the options for a user block size and user block filename */ - pack_options.ublock_size = USERBLOCK_SIZE; - pack_options.ublock_filename = FNAME_UB; + /* add the options for a user block size and user block filename */ + pack_options.ublock_size = USERBLOCK_SIZE; + pack_options.ublock_filename = FNAME_UB; - if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) - GOERROR; - if (verify_userblock(FNAME8OUT) < 0) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; + if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0) + GOERROR; + if (verify_userblock(FNAME8OUT) < 0) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; - PASSED(); + PASSED(); #else - SKIPPED(); + SKIPPED(); #endif + } /*------------------------------------------------------------------------- * test file with aligment @@ -1664,48 +1674,50 @@ main(void) PASSED(); - /*------------------------------------------------------------------------- - * test --metadata_block_size option - * Also verify that output file using the metadata_block_size option is - * larger than the output file one not using it. - * FNAME4 is used because it is the same as the test file used for the - * shell script version of this test (h5repack.sh). - *------------------------------------------------------------------------- - */ - TESTING(" metadata block size option"); - /* First run without metadata option. No need to verify the correctness */ - /* since this has been verified by earlier tests. Just record the file */ - /* size of the output file. */ - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) - GOERROR; - if (HDstat(FNAME4OUT, &file_stat) < 0) - GOERROR; - fsize1 = file_stat.st_size; - if (h5repack_end(&pack_options) < 0) - GOERROR; + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * test --metadata_block_size option + * Also verify that output file using the metadata_block_size option is + * larger than the output file one not using it. + * FNAME4 is used because it is the same as the test file used for the + * shell script version of this test (h5repack.sh). + *------------------------------------------------------------------------- + */ + TESTING(" metadata block size option"); + /* First run without metadata option. No need to verify the correctness */ + /* since this has been verified by earlier tests. Just record the file */ + /* size of the output file. */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) + GOERROR; + if (HDstat(FNAME4OUT, &file_stat) < 0) + GOERROR; + fsize1 = file_stat.st_size; + if (h5repack_end(&pack_options) < 0) + GOERROR; - /* run it again with metadata option */ - if (h5repack_init(&pack_options, 0, FALSE) < 0) - GOERROR; - pack_options.meta_block_size = 8192; - if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) - GOERROR; - if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) - GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) - GOERROR; - /* record the file size of the output file */ - if (HDstat(FNAME4OUT, &file_stat) < 0) - GOERROR; - fsize2 = file_stat.st_size; - /* verify second file size is larger than the first one */ - if (fsize2 <= fsize1) - GOERROR; - if (h5repack_end(&pack_options) < 0) - GOERROR; - PASSED(); + /* run it again with metadata option */ + if (h5repack_init(&pack_options, 0, FALSE) < 0) + GOERROR; + pack_options.meta_block_size = 8192; + if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0) + GOERROR; + if (h5diff(FNAME4, FNAME4OUT, NULL, NULL, &diff_options) > 0) + GOERROR; + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) + GOERROR; + /* record the file size of the output file */ + if (HDstat(FNAME4OUT, &file_stat) < 0) + GOERROR; + fsize2 = file_stat.st_size; + /* verify second file size is larger than the first one */ + if (fsize2 <= fsize1) + GOERROR; + if (h5repack_end(&pack_options) < 0) + GOERROR; + PASSED(); + } /*------------------------------------------------------------------------- * clean temporary test files @@ -1725,7 +1737,10 @@ main(void) return 0; error: + h5tools_close(); + puts("***** H5REPACK TESTS FAILED *****"); + return 1; } @@ -1760,12 +1775,14 @@ make_testfiles(void) * create another file for general copy test (all datatypes) *------------------------------------------------------------------------- */ - if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - if (make_all_objects(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + if (!h5_using_parallel_driver(NULL)) { + if ((fid = H5Fcreate(FNAME1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + if (make_all_objects(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; + } /*------------------------------------------------------------------------- * create a file for attributes copy test @@ -1934,19 +1951,21 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /*------------------------------------------------------------------------- - * create a file with userblock - *------------------------------------------------------------------------- - */ - if (make_userblock() < 0) - goto out; + if (h5_using_default_driver(NULL)) { + /*------------------------------------------------------------------------- + * create a file with userblock + *------------------------------------------------------------------------- + */ + if (make_userblock() < 0) + goto out; - /*------------------------------------------------------------------------- - * create a userblock file - *------------------------------------------------------------------------- - */ - if (make_userblock_file() < 0) - goto out; + /*------------------------------------------------------------------------- + * create a userblock file + *------------------------------------------------------------------------- + */ + if (make_userblock_file() < 0) + goto out; + } /*------------------------------------------------------------------------- * create a file with named datatypes @@ -1959,30 +1978,32 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /*------------------------------------------------------------------------- - * create obj and region reference type datasets (bug1814) - * add attribute with int type (bug1726) - * add attribute with obj and region reference type (bug1726) - *------------------------------------------------------------------------- - */ - if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - /* create reference type datasets */ - if (make_references(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + if (!h5_using_parallel_driver(NULL)) { + /*------------------------------------------------------------------------- + * create obj and region reference type datasets (bug1814) + * add attribute with int type (bug1726) + * add attribute with obj and region reference type (bug1726) + *------------------------------------------------------------------------- + */ + if ((fid = H5Fcreate(FNAME_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + /* create reference type datasets */ + if (make_references(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; - /*------------------------------------------------------------------------- - * create a file with obj and region references in attribute of compound and - * vlen datatype - *-------------------------------------------------------------------------*/ - if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - if (make_complex_attr_references(fid) < 0) - goto out; - if (H5Fclose(fid) < 0) - return -1; + /*------------------------------------------------------------------------- + * create a file with obj and region references in attribute of compound and + * vlen datatype + *-------------------------------------------------------------------------*/ + if ((fid = H5Fcreate(FNAME_ATTR_REF, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + if (make_complex_attr_references(fid) < 0) + goto out; + if (H5Fclose(fid) < 0) + return -1; + } /*------------------------------------------------------------------------- * create 8 files with combinations ??? @@ -2018,111 +2039,113 @@ make_testfiles(void) if (H5Fclose(fid) < 0) return -1; - /* - * #2 -- h5repack_page_persist.h5 - * Setting: - * strategy=PAGE, persist=TRUE, threshold=1 - * inpage=512 - * latest format - */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #3 -- h5repack_fsm_aggr_persist.h5 - * Setting: - * strategy=FSM_AGGR, persist=TRUE, threshold=1 - * default: inpage=4096 - */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #4 -- h5repack_page_threshold.h5 - * Setting: - * strategy=PAGE, persist=FALSE, threshold=3 - * inpage=8192 - * latest format - */ - - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; - - /* - * #5 -- h5repack_fsm_aggr_threshold.h5 - * Setting: - * strategy=FSM_AGGR, persist=FALSE, threshold=3 - * inpage=4096 - */ + if (h5_using_default_driver(NULL)) { + /* + * #2 -- h5repack_page_persist.h5 + * Setting: + * strategy=PAGE, persist=TRUE, threshold=1 + * inpage=512 + * latest format + */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #3 -- h5repack_fsm_aggr_persist.h5 + * Setting: + * strategy=FSM_AGGR, persist=TRUE, threshold=1 + * default: inpage=4096 + */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #4 -- h5repack_page_threshold.h5 + * Setting: + * strategy=PAGE, persist=FALSE, threshold=3 + * inpage=8192 + * latest format + */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0) - return -1; - if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #5 -- h5repack_fsm_aggr_threshold.h5 + * Setting: + * strategy=FSM_AGGR, persist=FALSE, threshold=3 + * inpage=4096 + */ - /* - * #6 -- h5repack_aggr.h5 - * Setting: - * strategy=AGGR, persist=FALSE, threshold=1 - * latest format - */ + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0) + return -1; + if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + + /* + * #6 -- h5repack_aggr.h5 + * Setting: + * strategy=AGGR, persist=FALSE, threshold=1 + * latest format + */ - /* Create file creation property list */ - if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) - return -1; - if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) - return -1; - HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); - if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) - return -1; - if (H5Fclose(fid) < 0) - return -1; - if (H5Pclose(fcpl) < 0) - return -1; + /* Create file creation property list */ + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + return -1; + if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0) + return -1; + HDassert(j < NELMTS(H5REPACK_FSPACE_FNAMES)); + if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0) + return -1; + if (H5Fclose(fid) < 0) + return -1; + if (H5Pclose(fcpl) < 0) + return -1; + } /* * #7 -- h5repack_none.h5 @@ -2726,6 +2749,7 @@ make_nbit(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hid_t dtid = H5I_INVALID_HID; hid_t dsid = H5I_INVALID_HID; + hid_t dxpl = H5P_DEFAULT; hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; int ** buf = NULL; @@ -2746,6 +2770,16 @@ make_nbit(hid_t loc_id) if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0) goto error; +#ifdef H5_HAVE_PARALLEL + /* Set up collective writes for parallel driver */ + if (h5_using_parallel_driver(NULL)) { + if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0) + goto error; + } +#endif + dtid = H5Tcopy(H5T_NATIVE_INT); if (H5Tset_precision(dtid, (H5Tget_precision(dtid) - 1)) < 0) goto error; @@ -2757,7 +2791,7 @@ make_nbit(hid_t loc_id) goto error; if ((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; - if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf[0]) < 0) goto error; H5Dclose(dsid); @@ -2765,7 +2799,7 @@ make_nbit(hid_t loc_id) goto error; if ((dsid = H5Dcreate2(loc_id, "dset_int31", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; - if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf[0]) < 0) goto error; H5Dclose(dsid); @@ -2773,6 +2807,8 @@ make_nbit(hid_t loc_id) * close *------------------------------------------------------------------------- */ + if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0) + goto error; if (H5Sclose(sid) < 0) goto error; if (H5Pclose(dcpl) < 0) @@ -2788,6 +2824,7 @@ error: H5E_BEGIN_TRY { H5Tclose(dtid); + H5Pclose(dxpl); H5Pclose(dcpl); H5Sclose(sid); H5Dclose(dsid); @@ -2813,6 +2850,7 @@ make_scaleoffset(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hid_t dtid = H5I_INVALID_HID; hid_t dsid = H5I_INVALID_HID; + hid_t dxpl = H5P_DEFAULT; hsize_t dims[RANK] = {DIM1, DIM2}; hsize_t chunk_dims[RANK] = {CDIM1, CDIM2}; int ** buf = NULL; @@ -2833,6 +2871,16 @@ make_scaleoffset(hid_t loc_id) if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0) goto error; +#ifdef H5_HAVE_PARALLEL + /* Set up collective writes for parallel driver */ + if (h5_using_parallel_driver(NULL)) { + if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0) + goto error; + } +#endif + dtid = H5Tcopy(H5T_NATIVE_INT); /* remove the filters from the dcpl */ @@ -2842,20 +2890,22 @@ make_scaleoffset(hid_t loc_id) goto error; if ((dsid = H5Dcreate2(loc_id, "dset_scaleoffset", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; - if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf[0]) < 0) goto error; H5Dclose(dsid); if ((dsid = H5Dcreate2(loc_id, "dset_none", dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; - if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf[0]) < 0) goto error; H5Tclose(dtid); H5Dclose(dsid); /*------------------------------------------------------------------------- - * close space and dcpl + * close space, dxpl and dcpl *------------------------------------------------------------------------- */ + if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0) + goto error; if (H5Sclose(sid) < 0) goto error; if (H5Pclose(dcpl) < 0) @@ -2868,6 +2918,7 @@ make_scaleoffset(hid_t loc_id) error: H5E_BEGIN_TRY { + H5Pclose(dxpl); H5Dclose(dsid); H5Tclose(dtid); H5Pclose(dcpl); @@ -2894,6 +2945,7 @@ make_all_filters(hid_t loc_id) hid_t sid = H5I_INVALID_HID; /* dataspace ID */ hid_t dtid = H5I_INVALID_HID; hid_t dsid = H5I_INVALID_HID; + hid_t dxpl = H5P_DEFAULT; #if defined(H5_HAVE_FILTER_SZIP) unsigned szip_options_mask = H5_SZIP_ALLOW_K13_OPTION_MASK | H5_SZIP_NN_OPTION_MASK; unsigned szip_pixels_per_block = 8; @@ -2921,6 +2973,16 @@ make_all_filters(hid_t loc_id) if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0) goto error; +#ifdef H5_HAVE_PARALLEL + /* Set up collective writes for parallel driver */ + if (h5_using_parallel_driver(NULL)) { + if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto error; + if (H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_COLLECTIVE) < 0) + goto error; + } +#endif + /* set the shuffle filter */ if (H5Pset_shuffle(dcpl) < 0) goto error; @@ -3010,7 +3072,7 @@ make_all_filters(hid_t loc_id) goto error; if ((dsid = H5Dcreate2(loc_id, "dset_nbit", dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; - if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0) + if (H5Dwrite(dsid, dtid, H5S_ALL, H5S_ALL, dxpl, buf[0]) < 0) goto error; /* close */ @@ -3021,6 +3083,8 @@ make_all_filters(hid_t loc_id) if (H5Sclose(sid) < 0) goto error; + if (dxpl != H5P_DEFAULT && H5Pclose(dxpl) < 0) + goto error; if (H5Pclose(dcpl) < 0) goto error; @@ -3033,6 +3097,7 @@ error: { H5Tclose(dtid); H5Dclose(dsid); + H5Pclose(dxpl); H5Pclose(dcpl); H5Sclose(sid); } @@ -5802,11 +5867,25 @@ out: static int make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t dcpl, void *buf) { - hid_t did = H5I_INVALID_HID; + hid_t did = H5I_INVALID_HID; + hid_t dxpl_id = H5P_DEFAULT; if ((did = H5Dcreate2(loc_id, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) return -1; - if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + +#ifdef H5_HAVE_PARALLEL + /* Set up collective writes for parallel driver */ + if (h5_using_parallel_driver(NULL)) { + if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto out; + if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0) + goto out; + } +#endif + + if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0) + goto out; + if (dxpl_id != H5P_DEFAULT && H5Pclose(dxpl_id) < 0) goto out; if (H5Dclose(did) < 0) return -1; @@ -5835,17 +5914,30 @@ out: static int write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t tid, void *buf) { - hid_t did = H5I_INVALID_HID; - hid_t sid = H5I_INVALID_HID; + hid_t did = H5I_INVALID_HID; + hid_t sid = H5I_INVALID_HID; + hid_t dxpl_id = H5P_DEFAULT; if ((sid = H5Screate_simple(rank, dims, NULL)) < 0) return -1; if ((did = H5Dcreate2(loc_id, dset_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (buf) { - if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) +#ifdef H5_HAVE_PARALLEL + /* Set up collective writes for parallel driver */ + if (h5_using_parallel_driver(NULL)) { + if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + goto out; + if (H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE) < 0) + goto out; + } +#endif + + if (H5Dwrite(did, tid, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0) goto out; } + if (dxpl_id != H5P_DEFAULT && H5Pclose(dxpl_id) < 0) + goto out; if (H5Dclose(did) < 0) goto out; if (H5Sclose(sid) < 0) @@ -5856,6 +5948,7 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t t out: H5E_BEGIN_TRY { + H5Pclose(dxpl_id); H5Dclose(did); H5Sclose(sid); } diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index cb10d22..894f88c 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -20,6 +20,18 @@ usage: h5repack [OPTIONS] file1 file2 HDF5 file specified --dst-vol-info VOL-specific info to pass to the VOL connector used for opening the output HDF5 file specified + --src-vfd-value Value (ID) of the VFL driver to use for opening the + input HDF5 file specified + --src-vfd-name Name of the VFL driver to use for opening the input + HDF5 file specified + --src-vfd-info VFD-specific info to pass to the VFL driver used for + opening the input HDF5 file specified + --dst-vfd-value Value (ID) of the VFL driver to use for opening the + output HDF5 file specified + --dst-vfd-name Name of the VFL driver to use for opening the output + HDF5 file specified + --dst-vfd-info VFD-specific info to pass to the VFL driver used for + opening the output HDF5 file specified -L, --latest Use latest version of file format This option will take precedence over the options --low and --high diff --git a/tools/test/misc/testfiles/h5mkgrp_help.txt b/tools/test/misc/testfiles/h5mkgrp_help.txt index 9525230..5d81b34 100644 --- a/tools/test/misc/testfiles/h5mkgrp_help.txt +++ b/tools/test/misc/testfiles/h5mkgrp_help.txt @@ -11,4 +11,10 @@ usage: h5mkgrp [OPTIONS] FILE GROUP... HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c index ad9bf09..a99334f 100644 --- a/tools/test/perform/chunk_cache.c +++ b/tools/test/perform/chunk_cache.c @@ -81,7 +81,7 @@ counter(unsigned H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, static void cleanup(void) { - if (!getenv("HDF5_NOCLEANUP")) { + if (!getenv(HDF5_NOCLEANUP)) { remove(FILENAME); } } diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c index 64192ba..c974928 100644 --- a/tools/test/perform/overhead.c +++ b/tools/test/perform/overhead.c @@ -119,7 +119,7 @@ usage(const char *prog) static void cleanup(void) { - if (!getenv("HDF5_NOCLEANUP")) { + if (!getenv(HDF5_NOCLEANUP)) { remove(FILE_NAME_1); } } diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c index 123fb98..30eb06e 100644 --- a/tools/test/perform/zip_perf.c +++ b/tools/test/perform/zip_perf.c @@ -103,7 +103,7 @@ error(const char *fmt, ...) static void cleanup(void) { - if (!HDgetenv("HDF5_NOCLEANUP")) + if (!HDgetenv(HDF5_NOCLEANUP)) HDunlink(filename); HDfree(filename); } diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt index 5b11223..53c666b 100644 --- a/tools/testfiles/h5dump-help.txt +++ b/tools/testfiles/h5dump-help.txt @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/help-1.ls b/tools/testfiles/help-1.ls index 0926c4c..6ed1aab 100644 --- a/tools/testfiles/help-1.ls +++ b/tools/testfiles/help-1.ls @@ -52,6 +52,12 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified file/OBJECT Each object consists of an HDF5 file name optionally followed by a diff --git a/tools/testfiles/help-2.ls b/tools/testfiles/help-2.ls index 0926c4c..6ed1aab 100644 --- a/tools/testfiles/help-2.ls +++ b/tools/testfiles/help-2.ls @@ -52,6 +52,12 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified file/OBJECT Each object consists of an HDF5 file name optionally followed by a diff --git a/tools/testfiles/help-3.ls b/tools/testfiles/help-3.ls index 0926c4c..6ed1aab 100644 --- a/tools/testfiles/help-3.ls +++ b/tools/testfiles/help-3.ls @@ -52,6 +52,12 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified file/OBJECT Each object consists of an HDF5 file name optionally followed by a diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl +++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsIncomplete.ddl +++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl +++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl +++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl index 5b11223..53c666b 100644 --- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl +++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl @@ -28,6 +28,12 @@ usage: h5dump [OPTIONS] files HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified --------------- Object Options --------------- -a P, --attribute=P Print the specified attribute If an attribute name contains a slash (/), escape the diff --git a/tools/testfiles/textlinksrc-nodangle-1.ls b/tools/testfiles/textlinksrc-nodangle-1.ls index 0926c4c..6ed1aab 100644 --- a/tools/testfiles/textlinksrc-nodangle-1.ls +++ b/tools/testfiles/textlinksrc-nodangle-1.ls @@ -52,6 +52,12 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified file/OBJECT Each object consists of an HDF5 file name optionally followed by a diff --git a/tools/testfiles/tgroup-1.ls b/tools/testfiles/tgroup-1.ls index 0926c4c..6ed1aab 100644 --- a/tools/testfiles/tgroup-1.ls +++ b/tools/testfiles/tgroup-1.ls @@ -52,6 +52,12 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] HDF5 file specified --vol-info VOL-specific info to pass to the VOL connector used for opening the HDF5 file specified + --vfd-value Value (ID) of the VFL driver to use for opening the + HDF5 file specified + --vfd-name Name of the VFL driver to use for opening the + HDF5 file specified + --vfd-info VFD-specific info to pass to the VFL driver used for + opening the HDF5 file specified file/OBJECT Each object consists of an HDF5 file name optionally followed by a |