summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST37
-rw-r--r--aclocal.m43
-rw-r--r--config/cmake/ConfigureChecks.cmake8
-rw-r--r--config/cmake/H5pubconf.h.in3
-rwxr-xr-xconfigure115
-rw-r--r--configure.ac24
-rw-r--r--release_docs/RELEASE.txt3
-rw-r--r--src/H5PL.c4
-rw-r--r--src/H5config.h.in3
-rw-r--r--tools/h5dump/testh5dump.sh.in36
-rw-r--r--tools/h5repack/CMakeLists.txt35
-rw-r--r--tools/h5repack/CMakeTests.cmake116
-rw-r--r--tools/h5repack/Makefile.am18
-rw-r--r--tools/h5repack/Makefile.in153
-rw-r--r--tools/h5repack/h5repack.c7
-rw-r--r--tools/h5repack/h5repack.sh.in48
-rw-r--r--tools/h5repack/h5repack_copy.c10
-rw-r--r--tools/h5repack/h5repack_filters.c17
-rw-r--r--tools/h5repack/h5repack_main.c8
-rw-r--r--tools/h5repack/h5repack_parse.c859
-rw-r--r--tools/h5repack/h5repack_plugin.sh.in238
-rw-r--r--tools/h5repack/h5repack_verify.c15
-rw-r--r--tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl130
-rw-r--r--tools/h5repack/testfiles/h5repack-help.txt122
-rw-r--r--tools/h5repack/testfiles/h5repack_filters.h5.tst (renamed from tools/testfiles/h5repack_filters.h5.ddl)0
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl158
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5.ddl660
-rw-r--r--tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst14
28 files changed, 2273 insertions, 571 deletions
diff --git a/MANIFEST b/MANIFEST
index e8a4f3a..fededbb 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1251,6 +1251,7 @@
./tools/h5repack/Makefile.am
./tools/h5repack/Makefile.in
./tools/h5repack/h5repack.sh.in
+./tools/h5repack/h5repack_plugin.sh.in
./tools/h5repack/h5repack.c
./tools/h5repack/h5repack.h
./tools/h5repack/h5repack_copy.c
@@ -1742,7 +1743,6 @@
./tools/testfiles/tfpformat.h5
# h5dump h5repack validation
-./tools/testfiles/h5repack_filters.h5.ddl
./tools/testfiles/zerodim.ddl
./tools/testfiles/zerodim.h5
@@ -2113,30 +2113,35 @@
./tools/h5diff/testfiles/non_comparables2.h5
#test files for h5repack
-./tools/h5repack/testfiles/h5repack_fill.h5
-./tools/h5repack/testfiles/h5repack_objs.h5
./tools/h5repack/testfiles/h5repack_attr.h5
+./tools/h5repack/testfiles/h5repack_attr_refs.h5
+./tools/h5repack/testfiles/h5repack_deflate.h5
+./tools/h5repack/testfiles/h5repack_early.h5
+./tools/h5repack/testfiles/h5repack_ext.bin
+./tools/h5repack/testfiles/h5repack_ext.h5
+./tools/h5repack/testfiles/h5repack_fill.h5
+./tools/h5repack/testfiles/h5repack_filters.h5
+./tools/h5repack/testfiles/h5repack_fletcher.h5
./tools/h5repack/testfiles/h5repack_hlink.h5
+./tools/h5repack/testfiles/h5repack.info
./tools/h5repack/testfiles/h5repack_layout.h5
-./tools/h5repack/testfiles/h5repack_layout.h5.ddl
./tools/h5repack/testfiles/h5repack_layouto.h5
./tools/h5repack/testfiles/h5repack_layout2.h5
./tools/h5repack/testfiles/h5repack_layout3.h5
-./tools/h5repack/testfiles/h5repack_early.h5
-./tools/h5repack/testfiles/h5repack_szip.h5
-./tools/h5repack/testfiles/h5repack_deflate.h5
-./tools/h5repack/testfiles/h5repack_shuffle.h5
-./tools/h5repack/testfiles/h5repack_fletcher.h5
-./tools/h5repack/testfiles/h5repack_filters.h5
+./tools/h5repack/testfiles/h5repack_named_dtypes.h5
./tools/h5repack/testfiles/h5repack_nbit.h5
+./tools/h5repack/testfiles/h5repack_objs.h5
+./tools/h5repack/testfiles/h5repack_refs.h5
+./tools/h5repack/testfiles/h5repack_shuffle.h5
./tools/h5repack/testfiles/h5repack_soffset.h5
-./tools/h5repack/testfiles/h5repack.info
-./tools/h5repack/testfiles/h5repack_ext.bin
-./tools/h5repack/testfiles/h5repack_ext.h5
+./tools/h5repack/testfiles/h5repack_szip.h5
./tools/h5repack/testfiles/ublock.bin
-./tools/h5repack/testfiles/h5repack_named_dtypes.h5
-./tools/h5repack/testfiles/h5repack_refs.h5
-./tools/h5repack/testfiles/h5repack_attr_refs.h5
+./tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
+./tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.ddl
+./tools/h5repack/testfiles/h5repack-help.txt
+./tools/h5repack/testfiles/h5repack_filters.h5.tst
+./tools/h5repack/testfiles/h5repack_layout.h5.ddl
+./tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
# jam utility and tests
./tools/h5jam/h5jam.c
diff --git a/aclocal.m4 b/aclocal.m4
index e6aae87..4e5a489 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -11,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -372,7 +373,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index b467a15..e495d9b 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -152,6 +152,14 @@ ENDIF (WIN32)
#
SET (H5_DEFAULT_VFD H5FD_SEC2)
+IF (NOT DEFINED "H5_DEFAULT_PLUGIN")
+ IF (WINDOWS)
+ SET (H5_DEFAULT_PLUGIN "%ALLUSERSPROFILE%/hdf5/lib/plugin")
+ ELSE (WINDOWS)
+ SET (H5_DEFAULT_PLUGIN "/usr/local/hdf5/lib/plugin")
+ ENDIF (WINDOWS)
+ENDIF (NOT DEFINED "H5_DEFAULT_PLUGIN")
+
IF (WINDOWS)
SET (H5_HAVE_WINDOWS 1)
# ----------------------------------------------------------------------
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 2736daf..2160ee8 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -54,6 +54,9 @@
problem converting from unsigned long long to long double */
#cmakedefine H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM @H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM@
+/* Define the default plugins path to compile */
+#cmakedefine H5_DEFAULT_PLUGIN "@H5_DEFAULT_PLUGIN@"
+
/* Define the default virtual file driver to compile */
#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@
diff --git a/configure b/configure
index 4963d93..dd8f3ea 100755
--- a/configure
+++ b/configure
@@ -921,6 +921,7 @@ with_mpe
enable_mpi_size
enable_filters
with_default_vfd
+with_default_plugin
enable_direct_vfd
enable_dconv_exception
enable_dconv_accuracy
@@ -1667,6 +1668,9 @@ Optional Packages:
--with-mpe=DIR Use MPE instrumentation [default=no]
--with-default-vfd=driver
Specify default file driver [default=sec2]
+ --with-default-plugin=location
+ Specify default location for plugins
+ [default="/usr/local/hdf5/lib/plugin"]
--with-default-api-version=(v16|v18|v110)
Specify default release version of public symbols
[default=v110]
@@ -3231,7 +3235,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
## AM_INIT_AUTOMAKE takes a list of options that should be applied to
## every Makefile.am when automake is run.
-am__api_version='1.12'
+am__api_version='1.13'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3415,8 +3419,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
@@ -3656,6 +3660,45 @@ else
fi
rmdir .tst 2>/dev/null
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3718,12 +3761,17 @@ mkdir_p='$(MKDIR_P)'
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
@@ -12333,6 +12381,10 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
@@ -14911,10 +14963,14 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -18806,10 +18862,14 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -21682,10 +21742,14 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -23359,7 +23423,7 @@ case "$host_cpu-$host_vendor-$host_os" in
;;
esac
-## Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible
+## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
## for configure checks.
## Note: Both will be restored by the end of configure.
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
@@ -29271,6 +29335,36 @@ _ACEOF
fi
## ----------------------------------------------------------------------
+## Enable custom plugin default path for library. It requires SHARED support.
+##
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Custom Plugin Default Path definition" >&5
+$as_echo_n "checking for Custom Plugin Default Path definition... " >&6; }
+
+# Check whether --with-default-plugin was given.
+if test "${with_default_plugin+set}" = set; then :
+ withval=$with_default_plugin;
+else
+ withval="/usr/local/hdf5/lib/plugin"
+fi
+
+
+if test "X$withval" = "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
+$as_echo "default" >&6; }
+ default_plugin="/usr/local/hdf5/lib/plugin"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
+$as_echo "$withval" >&6; }
+ default_plugin=$withval
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_PLUGIN "$default_plugin"
+_ACEOF
+
+
+## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
@@ -33149,7 +33243,7 @@ else
fi
-ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
+ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh test/test_plugin.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5import/h5importtestutil.sh tools/h5diff/Makefile tools/h5diff/testh5diff.sh tools/h5diff/testph5diff.sh tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5repack/h5repack_plugin.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/h5copy/testh5copy.sh tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5mkgrp.sh tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/tools/gif2h5/h52giftest.sh hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh"
cat >confcache <<\_ACEOF
@@ -34434,6 +34528,7 @@ do
"tools/h5jam/testh5jam.sh") CONFIG_FILES="$CONFIG_FILES tools/h5jam/testh5jam.sh" ;;
"tools/h5repack/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5repack/Makefile" ;;
"tools/h5repack/h5repack.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack.sh" ;;
+ "tools/h5repack/h5repack_plugin.sh") CONFIG_FILES="$CONFIG_FILES tools/h5repack/h5repack_plugin.sh" ;;
"tools/h5ls/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5ls/Makefile" ;;
"tools/h5copy/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5copy/Makefile" ;;
"tools/h5copy/testh5copy.sh") CONFIG_FILES="$CONFIG_FILES tools/h5copy/testh5copy.sh" ;;
@@ -35095,7 +35190,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
rm -f libhdf5.settings.TMP
;;
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -35146,7 +35241,7 @@ $as_echo X"$mf" |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
diff --git a/configure.ac b/configure.ac
index 386450b..0ae405e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1467,7 +1467,7 @@ case "$host_cpu-$host_vendor-$host_os" in
;;
esac
-## Need to add the AM_ and H5_ into CPFLAGS/CPPFLAGS to make them visible
+## Need to add the AM_ and H5_ into CFLAGS/CPPFLAGS to make them visible
## for configure checks.
## Note: Both will be restored by the end of configure.
CPPFLAGS="$H5_CPPFLAGS $AM_CPPFLAGS $CPPFLAGS"
@@ -3052,6 +3052,27 @@ if test "X$default_vfd" = "Xyes"; then
fi
## ----------------------------------------------------------------------
+## Enable custom plugin default path for library. It requires SHARED support.
+##
+AC_MSG_CHECKING([for Custom Plugin Default Path definition])
+AC_ARG_WITH([default-plugin],
+ [AS_HELP_STRING([--with-default-plugin=location],
+ [Specify default location for plugins
+ [default="/usr/local/hdf5/lib/plugin"]])],,
+ withval="/usr/local/hdf5/lib/plugin")
+
+if test "X$withval" = "X"; then
+ AC_MSG_RESULT([default])
+ default_plugin="/usr/local/hdf5/lib/plugin"
+else
+ AC_MSG_RESULT([$withval])
+ default_plugin=$withval
+fi
+
+AC_DEFINE_UNQUOTED([DEFAULT_PLUGIN], ["$default_plugin"],
+ [Define the default plugins path to compile])
+
+## ----------------------------------------------------------------------
## Check if Direct I/O driver is enabled by --enable-direct-vfd
##
@@ -4516,6 +4537,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
tools/h5jam/testh5jam.sh
tools/h5repack/Makefile
tools/h5repack/h5repack.sh
+ tools/h5repack/h5repack_plugin.sh
tools/h5ls/Makefile
tools/h5copy/Makefile
tools/h5copy/testh5copy.sh
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 811095f..a8f68e1 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -41,7 +41,7 @@ New Features
Configuration:
-------------
- - CMake minimum is now 2.8.10. (ADB 2013/1/14)
+ - CMake minimum is now 2.8.10. (ADB 2013/01/14)
- A new tool, cmakehdf5, which is a build command script similar to
buildhdf5 is added and is available in the bin directory.
(AKC - 2012/12/12)
@@ -279,6 +279,7 @@ New Features
Tools:
------
+ - h5repack: Added ability to use plugin filters. HDFFV-8345 (ADB - 2013/09/04).
- h5dump: Added option -N --any_path, which searches the file for paths that
match the search path. HDFFV-7989 (ADB - 2013/08/12).
- h5dump: Added optional arg 0 to -A, which excludes attributes from display.
diff --git a/src/H5PL.c b/src/H5PL.c
index def41d1..1c4b355 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -43,7 +43,6 @@
/* Windows support */
#ifdef H5_HAVE_WIN32_API
-#define H5PL_DEFAULT_PATH "%ALLUSERSPROFILE%/hdf5/lib/plugin"
#define H5PL_PATH_SEPARATOR ";"
/* Handle for dynamic library */
@@ -66,7 +65,6 @@ typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
/* Unix support */
#else /* H5_HAVE_WIN32_API */
-#define H5PL_DEFAULT_PATH "/usr/local/hdf5/lib/plugin"
#define H5PL_PATH_SEPARATOR ":"
/* Handle for dynamic library */
@@ -87,6 +85,8 @@ typedef const void *(__cdecl *H5PL_get_plugin_info_t)(void);
typedef const void *(*H5PL_get_plugin_info_t)(void);
#endif /* H5_HAVE_WIN32_API */
+#define H5PL_DEFAULT_PATH H5_DEFAULT_PLUGIN
+
/* Special symbol to indicate no plugin loading */
#define H5PL_NO_PLUGIN "::"
diff --git a/src/H5config.h.in b/src/H5config.h.in
index fc41c5a..a86970a 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -17,6 +17,9 @@
/* Define if C++ compiler recognizes offsetof */
#undef CXX_HAVE_OFFSETOF
+/* Define the default plugins path to compile */
+#undef DEFAULT_PLUGIN
+
/* Define the default virtual file driver to compile */
#undef DEFAULT_VFD
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index be05705..1a0f189 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -797,6 +797,40 @@ TOOLTEST5() {
fi
}
+# ADD_HELP_TEST
+TOOLTEST_HELP() {
+
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .txt`.out"
+ actual_err="$TESTDIR/`basename $1 .txt`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+
+}
# Print a "SKIP" message
SKIP() {
@@ -873,7 +907,7 @@ IMPORTTEST()
# prepare for test
COPY_TESTFILES_TO_TESTDIR
-#TOOLTEST h5dump-help.txt -h
+TOOLTEST_HELP h5dump-help.txt -h
# test data output redirection
TOOLTEST tnoddl.ddl --enable-error-stack --ddl -y packedbits.h5
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index f03ad69..176fc2b 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -44,6 +44,41 @@ IF (BUILD_TESTING)
TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools)
+ #-----------------------------------------------------------------------------
+ # If plugin library tests can be tested
+ #-----------------------------------------------------------------------------
+ IF (BUILD_SHARED_LIBS)
+ SET (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
+ SET (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
+ SET (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
+ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+
+ ADD_LIBRARY (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c)
+ TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ")
+ TARGET_LINK_LIBRARIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
+ ${LIB_TYPE}
+ HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG
+ )
+
+ # make plugins dir
+ FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
+ "$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
+ "${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
+ )
+ ENDIF (BUILD_SHARED_LIBS)
+
INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index c27aaa0..7f8f71b 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -79,12 +79,15 @@
)
SET (LIST_OTHER_TEST_FILES
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack-help.txt
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/deflate_limit.h5repack_layout.h5.ddl
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5.ddl
- # tools/testfiles
- ${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5.tst
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test.ddl
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5.tst
)
FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
@@ -105,6 +108,37 @@
##############################################################################
##############################################################################
+ MACRO (ADD_HELP_TEST testname resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
+ SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5REPACK-${testname}")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK-h5repack-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove h5repack-${testname}.out h5repack-${testname}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ ADD_TEST (
+ NAME H5REPACK-h5repack-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=h5repack-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=h5repack-${testname}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_HELP_TEST)
+
MACRO (ADD_H5_TEST_OLD testname testtype testfile)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -177,7 +211,7 @@
-D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_FILTER:STRING=${testfilter}"
- -D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
+ -D "TEST_REFERENCE=testfiles/${resultfile}.tst"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
@@ -212,7 +246,7 @@
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
+ -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.ddl"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
@@ -303,6 +337,51 @@
SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
ENDMACRO (ADD_H5_TEST_META)
+ MACRO (ADD_H5_UD_TEST testname resultcode resultfile)
+ IF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5REPACK_UD-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/out-${testname}.${resultfile}
+ testfiles/${testname}.${resultfile}.out
+ testfiles/${testname}.${resultfile}.out.err
+ testfiles/${resultfile}-${testname}.out
+ testfiles/${resultfile}-${testname}.out.err
+ )
+ ADD_TEST (
+ NAME H5REPACK_UD-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
+ -D "TEST_ARGS:STRING=${ARGN};${PROJECT_BINARY_DIR}/testfiles/${resultfile};${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER:STRING=O?...ing file[^\n]+\n"
+ -D "TEST_OUTPUT=./testfiles/${testname}.${resultfile}.out"
+ -D "TEST_REFERENCE=testfiles/${testname}.${resultfile}.tst"
+ -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
+ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-clearall-objects)
+ ADD_TEST (
+ NAME H5REPACK_UD-h5dump-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=testfiles/${resultfile}-${testname}.ddl"
+ -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH"
+ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
+ ENDIF (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_UD_TEST)
+
##############################################################################
##############################################################################
### T H E T E S T S ###
@@ -333,12 +412,13 @@
SET (FILE18 h5repack_layout2.h5)
SET (FILE_REF h5repack_refs.h5)
SET (FILE_ATTR_REF h5repack_attr_refs.h5)
-
+
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
+ ./testfiles/h5dump-help.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
./testfiles/h5repack_layout.h5-chunk_18x13-v.out
@@ -353,6 +433,8 @@
./testfiles/h5repack_layout.h5-compa-v.out.err
./testfiles/h5repack_layout.h5-conti-v.out
./testfiles/h5repack_layout.h5-conti-v.out.err
+ ./testfiles/h5repack_layout.h5-deflate_limit.out
+ ./testfiles/h5repack_layout.h5-deflate_limit.out.err
./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out
./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err
./testfiles/h5repack_layout.h5-dset2_compa-v.out
@@ -375,10 +457,16 @@
./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err
./testfiles/h5repack_layout.h5-layout_short_switches-v.out
./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err
+ ./testfiles/h5repack_layout.h5-plugin_test.out
+ ./testfiles/h5repack_layout.h5-plugin_test.out.err
./testfiles/h5repack_layout2.h5-contig_small_compa-v.out
./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err
./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out
./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err
+ ./testfiles/h5repack_layout3.h5-ckdim_biger-v.out
+ ./testfiles/h5repack_layout3.h5-ckdim_biger-v.out.err
+ ./testfiles/h5repack_layout3.h5-ckdim_smaller-v.out
+ ./testfiles/h5repack_layout3.h5-ckdim_smaller-v.out.err
./testfiles/h5repack_layout3.h5-chunk2chunk-v.out
./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err
./testfiles/h5repack_layout3.h5-chunk2compa-v.out
@@ -431,11 +519,14 @@
./testfiles/out-layout_long_switches.h5repack_layout.h5
./testfiles/out-layout_short_switches.h5repack_layout.h5
./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5
+ ./testfiles/out-plugin_test.h5repack_layout.h5
./testfiles/out-shuffle_all.h5repack_layout.h5
./testfiles/out-shuffle_individual.h5repack_layout.h5
./testfiles/out-upgrade_layout.h5repack_layouto.h5
./testfiles/out-contig_small_compa.h5repack_layout2.h5
./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5
+ ./testfiles/out-ckdim_biger.h5repack_layout3.h5
+ ./testfiles/out-ckdim_smaller.h5repack_layout3.h5
./testfiles/out-chunk2chunk.h5repack_layout3.h5
./testfiles/out-chunk2compa.h5repack_layout3.h5
./testfiles/out-chunk2conti.h5repack_layout3.h5
@@ -507,6 +598,8 @@
SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_HELP_TEST(help 0 -h)
+
ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
IF (HDF5_ENABLE_SZIP_SUPPORT)
IF (HDF5_ENABLE_SZIP_ENCODING)
@@ -965,6 +1058,19 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO
ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192)
ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192)
+##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+ ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
+ELSE (BUILD_SHARED_LIBS)
+ MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ ADD_TEST (
+ NAME H5REPACK-plugin
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ )
+ENDIF (BUILD_SHARED_LIBS)
+
IF (HDF5_TEST_VFD)
# Run test with different Virtual File Driver
FOREACH (vfd ${VFD_LIST})
diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am
index 96f0082..c52112b 100644
--- a/tools/h5repack/Makefile.am
+++ b/tools/h5repack/Makefile.am
@@ -28,11 +28,14 @@ TEST_SCRIPT=h5repack.sh
TEST_PROG=h5repacktst
noinst_PROGRAMS=testh5repack_detect_szip
+SCRIPT_DEPEND=h5repack$(EXEEXT)
+if HAVE_SHARED_CONDITIONAL
+ TEST_SCRIPT += h5repack_plugin.sh
+endif
+
check_SCRIPTS=$(TEST_SCRIPT)
check_PROGRAMS=$(TEST_PROG)
-SCRIPT_DEPEND=h5repack$(EXEEXT)
-
# Our main target, h5repack tool
bin_PROGRAMS=h5repack
@@ -56,9 +59,18 @@ testh5repack_detect_szip_SOURCES=testh5repack_detect_szip.c
# The h5repack.sh script needs h5repacktst to run first.
h5repack.sh.chkexe_: h5repacktst.chkexe_
+if HAVE_SHARED_CONDITIONAL
+ # Build it as shared library if configure is enabled for shared library.
+ lib_LTLIBRARIES=libdynlibadd.la
+ libdynlibadd_la_SOURCES=$(top_srcdir)/test/dynlib1.c
+
+install-exec-hook:
+ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+endif
+
# Temporary files. *.h5 are generated by h5repack. They should
# copied to the testfiles/ directory if update is required.
CHECK_CLEANFILES+=*.h5 *.bin
-DISTCLEANFILES=h5repack.sh
+DISTCLEANFILES=h5repack.sh h5repack_plugin.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index fe3a11c..1b87fd6 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -31,6 +31,7 @@
# HDF5 Library Makefile(.in)
#
+
VPATH = @srcdir@
am__make_dryrun = \
{ \
@@ -68,11 +69,12 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/h5repack.sh.in $(top_srcdir)/bin/depcomp \
- $(top_srcdir)/bin/mkinstalldirs \
+ $(srcdir)/h5repack.sh.in $(srcdir)/h5repack_plugin.sh.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/mkinstalldirs \
$(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am
noinst_PROGRAMS = testh5repack_detect_szip$(EXEEXT)
+@HAVE_SHARED_CONDITIONAL_TRUE@am__append_1 = h5repack_plugin.sh
check_PROGRAMS = $(am__EXEEXT_1)
bin_PROGRAMS = h5repack$(EXEEXT)
TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT)
@@ -83,9 +85,47 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/H5config.h
-CONFIG_CLEAN_FILES = h5repack.sh
+CONFIG_CLEAN_FILES = h5repack.sh h5repack_plugin.sh
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libdynlibadd_la_LIBADD =
+am__libdynlibadd_la_SOURCES_DIST = $(top_srcdir)/test/dynlib1.c
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_OBJECTS = dynlib1.lo
+libdynlibadd_la_OBJECTS = $(am_libdynlibadd_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_rpath = -rpath \
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(libdir)
am__EXEEXT_1 = h5repacktst$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am__objects_1 = h5repack.$(OBJEXT) h5repack_copy.$(OBJEXT) \
@@ -96,10 +136,6 @@ am_h5repack_OBJECTS = $(am__objects_1) h5repack_main.$(OBJEXT)
h5repack_OBJECTS = $(am_h5repack_OBJECTS)
h5repack_LDADD = $(LDADD)
h5repack_DEPENDENCIES = $(LIBH5TOOLS) $(LIBH5TEST) $(LIBHDF5)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
h5repack_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(h5repack_LDFLAGS) $(LDFLAGS) -o $@
@@ -148,10 +184,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(h5repack_SOURCES) $(h5repacktst_SOURCES) \
- $(testh5repack_detect_szip_SOURCES)
-DIST_SOURCES = $(h5repack_SOURCES) $(h5repacktst_SOURCES) \
- $(testh5repack_detect_szip_SOURCES)
+SOURCES = $(libdynlibadd_la_SOURCES) $(h5repack_SOURCES) \
+ $(h5repacktst_SOURCES) $(testh5repack_detect_szip_SOURCES)
+DIST_SOURCES = $(am__libdynlibadd_la_SOURCES_DIST) $(h5repack_SOURCES) \
+ $(h5repacktst_SOURCES) $(testh5repack_detect_szip_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -450,10 +486,10 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib
# Test programs and scripts
-TEST_SCRIPT = h5repack.sh
+TEST_SCRIPT = h5repack.sh $(am__append_1)
TEST_PROG = h5repacktst
-check_SCRIPTS = $(TEST_SCRIPT)
SCRIPT_DEPEND = h5repack$(EXEEXT)
+check_SCRIPTS = $(TEST_SCRIPT)
# Add h5repack specific linker flags here
h5repack_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
@@ -469,6 +505,8 @@ COMMON_SOURCES = h5repack.c h5repack_copy.c h5repack_filters.c \
h5repack_SOURCES = $(COMMON_SOURCES) h5repack_main.c
h5repacktst_SOURCES = $(COMMON_SOURCES) h5repacktst.c
testh5repack_detect_szip_SOURCES = testh5repack_detect_szip.c
+@HAVE_SHARED_CONDITIONAL_TRUE@lib_LTLIBRARIES = libdynlibadd.la
+@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_SOURCES = $(top_srcdir)/test/dynlib1.c
DISTCLEANFILES = h5repack.sh
# Automake needs to be taught how to build lib, progs, and tests targets.
@@ -527,6 +565,44 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
h5repack.sh: $(top_builddir)/config.status $(srcdir)/h5repack.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+h5repack_plugin.sh: $(top_builddir)/config.status $(srcdir)/h5repack_plugin.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -607,6 +683,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlib1.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_copy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repack_filters.Po@am__quote@
@@ -639,6 +716,13 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+dynlib1.lo: $(top_srcdir)/test/dynlib1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dynlib1.lo -MD -MP -MF $(DEPDIR)/dynlib1.Tpo -c -o dynlib1.lo `test -f '$(top_srcdir)/test/dynlib1.c' || echo '$(srcdir)/'`$(top_srcdir)/test/dynlib1.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dynlib1.Tpo $(DEPDIR)/dynlib1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/test/dynlib1.c' object='dynlib1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dynlib1.lo `test -f '$(top_srcdir)/test/dynlib1.c' || echo '$(srcdir)/'`$(top_srcdir)/test/dynlib1.c
+
mostlyclean-libtool:
-rm -f *.lo
@@ -745,9 +829,11 @@ check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
-all-am: Makefile $(PROGRAMS) all-local
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local
+install-binPROGRAMS: install-libLTLIBRARIES
+
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -781,10 +867,12 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_SHARED_CONDITIONAL_FALSE@install-exec-hook:
clean: clean-am
clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstPROGRAMS mostlyclean-am
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -810,8 +898,9 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS
-
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
@@ -850,25 +939,26 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
-.MAKE: check-am install-am install-strip
+.MAKE: check-am install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \
clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
- clean-libtool clean-noinstPROGRAMS cscopelist ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+ cscopelist ctags distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-hook install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+ uninstall-binPROGRAMS uninstall-libLTLIBRARIES
# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
@@ -885,6 +975,11 @@ help:
# The h5repack.sh script needs h5repacktst to run first.
h5repack.sh.chkexe_: h5repacktst.chkexe_
+@HAVE_SHARED_CONDITIONAL_TRUE@ # Build it as shared library if configure is enabled for shared library.
+
+@HAVE_SHARED_CONDITIONAL_TRUE@install-exec-hook:
+@HAVE_SHARED_CONDITIONAL_TRUE@ $(RM) $(DESTDIR)$(libdir)/*dynlib*
+
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index d6437cf..5c44e1a 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -722,6 +722,7 @@ static int check_options(pack_opt_t *options)
options->filter_g[k].cd_values[0]);
break;
default:
+ printf(" User Defined %d\n", filtn);
break;
} /* k */
};
@@ -1006,9 +1007,7 @@ static const char* get_sfilter(H5Z_filter_t filtn)
return "NBIT";
else if (filtn==H5Z_FILTER_SCALEOFFSET)
return "SOFF";
- else {
- error_msg("input error in filter type\n");
- HDexit(EXIT_FAILURE);
- }
+ else
+ return "UD";
}
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 42b8ecb..583b6ef 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -117,11 +117,15 @@ $SRC_TOOLS_TESTFILES/tfamily00010.h5
"
LIST_OTHER_TEST_FILES="
+$SRC_H5REPACK_TESTFILES/h5repack-help.txt
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl
$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
-$SRC_TOOLS_TESTFILES/h5repack_filters.h5.ddl
+$SRC_H5REPACK_TESTFILES/h5repack_filters.h5.tst
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
"
#
@@ -436,7 +440,7 @@ TOOLTEST1()
#
TOOLTESTV()
{
- expect="$TESTDIR/$2.ddl"
+ expect="$TESTDIR/$2.tst"
actual="$TESTDIR/`basename $2 .ddl`.out"
actual_err="$TESTDIR/`basename $2 .ddl`.err"
@@ -468,7 +472,7 @@ TOOLTESTV()
echo " PASSED"
else
echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
fi
@@ -484,7 +488,7 @@ TOOLTEST_DUMP()
{
infile=$TESTDIR/$2
outfile=$TESTDIR/out-$1.$2
- expect="$TESTDIR/$2.ddl"
+ expect="$TESTDIR/$1.$2.ddl"
actual="$TESTDIR/out-$1.$2.out"
actual_err="$TESTDIR/out-$1.$2.err"
@@ -592,6 +596,40 @@ TOOLTEST_META()
rm -f $outfile
}
+# ADD_HELP_TEST
+TOOLTEST_HELP() {
+
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .txt`.out"
+ actual_err="$TESTDIR/`basename $1 .txt`.err"
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5REPACK_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect-CREATED
+ elif cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected output (*.txt) differs from actual output (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+
+}
# This is different from $srcdir/../../bin/output_filter.sh
STDOUT_FILTER() {
@@ -630,6 +668,8 @@ fi
# prepare for test
COPY_TESTFILES_TO_TESTDIR
+TOOLTEST_HELP h5repack-help.txt -h
+
# copy files (these files have no filters)
TOOLTEST fill h5repack_fill.h5
TOOLTEST objs h5repack_objs.h5
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 02337fd..2133b48 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -1273,7 +1273,6 @@ int do_copy_objects(hid_t fidin,
*/
if (copy_attr(dset_in, dset_out, &named_dt_head, travt, options) < 0)
goto error;
-
/*close */
if (H5Dclose(dset_out) < 0)
goto error;
@@ -1356,7 +1355,6 @@ int do_copy_objects(hid_t fidin,
} /* end do we have request for filter/chunking */
-
break;
/*-------------------------------------------------------------------------
@@ -1504,7 +1502,9 @@ static void print_dataset_info(hid_t dcpl_id,
cd_values, sizeof(f_objname), f_objname, NULL);
switch(filtn) {
- default:
+
+ case H5Z_FILTER_NONE:
+ HDstrcat(strfilter,"NONE ");
break;
case H5Z_FILTER_DEFLATE:
@@ -1554,6 +1554,10 @@ static void print_dataset_info(hid_t dcpl_id,
case H5Z_FILTER_SCALEOFFSET:
HDstrcat(strfilter,"SCALEOFFSET ");
break;
+
+ default:
+ HDstrcat(strfilter,"UD ");
+ break;
} /* switch */
}/*i*/
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index 6c7bc65..56e08ef 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -345,8 +345,13 @@ int apply_filters(const char* name, /* object name from traverse list */
{
switch (obj.filter[i].filtn)
{
- default:
- break;
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_NONE 0 , uncompress if compressed
+ *-------------------------------------------------------------------------
+ */
+ case H5Z_FILTER_NONE:
+ break;
/*-------------------------------------------------------------------------
* H5Z_FILTER_DEFLATE 1 , deflation like gzip
@@ -436,6 +441,14 @@ int apply_filters(const char* name, /* object name from traverse list */
return -1;
}
break;
+ default:
+ {
+ if (H5Pset_filter (dcpl_id, obj.filter[i].filtn, H5Z_FLAG_MANDATORY, obj.filter[i].cd_nelmts, obj.filter[i].cd_values)<0)
+ return -1;
+ if(H5Pset_chunk(dcpl_id, obj.chunk.rank, obj.chunk.chunk_lengths)<0)
+ return -1;
+ }
+ break;
} /* switch */
}/*i*/
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index ff38068..b5f9d31 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -219,6 +219,7 @@ static void usage(const char *prog)
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(" UD, to apply a user defined 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");
@@ -229,6 +230,9 @@ static void usage(const char *prog)
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(" UD=<filter_number,cd_value_count,value_1[,value_2,...,value_N]>\n");
+ printf(" required values for filter_number,cd_value_count,value_1\n");
+ printf(" optional values for value_2 to value_N\n");
printf(" NONE (no parameter)\n");
printf("\n");
printf(" LAYT - is a string with the format:\n");
@@ -271,6 +275,10 @@ static void usage(const char *prog)
printf("\n");
printf(" Add both filters SHUF and GZIP in this order to all datasets\n");
printf("\n");
+ printf("6) h5repack -f UD=307,1,9 file1 file2 \n");
+ printf("\n");
+ printf(" Add bzip2 filter to all datasets\n");
+ printf("\n");
}
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index 9f798e9..8a297a7 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -31,6 +31,7 @@
* FLET, to apply the HDF5 checksum filter
* NBIT, to apply the HDF5 NBIT filter (NBIT compression)
* SOFF, to apply the HDF5 scale+offset filter (compression)
+ * UD, to apply a User Defined filter k, m, n1[,…,nm]
* NONE, to remove the filter
*
* Examples:
@@ -51,402 +52,468 @@ obj_list_t* parse_filter(const char *str,
pack_opt_t *options,
int *is_glb)
{
- unsigned i, u;
- char c;
- size_t len=HDstrlen(str);
- int j, m, n, k, l, end_obj=-1, no_param=0;
- char sobj[MAX_NC_NAME];
- char scomp[10];
- char stype[5];
- char smask[3];
- obj_list_t* obj_list=NULL;
- unsigned pixels_per_block;
-
-
- /* initialize compression info */
- HDmemset(filt,0,sizeof(filter_info_t));
- *is_glb = 0;
-
- /* check for the end of object list and number of objects */
- for ( i = 0, n = 0; i < len; i++)
- {
- c = str[i];
- if ( c==':' )
- {
- end_obj=i;
- }
- if ( c==',' )
- {
- n++;
- }
- }
-
- if (end_obj==-1) /* missing : */
- {
- /* apply to all objects */
- options->all_filter=1;
- *is_glb = 1;
- }
-
- n++;
- obj_list = (obj_list_t*) HDmalloc(n*sizeof(obj_list_t));
- if (obj_list==NULL)
- {
- error_msg("could not allocate object list\n");
- return NULL;
- }
- *n_objs=n;
-
- /* get object list */
- for ( j = 0, k = 0, n = 0; j < end_obj; j++, k++)
- {
- c = str[j];
- sobj[k] = c;
- if ( c==',' || j==end_obj-1)
- {
- if ( c==',') sobj[k]='\0'; else sobj[k+1]='\0';
- HDstrcpy(obj_list[n].obj,sobj);
- HDmemset(sobj,0,sizeof(sobj));
- n++;
- k=-1;
- }
- }
- /* nothing after : */
- if (end_obj+1==(int)len)
- {
- if (obj_list) HDfree(obj_list);
- error_msg("input Error: Invalid compression type in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
-
-
- /* get filter additional parameters */
- m=0;
- for ( i=end_obj+1, k=0, j=0; i<len; i++,k++)
- {
- c = str[i];
- scomp[k]=c;
- if ( c=='=' || i==len-1)
- {
- if ( c=='=') /*one more parameter */
- {
- scomp[k]='\0'; /*cut space */
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SZIP
- * szip has the format SZIP=<pixels per block,coding>
- * pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN'
- * example SZIP=8,NN
- *-------------------------------------------------------------------------
- */
- if (HDstrcmp(scomp,"SZIP")==0)
- {
- l=-1; /* mask index check */
- for ( m=0,u=i+1; u<len; u++,m++)
- {
- if (str[u]==',')
- {
- stype[m]='\0'; /* end digit of szip */
- l=0; /* start EC or NN search */
- u++; /* skip ',' */
- }
- c = str[u];
- if (!isdigit(c) && l==-1){
- if (obj_list) HDfree(obj_list);
- error_msg("compression parameter not digit in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- if (l==-1)
- stype[m]=c;
- else
- {
- smask[l]=c;
- l++;
- if (l==2)
- {
- smask[l]='\0';
- i=len-1; /* end */
- (*n_objs)--; /* we counted an extra ',' */
- if (HDstrcmp(smask,"NN")==0)
- filt->cd_values[j++]=H5_SZIP_NN_OPTION_MASK;
- else if (HDstrcmp(smask,"EC")==0)
- filt->cd_values[j++]=H5_SZIP_EC_OPTION_MASK;
- else
- {
- error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
- }
-
-
- }
- }
-
- } /* u */
- } /*if */
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SCALEOFFSET
- * scaleoffset has the format SOFF=<scale_factor,scale_type>
- * scale_type can be
- * integer datatype, H5Z_SO_INT (IN)
- * float datatype using D-scaling method, H5Z_SO_FLOAT_DSCALE (DS)
- * float datatype using E-scaling method, H5Z_SO_FLOAT_ESCALE (ES) , not yet implemented
- * for integer datatypes, scale_factor denotes Minimum Bits
- * for float datatypes, scale_factor denotes decimal scale factor
- * examples
- * SOFF=31,IN
- * SOFF=3,DF
- *-------------------------------------------------------------------------
- */
-
- else if (HDstrcmp(scomp,"SOFF")==0)
- {
- l=-1; /* mask index check */
- for ( m=0,u=i+1; u<len; u++,m++)
- {
- if (str[u]==',')
- {
- stype[m]='\0'; /* end digit */
- l=0; /* start 'IN' , 'DS', or 'ES' search */
- u++; /* skip ',' */
- }
- c = str[u];
- if (!isdigit(c) && l==-1){
- if (obj_list) HDfree(obj_list);
- error_msg("compression parameter is not a digit in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- if (l==-1)
- stype[m]=c;
- else
- {
- smask[l]=c;
- l++;
- if (l==2)
- {
- smask[l]='\0';
- i=len-1; /* end */
- (*n_objs)--; /* we counted an extra ',' */
- if (HDstrcmp(smask,"IN")==0)
- filt->cd_values[j++]=H5Z_SO_INT;
- else if (HDstrcmp(smask,"DS")==H5Z_SO_FLOAT_DSCALE)
- filt->cd_values[j++]=H5Z_SO_FLOAT_DSCALE;
- else
- {
- error_msg("scale type must be 'IN' or 'DS' \n");
- HDexit(EXIT_FAILURE);
- }
-
- }
- }
-
- } /* u */
- } /*if */
-
-
- /*-------------------------------------------------------------------------
- * all other filters
- *-------------------------------------------------------------------------
- */
-
- else
- {
- /* here we could have 1 or 2 digits */
- for ( m=0,u=i+1; u<len; u++,m++)
- {
- c = str[u];
- if (!isdigit(c)){
- if (obj_list) HDfree(obj_list);
- error_msg("compression parameter is not a digit in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- stype[m]=c;
- } /* u */
-
- stype[m]='\0';
- } /*if */
-
-
-
- filt->cd_values[j++]=atoi(stype);
- i+=m; /* jump */
- }
- else if (i==len-1)
- { /*no more parameters */
- scomp[k+1]='\0';
- no_param=1;
- }
-
- /*-------------------------------------------------------------------------
- * translate from string to filter symbol
- *-------------------------------------------------------------------------
- */
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_NONE
- *-------------------------------------------------------------------------
- */
- if (HDstrcmp(scomp,"NONE")==0)
- {
- filt->filtn=H5Z_FILTER_NONE;
- filt->cd_nelmts = 0;
- }
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_DEFLATE
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"GZIP")==0)
- {
- filt->filtn=H5Z_FILTER_DEFLATE;
- filt->cd_nelmts = 1;
- if (no_param)
- { /*no more parameters, GZIP must have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("missing compression parameter in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SZIP
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"SZIP")==0)
- {
- filt->filtn=H5Z_FILTER_SZIP;
- filt->cd_nelmts = 2;
- if (no_param)
- { /*no more parameters, SZIP must have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("missing compression parameter in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SHUFFLE
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"SHUF")==0)
- {
- filt->filtn=H5Z_FILTER_SHUFFLE;
- filt->cd_nelmts = 0;
- if (m>0)
- { /*shuffle does not have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("extra parameter in SHUF <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_FLETCHER32
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"FLET")==0)
- {
- filt->filtn=H5Z_FILTER_FLETCHER32;
- filt->cd_nelmts = 0;
- if (m>0)
- { /*shuffle does not have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("extra parameter in FLET <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_NBIT
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"NBIT")==0)
- {
- filt->filtn=H5Z_FILTER_NBIT;
- filt->cd_nelmts = 0;
- if (m>0)
- { /*nbit does not have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("extra parameter in NBIT <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SCALEOFFSET
- *-------------------------------------------------------------------------
- */
- else if (HDstrcmp(scomp,"SOFF")==0)
- {
- filt->filtn=H5Z_FILTER_SCALEOFFSET;
- filt->cd_nelmts = 2;
- if (no_param)
- { /*no more parameters, SOFF must have parameter */
- if (obj_list) HDfree(obj_list);
- error_msg("missing compression parameter in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
- else {
- if (obj_list) HDfree(obj_list);
- error_msg("invalid filter type in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- }
- } /*i*/
-
- /*-------------------------------------------------------------------------
- * check valid parameters
- *-------------------------------------------------------------------------
- */
-
- switch (filt->filtn)
- {
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_DEFLATE
- *-------------------------------------------------------------------------
- */
-
- case H5Z_FILTER_DEFLATE:
- if (filt->cd_values[0]>9 )
- {
- if (obj_list) HDfree(obj_list);
- error_msg("invalid compression parameter in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- break;
-
- /*-------------------------------------------------------------------------
- * H5Z_FILTER_SZIP
- *-------------------------------------------------------------------------
- */
-
- case H5Z_FILTER_SZIP:
- pixels_per_block=filt->cd_values[0];
- if ((pixels_per_block%2)==1)
- {
- if (obj_list) HDfree(obj_list);
- error_msg("pixels_per_block is not even in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
- {
- if (obj_list) HDfree(obj_list);
- error_msg("pixels_per_block is too large in <%s>\n",str);
- HDexit(EXIT_FAILURE);
- }
- if ( (HDstrcmp(smask,"NN")!=0) && (HDstrcmp(smask,"EC")!=0) )
- {
- if (obj_list) HDfree(obj_list);
- error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
- }
- break;
- default:
- break;
-
-
- };
-
- return obj_list;
+ unsigned i, u;
+ char c;
+ size_t len=HDstrlen(str);
+ int j, m, n, k, l, p, r, q, end_obj=-1, no_param=0;
+ char sobj[MAX_NC_NAME];
+ char scomp[10];
+ char stype[5];
+ char smask[3];
+ obj_list_t* obj_list=NULL;
+ unsigned pixels_per_block;
+
+
+ /* initialize compression info */
+ HDmemset(filt,0,sizeof(filter_info_t));
+ *is_glb = 0;
+
+ /* check for the end of object list and number of objects */
+ for ( i = 0, n = 0; i < len; i++)
+ {
+ c = str[i];
+ if ( c==':' )
+ {
+ end_obj=i;
+ }
+ if ( c==',' )
+ {
+ n++;
+ }
+ }
+
+ if (end_obj==-1) /* missing : */
+ {
+ /* apply to all objects */
+ options->all_filter=1;
+ *is_glb = 1;
+ }
+
+ n++;
+ obj_list = (obj_list_t*) HDmalloc(n*sizeof(obj_list_t));
+ if (obj_list==NULL)
+ {
+ error_msg("could not allocate object list\n");
+ return NULL;
+ }
+ *n_objs=n;
+
+ /* get object list */
+ for ( j = 0, k = 0, n = 0; j < end_obj; j++, k++)
+ {
+ c = str[j];
+ sobj[k] = c;
+ if ( c==',' || j==end_obj-1)
+ {
+ if ( c==',') sobj[k]='\0'; else sobj[k+1]='\0';
+ HDstrcpy(obj_list[n].obj,sobj);
+ HDmemset(sobj,0,sizeof(sobj));
+ n++;
+ k=-1;
+ }
+ }
+ /* nothing after : */
+ if (end_obj+1==(int)len)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("input Error: Invalid compression type in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+
+
+ /* get filter additional parameters */
+ m=0;
+ for ( i=end_obj+1, k=0, j=0; i<len; i++,k++)
+ {
+ c = str[i];
+ scomp[k]=c;
+ if ( c=='=' || i==len-1)
+ {
+ if ( c=='=') /*one more parameter */
+ {
+ scomp[k]='\0'; /*cut space */
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SZIP
+ * szip has the format SZIP=<pixels per block,coding>
+ * pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN'
+ * example SZIP=8,NN
+ *-------------------------------------------------------------------------
+ */
+ if (HDstrcmp(scomp,"SZIP")==0)
+ {
+ l=-1; /* mask index check */
+ for ( m=0,u=i+1; u<len; u++,m++)
+ {
+ if (str[u]==',')
+ {
+ stype[m]='\0'; /* end digit of szip */
+ l=0; /* start EC or NN search */
+ u++; /* skip ',' */
+ }
+ c = str[u];
+ if (!isdigit(c) && l==-1)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("compression parameter not digit in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ if (l==-1)
+ stype[m]=c;
+ else
+ {
+ smask[l]=c;
+ l++;
+ if (l==2)
+ {
+ smask[l]='\0';
+ i=len-1; /* end */
+ (*n_objs)--; /* we counted an extra ',' */
+ if (HDstrcmp(smask,"NN")==0)
+ filt->cd_values[j++]=H5_SZIP_NN_OPTION_MASK;
+ else if (HDstrcmp(smask,"EC")==0)
+ filt->cd_values[j++]=H5_SZIP_EC_OPTION_MASK;
+ else
+ {
+ error_msg("szip mask must be 'NN' or 'EC' \n");
+ HDexit(EXIT_FAILURE);
+ }
+
+
+ }
+ }
+
+ } /* u */
+ } /*if */
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SCALEOFFSET
+ * scaleoffset has the format SOFF=<scale_factor,scale_type>
+ * scale_type can be
+ * integer datatype, H5Z_SO_INT (IN)
+ * float datatype using D-scaling method, H5Z_SO_FLOAT_DSCALE (DS)
+ * float datatype using E-scaling method, H5Z_SO_FLOAT_ESCALE (ES) , not yet implemented
+ * for integer datatypes, scale_factor denotes Minimum Bits
+ * for float datatypes, scale_factor denotes decimal scale factor
+ * examples
+ * SOFF=31,IN
+ * SOFF=3,DF
+ *-------------------------------------------------------------------------
+ */
+
+ else if (HDstrcmp(scomp,"SOFF")==0)
+ {
+ l=-1; /* mask index check */
+ for ( m=0,u=i+1; u<len; u++,m++)
+ {
+ if (str[u]==',')
+ {
+ stype[m]='\0'; /* end digit */
+ l=0; /* start 'IN' , 'DS', or 'ES' search */
+ u++; /* skip ',' */
+ }
+ c = str[u];
+ if (!isdigit(c) && l==-1)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("compression parameter is not a digit in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ if (l==-1)
+ stype[m]=c;
+ else
+ {
+ smask[l]=c;
+ l++;
+ if (l==2)
+ {
+ smask[l]='\0';
+ i=len-1; /* end */
+ (*n_objs)--; /* we counted an extra ',' */
+ if (HDstrcmp(smask,"IN")==0)
+ filt->cd_values[j++]=H5Z_SO_INT;
+ else if (HDstrcmp(smask,"DS")==H5Z_SO_FLOAT_DSCALE)
+ filt->cd_values[j++]=H5Z_SO_FLOAT_DSCALE;
+ else
+ {
+ error_msg("scale type must be 'IN' or 'DS' \n");
+ HDexit(EXIT_FAILURE);
+ }
+
+ }
+ }
+
+ } /* u */
+ } /*if */
+ /*-------------------------------------------------------------------------
+ * User Defined
+ * has the format UD=<filter_number,cd_value_count,value_1[,value_2,...,value_N]>
+ * BZIP2 example
+ * UD=307,1,9
+ *-------------------------------------------------------------------------
+ */
+
+ else if (HDstrcmp(scomp,"UD")==0)
+ {
+ l=-1; /* filter number index check */
+ p=-1; /* CD_VAL count check */
+ r=-1; /* CD_VAL check */
+ for ( m=0,q=0,u=i+1; u<len; u++,m++,q++)
+ {
+ if (str[u]==',')
+ {
+ stype[q]='\0'; /* end digit */
+ if (l==-1)
+ {
+ filt->filtn=atoi(stype);
+ l=0;
+ }
+ else if (p==-1)
+ {
+ filt->cd_nelmts=atoi(stype);
+ p=0;
+ }
+ else
+ r=0;
+ q=0;
+ u++; /* skip ',' */
+ }
+ c = str[u];
+ if (!isdigit(c) && l==-1)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("filter number parameter is not a digit in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ stype[q]=c;
+ if (l==0 && p==0)
+ {
+ if (r==0)
+ filt->cd_values[j++]=atoi(stype);
+ }
+
+ } /* u */
+
+ stype[q]='\0';
+ } /*if */
+
+
+ /*-------------------------------------------------------------------------
+ * all other filters
+ *-------------------------------------------------------------------------
+ */
+
+ else
+ {
+ /* here we could have 1 or 2 digits */
+ for ( m=0,u=i+1; u<len; u++,m++)
+ {
+ c = str[u];
+ if (!isdigit(c)){
+ if (obj_list) HDfree(obj_list);
+ error_msg("compression parameter is not a digit in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ stype[m]=c;
+ } /* u */
+
+ stype[m]='\0';
+ } /*if */
+
+
+
+ filt->cd_values[j++]=atoi(stype);
+ i+=m; /* jump */
+ }
+ else if (i==len-1)
+ { /*no more parameters */
+ scomp[k+1]='\0';
+ no_param=1;
+ }
+
+ /*-------------------------------------------------------------------------
+ * translate from string to filter symbol
+ *-------------------------------------------------------------------------
+ */
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_NONE
+ *-------------------------------------------------------------------------
+ */
+ if (HDstrcmp(scomp,"NONE")==0)
+ {
+ filt->filtn=H5Z_FILTER_NONE;
+ filt->cd_nelmts = 0;
+ }
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_DEFLATE
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"GZIP")==0)
+ {
+ filt->filtn=H5Z_FILTER_DEFLATE;
+ filt->cd_nelmts = 1;
+ if (no_param)
+ { /*no more parameters, GZIP must have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("missing compression parameter in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SZIP
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"SZIP")==0)
+ {
+ filt->filtn=H5Z_FILTER_SZIP;
+ filt->cd_nelmts = 2;
+ if (no_param)
+ { /*no more parameters, SZIP must have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("missing compression parameter in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SHUFFLE
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"SHUF")==0)
+ {
+ filt->filtn=H5Z_FILTER_SHUFFLE;
+ filt->cd_nelmts = 0;
+ if (m>0)
+ { /*shuffle does not have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("extra parameter in SHUF <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_FLETCHER32
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"FLET")==0)
+ {
+ filt->filtn=H5Z_FILTER_FLETCHER32;
+ filt->cd_nelmts = 0;
+ if (m>0)
+ { /*shuffle does not have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("extra parameter in FLET <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_NBIT
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"NBIT")==0)
+ {
+ filt->filtn=H5Z_FILTER_NBIT;
+ filt->cd_nelmts = 0;
+ if (m>0)
+ { /*nbit does not have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("extra parameter in NBIT <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SCALEOFFSET
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"SOFF")==0)
+ {
+ filt->filtn=H5Z_FILTER_SCALEOFFSET;
+ filt->cd_nelmts = 2;
+ if (no_param)
+ { /*no more parameters, SOFF must have parameter */
+ if (obj_list) HDfree(obj_list);
+ error_msg("missing compression parameter in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ /*-------------------------------------------------------------------------
+ * User Defined Filter
+ *-------------------------------------------------------------------------
+ */
+ else if (HDstrcmp(scomp,"UD")==0)
+ {
+ if (filt->cd_nelmts != j)
+ { /* parameters does not match count */
+ if (obj_list) HDfree(obj_list);
+ error_msg("incorrect number of compression parameters in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ else {
+ if (obj_list) HDfree(obj_list);
+ error_msg("invalid filter type in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ }
+ } /*i*/
+
+ /*-------------------------------------------------------------------------
+ * check valid parameters
+ *-------------------------------------------------------------------------
+ */
+
+ switch (filt->filtn)
+ {
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_DEFLATE
+ *-------------------------------------------------------------------------
+ */
+
+ case H5Z_FILTER_DEFLATE:
+ if (filt->cd_values[0]>9 )
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("invalid compression parameter in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ break;
+
+ /*-------------------------------------------------------------------------
+ * H5Z_FILTER_SZIP
+ *-------------------------------------------------------------------------
+ */
+
+ case H5Z_FILTER_SZIP:
+ pixels_per_block=filt->cd_values[0];
+ if ((pixels_per_block%2)==1)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("pixels_per_block is not even in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("pixels_per_block is too large in <%s>\n",str);
+ HDexit(EXIT_FAILURE);
+ }
+ if ( (HDstrcmp(smask,"NN")!=0) && (HDstrcmp(smask,"EC")!=0) )
+ {
+ if (obj_list) HDfree(obj_list);
+ error_msg("szip mask must be 'NN' or 'EC' \n");
+ HDexit(EXIT_FAILURE);
+ }
+ break;
+ default:
+ break;
+
+
+ };
+
+ return obj_list;
}
diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in
new file mode 100644
index 0000000..a45d1fe
--- /dev/null
+++ b/tools/h5repack/h5repack_plugin.sh.in
@@ -0,0 +1,238 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic document set and is
+# linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
+# to either file, you may request a copy from help@hdfgroup.org.
+#
+srcdir=@srcdir@
+TOP_BUILDDIR=@top_builddir@
+
+# Determine backward compatibility options enabled
+DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+H5REPACK=h5repack # The tool name
+H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary
+
+H5DUMP=../h5dump/h5dump # The h5dump tool name
+H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
+
+nerrors=0
+verbose=yes
+exit_code=$EXIT_SUCCESS
+
+TEST_NAME=ud_plugin
+FROM_DIR=`pwd`/.libs
+PLUGIN_LIB="$FROM_DIR/libdynlibadd.*"
+PLUGIN_LIBDIR=testdir3
+RM="rm -rf"
+
+GREP='grep'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+# source dirs
+SRC_TOOLS="$srcdir/.."
+
+# testfiles source dirs for tools
+SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
+
+TESTDIR=testfiles
+test -d $TESTDIR || mkdir $TESTDIR
+
+######################################################################
+# test files
+# --------------------------------------------------------------------
+# All the test files copy from source directory to test directory
+# NOTE: Keep this framework to add/remove test files.
+# Any test files from other tools can be used in this framework.
+# This list are also used for checking exist.
+# Comment '#' without space can be used.
+# --------------------------------------------------------------------
+LIST_HDF5_TEST_FILES="
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl
+$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst
+"
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES"
+
+# Main Body
+# Create test directories if not exists yet.
+test -d $PLUGIN_LIBDIR || mkdir -p $PLUGIN_LIBDIR
+if [ $? != 0 ]; then
+ echo "Failed to create test directory($PLUGIN_LIBDIR)"
+ exit $EXIT_FAILURE
+fi
+
+# copy plugin library for test
+$CP $PLUGIN_LIB $PLUGIN_LIBDIR
+if [ $? != 0 ]; then
+ echo "Failed to copy plugin library ($PLUGIN_LIB) for test."
+ exit $EXIT_FAILURE
+fi
+
+# setup plugin path
+ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR}"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
+}
+
+# Print a $* message left justified in a field of 70 characters
+#
+MESSAGE() {
+ SPACES=" "
+ echo "$* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Verifying".
+#
+VERIFY() {
+ MESSAGE "Verifying $*"
+}
+
+# This is different from $srcdir/../../bin/output_filter.sh
+STDOUT_FILTER() {
+ result_file=$1
+ tmp_file=/tmp/h5test_tmp_$$
+ # Filter name of files.
+ cp $result_file $tmp_file
+ sed -e '/^Opening file/d' -e '/^Making file/d' \
+ < $tmp_file > $result_file
+ # cleanup
+ rm -f $tmp_file
+}
+
+# This runs h5repack comparing output with h5dump output
+# from -pH option
+#
+TOOLTEST_DUMP()
+{
+ echo $@
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ expect1="$TESTDIR/$1.$2.tst"
+ actual1="$TESTDIR/$1.$2.out"
+ actual1_err="$TESTDIR/$1.$2.err"
+ expect2="$TESTDIR/$2-$1.ddl"
+ actual2="$TESTDIR/$2-$1.out"
+ actual2_err="$TESTDIR/$2-$1.err"
+
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $ENVCMD $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual1 2>$actual1_err
+ RET=$?
+ STDOUT_FILTER $actual1
+ cat $actual1_err >> $actual1
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ if cmp -s $expect1 $actual1; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.tst) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect1 $actual1 |sed 's/^/ /'
+ fi
+ VERIFY h5dump output -pH $outfile
+ (
+ $ENVCMD $H5DUMP_BIN -pH $outfile
+ ) >$actual2 2>$actual2_err
+ RET=$?
+ cat $actual2_err >> $actual2
+
+ if cmp -s $expect2 $actual2; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect2 $actual2 |sed 's/^/ /'
+ fi
+
+ fi
+
+
+ rm -f $actual1 $actual1_err $actual2 $actual2_err
+ rm -f $outfile
+}
+
+##############################################################################
+### T H E T E S T S
+##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
+
+# Run the test
+arg="h5repack_layout.h5 -v -f UD=257,1,9"
+TOOLTEST_DUMP plugin_test $arg
+
+# print results
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit_code=$EXIT_FAILURE
+else
+ echo "All Plugin API tests passed."
+ exit_code=$EXIT_SUCCESS
+fi
+
+# Clean up temporary files/directories and leave
+$RM $PLUGIN_LIBDIR
+exit $exit_code
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index a57295b..42799f9 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -601,6 +601,9 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter)
switch (filtn)
{
+ case H5Z_FILTER_NONE:
+ break;
+
case H5Z_FILTER_SHUFFLE:
/* 1 private client value is returned by DCPL */
@@ -677,7 +680,17 @@ int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *filter)
break;
default:
- /* filter has no local values */
+ if ( cd_nelmts != filter[i].cd_nelmts)
+ return 0;
+
+ for( j = 0; j < cd_nelmts; j++)
+ {
+ if (cd_values[j] != filter[i].cd_values[j])
+ {
+ return 0;
+ }
+
+ }
break;
} /* switch */
diff --git a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
new file mode 100644
index 0000000..d380201
--- /dev/null
+++ b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
@@ -0,0 +1,130 @@
+HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset3" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_chunk" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 20, 10 )
+ SIZE 1283 (2.494:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_compact" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_contiguous" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+}
+}
diff --git a/tools/h5repack/testfiles/h5repack-help.txt b/tools/h5repack/testfiles/h5repack-help.txt
new file mode 100644
index 0000000..6de1eb4
--- /dev/null
+++ b/tools/h5repack/testfiles/h5repack-help.txt
@@ -0,0 +1,122 @@
+usage: h5repack [OPTIONS] file1 file2
+ file1 Input HDF5 File
+ file2 Output HDF5 File
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -v, --verbose Verbose mode, print object information
+ -V, --version Print version number and exit
+ -n, --native Use a native HDF5 type when repacking
+ -L, --latest Use latest version of file format
+ -c L1, --compact=L1 Maximum number of links in header messages
+ -d L2, --indexed=L2 Minimum number of links in the indexed format
+ -s S[:F], --ssize=S[:F] Shared object header message minimum size
+ -m M, --minimum=M Do not apply the filter to datasets smaller than M
+ -e E, --file=E Name of file E with the -f and -l options
+ -u U, --ublock=U Name of file U with user block data to be added
+ -b B, --block=B Size of user block to be added
+ -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size
+ -t T, --threshold=T Threshold value for H5Pset_alignment
+ -a A, --alignment=A Alignment value for H5Pset_alignment
+ -f FILT, --filter=FILT Filter type
+ -l LAYT, --layout=LAYT Layout type
+ -S FS_STRGY, --fs_strategy=FS_STRGY File space management strategy
+ -T FS_THRD, --fs_threshold=FS_THRD Free-space section threshold
+
+ M - is an integer greater than 1, size of dataset in bytes (default is 0)
+ E - is a filename.
+ S - is an integer
+ U - is a filename.
+ T - is an integer
+ A - is an integer greater than zero
+ B - is the user block size, any value that is 512 or greater and is
+ a power of 2 (1024 default)
+ F - is the shared object header message type, any of <dspace|dtype|fill|
+ pline|attr>. If F is not specified, S applies to all messages
+
+ FS_STRGY is the file space management strategy to use for the output file.
+ It is a string as listed below:
+ ALL_PERSIST - Use persistent free-space managers, aggregators and virtual file driver
+ for file space allocation
+ ALL - Use non-persistent free-space managers, aggregators and virtual file driver
+ for file space allocation
+ AGGR_VFD - Use aggregators and virtual file driver for file space allocation
+ VFD - Use virtual file driver for file space allocation
+
+ FS_THRD is the free-space section threshold to use for the output file.
+ It is the minimum size (in bytes) of free-space sections to be tracked
+ by the the library's free-space managers.
+
+ FILT - is a string with the format:
+
+ <list of objects>:<name of filter>=<filter parameters>
+
+ <list of objects> is a comma separated list of object names, meaning apply
+ compression only to those objects. If no names are specified, the filter
+ is applied to all objects
+ <name of filter> can be:
+ GZIP, to apply the HDF5 GZIP filter (GZIP compression)
+ SZIP, to apply the HDF5 SZIP filter (SZIP compression)
+ SHUF, to apply the HDF5 shuffle filter
+ FLET, to apply the HDF5 checksum filter
+ NBIT, to apply the HDF5 NBIT filter (NBIT compression)
+ SOFF, to apply the HDF5 Scale/Offset filter
+ UD, to apply a user defined filter
+ NONE, to remove all filters
+ <filter parameters> is optional filter parameter information
+ GZIP=<deflation level> from 1-9
+ SZIP=<pixels per block,coding> pixels per block is a even number in
+ 2-32 and coding method is either EC or NN
+ SHUF (no parameter)
+ FLET (no parameter)
+ NBIT (no parameter)
+ SOFF=<scale_factor,scale_type> scale_factor is an integer and scale_type
+ is either IN or DS
+ UD=<filter_number,cd_value_count,value_1[,value_2,...,value_N]>
+ required values for filter_number,cd_value_count,value_1
+ optional values for value_2 to value_N
+ NONE (no parameter)
+
+ LAYT - is a string with the format:
+
+ <list of objects>:<layout type>=<layout parameters>
+
+ <list of objects> is a comma separated list of object names, meaning that
+ layout information is supplied for those objects. If no names are
+ specified, the layout type is applied to all objects
+ <layout type> can be:
+ CHUNK, to apply chunking layout
+ COMPA, to apply compact layout
+ CONTI, to apply contiguous layout
+ <layout parameters> is optional layout information
+ CHUNK=DIM[xDIM...xDIM], the chunk size of each dimension
+ COMPA (no parameter)
+ CONTI (no parameter)
+
+Examples of use:
+
+1) h5repack -v -f GZIP=1 file1 file2
+
+ GZIP compression with level 1 to all objects
+
+2) h5repack -v -f A:SZIP=8,NN file1 file2
+
+ SZIP compression with 8 pixels per block and NN coding method to object A
+
+3) h5repack -v -l A,B:CHUNK=20x10 -f C,D,F:NONE file1 file2
+
+ Chunked layout, with a layout size of 20x10, to objects A and B
+ and remove filters to objects C, D, F
+
+4) h5repack -L -c 10 -s 20:dtype file1 file2
+
+ Using latest file format with maximum compact group size of 10 and
+ and minimum shared datatype size of 20
+
+5) h5repack -f SHUF -f GZIP=1 file1 file2
+
+ Add both filters SHUF and GZIP in this order to all datasets
+
+6) h5repack -f UD=307,1,9 file1 file2
+
+ Add bzip2 filter to all datasets
+
diff --git a/tools/testfiles/h5repack_filters.h5.ddl b/tools/h5repack/testfiles/h5repack_filters.h5.tst
index 36e65b9..36e65b9 100644
--- a/tools/testfiles/h5repack_filters.h5.ddl
+++ b/tools/h5repack/testfiles/h5repack_filters.h5.tst
diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
new file mode 100644
index 0000000..a7ba967
--- /dev/null
+++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
@@ -0,0 +1,158 @@
+HDF5 "testfiles/out-plugin_test.h5repack_layout.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset3" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_chunk" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 20, 10 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_compact" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_contiguous" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 3200 (1.000:1 COMPRESSION)
+ }
+ FILTERS {
+ USER_DEFINED_FILTER {
+ FILTER_ID 257
+ COMMENT dynlib1
+ PARAMS { 9 }
+ }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+}
+}
diff --git a/tools/h5repack/testfiles/h5repack_layout.h5.ddl b/tools/h5repack/testfiles/h5repack_layout.h5.ddl
index d380201..00c74f4 100644
--- a/tools/h5repack/testfiles/h5repack_layout.h5.ddl
+++ b/tools/h5repack/testfiles/h5repack_layout.h5.ddl
@@ -1,129 +1,605 @@
-HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" {
+HDF5 "h5repack_layout.h5" {
GROUP "/" {
DATASET "dset1" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset2" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset3" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset4" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset_chunk" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
- STORAGE_LAYOUT {
- CHUNKED ( 20, 10 )
- SIZE 1283 (2.494:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset_compact" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
DATASET "dset_contiguous" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
- STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
- }
- FILTERS {
- COMPRESSION DEFLATE { LEVEL 1 }
- }
- FILLVALUE {
- FILL_TIME H5D_FILL_TIME_IFSET
- VALUE 0
- }
- ALLOCATION_TIME {
- H5D_ALLOC_TIME_INCR
+ DATA {
+ (0,0): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ (0,18): 18, 19,
+ (1,0): 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ (1,16): 36, 37, 38, 39,
+ (2,0): 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ (2,16): 56, 57, 58, 59,
+ (3,0): 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ (3,16): 76, 77, 78, 79,
+ (4,0): 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ (4,16): 96, 97, 98, 99,
+ (5,0): 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
+ (5,13): 113, 114, 115, 116, 117, 118, 119,
+ (6,0): 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ (6,13): 133, 134, 135, 136, 137, 138, 139,
+ (7,0): 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
+ (7,13): 153, 154, 155, 156, 157, 158, 159,
+ (8,0): 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ (8,13): 173, 174, 175, 176, 177, 178, 179,
+ (9,0): 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ (9,13): 193, 194, 195, 196, 197, 198, 199,
+ (10,0): 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ (10,12): 212, 213, 214, 215, 216, 217, 218, 219,
+ (11,0): 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ (11,12): 232, 233, 234, 235, 236, 237, 238, 239,
+ (12,0): 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ (12,12): 252, 253, 254, 255, 256, 257, 258, 259,
+ (13,0): 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ (13,12): 272, 273, 274, 275, 276, 277, 278, 279,
+ (14,0): 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ (14,12): 292, 293, 294, 295, 296, 297, 298, 299,
+ (15,0): 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ (15,12): 312, 313, 314, 315, 316, 317, 318, 319,
+ (16,0): 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ (16,12): 332, 333, 334, 335, 336, 337, 338, 339,
+ (17,0): 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ (17,12): 352, 353, 354, 355, 356, 357, 358, 359,
+ (18,0): 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ (18,12): 372, 373, 374, 375, 376, 377, 378, 379,
+ (19,0): 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ (19,12): 392, 393, 394, 395, 396, 397, 398, 399,
+ (20,0): 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ (20,12): 412, 413, 414, 415, 416, 417, 418, 419,
+ (21,0): 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ (21,12): 432, 433, 434, 435, 436, 437, 438, 439,
+ (22,0): 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ (22,12): 452, 453, 454, 455, 456, 457, 458, 459,
+ (23,0): 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ (23,12): 472, 473, 474, 475, 476, 477, 478, 479,
+ (24,0): 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ (24,12): 492, 493, 494, 495, 496, 497, 498, 499,
+ (25,0): 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ (25,12): 512, 513, 514, 515, 516, 517, 518, 519,
+ (26,0): 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ (26,12): 532, 533, 534, 535, 536, 537, 538, 539,
+ (27,0): 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ (27,12): 552, 553, 554, 555, 556, 557, 558, 559,
+ (28,0): 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ (28,12): 572, 573, 574, 575, 576, 577, 578, 579,
+ (29,0): 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ (29,12): 592, 593, 594, 595, 596, 597, 598, 599,
+ (30,0): 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ (30,12): 612, 613, 614, 615, 616, 617, 618, 619,
+ (31,0): 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ (31,12): 632, 633, 634, 635, 636, 637, 638, 639,
+ (32,0): 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ (32,12): 652, 653, 654, 655, 656, 657, 658, 659,
+ (33,0): 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ (33,12): 672, 673, 674, 675, 676, 677, 678, 679,
+ (34,0): 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ (34,12): 692, 693, 694, 695, 696, 697, 698, 699,
+ (35,0): 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ (35,12): 712, 713, 714, 715, 716, 717, 718, 719,
+ (36,0): 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ (36,12): 732, 733, 734, 735, 736, 737, 738, 739,
+ (37,0): 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ (37,12): 752, 753, 754, 755, 756, 757, 758, 759,
+ (38,0): 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
+ (38,12): 772, 773, 774, 775, 776, 777, 778, 779,
+ (39,0): 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791,
+ (39,12): 792, 793, 794, 795, 796, 797, 798, 799
}
}
}
diff --git a/tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst b/tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
new file mode 100644
index 0000000..7f9bd6e
--- /dev/null
+++ b/tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst
@@ -0,0 +1,14 @@
+Objects to modify layout are...
+Objects to apply filter are...
+ User Defined 257
+-----------------------------------------
+ Type Filter (Compression) Name
+-----------------------------------------
+ group /
+ dset UD (1.000:1) /dset1
+ dset UD (1.000:1) /dset2
+ dset UD (1.000:1) /dset3
+ dset UD (1.000:1) /dset4
+ dset UD (1.000:1) /dset_chunk
+ dset UD (1.000:1) /dset_compact
+ dset UD (1.000:1) /dset_contiguous