summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-10-06 18:31:47 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-10-06 18:31:47 (GMT)
commit2ec9b447ec40c6a6486cbd2f577083fc905556fa (patch)
tree151498ddaec775d775b87d14515381351ec56f79 /tools
parentd05369f41d078275b9f8879283ff9504a6a9f520 (diff)
parentdb00c23829fb80c35709be1b6de5781e51a134e0 (diff)
downloadhdf5-2ec9b447ec40c6a6486cbd2f577083fc905556fa.zip
hdf5-2ec9b447ec40c6a6486cbd2f577083fc905556fa.tar.gz
hdf5-2ec9b447ec40c6a6486cbd2f577083fc905556fa.tar.bz2
[svn-r27972] merge from trunk.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5diff/CMakeTests.cmake132
-rw-r--r--tools/h5diff/testfiles/h5diff_v1.txt18
-rw-r--r--tools/h5diff/testfiles/h5diff_v2.txt7
-rw-r--r--tools/h5diff/testfiles/h5diff_v3.txt4
-rw-r--r--tools/h5diff/testh5diff.sh.in30
-rw-r--r--tools/h5dump/CMakeLists.txt2
-rw-r--r--tools/h5dump/CMakeTestsVDS.cmake238
-rw-r--r--tools/h5dump/Makefile.am4
-rw-r--r--tools/h5dump/testh5dumpvds.sh.in505
-rw-r--r--tools/h5ls/CMakeLists.txt2
-rw-r--r--tools/h5ls/CMakeTestsVDS.cmake149
-rw-r--r--tools/h5ls/Makefile.am2
-rw-r--r--tools/h5ls/h5ls.c28
-rw-r--r--tools/h5ls/testh5lsvds.sh.in258
-rw-r--r--tools/h5repack/CMakeTests.cmake151
-rw-r--r--tools/h5repack/h5repack.sh.in43
-rw-r--r--tools/h5stat/h5stat.c4
-rw-r--r--tools/h5stat/testfiles/h5stat_dims1.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_dims2.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-d.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_filters-dT.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_filters.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_links2.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_newgrat.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_numattrs2.ddl1
-rw-r--r--tools/h5stat/testfiles/h5stat_tsohm.ddl1
-rw-r--r--tools/lib/h5tools.h19
-rw-r--r--tools/lib/h5tools_dump.c222
-rw-r--r--tools/lib/h5tools_str.c99
-rw-r--r--tools/lib/h5tools_str.h5
-rw-r--r--tools/misc/CMakeLists.txt3
-rw-r--r--tools/misc/Makefile.am2
-rw-r--r--tools/misc/vds/CMakeLists.txt28
-rw-r--r--tools/misc/vds/Makefile.am38
-rw-r--r--tools/misc/vds/UC_1.h150
-rw-r--r--tools/misc/vds/UC_1_one_dim_gen.c239
-rw-r--r--tools/misc/vds/UC_2.h151
-rw-r--r--tools/misc/vds/UC_2_two_dims_gen.c230
-rw-r--r--tools/misc/vds/UC_3.h78
-rw-r--r--tools/misc/vds/UC_3_gaps_gen.c255
-rw-r--r--tools/misc/vds/UC_4.h86
-rw-r--r--tools/misc/vds/UC_4_printf_gen.c219
-rw-r--r--tools/misc/vds/UC_5.h83
-rw-r--r--tools/misc/vds/UC_5_stride_gen.c243
-rw-r--r--tools/misc/vds/UC_common.h41
-rw-r--r--tools/testfiles/vds/1_a.h5bin0 -> 4856 bytes
-rw-r--r--tools/testfiles/vds/1_b.h5bin0 -> 4611 bytes
-rw-r--r--tools/testfiles/vds/1_c.h5bin0 -> 4856 bytes
-rw-r--r--tools/testfiles/vds/1_d.h5bin0 -> 4611 bytes
-rw-r--r--tools/testfiles/vds/1_e.h5bin0 -> 4856 bytes
-rw-r--r--tools/testfiles/vds/1_f.h5bin0 -> 4611 bytes
-rw-r--r--tools/testfiles/vds/1_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/2_a.h5bin0 -> 4576 bytes
-rw-r--r--tools/testfiles/vds/2_b.h5bin0 -> 4578 bytes
-rw-r--r--tools/testfiles/vds/2_c.h5bin0 -> 4576 bytes
-rw-r--r--tools/testfiles/vds/2_d.h5bin0 -> 4578 bytes
-rw-r--r--tools/testfiles/vds/2_e.h5bin0 -> 4578 bytes
-rw-r--r--tools/testfiles/vds/2_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/3_1_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/3_2_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/4_0.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/4_1.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/4_2.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/4_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/5_a.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/5_b.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/5_c.h5bin0 -> 4581 bytes
-rw-r--r--tools/testfiles/vds/5_vds.h5bin0 -> 5496 bytes
-rw-r--r--tools/testfiles/vds/tvds-1.ddl100
-rw-r--r--tools/testfiles/vds/tvds-1.ls14
-rw-r--r--tools/testfiles/vds/tvds-2.ddl58
-rw-r--r--tools/testfiles/vds/tvds-2.ls13
-rw-r--r--tools/testfiles/vds/tvds-3_1.ddl135
-rw-r--r--tools/testfiles/vds/tvds-3_1.ls14
-rw-r--r--tools/testfiles/vds/tvds-3_2.ddl166
-rw-r--r--tools/testfiles/vds/tvds-3_2.ls13
-rw-r--r--tools/testfiles/vds/tvds-4.ddl46
-rw-r--r--tools/testfiles/vds/tvds-4.ls9
-rw-r--r--tools/testfiles/vds/tvds-5.ddl46
-rw-r--r--tools/testfiles/vds/tvds-5.ls11
-rw-r--r--tools/testfiles/vds/tvds_layout-1.ddl232
-rw-r--r--tools/testfiles/vds/tvds_layout-2.ddl170
-rw-r--r--tools/testfiles/vds/tvds_layout-3_1.ddl267
-rw-r--r--tools/testfiles/vds/tvds_layout-3_2.ddl278
-rw-r--r--tools/testfiles/vds/tvds_layout-4.ddl78
-rw-r--r--tools/testfiles/vds/tvds_layout-5.ddl118
86 files changed, 5435 insertions, 110 deletions
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index c650dbe..33d0971 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -4,7 +4,7 @@
### T E S T I N G ###
##############################################################################
##############################################################################
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
@@ -50,6 +50,30 @@
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
+ # tools/testfiles/vds
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_d.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_e.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_f.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_d.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_e.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_1_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_2_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_0.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_vds.h5
)
set (LIST_OTHER_TEST_FILES
@@ -231,6 +255,9 @@
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v1.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v2.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
)
# Make testfiles dir under build dir
@@ -283,7 +310,7 @@
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
)
endif (WIN32)
-
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -399,7 +426,7 @@
##############################################################################
# --------------------------------------------------------------------
- # test file names
+ # test file names
# --------------------------------------------------------------------
set (FILE1 h5diff_basic1.h5)
set (FILE2 h5diff_basic2.h5)
@@ -425,7 +452,7 @@
set (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
set (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
set (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
- # group recursive - same structure via external links through files
+ # group recursive - same structure via external links through files
set (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
set (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
set (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
@@ -447,13 +474,20 @@
# attrs with verbose option level
set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
+# VDS tests
+ set (FILEV1 1_vds.h5)
+ set (FILEV2 2_vds.h5)
+ set (FILEV3_1 3_1_vds.h5)
+ set (FILEV3_2 3_2_vds.h5)
+ set (FILEV4 4_vds.h5)
+ set (FILEV5 5_vds.h5)
if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
NAME H5DIFF-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
h5diff_10.out
h5diff_10.out.err
h5diff_100.out
@@ -800,6 +834,12 @@
h5diff_80.out.err
h5diff_90.out
h5diff_90.out.err
+ h5diff_v1.out
+ h5diff_v1.out.err
+ h5diff_v2.out
+ h5diff_v2.out.err
+ h5diff_v3.out
+ h5diff_v3.out.err
)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
@@ -816,13 +856,13 @@
ADD_H5_TEST (h5diff_10 0 -h)
# 1.1 normal mode
-ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2})
+ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2})
# 1.2 normal mode with objects
ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2)
# 1.3 report mode
-ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2})
+ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2})
# 1.4 report mode with objects
ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2)
@@ -840,7 +880,7 @@ ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7
ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10)
# 1.7 verbose mode
-ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2})
+ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2})
# 1.7 test 32-bit INFINITY
ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY)
@@ -848,8 +888,8 @@ ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY)
# 1.7 test 64-bit INFINITY
ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY)
-# 1.8 quiet mode
-ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
+# 1.8 quiet mode
+ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
# 1.8 -v and -q
ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2})
@@ -878,7 +918,7 @@ ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1)
ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1)
# 2.5
-ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1)
+ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1)
# 2.6
ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2)
@@ -920,7 +960,7 @@ ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b)
# 5.8 (region reference)
ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
-# test for both dset and attr with same type but with different size
+# test for both dset and attr with same type but with different size
# ( HDDFV-7942 )
ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b)
@@ -929,13 +969,13 @@ ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b)
# ##############################################################################
# 6.0: Check if the command line number of arguments is less than 3
-ADD_H5_TEST (h5diff_600 1 ${FILE1})
+ADD_H5_TEST (h5diff_600 1 ${FILE1})
-# 6.1: Check if non-exist object name is specified
+# 6.1: Check if non-exist object name is specified
ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj)
# ##############################################################################
-# # -d
+# # -d
# ##############################################################################
# 6.3: negative value
@@ -953,7 +993,7 @@ ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
# 6.7: string
ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-# 6.8: use system epsilon
+# 6.8: use system epsilon
ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4)
# 6.9: number larger than biggest difference
@@ -1032,12 +1072,12 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f
# ##############################################################################
# 7. attributes
# ##############################################################################
-ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
+ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
# ##################################################
# attrs with verbose option level
# ##################################################
-ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6})
+ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6})
ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6})
ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6})
ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6})
@@ -1054,7 +1094,7 @@ ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F
# different attr number , same attr name (intersected)
ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2)
-# different attr number , all different attr name
+# different attr number , all different attr name
ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
# when no attributes exist in both objects
@@ -1066,31 +1106,31 @@ ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_F
# ##############################################################################
# 8. all dataset datatypes
# ##############################################################################
-ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8})
+ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8})
# 9. compare a file with itself
ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
# 10. read by hyperslab, print indexes
-ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
+ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
# 11. floating point comparison
-ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
+ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
-ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
+ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
-# with --use-system-epsilon for double value. expect less differences
+# with --use-system-epsilon for double value. expect less differences
ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1
-g1/d2)
+g1/d2)
# with --use-system-epsilon for float value. expect less differences
ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1
g1/fp2)
# not comparable -c flag
-ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2)
+ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2)
-ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2)
+ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2)
ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3)
@@ -1106,9 +1146,9 @@ ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8)
ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9)
# not comparable in dataspace of zero dimension size
-ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
+ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
-# non-comparable dataset with comparable attribute, and other comparable datasets.
+# non-comparable dataset with comparable attribute, and other comparable datasets.
# All the rest comparables should display differences.
ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1)
@@ -1221,28 +1261,28 @@ ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_
ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE)
-ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
+ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
# try --no-dangling-links without --follow-symlinks options
ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13})
# dangling link found for soft links (FILE to FILE)
-ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13})
+ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13})
# dangling link found for soft links (obj to obj)
-ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
+ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
# dangling link found for soft links (obj to obj) Both dangle links
-ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist)
+ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist)
# dangling link found for ext links (FILE to FILE)
-ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15})
+ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15})
# dangling link found for ext links (obj to obj). target file exist
-ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1)
+ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1)
# dangling link found for ext links (obj to obj). target file NOT exist
-ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2)
+ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2)
# dangling link found for ext links (obj to obj). Both dangle links
ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
@@ -1261,9 +1301,9 @@ ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_dan
ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2)
#---------------------------------------------------
-# dangling links without follow symlink
+# dangling links without follow symlink
# (HDFFV-7998)
-# test - soft dangle links (same and different paths),
+# test - soft dangle links (same and different paths),
# - external dangle links (same and different paths)
ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5)
ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
@@ -1275,7 +1315,7 @@ ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_
# ##############################################################################
# # test for group diff recursivly
# ##############################################################################
-# root
+# root
ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
@@ -1309,7 +1349,7 @@ ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_gr
ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
###############################################################################
-# Test for group recursive diff via multi-linked external links
+# Test for group recursive diff via multi-linked external links
# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should
# be same with the external links.
###############################################################################
@@ -1332,7 +1372,7 @@ ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${E
ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
#
-# Different structure, different names.
+# Different structure, different names.
#
# Exclude all the different objects. Expect return - same
ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
@@ -1364,10 +1404,10 @@ ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /
ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2})
# ##############################################################################
-# # Test mutually exclusive options
+# # Test mutually exclusive options
# ##############################################################################
#
-# Test with -d , -p and --use-system-epsilon.
+# Test with -d , -p and --use-system-epsilon.
ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
@@ -1375,3 +1415,9 @@ ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dse
ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+
+# VDS
+ADD_H5_TEST (h5diff_v1 0 -v ${FILEV1} ${FILEV2})
+ADD_H5_TEST (h5diff_v2 0 -r ${FILEV1} ${FILEV2})
+ADD_H5_TEST (h5diff_v3 0 -c ${FILEV1} ${FILEV2})
+
diff --git a/tools/h5diff/testfiles/h5diff_v1.txt b/tools/h5diff/testfiles/h5diff_v1.txt
new file mode 100644
index 0000000..31a3eae
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_v1.txt
@@ -0,0 +1,18 @@
+
+file1 file2
+---------------------------------------
+ x x /
+ x x /vds_dset
+
+group : </> and </>
+0 differences found
+dataset: </vds_dset> and </vds_dset>
+Not comparable: </vds_dset> or </vds_dset> is an empty dataset
+Not comparable: </vds_dset> has rank 3, dimensions [5x18x8], max dimensions [18446744073709551615x18x8]
+and </vds_dset> has rank 3, dimensions [6x8x14], max dimensions [18446744073709551615x8x14]
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects without details of differences.
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_v2.txt b/tools/h5diff/testfiles/h5diff_v2.txt
new file mode 100644
index 0000000..aa327b1
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_v2.txt
@@ -0,0 +1,7 @@
+dataset: </vds_dset> and </vds_dset>
+0 differences found
+--------------------------------
+Some objects are not comparable
+--------------------------------
+Use -c for a list of objects.
+EXIT CODE: 0
diff --git a/tools/h5diff/testfiles/h5diff_v3.txt b/tools/h5diff/testfiles/h5diff_v3.txt
new file mode 100644
index 0000000..8c5d2a2
--- /dev/null
+++ b/tools/h5diff/testfiles/h5diff_v3.txt
@@ -0,0 +1,4 @@
+Not comparable: </vds_dset> or </vds_dset> is an empty dataset
+Not comparable: </vds_dset> has rank 3, dimensions [5x18x8], max dimensions [18446744073709551615x18x8]
+and </vds_dset> has rank 3, dimensions [6x8x14], max dimensions [18446744073709551615x8x14]
+EXIT CODE: 0
diff --git a/tools/h5diff/testh5diff.sh.in b/tools/h5diff/testh5diff.sh.in
index 373558e..fec6035 100644
--- a/tools/h5diff/testh5diff.sh.in
+++ b/tools/h5diff/testh5diff.sh.in
@@ -120,6 +120,29 @@ $SRC_H5DIFF_TESTFILES/h5diff_attr_v_level2.h5
$SRC_H5DIFF_TESTFILES/h5diff_enum_invalid_values.h5
$SRC_H5DIFF_TESTFILES/non_comparables1.h5
$SRC_H5DIFF_TESTFILES/non_comparables2.h5
+$SRC_TOOLS_TESTFILES/vds/1_a.h5
+$SRC_TOOLS_TESTFILES/vds/1_b.h5
+$SRC_TOOLS_TESTFILES/vds/1_c.h5
+$SRC_TOOLS_TESTFILES/vds/1_d.h5
+$SRC_TOOLS_TESTFILES/vds/1_e.h5
+$SRC_TOOLS_TESTFILES/vds/1_f.h5
+$SRC_TOOLS_TESTFILES/vds/1_vds.h5
+$SRC_TOOLS_TESTFILES/vds/2_a.h5
+$SRC_TOOLS_TESTFILES/vds/2_b.h5
+$SRC_TOOLS_TESTFILES/vds/2_c.h5
+$SRC_TOOLS_TESTFILES/vds/2_d.h5
+$SRC_TOOLS_TESTFILES/vds/2_e.h5
+$SRC_TOOLS_TESTFILES/vds/2_vds.h5
+$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5
+$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5
+$SRC_TOOLS_TESTFILES/vds/4_0.h5
+$SRC_TOOLS_TESTFILES/vds/4_1.h5
+$SRC_TOOLS_TESTFILES/vds/4_2.h5
+$SRC_TOOLS_TESTFILES/vds/4_vds.h5
+$SRC_TOOLS_TESTFILES/vds/5_a.h5
+$SRC_TOOLS_TESTFILES/vds/5_b.h5
+$SRC_TOOLS_TESTFILES/vds/5_c.h5
+$SRC_TOOLS_TESTFILES/vds/5_vds.h5
"
LIST_OTHER_TEST_FILES="
@@ -1110,6 +1133,13 @@ TOOLTEST h5diff_644.txt -v --use-system-epsilon -d 5 h5diff_basic1.h5 h5diff_bas
TOOLTEST h5diff_645.txt -v -p 0.05 --use-system-epsilon h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_basic2.h5 /g1/dset3 /g1/dset4
+# ##############################################################################
+# VDS tests
+# ##############################################################################
+TOOLTEST h5diff_v1.txt -v 1_vds.h5 2_vds.h5
+TOOLTEST h5diff_v2.txt -r 1_vds.h5 2_vds.h5
+TOOLTEST h5diff_v3.txt -c 1_vds.h5 2_vds.h5
+
# ##############################################################################
# # END
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 47ba7a8..be08e2a 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -39,6 +39,8 @@ if (BUILD_TESTING)
include (CMakeTestsPBITS.cmake)
+ include (CMakeTestsVDS.cmake)
+
include (CMakeTestsXML.cmake)
endif (BUILD_TESTING)
diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake
new file mode 100644
index 0000000..58287fa
--- /dev/null
+++ b/tools/h5dump/CMakeTestsVDS.cmake
@@ -0,0 +1,238 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # VDS
+ # --------------------------------------------------------------------
+ #-- Copy all the HDF5 files from the test directory into the source directory
+ set (HDF5_REFERENCE_VDS
+ tvds-1.ddl
+ tvds-2.ddl
+ tvds-3_1.ddl
+ tvds-3_2.ddl
+ tvds-4.ddl
+ tvds-5.ddl
+ tvds_layout-1.ddl
+ tvds_layout-2.ddl
+ tvds_layout-3_1.ddl
+ tvds_layout-3_2.ddl
+ tvds_layout-4.ddl
+ tvds_layout-5.ddl
+ )
+ set (HDF5_REFERENCE_TEST_VDS
+ 1_a.h5
+ 1_b.h5
+ 1_c.h5
+ 1_d.h5
+ 1_e.h5
+ 1_f.h5
+ 1_vds.h5
+ 2_a.h5
+ 2_b.h5
+ 2_c.h5
+ 2_d.h5
+ 2_e.h5
+ 2_vds.h5
+ 3_1_vds.h5
+ 3_2_vds.h5
+ 4_0.h5
+ 4_1.h5
+ 4_2.h5
+ 4_vds.h5
+ 5_a.h5
+ 5_b.h5
+ 5_c.h5
+ 5_vds.h5
+ )
+ set (HDF5_ERROR_REFERENCE_VDS
+ )
+
+ foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
+ GET_FILENAME_COMPONENT(fname "${vds_h5_file}" NAME)
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
+ #message (STATUS " Copying ${vds_h5_file}")
+ add_custom_command (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file} ${dest}
+ )
+ endforeach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
+
+
+ foreach (ddl_vds ${HDF5_REFERENCE_VDS})
+ GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME)
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
+ #message (STATUS " Copying ${ddl_vds}")
+ add_custom_command (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds} ${ddldest}
+ )
+ endforeach (ddl_vds ${HDF5_REFERENCE_VDS})
+
+ foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
+ GET_FILENAME_COMPONENT(fname "${ddl_vds}" NAME)
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
+ #message (STATUS " Copying ${ddl_vds}")
+ add_custom_command (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds} ${ddldest}
+ )
+ endforeach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_VDS_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_vds_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
+ endif (NOT "${last_vds_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
+ add_test (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_VDS_TEST file)
+
+ MACRO (ADD_H5_VDS_LAYOUT resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> -p ${ARGN})
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfilesvds")
+ if (NOT ${resultcode} STREQUAL "0")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_vds_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
+ endif (NOT "${last_vds_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
+ add_test (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-p;${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_VDS_LAYOUT file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP_VDS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tvds-1.out
+ tvds-1.out.err
+ tvds-2.out
+ tvds-2.out.err
+ tvds-3_1.out
+ tvds-3_1.out.err
+ tvds-3_2.out
+ tvds-3_2.out.err
+ tvds-4.out
+ tvds-4.out.err
+ tvds-5.out
+ tvds-5.out.err
+ tvds_layout-1.out
+ tvds_layout-1.out.err
+ tvds_layout-2.out
+ tvds_layout-2.out.err
+ tvds_layout-3_1.out
+ tvds_layout-3_1.out.err
+ tvds_layout-3_2.out
+ tvds_layout-3_2.out.err
+ tvds_layout-4.out
+ tvds_layout-4.out.err
+ tvds_layout-5.out
+ tvds_layout-5.out.err
+ )
+ set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
+ if (NOT "${last_vds_test}" STREQUAL "")
+ set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES DEPENDS ${last_vds_test})
+ endif (NOT "${last_vds_test}" STREQUAL "")
+ set (last_VDS_test "H5DUMP_VDS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+
+# See which filters are usable (and skip tests for filters we
+# don't have). Do this by searching H5pubconf.h to see which
+# filters are defined.
+
+# detect whether the encoder is present.
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
+
+ if (H5_HAVE_FILTER_SZIP)
+ set (USE_FILTER_SZIP "true")
+ endif (H5_HAVE_FILTER_SZIP)
+
+ # Data read
+ if (USE_FILTER_DEFLATE)
+ ADD_H5_VDS_TEST (tvds-1 0 --enable-error-stack 1_vds.h5)
+ ADD_H5_VDS_TEST (tvds-2 0 --enable-error-stack 2_vds.h5)
+ ADD_H5_VDS_TEST (tvds-3_1 0 --enable-error-stack 3_1_vds.h5)
+ ADD_H5_VDS_TEST (tvds-3_2 0 --enable-error-stack 3_2_vds.h5)
+ ADD_H5_VDS_TEST (tvds-4 0 --enable-error-stack 4_vds.h5)
+ ADD_H5_VDS_TEST (tvds-5 0 --enable-error-stack 5_vds.h5)
+ endif (USE_FILTER_DEFLATE)
+
+ # Layout read
+ if (USE_FILTER_DEFLATE)
+ ADD_H5_VDS_LAYOUT (tvds_layout-1 0 --enable-error-stack 1_vds.h5)
+ ADD_H5_VDS_LAYOUT (tvds_layout-2 0 --enable-error-stack 2_vds.h5)
+ ADD_H5_VDS_LAYOUT (tvds_layout-3_1 0 --enable-error-stack 3_1_vds.h5)
+ ADD_H5_VDS_LAYOUT (tvds_layout-3_2 0 --enable-error-stack 3_2_vds.h5)
+ ADD_H5_VDS_LAYOUT (tvds_layout-4 0 --enable-error-stack 4_vds.h5)
+ ADD_H5_VDS_LAYOUT (tvds_layout-5 0 --enable-error-stack 5_vds.h5)
+ endif (USE_FILTER_DEFLATE)
diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am
index 69227f8..4b56c96 100644
--- a/tools/h5dump/Makefile.am
+++ b/tools/h5dump/Makefile.am
@@ -24,8 +24,8 @@ include $(top_srcdir)/config/commence.am
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
# Test programs and scripts
-TEST_PROG= h5dumpgentest
-TEST_SCRIPT= testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh
+TEST_PROG=h5dumpgentest
+TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpvds.sh testh5dumpxml.sh
check_PROGRAMS=$(TEST_PROG) binread
check_SCRIPTS=$(TEST_SCRIPT)
diff --git a/tools/h5dump/testh5dumpvds.sh.in b/tools/h5dump/testh5dumpvds.sh.in
new file mode 100644
index 0000000..b15606f
--- /dev/null
+++ b/tools/h5dump/testh5dumpvds.sh.in
@@ -0,0 +1,505 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# 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 HDF5 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.
+#
+# Tests for the h5dump tool with vds type files
+
+srcdir=@srcdir@
+
+# Determine which filters are available
+USE_FILTER_SZIP="@USE_FILTER_SZIP@"
+USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
+
+TESTNAME=h5dump
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+DUMPER=h5dump # The tool name
+DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
+
+H5DIFF=../h5diff/h5diff # The h5diff tool name
+H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
+
+H5IMPORT=../h5import/h5import # The h5import tool name
+H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
+
+RM='rm -rf'
+CMP='cmp -s'
+DIFF='diff -c'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+nerrors=0
+verbose=yes
+
+# source dirs
+SRC_TOOLS="$srcdir/../"
+
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+# testfiles source dirs for tools
+SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
+SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
+SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
+SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
+SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
+SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
+SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
+
+TEST_P_DIR=./testfiles
+TESTDIR=./testfiles/vds
+test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR
+test -d $TESTDIR || mkdir -p $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_H5DUMP_TESTFILES/vds/1_a.h5
+$SRC_H5DUMP_TESTFILES/vds/1_b.h5
+$SRC_H5DUMP_TESTFILES/vds/1_c.h5
+$SRC_H5DUMP_TESTFILES/vds/1_d.h5
+$SRC_H5DUMP_TESTFILES/vds/1_e.h5
+$SRC_H5DUMP_TESTFILES/vds/1_f.h5
+$SRC_H5DUMP_TESTFILES/vds/1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/2_a.h5
+$SRC_H5DUMP_TESTFILES/vds/2_b.h5
+$SRC_H5DUMP_TESTFILES/vds/2_c.h5
+$SRC_H5DUMP_TESTFILES/vds/2_d.h5
+$SRC_H5DUMP_TESTFILES/vds/2_e.h5
+$SRC_H5DUMP_TESTFILES/vds/2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_1_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/3_2_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/4_0.h5
+$SRC_H5DUMP_TESTFILES/vds/4_1.h5
+$SRC_H5DUMP_TESTFILES/vds/4_2.h5
+$SRC_H5DUMP_TESTFILES/vds/4_vds.h5
+$SRC_H5DUMP_TESTFILES/vds/5_a.h5
+$SRC_H5DUMP_TESTFILES/vds/5_b.h5
+$SRC_H5DUMP_TESTFILES/vds/5_c.h5
+$SRC_H5DUMP_TESTFILES/vds/5_vds.h5
+"
+
+LIST_OTHER_TEST_FILES="
+$SRC_H5DUMP_TESTFILES/vds/tvds-1.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds-2.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds-3_1.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds-3_2.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds-4.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds-5.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-1.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-2.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_1.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-3_2.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-4.ddl
+$SRC_H5DUMP_TESTFILES/vds/tvds_layout-5.ddl
+"
+
+LIST_ERROR_TEST_FILES="
+"
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES"
+
+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
+}
+
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm 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
+ $RM $TESTDIR
+ fi
+}
+
+# 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'
+}
+
+# Source in the output filter function definitions.
+. $srcdir/../../bin/output_filter.sh
+
+# Run a test and print PASS or *FAIL*. If a test fails then increment
+# the `nerrors' global variable and (if $verbose is set) display the
+# difference between the actual output and the expected output. The
+# expected output is given as the first argument to this function and
+# the actual output file is calculated by replacing the `.ddl' with
+# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
+# non-zero value.
+#
+TOOLTEST() {
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
+ fi
+
+}
+
+
+# same as TOOLTEST1 but compares generated file to expected output
+# and compares the generated data file to the expected data file
+# used for the binary tests that expect a full path in -o without -b
+TOOLTEST2() {
+
+ expectdata="$TESTDIR/$1"
+ expect="$TESTDIR/`basename $1 .exp`.ddl"
+ actualdata="$TESTDIR/`basename $1 .exp`.txt"
+ actual="$TESTDIR/`basename $1 .exp`.out"
+ actual_err="$TESTDIR/`basename $1 .exp`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actualdata $actual_err
+ fi
+
+}
+
+# same as TOOLTEST but filters error stack outp
+# Extract file name, line number, version and thread IDs because they may be different
+TOOLTEST3() {
+
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
+# same as TOOLTEST3 but filters error stack output and compares to an error file
+# Extract file name, line number, version and thread IDs because they may be different
+TOOLTEST4() {
+
+ expect="$TESTDIR/$1"
+ expect_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.oerr"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ #cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
+# Print a "SKIP" message
+SKIP() {
+ TESTING $DUMPER $@
+ echo " -SKIP-"
+}
+
+# Print a line-line message left justified in a field of 70 characters
+#
+PRINT_H5DIFF() {
+ SPACES=" "
+ echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+
+# Call the h5diff tool
+#
+DIFFTEST()
+{
+ PRINT_H5DIFF $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5DIFF_BIN "$@" -q
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Verifying".
+#
+PRINT_H5IMPORT() {
+ SPACES=" "
+ echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Call the h5import tool
+#
+IMPORTTEST()
+{
+ # remove the output hdf5 file if it exists
+ hdf5_file="$TESTDIR/$5"
+ if [ -f $hdf5_file ]; then
+ rm -f $hdf5_file
+ fi
+
+ PRINT_H5IMPORT $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5IMPORT_BIN "$@"
+ )
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
+
+}
+
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
+
+####### test for dataset vds ######
+
+ # Data read
+if test $USE_FILTER_DEFLATE = "yes" ; then
+ TOOLTEST tvds-1.ddl --enable-error-stack 1_vds.h5
+ TOOLTEST tvds-2.ddl --enable-error-stack 2_vds.h5
+ TOOLTEST tvds-3_1.ddl --enable-error-stack 3_1_vds.h5
+ TOOLTEST tvds-3_2.ddl --enable-error-stack 3_2_vds.h5
+ TOOLTEST tvds-4.ddl --enable-error-stack 4_vds.h5
+ TOOLTEST tvds-5.ddl --enable-error-stack 5_vds.h5
+fi
+
+ # Layout read
+if test $USE_FILTER_DEFLATE = "yes" ; then
+ TOOLTEST tvds_layout-1.ddl -p --enable-error-stack 1_vds.h5
+ TOOLTEST tvds_layout-2.ddl -p --enable-error-stack 2_vds.h5
+ TOOLTEST tvds_layout-3_1.ddl -p --enable-error-stack 3_1_vds.h5
+ TOOLTEST tvds_layout-3_2.ddl -p --enable-error-stack 3_2_vds.h5
+ TOOLTEST tvds_layout-4.ddl -p --enable-error-stack 4_vds.h5
+ TOOLTEST tvds_layout-5.ddl -p --enable-error-stack 5_vds.h5
+fi
+
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
+# Report test results and exit
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
+fi
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 4e96db2..6e7f00c 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -23,6 +23,8 @@ if (BUILD_TESTING)
include (CMakeTests.cmake)
+ include (CMakeTestsVDS.cmake)
+
endif (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake
new file mode 100644
index 0000000..1ef3f20
--- /dev/null
+++ b/tools/h5ls/CMakeTestsVDS.cmake
@@ -0,0 +1,149 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the test files from source directory to test directory
+ # --------------------------------------------------------------------
+ set (LIST_HDF5_TEST_FILES
+ 1_a.h5
+ 1_b.h5
+ 1_c.h5
+ 1_d.h5
+ 1_e.h5
+ 1_f.h5
+ 1_vds.h5
+ 2_a.h5
+ 2_b.h5
+ 2_c.h5
+ 2_d.h5
+ 2_e.h5
+ 2_vds.h5
+ 3_1_vds.h5
+ 3_2_vds.h5
+ 4_0.h5
+ 4_1.h5
+ 4_2.h5
+ 4_vds.h5
+ 5_a.h5
+ 5_b.h5
+ 5_c.h5
+ 5_vds.h5
+ )
+
+ set (LIST_OTHER_TEST_FILES
+ tvds-1.ls
+ tvds-2.ls
+ tvds-3_1.ls
+ tvds-3_2.ls
+ tvds-4.ls
+ tvds-5.ls
+ )
+
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ # copy the list of test files
+ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
+ #message (STATUS " Copying ${listfiles} to ${dest}")
+ add_custom_command (
+ TARGET h5ls
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${listfiles} ${dest}
+ )
+ endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_VDS_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
+ if (${resultcode} STREQUAL "1")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif (${resultcode} STREQUAL "1")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5LS-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ./testfiles/${resultfile}.out ./testfiles/vds/${resultfile}.out.err
+ )
+ add_test (
+ NAME H5LS-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS_VDS-${resultfile}-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_VDS_TEST file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5LS_VDS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tvds-1.out
+ tvds-1.out.err
+ tvds-2.out
+ tvds-2.out.err
+ tvds-3_1.out
+ tvds-3_1.out.err
+ tvds-3_2.out
+ tvds-3_2.out.err
+ tvds-4.out
+ tvds-4.out.err
+ tvds-5.out
+ tvds-5.out.err
+ tvds_layout-1.out
+ tvds_layout-1.out.err
+ tvds_layout-2.out
+ tvds_layout-2.out.err
+ tvds_layout-3_1.out
+ tvds_layout-3_1.out.err
+ tvds_layout-3_2.out
+ tvds_layout-3_2.out.err
+ tvds_layout-4.out
+ tvds_layout-4.out.err
+ tvds_layout-5.out
+ tvds_layout-5.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS_VDS-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5LS_VDS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_H5_VDS_TEST (tvds-1 0 -w80 -v -S 1_vds.h5)
+ ADD_H5_VDS_TEST (tvds-2 0 -w80 -v -S 2_vds.h5)
+ ADD_H5_VDS_TEST (tvds-3_1 0 -w80 -v -S 3_1_vds.h5)
+ ADD_H5_VDS_TEST (tvds-3_2 0 -w80 -v -S 3_2_vds.h5)
+ ADD_H5_VDS_TEST (tvds-4 0 -w80 -v -S 4_vds.h5)
+ ADD_H5_VDS_TEST (tvds-5 0 -w80 -v -S 5_vds.h5)
+
diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am
index 408ce93..54a06f1 100644
--- a/tools/h5ls/Makefile.am
+++ b/tools/h5ls/Makefile.am
@@ -24,7 +24,7 @@ include $(top_srcdir)/config/commence.am
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
# Test programs and scripts
-TEST_SCRIPT=testh5ls.sh
+TEST_SCRIPT=testh5ls.sh testh5lsvds.sh
check_SCRIPTS=$(TEST_SCRIPT)
SCRIPT_DEPEND=h5ls$(EXEEXT)
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index fe146c1..cce5f3d 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1847,6 +1847,34 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
} /* end if */
break;
+ case H5D_VIRTUAL:
+ {
+ char dset_name[256]; /* Dataset name */
+ size_t vmaps;
+
+ H5Pget_virtual_count(dcpl, &vmaps);
+
+ if (vmaps) {
+ size_t next;
+ ssize_t ssize_out;
+
+ h5tools_str_append(&buffer, " %-10s {%ld} Source {\n", "Maps:", vmaps);
+ for (next = 0; next < (unsigned) vmaps; next++) {
+ ssize_out = H5Pget_virtual_filename(dcpl, next, NULL, 0);
+ H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name));
+ ssize_out = H5Pget_virtual_dsetname(dcpl, next, NULL, 0);
+ H5Pget_virtual_dsetname(dcpl, next, dset_name, sizeof(dset_name));
+ h5tools_str_append(&buffer, " %-10s ", " ");
+ print_string(&buffer, f_name, TRUE);
+ h5tools_str_append(&buffer, " ");
+ print_string(&buffer, dset_name, TRUE);
+ h5tools_str_append(&buffer, "\n");
+ }
+ h5tools_str_append(&buffer, " %-10s}\n", " ");
+ }
+ }
+ break;
+
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
diff --git a/tools/h5ls/testh5lsvds.sh.in b/tools/h5ls/testh5lsvds.sh.in
new file mode 100644
index 0000000..d194992
--- /dev/null
+++ b/tools/h5ls/testh5lsvds.sh.in
@@ -0,0 +1,258 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# 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 HDF5 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.
+#
+# Tests for the h5ls tool
+
+srcdir=@srcdir@
+
+TESTNAME=h5ls
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+H5LS=h5ls # The tool name
+H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
+
+RM='rm -rf'
+CMP='cmp -s'
+DIFF='diff -c'
+CP='cp'
+NLINES=20 # Max. lines of output to display if test fails
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
+
+nerrors=0
+verbose=yes
+h5haveexitcode=yes # default is yes
+
+# source dirs
+SRC_TOOLS="$srcdir/.."
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+
+# testfiles source dirs for tools
+SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
+SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
+SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
+SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
+SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
+SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
+
+TEST_P_DIR=./testfiles
+TESTDIR=./testfiles/vds
+test -d $TEST_P_DIR || mkdir -p $TEST_P_DIR
+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_H5LS_TESTFILES/vds/1_a.h5
+$SRC_H5LS_TESTFILES/vds/1_b.h5
+$SRC_H5LS_TESTFILES/vds/1_c.h5
+$SRC_H5LS_TESTFILES/vds/1_d.h5
+$SRC_H5LS_TESTFILES/vds/1_e.h5
+$SRC_H5LS_TESTFILES/vds/1_f.h5
+$SRC_H5LS_TESTFILES/vds/1_vds.h5
+$SRC_H5LS_TESTFILES/vds/2_a.h5
+$SRC_H5LS_TESTFILES/vds/2_b.h5
+$SRC_H5LS_TESTFILES/vds/2_c.h5
+$SRC_H5LS_TESTFILES/vds/2_d.h5
+$SRC_H5LS_TESTFILES/vds/2_e.h5
+$SRC_H5LS_TESTFILES/vds/2_vds.h5
+$SRC_H5LS_TESTFILES/vds/3_1_vds.h5
+$SRC_H5LS_TESTFILES/vds/3_2_vds.h5
+$SRC_H5LS_TESTFILES/vds/4_0.h5
+$SRC_H5LS_TESTFILES/vds/4_1.h5
+$SRC_H5LS_TESTFILES/vds/4_2.h5
+$SRC_H5LS_TESTFILES/vds/4_vds.h5
+$SRC_H5LS_TESTFILES/vds/5_a.h5
+$SRC_H5LS_TESTFILES/vds/5_b.h5
+$SRC_H5LS_TESTFILES/vds/5_c.h5
+$SRC_H5LS_TESTFILES/vds/5_vds.h5
+"
+
+LIST_OTHER_TEST_FILES="
+$SRC_H5LS_TESTFILES/vds/tvds-1.ls
+$SRC_H5LS_TESTFILES/vds/tvds-2.ls
+$SRC_H5LS_TESTFILES/vds/tvds-3_1.ls
+$SRC_H5LS_TESTFILES/vds/tvds-3_2.ls
+$SRC_H5LS_TESTFILES/vds/tvds-4.ls
+$SRC_H5LS_TESTFILES/vds/tvds-5.ls
+"
+
+
+# RUNSERIAL is used. Check if it can return exit code from executalbe correctly.
+if [ -n "$RUNSERIAL_NOEXITCODE" ]; then
+ echo "***Warning*** Serial Exit Code is not passed back to shell corretly."
+ echo "***Warning*** Exit code checking is skipped."
+ h5haveexitcode=no
+fi
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES"
+
+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
+}
+
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm 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
+ $RM $TESTDIR
+ fi
+}
+
+# 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'
+}
+
+# Source in the output filter function definitions.
+. $srcdir/../../bin/output_filter.sh
+
+# Run a test and print PASS or *FAIL*. For now, if h5ls can complete
+# with exit status 0, consider it pass. If a test fails then increment
+# the `nerrors' global variable and (if $verbose is set) display up to $NLINS
+# lines of the actual output from the tool test. The actual output is not
+# removed if $HDF5_NOCLEANUP has a non-zero value.
+# Arguemnts:
+# $1 -- actual output filename to use
+# $2 and on -- argument for the h5ls tool
+TOOLTEST() {
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .ls`.out"
+ actual_err="$TESTDIR/`basename $1 .ls`.err"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+ retvalexpect=$1
+ shift
+
+ # Run test.
+ # Stderr is included in stdout so that the diff can detect
+ # any unexpected output from that stream too.
+ TESTING $H5LS $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ exitcode=$?
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+ cat $actual_err >> $actual
+ if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if [ yes = "$verbose" ]; then
+ echo "test returned with exit code $exitcode"
+ echo "test output: (up to $NLINES lines)"
+ head -$NLINES $actual
+ echo "***end of test output***"
+ echo ""
+ fi
+ elif [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result differs from actual result"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+}
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
+
+####### test for dataset vds ######
+
+TOOLTEST tvds-1.ls 0 -w80 -v -S 1_vds.h5
+TOOLTEST tvds-2.ls 0 -w80 -v -S 2_vds.h5
+TOOLTEST tvds-3_1.ls 0 -w80 -v -S 3_1_vds.h5
+TOOLTEST tvds-3_2.ls 0 -w80 -v -S 3_2_vds.h5
+TOOLTEST tvds-4.ls 0 -w80 -v -S 4_vds.h5
+TOOLTEST tvds-5.ls 0 -w80 -v -S 5_vds.h5
+
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
+fi
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index dee97ed..caad5c1 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -14,14 +14,14 @@
multi
family
)
-
+
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
add_test (
- NAME H5REPACK-VFD-${vfdname}-h5repacktest
+ NAME H5REPACK-VFD-${vfdname}-h5repacktest
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
-D "TEST_ARGS:STRING="
@@ -37,7 +37,7 @@
set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
ENDMACRO (ADD_VFD_TEST)
endif (HDF5_TEST_VFD)
-
+
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -77,6 +77,30 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
+ # tools/testfiles/vds
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_d.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_e.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_f.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/1_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_d.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_e.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/2_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_1_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/3_2_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_0.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/4_vds.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_a.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_c.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/5_vds.h5
)
set (LIST_OTHER_TEST_FILES
@@ -346,7 +370,7 @@
add_test (
NAME H5REPACK_UD-${testname}-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
testfiles/out-${testname}.${resultfile}
testfiles/${testname}.${resultfile}.out
testfiles/${testname}.${resultfile}.out.err
@@ -392,7 +416,7 @@
##############################################################################
# --------------------------------------------------------------------
- # test file names
+ # test file names
# --------------------------------------------------------------------
set (INFO_FILE testfiles/h5repack.info)
@@ -415,12 +439,18 @@
set (FILE18 h5repack_layout2.h5)
set (FILE_REF h5repack_refs.h5)
set (FILE_ATTR_REF h5repack_attr_refs.h5)
-
+ set (FILEV1 1_vds.h5)
+ set (FILEV2 2_vds.h5)
+ set (FILEV3_1 3_1_vds.h5)
+ set (FILEV3_2 3_2_vds.h5)
+ set (FILEV4 4_vds.h5)
+ set (FILEV5 5_vds.h5)
+
# Remove any output file left over from previous test run
add_test (
NAME H5REPACK-clearall-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
./testfiles/h5dump-help.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
@@ -555,12 +585,41 @@
./testfiles/out-meta_short_N.meta_short.h5
./testfiles/out-meta_long_M.meta_long.h5
./testfiles/out-meta_long_N.meta_long.h5
- # from the h5repacktst
+ ./testfiles/1_vds.h5-vds_dset_compa-v.out
+ ./testfiles/1_vds.h5-vds_dset_compa-v.out.err
+ ./testfiles/1_vds.h5-vds_dset_conti-v.out
+ ./testfiles/1_vds.h5-vds_dset_conti-v.out.err
+ ./testfiles/2_vds.h5-vds_null_compa-v.out
+ ./testfiles/2_vds.h5-vds_null_compa-v.out.err
+ ./testfiles/2_vds.h5-vds_null_conti-v.out
+ ./testfiles/2_vds.h5-vds_null_conti-v.out.err
+ ./testfiles/4_vds.h5-vds_compa-v.out
+ ./testfiles/4_vds.h5-vds_compa-v.out.err
+ ./testfiles/4_vds.h5-vds_compa_compa-v.out
+ ./testfiles/4_vds.h5-vds_compa_compa-v.out.err
+ ./testfiles/4_vds.h5-vds_compa_conti-v.out
+ ./testfiles/4_vds.h5-vds_compa_conti-v.out.err
+ ./testfiles/4_vds.h5-vds_conti-v.out
+ ./testfiles/4_vds.h5-vds_conti-v.out.err
+ ./testfiles/4_vds.h5-vds_conti_compa-v.out
+ ./testfiles/4_vds.h5-vds_conti_compa-v.out.err
+ ./testfiles/4_vds.h5-vds_conti_conti-v.out
+ ./testfiles/4_vds.h5-vds_conti_conti-v.out.err
+ ./testfiles/out-vds_compa.4_vds.h5
+ ./testfiles/out-vds_compa_compa.4_vds.h5
+ ./testfiles/out-vds_compa_conti.4_vds.h5
+ ./testfiles/out-vds_conti.4_vds.h5
+ ./testfiles/out-vds_conti_compa.4_vds.h5
+ ./testfiles/out-vds_conti_conti.4_vds.h5
+ ./testfiles/out-vds_dset_compa.1_vds.h5
+ ./testfiles/out-vds_dset_conti.1_vds.h5
+ ./testfiles/out-vds_null_compa.2_vds.h5
+ ./testfiles/out-vds_null_conti.2_vds.h5
h5repack_attr.h5
h5repack_attr_out.h5
h5repack_attr_refs.h5
h5repack_big.h5
- h5repack_deflate.h5
+ h5repack_deflate.h5
h5repack_deflate_out.h5
h5repack_early2.h5
h5repack_early.h5
@@ -588,7 +647,7 @@
h5repack_refs.h5
h5repack_shuffle.h5
h5repack_shuffle_out.h5
- h5repack_soffset.h5
+ h5repack_soffset.h5
h5repack_soffset_out.h5
h5repack_szip.h5
h5repack_szip_out.h5
@@ -628,14 +687,14 @@
# Each run generates "<file>.out.h5" and the tool h5diff is used to
# compare the input and output files
#
-# the tests are the same as the program h5repacktst, but run from the CLI
+# the tests are the same as the program h5repacktst, but run from the CLI
#
# See which filters are usable (and skip tests for filters we
# don't have). Do this by searching H5pubconf.h to see which
# filters are defined.
-# detect whether the encoder is present.
+# detect whether the encoder is present.
set (USE_FILTER_SZIP_ENCODER "no")
if (HDF5_ENABLE_SZIP_ENCODING)
set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
@@ -649,7 +708,7 @@
set (USE_FILTER_SZIP "true")
endif (H5_HAVE_FILTER_SZIP)
-# copy files (these files have no filters)
+# copy files (these files have no filters)
ADD_H5_TEST (fill "TEST" ${FILE0})
ADD_H5_TEST (objs "TEST" ${FILE1})
ADD_H5_TEST (attr "TEST" ${FILE2})
@@ -666,8 +725,8 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
-
-# gzip for all
+
+# gzip for all
set (arg ${FILE4} -f GZIP=1)
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
@@ -681,7 +740,7 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
# szip for all
set (arg ${FILE4} -f SZIP=8,NN)
@@ -689,16 +748,16 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
# shuffle with individual object
set (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
- ADD_H5_TEST (shuffle_individual "TEST" ${arg})
+ ADD_H5_TEST (shuffle_individual "TEST" ${arg})
# shuffle for all
set (arg ${FILE4} -f SHUF)
ADD_H5_TEST (shuffle_all "TEST" ${arg})
-
+
# fletcher32 with individual object
set (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
ADD_H5_TEST (fletcher_individual "TEST" ${arg})
@@ -722,7 +781,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
-
+
###########################################################
# the following tests assume the input files have filters
###########################################################
@@ -734,7 +793,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
-
+
# szip remove
set (arg ${FILE7} --filter=dset_szip:NONE)
set (TESTTYPE "TEST")
@@ -742,7 +801,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
-
+
# deflate copy
set (arg ${FILE8})
set (TESTTYPE "TEST")
@@ -758,7 +817,7 @@
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
-
+
# shuffle copy
set (arg ${FILE9})
ADD_H5_TEST (shuffle_copy "TEST" ${arg})
@@ -813,14 +872,14 @@
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
+ ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
set (arg ${FILE7} -f dset_szip:GZIP=1)
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
+ ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
#limit
set (arg ${FILE4} -f GZIP=1 -m 1024)
@@ -836,7 +895,7 @@
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
endif (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+ ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
#########################################################
# layout options (these files have no filters)
@@ -865,18 +924,18 @@
ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA)
ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA)
-#---------------------------------------------------------------------------
-# Test file contains chunked datasets (need multiple dsets) with
+#---------------------------------------------------------------------------
+# Test file contains chunked datasets (need multiple dsets) with
# unlimited max dims. (HDFFV-7933)
# Use first dset to test.
#---------------------------------------------------------------------------
# chunk to chunk - specify chunk dim bigger than any current dim
ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
-# chunk to contiguous
+# chunk to contiguous
ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
-# chunk to compact - convert big dataset (should be > 64k) for this purpose,
+# chunk to compact - convert big dataset (should be > 64k) for this purpose,
# should remain as original layout (chunk)
ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
@@ -884,7 +943,7 @@
# Test -f for some specific cases. Chunked dataset with unlimited max dims.
# (HDFFV-8012)
#--------------------------------------------------------------------------
-# - should not fail
+# - should not fail
# - should not change max dims from unlimit
# chunk dim is bigger than dataset dim. ( dset size < 64k )
@@ -900,13 +959,13 @@
ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
#--------------------------------------------------------------------------
-# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
+# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
# (dset size < 64K) and with unlimited max dims on a condition as follow.
# (HDFFV-8214)
#--------------------------------------------------------------------------
# chunk dim is bigger than dataset dim. should succeed.
ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
-# chunk dim is smaller than dataset dim. should succeed.
+# chunk dim is smaller than dataset dim. should succeed.
ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
@@ -975,11 +1034,11 @@
ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
# test attribute with various references (bug1797 / HDFFV-5932)
-# the references in attribute of compund or vlen datatype
+# the references in attribute of compund or vlen datatype
ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
-# Add test for memory leak in attirbute. This test is verified by CTEST.
-# 1. leak from vlen string
+# Add test for memory leak in attirbute. This test is verified by CTEST.
+# 1. leak from vlen string
# 2. leak from compound type without reference member
# (HDFFV-7840, )
# Note: this test is experimental for sharing test file among tools
@@ -989,6 +1048,26 @@
ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192)
ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192)
+# VDS tests
+
+#########################################################
+# layout options
+#########################################################
+ ADD_H5_VERIFY_TEST (vds_dset_conti "TEST" 0 ${FILEV1} vds_dset CONTIGUOUS -l vds_dset:CONTI)
+ ADD_H5_VERIFY_TEST (vds_null_conti "TEST" 1 ${FILEV2} null CONTIGUOUS -l CONTI)
+ ADD_H5_VERIFY_TEST (vds_dset_compa "TEST" 0 ${FILEV1} vds_dset COMPACT -l vds_dset:COMPA)
+ ADD_H5_VERIFY_TEST (vds_null_compa "TEST" 1 ${FILEV2} null COMPACT -l COMPA)
+
+################################################################
+# layout conversions
+###############################################################
+ ADD_H5_VERIFY_TEST (vds_compa_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI)
+ ADD_H5_VERIFY_TEST (vds_compa_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA)
+ ADD_H5_VERIFY_TEST (vds_conti_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA)
+ ADD_H5_VERIFY_TEST (vds_conti_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI)
+ ADD_H5_VERIFY_TEST (vds_compa "TEST" 0 ${FILEV4} vds_dset COMPACT -l vds_dset:COMPA)
+ ADD_H5_VERIFY_TEST (vds_conti "TEST" 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI)
+
##############################################################################
### P L U G I N T E S T S
##############################################################################
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 1796151..24298d0 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -113,6 +113,29 @@ $SRC_TOOLS_TESTFILES/tfamily00007.h5
$SRC_TOOLS_TESTFILES/tfamily00008.h5
$SRC_TOOLS_TESTFILES/tfamily00009.h5
$SRC_TOOLS_TESTFILES/tfamily00010.h5
+$SRC_TOOLS_TESTFILES/vds/1_a.h5
+$SRC_TOOLS_TESTFILES/vds/1_b.h5
+$SRC_TOOLS_TESTFILES/vds/1_c.h5
+$SRC_TOOLS_TESTFILES/vds/1_d.h5
+$SRC_TOOLS_TESTFILES/vds/1_e.h5
+$SRC_TOOLS_TESTFILES/vds/1_f.h5
+$SRC_TOOLS_TESTFILES/vds/1_vds.h5
+$SRC_TOOLS_TESTFILES/vds/2_a.h5
+$SRC_TOOLS_TESTFILES/vds/2_b.h5
+$SRC_TOOLS_TESTFILES/vds/2_c.h5
+$SRC_TOOLS_TESTFILES/vds/2_d.h5
+$SRC_TOOLS_TESTFILES/vds/2_e.h5
+$SRC_TOOLS_TESTFILES/vds/2_vds.h5
+$SRC_TOOLS_TESTFILES/vds/3_1_vds.h5
+$SRC_TOOLS_TESTFILES/vds/3_2_vds.h5
+$SRC_TOOLS_TESTFILES/vds/4_0.h5
+$SRC_TOOLS_TESTFILES/vds/4_1.h5
+$SRC_TOOLS_TESTFILES/vds/4_2.h5
+$SRC_TOOLS_TESTFILES/vds/4_vds.h5
+$SRC_TOOLS_TESTFILES/vds/5_a.h5
+$SRC_TOOLS_TESTFILES/vds/5_b.h5
+$SRC_TOOLS_TESTFILES/vds/5_c.h5
+$SRC_TOOLS_TESTFILES/vds/5_vds.h5
"
LIST_OTHER_TEST_FILES="
@@ -1063,6 +1086,26 @@ TOOLTEST HDFFV-7840 h5diff_attr1.h5
TOOLTEST_META meta_short h5repack_layout.h5 -M 8192
TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
+# VDS tests
+
+#########################################################
+# layout options
+#########################################################
+VERIFY_LAYOUT_DSET vds_dset_conti 1_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
+VERIFY_LAYOUT_ALL vds_null_conti 2_vds.h5 CONTIGUOUS -l CONTI
+VERIFY_LAYOUT_DSET vds_dset_compa 1_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
+VERIFY_LAYOUT_ALL vds_null_compa 2_vds.h5 COMPACT -l COMPA
+
+################################################################
+# layout conversions
+###############################################################
+VERIFY_LAYOUT_DSET vds_compa_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
+VERIFY_LAYOUT_DSET vds_compa_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
+VERIFY_LAYOUT_DSET vds_conti_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
+VERIFY_LAYOUT_DSET vds_conti_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
+VERIFY_LAYOUT_DSET vds_compa 4_vds.h5 vds_dset COMPACT -l vds_dset:COMPA
+VERIFY_LAYOUT_DSET vds_conti 4_vds.h5 vds_dset CONTIGUOUS -l vds_dset:CONTI
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c
index c19aba5..ac6ca23 100644
--- a/tools/h5stat/h5stat.c
+++ b/tools/h5stat/h5stat.c
@@ -1342,8 +1342,8 @@ print_dataset_info(const iter_t *iter)
printf("Dataset layout information:\n");
for(u = 0; u < H5D_NLAYOUTS; u++)
- printf("\tDataset layout counts[%s]: %lu\n", (u == 0 ? "COMPACT" :
- (u == 1 ? "CONTIG" : "CHUNKED")), iter->dset_layouts[u]);
+ printf("\tDataset layout counts[%s]: %lu\n", (u == H5D_COMPACT ? "COMPACT" :
+ (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))), iter->dset_layouts[u]);
printf("\tNumber of external files : %lu\n", iter->nexternal);
printf("Dataset filters information:\n");
diff --git a/tools/h5stat/testfiles/h5stat_dims1.ddl b/tools/h5stat/testfiles/h5stat_dims1.ddl
index c285ea4..07b2900 100644
--- a/tools/h5stat/testfiles/h5stat_dims1.ddl
+++ b/tools/h5stat/testfiles/h5stat_dims1.ddl
@@ -31,6 +31,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 23
Dataset layout counts[CHUNKED]: 0
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_dims2.ddl b/tools/h5stat/testfiles/h5stat_dims2.ddl
index 769749e..dbccd05 100644
--- a/tools/h5stat/testfiles/h5stat_dims2.ddl
+++ b/tools/h5stat/testfiles/h5stat_dims2.ddl
@@ -22,6 +22,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 23
Dataset layout counts[CHUNKED]: 0
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_filters-d.ddl b/tools/h5stat/testfiles/h5stat_filters-d.ddl
index 2e0bd64..6e6dd61 100644
--- a/tools/h5stat/testfiles/h5stat_filters-d.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-d.ddl
@@ -18,6 +18,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
Dataset layout counts[CHUNKED]: 12
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 2
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_filters-dT.ddl b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
index 9ef3e82..b14ca9f 100644
--- a/tools/h5stat/testfiles/h5stat_filters-dT.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters-dT.ddl
@@ -18,6 +18,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
Dataset layout counts[CHUNKED]: 12
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 2
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_filters.ddl b/tools/h5stat/testfiles/h5stat_filters.ddl
index 24522cd..1a4fd72 100644
--- a/tools/h5stat/testfiles/h5stat_filters.ddl
+++ b/tools/h5stat/testfiles/h5stat_filters.ddl
@@ -56,6 +56,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 1
Dataset layout counts[CONTIG]: 2
Dataset layout counts[CHUNKED]: 12
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 2
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_links2.ddl b/tools/h5stat/testfiles/h5stat_links2.ddl
index 09bf937..4622884 100644
--- a/tools/h5stat/testfiles/h5stat_links2.ddl
+++ b/tools/h5stat/testfiles/h5stat_links2.ddl
@@ -64,6 +64,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 23
Dataset layout counts[CHUNKED]: 0
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_newgrat.ddl b/tools/h5stat/testfiles/h5stat_newgrat.ddl
index 33d756b..e305f58 100644
--- a/tools/h5stat/testfiles/h5stat_newgrat.ddl
+++ b/tools/h5stat/testfiles/h5stat_newgrat.ddl
@@ -54,6 +54,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 1
Dataset layout counts[CHUNKED]: 0
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_numattrs2.ddl b/tools/h5stat/testfiles/h5stat_numattrs2.ddl
index 1313aec..ccb23c1 100644
--- a/tools/h5stat/testfiles/h5stat_numattrs2.ddl
+++ b/tools/h5stat/testfiles/h5stat_numattrs2.ddl
@@ -65,6 +65,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 23
Dataset layout counts[CHUNKED]: 0
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/h5stat/testfiles/h5stat_tsohm.ddl b/tools/h5stat/testfiles/h5stat_tsohm.ddl
index 37de79b..4cf33fc 100644
--- a/tools/h5stat/testfiles/h5stat_tsohm.ddl
+++ b/tools/h5stat/testfiles/h5stat_tsohm.ddl
@@ -53,6 +53,7 @@ Dataset layout information:
Dataset layout counts[COMPACT]: 0
Dataset layout counts[CONTIG]: 0
Dataset layout counts[CHUNKED]: 3
+ Dataset layout counts[VIRTUAL]: 0
Number of external files : 0
Dataset filters information:
Number of datasets with:
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index ff7cf12..d2e3ea6 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -93,6 +93,16 @@
#define PACKED_BITS "PACKED_BITS"
#define PACKED_OFFSET "OFFSET"
#define PACKED_LENGTH "LENGTH"
+#define VDS_VIRTUAL "VIRTUAL"
+#define VDS_MAPPING "MAPPING"
+#define VDS_SOURCE "SOURCE"
+#define VDS_REG_HYPERSLAB "SELECTION REGULAR_HYPERSLAB"
+#define VDS_IRR_HYPERSLAB "SELECTION IRREGULAR_HYPERSLAB"
+#define VDS_POINT "POINT"
+#define VDS_SRC_FILE "FILE"
+#define VDS_SRC_DATASET "DATASET"
+#define VDS_NONE "SELECTION NONE"
+#define VDS_ALL "SELECTION ALL"
#define BEGIN "{"
#define END "}"
@@ -182,6 +192,15 @@ typedef struct h5tools_dump_header_t {
const char *dataspacedimbegin;
const char *dataspacedimend;
+ const char *virtualselectionbegin;
+ const char *virtualselectionend;
+ const char *virtualselectionblockbegin;
+ const char *virtualselectionblockend;
+ const char *virtualfilenamebegin;
+ const char *virtualfilenameend;
+ const char *virtualdatasetnamebegin;
+ const char *virtualdatasetnameend;
+
} h5tools_dump_header_t;
/*
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 1e6e9d6..0d39981 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -179,6 +179,15 @@ BLOCK, /*blockbegin */
"", /*dataspacedescriptionend */
"(", /*dataspacedimbegin */
")", /*dataspacedimend */
+
+"", /*virtualselectionbegin */
+"", /*virtualselectionend */
+"{", /*virtualselectionblockbegin */
+"}", /*virtualselectionblockend */
+"\"", /*virtualfilenamebeginbegin */
+"\"", /*virtualfilenamebeginend */
+"\"", /*virtualdatasetnamebegin */
+"\"", /*virtualdtatasetnameend */
};
const h5tools_dump_header_t* h5tools_dump_header_format;
@@ -216,6 +225,13 @@ void h5tools_print_dims(h5tools_str_t *buffer, hsize_t *s, int dims);
void h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, struct subset_t *sset, int dims);
+static void h5tools_print_virtual_selection(hid_t vspace,
+ FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx/*in,out*/,
+ h5tools_str_t *buffer/*string into which to render */,
+ hsize_t *curr_pos/*total data element position*/,
+ size_t ncols);
+
void
h5tools_dump_init(void)
{
@@ -1523,6 +1539,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
/* Hyperslab info */
hsize_t hs_offset[H5S_MAX_RANK]; /* starting offset */
hsize_t hs_size[H5S_MAX_RANK]; /* size this pass */
+ //hsize_t hs_count[H5S_MAX_RANK]; /* size this pass */
hsize_t hs_nelmts; /* elements in request */
/* VL data special information */
@@ -1605,9 +1622,11 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
hs_size[i] = MIN(total_size[i] - hs_offset[i], sm_size[i]);
ctx->p_max_idx[i] = ctx->p_min_idx[i] + hs_size[i];
hs_nelmts *= hs_size[i];
+// hs_count[i] = 1;
}
H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL);
+// H5Sselect_hyperslab(f_space, H5S_SELECT_SET, hs_offset, NULL, hs_count, hs_size);
H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL);
}
else {
@@ -2844,7 +2863,78 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
h5tools_str_close(&buffer);
}
+/*-------------------------------------------------------------------------
+ * Function: print_virtual_selection
+ *
+ * Purpose: Print the virtual dataset selection.
+ *
+ * Return: void
+ *-------------------------------------------------------------------------
+ */
+static void
+h5tools_print_virtual_selection(hid_t vspace,
+ FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx/*in,out*/,
+ h5tools_str_t *buffer/*string into which to render */,
+ hsize_t *curr_pos/*total data element position*/,
+ size_t ncols)
+{
+ switch(H5Sget_select_type(vspace)) {
+ case H5S_SEL_NONE: /* Nothing selected */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", VDS_NONE);
+ break;
+ case H5S_SEL_POINTS: /* Sequence of points selected */
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s %s ", VDS_POINT, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_str_dump_space_points(buffer, vspace, info);
+ h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend);
+ break;
+ case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ if (H5Sis_regular_hyperslab(vspace)) {
+ h5tools_str_append(buffer, "%s %s ", VDS_REG_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_dump_space_slabs(buffer, vspace, info, ctx);
+ }
+ else {
+ h5tools_str_append(buffer, "%s %s ", VDS_IRR_HYPERSLAB, h5tools_dump_header_format->virtualselectionblockbegin);
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_dump_space_blocks(buffer, vspace, info);
+ ctx->indent_level--;
+ }
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend);
+ break;
+ case H5S_SEL_ALL: /* Entire extent selected */
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
+ h5tools_str_reset(buffer);
+ h5tools_str_append(buffer, "%s", VDS_ALL);
+ break;
+ default:
+ h5tools_str_append(buffer, "Unknown Selection");
+ }
+ h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+}
/*-------------------------------------------------------------------------
* Function: dump_fill_value
@@ -2932,14 +3022,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level++;
-
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
stl = H5Pget_layout(dcpl_id);
switch (stl) {
case H5D_CHUNKED:
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", CHUNKED);
@@ -3002,8 +3091,13 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level--;
break;
case H5D_COMPACT:
+ ctx->indent_level++;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", COMPACT);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3014,6 +3108,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ ctx->indent_level--;
break;
case H5D_CONTIGUOUS:
{
@@ -3025,7 +3120,11 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
* EXTERNAL_FILE
*-------------------------------------------------------------------------
*/
+ ctx->indent_level++;
if (next) {
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3061,6 +3160,9 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
else {
haddr_t ioffset;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
@@ -3080,8 +3182,116 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
}
+ ctx->indent_level--;
}
break;
+
+ case H5D_VIRTUAL:
+ {
+ char dsetname[256]; /* virtual datset name */
+ size_t vmaps;
+
+ H5Pget_virtual_count(dcpl_id, &vmaps);
+
+ if (vmaps) {
+ size_t next;
+ ssize_t ssize_out;
+
+ ctx->indent_level++;
+ for (next = 0; next < (unsigned) vmaps; next++) {
+ hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, next);
+ hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, next);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %ld %s ", VDS_MAPPING, next, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ h5tools_print_virtual_selection(virtual_vspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level++;
+
+ ssize_out = H5Pget_virtual_filename(dcpl_id, next, NULL, 0);
+ HDassert(ssize_out > 0);
+ HDassert((size_t)ssize_out < sizeof(name));
+ H5Pget_virtual_filename(dcpl_id, next, name, sizeof(name));
+ ssize_out = H5Pget_virtual_dsetname(dcpl_id, next, NULL, 0);
+ HDassert(ssize_out > 0);
+ HDassert((size_t)ssize_out < sizeof(name));
+ H5Pget_virtual_dsetname(dcpl_id, next, dsetname, sizeof(dsetname));
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE, h5tools_dump_header_format->virtualfilenamebegin);
+ h5tools_str_append(&buffer, "%s", name);
+ h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualfilenameend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET, h5tools_dump_header_format->virtualdatasetnamebegin);
+ h5tools_str_append(&buffer, "%s", dsetname);
+ h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->virtualdatasetnameend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ h5tools_print_virtual_selection(virtual_srcspace, stream, info, ctx, &buffer, &curr_pos, (size_t) ncols);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ ctx->indent_level--;
+ }
+ }
+ break;
+
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
@@ -3090,8 +3300,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
}/*switch*/
- ctx->indent_level--;
-
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 9d151d0..bdb82a4 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -413,9 +413,9 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
}
/*-------------------------------------------------------------------------
- * Function: h5tools_str_dump_region_blocks
+ * Function: h5tools_str_dump_space_slabs
*
- * Purpose: Prints information about a dataspace region by appending
+ * Purpose: Prints information about a dataspace selection by appending
* the information to the specified string.
*
* Return: none
@@ -426,19 +426,85 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
*-------------------------------------------------------------------------
*/
void
-h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
+h5tools_str_dump_space_slabs(h5tools_str_t *str, hid_t rspace,
+ const h5tool_format_t *info, h5tools_context_t *ctx)
+{
+ hsize_t start[H5S_MAX_RANK];
+ hsize_t stride[H5S_MAX_RANK];
+ hsize_t count[H5S_MAX_RANK];
+ hsize_t block[H5S_MAX_RANK];
+ int j;
+ int ndims = H5Sget_simple_extent_ndims(rspace);
+
+ H5Sget_regular_hyperslab(rspace, start, stride, count, block);
+
+ /* Print hyperslab information */
+
+ /* Start coordinates */
+ h5tools_str_append(str, "%s%s ", info->line_indent, START);
+ for (j = 0; j < ndims; j++)
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", start[j]);
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Stride coordinates */
+ h5tools_str_append(str, "%s ", STRIDE);
+ for (j = 0; j < ndims; j++)
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", stride[j]);
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Count coordinates */
+ h5tools_str_append(str, "%s ", COUNT);
+ for (j = 0; j < ndims; j++) {
+ if(count[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", count[j]);
+ }
+ h5tools_str_append(str, ")");
+ h5tools_str_append(str, "%s", "\n");
+ h5tools_str_indent(str, info, ctx);
+
+ /* Block coordinates */
+ h5tools_str_append(str, "%s ", BLOCK);
+ for (j = 0; j < ndims; j++) {
+ if(block[j] == H5S_UNLIMITED)
+ h5tools_str_append(str, "%s%s", j ? "," : "(","H5S_UNLIMITED");
+ else
+ h5tools_str_append(str, "%s" HSIZE_T_FORMAT, j ? "," : "(", block[j]);
+ }
+ h5tools_str_append(str, ")");
+}
+
+/*-------------------------------------------------------------------------
+ * Function: h5tools_str_dump_space_blocks
+ *
+ * Purpose: Prints information about a dataspace selection by appending
+ * the information to the specified string.
+ *
+ * Return: none
+ *
+ * In/Out:
+ * h5tools_str_t *str
+ *-------------------------------------------------------------------------
+ */
+void
+h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace,
const h5tool_format_t *info)
{
hssize_t nblocks;
hsize_t alloc_size;
hsize_t *ptdata;
- int ndims = H5Sget_simple_extent_ndims(region);
+ int ndims = H5Sget_simple_extent_ndims(rspace);
/*
- * This function fails if the region does not have blocks.
+ * This function fails if the rspace does not have blocks.
*/
H5E_BEGIN_TRY {
- nblocks = H5Sget_select_hyper_nblocks(region);
+ nblocks = H5Sget_select_hyper_nblocks(rspace);
} H5E_END_TRY;
/* Print block information */
@@ -449,7 +515,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
ptdata = (hsize_t *)HDmalloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(nblocks, hssize_t, hsize_t);
- H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata);
+ H5Sget_select_hyper_blocklist(rspace, (hsize_t)0, (hsize_t)nblocks, ptdata);
for (i = 0; i < nblocks; i++) {
int j;
@@ -473,32 +539,31 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
}
/*-------------------------------------------------------------------------
- * Function: h5tools_str_dump_region_points
+ * Function: h5tools_str_dump_space_points
*
- * Purpose: Prints information about a dataspace region by appending
+ * Purpose: Prints information about a dataspace selection by appending
* the information to the specified string.
*
* Return: none
*
* In/Out:
- * h5tools_context_t *ctx
* h5tools_str_t *str
*-------------------------------------------------------------------------
*/
void
-h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
+h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace,
const h5tool_format_t *info)
{
hssize_t npoints;
hsize_t alloc_size;
hsize_t *ptdata;
- int ndims = H5Sget_simple_extent_ndims(region);
+ int ndims = H5Sget_simple_extent_ndims(rspace);
/*
- * This function fails if the region does not have points.
+ * This function fails if the rspace does not have points.
*/
H5E_BEGIN_TRY {
- npoints = H5Sget_select_elem_npoints(region);
+ npoints = H5Sget_select_elem_npoints(rspace);
} H5E_END_TRY;
/* Print point information */
@@ -509,7 +574,7 @@ h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
HDassert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
ptdata = (hsize_t *)HDmalloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t);
- H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata);
+ H5Sget_select_elem_pointlist(rspace, (hsize_t)0, (hsize_t)npoints, ptdata);
for (i = 0; i < npoints; i++) {
int j;
@@ -1243,9 +1308,9 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info,
region_type = H5Sget_select_type(region);
if(region_type==H5S_SEL_POINTS)
- h5tools_str_dump_region_points(str, region, info);
+ h5tools_str_dump_space_points(str, region, info);
else
- h5tools_str_dump_region_blocks(str, region, info);
+ h5tools_str_dump_space_blocks(str, region, info);
h5tools_str_append(str, "}");
diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h
index 38697c6..6173b89 100644
--- a/tools/lib/h5tools_str.h
+++ b/tools/lib/h5tools_str.h
@@ -40,8 +40,9 @@ H5TOOLS_DLL char *h5tools_str_prefix(h5tools_str_t *str, const h5tool_format_
H5TOOLS_DLL char *h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
hsize_t elmtno, hsize_t *ptdata, unsigned ndims,
hsize_t max_idx[], h5tools_context_t *ctx);
-H5TOOLS_DLL void h5tools_str_dump_region_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
-H5TOOLS_DLL void h5tools_str_dump_region_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
+H5TOOLS_DLL void h5tools_str_dump_space_slabs(h5tools_str_t *, hid_t, const h5tool_format_t *, h5tools_context_t *ctx);
+H5TOOLS_DLL void h5tools_str_dump_space_blocks(h5tools_str_t *, hid_t, const h5tool_format_t *);
+H5TOOLS_DLL void h5tools_str_dump_space_points(h5tools_str_t *, hid_t, const h5tool_format_t *);
H5TOOLS_DLL void h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info, hid_t container,
void *vp);
H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info,
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index d53cdc8..088dbdf 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -52,6 +52,9 @@ if (BUILD_TESTING)
target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
+
+ add_subdirectory (${HDF5_TOOLS_MISC_SOURCE_DIR}/vds)
+
endif (HDF5_BUILD_GENERATORS)
add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
diff --git a/tools/misc/Makefile.am b/tools/misc/Makefile.am
index 53b1872..fdfe8f7 100644
--- a/tools/misc/Makefile.am
+++ b/tools/misc/Makefile.am
@@ -20,6 +20,8 @@
include $(top_srcdir)/config/commence.am
+SUBDIRS=vds
+
# Include src directory
AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
diff --git a/tools/misc/vds/CMakeLists.txt b/tools/misc/vds/CMakeLists.txt
new file mode 100644
index 0000000..dcf883c
--- /dev/null
+++ b/tools/misc/vds/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required (VERSION 3.1.0)
+PROJECT (HDF5_TOOLS_MISC_VDS)
+
+#-----------------------------------------------------------------------------
+# Setup include Directories
+#-----------------------------------------------------------------------------
+INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
+
+MACRO (ADD_H5_GENERATOR genfile)
+ add_executable (${genfile} ${HDF5_TOOLS_MISC_VDS_SOURCE_DIR}/${genfile}.c)
+ TARGET_NAMING (${genfile} STATIC)
+ TARGET_C_PROPERTIES (${genfile} STATIC " " " ")
+ target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (${genfile} PROPERTIES FOLDER generator/tools)
+ENDMACRO (ADD_H5_GENERATOR genfile)
+
+# generator executables
+set (H5_GENERATORS
+ UC_1_one_dim_gen
+ UC_2_two_dims_gen
+ UC_3_gaps_gen
+ UC_4_printf_gen
+ UC_5_stride_gen
+)
+
+foreach (gen ${H5_GENERATORS})
+ ADD_H5_GENERATOR (${gen})
+endforeach (gen ${H5_GENERATORS})
diff --git a/tools/misc/vds/Makefile.am b/tools/misc/vds/Makefile.am
new file mode 100644
index 0000000..f1ef80c
--- /dev/null
+++ b/tools/misc/vds/Makefile.am
@@ -0,0 +1,38 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# 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 HDF5 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.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src directory
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
+
+#test scripts and programs
+TEST_PROG=UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \
+ UC_5_stride_gen
+
+check_PROGRAMS=$(TEST_PROG)
+
+# Temporary files.
+CHECK_CLEANFILES+=*.h5
+
+# All programs rely on hdf5 library and h5tools library
+LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+
+include $(top_srcdir)/config/conclude.am
diff --git a/tools/misc/vds/UC_1.h b/tools/misc/vds/UC_1.h
new file mode 100644
index 0000000..29df72b
--- /dev/null
+++ b/tools/misc/vds/UC_1.h
@@ -0,0 +1,150 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_1_H
+#define UC_1_H
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 1
+ *
+ * Datasets have a single unlimited dimension and two fixed dimensions. They
+ * are mapped along a single dimension in the VDS with no gaps between them.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes
+
+ ***************** --+
+ * A * K
+ ***************** --+
+ * * |
+ * B * N
+ * * |
+ ***************** --+
+ * C *
+ *****************
+ * *
+ * D *
+ * *
+ *****************
+ * E *
+ *****************
+ * *
+ * F *
+ * *
+ *****************
+
+ | |
+ +-------M-------+
+
+
+ dim[0]
+ /
+ /
+ /
+ -----> dim[2]
+ |
+ |
+ |
+ dim[1]
+
+ */
+
+
+#define UC_1_N_SOURCES 6
+
+/* Dataset dimensions */
+#define UC_1_SM_HEIGHT 2 /* K */
+#define UC_1_LG_HEIGHT 4 /* N */
+#define UC_1_SM_LG_HEIGHT 6 /* SM_HEIGHT + LG_HEIGHT */
+#define UC_1_FULL_HEIGHT 18 /* (3 * K) + (3 * N) */
+#define UC_1_HALF_HEIGHT 9
+#define UC_1_WIDTH 8 /* M */
+#define UC_1_HALF_WIDTH 4
+
+#define UC_1_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */
+#define UC_1_N_TEST_PLANES 5 /* number of planes we write */
+
+/* Dataset datatypes */
+#define UC_1_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_1_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_1_DIMS[UC_1_N_SOURCES][RANK] = {
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+static hsize_t UC_1_VDS_DIMS[RANK] = {0, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+
+/* Maximum size of datasets, both source and VDS */
+static hsize_t UC_1_MAX_DIMS[UC_1_N_SOURCES][RANK] = {
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+static hsize_t UC_1_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+
+/* Planes */
+static hsize_t UC_1_PLANES[UC_1_N_SOURCES][RANK] = {
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+static hsize_t UC_1_VDS_PLANE[RANK] = {1, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+
+/* File names for source datasets */
+static char UC_1_FILE_NAMES[UC_1_N_SOURCES][NAME_LEN] = {
+ {"1_a.h5"},
+ {"1_b.h5"},
+ {"1_c.h5"},
+ {"1_d.h5"},
+ {"1_e.h5"},
+ {"1_f.h5"}
+};
+
+/* VDS file name */
+static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5";
+
+/* Dataset names */
+static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_1_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static hsize_t UC_1_FILL_VALUES[UC_1_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5,
+ -6
+};
+static int UC_1_VDS_FILL_VALUE = -9;
+
+#endif /* UC_1_H */
+
diff --git a/tools/misc/vds/UC_1_one_dim_gen.c b/tools/misc/vds/UC_1_one_dim_gen.c
new file mode 100644
index 0000000..a78268b
--- /dev/null
+++ b/tools/misc/vds/UC_1_one_dim_gen.c
@@ -0,0 +1,239 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 1
+ *
+ * See the header file for a description.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+#include "UC_1.h"
+
+
+int
+main(int argc, char *argv[])
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t extent[RANK]; /* dataset extents */
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ int map_start = -1; /* starting point in the VDS map */
+
+ int *buffer = NULL; /* data buffer */
+ hsize_t count = 0; /* number of elements in a plane */
+ int n_planes = -1; /* number of planes to write */
+ int value = -1; /* value written to datasets */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ int k; /* iterator */
+
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_1_VDS_DATATYPE,
+ &UC_1_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_1_VDS_DIMS,
+ UC_1_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ map_start = 0;
+
+ for(i = 0; i < UC_1_N_SOURCES; i++) {
+
+ /* Create source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_1_PLANES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_1_SOURCE_DATATYPE,
+ &UC_1_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(0 != i % 2)
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_1_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i],
+ UC_1_MAX_DIMS[i])) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_1_SOURCE_DSET_NAME,
+ UC_1_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent (will eventually vary with i) */
+ extent[0] = UC_1_N_TEST_PLANES;
+ extent[1] = UC_1_PLANES[i][1];
+ extent[2] = UC_1_PLANES[i][2];
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ count = UC_1_PLANES[i][1] * UC_1_PLANES[i][2];
+ if(NULL == (buffer = (int *)malloc(count * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_1_PLANES[i], NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset, number will eventually vary with i */
+ n_planes = UC_1_N_TEST_PLANES;
+ for(j = 0; j < n_planes; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < count; k++)
+ buffer[k] = value;
+
+ start[0] = j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_1_PLANES[i], NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ start[0] = 0;
+ start[1] = map_start;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ map_start += UC_1_PLANES[i][1];
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i],
+ UC_1_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_1_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_1_VDS_DSET_NAME, UC_1_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main */
+
diff --git a/tools/misc/vds/UC_2.h b/tools/misc/vds/UC_2.h
new file mode 100644
index 0000000..3e4e4fd
--- /dev/null
+++ b/tools/misc/vds/UC_2.h
@@ -0,0 +1,151 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_2_H
+#define UC_2_H
+
+#include "hdf5.h"
+
+/*
+ * Definitions for VDS use case 2
+ *
+ * Datasets have a single unlimited dimension and two fixed dimensions. They
+ * are mapped along two dimensions in the VDS with no gaps between them.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes
+
+ **********************************
+ * A * *
+ ***************** D *
+ * * *
+ * B * *
+ * ******************
+ ***************** E *
+ * C * *
+ **********************************
+
+
+ dim[0]
+ /
+ /
+ /
+ -----> dim[2]
+ |
+ |
+ |
+ dim[1]
+
+ */
+
+#define UC_2_N_SOURCES 5
+
+/* Dataset dimensions */
+#define UC_2_A_HEIGHT 2
+#define UC_2_B_HEIGHT 4
+#define UC_2_AB_HEIGHT 6 /* For hyperslab start position */
+#define UC_2_C_HEIGHT 2
+#define UC_2_D_HEIGHT 5
+#define UC_2_E_HEIGHT 3
+#define UC_2_FULL_HEIGHT 8 /* A+B+C and D+E */
+#define UC_2_WIDTH 7
+#define UC_2_FULL_WIDTH 14 /* 2*width */
+
+#define UC_2_N_PLANES_IN_SERIES 3 /* number of planes in a series of sub-images */
+#define UC_2_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */
+#define UC_2_N_TEST_PLANES 6 /* number of planes we write */
+
+/* Dataset datatypes */
+#define UC_2_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_2_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_2_DIMS[UC_2_N_SOURCES][RANK] = {
+ {0, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+static hsize_t UC_2_VDS_DIMS[RANK] = {0, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+
+/* Maximum size of datasets, both source and VDS */
+static hsize_t UC_2_MAX_DIMS[UC_2_N_SOURCES][RANK] = {
+ {UC_2_N_MAX_PLANES, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+static hsize_t UC_2_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+
+/* Positions of source datasets in the VDS */
+static hsize_t UC_2_POSITIONS[UC_2_N_SOURCES][RANK] = {
+ /* A */ {0, 0, 0},
+ /* B */ {0, UC_2_A_HEIGHT, 0},
+ /* C */ {0, UC_2_AB_HEIGHT, 0},
+ /* D */ {0, 0, UC_2_WIDTH},
+ /* E */ {0, UC_2_D_HEIGHT, UC_2_WIDTH}
+};
+
+/* Planes */
+static hsize_t UC_2_PLANES[UC_2_N_SOURCES][RANK] = {
+ {1, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+static hsize_t UC_2_VDS_SUB_IMAGE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_WIDTH};
+static hsize_t UC_2_VDS_PLANE[RANK] = {1, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+
+/* Chunk dimensions */
+static hsize_t UC_2_CHUNK_DIMS[UC_2_N_SOURCES][RANK] = {
+ {UC_2_N_PLANES_IN_SERIES, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* File names for source datasets */
+static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = {
+ {"2_a.h5"},
+ {"2_b.h5"},
+ {"2_c.h5"},
+ {"2_d.h5"},
+ {"2_e.h5"}
+};
+
+/* VDS file name */
+#define UC_2_VDS_FILE_NAME "2_vds.h5"
+
+/* Dataset names */
+#define UC_2_SOURCE_DSET_NAME "source_dset"
+#define UC_2_SOURCE_DSET_PATH "/source_dset"
+#define UC_2_VDS_DSET_NAME "vds_dset"
+
+/* Fill values */
+static hsize_t UC_2_FILL_VALUES[UC_2_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5
+};
+static int UC_2_VDS_FILL_VALUE = -9;
+
+#endif /* UC_2_H */
+
diff --git a/tools/misc/vds/UC_2_two_dims_gen.c b/tools/misc/vds/UC_2_two_dims_gen.c
new file mode 100644
index 0000000..b5fd319
--- /dev/null
+++ b/tools/misc/vds/UC_2_two_dims_gen.c
@@ -0,0 +1,230 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 2
+ *
+ * See the header file for a description.
+ */
+
+
+#include <stdlib.h>
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+#include "UC_2.h"
+
+int
+main(int argc, char *argv[])
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ hsize_t extent[RANK]; /* dataset extents */
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+ hsize_t count = 0; /* number of elements in a plane */
+ int n_planes = -1; /* number of planes to write */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ int k; /* iterator */
+
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_2_VDS_DATATYPE,
+ &UC_2_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_2_VDS_DIMS,
+ UC_2_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ for(i = 0; i < UC_2_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_2_CHUNK_DIMS[i]) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_2_SOURCE_DATATYPE,
+ &UC_2_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_2_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i],
+ UC_2_MAX_DIMS[i])) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_2_SOURCE_DSET_NAME,
+ UC_2_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent (will eventually vary with i) */
+ extent[0] = UC_2_N_TEST_PLANES;
+ extent[1] = UC_2_PLANES[i][1];
+ extent[2] = UC_2_PLANES[i][2];
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ count = UC_2_PLANES[i][1] * UC_2_PLANES[i][2];
+ if(NULL == (buffer = (int *)malloc(count * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_2_PLANES[i], NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset, number will eventually vary with i */
+ n_planes = UC_2_N_TEST_PLANES;
+ for(j = 0; j < n_planes; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < count; k++)
+ buffer[k] = value;
+
+ start[0] = j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_2_PLANES[i], NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_2_POSITIONS[i], NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i],
+ UC_2_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_2_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_2_VDS_DSET_NAME, UC_2_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/misc/vds/UC_3.h b/tools/misc/vds/UC_3.h
new file mode 100644
index 0000000..a27c3cf
--- /dev/null
+++ b/tools/misc/vds/UC_3.h
@@ -0,0 +1,78 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_3_H
+#define UC_3_H
+
+#include "hdf5.h"
+
+#include "UC_1.h"
+#include "UC_2.h"
+
+/*
+ * Definitions for VDS use case 3
+ *
+ * Datasets have a single unlimited dimension and one or two fixed
+ * dimensions (they are reused from use cases 1 and 2). In this use case,
+ * the datasets are mapped in the VDS with gaps between them.
+ */
+
+/* VDS dimensions
+ * Height and width are large enough to encompass the
+ * mapped source datasets with gaps.
+ */
+#define UC_31_VDS_HEIGHT 25 /* full height + 7 (gaps of 1) */
+#define UC_31_VDS_WIDTH 8 /* full width + 0 (no gaps) */
+#define UC_32_VDS_HEIGHT 13 /* full height + 5 */
+#define UC_32_VDS_WIDTH 19 /* full width + 5 */
+#define UC_31_GAP 1
+
+/* VDS datatypes */
+#define UC_31_VDS_DATATYPE H5T_STD_I32LE
+#define UC_32_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of virtual datasets */
+static hsize_t UC_31_VDS_DIMS[RANK] = {0, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
+static hsize_t UC_32_VDS_DIMS[RANK] = {0, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
+
+/* Maximum size of virtual datasets */
+static hsize_t UC_31_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
+static hsize_t UC_32_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
+
+/* Positions of mapped source datasets */
+static hsize_t UC_32_POSITIONS[UC_2_N_SOURCES][RANK] = {
+ /* A */ {0, 1, 1},
+ /* B */ {0, 4, 0},
+ /* C */ {0, 11, 4},
+ /* D */ {0, 1, 9},
+ /* E */ {0, 8, 12}
+};
+
+/* Planes */
+static hsize_t UC_31_VDS_PLANE[RANK] = {1, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
+static hsize_t UC_32_VDS_PLANE[RANK] = {1, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
+
+/* VDS file names */
+#define UC_31_VDS_FILE_NAME "3_1_vds.h5"
+#define UC_32_VDS_FILE_NAME "3_2_vds.h5"
+
+/* Dataset name */
+#define UC_3_VDS_DSET_NAME "vds_dset"
+
+/* Fill value */
+static int UC_3_VDS_FILL_VALUE = -9;
+
+#endif /* UC_3_H */
+
diff --git a/tools/misc/vds/UC_3_gaps_gen.c b/tools/misc/vds/UC_3_gaps_gen.c
new file mode 100644
index 0000000..1f150c1
--- /dev/null
+++ b/tools/misc/vds/UC_3_gaps_gen.c
@@ -0,0 +1,255 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 3
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_3.h"
+
+/* Create the VDS that uses use case 1 files */
+herr_t
+create_3_1_vds(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+
+ hsize_t start[RANK]; /* source starting point for hyperslab */
+ hsize_t position[RANK]; /* vds mapping positions */
+
+ int i; /* iterator */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_31_VDS_DATATYPE,
+ &UC_3_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_31_VDS_DIMS,
+ UC_31_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /* Set starting positions */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ position[0] = 0;
+ position[1] = UC_31_GAP;
+ position[2] = 0;
+
+ /******************************
+ * Create source-VDS mappings *
+ ******************************/
+ for(i = 0; i < UC_1_N_SOURCES; i++) {
+
+ if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i],
+ UC_1_MAX_DIMS[i])) < 0)
+ UC_ERROR
+
+ /* set up hyperslabs for source and destination datasets */
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, position,
+ NULL, UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ position[1] += UC_1_DIMS[i][1] + UC_31_GAP;
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i],
+ UC_1_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_31_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_31_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return 0;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ } H5E_END_TRY
+
+ return -1;
+
+} /* end create_3_1_vds() */
+
+/* Create the VDS that uses use case 2 files */
+herr_t
+create_3_2_vds(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+
+ hsize_t start[RANK]; /* source starting point for hyperslab */
+
+ int i; /* iterator */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_32_VDS_DATATYPE,
+ &UC_3_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_32_VDS_DIMS,
+ UC_32_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /* Set starting positions */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ /******************************
+ * Create source-VDS mappings *
+ ******************************/
+ for(i = 0; i < UC_2_N_SOURCES; i++) {
+
+ if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i],
+ UC_2_MAX_DIMS[i])) < 0)
+ UC_ERROR
+
+ /* set up hyperslabs for source and destination datasets */
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_32_POSITIONS[i],
+ NULL, UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i],
+ UC_2_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_32_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_32_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return 0;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ } H5E_END_TRY
+
+ return -1;
+
+} /* end create_3_2_vds() */
+
+int
+main(int argc, char *argv[])
+{
+
+ if(create_3_1_vds() < 0)
+ UC_ERROR
+
+ if(create_3_2_vds() < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/misc/vds/UC_4.h b/tools/misc/vds/UC_4.h
new file mode 100644
index 0000000..ce74e63
--- /dev/null
+++ b/tools/misc/vds/UC_4.h
@@ -0,0 +1,86 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_4_H
+#define UC_4_H
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 4
+ *
+ * Source datasets have three fixed dimensions. In this use case, the
+ * datasets are mapped consecutively in the VDS along a single dimension with
+ * no gaps between them. Datasets are automatically loaded using a
+ * printf-like format string for the file name.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes */
+
+#define UC_4_N_SOURCES 3
+
+/* Dataset dimensions */
+#define UC_4_SRC_PLANES 3
+#define UC_4_HEIGHT 4
+#define UC_4_WIDTH 4
+
+/* max number of planes for VDS (sources are finite) */
+#define UC_4_VDS_MAX_PLANES H5S_UNLIMITED
+#define UC_4_N_TEST_PLANES 9 /* number of planes in the VDS */
+
+/* Dataset datatypes */
+#define UC_4_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_4_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_4_SOURCE_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH};
+static hsize_t UC_4_VDS_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* Max size of datasets, both source and VDS */
+static hsize_t UC_4_SOURCE_MAX_DIMS[RANK] = {UC_4_SRC_PLANES, UC_4_HEIGHT, UC_4_WIDTH};
+static hsize_t UC_4_VDS_MAX_DIMS[RANK] = {UC_4_VDS_MAX_PLANES, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* Planes (both source and VDS) */
+static hsize_t UC_4_PLANE[RANK] = {1, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* File names for source datasets */
+static char UC_4_FILE_NAMES[UC_4_N_SOURCES][NAME_LEN] = {
+ {"4_0.h5"},
+ {"4_1.h5"},
+ {"4_2.h5"}
+};
+static char UC_4_MAPPING_FILE_NAME[NAME_LEN] = "4_%b.h5";
+
+/* VDS file name */
+static char UC_4_VDS_FILE_NAME[NAME_LEN] = "4_vds.h5";
+
+/* Dataset names */
+static char UC_4_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_4_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+static char UC_4_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static hsize_t UC_4_FILL_VALUES[UC_4_N_SOURCES] = {
+ -1,
+ -2,
+ -3
+};
+static int UC_4_VDS_FILL_VALUE = -9;
+
+#endif /* UC_4_H */
+
+
diff --git a/tools/misc/vds/UC_4_printf_gen.c b/tools/misc/vds/UC_4_printf_gen.c
new file mode 100644
index 0000000..c8e111a
--- /dev/null
+++ b/tools/misc/vds/UC_4_printf_gen.c
@@ -0,0 +1,219 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 4
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_4.h"
+
+int
+main(int argc, char *argv[])
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ /* Hyperslab arrays */
+ hsize_t start[RANK] = {0, 0, 0};
+ hsize_t count[RANK] = {H5S_UNLIMITED, 1, 1};
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+
+ hsize_t n = 0; /* number of elements in a plane */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ int k; /* iterator */
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ /* Create source dataspace ID */
+ if((src_sid = H5Screate_simple(RANK, UC_4_SOURCE_DIMS,
+ UC_4_SOURCE_MAX_DIMS)) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_4_SOURCE_MAX_DIMS, NULL) < 0)
+ UC_ERROR
+
+ /* Create source files and datasets */
+ for(i = 0; i < UC_4_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_4_PLANE) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_4_SOURCE_DATATYPE,
+ &UC_4_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file and dataset */
+ if((fid = H5Fcreate(UC_4_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_4_SOURCE_DSET_NAME,
+ UC_4_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent */
+ if(H5Dset_extent(did, UC_4_SOURCE_MAX_DIMS) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ n = UC_4_PLANE[1] * UC_4_PLANE[2];
+ if(NULL == (buffer = (int *)malloc(n * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_4_PLANE, NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset */
+ for(j = 0; j < UC_4_SRC_PLANES; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < n; k++)
+ buffer[k] = value;
+
+ start[0] = j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_4_PLANE, NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* Create file */
+ if((fid = H5Fcreate(UC_4_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_4_VDS_DATATYPE,
+ &UC_4_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_4_VDS_DIMS,
+ UC_4_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start,
+ UC_4_SOURCE_MAX_DIMS, count, UC_4_SOURCE_MAX_DIMS) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping - The mapped file name uses a printf-like
+ * naming scheme that automatically maps new files.
+ */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_4_MAPPING_FILE_NAME,
+ UC_4_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* Create dataset */
+ if((did = H5Dcreate2(fid, UC_4_VDS_DSET_NAME, UC_4_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/misc/vds/UC_5.h b/tools/misc/vds/UC_5.h
new file mode 100644
index 0000000..b22b177
--- /dev/null
+++ b/tools/misc/vds/UC_5.h
@@ -0,0 +1,83 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_5_H
+#define UC_5_H
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 5
+ *
+ * Source datasets have one unlimited dimension and two fixed dimensions. In
+ * this use case, the datasets are mapped in the VDS so that alternating
+ * planes in the source are interleaved in the VDS.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes */
+
+#define UC_5_N_SOURCES 3
+
+/* Dataset dimensions */
+#define UC_5_SRC_PLANES 3
+#define UC_5_HEIGHT 4
+#define UC_5_WIDTH 4
+
+/* max number of planes for datasets */
+#define UC_5_MAX_PLANES H5S_UNLIMITED
+#define UC_5_N_TEST_PLANES 9 /* number of planes in VDS */
+
+/* Dataset datatypes */
+#define UC_5_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_5_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_5_SOURCE_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH};
+static hsize_t UC_5_VDS_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* Max size of datasets, both source and VDS */
+static hsize_t UC_5_SOURCE_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH};
+static hsize_t UC_5_VDS_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* Planes (both source and VDS) */
+static hsize_t UC_5_PLANE[RANK] = {1, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* File names for source datasets */
+static char UC_5_FILE_NAMES[UC_5_N_SOURCES][NAME_LEN] = {
+ {"5_a.h5"},
+ {"5_b.h5"},
+ {"5_c.h5"}
+};
+
+/* VDS file name */
+static char UC_5_VDS_FILE_NAME[NAME_LEN] = "5_vds.h5";
+
+/* Dataset names */
+static char UC_5_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_5_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+static char UC_5_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static hsize_t UC_5_FILL_VALUES[UC_5_N_SOURCES] = {
+ -1,
+ -2,
+ -3
+};
+static int UC_5_VDS_FILL_VALUE = -9;
+
+#endif /* UC_5_H */
+
diff --git a/tools/misc/vds/UC_5_stride_gen.c b/tools/misc/vds/UC_5_stride_gen.c
new file mode 100644
index 0000000..984aadc
--- /dev/null
+++ b/tools/misc/vds/UC_5_stride_gen.c
@@ -0,0 +1,243 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 5
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_5.h"
+
+int
+main(int argc, char *argv[])
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t extent[RANK]; /* source dataset extents */
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ hsize_t stride[RANK]; /* hypserslab stride */
+ hsize_t count[RANK]; /* hypserslab count */
+ int map_start = -1; /* starting point in the VDS map */
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+
+ hsize_t n = 0; /* number of elements in a plane */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ int k; /* iterator */
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_5_VDS_DATATYPE,
+ &UC_5_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_5_VDS_DIMS,
+ UC_5_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /*********************************
+ * Map source files and datasets *
+ *********************************/
+
+ /* Hyperslab array setup */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ map_start = 0;
+
+ stride[0] = UC_5_N_SOURCES;
+ stride[1] = 1;
+ stride[2] = 1;
+
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+
+ extent[0] = UC_5_SRC_PLANES;
+ extent[1] = UC_5_HEIGHT;
+ extent[2] = UC_5_WIDTH;
+
+ for(i = 0; i < UC_5_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_5_PLANE) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_5_SOURCE_DATATYPE,
+ &UC_5_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_5_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_5_SOURCE_DIMS,
+ UC_5_SOURCE_MAX_DIMS)) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_5_SOURCE_DSET_NAME,
+ UC_5_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent */
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ n = UC_5_PLANE[1] * UC_5_PLANE[2];
+ if(NULL == (buffer = (int *)malloc(n * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_5_PLANE, NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset */
+ for(j = 0; j < UC_5_SRC_PLANES; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < n; k++)
+ buffer[k] = value;
+
+ start[0] = j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_5_PLANE, NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_5_SOURCE_MAX_DIMS, NULL) < 0)
+ UC_ERROR
+ start[0] = map_start;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, stride,
+ count, UC_5_PLANE) < 0)
+ UC_ERROR
+ map_start += 1;
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_5_FILE_NAMES[i],
+ UC_5_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_5_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_5_VDS_DSET_NAME, UC_5_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/misc/vds/UC_common.h b/tools/misc/vds/UC_common.h
new file mode 100644
index 0000000..0e61016
--- /dev/null
+++ b/tools/misc/vds/UC_common.h
@@ -0,0 +1,41 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * 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 HDF5 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef USE_CASE_COMMON_H
+#define USE_CASE_COMMON_H
+
+/******************************************
+ * Symbols used across multiple use cases *
+ ******************************************/
+
+/* All datasets are 3D */
+#define RANK 3
+
+/* Lengths of string identifiers (file, dataset names, etc.) */
+#define NAME_LEN 32
+
+/* Compression level */
+#define COMPRESSION_LEVEL 7
+
+/* Booleans */
+#define TRUE 1
+#define FALSE 0
+
+/* Testing macros */
+#define AT() printf (" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
+#define UC_ERROR {puts("*ERROR*"); fflush(stdout); AT(); goto error;}
+
+#endif /* USE_CASE_COMMON_H */
+
diff --git a/tools/testfiles/vds/1_a.h5 b/tools/testfiles/vds/1_a.h5
new file mode 100644
index 0000000..953d33d
--- /dev/null
+++ b/tools/testfiles/vds/1_a.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_b.h5 b/tools/testfiles/vds/1_b.h5
new file mode 100644
index 0000000..6ba95e6
--- /dev/null
+++ b/tools/testfiles/vds/1_b.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_c.h5 b/tools/testfiles/vds/1_c.h5
new file mode 100644
index 0000000..4bcebbd
--- /dev/null
+++ b/tools/testfiles/vds/1_c.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_d.h5 b/tools/testfiles/vds/1_d.h5
new file mode 100644
index 0000000..9c2d795
--- /dev/null
+++ b/tools/testfiles/vds/1_d.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_e.h5 b/tools/testfiles/vds/1_e.h5
new file mode 100644
index 0000000..4f7aa7b
--- /dev/null
+++ b/tools/testfiles/vds/1_e.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_f.h5 b/tools/testfiles/vds/1_f.h5
new file mode 100644
index 0000000..62e86bc
--- /dev/null
+++ b/tools/testfiles/vds/1_f.h5
Binary files differ
diff --git a/tools/testfiles/vds/1_vds.h5 b/tools/testfiles/vds/1_vds.h5
new file mode 100644
index 0000000..707a37f
--- /dev/null
+++ b/tools/testfiles/vds/1_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_a.h5 b/tools/testfiles/vds/2_a.h5
new file mode 100644
index 0000000..5227e9e
--- /dev/null
+++ b/tools/testfiles/vds/2_a.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_b.h5 b/tools/testfiles/vds/2_b.h5
new file mode 100644
index 0000000..34723a3
--- /dev/null
+++ b/tools/testfiles/vds/2_b.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_c.h5 b/tools/testfiles/vds/2_c.h5
new file mode 100644
index 0000000..d2252fc
--- /dev/null
+++ b/tools/testfiles/vds/2_c.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_d.h5 b/tools/testfiles/vds/2_d.h5
new file mode 100644
index 0000000..6880c2e
--- /dev/null
+++ b/tools/testfiles/vds/2_d.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_e.h5 b/tools/testfiles/vds/2_e.h5
new file mode 100644
index 0000000..81ffacc
--- /dev/null
+++ b/tools/testfiles/vds/2_e.h5
Binary files differ
diff --git a/tools/testfiles/vds/2_vds.h5 b/tools/testfiles/vds/2_vds.h5
new file mode 100644
index 0000000..cbef59c
--- /dev/null
+++ b/tools/testfiles/vds/2_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/3_1_vds.h5 b/tools/testfiles/vds/3_1_vds.h5
new file mode 100644
index 0000000..e66e4c7
--- /dev/null
+++ b/tools/testfiles/vds/3_1_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/3_2_vds.h5 b/tools/testfiles/vds/3_2_vds.h5
new file mode 100644
index 0000000..a19dab5
--- /dev/null
+++ b/tools/testfiles/vds/3_2_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/4_0.h5 b/tools/testfiles/vds/4_0.h5
new file mode 100644
index 0000000..5e71d20
--- /dev/null
+++ b/tools/testfiles/vds/4_0.h5
Binary files differ
diff --git a/tools/testfiles/vds/4_1.h5 b/tools/testfiles/vds/4_1.h5
new file mode 100644
index 0000000..edad46e
--- /dev/null
+++ b/tools/testfiles/vds/4_1.h5
Binary files differ
diff --git a/tools/testfiles/vds/4_2.h5 b/tools/testfiles/vds/4_2.h5
new file mode 100644
index 0000000..a82b012
--- /dev/null
+++ b/tools/testfiles/vds/4_2.h5
Binary files differ
diff --git a/tools/testfiles/vds/4_vds.h5 b/tools/testfiles/vds/4_vds.h5
new file mode 100644
index 0000000..64c2288
--- /dev/null
+++ b/tools/testfiles/vds/4_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/5_a.h5 b/tools/testfiles/vds/5_a.h5
new file mode 100644
index 0000000..e8ea552
--- /dev/null
+++ b/tools/testfiles/vds/5_a.h5
Binary files differ
diff --git a/tools/testfiles/vds/5_b.h5 b/tools/testfiles/vds/5_b.h5
new file mode 100644
index 0000000..6da7cf5
--- /dev/null
+++ b/tools/testfiles/vds/5_b.h5
Binary files differ
diff --git a/tools/testfiles/vds/5_c.h5 b/tools/testfiles/vds/5_c.h5
new file mode 100644
index 0000000..3e3bc61
--- /dev/null
+++ b/tools/testfiles/vds/5_c.h5
Binary files differ
diff --git a/tools/testfiles/vds/5_vds.h5 b/tools/testfiles/vds/5_vds.h5
new file mode 100644
index 0000000..379485e
--- /dev/null
+++ b/tools/testfiles/vds/5_vds.h5
Binary files differ
diff --git a/tools/testfiles/vds/tvds-1.ddl b/tools/testfiles/vds/tvds-1.ddl
new file mode 100644
index 0000000..47fd413
--- /dev/null
+++ b/tools/testfiles/vds/tvds-1.ddl
@@ -0,0 +1,100 @@
+HDF5 "1_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 18, 8 ) / ( H5S_UNLIMITED, 18, 8 ) }
+ DATA {
+ (0,0,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,2,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,3,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,6,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,7,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,8,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,9,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,10,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,11,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,12,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,13,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,14,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,15,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,16,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,17,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (1,0,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,2,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,3,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,6,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,7,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,8,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,9,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,10,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,11,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,12,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,13,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,14,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,15,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,16,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,17,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (2,0,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,2,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,3,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,6,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,7,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,8,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,9,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,10,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,11,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,12,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,13,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,14,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,15,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,16,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,17,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (3,0,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,2,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,3,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,6,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,7,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,8,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,9,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,10,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,11,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,12,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,13,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,14,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,15,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,16,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,0,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,2,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,3,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,6,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,7,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,8,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,9,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,10,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,11,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,12,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,13,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,14,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,15,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,16,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,17,0): 64, 64, 64, 64, 64, 64, 64, 64
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-1.ls b/tools/testfiles/vds/tvds-1.ls
new file mode 100644
index 0000000..61c9e46
--- /dev/null
+++ b/tools/testfiles/vds/tvds-1.ls
@@ -0,0 +1,14 @@
+Opened "1_vds.h5" with sec2 driver.
+vds_dset Dataset {5/Inf, 18/18, 8/8}
+ Location: 1:800
+ Links: 1
+ Maps: {6} Source {
+ 1_a.h5 /source_dset
+ 1_b.h5 /source_dset
+ 1_c.h5 /source_dset
+ 1_d.h5 /source_dset
+ 1_e.h5 /source_dset
+ 1_f.h5 /source_dset
+ }
+ Storage: 2880 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds-2.ddl b/tools/testfiles/vds/tvds-2.ddl
new file mode 100644
index 0000000..5f2ae16
--- /dev/null
+++ b/tools/testfiles/vds/tvds-2.ddl
@@ -0,0 +1,58 @@
+HDF5 "2_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6, 8, 14 ) / ( H5S_UNLIMITED, 8, 14 ) }
+ DATA {
+ (0,0,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40,
+ (0,2,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,3,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50,
+ (0,6,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50,
+ (0,7,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50,
+ (1,0,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41,
+ (1,2,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,3,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 51, 51, 51, 51, 51, 51, 51,
+ (1,6,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51,
+ (1,7,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51,
+ (2,0,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42,
+ (2,2,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,3,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 52, 52, 52, 52, 52, 52, 52,
+ (2,6,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52,
+ (2,7,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52,
+ (3,0,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43,
+ (3,2,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,3,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 53, 53, 53, 53, 53, 53, 53,
+ (3,6,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53,
+ (3,7,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53,
+ (4,0,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44,
+ (4,2,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,3,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 54, 54, 54, 54, 54, 54, 54,
+ (4,6,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54,
+ (4,7,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54,
+ (5,0,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45,
+ (5,1,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45,
+ (5,2,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,3,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,4,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,5,0): 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55,
+ (5,6,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55,
+ (5,7,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-2.ls b/tools/testfiles/vds/tvds-2.ls
new file mode 100644
index 0000000..49fe05f
--- /dev/null
+++ b/tools/testfiles/vds/tvds-2.ls
@@ -0,0 +1,13 @@
+Opened "2_vds.h5" with sec2 driver.
+vds_dset Dataset {6/Inf, 8/8, 14/14}
+ Location: 1:800
+ Links: 1
+ Maps: {5} Source {
+ 2_a.h5 /source_dset
+ 2_b.h5 /source_dset
+ 2_c.h5 /source_dset
+ 2_d.h5 /source_dset
+ 2_e.h5 /source_dset
+ }
+ Storage: 2688 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds-3_1.ddl b/tools/testfiles/vds/tvds-3_1.ddl
new file mode 100644
index 0000000..7d7d8b6
--- /dev/null
+++ b/tools/testfiles/vds/tvds-3_1.ddl
@@ -0,0 +1,135 @@
+HDF5 "3_1_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 25, 8 ) / ( H5S_UNLIMITED, 25, 8 ) }
+ DATA {
+ (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,6,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,7,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,9,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,10,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,12,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,13,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,14,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,15,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,17,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,18,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,20,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,21,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,22,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,23,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,2,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,6,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,7,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,9,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,10,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,12,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,13,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,14,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,15,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,17,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,18,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,20,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,21,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,22,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,23,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,2,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,6,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,7,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,9,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,10,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,12,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,13,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,14,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,15,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,17,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,18,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,20,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,21,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,22,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,23,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,2,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,6,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,7,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,9,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,10,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,12,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,13,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,14,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,15,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,17,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,18,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,20,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,21,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,22,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,23,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,2,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,6,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,7,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,9,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,10,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,12,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,13,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,14,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,15,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,17,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,18,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,20,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,21,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,22,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,23,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,24,0): -9, -9, -9, -9, -9, -9, -9, -9
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-3_1.ls b/tools/testfiles/vds/tvds-3_1.ls
new file mode 100644
index 0000000..fe24002
--- /dev/null
+++ b/tools/testfiles/vds/tvds-3_1.ls
@@ -0,0 +1,14 @@
+Opened "3_1_vds.h5" with sec2 driver.
+vds_dset Dataset {5/Inf, 25/25, 8/8}
+ Location: 1:800
+ Links: 1
+ Maps: {6} Source {
+ 1_a.h5 /source_dset
+ 1_b.h5 /source_dset
+ 1_c.h5 /source_dset
+ 1_d.h5 /source_dset
+ 1_e.h5 /source_dset
+ 1_f.h5 /source_dset
+ }
+ Storage: 4000 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds-3_2.ddl b/tools/testfiles/vds/tvds-3_2.ddl
new file mode 100644
index 0000000..baec6f0
--- /dev/null
+++ b/tools/testfiles/vds/tvds-3_2.ddl
@@ -0,0 +1,166 @@
+HDF5 "3_2_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6, 13, 19 ) / ( H5S_UNLIMITED, 13, 19 ) }
+ DATA {
+ (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,0,15): -9, -9, -9, -9,
+ (0,1,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40,
+ (0,1,15): 40, -9, -9, -9,
+ (0,2,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40,
+ (0,2,15): 40, -9, -9, -9,
+ (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,3,15): 40, -9, -9, -9,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,4,15): 40, -9, -9, -9,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,5,15): 40, -9, -9, -9,
+ (0,6,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,6,15): -9, -9, -9, -9,
+ (0,7,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,7,15): -9, -9, -9, -9,
+ (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,8,15): 50, 50, 50, 50,
+ (0,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,9,15): 50, 50, 50, 50,
+ (0,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,10,15): 50, 50, 50, 50,
+ (0,11,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9,
+ (0,11,15): -9, -9, -9, -9,
+ (0,12,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9,
+ (0,12,15): -9, -9, -9, -9,
+ (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,0,15): -9, -9, -9, -9,
+ (1,1,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41,
+ (1,1,15): 41, -9, -9, -9,
+ (1,2,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41,
+ (1,2,15): 41, -9, -9, -9,
+ (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,3,15): 41, -9, -9, -9,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,4,15): 41, -9, -9, -9,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,5,15): 41, -9, -9, -9,
+ (1,6,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,6,15): -9, -9, -9, -9,
+ (1,7,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,7,15): -9, -9, -9, -9,
+ (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,8,15): 51, 51, 51, 51,
+ (1,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,9,15): 51, 51, 51, 51,
+ (1,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,10,15): 51, 51, 51, 51,
+ (1,11,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9,
+ (1,11,15): -9, -9, -9, -9,
+ (1,12,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9,
+ (1,12,15): -9, -9, -9, -9,
+ (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,0,15): -9, -9, -9, -9,
+ (2,1,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42,
+ (2,1,15): 42, -9, -9, -9,
+ (2,2,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42,
+ (2,2,15): 42, -9, -9, -9,
+ (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,3,15): 42, -9, -9, -9,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,4,15): 42, -9, -9, -9,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,5,15): 42, -9, -9, -9,
+ (2,6,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,6,15): -9, -9, -9, -9,
+ (2,7,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,7,15): -9, -9, -9, -9,
+ (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,8,15): 52, 52, 52, 52,
+ (2,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,9,15): 52, 52, 52, 52,
+ (2,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,10,15): 52, 52, 52, 52,
+ (2,11,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9,
+ (2,11,15): -9, -9, -9, -9,
+ (2,12,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9,
+ (2,12,15): -9, -9, -9, -9,
+ (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,0,15): -9, -9, -9, -9,
+ (3,1,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43,
+ (3,1,15): 43, -9, -9, -9,
+ (3,2,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43,
+ (3,2,15): 43, -9, -9, -9,
+ (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,3,15): 43, -9, -9, -9,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,4,15): 43, -9, -9, -9,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,5,15): 43, -9, -9, -9,
+ (3,6,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,6,15): -9, -9, -9, -9,
+ (3,7,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,7,15): -9, -9, -9, -9,
+ (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,8,15): 53, 53, 53, 53,
+ (3,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,9,15): 53, 53, 53, 53,
+ (3,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,10,15): 53, 53, 53, 53,
+ (3,11,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9,
+ (3,11,15): -9, -9, -9, -9,
+ (3,12,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9,
+ (3,12,15): -9, -9, -9, -9,
+ (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,0,15): -9, -9, -9, -9,
+ (4,1,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44,
+ (4,1,15): 44, -9, -9, -9,
+ (4,2,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44,
+ (4,2,15): 44, -9, -9, -9,
+ (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,3,15): 44, -9, -9, -9,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,4,15): 44, -9, -9, -9,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,5,15): 44, -9, -9, -9,
+ (4,6,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,6,15): -9, -9, -9, -9,
+ (4,7,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,7,15): -9, -9, -9, -9,
+ (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,8,15): 54, 54, 54, 54,
+ (4,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,9,15): 54, 54, 54, 54,
+ (4,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,10,15): 54, 54, 54, 54,
+ (4,11,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9,
+ (4,11,15): -9, -9, -9, -9,
+ (4,12,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9,
+ (4,12,15): -9, -9, -9, -9,
+ (5,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,0,15): -9, -9, -9, -9,
+ (5,1,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45,
+ (5,1,15): 45, -9, -9, -9,
+ (5,2,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45,
+ (5,2,15): 45, -9, -9, -9,
+ (5,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,3,15): 45, -9, -9, -9,
+ (5,4,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,4,15): 45, -9, -9, -9,
+ (5,5,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,5,15): 45, -9, -9, -9,
+ (5,6,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,6,15): -9, -9, -9, -9,
+ (5,7,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,7,15): -9, -9, -9, -9,
+ (5,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,8,15): 55, 55, 55, 55,
+ (5,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,9,15): 55, 55, 55, 55,
+ (5,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,10,15): 55, 55, 55, 55,
+ (5,11,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9,
+ (5,11,15): -9, -9, -9, -9,
+ (5,12,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9,
+ (5,12,15): -9, -9, -9, -9
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-3_2.ls b/tools/testfiles/vds/tvds-3_2.ls
new file mode 100644
index 0000000..a4ad84f
--- /dev/null
+++ b/tools/testfiles/vds/tvds-3_2.ls
@@ -0,0 +1,13 @@
+Opened "3_2_vds.h5" with sec2 driver.
+vds_dset Dataset {6/Inf, 13/13, 19/19}
+ Location: 1:800
+ Links: 1
+ Maps: {5} Source {
+ 2_a.h5 /source_dset
+ 2_b.h5 /source_dset
+ 2_c.h5 /source_dset
+ 2_d.h5 /source_dset
+ 2_e.h5 /source_dset
+ }
+ Storage: 5928 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds-4.ddl b/tools/testfiles/vds/tvds-4.ddl
new file mode 100644
index 0000000..1832724
--- /dev/null
+++ b/tools/testfiles/vds/tvds-4.ddl
@@ -0,0 +1,46 @@
+HDF5 "4_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) }
+ DATA {
+ (0,0,0): 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10,
+ (0,3,0): 10, 10, 10, 10,
+ (1,0,0): 11, 11, 11, 11,
+ (1,1,0): 11, 11, 11, 11,
+ (1,2,0): 11, 11, 11, 11,
+ (1,3,0): 11, 11, 11, 11,
+ (2,0,0): 12, 12, 12, 12,
+ (2,1,0): 12, 12, 12, 12,
+ (2,2,0): 12, 12, 12, 12,
+ (2,3,0): 12, 12, 12, 12,
+ (3,0,0): 20, 20, 20, 20,
+ (3,1,0): 20, 20, 20, 20,
+ (3,2,0): 20, 20, 20, 20,
+ (3,3,0): 20, 20, 20, 20,
+ (4,0,0): 21, 21, 21, 21,
+ (4,1,0): 21, 21, 21, 21,
+ (4,2,0): 21, 21, 21, 21,
+ (4,3,0): 21, 21, 21, 21,
+ (5,0,0): 22, 22, 22, 22,
+ (5,1,0): 22, 22, 22, 22,
+ (5,2,0): 22, 22, 22, 22,
+ (5,3,0): 22, 22, 22, 22,
+ (6,0,0): 30, 30, 30, 30,
+ (6,1,0): 30, 30, 30, 30,
+ (6,2,0): 30, 30, 30, 30,
+ (6,3,0): 30, 30, 30, 30,
+ (7,0,0): 31, 31, 31, 31,
+ (7,1,0): 31, 31, 31, 31,
+ (7,2,0): 31, 31, 31, 31,
+ (7,3,0): 31, 31, 31, 31,
+ (8,0,0): 32, 32, 32, 32,
+ (8,1,0): 32, 32, 32, 32,
+ (8,2,0): 32, 32, 32, 32,
+ (8,3,0): 32, 32, 32, 32
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-4.ls b/tools/testfiles/vds/tvds-4.ls
new file mode 100644
index 0000000..176529b
--- /dev/null
+++ b/tools/testfiles/vds/tvds-4.ls
@@ -0,0 +1,9 @@
+Opened "4_vds.h5" with sec2 driver.
+vds_dset Dataset {9/Inf, 4/4, 4/4}
+ Location: 1:800
+ Links: 1
+ Maps: {1} Source {
+ 4_%b.h5 /source_dset
+ }
+ Storage: 576 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds-5.ddl b/tools/testfiles/vds/tvds-5.ddl
new file mode 100644
index 0000000..f59017b
--- /dev/null
+++ b/tools/testfiles/vds/tvds-5.ddl
@@ -0,0 +1,46 @@
+HDF5 "5_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) }
+ DATA {
+ (0,0,0): 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10,
+ (0,3,0): 10, 10, 10, 10,
+ (1,0,0): 20, 20, 20, 20,
+ (1,1,0): 20, 20, 20, 20,
+ (1,2,0): 20, 20, 20, 20,
+ (1,3,0): 20, 20, 20, 20,
+ (2,0,0): 30, 30, 30, 30,
+ (2,1,0): 30, 30, 30, 30,
+ (2,2,0): 30, 30, 30, 30,
+ (2,3,0): 30, 30, 30, 30,
+ (3,0,0): 11, 11, 11, 11,
+ (3,1,0): 11, 11, 11, 11,
+ (3,2,0): 11, 11, 11, 11,
+ (3,3,0): 11, 11, 11, 11,
+ (4,0,0): 21, 21, 21, 21,
+ (4,1,0): 21, 21, 21, 21,
+ (4,2,0): 21, 21, 21, 21,
+ (4,3,0): 21, 21, 21, 21,
+ (5,0,0): 31, 31, 31, 31,
+ (5,1,0): 31, 31, 31, 31,
+ (5,2,0): 31, 31, 31, 31,
+ (5,3,0): 31, 31, 31, 31,
+ (6,0,0): 12, 12, 12, 12,
+ (6,1,0): 12, 12, 12, 12,
+ (6,2,0): 12, 12, 12, 12,
+ (6,3,0): 12, 12, 12, 12,
+ (7,0,0): 22, 22, 22, 22,
+ (7,1,0): 22, 22, 22, 22,
+ (7,2,0): 22, 22, 22, 22,
+ (7,3,0): 22, 22, 22, 22,
+ (8,0,0): 32, 32, 32, 32,
+ (8,1,0): 32, 32, 32, 32,
+ (8,2,0): 32, 32, 32, 32,
+ (8,3,0): 32, 32, 32, 32
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds-5.ls b/tools/testfiles/vds/tvds-5.ls
new file mode 100644
index 0000000..5f98e84
--- /dev/null
+++ b/tools/testfiles/vds/tvds-5.ls
@@ -0,0 +1,11 @@
+Opened "5_vds.h5" with sec2 driver.
+vds_dset Dataset {9/Inf, 4/4, 4/4}
+ Location: 1:800
+ Links: 1
+ Maps: {3} Source {
+ 5_a.h5 /source_dset
+ 5_b.h5 /source_dset
+ 5_c.h5 /source_dset
+ }
+ Storage: 576 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/testfiles/vds/tvds_layout-1.ddl b/tools/testfiles/vds/tvds_layout-1.ddl
new file mode 100644
index 0000000..5d8a62c
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-1.ddl
@@ -0,0 +1,232 @@
+HDF5 "1_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 18, 8 ) / ( H5S_UNLIMITED, 18, 8 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_a.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,2,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,6,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_c.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 3 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,8,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_d.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ MAPPING 4 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,12,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_e.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 5 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,14,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_f.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,2,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,3,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,6,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,7,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,8,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,9,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,10,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,11,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,12,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,13,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,14,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,15,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,16,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,17,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (1,0,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,2,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,3,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,6,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,7,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,8,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,9,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,10,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,11,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,12,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,13,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,14,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,15,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,16,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,17,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (2,0,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,2,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,3,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,6,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,7,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,8,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,9,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,10,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,11,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,12,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,13,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,14,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,15,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,16,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,17,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (3,0,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,2,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,3,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,6,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,7,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,8,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,9,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,10,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,11,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,12,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,13,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,14,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,15,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,16,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,0,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,2,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,3,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,6,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,7,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,8,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,9,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,10,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,11,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,12,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,13,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,14,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,15,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,16,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,17,0): 64, 64, 64, 64, 64, 64, 64, 64
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds_layout-2.ddl b/tools/testfiles/vds/tvds_layout-2.ddl
new file mode 100644
index 0000000..af6b718
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-2.ddl
@@ -0,0 +1,170 @@
+HDF5 "2_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6, 8, 14 ) / ( H5S_UNLIMITED, 8, 14 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ SOURCE {
+ FILE "2_a.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,2,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,7)
+ }
+ }
+ SOURCE {
+ FILE "2_b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,7)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,6,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ SOURCE {
+ FILE "2_c.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ }
+ MAPPING 3 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,7)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,5,7)
+ }
+ }
+ SOURCE {
+ FILE "2_d.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,5,7)
+ }
+ }
+ }
+ MAPPING 4 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,5,7)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,3,7)
+ }
+ }
+ SOURCE {
+ FILE "2_e.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,3,7)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 40, 40, 40, 40, 40, 40, 40,
+ (0,2,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,3,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 40, 40, 40, 40, 40, 40, 40,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50,
+ (0,6,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50,
+ (0,7,0): 30, 30, 30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 50, 50,
+ (1,0,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 41, 41, 41, 41, 41, 41, 41,
+ (1,2,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,3,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 41, 41, 41, 41, 41, 41, 41,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 51, 51, 51, 51, 51, 51, 51,
+ (1,6,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51,
+ (1,7,0): 31, 31, 31, 31, 31, 31, 31, 51, 51, 51, 51, 51, 51, 51,
+ (2,0,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 42, 42, 42, 42, 42, 42, 42,
+ (2,2,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,3,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 42, 42, 42, 42, 42, 42, 42,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 52, 52, 52, 52, 52, 52, 52,
+ (2,6,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52,
+ (2,7,0): 32, 32, 32, 32, 32, 32, 32, 52, 52, 52, 52, 52, 52, 52,
+ (3,0,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 43, 43, 43, 43, 43, 43, 43,
+ (3,2,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,3,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 43, 43, 43, 43, 43, 43, 43,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 53, 53, 53, 53, 53, 53, 53,
+ (3,6,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53,
+ (3,7,0): 33, 33, 33, 33, 33, 33, 33, 53, 53, 53, 53, 53, 53, 53,
+ (4,0,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 44, 44, 44, 44, 44, 44, 44,
+ (4,2,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,3,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 44, 44,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 54, 54, 54, 54, 54, 54, 54,
+ (4,6,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54,
+ (4,7,0): 34, 34, 34, 34, 34, 34, 34, 54, 54, 54, 54, 54, 54, 54,
+ (5,0,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45,
+ (5,1,0): 15, 15, 15, 15, 15, 15, 15, 45, 45, 45, 45, 45, 45, 45,
+ (5,2,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,3,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,4,0): 25, 25, 25, 25, 25, 25, 25, 45, 45, 45, 45, 45, 45, 45,
+ (5,5,0): 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55,
+ (5,6,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55,
+ (5,7,0): 35, 35, 35, 35, 35, 35, 35, 55, 55, 55, 55, 55, 55, 55
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds_layout-3_1.ddl b/tools/testfiles/vds/tvds_layout-3_1.ddl
new file mode 100644
index 0000000..968327d
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-3_1.ddl
@@ -0,0 +1,267 @@
+HDF5 "3_1_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 5, 25, 8 ) / ( H5S_UNLIMITED, 25, 8 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,1,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_a.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,4,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,9,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_c.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 3 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,12,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_d.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ MAPPING 4 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,17,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ SOURCE {
+ FILE "1_e.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,8)
+ }
+ }
+ }
+ MAPPING 5 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,20,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ SOURCE {
+ FILE "1_f.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,8)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,1,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10, 10, 10, 10, 10,
+ (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,6,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,7,0): 20, 20, 20, 20, 20, 20, 20, 20,
+ (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,9,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,10,0): 30, 30, 30, 30, 30, 30, 30, 30,
+ (0,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,12,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,13,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,14,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,15,0): 40, 40, 40, 40, 40, 40, 40, 40,
+ (0,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,17,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,18,0): 50, 50, 50, 50, 50, 50, 50, 50,
+ (0,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,20,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,21,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,22,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,23,0): 60, 60, 60, 60, 60, 60, 60, 60,
+ (0,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,1,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,2,0): 11, 11, 11, 11, 11, 11, 11, 11,
+ (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,6,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,7,0): 21, 21, 21, 21, 21, 21, 21, 21,
+ (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,9,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,10,0): 31, 31, 31, 31, 31, 31, 31, 31,
+ (1,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,12,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,13,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,14,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,15,0): 41, 41, 41, 41, 41, 41, 41, 41,
+ (1,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,17,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,18,0): 51, 51, 51, 51, 51, 51, 51, 51,
+ (1,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,20,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,21,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,22,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,23,0): 61, 61, 61, 61, 61, 61, 61, 61,
+ (1,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,1,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,2,0): 12, 12, 12, 12, 12, 12, 12, 12,
+ (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,6,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,7,0): 22, 22, 22, 22, 22, 22, 22, 22,
+ (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,9,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,10,0): 32, 32, 32, 32, 32, 32, 32, 32,
+ (2,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,12,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,13,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,14,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,15,0): 42, 42, 42, 42, 42, 42, 42, 42,
+ (2,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,17,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,18,0): 52, 52, 52, 52, 52, 52, 52, 52,
+ (2,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,20,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,21,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,22,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,23,0): 62, 62, 62, 62, 62, 62, 62, 62,
+ (2,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,1,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,2,0): 13, 13, 13, 13, 13, 13, 13, 13,
+ (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,6,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,7,0): 23, 23, 23, 23, 23, 23, 23, 23,
+ (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,9,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,10,0): 33, 33, 33, 33, 33, 33, 33, 33,
+ (3,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,12,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,13,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,14,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,15,0): 43, 43, 43, 43, 43, 43, 43, 43,
+ (3,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,17,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,18,0): 53, 53, 53, 53, 53, 53, 53, 53,
+ (3,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,20,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,21,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,22,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,23,0): 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,24,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,1,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,2,0): 14, 14, 14, 14, 14, 14, 14, 14,
+ (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,6,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,7,0): 24, 24, 24, 24, 24, 24, 24, 24,
+ (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,9,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,10,0): 34, 34, 34, 34, 34, 34, 34, 34,
+ (4,11,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,12,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,13,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,14,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,15,0): 44, 44, 44, 44, 44, 44, 44, 44,
+ (4,16,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,17,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,18,0): 54, 54, 54, 54, 54, 54, 54, 54,
+ (4,19,0): -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,20,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,21,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,22,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,23,0): 64, 64, 64, 64, 64, 64, 64, 64,
+ (4,24,0): -9, -9, -9, -9, -9, -9, -9, -9
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds_layout-3_2.ddl b/tools/testfiles/vds/tvds_layout-3_2.ddl
new file mode 100644
index 0000000..7e14ec2
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-3_2.ddl
@@ -0,0 +1,278 @@
+HDF5 "3_2_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 6, 13, 19 ) / ( H5S_UNLIMITED, 13, 19 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,1,1)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ SOURCE {
+ FILE "2_a.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,4,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,7)
+ }
+ }
+ SOURCE {
+ FILE "2_b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,7)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,11,4)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ SOURCE {
+ FILE "2_c.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,2,7)
+ }
+ }
+ }
+ MAPPING 3 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,1,9)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,5,7)
+ }
+ }
+ SOURCE {
+ FILE "2_d.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,5,7)
+ }
+ }
+ }
+ MAPPING 4 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,8,12)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,3,7)
+ }
+ }
+ SOURCE {
+ FILE "2_e.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,3,7)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,0,15): -9, -9, -9, -9,
+ (0,1,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40,
+ (0,1,15): 40, -9, -9, -9,
+ (0,2,0): -9, 10, 10, 10, 10, 10, 10, 10, -9, 40, 40, 40, 40, 40, 40,
+ (0,2,15): 40, -9, -9, -9,
+ (0,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,3,15): 40, -9, -9, -9,
+ (0,4,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,4,15): 40, -9, -9, -9,
+ (0,5,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, 40, 40, 40, 40, 40, 40,
+ (0,5,15): 40, -9, -9, -9,
+ (0,6,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,6,15): -9, -9, -9, -9,
+ (0,7,0): 20, 20, 20, 20, 20, 20, 20, -9, -9, -9, -9, -9, -9, -9, -9,
+ (0,7,15): -9, -9, -9, -9,
+ (0,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,8,15): 50, 50, 50, 50,
+ (0,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,9,15): 50, 50, 50, 50,
+ (0,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 50, 50, 50,
+ (0,10,15): 50, 50, 50, 50,
+ (0,11,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9,
+ (0,11,15): -9, -9, -9, -9,
+ (0,12,0): -9, -9, -9, -9, 30, 30, 30, 30, 30, 30, 30, -9, -9, -9, -9,
+ (0,12,15): -9, -9, -9, -9,
+ (1,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,0,15): -9, -9, -9, -9,
+ (1,1,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41,
+ (1,1,15): 41, -9, -9, -9,
+ (1,2,0): -9, 11, 11, 11, 11, 11, 11, 11, -9, 41, 41, 41, 41, 41, 41,
+ (1,2,15): 41, -9, -9, -9,
+ (1,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,3,15): 41, -9, -9, -9,
+ (1,4,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,4,15): 41, -9, -9, -9,
+ (1,5,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, 41, 41, 41, 41, 41, 41,
+ (1,5,15): 41, -9, -9, -9,
+ (1,6,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,6,15): -9, -9, -9, -9,
+ (1,7,0): 21, 21, 21, 21, 21, 21, 21, -9, -9, -9, -9, -9, -9, -9, -9,
+ (1,7,15): -9, -9, -9, -9,
+ (1,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,8,15): 51, 51, 51, 51,
+ (1,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,9,15): 51, 51, 51, 51,
+ (1,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 51, 51, 51,
+ (1,10,15): 51, 51, 51, 51,
+ (1,11,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9,
+ (1,11,15): -9, -9, -9, -9,
+ (1,12,0): -9, -9, -9, -9, 31, 31, 31, 31, 31, 31, 31, -9, -9, -9, -9,
+ (1,12,15): -9, -9, -9, -9,
+ (2,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,0,15): -9, -9, -9, -9,
+ (2,1,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42,
+ (2,1,15): 42, -9, -9, -9,
+ (2,2,0): -9, 12, 12, 12, 12, 12, 12, 12, -9, 42, 42, 42, 42, 42, 42,
+ (2,2,15): 42, -9, -9, -9,
+ (2,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,3,15): 42, -9, -9, -9,
+ (2,4,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,4,15): 42, -9, -9, -9,
+ (2,5,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, 42, 42, 42, 42, 42, 42,
+ (2,5,15): 42, -9, -9, -9,
+ (2,6,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,6,15): -9, -9, -9, -9,
+ (2,7,0): 22, 22, 22, 22, 22, 22, 22, -9, -9, -9, -9, -9, -9, -9, -9,
+ (2,7,15): -9, -9, -9, -9,
+ (2,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,8,15): 52, 52, 52, 52,
+ (2,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,9,15): 52, 52, 52, 52,
+ (2,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 52, 52, 52,
+ (2,10,15): 52, 52, 52, 52,
+ (2,11,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9,
+ (2,11,15): -9, -9, -9, -9,
+ (2,12,0): -9, -9, -9, -9, 32, 32, 32, 32, 32, 32, 32, -9, -9, -9, -9,
+ (2,12,15): -9, -9, -9, -9,
+ (3,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,0,15): -9, -9, -9, -9,
+ (3,1,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43,
+ (3,1,15): 43, -9, -9, -9,
+ (3,2,0): -9, 13, 13, 13, 13, 13, 13, 13, -9, 43, 43, 43, 43, 43, 43,
+ (3,2,15): 43, -9, -9, -9,
+ (3,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,3,15): 43, -9, -9, -9,
+ (3,4,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,4,15): 43, -9, -9, -9,
+ (3,5,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, 43, 43, 43, 43, 43, 43,
+ (3,5,15): 43, -9, -9, -9,
+ (3,6,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,6,15): -9, -9, -9, -9,
+ (3,7,0): 23, 23, 23, 23, 23, 23, 23, -9, -9, -9, -9, -9, -9, -9, -9,
+ (3,7,15): -9, -9, -9, -9,
+ (3,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,8,15): 53, 53, 53, 53,
+ (3,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,9,15): 53, 53, 53, 53,
+ (3,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 53, 53, 53,
+ (3,10,15): 53, 53, 53, 53,
+ (3,11,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9,
+ (3,11,15): -9, -9, -9, -9,
+ (3,12,0): -9, -9, -9, -9, 33, 33, 33, 33, 33, 33, 33, -9, -9, -9, -9,
+ (3,12,15): -9, -9, -9, -9,
+ (4,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,0,15): -9, -9, -9, -9,
+ (4,1,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44,
+ (4,1,15): 44, -9, -9, -9,
+ (4,2,0): -9, 14, 14, 14, 14, 14, 14, 14, -9, 44, 44, 44, 44, 44, 44,
+ (4,2,15): 44, -9, -9, -9,
+ (4,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,3,15): 44, -9, -9, -9,
+ (4,4,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,4,15): 44, -9, -9, -9,
+ (4,5,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, 44, 44, 44, 44, 44, 44,
+ (4,5,15): 44, -9, -9, -9,
+ (4,6,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,6,15): -9, -9, -9, -9,
+ (4,7,0): 24, 24, 24, 24, 24, 24, 24, -9, -9, -9, -9, -9, -9, -9, -9,
+ (4,7,15): -9, -9, -9, -9,
+ (4,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,8,15): 54, 54, 54, 54,
+ (4,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,9,15): 54, 54, 54, 54,
+ (4,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 54, 54, 54,
+ (4,10,15): 54, 54, 54, 54,
+ (4,11,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9,
+ (4,11,15): -9, -9, -9, -9,
+ (4,12,0): -9, -9, -9, -9, 34, 34, 34, 34, 34, 34, 34, -9, -9, -9, -9,
+ (4,12,15): -9, -9, -9, -9,
+ (5,0,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,0,15): -9, -9, -9, -9,
+ (5,1,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45,
+ (5,1,15): 45, -9, -9, -9,
+ (5,2,0): -9, 15, 15, 15, 15, 15, 15, 15, -9, 45, 45, 45, 45, 45, 45,
+ (5,2,15): 45, -9, -9, -9,
+ (5,3,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,3,15): 45, -9, -9, -9,
+ (5,4,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,4,15): 45, -9, -9, -9,
+ (5,5,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, 45, 45, 45, 45, 45, 45,
+ (5,5,15): 45, -9, -9, -9,
+ (5,6,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,6,15): -9, -9, -9, -9,
+ (5,7,0): 25, 25, 25, 25, 25, 25, 25, -9, -9, -9, -9, -9, -9, -9, -9,
+ (5,7,15): -9, -9, -9, -9,
+ (5,8,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,8,15): 55, 55, 55, 55,
+ (5,9,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,9,15): 55, 55, 55, 55,
+ (5,10,0): -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, 55, 55, 55,
+ (5,10,15): 55, 55, 55, 55,
+ (5,11,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9,
+ (5,11,15): -9, -9, -9, -9,
+ (5,12,0): -9, -9, -9, -9, 35, 35, 35, 35, 35, 35, 35, -9, -9, -9, -9,
+ (5,12,15): -9, -9, -9, -9
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds_layout-4.ddl b/tools/testfiles/vds/tvds_layout-4.ddl
new file mode 100644
index 0000000..018644e
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-4.ddl
@@ -0,0 +1,78 @@
+HDF5 "4_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (3,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (3,4,4)
+ }
+ }
+ SOURCE {
+ FILE "4_%b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (3,4,4)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10,
+ (0,3,0): 10, 10, 10, 10,
+ (1,0,0): 11, 11, 11, 11,
+ (1,1,0): 11, 11, 11, 11,
+ (1,2,0): 11, 11, 11, 11,
+ (1,3,0): 11, 11, 11, 11,
+ (2,0,0): 12, 12, 12, 12,
+ (2,1,0): 12, 12, 12, 12,
+ (2,2,0): 12, 12, 12, 12,
+ (2,3,0): 12, 12, 12, 12,
+ (3,0,0): 20, 20, 20, 20,
+ (3,1,0): 20, 20, 20, 20,
+ (3,2,0): 20, 20, 20, 20,
+ (3,3,0): 20, 20, 20, 20,
+ (4,0,0): 21, 21, 21, 21,
+ (4,1,0): 21, 21, 21, 21,
+ (4,2,0): 21, 21, 21, 21,
+ (4,3,0): 21, 21, 21, 21,
+ (5,0,0): 22, 22, 22, 22,
+ (5,1,0): 22, 22, 22, 22,
+ (5,2,0): 22, 22, 22, 22,
+ (5,3,0): 22, 22, 22, 22,
+ (6,0,0): 30, 30, 30, 30,
+ (6,1,0): 30, 30, 30, 30,
+ (6,2,0): 30, 30, 30, 30,
+ (6,3,0): 30, 30, 30, 30,
+ (7,0,0): 31, 31, 31, 31,
+ (7,1,0): 31, 31, 31, 31,
+ (7,2,0): 31, 31, 31, 31,
+ (7,3,0): 31, 31, 31, 31,
+ (8,0,0): 32, 32, 32, 32,
+ (8,1,0): 32, 32, 32, 32,
+ (8,2,0): 32, 32, 32, 32,
+ (8,3,0): 32, 32, 32, 32
+ }
+ }
+}
+}
diff --git a/tools/testfiles/vds/tvds_layout-5.ddl b/tools/testfiles/vds/tvds_layout-5.ddl
new file mode 100644
index 0000000..b43629a
--- /dev/null
+++ b/tools/testfiles/vds/tvds_layout-5.ddl
@@ -0,0 +1,118 @@
+HDF5 "5_vds.h5" {
+GROUP "/" {
+ DATASET "vds_dset" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 9, 4, 4 ) / ( H5S_UNLIMITED, 4, 4 ) }
+ STORAGE_LAYOUT {
+ MAPPING 0 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (3,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,4,4)
+ }
+ }
+ SOURCE {
+ FILE "5_a.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,4)
+ }
+ }
+ }
+ MAPPING 1 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (1,0,0)
+ STRIDE (3,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,4,4)
+ }
+ }
+ SOURCE {
+ FILE "5_b.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,4)
+ }
+ }
+ }
+ MAPPING 2 {
+ VIRTUAL {
+ SELECTION REGULAR_HYPERSLAB {
+ START (2,0,0)
+ STRIDE (3,1,1)
+ COUNT (H5S_UNLIMITED,1,1)
+ BLOCK (1,4,4)
+ }
+ }
+ SOURCE {
+ FILE "5_c.h5"
+ DATASET "/source_dset"
+ SELECTION REGULAR_HYPERSLAB {
+ START (0,0,0)
+ STRIDE (1,1,1)
+ COUNT (1,1,1)
+ BLOCK (H5S_UNLIMITED,4,4)
+ }
+ }
+ }
+ }
+ FILTERS {
+ NONE
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE -9
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ DATA {
+ (0,0,0): 10, 10, 10, 10,
+ (0,1,0): 10, 10, 10, 10,
+ (0,2,0): 10, 10, 10, 10,
+ (0,3,0): 10, 10, 10, 10,
+ (1,0,0): 20, 20, 20, 20,
+ (1,1,0): 20, 20, 20, 20,
+ (1,2,0): 20, 20, 20, 20,
+ (1,3,0): 20, 20, 20, 20,
+ (2,0,0): 30, 30, 30, 30,
+ (2,1,0): 30, 30, 30, 30,
+ (2,2,0): 30, 30, 30, 30,
+ (2,3,0): 30, 30, 30, 30,
+ (3,0,0): 11, 11, 11, 11,
+ (3,1,0): 11, 11, 11, 11,
+ (3,2,0): 11, 11, 11, 11,
+ (3,3,0): 11, 11, 11, 11,
+ (4,0,0): 21, 21, 21, 21,
+ (4,1,0): 21, 21, 21, 21,
+ (4,2,0): 21, 21, 21, 21,
+ (4,3,0): 21, 21, 21, 21,
+ (5,0,0): 31, 31, 31, 31,
+ (5,1,0): 31, 31, 31, 31,
+ (5,2,0): 31, 31, 31, 31,
+ (5,3,0): 31, 31, 31, 31,
+ (6,0,0): 12, 12, 12, 12,
+ (6,1,0): 12, 12, 12, 12,
+ (6,2,0): 12, 12, 12, 12,
+ (6,3,0): 12, 12, 12, 12,
+ (7,0,0): 22, 22, 22, 22,
+ (7,1,0): 22, 22, 22, 22,
+ (7,2,0): 22, 22, 22, 22,
+ (7,3,0): 22, 22, 22, 22,
+ (8,0,0): 32, 32, 32, 32,
+ (8,1,0): 32, 32, 32, 32,
+ (8,2,0): 32, 32, 32, 32,
+ (8,3,0): 32, 32, 32, 32
+ }
+ }
+}
+}