summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-05-06 22:37:40 (GMT)
committerGitHub <noreply@github.com>2022-05-06 22:37:40 (GMT)
commita02cbdac311a78b7804178b501f0bed3dbb2c374 (patch)
treed10a4d780dd29cf17a43bb09264bcde63e2f6576
parent4f376eb29f2b7e560b62cf05843fe6103a50fa71 (diff)
downloadhdf5-a02cbdac311a78b7804178b501f0bed3dbb2c374.zip
hdf5-a02cbdac311a78b7804178b501f0bed3dbb2c374.tar.gz
hdf5-a02cbdac311a78b7804178b501f0bed3dbb2c374.tar.bz2
Onion VFD: sync with develop (#1747)
Sync with develop
-rwxr-xr-xbin/bbrelease3
-rw-r--r--c++/examples/run-c++-ex.sh.in8
-rw-r--r--config/BlankForm88
-rw-r--r--config/apple56
-rw-r--r--config/cmake/libh5cc.in2
-rw-r--r--fortran/src/h5fc.in2
-rw-r--r--test/mirror_vfd.c16
-rw-r--r--tools/lib/h5tools.c12
-rw-r--r--tools/libtest/h5tools_test_utils.c64
-rw-r--r--tools/src/h5dump/h5dump.c15
-rw-r--r--tools/src/h5ls/h5ls.c4
-rw-r--r--tools/src/h5stat/h5stat.c9
12 files changed, 126 insertions, 153 deletions
diff --git a/bin/bbrelease b/bin/bbrelease
index d056f6d..90cb72b 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -245,8 +245,9 @@ if [ X$revmode = Xyes ]; then
# (h5vers does not correctly handle just m.n.r-$today.)
VERS=`echo $VERS | sed -e s/-.*//`-$revision
echo Private release of $VERS
- bin/h5vers -s $VERS
HDF5_VERS=hdf5-$branch-$revision
+ echo file base of $HDF5_VERS
+ bin/h5vers -s $VERS
# use a generic directory name for revision releases
HDF5_IN_VERS=hdfsrc
else
diff --git a/c++/examples/run-c++-ex.sh.in b/c++/examples/run-c++-ex.sh.in
index a593d6c..4593779 100644
--- a/c++/examples/run-c++-ex.sh.in
+++ b/c++/examples/run-c++-ex.sh.in
@@ -40,16 +40,16 @@ EXIT_FAILURE=1
# This script uses the value of `prefix` in the user's environment, if
# it is set, below. The content of $() is evaluated in a sub-shell, so
# if `prefix` is set in the user's environment, the shell statements in
-# $() won't clobbered it.
+# $() won't clobber it.
#
prefix_relto_examplesdir=$(
prefix=@prefix@
examplesdir=@examplesdir@
if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
- echo $(echo ${examplesdir##${prefix}/} | \
- sed 's,[^/][^/]*,..,g')
+ echo $(echo ${examplesdir##${prefix}/} | \
+ sed 's,[^/][^/]*,..,g')
else
- echo $prefix
+ echo $prefix
fi
)
diff --git a/config/BlankForm b/config/BlankForm
index 14131b2..68da38d 100644
--- a/config/BlankForm
+++ b/config/BlankForm
@@ -1,4 +1,4 @@
-# -*- shell-script -*-
+# -*- shell-script -*-
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -52,36 +52,36 @@ fi
# Flags that end with `_CPPFLAGS' are passed to the compiler when
# compiling but not when linking.
#
-# DEBUG_CFLAGS Flags to pass to the compiler to create a
-# DEBUG_CPPFLAGS library suitable for use with debugging
-# tools. Usually this list will exclude
-# optimization switches (like `-O') and include
-# switches that turn on symbolic debugging
-# support (like `-g').
+# DEBUG_CFLAGS Flags to pass to the compiler to create a
+# DEBUG_CPPFLAGS library suitable for use with debugging
+# tools. Usually this list will exclude
+# optimization switches (like `-O') and include
+# switches that turn on symbolic debugging
+# support (like `-g').
#
-# PROD_CFLAGS Flags to pass to the compiler to create a
-# PROD_CPPFLAGS production version of the library. These
-# usually exclude symbolic debugging switches
-# (like `-g') and include optimization switches
-# (like `-O').
+# PROD_CFLAGS Flags to pass to the compiler to create a
+# PROD_CPPFLAGS production version of the library. These
+# usually exclude symbolic debugging switches
+# (like `-g') and include optimization switches
+# (like `-O').
#
-# PROFILE_CFLAGS Flags to pass to the compiler to create a
-# PROFILE_CPPFLAGS library suitable for performance testing (like
-# `-pg'). This may or may not include debugging
-# or production flags.
-#
-# H5_CFLAGS Flags can be added to this variable which
-# might already be partially initialized. These
-# flags will always be passed to the compiler
-# and should include switches to turn on full
-# warnings. HDF5 attempts to be ANSI and Posix
-# compliant and employ good programming
-# practices resulting in few if any
-# warnings.
+# PROFILE_CFLAGS Flags to pass to the compiler to create a
+# PROFILE_CPPFLAGS library suitable for performance testing (like
+# `-pg'). This may or may not include debugging
+# or production flags.
#
-# Warning flags do not have to be added to H5_CFLAGS
-# variable if the compiler is the GNU gcc
-# compiler or a descendent of gcc such as EGCS or PGCC.
+# H5_CFLAGS Flags can be added to this variable which
+# might already be partially initialized. These
+# flags will always be passed to the compiler
+# and should include switches to turn on full
+# warnings. HDF5 attempts to be ANSI and Posix
+# compliant and employ good programming
+# practices resulting in few if any
+# warnings.
+#
+# Warning flags do not have to be added to H5_CFLAGS
+# variable if the compiler is the GNU gcc
+# compiler or a descendent of gcc such as EGCS or PGCC.
#
# AM_CFLAGS Flags added directly into this variable will
# be propagated to the compiler wrapper scripts (h5cc,
@@ -97,24 +97,24 @@ fi
case $CC_BASENAME in
gcc)
- H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions
- DEBUG_CFLAGS="-g -fverbose-asm"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O3 -fomit-frame-pointer"
- PROD_CPPFLAGS=
- PROFILE_CFLAGS="-pg"
- PROFILE_CPPFLAGS=
- ;;
+ H5_CFLAGS="$H5_CFLAGS -Wsign-compare" #Only works for some versions
+ DEBUG_CFLAGS="-g -fverbose-asm"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS="-O3 -fomit-frame-pointer"
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-pg"
+ PROFILE_CPPFLAGS=
+ ;;
*)
- H5_CFLAGS="$H5_CFLAGS -ansi"
- DEBUG_CFLAGS="-g"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O"
- PROD_CPPFLAGS=
- PROFILE_CFLAGS="-pg"
- PROFILE_CPPFLAGS=
- ;;
+ H5_CFLAGS="$H5_CFLAGS -ansi"
+ DEBUG_CFLAGS="-g"
+ DEBUG_CPPFLAGS=
+ PROD_CFLAGS="-O"
+ PROD_CPPFLAGS=
+ PROFILE_CFLAGS="-pg"
+ PROFILE_CPPFLAGS=
+ ;;
esac
diff --git a/config/apple b/config/apple
index 2da7e93..0fb7dca 100644
--- a/config/apple
+++ b/config/apple
@@ -22,11 +22,11 @@
# No support for OS older than darwin 10.X.
if test "X-" = "X-$CC"; then
case "$host_os" in
- darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
- CC=gcc
- CC_BASENAME=gcc
- ;;
- *)
+ darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
+ CC=gcc
+ CC_BASENAME=gcc
+ ;;
+ *)
if test "X-$enable_parallel" = "X-yes"; then
# default to use mpicc which is the defacto MPI compiler name
CC=mpicc
@@ -36,20 +36,20 @@ if test "X-" = "X-$CC"; then
CC_BASENAME=clang
fi
- # Production
- PROD_CFLAGS="-O3"
- PROD_CPPFLAGS=
+ # Production
+ PROD_CFLAGS="-O3"
+ PROD_CPPFLAGS=
- # Debug
- DEBUG_CFLAGS="-g -O0"
- DEBUG_CPPFLAGS=
+ # Debug
+ DEBUG_CFLAGS="-g -O0"
+ DEBUG_CPPFLAGS=
- # Profile
- # Use this for profiling with gprof
- # Just "-g" for now. More later.
- PROFILE_CFLAGS="-g"
- PROFILE_CPPFLAGS=
- ;;
+ # Profile
+ # Use this for profiling with gprof
+ # Just "-g" for now. More later.
+ PROFILE_CFLAGS="-g"
+ PROFILE_CPPFLAGS=
+ ;;
esac
fi
@@ -62,16 +62,16 @@ fi
# use -O option as it causes failures in test/dt_arith.
case "$host_os" in
darwin1[12].*) # lion & mountain lion
- #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
- case "$cc_vendor-$cc_version" in
- gcc-4.2.1)
- # Remove any -O flags
- #echo PROD_CFLAGS=$PROD_CFLAGS
- PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
- #echo new PROD_CFLAGS=$PROD_CFLAGS
- ;;
- esac
- ;;
+ #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
+ case "$cc_vendor-$cc_version" in
+ gcc-4.2.1)
+ # Remove any -O flags
+ #echo PROD_CFLAGS=$PROD_CFLAGS
+ PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
+ #echo new PROD_CFLAGS=$PROD_CFLAGS
+ ;;
+ esac
+ ;;
esac
if test "X-" = "X-$FC"; then
@@ -89,7 +89,7 @@ if test "X-" = "X-$FC"; then
FC_BASENAME=mpif90
;;
clang)
- # clang has no fortran compiler. Use gfortran.
+ # clang has no fortran compiler. Use gfortran.
FC=gfortran
FC_BASENAME=gfortran
;;
diff --git a/config/cmake/libh5cc.in b/config/cmake/libh5cc.in
index f5d8d4c..6d54088 100644
--- a/config/cmake/libh5cc.in
+++ b/config/cmake/libh5cc.in
@@ -29,7 +29,7 @@ printf 'dir is %s\n' "$dir"
# Show the configuration summary of the library recorded in the
-# libhdf5.settings file reside in the lib directory.
+# libhdf5.settings file residing in the lib directory.
showconfigure()
{
cat $dir/lib/libhdf5.settings
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 661fde5..79401f8 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -38,7 +38,7 @@ HL="@HL@"
## $FLINKER $FCFLAGS $H5BLD_FCFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS ##
## $fmodules $link_objs $link_args $shared_link ##
## ##
-## These settings can be overridden by setting HDF5_FCFLAGS, ##
+## These settings can be overridden by setting HDF5_FCFLAGS, ##
## HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c
index c89a368..34a4481 100644
--- a/test/mirror_vfd.c
+++ b/test/mirror_vfd.c
@@ -2405,18 +2405,10 @@ test_vanishing_datasets(const struct mt_opts *opts)
error:
H5E_BEGIN_TRY
{
- if (fapl_id != H5I_INVALID_HID) {
- H5Pclose(fapl_id);
- }
- if (file_id != H5I_INVALID_HID) {
- H5Fclose(file_id);
- }
- if (dset_id != H5I_INVALID_HID) {
- H5Dclose(dset_id);
- }
- if (dspace_id != H5I_INVALID_HID) {
- H5Sclose(dspace_id);
- }
+ H5Pclose(fapl_id);
+ H5Fclose(file_id);
+ H5Dclose(dset_id);
+ H5Sclose(dspace_id);
}
H5E_END_TRY;
return -1;
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 2394ddf..f79a4cf 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -608,7 +608,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
done:
if (ret_value < 0) {
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -713,7 +713,7 @@ done:
H5TOOLS_ERROR(FAIL, "failed to decrement refcount on VOL connector ID");
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -770,7 +770,7 @@ done:
}
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -1041,8 +1041,10 @@ done:
H5Pclose(tmp_fapl_id);
/* Clear error message unless asked for */
- if (ret_value < 0 && enable_error_stack <= 1)
- H5Epop(H5tools_ERR_STACK_g, 1);
+ if (ret_value < 0) {
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
+ H5Epop(H5tools_ERR_STACK_g, 1);
+ }
return ret_value;
}
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 072179b..e49a155 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -1029,52 +1029,38 @@ test_set_configured_fapl(void)
2048, /* stream buffer size */
};
#endif /* H5_HAVE_LIBHDFS */
- unsigned n_cases = 7; /* number of common testcases */
+ unsigned n_cases = 5; /* number of common testcases */
testcase cases[] = {
{
- "(common) should fail: no fapl id",
- 0,
- UTIL_TEST_NOFAPL,
- "",
- NULL,
- },
- {
- "(common) should fail: no fapl id (with struct)",
- 0,
- UTIL_TEST_NOFAPL,
- "",
- &wrong_fa,
- },
- {
"(common) H5P_DEFAULT with no struct should succeed",
1,
UTIL_TEST_DEFAULT,
- "",
+ "sec2",
NULL,
},
{
"(common) H5P_DEFAULT with (ignored) struct should succeed",
1,
UTIL_TEST_DEFAULT,
- "",
+ "sec2",
&wrong_fa,
},
{
"(common) provided fapl entry should not fail",
1,
UTIL_TEST_CREATE,
- "",
+ "sec2",
NULL,
},
{
"(common) provided fapl entry should not fail; ignores struct",
1,
UTIL_TEST_CREATE,
- "",
+ "sec2",
&wrong_fa,
},
{
- "(common) should fail: unrecoginzed vfd name",
+ "(common) should fail: unrecognized vfd name",
0,
UTIL_TEST_DEFAULT,
"unknown",
@@ -1092,13 +1078,6 @@ test_set_configured_fapl(void)
NULL,
},
{
- "(ROS3) should fail: no fapl id",
- 0,
- UTIL_TEST_NOFAPL,
- "ros3",
- &ros3_anon_fa,
- },
- {
"(ROS3) should fail: no struct",
0,
UTIL_TEST_CREATE,
@@ -1112,13 +1091,6 @@ test_set_configured_fapl(void)
"ros3",
&ros3_anon_fa,
},
- {
- "(ROS3) should fail: attempt to set DEFAULT fapl",
- 0,
- UTIL_TEST_DEFAULT,
- "ros3",
- &ros3_anon_fa,
- },
#endif /* H5_HAVE_ROS3_VFD */
#ifdef H5_HAVE_LIBHDFS
@@ -1132,13 +1104,6 @@ test_set_configured_fapl(void)
NULL,
},
{
- "(HDFS) should fail: no fapl id",
- 0,
- UTIL_TEST_NOFAPL,
- "hdfs",
- &hdfs_fa,
- },
- {
"(HDFS) should fail: no struct",
0,
UTIL_TEST_CREATE,
@@ -1152,24 +1117,17 @@ test_set_configured_fapl(void)
"hdfs",
&hdfs_fa,
},
- {
- "(HDFS) should fail: attempt to set DEFAULT fapl",
- 0,
- UTIL_TEST_DEFAULT,
- "hdfs",
- &hdfs_fa,
- },
#endif /* H5_HAVE_LIBHDFS */
}; /* testcases `cases` array */
unsigned int i;
#ifdef H5_HAVE_ROS3_VFD
- n_cases += 5;
+ n_cases += 3;
#endif /* H5_HAVE_ROS3_VFD */
#ifdef H5_HAVE_LIBHDFS
- n_cases += 5;
+ n_cases += 3;
#endif /* H5_HAVE_LIBHDFS */
TESTING("programmatic fapl set");
@@ -1205,10 +1163,12 @@ test_set_configured_fapl(void)
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)
+ if (C.expected == 0) {
JSVERIFY(result, H5I_INVALID_HID, C.message)
- else
+ }
+ else {
JSVERIFY_NOT(result, H5I_INVALID_HID, C.message)
+ }
#if UTIL_TEST_DEBUG
HDfprintf(stderr, "after test\n");
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 84669a2..8a3ae54 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -23,12 +23,13 @@ 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 hbool_t get_onion_revision_count = FALSE;
+static hbool_t use_custom_vol_g = FALSE;
+static hbool_t use_custom_vfd_g = FALSE;
+
+static h5tools_vol_info_t vol_info_g = {0};
+static h5tools_vfd_info_t vfd_info_g = {0};
-static h5tools_vol_info_t vol_info_g;
-static h5tools_vfd_info_t vfd_info_g;
+static hbool_t get_onion_revision_count = FALSE;
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
@@ -1251,6 +1252,8 @@ end_collect:
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+
+ vfd_info_g.info = &ros3_fa_g;
#else
error_msg("Read-Only S3 VFD not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1268,6 +1271,8 @@ end_collect:
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+
+ vfd_info_g.info = &hdfs_fa_g;
#else
error_msg("HDFS VFD not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 228893a..b7ee380 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2854,6 +2854,8 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
+
+ vfd_info.info = &ros3_fa;
#else
HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
usage();
@@ -2875,6 +2877,8 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
+
+ vfd_info.info = &hdfs_fa;
#else
HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
usage();
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index e42af10..d5b9a1a 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1711,6 +1711,15 @@ main(int argc, char *argv[])
vfd_info.info = NULL;
vfd_info.u.name = drivername;
+#ifdef H5_HAVE_ROS3_VFD
+ if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX]))
+ vfd_info.info = &ros3_fa;
+#endif
+#ifdef H5_HAVE_LIBHDFS
+ if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX]))
+ vfd_info.info = &hdfs_fa;
+#endif
+
if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) {
error_msg("Unable to create FAPL for file access\n");
goto done;