summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-16 20:45:05 (GMT)
commitd2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch)
treea066f01361afaf5df457cef612bb0bb9fd80fe18 /tools
parentee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff)
downloadhdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz
hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to fixed and extensible array dataset chunk indexing code to accommodate changes to private APIs in those interfaces. Also, other adjustments to source code and expected output in response to changes on the trunk. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.in21
-rw-r--r--tools/h5copy/Makefile.am2
-rw-r--r--tools/h5copy/Makefile.in23
-rw-r--r--tools/h5copy/h5copy.c2
-rw-r--r--tools/h5copy/testh5copy.sh12
-rw-r--r--tools/h5diff/Makefile.am2
-rw-r--r--tools/h5diff/Makefile.in23
-rwxr-xr-xtools/h5diff/testh5diff.sh14
-rw-r--r--tools/h5dump/Makefile.am2
-rw-r--r--tools/h5dump/Makefile.in23
-rw-r--r--tools/h5dump/h5dump.c35
-rw-r--r--tools/h5dump/h5dumpgentest.c193
-rw-r--r--tools/h5dump/testh5dump.sh.in17
-rw-r--r--tools/h5import/Makefile.am2
-rwxr-xr-xtools/h5import/Makefile.in23
-rwxr-xr-xtools/h5import/h5import.c192
-rwxr-xr-xtools/h5import/h5importtest.c2
-rw-r--r--tools/h5jam/Makefile.am4
-rw-r--r--tools/h5jam/Makefile.in25
-rw-r--r--tools/h5ls/Makefile.am2
-rw-r--r--tools/h5ls/Makefile.in23
-rw-r--r--tools/h5ls/h5ls.c41
-rw-r--r--tools/h5repack/Makefile.am2
-rw-r--r--tools/h5repack/Makefile.in23
-rw-r--r--tools/h5repack/h5repack.c11
-rw-r--r--tools/h5repack/h5repack.h18
-rwxr-xr-xtools/h5repack/h5repack.sh.in57
-rw-r--r--tools/h5repack/h5repack_copy.c46
-rw-r--r--tools/h5repack/h5repack_main.c142
-rw-r--r--tools/h5repack/h5repack_opttable.c2
-rw-r--r--tools/h5repack/h5repack_parse.c46
-rw-r--r--tools/h5repack/h5repack_verify.c113
-rw-r--r--tools/h5repack/h5repacktst.c240
-rw-r--r--tools/h5stat/Makefile.am2
-rw-r--r--tools/h5stat/Makefile.in23
-rw-r--r--tools/h5stat/h5stat.c743
-rw-r--r--tools/h5stat/h5stat_gentest.c24
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-F.ddl19
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-d.ddl3
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-dT.ddl3
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-file.ddl2
-rw-r--r--tools/h5stat/testfiles/h5stat_filters.ddl37
-rw-r--r--tools/h5stat/testfiles/h5stat_help1.ddl15
-rw-r--r--tools/h5stat/testfiles/h5stat_help2.ddl15
-rw-r--r--tools/h5stat/testfiles/h5stat_idx.ddl34
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat.ddl38
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat.h5bin6363081 -> 6367669 bytes
-rw-r--r--tools/h5stat/testfiles/h5stat_tsohm.ddl34
-rw-r--r--tools/lib/Makefile.in21
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5tools.c6
-rw-r--r--tools/misc/Makefile.am6
-rw-r--r--tools/misc/Makefile.in27
-rwxr-xr-xtools/misc/h5cc.in8
-rw-r--r--tools/testfiles/file_space.ddl23
-rw-r--r--tools/testfiles/file_space.h5bin0 -> 792 bytes
-rw-r--r--tools/testfiles/tboot1.ddl2
-rw-r--r--tools/testfiles/tboot2.ddl2
58 files changed, 1616 insertions, 858 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 3675e3a..e482ea2 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -111,6 +111,16 @@ am__relativize = \
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -124,21 +134,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -161,7 +168,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
diff --git a/tools/h5copy/Makefile.am b/tools/h5copy/Makefile.am
index 1848972..dd0c5c3 100644
--- a/tools/h5copy/Makefile.am
+++ b/tools/h5copy/Makefile.am
@@ -34,7 +34,7 @@ bin_PROGRAMS=h5copy
check_PROGRAMS=$(TEST_PROG)
# Add h5copy specific linker flags here
-h5copy_LDFLAGS = $(LT_STATIC_EXEC)
+h5copy_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# source file for the test file generator
h5copygentest_SOURCES=h5copygentest.c
diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in
index b582057..d2a8e0d 100644
--- a/tools/h5copy/Makefile.in
+++ b/tools/h5copy/Makefile.in
@@ -103,6 +103,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -116,21 +126,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -153,7 +160,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -364,7 +371,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5copy$(EXEEXT)
# Add h5copy specific linker flags here
-h5copy_LDFLAGS = $(LT_STATIC_EXEC)
+h5copy_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# source file for the test file generator
h5copygentest_SOURCES = h5copygentest.c
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index e487f2e..f2a41ae 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -210,7 +210,7 @@ main (int argc, const char *argv[])
/* Check for no command line parameters */
if(argc == 1) {
usage();
- leave(EXIT_SUCCESS);
+ leave(EXIT_FAILURE);
} /* end if */
/* parse command line options */
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index 046440d..b513938 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -166,11 +166,7 @@ TOOLTEST_FAIL()
H5DIFFTEST()
{
VERIFY $@
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5DIFF_BIN -q $@
- else
- $RUNSERIAL $H5DIFF_BIN -q "$@"
- fi
+ $RUNSERIAL $H5DIFF_BIN -q "$@"
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -185,11 +181,7 @@ H5DIFFTEST()
H5DIFFTEST_FAIL()
{
VERIFY $@
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5DIFF_BIN -q $@
- else
- $RUNSERIAL $H5DIFF_BIN -q "$@"
- fi
+ $RUNSERIAL $H5DIFF_BIN -q "$@"
RET=$?
if [ $RET != 1 ] ; then
diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am
index b56284b..0b8816f 100644
--- a/tools/h5diff/Makefile.am
+++ b/tools/h5diff/Makefile.am
@@ -34,7 +34,7 @@ endif
bin_PROGRAMS=h5diff $(H5PDIFF)
# Add h5diff specific linker flags here
-h5diff_LDFLAGS = $(LT_STATIC_EXEC)
+h5diff_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Test programs and scripts
TEST_PROG=h5diffgentest
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 91add70..04a64da 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -110,6 +110,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -123,21 +133,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -160,7 +167,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -371,7 +378,7 @@ INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
@BUILD_PARALLEL_CONDITIONAL_TRUE@TEST_SCRIPT_PARA = $(srcdir)/testph5diff.sh
# Add h5diff specific linker flags here
-h5diff_LDFLAGS = $(LT_STATIC_EXEC)
+h5diff_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Test programs and scripts
TEST_PROG = h5diffgentest
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 22c6f3f..f316d7c 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -83,8 +83,9 @@ test -d ./testfiles || mkdir ./testfiles
# -h print help page
while [ $# -gt 0 ]; do
case "$1" in
- -p) # run ph5diff tests
- H5DIFF_BIN=`pwd`/ph5diff
+ -p) # reset the tool name and bin to run ph5diff tests
+ H5DIFF=ph5diff # The tool name
+ H5DIFF_BIN=`pwd`/$H5DIFF
pmode=yes
shift
;;
@@ -204,19 +205,12 @@ TOOLTEST() {
fi
# Run test.
- # Tflops interprets "$@" as "" when no parameter is given (e.g., the
- # case of missing file name). Changed it to use $@ till Tflops fixes it.
- #TESTING $H5DIFF $@
(
#echo "#############################"
#echo "Expected output for '$H5DIFF $@'"
#echo "#############################"
#cd $srcdir/testfiles
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- eval $RUNCMD $H5DIFF_BIN $@
- else
- eval $RUNCMD $H5DIFF_BIN "$@"
- fi
+ eval $RUNCMD $H5DIFF_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am
index 992586b..81e38d1 100644
--- a/tools/h5dump/Makefile.am
+++ b/tools/h5dump/Makefile.am
@@ -35,7 +35,7 @@ SCRIPT_DEPEND=h5dump$(EXEEXT)
bin_PROGRAMS=h5dump
# Add h5dump specific linker flags here
-h5dump_LDFLAGS = $(LT_STATIC_EXEC)
+h5dump_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All the programs depend on the hdf5 and h5tools libraries
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index be8cf96..8ca6684 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -108,6 +108,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -121,21 +131,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -158,7 +165,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -369,7 +376,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5dump$(EXEEXT)
# Add h5dump specific linker flags here
-h5dump_LDFLAGS = $(LT_STATIC_EXEC)
+h5dump_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All the programs depend on the hdf5 and h5tools libraries
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index c74c9f1..a437619 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3067,22 +3067,22 @@ dump_fcpl(hid_t fid)
hsize_t userblock; /* userblock size retrieved from FCPL */
size_t off_size; /* size of offsets in the file */
size_t len_size; /* size of lengths in the file */
- unsigned super; /* superblock version # */
- unsigned freelist; /* free list version # */
- unsigned stab; /* symbol table entry version # */
- unsigned shhdr; /* shared object header version # */
hid_t fdriver; /* file driver */
char dname[32]; /* buffer to store driver name */
unsigned sym_lk; /* symbol table B-tree leaf 'K' value */
unsigned sym_ik; /* symbol table B-tree internal 'K' value */
unsigned istore_ik; /* indexed storage B-tree internal 'K' value */
+ H5F_file_space_type_t fs_strategy; /* file space strategy */
+ hsize_t fs_threshold; /* free-space section threshold */
+ H5F_info2_t finfo; /* file information */
fcpl=H5Fget_create_plist(fid);
- H5Pget_version(fcpl, &super, &freelist, &stab, &shhdr);
+ H5Fget_info2(fid, &finfo);
H5Pget_userblock(fcpl,&userblock);
H5Pget_sizes(fcpl,&off_size,&len_size);
H5Pget_sym_k(fcpl,&sym_ik,&sym_lk);
H5Pget_istore_k(fcpl,&istore_ik);
+ H5Pget_file_space(fcpl, &fs_strategy, &fs_threshold);
H5Pclose(fcpl);
fapl=h5_fileaccess();
fdriver=H5Pget_driver(fapl);
@@ -3094,13 +3094,13 @@ dump_fcpl(hid_t fid)
*/
printf("%s %s\n",SUPER_BLOCK, BEGIN);
indentation(indent + COL);
- printf("%s %u\n","SUPERBLOCK_VERSION", super);
+ printf("%s %u\n","SUPERBLOCK_VERSION", finfo.super.version);
indentation(indent + COL);
- printf("%s %u\n","FREELIST_VERSION", freelist);
+ printf("%s %u\n","FREELIST_VERSION", finfo.free.version);
indentation(indent + COL);
- printf("%s %u\n","SYMBOLTABLE_VERSION", stab);
+ printf("%s %u\n","SYMBOLTABLE_VERSION", 0); /* Retain this for backward compatibility, for now (QAK) */
indentation(indent + COL);
- printf("%s %u\n","OBJECTHEADER_VERSION", shhdr);
+ printf("%s %u\n","OBJECTHEADER_VERSION", finfo.sohm.version);
indentation(indent + COL);
HDfprintf(stdout,"%s %Hd\n","OFFSET_SIZE", (long long)off_size);
indentation(indent + COL);
@@ -3141,6 +3141,21 @@ dump_fcpl(hid_t fid)
printf("%s %s\n","FILE_DRIVER", dname);*/
indentation(indent + COL);
printf("%s %u\n","ISTORE_K", istore_ik);
+
+ indentation(indent + COL);
+ if(fs_strategy == H5F_FILE_SPACE_ALL_PERSIST)
+ printf("%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL_PERSIST");
+ else if(fs_strategy == H5F_FILE_SPACE_ALL)
+ printf("%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_ALL");
+ else if(fs_strategy == H5F_FILE_SPACE_AGGR_VFD)
+ printf("%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_AGGR_VFD");
+ else if(fs_strategy == H5F_FILE_SPACE_VFD)
+ printf("%s %s\n", "FILE_SPACE_STRATEGY", "H5F_FILE_SPACE_VFD");
+ else
+ printf("%s %s\n", "FILE_SPACE_STRATEGY", "Unknown strategy");
+ indentation(indent + COL);
+ HDfprintf(stdout, "%s %Hu\n","FREE_SPACE_THRESHOLD", fs_threshold);
+
printf("%s\n",END);
/*-------------------------------------------------------------------------
@@ -4063,8 +4078,6 @@ parse_start:
}
break;
- break;
-
/** begin XML parameters **/
case 'x':
/* select XML output */
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index dcb491e..b42b675 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -93,7 +93,8 @@
#define FILE63 "textlinkfar.h5"
#define FILE64 "tarray8.h5"
#define FILE65 "tattrreg.h5"
-#define FILE66 "tdset_idx.h5"
+#define FILE66 "file_space.h5"
+#define FILE67 "tdset_idx.h5"
@@ -247,6 +248,10 @@ typedef struct s1_t {
#define F64_ARRAY_BUF_LEN (4*1024)
#define F64_DIM1 (F64_ARRAY_BUF_LEN / sizeof(int) + 1)
+/* File 65 macros */
+#define STRATEGY H5F_FILE_SPACE_AGGR_VFD /* File space handling strategy */
+#define THRESHOLD10 10 /* Free space section threshold */
+
/* Declarations for gent_dataset_idx() for "FILE66" */
#define DSET_FIXED "dset_fixed"
#define DSET_FIXED_FILTER "dset_filter"
@@ -390,85 +395,6 @@ gent_dataset2(void)
H5Fclose(fid);
}
-/*
- * Create a file with new format.
- * Create one dataset with (set_chunk, fixed dimension)
- * so that Fixed Array indexing will be used.
- * Create one dataset with (set_chunk, fixed dimension, filter)
- * so that Fixed Array indexing will be used.
- * Create one dataset with (set_chunk, non-fixed dimension)
- * so that B-tree indexing will be used.
- */
-static void
-gent_dataset_idx(void)
-{
- hid_t fid, space, dcpl, fapl;
- hsize_t dims[2];
- hsize_t maxdims[2];
- int buf[20][10];
- int i, j, ret;
-
- /* Get a copy of the file aaccess property */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
-
- /* Set the "use the latest version of the format" bounds for creating objects in the file */
- ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
- assert(ret >= 0);
-
- fid = H5Fcreate(FILE66, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
- dims[0] = CHUNK;
- dims[1] = CHUNK;
-
- /* set chunk */
- ret = H5Pset_chunk(dcpl, RANK, dims);
- assert(ret >= 0);
-
- /* dataset with fixed dimensions */
- dims[0] = DIM20;
- dims[1] = DIM10;
- space = H5Screate_simple(RANK, dims, NULL);
-
- for(i = 0; i < DIM20; i++)
- for(j = 0; j < DIM10; j++)
- buf[i][j] = j;
-
- ret = make_dset(fid, DSET_FIXED, space, H5T_NATIVE_INT, dcpl, buf);
- assert(ret >= 0);
- H5Sclose(space);
-
- /* dataset with non-fixed dimensions */
- maxdims[0] = DIM200;
- maxdims[1] = DIM100;
- space = H5Screate_simple(RANK, dims, maxdims);
-
- ret = make_dset(fid, DSET_BTREE, space, H5T_NATIVE_INT, dcpl, buf);
- assert(ret >= 0);
- H5Sclose(space);
-
-#if defined (H5_HAVE_FILTER_DEFLATE)
-
- /* dataset with fixed dimensions and filters */
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
- assert(ret >= 0);
-
- /* set deflate data */
- ret = H5Pset_deflate(dcpl, 9);
- assert(ret >= 0);
-
- space = H5Screate_simple(RANK, dims, NULL);
- ret = make_dset(fid, DSET_FIXED_FILTER, space, H5T_NATIVE_INT, dcpl, buf);
- assert(ret >= 0);
-
- H5Sclose(space);
-#endif
-
- H5Pclose(dcpl);
- H5Fclose(fid);
-}
-
static void
gent_attribute(void)
{
@@ -3043,7 +2969,6 @@ static void gent_array8(void)
hsize_t sdims[] = {F64_DIM0};
hsize_t tdims[] = {F64_DIM1};
int wdata[(F64_DIM1) * sizeof(int)]; /* Write buffer */
- int ndims;
int i;
/*
@@ -6534,7 +6459,111 @@ gent_extlinks(void)
H5Fclose(far_fid);
}
+/*-------------------------------------------------------------------------
+ * Function: gent_fs_strategy_threshold
+ *
+ * Purpose: Generate a file with non-default file space strategy and
+ * non-default free-space section threshold.
+ *-------------------------------------------------------------------------
+ */
+static void
+gent_fs_strategy_threshold(void)
+{
+ hid_t fid; /* File id */
+ hid_t fcpl; /* File creation property */
+
+ /* Create file-creation template */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+
+ /* Set file space information */
+ H5Pset_file_space(fcpl, STRATEGY, (hsize_t)THRESHOLD10);
+
+ /* Create the file with the specified strategy and threshold */
+ fid = H5Fcreate(FILE66, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
+
+ /* close */
+ H5Fclose(fid);
+ H5Pclose(fcpl);
+}
+
+/*
+ * Create a file with new format.
+ * Create one dataset with (set_chunk, fixed dimension)
+ * so that Fixed Array indexing will be used.
+ * Create one dataset with (set_chunk, fixed dimension, filter)
+ * so that Fixed Array indexing will be used.
+ * Create one dataset with (set_chunk, non-fixed dimension)
+ * so that B-tree indexing will be used.
+ */
+static void
+gent_dataset_idx(void)
+{
+ hid_t fid, space, dcpl, fapl;
+ hsize_t dims[2];
+ hsize_t maxdims[2];
+ int buf[20][10];
+ int i, j, ret;
+
+ /* Get a copy of the file aaccess property */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ /* Set the "use the latest version of the format" bounds for creating objects in the file */
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+ assert(ret >= 0);
+
+ fid = H5Fcreate(FILE67, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+
+ dims[0] = CHUNK;
+ dims[1] = CHUNK;
+
+ /* set chunk */
+ ret = H5Pset_chunk(dcpl, RANK, dims);
+ assert(ret >= 0);
+
+ /* dataset with fixed dimensions */
+ dims[0] = DIM20;
+ dims[1] = DIM10;
+ space = H5Screate_simple(RANK, dims, NULL);
+
+ for(i = 0; i < DIM20; i++)
+ for(j = 0; j < DIM10; j++)
+ buf[i][j] = j;
+
+ ret = make_dset(fid, DSET_FIXED, space, H5T_NATIVE_INT, dcpl, buf);
+ assert(ret >= 0);
+ H5Sclose(space);
+
+ /* dataset with non-fixed dimensions */
+ maxdims[0] = DIM200;
+ maxdims[1] = DIM100;
+ space = H5Screate_simple(RANK, dims, maxdims);
+
+ ret = make_dset(fid, DSET_BTREE, space, H5T_NATIVE_INT, dcpl, buf);
+ assert(ret >= 0);
+ H5Sclose(space);
+
+#if defined (H5_HAVE_FILTER_DEFLATE)
+
+ /* dataset with fixed dimensions and filters */
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl, H5Z_FILTER_ALL);
+ assert(ret >= 0);
+
+ /* set deflate data */
+ ret = H5Pset_deflate(dcpl, 9);
+ assert(ret >= 0);
+
+ space = H5Screate_simple(RANK, dims, NULL);
+ ret = make_dset(fid, DSET_FIXED_FILTER, space, H5T_NATIVE_INT, dcpl, buf);
+ assert(ret >= 0);
+
+ H5Sclose(space);
+#endif
+
+ H5Pclose(dcpl);
+ H5Fclose(fid);
+}
/*-------------------------------------------------------------------------
* Function: main
@@ -6607,7 +6636,7 @@ int main(void)
gent_attr_creation_order();
gent_fpformat();
gent_extlinks();
-
+ gent_fs_strategy_threshold();
gent_dataset_idx();
return 0;
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 6d2f273..84274cf 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -161,12 +161,8 @@ DIFFTEST()
{
PRINT_H5DIFF $@
(
- cd $srcdir/../testfiles
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5DIFF_BIN $@ -q
- else
- $RUNSERIAL $H5DIFF_BIN "$@" -q
- fi
+ cd $srcdir/../testfiles
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
)
RET=$?
if [ $RET != 0 ] ; then
@@ -198,12 +194,8 @@ IMPORTTEST()
PRINT_H5IMPORT $@
(
- cd $srcdir/../testfiles
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5IMPORT_BIN $@
- else
- $RUNSERIAL $H5IMPORT_BIN "$@"
- fi
+ cd $srcdir/../testfiles
+ $RUNSERIAL $H5IMPORT_BIN "$@"
)
RET=$?
if [ $RET != 0 ] ; then
@@ -340,6 +332,7 @@ TOOLTEST tnofilename.ddl
# tests for super block
TOOLTEST tboot1.ddl -H -B -d dset tfcontents1.h5
TOOLTEST tboot2.ddl -B tfcontents2.h5
+TOOLTEST file_space.ddl -B file_space.h5
# test -p with a non existing dataset
TOOLTEST tperror.ddl -p -d bogus tfcontents1.h5
diff --git a/tools/h5import/Makefile.am b/tools/h5import/Makefile.am
index 2202f5f..49f4f71 100644
--- a/tools/h5import/Makefile.am
+++ b/tools/h5import/Makefile.am
@@ -35,7 +35,7 @@ SCRIPT_DEPEND=h5import$(EXEEXT)
bin_PROGRAMS=h5import
# Add h5import specific linker flags here
-h5import_LDFLAGS = $(LT_STATIC_EXEC)
+h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the main hdf5 library and the tools library
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index f9e88ae..15fcf90 100755
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -103,6 +103,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -116,21 +126,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -153,7 +160,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -361,7 +368,7 @@ check_SCRIPT = h5importtestutil.sh
SCRIPT_DEPEND = h5import$(EXEEXT)
# Add h5import specific linker flags here
-h5import_LDFLAGS = $(LT_STATIC_EXEC)
+h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the main hdf5 library and the tools library
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 933754e..3818829 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
case ERR: /* command syntax error */
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
usage(argv[0]);
goto err;
}
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
if (FALSE == outfile_named)
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
}
@@ -190,10 +190,10 @@ int main(int argc, char *argv[])
if (process(&opt) == -1)
goto err;
- return(0);
+ return(EXIT_SUCCESS);
err:
- (void) fprintf(stderr, err4);
- return(-1);
+ (void) fprintf(stderr, "%s", err4);
+ return(EXIT_FAILURE);
}
static int
@@ -397,7 +397,7 @@ processDataFile(char *infile, struct Input *in, FILE **strm, hid_t file_id)
break;
default:
- (void) fprintf(stderr, err10);
+ (void) fprintf(stderr, "%s", err10);
return(-1);
}
return (0);
@@ -435,7 +435,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hd", &temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_INT8)temp;
@@ -448,14 +448,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in08, sizeof(H5DT_INT8), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -469,7 +469,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hd", in16) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -481,14 +481,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in16, sizeof(H5DT_INT16), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -502,7 +502,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%d", in32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -513,14 +513,14 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in32, sizeof(H5DT_INT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -535,7 +535,7 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%s", buffer) < 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_INT64) HDstrtoll(buffer, NULL, 10);
@@ -547,21 +547,21 @@ readIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in64, sizeof(H5DT_INT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
#endif /* ifndef _WIN32 */
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -598,7 +598,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hu", &temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_UINT8)temp;
@@ -611,14 +611,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in08, sizeof(H5DT_UINT8), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -632,7 +632,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%hu", in16) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -643,14 +643,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in16, sizeof(H5DT_UINT16), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -664,7 +664,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%u", in32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -675,14 +675,14 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in32, sizeof(H5DT_UINT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -697,7 +697,7 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%s", buffer) < 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_UINT64) HDstrtoll(buffer, NULL, 10);
@@ -709,21 +709,21 @@ readUIntegerData(FILE **strm, struct Input *in)
{
if (fread((char *) in64, sizeof(H5DT_UINT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
#endif /* ifndef _WIN32 */
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -756,7 +756,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%f", fp32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -771,7 +771,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%f", fp32) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -784,14 +784,14 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fread((char *) fp32, sizeof(H5DT_FLOAT32), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -805,7 +805,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%lf", fp64) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -820,7 +820,7 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fscanf(*strm, "%lf", fp64) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -833,20 +833,20 @@ readFloatData(FILE **strm, struct Input *in)
{
if (fread((char *) fp64, sizeof(H5DT_FLOAT64), 1, *strm) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
break;
}
return(0);
@@ -1019,7 +1019,7 @@ allocateIntegerStorage(struct Input *in)
case 8:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT8))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1027,7 +1027,7 @@ allocateIntegerStorage(struct Input *in)
case 16:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT16))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1035,7 +1035,7 @@ allocateIntegerStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1043,13 +1043,13 @@ allocateIntegerStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_INT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1070,7 +1070,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 8:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT8))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1078,7 +1078,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 16:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT16))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1086,7 +1086,7 @@ static int allocateUIntegerStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1094,13 +1094,13 @@ static int allocateUIntegerStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_UINT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1122,7 +1122,7 @@ allocateFloatStorage(struct Input *in)
case 32:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_FLOAT32))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
@@ -1130,13 +1130,13 @@ allocateFloatStorage(struct Input *in)
case 64:
if ((in->data = (VOIDP) HDmalloc((size_t) len * sizeof(H5DT_FLOAT64))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
break;
}
return(0);
@@ -1216,7 +1216,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
}
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err18);
+ (void) fprintf(stderr, "%s", err18);
return (-1);
}
if (parsePathInfo(&in->path, temp) == -1)
@@ -1236,7 +1236,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err18);
+ (void) fprintf(stderr, "%s", err18);
return (-1);
}
if (getInputClass(in, temp) == -1)
@@ -1267,7 +1267,7 @@ processConfigurationFile(char *infile, struct Input *in, FILE **strm)
}
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err19);
+ (void) fprintf(stderr, "%s", err19);
return (-1);
}
if (getInputSize(in, ival) == -1)
@@ -1514,7 +1514,7 @@ validateConfigurationParameters(struct Input * in)
(in->configOptionVector[DIM] != 1) ||
(in->configOptionVector[RANK] != 1))
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1524,7 +1524,7 @@ validateConfigurationParameters(struct Input * in)
(in->configOptionVector[CHUNK] == 1) ||
(in->configOptionVector[EXTEND] == 1))
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
}
@@ -1534,7 +1534,7 @@ validateConfigurationParameters(struct Input * in)
{
if (in->configOptionVector[CHUNK] != 1)
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -1543,7 +1543,7 @@ validateConfigurationParameters(struct Input * in)
if (in->outputArchitecture == 1)
if (in->outputClass == 1)
{
- (void) fprintf(stderr, err4a);
+ (void) fprintf(stderr, "%s", err4a);
return (-1);
}
@@ -1551,7 +1551,7 @@ validateConfigurationParameters(struct Input * in)
if (in->outputArchitecture == 2)
if (in->outputClass == 0)
{
- (void) fprintf(stderr, err4b);
+ (void) fprintf(stderr, "%s", err4b);
return (-1);
}
@@ -1559,14 +1559,14 @@ validateConfigurationParameters(struct Input * in)
if(in->outputSize != 32 &&
in->outputSize != 64 )
{
- (void) fprintf(stderr, err5);
+ (void) fprintf(stderr, "%s", err5);
return (-1);
}
#ifdef _WIN32
if (in->inputSize == 64 && (in->inputClass == 0 || in->inputClass == 4 || in->inputClass == 6 || in->inputClass == 7) )
{
- (void) fprintf(stderr, err6);
+ (void) fprintf(stderr, "%s", err6);
return -1;
}
#endif
@@ -1626,7 +1626,7 @@ parseDimensions(struct Input *in, char *strm)
if ((in->sizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1654,13 +1654,13 @@ getOutputClass(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputClassStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1694,7 +1694,7 @@ getOutputSize(struct Input *in, FILE** strm)
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1704,7 +1704,7 @@ getOutputSize(struct Input *in, FILE** strm)
in->outputSize = ival;
return (0);
}
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return(-1);
}
@@ -1716,7 +1716,7 @@ getInputClass(struct Input *in, char * temp)
if ((kindex = InputClassStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1757,7 +1757,7 @@ getInputSize(struct Input *in, int ival)
in->inputSize = ival;
return (0);
}
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return(-1);
}
@@ -1771,7 +1771,7 @@ getRank(struct Input *in, FILE** strm)
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if (ival >=MIN_NUM_DIMENSION && ival <=MAX_NUM_DIMENSION )
@@ -1780,7 +1780,7 @@ getRank(struct Input *in, FILE** strm)
return (0);
}
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return(-1);
}
@@ -1797,7 +1797,7 @@ getDimensionSizes(struct Input *in, FILE **strm)
if ((in->sizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1806,7 +1806,7 @@ getDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
return (0);
@@ -1825,7 +1825,7 @@ getChunkedDimensionSizes(struct Input *in, FILE **strm)
if ((in->sizeOfChunk =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1834,14 +1834,14 @@ getChunkedDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
for (i=0; i<in->rank; i++)
if (in->sizeOfChunk[i] > in->sizeOfDimension[i])
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
return (0);
@@ -1860,7 +1860,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if ((in->maxsizeOfDimension =
(hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1874,7 +1874,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if (in->rank != i)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1883,7 +1883,7 @@ getMaximumDimensionSizes(struct Input *in, FILE **strm)
if (in->maxsizeOfDimension[i] != H5S_UNLIMITED)
if (in->maxsizeOfDimension[i] < in->sizeOfDimension[i])
{
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -1900,13 +1900,13 @@ getOutputArchitecture(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputArchStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1943,13 +1943,13 @@ getOutputByteOrder(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -1980,13 +1980,13 @@ getCompressionType(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = CompressionTypeStrToInt(temp)) == -1)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2027,20 +2027,20 @@ getCompressionParameter(struct Input *in, FILE** strm)
case 0: /* GZIP */
if (fscanf(*strm, "%d", (&ival)) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
if (ival <0 || ival > 9)
{
- (void) fprintf(stderr, err2);
+ (void) fprintf(stderr, "%s", err2);
return (-1);
}
in->compressionParam = ival;
return (0);
default:
- (void) fprintf(stderr, err3);
+ (void) fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -2053,7 +2053,7 @@ getExternalFilename(struct Input *in, FILE** strm)
if (fscanf(*strm, "%s", temp) != 1)
{
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2370,7 +2370,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -2447,7 +2447,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void) fprintf(stderr, err1);
+ (void) fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -2555,7 +2555,7 @@ process(struct Options *opt)
/* creating the external file if it doesnt exist */
if ((extfile = HDfopen(in->externFilename, "ab")) == NULL)
{
- (void) fprintf(stderr, err4);
+ (void) fprintf(stderr, "%s", err4);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -2575,7 +2575,7 @@ process(struct Options *opt)
H5E_BEGIN_TRY {
/* create data set */
if((dataset = H5Dcreate2(handle, in->path.group[j], outtype, dataspace, H5P_DEFAULT, proplist, H5P_DEFAULT)) < 0) {
- (void)fprintf(stderr, err5);
+ (void)fprintf(stderr, "%s", err5);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -2587,7 +2587,7 @@ process(struct Options *opt)
/* write dataset */
if(H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) {
- (void) fprintf(stderr, err6);
+ (void) fprintf(stderr, "%s", err6);
H5Dclose(dataset);
H5Pclose(proplist);
H5Sclose(dataspace);
diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c
index dd1a2be..9c839a3 100755
--- a/tools/h5import/h5importtest.c
+++ b/tools/h5import/h5importtest.c
@@ -370,6 +370,6 @@ main(void)
- return (0);
+ return (EXIT_SUCCESS);
}
diff --git a/tools/h5jam/Makefile.am b/tools/h5jam/Makefile.am
index d89a2d2..2f9bc00 100644
--- a/tools/h5jam/Makefile.am
+++ b/tools/h5jam/Makefile.am
@@ -28,8 +28,8 @@ check_PROGRAMS=tellub h5jamgentest getub
TEST_SCRIPT=testh5jam.sh
# Add h5jam and h5unjam specific linker flags here
-h5jam_LDFLAGS = $(LT_STATIC_EXEC)
-h5unjam_LDFLAGS = $(LT_STATIC_EXEC)
+h5jam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5unjam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
check_SCRIPTS=$(TEST_SCRIPT)
SCRIPT_DEPEND=h5jam$(EXEEXT) h5unjam$(EXEEXT)
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index 12486a0..5509801 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -117,6 +117,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -130,21 +140,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -167,7 +174,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -373,8 +380,8 @@ INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
TEST_SCRIPT = testh5jam.sh
# Add h5jam and h5unjam specific linker flags here
-h5jam_LDFLAGS = $(LT_STATIC_EXEC)
-h5unjam_LDFLAGS = $(LT_STATIC_EXEC)
+h5jam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5unjam_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5jam$(EXEEXT) h5unjam$(EXEEXT)
diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am
index 64e89f1..41e66f6 100644
--- a/tools/h5ls/Makefile.am
+++ b/tools/h5ls/Makefile.am
@@ -32,7 +32,7 @@ SCRIPT_DEPEND=h5ls$(EXEEXT)
bin_PROGRAMS=h5ls
# Add h5ls specific linker flags here
-h5ls_LDFLAGS = $(LT_STATIC_EXEC)
+h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the hdf5 and h5tools libraries
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index bace577..c11dc43 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -97,6 +97,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -110,21 +120,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -147,7 +154,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -354,7 +361,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5ls$(EXEEXT)
# Add h5ls specific linker flags here
-h5ls_LDFLAGS = $(LT_STATIC_EXEC)
+h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the hdf5 and h5tools libraries
LDADD = $(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index ca0ddcb..9bc0448 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1991,9 +1991,9 @@ done:
*
* Purpose: Begins iteration on an object
*
- * Return: Success: 0
+ * Return: Success: EXIT_SUCCESS(0)
*
- * Failure: -1
+ * Failure: EXIT_FAILURE(1)
*
* Programmer: Neil Fortner
* Wednesday, August 21, 2008
@@ -2109,15 +2109,12 @@ get_width(void)
width = w[0];
}
#elif defined(H5_HAVE_TIOCGWINSZ) && defined(H5_HAVE_IOCTL)
-#ifndef __PUMAGON__
-/* the ioctl() call coredump on TFLOPS. Turn it off for now. */
{
/* Unix with ioctl(TIOCGWINSZ) */
struct winsize w;
if (ioctl(2, TIOCGWINSZ, &w)>=0 && w.ws_col>0)
width = w.ws_col;
}
-#endif
#elif defined(H5_HAVE_TIOCGETD) && defined(H5_HAVE_IOCTL)
{
/* Unix with ioctl(TIOCGETD) */
@@ -2203,7 +2200,7 @@ main(int argc, const char *argv[])
break;
} else if(!HDstrcmp(argv[argno], "--help")) {
usage();
- leave(0);
+ leave(EXIT_SUCCESS);
} else if(!HDstrcmp(argv[argno], "--address")) {
address_g = TRUE;
} else if(!HDstrcmp(argv[argno], "--data")) {
@@ -2234,25 +2231,25 @@ main(int argc, const char *argv[])
no_line_wrap_g = TRUE;
else if(width_g < 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if(!HDstrcmp(argv[argno], "--width")) {
if((argno + 1) >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} else {
s = argv[++argno];
}
width_g = (int)HDstrtol(s, &rest, 0);
if(width_g <= 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if(!HDstrcmp(argv[argno], "--verbose")) {
verbose_g++;
} else if(!HDstrcmp(argv[argno], "--version")) {
print_version(progname);
- leave(0);
+ leave(EXIT_SUCCESS);
} else if(!HDstrcmp(argv[argno], "--hexdump")) {
hexdump_g = TRUE;
} else if(!HDstrncmp(argv[argno], "-w", 2)) {
@@ -2260,7 +2257,7 @@ main(int argc, const char *argv[])
s = argv[argno] + 2;
} else if((argno + 1) >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} else {
s = argv[++argno];
}
@@ -2270,7 +2267,7 @@ main(int argc, const char *argv[])
no_line_wrap_g = TRUE;
else if(width_g < 0 || *rest) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} else if('-'!=argv[argno][1]) {
/* Single-letter switches */
@@ -2279,7 +2276,7 @@ main(int argc, const char *argv[])
case '?':
case 'h': /* --help */
usage();
- leave(0);
+ leave(EXIT_SUCCESS);
case 'a': /* --address */
address_g = TRUE;
@@ -2328,7 +2325,7 @@ main(int argc, const char *argv[])
case 'V': /* --version */
print_version(progname);
- leave(0);
+ leave(EXIT_SUCCESS);
case 'x': /* --hexdump */
hexdump_g = TRUE;
@@ -2336,12 +2333,12 @@ main(int argc, const char *argv[])
default:
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end switch */
} /* end for */
} else {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
}
} /* end for */
@@ -2349,14 +2346,14 @@ main(int argc, const char *argv[])
* absolutely nothing ;-) */
if(argno >= argc) {
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
/* Check for conflicting arguments */
if(recursive_g && grp_literal_g) {
fprintf(stderr, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
usage();
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
/* Turn off HDF5's automatic error printing unless you're debugging h5ls */
@@ -2419,7 +2416,7 @@ main(int argc, const char *argv[])
x = oname;
if(NULL == (oname = HDstrdup(oname))) {
fprintf(stderr, "memory allocation failed\n");
- leave(1);
+ leave(EXIT_FAILURE);
}
*x = '\0';
/* Delay specifying the name start point so the original object name
@@ -2452,7 +2449,7 @@ main(int argc, const char *argv[])
/* Check the type of link given */
if(H5Lget_info(file, oname, &li, H5P_DEFAULT) < 0) {
display_obj_name(stdout, &iter, oname, "**NOT FOUND**");
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if */
} /* end if */
else
@@ -2461,7 +2458,7 @@ main(int argc, const char *argv[])
/* Open the object and display it's information */
if(li.type == H5L_TYPE_HARD) {
if(visit_obj(file, oname, &iter) < 0)
- leave(1);
+ leave(EXIT_FAILURE);
} /* end if(li.type == H5L_TYPE_HARD) */
else {
/* Specified name is not for object -- list that link */
@@ -2481,6 +2478,6 @@ main(int argc, const char *argv[])
HDfree(elink_list.objs);
} /* end while */
- leave(0);
+ leave(EXIT_SUCCESS);
} /* end main() */
diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am
index 1f811f0..96f0082 100644
--- a/tools/h5repack/Makefile.am
+++ b/tools/h5repack/Makefile.am
@@ -37,7 +37,7 @@ SCRIPT_DEPEND=h5repack$(EXEEXT)
bin_PROGRAMS=h5repack
# Add h5repack specific linker flags here
-h5repack_LDFLAGS = $(LT_STATIC_EXEC)
+h5repack_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Depend on the hdf5 library, the tools library, the test library
LDADD=$(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 656cfa6..dd33879 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -117,6 +117,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -130,21 +140,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -167,7 +174,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -378,7 +385,7 @@ check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5repack$(EXEEXT)
# Add h5repack specific linker flags here
-h5repack_LDFLAGS = $(LT_STATIC_EXEC)
+h5repack_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Depend on the hdf5 library, the tools library, the test library
LDADD = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index d0a7a7d..c8a3abe 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -90,13 +90,15 @@ int h5repack(const char* infile,
*-------------------------------------------------------------------------
*/
-int h5repack_init (pack_opt_t *options, int verbose, int latest)
+int
+h5repack_init(pack_opt_t *options, int verbose, int latest,
+ H5F_file_space_type_t strategy, hsize_t threshold)
{
int k, n;
memset(options,0,sizeof(pack_opt_t));
options->min_comp = 1024;
options->verbose = verbose;
- options->latest = latest ;
+ options->latest = latest;
for ( n = 0; n < H5_REPACK_MAX_NFILTERS; n++)
{
@@ -106,6 +108,9 @@ int h5repack_init (pack_opt_t *options, int verbose, int latest)
options->filter_g[n].cd_values[k] = 0;
}
+ options->fs_strategy = strategy;
+ options->fs_threshold = threshold;
+
return (options_table_init(&(options->op_tbl)));
}
@@ -649,7 +654,7 @@ static const char* get_sfilter(H5Z_filter_t filtn)
return "SOFF";
else {
error_msg(progname, "input error in filter type\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h
index feabeaa..38ce9e4 100644
--- a/tools/h5repack/h5repack.h
+++ b/tools/h5repack/h5repack.h
@@ -112,6 +112,8 @@ typedef struct {
hsize_t ublock_size; /* user block size */
hsize_t threshold; /* alignment threshold for H5Pset_alignment */
hsize_t alignment ; /* alignment for H5Pset_alignment */
+ H5F_file_space_type_t fs_strategy; /* File space handling strategy */
+ hsize_t fs_threshold; /* Free space section threshold */
} pack_opt_t;
@@ -125,14 +127,14 @@ typedef struct {
extern "C" {
#endif
-int h5repack (const char* infile, const char* outfile, pack_opt_t *options);
-int h5repack_addfilter (const char* str, pack_opt_t *options);
-int h5repack_addlayout (const char* str, pack_opt_t *options);
-int h5repack_init (pack_opt_t *options, int verbose, int latest);
-int h5repack_end (pack_opt_t *options);
-int h5repack_verify (const char *fname,pack_opt_t *options);
-int h5repack_cmp_pl (const char *fname1,
- const char *fname2);
+int h5repack(const char* infile, const char* outfile, pack_opt_t *options);
+int h5repack_addfilter(const char* str, pack_opt_t *options);
+int h5repack_addlayout(const char* str, pack_opt_t *options);
+int h5repack_init(pack_opt_t *options, int verbose, int latest,
+ H5F_file_space_type_t strategy, hsize_t threshold);
+int h5repack_end(pack_opt_t *options);
+int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options);
+int h5repack_cmp_pl(const char *fname1, const char *fname2);
#ifdef __cplusplus
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 01c33ef..e9aae81 100755
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -96,11 +96,7 @@ SKIP() {
DIFFTEST()
{
VERIFY $@
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5DIFF_BIN -q $@
- else
- $RUNSERIAL $H5DIFF_BIN -q "$@"
- fi
+ $RUNSERIAL $H5DIFF_BIN -q "$@"
RET=$?
if [ $RET != 0 ] ; then
echo "*FAILED*"
@@ -116,27 +112,20 @@ DIFFTEST()
TOOLTEST()
{
# Run test.
- # Tflops interprets "$@" as "" when no parameter is given (e.g., the
- # case of missing file name). Changed it to use $@ till Tflops fixes it.
TESTING $H5REPACK $@
infile=$srcdir/testfiles/$1
path=`pwd`
outfile=$path/out.$1
shift
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5REPACK_BIN $@ $infile $outfile
- else
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
- fi
-
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
rm -f $outfile
}
@@ -146,27 +135,20 @@ TOOLTEST()
TOOLTEST0()
{
# Run test.
- # Tflops interprets "$@" as "" when no parameter is given (e.g., the
- # case of missing file name). Changed it to use $@ till Tflops fixes it.
TESTING $H5REPACK $@
infile=$srcdir/testfiles/$1
path=`pwd`
outfile=$path/out.$1
shift
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile $@
- else
- $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@"
- fi
-
+ $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@"
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
rm -f $outfile
}
@@ -178,27 +160,20 @@ TOOLTEST0()
TOOLTEST1()
{
# Run test.
- # Tflops interprets "$@" as "" when no parameter is given (e.g., the
- # case of missing file name). Changed it to use $@ till Tflops fixes it.
TESTING $H5REPACK $@
infile=$srcdir/../testfiles/$1
path=`pwd`
outfile=$path/out.$1
shift
- if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5REPACK_BIN $@ $infile $outfile
- else
- $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
- fi
-
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
RET=$?
if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
else
- echo " PASSED"
- DIFFTEST $infile $outfile
+ echo " PASSED"
+ DIFFTEST $infile $outfile
fi
rm -f $outfile
}
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 0fb8fc8..77c03d2 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -104,7 +104,7 @@ int copy_objects(const char* fnamein,
goto out;
}
- /* get user block size */
+ /* get user block size and file space strategy/threshold */
{
hid_t fcpl_in; /* file creation property list ID for input file */
@@ -120,6 +120,24 @@ int copy_objects(const char* fnamein,
goto out;
}
+ if(!options->fs_strategy)
+ {
+ if(H5Pget_file_space(fcpl_in, &options->fs_strategy, NULL) < 0)
+ {
+ error_msg(progname, "failed to retrieve file space strategy\n");
+ goto out;
+ }
+ }
+
+ if(!options->fs_threshold)
+ {
+ if(H5Pget_file_space(fcpl_in, NULL, &options->fs_threshold) < 0)
+ {
+ error_msg(progname, "failed to retrieve file space threshold\n");
+ goto out;
+ }
+ }
+
if(H5Pclose(fcpl_in) < 0)
{
error_msg(progname, "failed to close property list\n");
@@ -316,6 +334,32 @@ int copy_objects(const char* fnamein,
}
+ /* either use the FCPL already created or create a new one */
+ if(fcpl != H5P_DEFAULT)
+ {
+ /* set file space strategy and free space threshold */
+ if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0)
+ {
+ error_msg(progname, "failed to set file space strategy & threshold\n");
+ goto out;
+ }
+ }
+ else
+ {
+ /* create a file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ {
+ error_msg(progname, "fail to create a file creation property list\n");
+ goto out;
+ }
+
+ /* set file space strategy and free space threshold */
+ if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0)
+ {
+ error_msg(progname, "failed to set file space strategy & threshold \n");
+ goto out;
+ }
+ }
/*-------------------------------------------------------------------------
* create the output file
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index d2aed2b..acbd8ee 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -38,7 +38,7 @@ const char *outfile = NULL;
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:";
+static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:S:T:";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
@@ -58,6 +58,8 @@ static struct long_options l_opts[] = {
{ "alignment", require_arg, 'a' },
{ "infile", require_arg, 'i' }, /* -i for backward compability */
{ "outfile", require_arg, 'o' }, /* -o for backward compability */
+ { "fs_strategy", require_arg, 'S' },
+ { "fs_threshold", require_arg, 'T' },
{ NULL, 0, '\0' }
};
@@ -69,7 +71,9 @@ static struct long_options l_opts[] = {
*
* Purpose: h5repack main program
*
- * Return: 1, error, 0, no error
+ * Return: Success: EXIT_SUCCESS(0)
+ *
+ * Failure: EXIT_FAILURE(1)
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -104,7 +108,7 @@ int main(int argc, const char **argv)
int ret=-1;
/* initialize options */
- h5repack_init (&options,0, 0);
+ h5repack_init (&options, 0, 0, 0, (hsize_t)0);
parse_command_line(argc, argv, &options);
@@ -180,63 +184,77 @@ static void usage(const char *prog)
printf(" -a A, --alignment=A Alignment value for H5Pset_alignment\n");
printf(" -f FILT, --filter=FILT Filter type\n");
printf(" -l LAYT, --layout=LAYT Layout type\n");
+ printf(" -S FS_STRGY, --fs_strategy=FS_STRGY File space management strategy\n");
+ printf(" -T FS_THRD, --fs_threshold=FS_THRD Free-space section threshold\n");
printf("\n");
- printf(" M - is an integer greater than 1, size of dataset in bytes (default is 1024) \n");
- printf(" E - is a filename.\n");
- printf(" S - is an integer\n");
- printf(" U - is a filename.\n");
- printf(" T - is an integer\n");
- printf(" A - is an integer greater than zero\n");
- printf(" B - is the user block size, any value that is 512 or greater and is\n");
+ printf(" M - is an integer greater than 1, size of dataset in bytes (default is 1024) \n");
+ printf(" E - is a filename.\n");
+ printf(" S - is an integer\n");
+ printf(" U - is a filename.\n");
+ printf(" T - is an integer\n");
+ printf(" A - is an integer greater than zero\n");
+ printf(" B - is the user block size, any value that is 512 or greater and is\n");
printf(" a power of 2 (1024 default)\n");
- printf(" F - is the shared object header message type, any of <dspace|dtype|fill|\n");
+ printf(" F - is the shared object header message type, any of <dspace|dtype|fill|\n");
printf(" pline|attr>. If F is not specified, S applies to all messages\n");
-
+ printf("\n");
+ printf(" FS_STRGY is the file space management strategy to use for the output file.\n");
+ printf(" It is a string as listed below:\n");
+ printf(" ALL_PERSIST - Use persistent free-space managers, aggregators and virtual file driver\n");
+ printf(" for file space allocation\n");
+ printf(" ALL - Use non-persistent free-space managers, aggregators and virtual file driver\n");
+ printf(" for file space allocation\n");
+ printf(" AGGR_VFD - Use aggregators and virtual file driver for file space allocation\n");
+ printf(" VFD - Use virtual file driver for file space allocation\n");
+ printf("\n");
+ printf(" FS_THRD is the free-space section threshold to use for the output file.\n");
+ printf(" It is the minimum size (in bytes) of free-space sections to be tracked\n");
+ printf(" by the the library's free-space managers.\n");
printf("\n");
- printf(" FILT - is a string with the format:\n");
+ printf(" FILT - is a string with the format:\n");
printf("\n");
- printf(" <list of objects>:<name of filter>=<filter parameters>\n");
+ printf(" <list of objects>:<name of filter>=<filter parameters>\n");
printf("\n");
- printf(" <list of objects> is a comma separated list of object names, meaning apply\n");
- printf(" compression only to those objects. If no names are specified, the filter\n");
- printf(" is applied to all objects\n");
- printf(" <name of filter> can be:\n");
- printf(" GZIP, to apply the HDF5 GZIP filter (GZIP compression)\n");
- printf(" SZIP, to apply the HDF5 SZIP filter (SZIP compression)\n");
- printf(" SHUF, to apply the HDF5 shuffle filter\n");
- printf(" FLET, to apply the HDF5 checksum filter\n");
- printf(" NBIT, to apply the HDF5 NBIT filter (NBIT compression)\n");
- printf(" SOFF, to apply the HDF5 Scale/Offset filter\n");
- printf(" NONE, to remove all filters\n");
- printf(" <filter parameters> is optional filter parameter information\n");
- printf(" GZIP=<deflation level> from 1-9\n");
- printf(" SZIP=<pixels per block,coding> pixels per block is a even number in\n");
+ printf(" <list of objects> is a comma separated list of object names, meaning apply\n");
+ printf(" compression only to those objects. If no names are specified, the filter\n");
+ printf(" is applied to all objects\n");
+ printf(" <name of filter> can be:\n");
+ printf(" GZIP, to apply the HDF5 GZIP filter (GZIP compression)\n");
+ printf(" SZIP, to apply the HDF5 SZIP filter (SZIP compression)\n");
+ printf(" SHUF, to apply the HDF5 shuffle filter\n");
+ printf(" FLET, to apply the HDF5 checksum filter\n");
+ printf(" NBIT, to apply the HDF5 NBIT filter (NBIT compression)\n");
+ printf(" SOFF, to apply the HDF5 Scale/Offset filter\n");
+ printf(" NONE, to remove all filters\n");
+ printf(" <filter parameters> is optional filter parameter information\n");
+ printf(" GZIP=<deflation level> from 1-9\n");
+ printf(" SZIP=<pixels per block,coding> pixels per block is a even number in\n");
printf(" 2-32 and coding method is either EC or NN\n");
- printf(" SHUF (no parameter)\n");
- printf(" FLET (no parameter)\n");
- printf(" NBIT (no parameter)\n");
- printf(" SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type\n");
+ printf(" SHUF (no parameter)\n");
+ printf(" FLET (no parameter)\n");
+ printf(" NBIT (no parameter)\n");
+ printf(" SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type\n");
printf(" is either IN or DS\n");
- printf(" NONE (no parameter)\n");
+ printf(" NONE (no parameter)\n");
printf("\n");
- printf(" LAYT - is a string with the format:\n");
+ printf(" LAYT - is a string with the format:\n");
printf("\n");
- printf(" <list of objects>:<layout type>=<layout parameters>\n");
+ printf(" <list of objects>:<layout type>=<layout parameters>\n");
printf("\n");
- printf(" <list of objects> is a comma separated list of object names, meaning that\n");
- printf(" layout information is supplied for those objects. If no names are\n");
- printf(" specified, the layout type is applied to all objects\n");
- printf(" <layout type> can be:\n");
- printf(" CHUNK, to apply chunking layout\n");
- printf(" COMPA, to apply compact layout\n");
- printf(" CONTI, to apply continuous layout\n");
- printf(" <layout parameters> is optional layout information\n");
- printf(" CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension\n");
- printf(" COMPA (no parameter)\n");
- printf(" CONTI (no parameter)\n");
+ printf(" <list of objects> is a comma separated list of object names, meaning that\n");
+ printf(" layout information is supplied for those objects. If no names are\n");
+ printf(" specified, the layout type is applied to all objects\n");
+ printf(" <layout type> can be:\n");
+ printf(" CHUNK, to apply chunking layout\n");
+ printf(" COMPA, to apply compact layout\n");
+ printf(" CONTI, to apply continuous layout\n");
+ printf(" <layout parameters> is optional layout information\n");
+ printf(" CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension\n");
+ printf(" COMPA (no parameter)\n");
+ printf(" CONTI (no parameter)\n");
printf("\n");
printf("Examples of use:\n");
printf("\n");
@@ -429,6 +447,30 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
}
break;
+ case 'S':
+ {
+ char strategy[MAX_NC_NAME];
+
+ strcpy(strategy, opt_arg);
+ if(!strcmp(strategy, "ALL_PERSIST"))
+ options->fs_strategy = H5F_FILE_SPACE_ALL_PERSIST;
+ else if(!strcmp(strategy, "ALL"))
+ options->fs_strategy = H5F_FILE_SPACE_ALL;
+ else if(!strcmp(strategy, "AGGR_VFD"))
+ options->fs_strategy = H5F_FILE_SPACE_AGGR_VFD;
+ else if(!strcmp(strategy, "VFD"))
+ options->fs_strategy = H5F_FILE_SPACE_VFD;
+ else {
+ error_msg(progname, "invalid file space management strategy\n", opt_arg );
+ exit(EXIT_FAILURE);
+ }
+ break;
+ }
+
+ case 'T':
+
+ options->fs_threshold = (hsize_t)atol( opt_arg );
+ break;
} /* switch */
@@ -484,7 +526,7 @@ void read_info(const char *filename,
if ((fp = fopen(data_file, "r")) == (FILE *)NULL) {
error_msg(progname, "cannot open options file %s\n", filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* cycle until end of file reached */
@@ -521,7 +563,7 @@ void read_info(const char *filename,
if (h5repack_addfilter(comp_info,options)==-1){
error_msg(progname, "could not add compression option\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -551,7 +593,7 @@ void read_info(const char *filename,
if (h5repack_addlayout(comp_info,options)==-1){
error_msg(progname, "could not add chunck option\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -560,7 +602,7 @@ void read_info(const char *filename,
*/
else {
error_msg(progname, "bad file format for %s", filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index 8572837..5b6d5d0 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -231,7 +231,7 @@ int options_add_layout( obj_list_t *obj_list,
if (table->objs[i].chunk.rank>0)
{
error_msg(progname, "chunk information already inserted for <%s>\n",obj_list[j].obj);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* insert the layout info */
else
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index 154d6e5..15dc812 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -122,7 +122,7 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) free(obj_list);
error_msg(progname, "input Error: Invalid compression type in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
@@ -160,7 +160,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c) && l==-1){
if (obj_list) free(obj_list);
error_msg(progname, "compression parameter not digit in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (l==-1)
stype[m]=c;
@@ -180,7 +180,7 @@ obj_list_t* parse_filter(const char *str,
else
{
error_msg(progname, "szip mask must be 'NN' or 'EC' \n");
- exit(1);
+ exit(EXIT_FAILURE);
}
@@ -220,7 +220,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c) && l==-1){
if (obj_list) free(obj_list);
error_msg(progname, "compression parameter is not a digit in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (l==-1)
stype[m]=c;
@@ -240,7 +240,7 @@ obj_list_t* parse_filter(const char *str,
else
{
error_msg(progname, "scale type must be 'IN' or 'DS' \n");
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -264,7 +264,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c)){
if (obj_list) free(obj_list);
error_msg(progname, "compression parameter is not a digit in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
stype[m]=c;
} /* u */
@@ -310,7 +310,7 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, GZIP must have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "missing compression parameter in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -326,7 +326,7 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, SZIP must have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "missing compression parameter in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
@@ -342,7 +342,7 @@ obj_list_t* parse_filter(const char *str,
{ /*shuffle does not have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "extra parameter in SHUF <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -357,7 +357,7 @@ obj_list_t* parse_filter(const char *str,
{ /*shuffle does not have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "extra parameter in FLET <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -372,7 +372,7 @@ obj_list_t* parse_filter(const char *str,
{ /*nbit does not have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "extra parameter in NBIT <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -387,13 +387,13 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, SOFF must have parameter */
if (obj_list) free(obj_list);
error_msg(progname, "missing compression parameter in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else {
if (obj_list) free(obj_list);
error_msg(progname, "invalid filter type in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
} /*i*/
@@ -416,7 +416,7 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) free(obj_list);
error_msg(progname, "invalid compression parameter in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
break;
@@ -431,19 +431,19 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) free(obj_list);
error_msg(progname, "pixels_per_block is not even in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
{
if (obj_list) free(obj_list);
error_msg(progname, "pixels_per_block is too large in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
if ( (strcmp(smask,"NN")!=0) && (strcmp(smask,"EC")!=0) )
{
if (obj_list) free(obj_list);
error_msg(progname, "szip mask must be 'NN' or 'EC' \n");
- exit(1);
+ exit(EXIT_FAILURE);
}
break;
default:
@@ -544,7 +544,7 @@ obj_list_t* parse_layout(const char *str,
{
if (obj_list) free(obj_list);
error_msg(progname, "in parse layout, no characters after : in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* get layout info */
@@ -561,7 +561,7 @@ obj_list_t* parse_layout(const char *str,
pack->layout=H5D_CHUNKED;
else {
error_msg(progname, "in parse layout, not a valid layout in <%s>\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else
@@ -585,7 +585,7 @@ obj_list_t* parse_layout(const char *str,
{
if (obj_list) free(obj_list);
error_msg(progname, "in parse layout, <%s> Chunk dimensions missing\n",str);
- exit(1);
+ exit(EXIT_FAILURE);
}
for ( i=j, c_index=0; i<len; i++)
@@ -600,7 +600,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) free(obj_list);
error_msg(progname, "in parse layout, <%s> Not a valid character in <%s>\n",
sdim,str);
- exit(1);
+ exit(EXIT_FAILURE);
}
if ( c=='x' || i==len-1)
@@ -613,7 +613,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) free(obj_list);
error_msg(progname, "in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
- exit(1);
+ exit(EXIT_FAILURE);
}
c_index++;
}
@@ -631,7 +631,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) free(obj_list);
error_msg(progname, "in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
- exit(1);
+ exit(EXIT_FAILURE);
}
pack->chunk.rank=c_index+1;
}
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index 69df02c..fe94148 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -44,20 +44,25 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil
*-------------------------------------------------------------------------
*/
-int h5repack_verify(const char *fname,
- pack_opt_t *options)
+int
+h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options)
{
- hid_t fid; /* file ID */
- hid_t did; /* dataset ID */
- hid_t pid; /* dataset creation property list ID */
- hid_t sid; /* space ID */
- hid_t tid; /* type ID */
+ hid_t fidin; /* file ID for input file*/
+ hid_t fidout; /* file ID for output file*/
+ hid_t did; /* dataset ID */
+ hid_t pid; /* dataset creation property list ID */
+ hid_t sid; /* space ID */
+ hid_t tid; /* type ID */
unsigned int i;
trav_table_t *travt = NULL;
int ok = 1;
+ hid_t fcpl_in; /* file creation property for input file */
+ hid_t fcpl_out; /* file creation property for output file */
+ H5F_file_space_type_t in_strat, out_strat; /* file space handling strategy for in/output file */
+ hsize_t in_thresh, out_thresh; /* free space section threshold for in/output file */
- /* open the file */
- if((fid = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
+ /* open the output file */
+ if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
return -1;
for(i = 0; i < options->op_tbl->nelems; i++)
@@ -69,7 +74,7 @@ int h5repack_verify(const char *fname,
* open
*-------------------------------------------------------------------------
*/
- if((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0)
goto error;
if((sid = H5Dget_space(did)) < 0)
goto error;
@@ -121,7 +126,7 @@ int h5repack_verify(const char *fname,
trav_table_init(&travt);
/* get the list of objects in the file */
- if(h5trav_gettable(fid, travt) < 0)
+ if(h5trav_gettable(fidout, travt) < 0)
goto error;
for(i = 0; i < travt->nobjs; i++)
@@ -135,7 +140,7 @@ int h5repack_verify(const char *fname,
* open
*-------------------------------------------------------------------------
*/
- if((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
+ if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0)
goto error;
if((sid = H5Dget_space(did)) < 0)
goto error;
@@ -191,26 +196,100 @@ int h5repack_verify(const char *fname,
}
/*-------------------------------------------------------------------------
- * close
+ * Verify that file space strategy and free space threshold
+ * are set as expected
*-------------------------------------------------------------------------
*/
- if (H5Fclose(fid) < 0)
- return -1;
+ /* open the input file */
+ if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 )
+ goto error;
+
+ /* Get file creation property list for input file */
+ if((fcpl_in = H5Fget_create_plist(fidin)) < 0) {
+ error_msg(progname, "failed to retrieve file creation property list\n");
+ goto error;
+ }
+
+ /* Get file space management info for input file */
+ if(H5Pget_file_space(fcpl_in, &in_strat, &in_thresh) < 0) {
+ error_msg(progname, "failed to retrieve file space strategy & threshold\n");
+ goto error;
+ }
+
+ /* Output file is already opened */
+ /* Get file creation property list for output file */
+ if((fcpl_out = H5Fget_create_plist(fidout)) < 0) {
+ error_msg(progname, "failed to retrieve file creation property list\n");
+ goto error;
+ }
+
+ /* Get file space management info for output file */
+ if(H5Pget_file_space(fcpl_out, &out_strat, &out_thresh) < 0) {
+ error_msg(progname, "failed to retrieve file space strategy & threshold\n");
+ goto error;
+ }
+
+ /*
+ * If the strategy option is not set,
+ * file space handling strategy should be the same for both
+ * input & output files.
+ * If the strategy option is set,
+ * the output file's file space handling strategy should be the same
+ * as what is set via the strategy option
+ */
+ if(!options->fs_strategy && out_strat != in_strat) {
+ error_msg(progname, "file space strategy not set as unexpected\n");
+ goto error;
+
+ } else if(options->fs_strategy && out_strat!= options->fs_strategy) {
+ error_msg(progname, "file space strategy not set as unexpectec\n");
+ goto error;
+ }
+
+ /*
+ * If the threshold option is not set,
+ * the free space section threshold should be the same for both
+ * input & output files.
+ * If the threshold option is set,
+ * the output file's free space section threshold should be the same
+ * as what is set via the threshold option.
+ */
+ if(!options->fs_threshold && out_thresh != in_thresh) {
+ error_msg(progname, "free space threshold not set as unexpected\n");
+ goto error;
+
+ } else if(options->fs_threshold && out_thresh != options->fs_threshold) {
+ error_msg(progname, "free space threshold not set as unexpectec\n");
+ goto error;
+ }
+
+ /* Closing */
+ if (H5Pclose(fcpl_in) < 0)
+ goto error;
+ if (H5Pclose(fcpl_out) < 0)
+ goto error;
+ if (H5Fclose(fidin) < 0)
+ goto error;
+ if (H5Fclose(fidout) < 0)
+ goto error;
return ok;
error:
H5E_BEGIN_TRY {
+ H5Pclose(fcpl_in);
+ H5Pclose(fcpl_out);
H5Pclose(pid);
H5Sclose(sid);
H5Dclose(did);
- H5Fclose(fid);
+ H5Fclose(fidin);
+ H5Fclose(fidout);
if (travt)
trav_table_free(travt);
} H5E_END_TRY;
return -1;
-}
+} /* h5repack_verify() */
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 59652e0..adaef43 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -79,7 +79,6 @@
#define FNAME_UB "ublock.bin"
-
const char *H5REPACK_FILENAMES[] = {
"h5repack_big_out",
NULL
@@ -153,6 +152,8 @@ int main (void)
{
pack_opt_t pack_options;
diff_opt_t diff_options;
+ hsize_t fs_size = 0; /* free space section threshold */
+ H5F_file_space_type_t fs_type = H5F_FILE_SPACE_DEFAULT; /* file space handling strategy */
#if defined (H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
@@ -178,19 +179,22 @@ int main (void)
*-------------------------------------------------------------------------
*/
+
/*-------------------------------------------------------------------------
* file with fill values
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+
+ /* fs_type = 0; fs_size = 0 */
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME0OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME0, FNAME0OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME0,FNAME0OUT)<=0)
GOERROR;
@@ -204,13 +208,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME1,FNAME1OUT)<=0)
GOERROR;
@@ -224,13 +228,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (attributes)");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME2OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME2, FNAME2OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME2,FNAME2OUT)<=0)
GOERROR;
@@ -243,13 +247,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME3OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME3, FNAME3OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME3,FNAME3OUT)<=0)
GOERROR;
@@ -263,13 +267,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of allocation early file");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME5OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -293,7 +297,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
GOERROR;
@@ -303,7 +307,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -320,7 +324,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 1) < 0)
+ if (h5repack_init (&pack_options, 0, 1, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
GOERROR;
@@ -330,7 +334,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -348,7 +352,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -358,7 +362,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -386,7 +390,7 @@ int main (void)
*/
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0)
GOERROR;
@@ -396,7 +400,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -418,7 +422,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0)
GOERROR;
@@ -426,7 +430,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -449,7 +453,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
@@ -459,7 +463,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -478,7 +482,8 @@ int main (void)
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SHUF",&pack_options) < 0)
GOERROR;
@@ -488,7 +493,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -507,7 +512,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
@@ -517,7 +522,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -537,7 +542,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("FLET",&pack_options) < 0)
GOERROR;
@@ -547,7 +552,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -565,7 +570,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
@@ -596,7 +601,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -611,7 +616,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -619,7 +624,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -633,7 +638,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 1) < 0)
+ if (h5repack_init (&pack_options, 0, 1, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -641,7 +646,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -653,7 +658,7 @@ int main (void)
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -661,7 +666,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -674,7 +679,7 @@ int main (void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0)
GOERROR;
@@ -682,7 +687,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -695,7 +700,7 @@ int main (void)
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -703,7 +708,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -712,7 +717,7 @@ int main (void)
* do the same test for a file with filters (chunked)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -720,7 +725,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -734,7 +739,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0)
GOERROR;
@@ -742,7 +747,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -755,7 +760,8 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL; fs_size = 2 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addlayout("COMPA",&pack_options) < 0)
GOERROR;
@@ -763,7 +769,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -777,7 +783,7 @@ int main (void)
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0)
GOERROR;
@@ -785,7 +791,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -797,7 +803,7 @@ int main (void)
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0)
GOERROR;
@@ -805,7 +811,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -817,7 +823,7 @@ int main (void)
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0)
GOERROR;
@@ -825,7 +831,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -836,7 +842,7 @@ int main (void)
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0)
GOERROR;
@@ -844,7 +850,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -855,7 +861,7 @@ int main (void)
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0)
GOERROR;
@@ -863,7 +869,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -875,7 +881,7 @@ int main (void)
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0)
GOERROR;
@@ -883,7 +889,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -894,7 +900,7 @@ int main (void)
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0)
GOERROR;
@@ -902,7 +908,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -914,7 +920,7 @@ int main (void)
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0)
GOERROR;
@@ -922,7 +928,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -933,7 +939,7 @@ int main (void)
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0)
GOERROR;
@@ -941,7 +947,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -963,13 +969,14 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_AGGR_VFD; fs_size = 3 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME7,FNAME7OUT)<=0)
GOERROR;
@@ -988,7 +995,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0)
GOERROR;
@@ -996,7 +1003,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1013,13 +1020,13 @@ int main (void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1033,7 +1040,7 @@ int main (void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0)
GOERROR;
@@ -1041,7 +1048,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1056,13 +1063,13 @@ int main (void)
TESTING(" copy of shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1075,7 +1082,7 @@ int main (void)
TESTING(" removing shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
GOERROR;
@@ -1083,7 +1090,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1096,13 +1103,13 @@ int main (void)
TESTING(" copy of fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1115,7 +1122,7 @@ int main (void)
TESTING(" removing fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
GOERROR;
@@ -1123,7 +1130,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1137,13 +1144,13 @@ int main (void)
TESTING(" copy of nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1156,7 +1163,7 @@ int main (void)
TESTING(" removing nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
GOERROR;
@@ -1164,7 +1171,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1178,7 +1185,7 @@ int main (void)
TESTING(" adding nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
GOERROR;
@@ -1186,7 +1193,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1200,13 +1207,13 @@ int main (void)
TESTING(" copy of scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1219,7 +1226,7 @@ int main (void)
TESTING(" removing scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
GOERROR;
@@ -1227,7 +1234,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1241,7 +1248,7 @@ int main (void)
TESTING(" adding scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
GOERROR;
@@ -1249,7 +1256,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1279,7 +1286,8 @@ int main (void)
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0)
GOERROR;
@@ -1287,7 +1295,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1307,7 +1315,7 @@ int main (void)
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1315,7 +1323,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1339,7 +1347,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("NONE",&pack_options) < 0)
GOERROR;
@@ -1347,7 +1355,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1362,13 +1370,14 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" big file");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME14OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME14, FNAME14OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1379,13 +1388,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME15,FNAME15OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME15,FNAME15OUT,NULL,NULL,&diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME15OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME15, FNAME15OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1396,13 +1405,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" file with userblock");
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if(h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
GOERROR;
if(h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME16OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0)
GOERROR;
if(verify_userblock(FNAME16OUT) < 0)
GOERROR;
@@ -1415,7 +1424,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" latest file format options");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
pack_options.latest=1;
pack_options.grp_compact=10;
@@ -1429,7 +1438,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1445,7 +1454,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_DEFLATE) && defined (H5_HAVE_FILTER_SHUFFLE)
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1455,7 +1464,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1474,7 +1483,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for a user block size and user block filename */
@@ -1485,7 +1494,7 @@ int main (void)
GOERROR;
if(h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME8OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
if(verify_userblock(FNAME8OUT) < 0)
GOERROR;
@@ -1507,7 +1516,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for aligment */
@@ -1518,10 +1527,9 @@ int main (void)
GOERROR;
if(h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME8OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
-
/* verify aligment */
{
hsize_t threshold;
@@ -1562,14 +1570,14 @@ int main (void)
*/
TESTING(" file with committed datatypes");
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if(h5repack(FNAME17, FNAME17OUT, &pack_options) < 0)
GOERROR;
if(h5diff(FNAME17, FNAME17OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME17OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME17, FNAME17OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;
diff --git a/tools/h5stat/Makefile.am b/tools/h5stat/Makefile.am
index a14172d..13d9baf 100644
--- a/tools/h5stat/Makefile.am
+++ b/tools/h5stat/Makefile.am
@@ -36,7 +36,7 @@ bin_PROGRAMS=h5stat
bin_SCRIPTS=
# Add h5stat specific linker flags here
-h5stat_LDFLAGS = $(LT_STATIC_EXEC)
+h5stat_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Tell automake to clean h5redeploy script
CLEANFILES=
diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in
index 15b19ed..08de49b 100644
--- a/tools/h5stat/Makefile.in
+++ b/tools/h5stat/Makefile.in
@@ -126,6 +126,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -139,21 +149,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -176,7 +183,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -390,7 +397,7 @@ SCRIPT_DEPEND = h5stat$(EXEEXT)
bin_SCRIPTS =
# Add h5stat specific linker flags here
-h5stat_LDFLAGS = $(LT_STATIC_EXEC)
+h5stat_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Tell automake to clean h5redeploy script
CLEANFILES =
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index 657cf32..b21e5a0 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -26,12 +26,21 @@
#define SIZE_SMALL_GROUPS 10
#define SIZE_SMALL_ATTRS 10
#define SIZE_SMALL_DSETS 10
+#define SIZE_SMALL_SECTS 10
#define H5_NFILTERS_IMPL 8 /* Number of currently implemented filters + one to
accommodate for user-define filters + one
to accomodate datasets whithout any filters */
-
+/* File space management strategies: see H5Fpublic.h for declarations */
+const char *FS_STRATEGY_NAME[] = {
+ "unknown",
+ "H5F_FILE_SPACE_ALL_PERSIST",
+ "H5F_FILE_SPACE_ALL",
+ "H5F_FILE_SPACE_AGGR_VFD",
+ "H5F_FILE_SPACE_VFD",
+ NULL
+};
/* Datatype statistics for datasets */
typedef struct dtype_info_t {
@@ -48,7 +57,7 @@ typedef struct ohdr_info_t {
/* Info to pass to the iteration functions */
typedef struct iter_t {
hid_t fid; /* File ID */
-
+ hsize_t filesize; /* Size of the file */
unsigned long uniq_groups; /* Number of unique groups */
unsigned long uniq_dsets; /* Number of unique datasets */
unsigned long uniq_dtypes; /* Number of unique named datatypes */
@@ -79,6 +88,7 @@ typedef struct iter_t {
unsigned long *dset_dim_bins; /* Pointer to array of bins for dataset dimensions */
ohdr_info_t dset_ohdr_info; /* Object header information for datasets */
hsize_t dset_storage_size; /* Size of raw data for datasets */
+ hsize_t dset_external_storage_size; /* Size of raw data for datasets with external storage */
ohdr_info_t dtype_ohdr_info; /* Object header information for datatypes */
hsize_t groups_btree_storage_size; /* btree size for group */
hsize_t groups_heap_storage_size; /* heap size for group */
@@ -87,8 +97,18 @@ typedef struct iter_t {
hsize_t SM_hdr_storage_size; /* header size for SOHM table (1.8) */
hsize_t SM_index_storage_size; /* index (btree & list) size for SOHM table (1.8) */
hsize_t SM_heap_storage_size; /* fractal heap size for SOHM table (1.8) */
+ hsize_t super_size; /* superblock size */
hsize_t super_ext_size; /* superblock extension size */
- hsize_t datasets_index_storage_size; /* meta size for chunked dataset's indexing type */
+ hsize_t ublk_size; /* user block size (if exists) */
+ H5F_file_space_type_t fs_strategy; /* File space management strategy */
+ hsize_t fs_threshold; /* Free-space section threshold */
+ hsize_t free_space; /* amount of freespace in the file */
+ hsize_t free_hdr; /* size of free space manager metadata in the file */
+ unsigned long num_small_sects[SIZE_SMALL_SECTS]; /* Size of small free-space sections */
+ unsigned sect_nbins; /* Number of bins for free-space section sizes */
+ unsigned long *sect_bins; /* Pointer to array of bins for free-space section sizes */
+ hsize_t datasets_index_storage_size;/* meta size for chunked dataset's indexing type */
+ hsize_t datasets_heap_storage_size; /* heap size for dataset with external storage */
unsigned long nexternal; /* Number of external files for a dataset */
int local; /* Flag to indicate iteration over the object*/
} iter_t;
@@ -96,14 +116,24 @@ typedef struct iter_t {
const char *progname = "h5stat";
int d_status = EXIT_SUCCESS;
+
+/* Enable the printing of everything */
static int display_all = TRUE;
-static int display_file_metadata = FALSE;
-static int display_file = FALSE;
-static int display_group = FALSE;
-static int display_dset = FALSE;
-static int display_dtype_metadata = FALSE;
-static int display_object = FALSE;
-static int display_attr = FALSE;
+
+/* Enable the printing of selected statistics */
+static int display_file = FALSE; /* display file information */
+static int display_group = FALSE; /* display groups information */
+static int display_dset = FALSE; /* display datasets information */
+static int display_dset_dtype_info = FALSE; /* display datasets' datatype information */
+static int display_attr = FALSE; /* display attributes information */
+static int display_free_sections = FALSE; /* display free space information */
+static int display_summary = FALSE; /* display summary of file space information */
+
+static int display_file_metadata = FALSE; /* display file space info for file's metadata */
+static int display_group_metadata = FALSE; /* display file space info for groups' metadata */
+static int display_dset_metadata = FALSE; /* display file space info for datasets' metadata */
+
+static int display_object = FALSE; /* not implemented yet */
/* a structure for handling the order command-line parameters come in */
struct handler_t {
@@ -111,10 +141,11 @@ struct handler_t {
};
-static const char *s_opts ="ADdFfhGgTO:V";
+static const char *s_opts ="aDdFfhGgsSTO:v";
static struct long_options l_opts[] = {
{"help", no_arg, 'h'},
{"hel", no_arg, 'h'},
+ {"he", no_arg, 'h'},
{"file", no_arg, 'f'},
{"fil", no_arg, 'f'},
{"fi", no_arg, 'f'},
@@ -130,55 +161,66 @@ static struct long_options l_opts[] = {
{"grou", no_arg, 'g'},
{"gro", no_arg, 'g'},
{"gr", no_arg, 'g'},
- {"groupmetadata", no_arg, 'G'},
- {"groupmetadat", no_arg, 'G'},
- {"groupmetada", no_arg, 'G'},
- {"groupmetad", no_arg, 'G'},
- {"groupmeta", no_arg, 'G'},
- {"groupmet", no_arg, 'G'},
- {"groupme", no_arg, 'G'},
- {"groupm", no_arg, 'G'},
+ {"GROUPmetadata", no_arg, 'G'},
+ {"GROUPmetadat", no_arg, 'G'},
+ {"GROUPmetada", no_arg, 'G'},
+ {"GROUPmetad", no_arg, 'G'},
+ {"GROUPmeta", no_arg, 'G'},
+ {"GROUPmet", no_arg, 'G'},
+ {"GROUPme", no_arg, 'G'},
+ {"GROUPm", no_arg, 'G'},
{"dset", no_arg, 'd'},
{"dse", no_arg, 'd'},
{"ds", no_arg, 'd'},
- {"d", no_arg, 'd'},
- {"dsetmetadata", no_arg, 'D'},
- {"dsetmetadat", no_arg, 'D'},
- {"dsetmetada", no_arg, 'D'},
- {"dsetmetad", no_arg, 'D'},
- {"dsetmeta", no_arg, 'D'},
- {"dsetmet", no_arg, 'D'},
- {"dsetme", no_arg, 'D'},
- {"dsetm", no_arg, 'D'},
- {"dtypemetadata", no_arg, 'T'},
- {"dtypemetadat", no_arg, 'T'},
- {"dtypemetada", no_arg, 'T'},
- {"dtypemetad", no_arg, 'T'},
- {"dtypemeta", no_arg, 'T'},
- {"dtypemet", no_arg, 'T'},
- {"dtypeme", no_arg, 'T'},
- {"dtypem", no_arg, 'T'},
- {"dtype", no_arg, 'T'},
+ {"DSETmetadata", no_arg, 'D'},
+ {"DSETmetadat", no_arg, 'D'},
+ {"DSETmetada", no_arg, 'D'},
+ {"DSETmetad", no_arg, 'D'},
+ {"DSETmeta", no_arg, 'D'},
+ {"DSETmet", no_arg, 'D'},
+ {"DSETme", no_arg, 'D'},
+ {"DSETm", no_arg, 'D'},
+ {"DSETtypeinfo", no_arg, 'T'},
+ {"DSETtypeinf", no_arg, 'T'},
+ {"DSETtypein", no_arg, 'T'},
+ {"DSETtypei", no_arg, 'T'},
+ {"DSETtype", no_arg, 'T'},
+ {"DSETtyp", no_arg, 'T'},
+ {"DSETty", no_arg, 'T'},
+ {"DSETt", no_arg, 'T'},
{ "object", require_arg, 'O' },
{ "objec", require_arg, 'O' },
{ "obje", require_arg, 'O' },
{ "obj", require_arg, 'O' },
{ "ob", require_arg, 'O' },
- { "version", no_arg, 'V' },
- { "versio", no_arg, 'V' },
- { "versi", no_arg, 'V' },
- { "vers", no_arg, 'V' },
- { "ver", no_arg, 'V' },
- { "ve", no_arg, 'V' },
- { "attribute", no_arg, 'A' },
- { "attribut", no_arg, 'A' },
- { "attribu", no_arg, 'A' },
- { "attrib", no_arg, 'A' },
- { "attri", no_arg, 'A' },
- { "attr", no_arg, 'A' },
- { "att", no_arg, 'A' },
- { "at", no_arg, 'A' },
- { "a", no_arg, 'A' },
+ { "version", no_arg, 'v' },
+ { "versio", no_arg, 'v' },
+ { "versi", no_arg, 'v' },
+ { "vers", no_arg, 'v' },
+ { "ver", no_arg, 'v' },
+ { "ve", no_arg, 'v' },
+ { "attribute", no_arg, 'a' },
+ { "attribut", no_arg, 'a' },
+ { "attribu", no_arg, 'a' },
+ { "attrib", no_arg, 'a' },
+ { "attri", no_arg, 'a' },
+ { "attr", no_arg, 'a' },
+ { "att", no_arg, 'a' },
+ { "at", no_arg, 'a' },
+ { "freespace", no_arg, 's' },
+ { "freespac", no_arg, 's' },
+ { "freespa", no_arg, 's' },
+ { "freesp", no_arg, 's' },
+ { "frees", no_arg, 's' },
+ { "free", no_arg, 's' },
+ { "fre", no_arg, 's' },
+ { "fr", no_arg, 's' },
+ { "summary", no_arg, 'S' },
+ { "summar", no_arg, 'S' },
+ { "summa", no_arg, 'S' },
+ { "summ", no_arg, 'S' },
+ { "sum", no_arg, 'S' },
+ { "su", no_arg, 'S' },
{ NULL, 0, '\0' }
};
@@ -197,16 +239,17 @@ static void usage(const char *prog)
fprintf(stdout, "\n");
fprintf(stdout, " OPTIONS\n");
fprintf(stdout, " -h, --help Print a usage message and exit\n");
- fprintf(stdout, " -V, --version Print version number and exit\n");
+ fprintf(stdout, " -v, --version Print version number and exit\n");
fprintf(stdout, " -f, --file Print file information\n");
- fprintf(stdout, " -F, --filemetadata Print file metadata\n");
+ fprintf(stdout, " -F, --FILEmetadata Print file space information for file's metadata\n");
fprintf(stdout, " -g, --group Print group information\n");
- fprintf(stdout, " -G, --groupmetadata Print group metadata\n");
+ fprintf(stdout, " -G, --GROUPmetadata Print file space information for groups' metadata\n");
fprintf(stdout, " -d, --dset Print dataset information\n");
- fprintf(stdout, " -D, --dsetmetadata Print dataset metadata\n");
- fprintf(stdout, " -T, --dtypemetadata Print datatype metadata\n");
- fprintf(stdout, " -A, --attribute Print attribute information\n");
- fprintf(stdout, "\n");
+ fprintf(stdout, " -D, --DSETmetadata Print file space information for datasets' metadata\n");
+ fprintf(stdout, " -T, --DSETtypeinfo Print datasets' datatype information\n");
+ fprintf(stdout, " -a, --attribute Print attribute information\n");
+ fprintf(stdout, " -s, --freespace Print free space information\n");
+ fprintf(stdout, " -S, --summary Print summary of file space information\n");
}
@@ -381,18 +424,6 @@ group_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
* Programmer: Quincey Koziol
* Tuesday, August 16, 2005
*
- * Modifications: Refactored code from the walk_function
- * EIP, Wednesday, August 16, 2006
- *
- * Vailin Choi 12 July 2007
- * 1. Gathered storage info for btree and heap
- * (chunked datasets and attributes)
- * 2. Gathered info for attributes
- *
- * Vailin Choi 14 July 2007
- * Cast "dims" and "num_attrs" to size_t
- * Due to the -Mbounds problem for the pgi-32bit compiler on indexing
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -427,6 +458,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Update dataset metadata info */
iter->datasets_index_storage_size += oi->meta_size.obj.index_size;
+ iter->datasets_heap_storage_size += oi->meta_size.obj.heap_size;
/* Update attribute metadata info */
ret = attribute_stats(iter, oi);
@@ -434,7 +466,32 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
/* Get storage info */
storage = H5Dget_storage_size(did);
- iter->dset_storage_size += storage;
+
+ /* Gather layout statistics */
+ dcpl = H5Dget_create_plist(did);
+ assert(dcpl > 0);
+
+ lout = H5Pget_layout(dcpl);
+ assert(lout >= 0);
+
+ /* Object header's total size for H5D_COMPACT layout includes raw data size */
+ /* "storage" also includes H5D_COMPACT raw data size */
+ if(lout == H5D_COMPACT)
+ iter->dset_ohdr_info.total_size -= storage;
+
+ /* Track the layout type for dataset */
+ (iter->dset_layouts[lout])++;
+
+ /* Get the number of external files for the dataset */
+ num_ext = H5Pget_external_count(dcpl);
+ assert (num_ext >= 0);
+
+ /* Accumulate raw data size accordingly */
+ if(num_ext) {
+ iter->nexternal += (unsigned long)num_ext;
+ iter->dset_external_storage_size += (unsigned long)storage;
+ } else
+ iter->dset_storage_size += storage;
/* Gather dataspace statistics */
sid = H5Dget_space(did);
@@ -517,22 +574,6 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
ret = H5Tclose(tid);
assert(ret >= 0);
- /* Gather layout statistics */
- dcpl = H5Dget_create_plist(did);
- assert(dcpl > 0);
-
- lout = H5Pget_layout(dcpl);
- assert(lout >= 0);
-
- /* Track the layout type for dataset */
- (iter->dset_layouts[lout])++;
-
- num_ext = H5Pget_external_count(dcpl);
- assert (num_ext >= 0);
-
- if(num_ext)
- iter->nexternal += (unsigned long)num_ext;
-
/* Track different filters */
if((nfltr = H5Pget_nfilters(dcpl)) >= 0) {
if(nfltr == 0)
@@ -587,8 +628,7 @@ datatype_stats(iter_t *iter, const H5O_info_t *oi)
* Purpose: Gather statistics about an object
*
* Return: Success: 0
- *
- * Failure: -1
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Tuesday, November 6, 2007
@@ -666,6 +706,66 @@ lnk_stats(const char UNUSED *path, const H5L_info_t *li, void *_iter)
return 0;
} /* end lnk_stats() */
+/*-------------------------------------------------------------------------
+ * Function: freespace_stats
+ *
+ * Purpose: Gather statistics for free space sections in the file
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Vailin Choi; July 7th, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+freespace_stats(hid_t fid, iter_t *iter)
+{
+ H5F_sect_info_t *sect_info = NULL; /* Free space sections */
+ ssize_t nsects; /* Number of free space sections */
+ size_t u; /* Local index variable */
+
+ /* Query section information */
+ if((nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, 0, NULL)) < 0)
+ return(FAIL);
+ else if(nsects) {
+ if(NULL == (sect_info = (H5F_sect_info_t *)calloc((size_t)nsects, sizeof(H5F_sect_info_t))))
+ return(FAIL);
+ nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info);
+ assert(nsects);
+ } /* end else-if */
+
+ for(u = 0; u < (size_t)nsects; u++) {
+ unsigned bin; /* "bin" the number of objects falls in */
+
+ if(sect_info[u].size < SIZE_SMALL_SECTS)
+ (iter->num_small_sects[(size_t)sect_info[u].size])++;
+
+ /* Add section size to proper bin */
+ bin = ceil_log10((unsigned long)sect_info[u].size);
+ if(bin >= iter->sect_nbins) {
+ /* Allocate more storage for section info */
+ iter->sect_bins = (unsigned long *)realloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long));
+ assert(iter->sect_bins);
+
+ /* Initialize counts for intermediate bins */
+ while(iter->sect_nbins < bin)
+ iter->sect_bins[iter->sect_nbins++] = 0;
+ iter->sect_nbins++;
+
+ /* Initialize count for this bin */
+ iter->sect_bins[bin] = 1;
+ } /* end if */
+ else
+ (iter->sect_bins[bin])++;
+ } /* end for */
+
+ if(sect_info)
+ free(sect_info);
+
+ return 0;
+} /* end freespace_stats() */
+
/*-------------------------------------------------------------------------
* Function: parse_command_line
@@ -679,6 +779,11 @@ lnk_stats(const char UNUSED *path, const H5L_info_t *li, void *_iter)
* Programmer: Elena Pourmal
* Saturday, August 12, 2006
*
+ * Modifications:
+ * Vailin Choi; October 2009
+ * Turn on display_group_metadata, display_dset_metadata
+ * Add 'S' & 's' for printing free space info (previous checkin)
+ *
*-------------------------------------------------------------------------
*/
static struct handler_t *
@@ -693,11 +798,16 @@ parse_command_line(int argc, const char *argv[])
/* parse command line options */
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
- case 'A':
- display_all = FALSE;
- display_attr = TRUE;
+ case 'h':
+ usage(progname);
+ leave(EXIT_SUCCESS);
+
+ case 'v':
+ print_version(progname);
+ leave(EXIT_SUCCESS);
break;
+
case 'F':
display_all = FALSE;
display_file_metadata = TRUE;
@@ -710,6 +820,7 @@ parse_command_line(int argc, const char *argv[])
case 'G':
display_all = FALSE;
+ display_group_metadata = TRUE;
break;
case 'g':
@@ -717,13 +828,9 @@ parse_command_line(int argc, const char *argv[])
display_group = TRUE;
break;
- case 'T':
- display_all = FALSE;
- display_dtype_metadata = TRUE;
- break;
-
case 'D':
display_all = FALSE;
+ display_dset_metadata = TRUE;
break;
case 'd':
@@ -731,16 +838,28 @@ parse_command_line(int argc, const char *argv[])
display_dset = TRUE;
break;
- case 'h':
- usage(progname);
- leave(EXIT_SUCCESS);
+ case 'T':
+ display_all = FALSE;
+ display_dset_dtype_info = TRUE;
+ break;
- case 'V':
- print_version(progname);
- leave(EXIT_SUCCESS);
+ case 'a':
+ display_all = FALSE;
+ display_attr = TRUE;
+ break;
+
+ case 's':
+ display_all = FALSE;
+ display_free_sections = TRUE;
+ break;
+
+ case 'S':
+ display_all = FALSE;
+ display_summary = TRUE;
break;
case 'O':
+ display_all = FALSE;
display_object = TRUE;
for(i = 0; i < argc; i++)
if(!hand[i].obj) {
@@ -815,62 +934,14 @@ print_file_info(const iter_t *iter)
printf("File information\n");
printf("\t# of unique groups: %lu\n", iter->uniq_groups);
printf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
- printf("\t# of unique named dataypes: %lu\n", iter->uniq_dtypes);
+ printf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
printf("\t# of unique links: %lu\n", iter->uniq_links);
printf("\t# of unique other: %lu\n", iter->uniq_others);
printf("\tMax. # of links to object: %lu\n", iter->max_links);
HDfprintf(stdout, "\tMax. # of objects in group: %Hu\n", iter->max_fanout);
return 0;
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: print_file_metadata
- *
- * Purpose: Prints metadata information about file
- *
- * Return: Success: 0
- *
- * Failure: Never fails
- *
- * Programmer: Elena Pourmal
- * Saturday, August 12, 2006
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-print_file_metadata(const iter_t *iter)
-{
- printf("Object header size: (total/unused)\n");
- HDfprintf(stdout, "\tGroups: %Hu/%Hu\n", iter->group_ohdr_info.total_size,
- iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\tDatasets: %Hu/%Hu\n", iter->dset_ohdr_info.total_size,
- iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\tDatatypes: %Hu/%Hu\n", iter->dtype_ohdr_info.total_size,
- iter->dtype_ohdr_info.free_size);
-
- printf("Storage information:\n");
- HDfprintf(stdout, "\tGroups:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->groups_heap_storage_size);
-
- HDfprintf(stdout, "\tAttributes:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->attrs_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->attrs_heap_storage_size);
-
- HDfprintf(stdout, "\tChunked datasets:\n");
- HDfprintf(stdout, "\t\tIndex: %Hu\n", iter->datasets_index_storage_size);
-
- HDfprintf(stdout, "\tShared Messages:\n");
- HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->SM_hdr_storage_size);
- HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->SM_index_storage_size);
- HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->SM_heap_storage_size);
-
- HDfprintf(stdout, "\tSuperblock extension: %Hu\n", iter->super_ext_size);
-
- return 0;
-}
+} /* print_file_info() */
/*-------------------------------------------------------------------------
@@ -927,7 +998,7 @@ print_group_info(const iter_t *iter)
printf("\tTotal # of groups: %lu\n", total);
return 0;
-}
+} /* print_group_info() */
/*-------------------------------------------------------------------------
@@ -978,7 +1049,7 @@ print_attr_info(const iter_t *iter)
printf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
return 0;
-}
+} /* print_attr_info() */
/*-------------------------------------------------------------------------
@@ -1002,7 +1073,6 @@ print_dataset_info(const iter_t *iter)
{
unsigned long power; /* Temporary "power" for bins */
unsigned long total; /* Total count for various statistics */
- size_t dtype_size; /* Size of encoded datatype */
unsigned u; /* Local index variable */
if(iter->uniq_dsets > 0) {
@@ -1048,6 +1118,7 @@ print_dataset_info(const iter_t *iter)
printf("Dataset storage information:\n");
HDfprintf(stdout, "\tTotal raw data size: %Hu\n", iter->dset_storage_size);
+ HDfprintf(stdout, "\tTotal external raw data size: %Hu\n", iter->dset_external_storage_size);
printf("Dataset layout information:\n");
for(u = 0; u < H5D_NLAYOUTS; u++)
@@ -1065,26 +1136,286 @@ print_dataset_info(const iter_t *iter)
printf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
printf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
printf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL-1]);
-
- if(display_dtype_metadata) {
- printf("Dataset datatype information:\n");
- printf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
- total = 0;
- for(u = 0; u < iter->dset_ntypes; u++) {
- H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size);
- printf("\tDataset datatype #%u:\n", u);
- printf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count, iter->dset_type_info[u].named);
- printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
- (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
- H5Tclose(iter->dset_type_info[u].tid);
- total += iter->dset_type_info[u].count;
- } /* end for */
- printf("\tTotal dataset datatype count: %lu\n", total);
- }
} /* end if */
return 0;
-}
+} /* print_dataset_info() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_dset_dtype_info
+ *
+ * Purpose: Prints datasets' datatype information
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer:
+ *
+ * Modifications:
+ * Vailin Choi; October 2009
+ * Moved from print_dataset_info()
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_dset_dtype_info(const iter_t *iter)
+{
+ unsigned long total; /* Total count for various statistics */
+ size_t dtype_size; /* Size of encoded datatype */
+ unsigned u; /* Local index variable */
+
+ if(iter->dset_ntypes) {
+ printf("Dataset datatype information:\n");
+ printf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
+ total = 0;
+ for(u = 0; u < iter->dset_ntypes; u++) {
+ H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size);
+ printf("\tDataset datatype #%u:\n", u);
+ printf("\t\tCount (total/named) = (%lu/%lu)\n",
+ iter->dset_type_info[u].count, iter->dset_type_info[u].named);
+ printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
+ (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
+ H5Tclose(iter->dset_type_info[u].tid);
+ total += iter->dset_type_info[u].count;
+ } /* end for */
+ printf("\tTotal dataset datatype count: %lu\n", total);
+ }
+
+ return 0;
+} /* print_dset_dtype_info() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_freespace_info
+ *
+ * Purpose: Prints information about free space in the file
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer: Vailin Choi; July 7th, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_freespace_info(const iter_t *iter)
+{
+ unsigned long power; /* Temporary "power" for bins */
+ unsigned long total; /* Total count for various statistics */
+ unsigned u; /* Local index variable */
+
+ HDfprintf(stdout, "Free-space section threshold: %Hu bytes\n", iter->fs_threshold);
+ printf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
+ total = 0;
+ for(u = 0; u < SIZE_SMALL_SECTS; u++) {
+ if(iter->num_small_sects[u] > 0) {
+ printf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
+ total += iter->num_small_sects[u];
+ } /* end if */
+ } /* end for */
+ printf("\tTotal # of small size sections: %lu\n", total);
+
+ printf("Free-space section bins:\n");
+
+ total = 0;
+ power = 1;
+ for(u = 1; u < iter->sect_nbins; u++) {
+ if(iter->sect_bins[u] > 0) {
+ printf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1,
+ iter->sect_bins[u]);
+ total += iter->sect_bins[u];
+ } /* end if */
+ power *= 10;
+ } /* end for */
+ printf("\tTotal # of sections: %lu\n", total);
+
+ return 0;
+} /* print_freespace_info() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_storage_summary
+ *
+ * Purpose: Prints file space information for the file
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer: Vailin Choi; August 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_storage_summary(const iter_t *iter)
+{
+ hsize_t total_meta = 0;
+ hsize_t unaccount = 0;
+ float percent = 0.0;
+
+ HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
+ printf("Summary of file space information:\n");
+ total_meta =
+ iter->super_size + iter->super_ext_size + iter->ublk_size +
+ iter->group_ohdr_info.total_size +
+ iter->dset_ohdr_info.total_size +
+ iter->dtype_ohdr_info.total_size +
+ iter->groups_btree_storage_size +
+ iter->groups_heap_storage_size +
+ iter->attrs_btree_storage_size +
+ iter->attrs_heap_storage_size +
+ iter->datasets_index_storage_size +
+ iter->datasets_heap_storage_size +
+ iter->SM_hdr_storage_size +
+ iter->SM_index_storage_size +
+ iter->SM_heap_storage_size +
+ iter->free_hdr;
+
+ HDfprintf(stdout, " File metadata: %Hu bytes\n", total_meta);
+ HDfprintf(stdout, " Raw data: %Hu bytes\n", iter->dset_storage_size);
+
+ percent = ((float)iter->free_space / (float)iter->filesize) * 100;
+ HDfprintf(stdout, " Amount/Percent of tracked free space: %Hu bytes/%3.1f%\n",
+ iter->free_space, percent);
+
+ if(iter->filesize < (total_meta+iter->dset_storage_size+iter->free_space)) {
+ unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize;
+ HDfprintf(stdout, " ??? File has %Hu more bytes accounted for than its size! ???\n", unaccount);
+ }
+ else {
+ unaccount = iter->filesize - (total_meta + iter->dset_storage_size + iter->free_space);
+ HDfprintf(stdout, " Unaccounted space: %Hu bytes\n", unaccount);
+ }
+
+ HDfprintf(stdout, "Total space: %Hu bytes\n",
+ total_meta+iter->dset_storage_size+iter->free_space+unaccount);
+
+ if(iter->nexternal)
+ HDfprintf(stdout, "External raw data: %Hu bytes\n", iter->dset_external_storage_size);
+
+
+ return 0;
+} /* print_storage_summary() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_file_metadata
+ *
+ * Purpose: Prints file space information for file's metadata
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer: Elena Pourmal
+ * Saturday, August 12, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_file_metadata(const iter_t *iter)
+{
+ HDfprintf(stdout, "File space information for file metadata (in bytes):\n");
+ HDfprintf(stdout, "\tSuperblock: %Hu\n", iter->super_size);
+ HDfprintf(stdout, "\tSuperblock extension: %Hu\n", iter->super_ext_size);
+ HDfprintf(stdout, "\tUser block: %Hu\n", iter->ublk_size);
+
+ HDfprintf(stdout, "\tObject headers: (total/unused)\n");
+ HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n",
+ iter->group_ohdr_info.total_size,
+ iter->group_ohdr_info.free_size);
+ HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n",
+ iter->dset_ohdr_info.total_size,
+ iter->dset_ohdr_info.free_size);
+ HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n",
+ iter->dtype_ohdr_info.total_size,
+ iter->dtype_ohdr_info.free_size);
+
+ HDfprintf(stdout, "\tGroups:\n");
+ HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->groups_heap_storage_size);
+
+ HDfprintf(stdout, "\tAttributes:\n");
+ HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->attrs_btree_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->attrs_heap_storage_size);
+
+ HDfprintf(stdout, "\tChunked datasets:\n");
+ HDfprintf(stdout, "\t\tIndex: %Hu\n", iter->datasets_index_storage_size);
+
+ HDfprintf(stdout, "\tDatasets:\n");
+ HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->datasets_heap_storage_size);
+
+ HDfprintf(stdout, "\tShared Messages:\n");
+ HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->SM_hdr_storage_size);
+ HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->SM_index_storage_size);
+ HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->SM_heap_storage_size);
+
+ HDfprintf(stdout, "\tFree-space managers:\n");
+ HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->free_hdr);
+ HDfprintf(stdout, "\t\tAmount of free space: %Hu\n", iter->free_space);
+
+ return 0;
+} /* print_file_metadata() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_group_metadata
+ *
+ * Purpose: Prints file space information for groups' metadata
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer: Vailin Choi; October 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_group_metadata(const iter_t *iter)
+{
+ printf("File space information for groups' metadata (in bytes):\n");
+
+ HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
+ iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
+
+ HDfprintf(stdout, "\tB-tree/List: %Hu\n", iter->groups_btree_storage_size);
+ HDfprintf(stdout, "\tHeap: %Hu\n", iter->groups_heap_storage_size);
+
+ return 0;
+} /* print_group_metadata() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_dataset_metadata
+ *
+ * Purpose: Prints file space information for datasets' metadata
+ *
+ * Return: Success: 0
+ *
+ * Failure: Never fails
+ *
+ * Programmer: Vailin Choi; October 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+print_dset_metadata(const iter_t *iter)
+{
+ printf("File space information for datasets' metadata (in bytes):\n");
+
+ HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n",
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+
+ HDfprintf(stdout, "\tIndex for Chunked datasets: %Hu\n",
+ iter->datasets_index_storage_size);
+ HDfprintf(stdout, "\tHeap: %Hu\n", iter->datasets_heap_storage_size);
+
+ return 0;
+} /* print_dset_metadata() */
/*-------------------------------------------------------------------------
@@ -1099,6 +1430,11 @@ print_dataset_info(const iter_t *iter)
* Programmer: Elena Pourmal
* Saturday, August 12, 2006
*
+ * Modifications:
+ * Vailin Choi; October 2009
+ * Activate "display_group_metadata", "dislay_dset_metadata" and
+ * "display_dset_dtype_info".
+ *
*-------------------------------------------------------------------------
*/
static void
@@ -1106,18 +1442,31 @@ print_file_statistics(const iter_t *iter)
{
if(display_all) {
display_file = TRUE;
- display_file_metadata = TRUE;
display_group = TRUE;
display_dset = TRUE;
- display_dtype_metadata = TRUE;
+ display_dset_dtype_info = TRUE;
display_attr = TRUE;
+ display_free_sections = TRUE;
+ display_summary = TRUE;
+
+ display_file_metadata = TRUE;
+ display_group_metadata = TRUE;
+ display_dset_metadata = TRUE;
}
- if(display_file) print_file_info(iter);
- if(display_file_metadata) print_file_metadata(iter);
- if(display_group) print_group_info(iter);
- if(display_dset) print_dataset_info(iter);
- if(display_attr) print_attr_info(iter);
+ if(display_file) print_file_info(iter);
+ if(display_file_metadata) print_file_metadata(iter);
+
+ if(display_group) print_group_info(iter);
+ if(!display_all && display_group_metadata) print_group_metadata(iter);
+
+ if(display_dset) print_dataset_info(iter);
+ if(display_dset_dtype_info) print_dset_dtype_info(iter);
+ if(!display_all && display_dset_metadata) print_dset_metadata(iter);
+
+ if(display_attr) print_attr_info(iter);
+ if(display_free_sections) print_freespace_info(iter);
+ if(display_summary) print_storage_summary(iter);
}
@@ -1176,8 +1525,9 @@ main(int argc, const char *argv[])
iter_t iter;
const char *fname = NULL;
hid_t fid;
+ hid_t fcpl;
struct handler_t *hand;
- H5F_info_t finfo;
+ H5F_info2_t finfo;
/* Disable error reporting */
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
@@ -1203,16 +1553,37 @@ main(int argc, const char *argv[])
/* Initialize iter structure */
iter_init(&iter, fid);
- /* Get storge info for SOHM's btree/list/heap and superblock extension */
- if(H5Fget_info(fid, &finfo) < 0)
- warn_msg(progname, "Unable to retrieve SOHM info\n");
+ if(H5Fget_filesize(fid, &iter.filesize) < 0)
+ warn_msg(progname, "Unable to retrieve file size\n");
+ assert(iter.filesize != 0);
+
+ /* Get storge info for file-level structures */
+ if(H5Fget_info2(fid, &finfo) < 0)
+ warn_msg(progname, "Unable to retrieve file info\n");
else {
- iter.super_ext_size = finfo.super_ext_size;
+ iter.super_size = finfo.super.super_size;
+ iter.super_ext_size = finfo.super.super_ext_size;
iter.SM_hdr_storage_size = finfo.sohm.hdr_size;
iter.SM_index_storage_size = finfo.sohm.msgs_info.index_size;
iter.SM_heap_storage_size = finfo.sohm.msgs_info.heap_size;
+ iter.free_space = finfo.free.tot_space;
+ iter.free_hdr = finfo.free.meta_size;
} /* end else */
+ if((fcpl = H5Fget_create_plist(fid)) < 0)
+ warn_msg(progname, "Unable to retrieve file creation property\n");
+
+ if(H5Pget_userblock(fcpl, &iter.ublk_size) < 0)
+ warn_msg(progname, "Unable to retrieve userblock size\n");
+
+ if(H5Pget_file_space(fcpl, &iter.fs_strategy, &iter.fs_threshold) < 0)
+ warn_msg(progname, "Unable to retrieve file space information\n");
+ assert(iter.fs_strategy != 0 && iter.fs_strategy < H5F_FILE_SPACE_NTYPES);
+
+ /* get information for free-space sections */
+ if(freespace_stats(fid, &iter) < 0)
+ warn_msg(progname, "Unable to retrieve freespace info\n");
+
/* Walk the objects or all file */
if(display_object) {
unsigned u;
diff --git a/tools/h5stat/h5stat_gentest.c b/tools/h5stat/h5stat_gentest.c
index 2a7f210..cf17195 100644
--- a/tools/h5stat/h5stat_gentest.c
+++ b/tools/h5stat/h5stat_gentest.c
@@ -45,18 +45,30 @@
*/
static void gen_file(void)
{
- int ret, i;
- hid_t fapl, gid;
- hid_t file, type_id, space_id, attr_id, dset_id;
- char name[30];
- char attrname[30];
+ hid_t fcpl; /* File creation property */
+ hid_t fapl; /* File access property */
+ hid_t file; /* File id */
+ hid_t gid; /* Group id */
+ hid_t type_id; /* Datatype id */
+ hid_t space_id; /* Dataspace id */
+ hid_t attr_id; /* Attribute id */
+ hid_t dset_id; /* Dataset id */
+ char name[30]; /* Group name */
+ char attrname[30]; /* Attribute name */
+ int ret; /* Return value */
+ int i; /* Local index variable */
fapl = H5Pcreate(H5P_FILE_ACCESS);
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
assert(ret >= 0);
+ /* Set file space handling strategy */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ ret = H5Pset_file_space(fcpl, H5F_FILE_SPACE_ALL_PERSIST, (hsize_t)0);
+ assert(ret >= 0);
+
/* Create dataset */
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ file = H5Fcreate(FILE, H5F_ACC_TRUNC, fcpl, fapl);
for(i = 1; i <= NUM_GRPS; i++) {
sprintf(name, "%s%d", GROUP_NAME,i);
gid = H5Gcreate2(file, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/h5stat/testfiles/h5stat_filters-F.ddl b/tools/h5stat/testfiles/h5stat_filters-F.ddl
index 8f65c6d..fba875a 100644
--- a/tools/h5stat/testfiles/h5stat_filters-F.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-F.ddl
@@ -2,11 +2,14 @@
Expected output for 'h5stat -F h5stat_filters.h5'
#############################
Filename: h5stat_filters.h5
-Object header size: (total/unused)
- Groups: 48/8
- Datasets: 4936/1344
- Datatypes: 80/0
-Storage information:
+File space information for file metadata (in bytes):
+ Superblock: 96
+ Superblock extension: 0
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 48/8
+ Datasets(exclude compact data): 4136/1344
+ Datatypes: 80/0
Groups:
B-tree/List: 1200
Heap: 288
@@ -15,8 +18,12 @@ Storage information:
Heap: 0
Chunked datasets:
Index: 31392
+ Datasets:
+ Heap: 72
Shared Messages:
Header: 0
B-tree/List: 0
Heap: 0
- Superblock extension: 0
+ Free-space managers:
+ Header: 0
+ Amount of free space: 0
diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl
index 42d0de3..3cc9071 100644
--- a/tools/h5stat/testfiles/h5stat_filters-d.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl
@@ -15,7 +15,8 @@ Dataset dimension information:
# of datasets of size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
- Total raw data size: 9059
+ Total raw data size: 8659
+ Total external raw data size: 400
Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
index 2edcf7e..ae9121d 100644
--- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
@@ -15,7 +15,8 @@ Dataset dimension information:
# of datasets of size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
- Total raw data size: 9059
+ Total raw data size: 8659
+ Total external raw data size: 400
Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
diff --git a/tools/h5stat/testfiles/h5stat_filters-file.ddl b/tools/h5stat/testfiles/h5stat_filters-file.ddl
index 7b8f47f..eddc898 100644
--- a/tools/h5stat/testfiles/h5stat_filters-file.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-file.ddl
@@ -5,7 +5,7 @@ Filename: h5stat_filters.h5
File information
# of unique groups: 1
# of unique datasets: 15
- # of unique named dataypes: 1
+ # of unique named datatypes: 1
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl
index d070dba..ddafd81 100644
--- a/tools/h5stat/testfiles/h5stat_filters.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters.ddl
@@ -5,16 +5,19 @@ Filename: h5stat_filters.h5
File information
# of unique groups: 1
# of unique datasets: 15
- # of unique named dataypes: 1
+ # of unique named datatypes: 1
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
Max. # of objects in group: 16
-Object header size: (total/unused)
- Groups: 48/8
- Datasets: 4936/1344
- Datatypes: 80/0
-Storage information:
+File space information for file metadata (in bytes):
+ Superblock: 96
+ Superblock extension: 0
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 48/8
+ Datasets(exclude compact data): 4136/1344
+ Datatypes: 80/0
Groups:
B-tree/List: 1200
Heap: 288
@@ -23,11 +26,15 @@ Storage information:
Heap: 0
Chunked datasets:
Index: 31392
+ Datasets:
+ Heap: 72
Shared Messages:
Header: 0
B-tree/List: 0
Heap: 0
- Superblock extension: 0
+ Free-space managers:
+ Header: 0
+ Amount of free space: 0
Small groups:
Total # of small groups: 0
Group bins:
@@ -46,7 +53,8 @@ Dataset dimension information:
# of datasets of size 100 - 999: 1
Total # of datasets: 1
Dataset storage information:
- Total raw data size: 9059
+ Total raw data size: 8659
+ Total external raw data size: 400
Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
@@ -76,3 +84,16 @@ Small # of attributes:
Attribute bins:
Total # of objects with attributes: 0
Max. # of attributes to objects: 0
+Free-space section threshold: 1 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ Total # of sections: 0
+File space management strategy: H5F_FILE_SPACE_ALL
+Summary of file space information:
+ File metadata: 37312 bytes
+ Raw data: 8659 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 301 bytes
+Total space: 46272 bytes
+External raw data: 400 bytes
diff --git a/tools/h5stat/testfiles/h5stat_help1.ddl b/tools/h5stat/testfiles/h5stat_help1.ddl
index 0a86b4c..e70fef1 100644
--- a/tools/h5stat/testfiles/h5stat_help1.ddl
+++ b/tools/h5stat/testfiles/h5stat_help1.ddl
@@ -5,13 +5,14 @@ Usage: h5stat [OPTIONS] file
OPTIONS
-h, --help Print a usage message and exit
- -V, --version Print version number and exit
+ -v, --version Print version number and exit
-f, --file Print file information
- -F, --filemetadata Print file metadata
+ -F, --FILEmetadata Print file space information for file's metadata
-g, --group Print group information
- -G, --groupmetadata Print group metadata
+ -G, --GROUPmetadata Print file space information for groups' metadata
-d, --dset Print dataset information
- -D, --dsetmetadata Print dataset metadata
- -T, --dtypemetadata Print datatype metadata
- -A, --attribute Print attribute information
-
+ -D, --DSETmetadata Print file space information for datasets' metadata
+ -T, --DSETtypeinfo Print datasets' datatype information
+ -a, --attribute Print attribute information
+ -s, --freespace Print free space information
+ -S, --summary Print summary of file space information
diff --git a/tools/h5stat/testfiles/h5stat_help2.ddl b/tools/h5stat/testfiles/h5stat_help2.ddl
index e41eb9e..fbfdd14 100644
--- a/tools/h5stat/testfiles/h5stat_help2.ddl
+++ b/tools/h5stat/testfiles/h5stat_help2.ddl
@@ -5,13 +5,14 @@ Usage: h5stat [OPTIONS] file
OPTIONS
-h, --help Print a usage message and exit
- -V, --version Print version number and exit
+ -v, --version Print version number and exit
-f, --file Print file information
- -F, --filemetadata Print file metadata
+ -F, --FILEmetadata Print file space information for file's metadata
-g, --group Print group information
- -G, --groupmetadata Print group metadata
+ -G, --GROUPmetadata Print file space information for groups' metadata
-d, --dset Print dataset information
- -D, --dsetmetadata Print dataset metadata
- -T, --dtypemetadata Print datatype metadata
- -A, --attribute Print attribute information
-
+ -D, --DSETmetadata Print file space information for datasets' metadata
+ -T, --DSETtypeinfo Print datasets' datatype information
+ -a, --attribute Print attribute information
+ -s, --freespace Print free space information
+ -S, --summary Print summary of file space information
diff --git a/tools/h5stat/testfiles/h5stat_idx.ddl b/tools/h5stat/testfiles/h5stat_idx.ddl
index f7e6031..2de3d96 100644
--- a/tools/h5stat/testfiles/h5stat_idx.ddl
+++ b/tools/h5stat/testfiles/h5stat_idx.ddl
@@ -5,16 +5,19 @@ Filename: h5stat_idx.h5
File information
# of unique groups: 1
# of unique datasets: 2
- # of unique named dataypes: 0
+ # of unique named datatypes: 0
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
Max. # of objects in group: 2
-Object header size: (total/unused)
- Groups: 147/47
- Datasets: 568/362
- Datatypes: 0/0
-Storage information:
+File space information for file metadata (in bytes):
+ Superblock: 48
+ Superblock extension: 0
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 147/47
+ Datasets(exclude compact data): 568/362
+ Datatypes: 0/0
Groups:
B-tree/List: 0
Heap: 0
@@ -23,11 +26,15 @@ Storage information:
Heap: 0
Chunked datasets:
Index: 202
+ Datasets:
+ Heap: 0
Shared Messages:
Header: 0
B-tree/List: 0
Heap: 0
- Superblock extension: 0
+ Free-space managers:
+ Header: 0
+ Amount of free space: 0
Small groups:
# of groups of size 2: 1
Total # of small groups: 1
@@ -47,6 +54,7 @@ Dataset dimension information:
Total # of datasets: 2
Dataset storage information:
Total raw data size: 110
+ Total external raw data size: 0
Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 0
@@ -73,3 +81,15 @@ Small # of attributes:
Attribute bins:
Total # of objects with attributes: 0
Max. # of attributes to objects: 0
+Free-space section threshold: 1 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ Total # of sections: 0
+File space management strategy: H5F_FILE_SPACE_ALL
+Summary of file space information:
+ File metadata: 965 bytes
+ Raw data: 110 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 1131 bytes
+Total space: 2206 bytes
diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl
index ce93b9c..9218a73 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat.ddl
+++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl
@@ -5,29 +5,36 @@ Filename: h5stat_newgrat.h5
File information
# of unique groups: 35001
# of unique datasets: 1
- # of unique named dataypes: 0
+ # of unique named datatypes: 0
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
Max. # of objects in group: 35001
-Object header size: (total/unused)
- Groups: 5145147/3220092
- Datasets: 414/312
- Datatypes: 0/0
-Storage information:
+File space information for file metadata (in bytes):
+ Superblock: 48
+ Superblock extension: 119
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 5145147/3220092
+ Datasets(exclude compact data): 414/312
+ Datatypes: 0/0
Groups:
B-tree/List: 470054
- Heap: 739102
+ Heap: 739045
Attributes:
B-tree/List: 2598
- Heap: 4442
+ Heap: 4431
Chunked datasets:
Index: 0
+ Datasets:
+ Heap: 0
Shared Messages:
Header: 0
B-tree/List: 0
Heap: 0
- Superblock extension: 0
+ Free-space managers:
+ Header: 0
+ Amount of free space: 0
Small groups:
# of groups of size 0: 35000
Total # of small groups: 35000
@@ -45,6 +52,7 @@ Dataset dimension information:
Total small datasets: 0
Dataset storage information:
Total raw data size: 0
+ Total external raw data size: 0
Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 1
@@ -72,3 +80,15 @@ Attribute bins:
# of objects with 100 - 999 attributes: 1
Total # of objects with attributes: 1
Max. # of attributes to objects: 100
+Free-space section threshold: 1 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ Total # of sections: 0
+File space management strategy: H5F_FILE_SPACE_ALL
+Summary of file space information:
+ File metadata: 6361856 bytes
+ Raw data: 0 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 5813 bytes
+Total space: 6367669 bytes
diff --git a/tools/h5stat/testfiles/h5stat_newgrat.h5 b/tools/h5stat/testfiles/h5stat_newgrat.h5
index 8fa406b..1db0205 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat.h5
+++ b/tools/h5stat/testfiles/h5stat_newgrat.h5
Binary files differ
diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl
index 25e1784..c7ed5f4 100644
--- a/tools/h5stat/testfiles/h5stat_tsohm.ddl
+++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl
@@ -5,16 +5,19 @@ Filename: h5stat_tsohm.h5
File information
# of unique groups: 1
# of unique datasets: 3
- # of unique named dataypes: 0
+ # of unique named datatypes: 0
# of unique links: 0
# of unique other: 0
Max. # of links to object: 1
Max. # of objects in group: 3
-Object header size: (total/unused)
- Groups: 51/2
- Datasets: 852/447
- Datatypes: 0/0
-Storage information:
+File space information for file metadata (in bytes):
+ Superblock: 48
+ Superblock extension: 40
+ User block: 0
+ Object headers: (total/unused)
+ Groups: 51/2
+ Datasets(exclude compact data): 852/447
+ Datatypes: 0/0
Groups:
B-tree/List: 872
Heap: 120
@@ -23,11 +26,15 @@ Storage information:
Heap: 0
Chunked datasets:
Index: 0
+ Datasets:
+ Heap: 0
Shared Messages:
Header: 38
B-tree/List: 550
Heap: 1316
- Superblock extension: 40
+ Free-space managers:
+ Header: 0
+ Amount of free space: 0
Small groups:
# of groups of size 3: 1
Total # of small groups: 1
@@ -44,6 +51,7 @@ Dataset dimension information:
Total small datasets: 0
Dataset storage information:
Total raw data size: 0
+ Total external raw data size: 0
Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 0
@@ -70,3 +78,15 @@ Small # of attributes:
Attribute bins:
Total # of objects with attributes: 0
Max. # of attributes to objects: 0
+Free-space section threshold: 1 bytes
+Small size free-space sections (< 10 bytes):
+ Total # of small size sections: 0
+Free-space section bins:
+ Total # of sections: 0
+File space management strategy: H5F_FILE_SPACE_ALL
+Summary of file space information:
+ File metadata: 3887 bytes
+ Raw data: 0 bytes
+ Amount/Percent of tracked free space: 0 bytes/0.0%
+ Unaccounted space: 0 bytes
+Total space: 3887 bytes
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 55785c7..2b269ca 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -96,6 +96,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -109,21 +119,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -146,7 +153,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 77ee74a..848ba90 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -5595,7 +5595,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *optio
return TRUE;
if (options->use_system_epsilon) {
- if ( ABS( (value-expected) / expected) < DBL_EPSILON)
+ if ( ABS( (value-expected) ) < DBL_EPSILON)
return TRUE;
}
@@ -5652,7 +5652,7 @@ hbool_t equal_float(float value, float expected, diff_opt_t *options)
return TRUE;
if (options->use_system_epsilon) {
- if ( ABS( (value-expected) / expected) < FLT_EPSILON)
+ if ( ABS( (value-expected) ) < FLT_EPSILON)
return TRUE;
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index dc6b694..fb4bd55 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1581,6 +1581,9 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id,
done:
free(ptdata);
+ if(H5Tclose(type_id) < 0)
+ HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
+
if(H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
@@ -1880,6 +1883,9 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id,
done:
free(ptdata);
+
+ if(H5Tclose(type_id) < 0)
+ HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
if(H5Tclose(dtype) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
diff --git a/tools/misc/Makefile.am b/tools/misc/Makefile.am
index fe1acbd..11c86fa 100644
--- a/tools/misc/Makefile.am
+++ b/tools/misc/Makefile.am
@@ -36,9 +36,9 @@ bin_PROGRAMS=h5debug h5repart h5mkgrp
bin_SCRIPTS=h5redeploy
# Add h5debug, h5repart, and h5mkgrp specific linker flags here
-h5debug_LDFLAGS = $(LT_STATIC_EXEC)
-h5repart_LDFLAGS = $(LT_STATIC_EXEC)
-h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC)
+h5debug_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5repart_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Tell automake to clean h5redeploy script
CLEANFILES=h5redeploy
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index 78a42b8..a3d3e23 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -151,6 +151,16 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal
ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
@@ -164,21 +174,18 @@ BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
-
-# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
-# but which shouldn't be exported to h5cc for building other programs.
-CFLAGS = @CFLAGS@ @H5_CFLAGS@
+CFLAGS = @CFLAGS@
CLEARFILEBUF = @CLEARFILEBUF@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
CONFIG_USER = @CONFIG_USER@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@
+CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEBUG_PKG = @DEBUG_PKG@
DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
@@ -201,7 +208,7 @@ F9XMODEXT = @F9XMODEXT@
F9XMODFLAG = @F9XMODFLAG@
F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
FC = @FC@
-FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@
+FCFLAGS = @FCFLAGS@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FGREP = @FGREP@
@@ -415,9 +422,9 @@ SCRIPT_DEPEND = h5repart$(EXEEXT) h5mkgrp$(EXEEXT)
bin_SCRIPTS = h5redeploy
# Add h5debug, h5repart, and h5mkgrp specific linker flags here
-h5debug_LDFLAGS = $(LT_STATIC_EXEC)
-h5repart_LDFLAGS = $(LT_STATIC_EXEC)
-h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC)
+h5debug_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5repart_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
+h5mkgrp_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# Tell automake to clean h5redeploy script
CLEANFILES = h5redeploy
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index 1ead951..28f0dee 100755
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -58,9 +58,9 @@ get_output_file="no"
SHOW="eval"
CCBASE="@CC@"
CLINKERBASE="@CC@"
-CFLAGS="@CFLAGS@"
-CPPFLAGS="@CPPFLAGS@"
-LDFLAGS="@LDFLAGS@"
+CFLAGS="@AM_CFLAGS@ @CFLAGS@"
+CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
+LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
LIBS="@LIBS@"
CC="${HDF5_CC:-$CCBASE}"
@@ -318,7 +318,7 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $LIBS"
- $SHOW $CLINKER $CFLAGS $LDFLAGS $clibpath $link_objs $link_args $shared_link
+ $SHOW $CLINKER $CFLAGS $clibpath $link_objs $link_args $shared_link $LDFLAGS
status=$?
fi
diff --git a/tools/testfiles/file_space.ddl b/tools/testfiles/file_space.ddl
new file mode 100644
index 0000000..d4d3a3c
--- /dev/null
+++ b/tools/testfiles/file_space.ddl
@@ -0,0 +1,23 @@
+#############################
+Expected output for 'h5dump -B file_space.h5'
+#############################
+HDF5 "file_space.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 2
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+}
+USER_BLOCK {
+ USERBLOCK_SIZE 0
+}
+GROUP "/" {
+}
+}
diff --git a/tools/testfiles/file_space.h5 b/tools/testfiles/file_space.h5
new file mode 100644
index 0000000..48184d3
--- /dev/null
+++ b/tools/testfiles/file_space.h5
Binary files differ
diff --git a/tools/testfiles/tboot1.ddl b/tools/testfiles/tboot1.ddl
index 9a7cafc..8ffffc0 100644
--- a/tools/testfiles/tboot1.ddl
+++ b/tools/testfiles/tboot1.ddl
@@ -12,6 +12,8 @@ SUPER_BLOCK {
BTREE_RANK 16
BTREE_LEAF 4
ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
}
USER_BLOCK {
USERBLOCK_SIZE 0
diff --git a/tools/testfiles/tboot2.ddl b/tools/testfiles/tboot2.ddl
index d1484ca..51250fe 100644
--- a/tools/testfiles/tboot2.ddl
+++ b/tools/testfiles/tboot2.ddl
@@ -12,6 +12,8 @@ SUPER_BLOCK {
BTREE_RANK 16
BTREE_LEAF 4
ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
}
USER_BLOCK {
USERBLOCK_SIZE 0