summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt8
-rw-r--r--examples/CMakeTests.cmake12
-rw-r--r--examples/Makefile.am16
-rw-r--r--examples/Makefile.in1395
-rw-r--r--examples/h5_vds-eiger.c177
-rw-r--r--examples/h5_vds-exc.c226
-rw-r--r--examples/h5_vds-exclim.c222
-rw-r--r--examples/h5_vds-percival-unlim-maxmin.c309
-rw-r--r--examples/h5_vds-percival-unlim.c352
-rw-r--r--examples/h5_vds-percival.c242
-rw-r--r--examples/h5_vds-simpleIO.c184
-rw-r--r--examples/h5_vds.c267
-rw-r--r--examples/run-c-ex.sh.in18
13 files changed, 3425 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 7953161..8849ce7 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -34,6 +34,14 @@ set (examples
h5_extlink
h5_elink_unix2win
h5_shared_mesg
+ h5_vds
+ h5_vds-exc
+ h5_vds-exclim
+ h5_vds-eiger
+ h5_vds-simpleIO
+ h5_vds-percival
+ h5_vds-percival-unlim
+ h5_vds-percival-unlim-maxmin
)
foreach (example ${examples})
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index 42b42b3..2cf82b8 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -46,6 +46,18 @@
blue/prefix_target.h5
red/prefix_target.h5
u2w/u2w_target.h5
+ vds.h5
+ vds-excalibur.h5
+ vds-exclim.h5
+ vds-percival.h5
+ vds-percival-unlim.h5
+ vds-percival-unlim-maxmin.h5
+ a.h5
+ b.h5
+ c.h5
+ d.h5
+ vds-simpleIO.h5
+ vds-eiger.h5
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 5d0da93..883b99d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -37,7 +37,9 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
- h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg
+ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \
+ h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \
+ h5_vds-percival-unlim h5_vds-percival-unlim-maxmin
TEST_SCRIPT=testh5cc.sh
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
@@ -48,7 +50,9 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \
h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
- h5_ref2reg.c h5_shared_mesg.c ph5example.c
+ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \
+ h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \
+ h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c
@@ -117,6 +121,14 @@ h5_dtransform: $(srcdir)/h5_dtransform.c
h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS)
h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS)
h5_shared_mesg: $(srcdir)/h5_shared_mesg.c
+h5_vds: $(srcdir)/h5_vds.c
+h5_vds-exc: $(srcdir)/h5_vds-exc.c
+h5_vds-exclim: $(srcdir)/h5_vds-exclim.c
+h5_vds-eiger: $(srcdir)/h5_vds-eiger.c
+h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c
+h5_vds-percival: $(srcdir)/h5_vds-percival.c
+h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c
+h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c
if BUILD_SHARED_SZIP_CONDITIONAL
LD_LIBRARY_PATH=$(LL_PATH)
diff --git a/examples/Makefile.in b/examples/Makefile.in
new file mode 100644
index 0000000..1b3520b
--- /dev/null
+++ b/examples/Makefile.in
@@ -0,0 +1,1395 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#
+# 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.
+#
+# HDF5 Library Examples Makefile(.in)
+#
+
+# We can't tell automake about example programs, because they need to be
+# built using h5cc (or h5fc, etc.) instead of the standard compilers.
+# This creates some extra work for us.
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = $(TEST_SCRIPT)
+subdir = examples
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/H5config.h \
+ $(top_builddir)/fortran/src/H5config_f.inc
+CONFIG_CLEAN_FILES = run-c-ex.sh testh5cc.sh
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.sh.log=.log)
+SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/run-c-ex.sh.in \
+ $(srcdir)/testh5cc.sh.in $(top_srcdir)/bin/test-driver \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am \
+ $(top_srcdir)/config/examples.am README
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@
+AMTAR = @AMTAR@
+
+# H5_CFLAGS holds flags that should be used when building hdf5,
+# but which should not be exported to h5cc for building other programs.
+# AM_CFLAGS is an automake construct which should be used by Makefiles
+# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
+# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+CLEARFILEBUF = @CLEARFILEBUF@
+CODESTACK = @CODESTACK@
+CONFIG_DATE = @CONFIG_DATE@
+CONFIG_MODE = @CONFIG_MODE@
+CONFIG_USER = @CONFIG_USER@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_VERSION = @CXX_VERSION@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_PKG = @DEBUG_PKG@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_FILTERS = @EXTERNAL_FILTERS@
+
+# Make sure that these variables are exported to the Makefiles
+F9XMODEXT = @F9XMODEXT@
+F9XMODFLAG = @F9XMODFLAG@
+F9XSUFFIXFLAG = @F9XSUFFIXFLAG@
+FC = @FC@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+FC_VERSION = @FC_VERSION@
+FGREP = @FGREP@
+FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@
+FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@
+FSEARCH_DIRS = @FSEARCH_DIRS@
+Fortran_COMPILER_ID = @Fortran_COMPILER_ID@
+GREP = @GREP@
+H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@
+H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@
+H5CONFIG_F_NUM_RKIND = @H5CONFIG_F_NUM_RKIND@
+H5CONFIG_F_RKIND = @H5CONFIG_F_RKIND@
+H5CONFIG_F_RKIND_SIZEOF = @H5CONFIG_F_RKIND_SIZEOF@
+H5_CFLAGS = @H5_CFLAGS@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_LDFLAGS = @H5_LDFLAGS@
+H5_VERSION = @H5_VERSION@
+HADDR_T = @HADDR_T@
+HAVE_DMALLOC = @HAVE_DMALLOC@
+HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@
+HAVE_PTHREAD = @HAVE_PTHREAD@
+HDF5_HL = @HDF5_HL@
+HDF5_INTERFACES = @HDF5_INTERFACES@
+HDF_CXX = @HDF_CXX@
+HDF_FORTRAN = @HDF_FORTRAN@
+HID_T = @HID_T@
+HL = @HL@
+HL_FOR = @HL_FOR@
+HSIZE_T = @HSIZE_T@
+HSSIZE_T = @HSSIZE_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTRUMENT = @INSTRUMENT@
+INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LL_PATH = @LL_PATH@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_STATIC_EXEC = @LT_STATIC_EXEC@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAC_C_MAX_REAL_PRECISION = @PAC_C_MAX_REAL_PRECISION@
+PAC_FC_ALL_INTEGER_KINDS = @PAC_FC_ALL_INTEGER_KINDS@
+PAC_FC_ALL_INTEGER_KINDS_SIZEOF = @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
+PAC_FC_ALL_REAL_KINDS = @PAC_FC_ALL_REAL_KINDS@
+PAC_FC_ALL_REAL_KINDS_SIZEOF = @PAC_FC_ALL_REAL_KINDS_SIZEOF@
+PAC_FC_MAX_REAL_PRECISION = @PAC_FC_MAX_REAL_PRECISION@
+PAC_FORTRAN_NATIVE_DOUBLE_KIND = @PAC_FORTRAN_NATIVE_DOUBLE_KIND@
+PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF = @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@
+PAC_FORTRAN_NATIVE_INTEGER_KIND = @PAC_FORTRAN_NATIVE_INTEGER_KIND@
+PAC_FORTRAN_NATIVE_INTEGER_SIZEOF = @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@
+PAC_FORTRAN_NATIVE_REAL_KIND = @PAC_FORTRAN_NATIVE_REAL_KIND@
+PAC_FORTRAN_NATIVE_REAL_SIZEOF = @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+ROOT = @ROOT@
+RUNPARALLEL = @RUNPARALLEL@
+RUNSERIAL = @RUNSERIAL@
+R_INTEGER = @R_INTEGER@
+R_LARGE = @R_LARGE@
+SEARCH = @SEARCH@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIZE_T = @SIZE_T@
+STATIC_EXEC = @STATIC_EXEC@
+STATIC_SHARED = @STATIC_SHARED@
+STRICT_FORMAT_CHECKS = @STRICT_FORMAT_CHECKS@
+STRIP = @STRIP@
+TESTPARALLEL = @TESTPARALLEL@
+THREADSAFE = @THREADSAFE@
+TIME = @TIME@
+TR = @TR@
+TRACE_API = @TRACE_API@
+UNAME_INFO = @UNAME_INFO@
+USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
+USE_FILTER_SZIP = @USE_FILTER_SZIP@
+USINGMEMCHECKER = @USINGMEMCHECKER@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Install directories that automake doesn't know about
+docdir = $(exec_prefix)/doc
+dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# Shell commands used in Makefiles
+RM = rm -f
+CP = cp
+
+# Some machines need a command to run executables; this is that command
+# so that our tests will run.
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
+# some tests need to be run with a different command. Older versions
+# of the makefiles used the command
+# $(LIBTOOL) --mode=execute
+# in some directories, for instance.
+RUNEXEC = $(RUNSERIAL)
+
+# Libraries to link to while building
+LIBHDF5 = $(top_builddir)/src/libhdf5.la
+LIBH5TEST = $(top_builddir)/test/libh5test.la
+LIBH5F = $(top_builddir)/fortran/src/libhdf5_fortran.la
+LIBH5FTEST = $(top_builddir)/fortran/test/libh5test_fortran.la
+LIBH5CPP = $(top_builddir)/c++/src/libhdf5_cpp.la
+LIBH5TOOLS = $(top_builddir)/tools/lib/libh5tools.la
+LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
+LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
+LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
+
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
+# Scripts used to build examples
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+H5CC = ${DESTDIR}$(bindir)/h5cc
+H5CC_PP = ${DESTDIR}$(bindir)/h5pcc
+H5FC = ${DESTDIR}$(bindir)/h5fc
+H5FC_PP = ${DESTDIR}$(bindir)/h5pfc
+H5CPP = ${DESTDIR}$(bindir)/h5c++
+ACLOCAL_AMFLAGS = "-I m4"
+
+# The trace script; this is used on source files from the C library to
+# insert tracing macros.
+TRACE = perl $(top_srcdir)/bin/trace
+
+# .chkexe files are used to mark tests that have run successfully.
+# .chklog files are output from those tests.
+# *.clog and *.clog2 are from the MPE option.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 $(EXTLINK_DIRS) \
+ *.h5
+@BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example
+INSTALL_SCRIPT_FILES = run-c-ex.sh
+INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
+INSTALL_TOP_FILES = README
+
+# Example programs.
+# Don't tell automake about them, because if it knew they were programs,
+# it would try to compile them instead of using the h5cc script.
+# Use the boilerplate in config/examples.am instead.
+EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
+ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
+ h5_crtatt h5_crtgrp h5_crtdat \
+ h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
+ h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg h5_vds h5_vds-exc \
+ h5_vds-exclim h5_vds-eiger h5_vds-simpleIO h5_vds-percival \
+ h5_vds-percival-unlim h5_vds-percival-unlim-maxmin
+
+TEST_SCRIPT = testh5cc.sh
+TEST_EXAMPLES_SCRIPT = $(INSTALL_SCRIPT_FILES)
+
+# Install files
+# List all file that should be installed in examples directory
+INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
+ h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \
+ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
+ h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \
+ h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
+ h5_ref2reg.c h5_shared_mesg.c ph5example.c h5_vds.c h5_vds-exc.c \
+ h5_vds-exclim.c h5_vds-eiger.c h5_vds-simpleIO.c h5_vds-percival.c \
+ h5_vds-percival-unlim.c h5_vds-percival-unlim-maxmin.c
+
+
+# The external link examples demonstrate how to use paths; they need
+# directories to be created to do this.
+EXTLINK_DIRS = red blue u2w
+
+# Example directory
+# Note: no '/' after DESTDIR. Explanation in commence.am
+EXAMPLEDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/c
+EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples
+@BUILD_SHARED_SZIP_CONDITIONAL_TRUE@LD_LIBRARY_PATH = $(LL_PATH)
+
+# Assume that all tests in this directory are examples, and tell
+# conclude.am when to build them.
+EXTRA_PROG = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
+
+# We need to tell automake what to clean
+MOSTLYCLEANFILES = *.raw *.meta *.o
+CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA)
+
+# Automake needs to be taught how to build lib, progs, and tests targets.
+# These will be filled in automatically for the most part (e.g.,
+# lib_LIBRARIES are built for lib target), but EXTRA_LIB, EXTRA_PROG, and
+# EXTRA_TEST variables are supplied to allow the user to force targets to
+# be built at certain times.
+LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
+ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
+
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TEST_EXTENSIONS = .sh
+SH_LOG_COMPILER = $(SHELL)
+AM_SH_LOG_FLAGS =
+TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
+TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
+TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
+TEST_SCRIPT_PARA_CHKSH = $(TEST_SCRIPT_PARA:=.chkexe_)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .log .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign examples/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+$(top_srcdir)/config/commence.am $(top_srcdir)/config/examples.am $(top_srcdir)/config/conclude.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+run-c-ex.sh: $(top_builddir)/config.status $(srcdir)/run-c-ex.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+testh5cc.sh: $(top_builddir)/config.status $(srcdir)/testh5cc.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+.sh.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-local
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am all-local check check-TESTS check-am clean \
+ clean-generic clean-libtool cscopelist-am ctags-am distclean \
+ distclean-generic distclean-libtool distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installcheck-local installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags-am uninstall uninstall-am \
+ uninstall-local
+
+.PRECIOUS: Makefile
+
+
+# List all build rules defined by HDF5 Makefiles as "PHONY" targets here.
+# This tells the Makefiles that these targets are not files to be built but
+# commands that should be executed even if a file with the same name already
+# exists.
+.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc _exec_check-s _test help
+
+help:
+ @$(top_srcdir)/bin/makehelp
+
+# How to build examples, using installed version of h5cc
+@BUILD_PARALLEL_CONDITIONAL_TRUE@$(EXTRA_PROG): $(H5CC_PP)
+@BUILD_PARALLEL_CONDITIONAL_TRUE@ $(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
+@BUILD_PARALLEL_CONDITIONAL_FALSE@$(EXTRA_PROG): $(H5CC)
+@BUILD_PARALLEL_CONDITIONAL_FALSE@ $(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
+
+# Some examples depend on files created by other examples.
+h5_read.chkexe_: h5_write.chkexe_
+h5_chunk_read.chkexe_: h5_extend_write.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
+
+$(EXTLINK_DIRS):
+ echo $(mkdir_p) $@
+ $(mkdir_p) $@
+
+# List dependencies for each program. Normally, automake would take
+# care of this for us, but if we tell automake about the programs it
+# will try to build them with the normal C compiler, not h5cc. This is
+# an inelegant way of solving the problem.
+# All programs share the same build rule and a dependency on the main hdf5
+# library above.
+h5_chunk_read: $(srcdir)/h5_chunk_read.c
+h5_compound: $(srcdir)/h5_compound.c
+h5_crtgrpd: $(srcdir)/h5_crtgrpd.c
+h5_subset: $(srcdir)/h5_subset.c
+h5_cmprss: $(srcdir)/h5_cmprss.c
+h5_rdwt: $(srcdir)/h5_rdwt.c
+h5_crtgrpar: $(srcdir)/h5_crtgrpar.c
+h5_extend: $(srcdir)/h5_extend.c
+h5_crtatt: $(srcdir)/h5_crtatt.c
+h5_crtgrp: $(srcdir)/h5_crtgrp.c
+h5_crtdat: $(srcdir)/h5_crtdat.c
+h5_extend_write: $(srcdir)/h5_extend_write.c
+h5_group: $(srcdir)/h5_group.c
+h5_write: $(srcdir)/h5_write.c
+h5_read: $(srcdir)/h5_read.c
+h5_select: $(srcdir)/h5_select.c
+h5_attribute: $(srcdir)/h5_attribute.c
+h5_mount: $(srcdir)/h5_mount.c
+h5_reference: $(srcdir)/h5_reference.c
+h5_ref2reg: $(srcdir)/h5_ref2reg.c
+h5_drivers: $(srcdir)/h5_drivers.c
+ph5example: $(srcdir)/ph5example.c
+h5_dtransform: $(srcdir)/h5_dtransform.c
+h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS)
+h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS)
+h5_shared_mesg: $(srcdir)/h5_shared_mesg.c
+h5_vds: $(srcdir)/h5_vds.c
+h5_vds-exc: $(srcdir)/h5_vds-exc.c
+h5_vds-exclim: $(srcdir)/h5_vds-exclim.c
+h5_vds-eiger: $(srcdir)/h5_vds-eiger.c
+h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c
+h5_vds-percival: $(srcdir)/h5_vds-percival.c
+h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c
+h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c
+
+# How to create EXAMPLEDIR if it doesn't already exist
+$(EXAMPLEDIR):
+ -$(top_srcdir)/bin/mkdirs $@
+$(EXAMPLETOPDIR):
+ -$(top_srcdir)/bin/mkdirs $@
+
+# Install and uninstall rules. We install the source files, not the
+# example programs themselves.
+install-data-local:
+ @$(MAKE) $(AM_MAKEFLAGS) install-examples
+uninstall-local:
+ @$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
+
+install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
+ @for f in X $(INSTALL_FILES); do \
+ if test $$f != X; then \
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
+ fi; \
+ done
+ @for f in X $(INSTALL_SCRIPT_FILES); do \
+ if test $$f != X; then \
+ (set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\
+ fi; \
+ done
+ @for f in X $(INSTALL_TOP_FILES); do \
+ if test $$f != X; then \
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLETOPDIR)/$$f;\
+ fi; \
+ done
+ @for f in X $(INSTALL_TOP_SCRIPT_FILES); do \
+ if test $$f != X; then \
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
+ fi; \
+ done
+
+uninstall-examples:
+ @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
+ fi
+ @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
+ set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
+ fi
+ @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
+ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
+ fi
+ @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
+ set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
+ fi
+
+installcheck-local:
+ @if test "$(STATIC_SHARED)" = "static, shared"; then \
+ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
+ $(MAKE) $(AM_MAKEFLAGS) clean; \
+ H5CCFLAGS="" $(MAKE) $(AM_MAKEFLAGS) check; \
+ elif test "$(STATIC_SHARED)" = "shared"; then \
+ H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) check; \
+ fi
+ @if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
+ echo "============================"; \
+ echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
+ echo "============================"; \
+ (cd $(EXAMPLEDIR); \
+ /bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
+ fi
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-lib: $(LIB)
+build-progs: $(LIB) $(PROGS)
+build-tests: $(LIB) $(PROGS) $(chk_TESTS)
+
+# General rule for recursive building targets.
+# BUILT_SOURCES contain targets that need to be built before anything else
+# in the directory (e.g., for Fortran type detection)
+lib progs tests check-s check-p :: $(BUILT_SOURCES)
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# General rule for recursive cleaning targets. Like the rule above,
+# but doesn't require building BUILT_SOURCES.
+check-clean ::
+ @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1;
+ @for d in X $(SUBDIRS); do \
+ if test $$d != X && test $$d != .; then \
+ (set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
+ fi; \
+ done
+
+# Tell Automake to build tests when the user types `make all' (this is
+# not its default behavior). Also build EXTRA_LIB and EXTRA_PROG since
+# Automake won't build them automatically, either.
+all-local: $(EXTRA_LIB) $(EXTRA_PROG) $(chk_TESTS)
+
+# make install-doc doesn't do anything outside of doc directory, but
+# Makefiles should recognize it.
+# UPDATE: docs no longer reside in this build tree, so this target
+# is depreciated.
+install-doc uninstall-doc:
+ @echo "Nothing to be done."
+
+# clean up files generated by tests so they can be re-run.
+build-check-clean:
+ $(RM) -rf $(CHECK_CLEANFILES)
+
+# run check-clean whenever mostlyclean is run
+mostlyclean-local: build-check-clean
+
+# check-install is just a synonym for installcheck
+check-install: installcheck
+
+# Run each test in order, passing $(TEST_FLAGS) to the program.
+# Since tests are done in a shell loop, "make -i" does apply inside it.
+# Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
+# The timestamps give a rough idea how much time the tests use.
+#
+# Note that targets in chk_TESTS (defined above) will be built when the user
+# types 'make tests' or 'make check', but only programs in TEST_PROG,
+# TEST_PROG_PARA, or TEST_SCRIPT will actually be executed.
+check-TESTS: test
+
+test _test:
+ @$(MAKE) build-check-s
+ @$(MAKE) build-check-p
+
+# Actual execution of check-s.
+build-check-s: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @$(MAKE) $(AM_MAKEFLAGS) _exec_check-s
+ @if test -n "$(TEST_PROG)$(TEST_SCRIPT)"; then \
+ echo "===Serial tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+_exec_check-s: $(TEST_PROG_CHKEXE) $(TEST_SCRIPT_CHKSH)
+
+# The dummy.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummy.chkexe_"; then \
+ tname=$(@:.chkexe_=)$(EXEEXT);\
+ log=$(@:.chkexe_=.chklog); \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ fi
+
+# The dummysh.chkexe here prevents the target from being
+# empty if there are no tests in the current directory.
+# $${log} is the log file.
+# $${tname} is the name of test.
+$(TEST_SCRIPT_CHKSH) $(TEST_SCRIPT_PARA_CHKSH) dummysh.chkexe_:
+ @if test "X$@" != "X.chkexe_" && test "X$@" != "Xdummysh.chkexe_"; then \
+ cmd=$(@:.chkexe_=);\
+ tname=`basename $$cmd`;\
+ chkname=`basename $(@:.chkexe_=.chkexe)`;\
+ log=`basename $(@:.chkexe_=.chklog)`; \
+ echo "============================"; \
+ if $(top_srcdir)/bin/newer $${chkname} $$cmd $(SCRIPT_DEPEND); then \
+ echo "No need to test $${tname} again."; \
+ else \
+ echo "============================" > $${log}; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ else \
+ echo "Testing $${tname} $(TEST_FLAGS)"; \
+ echo "$${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ echo "============================" >> $${log}; \
+ RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \
+ srcdir="$(srcdir)" \
+ $(TIME) $(SHELL) $$cmd $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $${chkname} || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ echo "" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ echo "Finished testing $${tname} $(TEST_FLAGS)"; \
+ cat $${log}; \
+ fi; \
+ echo "============================"; \
+ fi
+
+# Actual execution of check-p.
+build-check-p: $(LIB) $(PROGS) $(chk_TESTS)
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` begin `date`==="; \
+ fi
+ @if test -n "$(TEST_PROG_PARA)"; then \
+ echo "**** Hint ****"; \
+ echo "Parallel test files reside in the current directory" \
+ "by default."; \
+ echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \
+ echo " HDF5_PARAPREFIX=/PFS/user/me"; \
+ echo " export HDF5_PARAPREFIX"; \
+ echo " make check"; \
+ echo "**** end of Hint ****"; \
+ fi
+ @for test in $(TEST_PROG_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
+ fi; \
+ done
+ @for test in $(TEST_SCRIPT_PARA) dummy; do \
+ if test $$test != dummy; then \
+ $(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ || exit 1; \
+ fi; \
+ done
+ @if test -n "$(TEST_PROG_PARA)$(TEST_SCRIPT_PARA)"; then \
+ echo "===Parallel tests in `echo ${PWD} | sed -e s:.*/::` ended `date`===";\
+ fi
+
+# Run test with different Virtual File Driver
+check-vfd: $(LIB) $(PROGS) $(chk_TESTS)
+ @for vfd in $(VFD_LIST) dummy; do \
+ if test $$vfd != dummy; then \
+ echo "============================"; \
+ echo "Testing Virtual File Driver $$vfd"; \
+ echo "============================"; \
+ $(MAKE) $(AM_MAKEFLAGS) check-clean || exit 1; \
+ HDF5_DRIVER=$$vfd $(MAKE) $(AM_MAKEFLAGS) check || exit 1; \
+ fi; \
+ done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/examples/h5_vds-eiger.c b/examples/h5_vds-eiger.c
new file mode 100644
index 0000000..ea22243
--- /dev/null
+++ b/examples/h5_vds-eiger.c
@@ -0,0 +1,177 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Eiger use case. Every 5 frames 10x10 are in the source
+ dataset "/A" in file with the name f-<#>.h5
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds-eiger.h5"
+#define DATASET "VDS-Eiger"
+#define VDSDIM0 5
+#define VDSDIM1 10
+#define VDSDIM2 10
+#define DIM0 5
+#define DIM1 10
+#define DIM2 10
+#define RANK 3
+
+int
+main (void)
+{
+ hid_t file, src_space, vspace,
+ dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ vdsdims_max[3] = {H5S_UNLIMITED, VDSDIM1, VDSDIM1},
+ dims[3] = {DIM0, DIM1, DIM2},
+ start[3], /* Hyperslab parameters */
+ stride[3],
+ count[3],
+ block[3];
+ hsize_t start_out[3], /* Hyperslab parameter out */
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int i;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+
+
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max);
+
+ /* Create dataspaces for the source dataset. */
+ src_space = H5Screate_simple (RANK, dims, NULL);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ stride[0] = DIM0;
+ stride[1] = 1;
+ stride[2] = 1;
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = DIM0;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ /*
+ * Build the mappings
+ *
+ */
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block);
+ status = H5Pset_virtual (dcpl, vspace, "f-%b.h5", "/A", src_space);
+
+
+
+ /* Create a virtual dataset */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (vspace);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %d\n", (int)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset ");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if(H5Sget_select_type(src_space) == H5S_SEL_ALL) {
+ printf("H5S_ALL \n");
+ }
+/* EIP read data back */
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ return 0;
+}
+
diff --git a/examples/h5_vds-exc.c b/examples/h5_vds-exc.c
new file mode 100644
index 0000000..039cdb8
--- /dev/null
+++ b/examples/h5_vds-exc.c
@@ -0,0 +1,226 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Excalibur use case with k=2 and m=3.
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds-exc.h5"
+#define DATASET "VDS-Excalibur"
+#define VDSDIM0 0
+#define VDSDIM1 15
+#define VDSDIM2 6
+#define KDIM0 0
+#define KDIM1 2
+#define KDIM2 6
+#define NDIM0 0
+#define NDIM1 3
+#define NDIM2 6
+#define RANK 3
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5",
+ "d.h5",
+ "e.h5",
+ "f.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F"
+};
+
+int
+main (void)
+{
+ hid_t file, space, ksrc_space, nsrc_space, vspace,
+ src_space,
+ dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ vdsdims_max[3] = {H5S_UNLIMITED,VDSDIM1, VDSDIM2},
+ kdims[3] = {KDIM0, KDIM1, KDIM2},
+ kdims_max[3] = {H5S_UNLIMITED, KDIM1, KDIM2},
+ ndims[3] = {NDIM0, NDIM1, NDIM2},
+ ndims_max[3] = {H5S_UNLIMITED, NDIM1, NDIM2},
+ start[3], /* Hyperslab parameters */
+ stride[3],
+ count[3],
+ block[3];
+ hsize_t start_out[3],
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int k = 2;
+ int n = 3;
+ int i;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+
+
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ space = H5Screate_simple (RANK, vdsdims, vdsdims_max);
+ /* Create dataspaces for A, C, and E datasets. */
+ ksrc_space = H5Screate_simple (RANK, kdims, kdims_max);
+ /* Create dataspaces for B, D, and F datasets. */
+ nsrc_space = H5Screate_simple (RANK, ndims, ndims_max);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = 1;
+ block[1] = k;
+ block[2] = VDSDIM2;
+
+ /*
+ * Build the mappings for A, C and E source datasets.
+ * Unlimited hyperslab selection is the same in the source datasets.
+ * Unlimited hyperslab selections in the virtual dataset have different offsets.
+ */
+ status = H5Sselect_hyperslab (ksrc_space, H5S_SELECT_SET, start, NULL, count, block);
+ for (i = 0; i < 3; i++) {
+ start[1] = (hsize_t)((k+n)*i);
+ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space);
+ }
+
+ /* Reinitialize start[1] and block[1] to build the second set of mappings. */
+ start[1] = 0;
+ block[1] = n;
+ /*
+ * Build the mappings for B, D and F source datasets.
+ * Unlimited hyperslab selection is the same in the source datasets.
+ * Unlimited hyperslab selections in the virtual dataset have different offsets.
+ */
+ status = H5Sselect_hyperslab (nsrc_space, H5S_SELECT_SET, start, NULL, count, block);
+ for (i = 0; i < 3; i++) {
+ start[1] = (hsize_t)(k+(k+n)*i);
+ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i+1], SRC_DATASET[2*i+1], nsrc_space);
+ }
+
+ /* Create a virtual dataset */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (space);
+ status = H5Sclose (nsrc_space);
+ status = H5Sclose (ksrc_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf("Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset \n");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+/* EIP read data back */
+
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ return 0;
+}
+
diff --git a/examples/h5_vds-exclim.c b/examples/h5_vds-exclim.c
new file mode 100644
index 0000000..4933471
--- /dev/null
+++ b/examples/h5_vds-exclim.c
@@ -0,0 +1,222 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Excalibur use case with k=2 and m=3 and only 3 planes in
+ Z-direction (i.e., not unlimited).
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds-exclim.h5"
+#define DATASET "VDS-Excaliburlim"
+#define VDSDIM0 3
+#define VDSDIM1 15
+#define VDSDIM2 6
+#define KDIM0 3
+#define KDIM1 2
+#define KDIM2 6
+#define NDIM0 3
+#define NDIM1 3
+#define NDIM2 6
+#define RANK 3
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5",
+ "d.h5",
+ "e.h5",
+ "f.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F"
+};
+
+int
+main (void)
+{
+ hid_t file, space, ksrc_space, nsrc_space, vspace,
+ src_space,
+ dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ kdims[3] = {KDIM0, KDIM1, KDIM2},
+ ndims[3] = {NDIM0, NDIM1, NDIM2},
+ start[3], /* Hyperslab parameters */
+ stride[3],
+ count[3],
+ block[3];
+ hsize_t start_out[3],
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int k = 2;
+ int n = 3;
+ int i;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+
+
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ space = H5Screate_simple (RANK, vdsdims, NULL);
+ /* Create dataspaces for A, C, and E datasets. */
+ ksrc_space = H5Screate_simple (RANK, kdims, NULL);
+ /* Create dataspaces for B, D, and F datasets. */
+ nsrc_space = H5Screate_simple (RANK, ndims, NULL);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ count[0] = VDSDIM0;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = 1;
+ block[1] = k;
+ block[2] = VDSDIM2;
+
+ /*
+ * Build the mappings for A, C and E source datasets.
+ *
+ */
+ status = H5Sselect_hyperslab (ksrc_space, H5S_SELECT_SET, start, NULL, count, block);
+ for (i = 0; i < 3; i++) {
+ start[1] = (hsize_t)((k+n)*i);
+ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i], SRC_DATASET[2*i], ksrc_space);
+ }
+
+ /* Reinitialize start[0] and block[1] */
+ start[0] = 0;
+ block[1] = n;
+ /*
+ * Build the mappings for B, D and F source datasets.
+ *
+ */
+ status = H5Sselect_hyperslab (nsrc_space, H5S_SELECT_SET, start, NULL, count, block);
+ for (i = 0; i < 3; i++) {
+ start[1] = (hsize_t)(k+(k+n)*i);
+ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Pset_virtual (dcpl, space, SRC_FILE[2*i+1], SRC_DATASET[2*i+1], nsrc_space);
+ }
+
+ /* Create a virtual dataset */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (space);
+ status = H5Sclose (nsrc_space);
+ status = H5Sclose (ksrc_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf("Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset \n");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if(H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%d, %d, %d] \n", (int)start_out[0], (int)start_out[1], (int)start_out[2]);
+ printf(" stride = [%d, %d, %d] \n", (int)stride_out[0], (int)stride_out[1], (int)stride_out[2]);
+ printf(" count = [%d, %d, %d] \n", (int)count_out[0], (int)count_out[1], (int)count_out[2]);
+ printf(" block = [%d, %d, %d] \n", (int)block_out[0], (int)block_out[1], (int)block_out[2]);
+ }
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+/* EIP read data back */
+
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ return 0;
+}
+
diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c
new file mode 100644
index 0000000..a6eecfb
--- /dev/null
+++ b/examples/h5_vds-percival-unlim-maxmin.c
@@ -0,0 +1,309 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Percival use case. Every fifth 10x10 plane in VDS is stored in
+ the corresponding 3D unlimited dataset.
+ There are 4 source datasets total.
+ Each of the source datasets is extended to different sizes.
+ VDS access property can be used to get max and min extent.
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define VFILE "vds-percival-unlim-maxmin.h5"
+#define DATASET "VDS-Percival-unlim-maxmin"
+#define VDSDIM0 H5S_UNLIMITED
+#define VDSDIM1 10
+#define VDSDIM2 10
+
+#define DIM0 H5S_UNLIMITED
+#define DIM0_1 4 /* Initial size of the source datasets */
+#define DIM1 10
+#define DIM2 10
+#define RANK 3
+#define PLANE_STRIDE 4
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5",
+ "d.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C",
+ "D"
+};
+
+int
+main (void)
+{
+ hid_t vfile, file, src_space, mem_space, vspace,
+ vdset, dset; /* Handles */
+ hid_t dcpl, dapl;
+ herr_t status;
+ hsize_t vdsdims[3] = {4*DIM0_1, VDSDIM1, VDSDIM2},
+ vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ dims[3] = {DIM0_1, DIM1, DIM2},
+ memdims[3] = {DIM0_1, DIM1, DIM2},
+ extdims[3] = {0, DIM1, DIM2}, /* Dimensions of the extended source datasets */
+ chunk_dims[3] = {DIM0_1, DIM1, DIM2},
+ dims_max[3] = {DIM0, DIM1, DIM2},
+ vdsdims_out[3],
+ vdsdims_max_out[3],
+ start[3], /* Hyperslab parameters */
+ stride[3],
+ count[3],
+ src_count[3],
+ block[3];
+ hsize_t start_out[3], /* Hyperslab parameter out */
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int i, j;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+ int wdata[DIM0_1*DIM1*DIM2];
+
+ /*
+ * Create source files and datasets. This step is optional.
+ */
+ for (i=0; i < PLANE_STRIDE; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < DIM0_1*DIM1*DIM2; j++) wdata[j] = i+1;
+
+ /*
+ * Create the source files and datasets. Write data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ src_space = H5Screate_simple (RANK, dims, dims_max);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ status = H5Pset_chunk (dcpl, RANK, chunk_dims);
+ dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (src_space);
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ vfile = H5Fcreate (VFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max);
+
+ /* Create dataspaces for the source dataset. */
+ src_space = H5Screate_simple (RANK, dims, dims_max);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */
+ stride[1] = 1;
+ stride[2] = 1;
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+ src_count[0] = H5S_UNLIMITED;
+ src_count[1] = 1;
+ src_count[2] = 1;
+ block[0] = 1;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ /*
+ * Build the mappings
+ *
+ */
+ status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block);
+ for (i=0; i < PLANE_STRIDE; i++) {
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block);
+ status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space);
+ start[0]++;
+ }
+
+ H5Sselect_none(vspace);
+
+ /* Create a virtual dataset */
+ vdset = H5Dcreate2 (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (vspace);
+ status = H5Sclose (src_space);
+ status = H5Pclose (dcpl);
+
+ /* Let's add data to the source datasets and check new dimensions for VDS */
+ /* We will add only one plane to the first source dataset, two planes to the
+ second one, three to the third, and four to the forth. */
+
+ for (i=0; i < PLANE_STRIDE; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < (i+1)*DIM1*DIM2; j++) wdata[j] = 10*(i+1);
+
+ /*
+ * Open the source files and datasets. Appen data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fopen (SRC_FILE[i], H5F_ACC_RDWR, H5P_DEFAULT);
+ dset = H5Dopen2 (file, SRC_DATASET[i], H5P_DEFAULT);
+ extdims[0] = DIM0_1+i+1;
+ status = H5Dset_extent (dset, extdims);
+ src_space = H5Dget_space (dset);
+ start[0] = DIM0_1;
+ start[1] = 0;
+ start[2] = 0;
+ count[0] = 1;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = i+1;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ memdims[0] = i+1;
+ mem_space = H5Screate_simple(RANK, memdims, NULL);
+ status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, mem_space, src_space, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ status = H5Dclose (vdset);
+ status = H5Fclose (vfile);
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+
+ /*
+ * Open VDS using different access properties to use max or
+ * min extents depending on the sizes of the underlying datasets
+ */
+ dapl = H5Pcreate (H5P_DATASET_ACCESS);
+
+ for(i = 0; i < 2; i++) {
+ status = H5Pset_virtual_view (dapl, i ? H5D_VDS_LAST_AVAILABLE : H5D_VDS_FIRST_MISSING);
+ vdset = H5Dopen2 (vfile, DATASET, dapl);
+
+ /* Let's get space of the VDS and its dimension; we should get 32(or 20)x10x10 */
+ vspace = H5Dget_space (vdset);
+ H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
+ printf ("VDS dimensions, bounds = H5D_VDS_%s: ", i ? "LAST_AVAILABLE" : "FIRST_MISSING");
+ for (j=0; j<RANK; j++)
+ printf (" %d ", (int)vdsdims_out[j]);
+ printf ("\n");
+
+ /* Close */
+ status = H5Dclose (vdset);
+ status = H5Sclose (vspace);
+ }
+
+ status = H5Pclose (dapl);
+
+ vdset = H5Dopen2 (vfile, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (vdset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset \n");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(src_space)) {
+ status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (vdset);
+ status = H5Fclose (vfile);
+ return 0;
+}
+
diff --git a/examples/h5_vds-percival-unlim.c b/examples/h5_vds-percival-unlim.c
new file mode 100644
index 0000000..b5f3ebd
--- /dev/null
+++ b/examples/h5_vds-percival-unlim.c
@@ -0,0 +1,352 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Percival use case. Every fifth 10x10 plane in VDS is stored in
+ the corresponding 3D unlimited dataset.
+ There are 4 source datasets total.
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define VFILE "vds-percival-unlim.h5"
+#define DATASET "VDS-Percival-unlim"
+#define VDSDIM0 H5S_UNLIMITED
+#define VDSDIM1 10
+#define VDSDIM2 10
+
+#define DIM0 H5S_UNLIMITED
+#define DIM0_1 10 /* Initial size of the datasets */
+#define DIM1 10
+#define DIM2 10
+#define RANK 3
+#define PLANE_STRIDE 4
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5",
+ "d.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C",
+ "D"
+};
+
+int
+main (void)
+{
+ hid_t vfile, file, src_space, mem_space, vspace,
+ vdset, dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[3] = {4*DIM0_1, VDSDIM1, VDSDIM2},
+ vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ dims[3] = {DIM0_1, DIM1, DIM2},
+ extdims[3] = {2*DIM0_1, DIM1, DIM2},
+ chunk_dims[3] = {DIM0_1, DIM1, DIM2},
+ dims_max[3] = {DIM0, DIM1, DIM2},
+ vdsdims_out[3],
+ vdsdims_max_out[3],
+ start[3], /* Hyperslab parameters */
+ stride[3],
+ count[3],
+ src_count[3],
+ block[3];
+ hsize_t start_out[3], /* Hyperslab parameter out */
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int i, j, k;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+ int wdata[DIM0_1*DIM1*DIM2];
+ int rdata[80][10][10];
+ int a_rdata[20][10][10];
+
+ /*
+ * Create source files and datasets. This step is optional.
+ */
+ for (i=0; i < PLANE_STRIDE; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < DIM0_1*DIM1*DIM2; j++) wdata[j] = i+1;
+
+ /*
+ * Create the source files and datasets. Write data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ src_space = H5Screate_simple (RANK, dims, dims_max);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ status = H5Pset_chunk (dcpl, RANK, chunk_dims);
+ dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (src_space);
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ vfile = H5Fcreate (VFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max);
+
+ /* Create dataspaces for the source dataset. */
+ src_space = H5Screate_simple (RANK, dims, dims_max);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */
+ stride[1] = 1;
+ stride[2] = 1;
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+ src_count[0] = H5S_UNLIMITED;
+ src_count[1] = 1;
+ src_count[2] = 1;
+ block[0] = 1;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ /*
+ * Build the mappings
+ *
+ */
+ status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block);
+ for (i=0; i < PLANE_STRIDE; i++) {
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block);
+ status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space);
+ start[0]++;
+ }
+
+ H5Sselect_none(vspace);
+
+ /* Create a virtual dataset */
+ vdset = H5Dcreate2 (vfile, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (vspace);
+ status = H5Sclose (src_space);
+ status = H5Pclose (dcpl);
+ /* Let's get space of the VDS and its dimension; we should get 40x10x10 */
+ vspace = H5Dget_space (vdset);
+ H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
+ printf ("VDS dimensions first time \n");
+ printf (" Current: ");
+ for (i=0; i<RANK; i++)
+ printf (" %d ", (int)vdsdims_out[i]);
+ printf ("\n");
+
+ /* Let's add data to the source datasets and check new dimensions for VDS */
+
+ for (i=0; i < PLANE_STRIDE; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < DIM0_1*DIM1*DIM2; j++) wdata[j] = 10*(i+1);
+
+ /*
+ * Create the source files and datasets. Write data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fopen (SRC_FILE[i], H5F_ACC_RDWR, H5P_DEFAULT);
+ dset = H5Dopen2 (file, SRC_DATASET[i], H5P_DEFAULT);
+ status = H5Dset_extent (dset, extdims);
+ src_space = H5Dget_space (dset);
+ start[0] = DIM0_1;
+ start[1] = 0;
+ start[2] = 0;
+ count[0] = 1;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = DIM0_1;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ mem_space = H5Screate_simple(RANK, dims, NULL);
+ status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, mem_space, src_space, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ status = H5Dclose (vdset);
+ status = H5Fclose (vfile);
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ vfile = H5Fopen (VFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ vdset = H5Dopen2 (vfile, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (vdset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset \n");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(src_space)) {
+ status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+ /*
+ * Read data from VDS.
+ */
+ vspace = H5Dget_space (vdset);
+ H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
+ printf ("VDS dimensions second time \n");
+ printf (" Current: ");
+ for (i=0; i<RANK; i++)
+ printf (" %d ", (int)vdsdims_out[i]);
+ printf ("\n");
+
+ /* Read all VDS data */
+
+ //EIP We should be able to do it by using H5S_ALL instead of making selection
+ // or using H5Sselect_all from vspace.
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ count[0] = 1;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = vdsdims_out[0];
+ block[1] = vdsdims_out[1];
+ block[2] = vdsdims_out[2];
+
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, NULL, count, block);
+ mem_space = H5Screate_simple(RANK, vdsdims_out, NULL);
+ status = H5Dread (vdset, H5T_NATIVE_INT, mem_space, vspace, H5P_DEFAULT,
+ rdata);
+ printf (" All data: \n");
+ for (i=0; i < (int)vdsdims_out[0]; i++) {
+ for (j=0; j < (int)vdsdims_out[1]; j++) {
+ printf ("(%d, %d, 0)", i, j);
+ for (k=0; k < (int)vdsdims_out[2]; k++)
+ printf (" %d ", rdata[i][j][k]);
+ printf ("\n");
+ }
+ }
+ /* Read VDS, but only data mapeed to dataset a.h5 */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ stride[0] = PLANE_STRIDE;
+ stride[1] = 1;
+ stride[2] = 1;
+ count[0] = 2*DIM0_1;
+ count[1] = 1;
+ count[2] = 1;
+ block[0] = 1;
+ block[1] = vdsdims_out[1];
+ block[2] = vdsdims_out[2];
+ dims[0] = 2*DIM0_1;
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block);
+ mem_space = H5Screate_simple(RANK, dims, NULL);
+ status = H5Dread (vdset, H5T_NATIVE_INT, mem_space, vspace, H5P_DEFAULT,
+ a_rdata);
+ printf (" All data: \n");
+ for (i=0; i < 2*DIM0_1; i++) {
+ for (j=0; j < (int)vdsdims_out[1]; j++) {
+ printf ("(%d, %d, 0)", i, j);
+ for (k=0; k < (int)vdsdims_out[2]; k++)
+ printf (" %d ", a_rdata[i][j][k]);
+ printf ("\n");
+ }
+ }
+ /*
+ * Close and release resources.
+ */
+ status = H5Sclose(mem_space);
+ status = H5Pclose (dcpl);
+ status = H5Dclose (vdset);
+ status = H5Fclose (vfile);
+ return 0;
+}
+
diff --git a/examples/h5_vds-percival.c b/examples/h5_vds-percival.c
new file mode 100644
index 0000000..757bb69
--- /dev/null
+++ b/examples/h5_vds-percival.c
@@ -0,0 +1,242 @@
+/************************************************************
+
+ This example illustrates the concept of the virtual dataset.
+ Percival use case. Every fifth 10x10 plane in VDS is stored in
+ the corresponding 3D unlimited dataset.
+ EIP: For now we will use finite dimension.
+ There are 4 source datasets total.
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds-percival.h5"
+#define DATASET "VDS-Percival"
+/* later
+#define VDSDIM0 H5S_UNLIMITED
+*/
+#define VDSDIM0 40
+#define VDSDIM1 10
+#define VDSDIM2 10
+/* later
+#define DIM0 H5S_UNLIMITED
+*/
+#define DIM0 10
+#define DIM1 10
+#define DIM2 10
+#define RANK 3
+#define PLANE_STRIDE 4
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5",
+ "d.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C",
+ "D"
+};
+
+int
+main (void)
+{
+ hid_t file, src_space, vspace,
+ dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ vdsdims_max[3] = {VDSDIM0, VDSDIM1, VDSDIM2},
+ dims[3] = {DIM0, DIM1, DIM2},
+ dims_max[3] = {DIM0, DIM1, DIM2},
+ start[3], /* Hyperslab start parameter for VDS */
+ stride[3],
+ count[3],
+ src_count[3],
+ block[3];
+ hsize_t start_out[3], /* Hyperslab parameter out */
+ stride_out[3],
+ count_out[3],
+ block_out[3];
+ int i, j;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+ int wdata[DIM0*DIM1*DIM2];
+
+ /*
+ * Create source files and datasets. This step is optional.
+ */
+ for (i=0; i < PLANE_STRIDE; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < DIM0*DIM1*DIM2; j++) wdata[j] = i+1;
+
+ /*
+ * Create the source files and datasets. Write data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ src_space = H5Screate_simple (RANK, dims, NULL);
+ dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, src_space, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ vspace = H5Screate_simple (RANK, vdsdims, vdsdims_max);
+
+ /* Create dataspaces for the source dataset. */
+ src_space = H5Screate_simple (RANK, dims, dims_max);
+
+ /* Create VDS creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Initialize hyperslab values */
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ stride[0] = PLANE_STRIDE; /* we will select every fifth plane in VDS */
+ stride[1] = 1;
+ stride[2] = 1;
+/* later
+ count[0] = H5S_UNLIMITED;
+*/
+ count[0] = VDSDIM0/4;
+ count[1] = 1;
+ count[2] = 1;
+/* later
+ src_count[0] = H5S_UNLIMITED;
+*/
+ src_count[0] = DIM0;
+ src_count[1] = 1;
+ src_count[2] = 1;
+ block[0] = 1;
+ block[1] = DIM1;
+ block[2] = DIM2;
+
+ /*
+ * Build the mappings
+ *
+ */
+ status = H5Sselect_hyperslab (src_space, H5S_SELECT_SET, start, NULL, src_count, block);
+ for (i=0; i < PLANE_STRIDE; i++) {
+ status = H5Sselect_hyperslab (vspace, H5S_SELECT_SET, start, stride, count, block);
+ status = H5Pset_virtual (dcpl, vspace, SRC_FILE[i], SRC_DATASET[i], src_space);
+ start[0]++;
+ }
+
+ H5Sselect_none(vspace);
+
+ /* Create a virtual dataset */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (vspace);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open file and dataset using the default properties.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset \n");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ /* Get source file name */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset */
+ printf(" Selection in the source dataset \n");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+ if (H5Sget_select_type(src_space) == H5S_SEL_HYPERSLABS) {
+ if (H5Sis_regular_hyperslab(src_space)) {
+ status = H5Sget_regular_hyperslab (src_space, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1], (unsigned long long)start_out[2]);
+ printf(" stride = [%llu, %llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1], (unsigned long long)stride_out[2]);
+ printf(" count = [%llu, %llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1], (unsigned long long)count_out[2]);
+ printf(" block = [%llu, %llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1], (unsigned long long)block_out[2]);
+ }
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ return 0;
+}
+
diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c
new file mode 100644
index 0000000..b707ae4
--- /dev/null
+++ b/examples/h5_vds-simpleIO.c
@@ -0,0 +1,184 @@
+/************************************************************
+
+ This example illustrates the concept of virtual dataset I/O
+ The program creates 2-dim source dataset and writes
+ data to it. Then it creates 2-dim virtual dataset that has
+ the same dimesnion sizes and maps the all elements of the
+ virtual dataset to all elements of the source dataset.
+ Then VDS is read back.
+
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds-simpleIO.h5"
+#define DATASET "VDS"
+#define DIM1 6
+#define DIM0 4
+#define RANK 2
+
+#define SRC_FILE "a.h5"
+#define SRC_DATASET "/A"
+
+
+int
+main (void)
+{
+ hid_t file, space, src_space, vspace, dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[2] = {DIM0, DIM1}, /* Virtual dataset dimension */
+ dims[2] = {DIM0, DIM1}; /* Source dataset dimensions */
+ int wdata[DIM0][DIM1], /* Write buffer for source dataset */
+ rdata[DIM0][DIM1], /* Read buffer for virtual dataset */
+ i, j;
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+ /*
+ * Initialize data.
+ */
+ for (i = 0; i < DIM0; i++)
+ for (j = 0; j < DIM1; j++) wdata[i][j] = i+1;
+
+ /*
+ * Create the source file and the dataset. Write data to the source dataset
+ * and close all resources.
+ */
+
+ file = H5Fcreate (SRC_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ space = H5Screate_simple (RANK, dims, NULL);
+ dset = H5Dcreate2 (file, SRC_DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ wdata[0]);
+ status = H5Sclose (space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ /* Create file in which virtual dataset will be stored. */
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ vspace = H5Screate_simple (RANK, vdsdims, NULL);
+
+ /* Set VDS creation property. */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /*
+ * Build the mappings.
+ * Selections in the source datasets are H5S_ALL.
+ * In the virtual dataset we select the first, the second and the third rows
+ * and map each row to the data in the corresponding source dataset.
+ */
+ src_space = H5Screate_simple (RANK, dims, NULL);
+ status = H5Pset_virtual (dcpl, vspace, SRC_FILE, SRC_DATASET, src_space);
+
+ /* Create a virtual dataset. */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, vspace, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (vspace);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open the file and virtual dataset.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find the number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset ");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+
+ /* Make sure it is ALL selection and then print selection. */
+ if(H5Sget_select_type(vspace) == H5S_SEL_ALL) {
+ printf("Selection is H5S_ALL \n");
+ }
+ /* Get source file name. */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name. */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset. */
+ printf(" Selection in the source dataset ");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+
+ /* Make sure it is ALL selection and then print selection. */
+ if(H5Sget_select_type(src_space) == H5S_SEL_ALL) {
+ printf("Selection is H5S_ALL \n");
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ }
+ /*
+ * Read the data using the default properties.
+ */
+ status = H5Dread (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ rdata[0]);
+
+ /*
+ * Output the data to the screen.
+ */
+ printf (" VDS Data:\n");
+ for (i=0; i<DIM0; i++) {
+ printf (" [");
+ for (j=0; j<DIM1; j++)
+ printf (" %3d", rdata[i][j]);
+ printf ("]\n");
+ }
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ return 0;
+}
+
diff --git a/examples/h5_vds.c b/examples/h5_vds.c
new file mode 100644
index 0000000..1e502c6
--- /dev/null
+++ b/examples/h5_vds.c
@@ -0,0 +1,267 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/************************************************************
+
+ This example illustrates the concept of virtual dataset.
+ The program creates three 1-dim source datasets and writes
+ data to them. Then it creates a 2-dim virtual dataset and
+ maps the first three rows of the virtual dataset to the data
+ in the source datasets. Elements of a row are mapped to all
+ elements of the corresponding source dataset.
+ The fourth row is not mapped and will be filled with the fill
+ values when virtual dataset is read back.
+
+ The program closes all datasets, and then reopens the virtual
+ dataset, and finds and prints its creation properties.
+ Then it reads the values.
+
+ This file is intended for use with HDF5 Library version 1.10
+
+ ************************************************************/
+/* EIP Add link to the picture */
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FILE "vds.h5"
+#define DATASET "VDS"
+#define VDSDIM1 6
+#define VDSDIM0 4
+#define DIM0 6
+#define RANK1 1
+#define RANK2 2
+
+const char *SRC_FILE[] = {
+ "a.h5",
+ "b.h5",
+ "c.h5"
+};
+
+const char *SRC_DATASET[] = {
+ "A",
+ "B",
+ "C"
+};
+
+int
+main (void)
+{
+ hid_t file, space, src_space, vspace, dset; /* Handles */
+ hid_t dcpl;
+ herr_t status;
+ hsize_t vdsdims[2] = {VDSDIM0, VDSDIM1}, /* Virtual datasets dimension */
+ dims[1] = {DIM0}, /* Source datasets dimensions */
+ start[2], /* Hyperslab parameters */
+ stride[2],
+ count[2],
+ block[2];
+ hsize_t start_out[2],
+ stride_out[2],
+ count_out[2],
+ block_out[2];
+ int wdata[DIM0], /* Write buffer for source dataset */
+ rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */
+ i, j, k, l;
+ int fill_value = -1; /* Fill value for VDS */
+ H5D_layout_t layout; /* Storage layout */
+ size_t num_map; /* Number of mappings */
+ ssize_t len; /* Length of the string; also a return value */
+ char *filename;
+ char *dsetname;
+ hsize_t nblocks;
+ hsize_t *buf; /* Buffer to hold hyperslab coordinates */
+
+ /*
+ * Create source files and datasets. This step is optional.
+ */
+ for (i=0; i < 3; i++) {
+ /*
+ * Initialize data for i-th source dataset.
+ */
+ for (j = 0; j < DIM0; j++) wdata[j] = i+1;
+
+ /*
+ * Create the source files and datasets. Write data to each dataset and
+ * close all resources.
+ */
+
+ file = H5Fcreate (SRC_FILE[i], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ space = H5Screate_simple (RANK1, dims, NULL);
+ dset = H5Dcreate2 (file, SRC_DATASET[i], H5T_NATIVE_INT, space, H5P_DEFAULT,
+ H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ wdata);
+ status = H5Sclose (space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+ }
+
+ /* Create file in which virtual dataset will be stored. */
+ file = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create VDS dataspace. */
+ space = H5Screate_simple (RANK2, vdsdims, NULL);
+
+ /* Set VDS creation property. */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+ status = H5Pset_fill_value (dcpl, H5T_NATIVE_INT, &fill_value);
+
+ /* Initialize hyperslab values. */
+ start[0] = 0;
+ start[1] = 0;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = 1;
+ block[1] = VDSDIM1;
+
+ /*
+ * Build the mappings.
+ * Selections in the source datasets are H5S_ALL.
+ * In the virtual dataset we select the first, the second and the third rows
+ * and map each row to the data in the corresponding source dataset.
+ */
+ src_space = H5Screate_simple (RANK1, dims, NULL);
+ for (i = 0; i < 3; i++) {
+ start[0] = (hsize_t)i;
+ /* Select i-th row in the virtual dataset; selection in the source datasets is the same. */
+ status = H5Sselect_hyperslab (space, H5S_SELECT_SET, start, NULL, count, block);
+ status = H5Pset_virtual (dcpl, space, SRC_FILE[i], SRC_DATASET[i], src_space);
+ }
+
+ /* Create a virtual dataset. */
+ dset = H5Dcreate2 (file, DATASET, H5T_NATIVE_INT, space, H5P_DEFAULT,
+ dcpl, H5P_DEFAULT);
+ status = H5Sclose (space);
+ status = H5Sclose (src_space);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ /*
+ * Now we begin the read section of this example.
+ */
+
+ /*
+ * Open the file and virtual dataset.
+ */
+ file = H5Fopen (FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dset = H5Dopen2 (file, DATASET, H5P_DEFAULT);
+
+ /*
+ * Get creation property list and mapping properties.
+ */
+ dcpl = H5Dget_create_plist (dset);
+
+ /*
+ * Get storage layout.
+ */
+ layout = H5Pget_layout (dcpl);
+ if (H5D_VIRTUAL == layout)
+ printf(" Dataset has a virtual layout \n");
+ else
+ printf(" Wrong layout found \n");
+
+ /*
+ * Find the number of mappings.
+ */
+ status = H5Pget_virtual_count (dcpl, &num_map);
+ printf(" Number of mappings is %lu\n", (unsigned long)num_map);
+
+ /*
+ * Get mapping parameters for each mapping.
+ */
+ for (i = 0; i < (int)num_map; i++) {
+ printf(" Mapping %d \n", i);
+ printf(" Selection in the virtual dataset ");
+ /* Get selection in the virttual dataset */
+ vspace = H5Pget_virtual_vspace (dcpl, (size_t)i);
+
+ /* Make sure that this is a hyperslab selection and then print information. */
+ if (H5Sget_select_type(vspace) == H5S_SEL_HYPERSLABS) {
+ nblocks = H5Sget_select_hyper_nblocks (vspace);
+ buf = (hsize_t *)malloc(sizeof(hsize_t)*2*RANK2*nblocks);
+ status = H5Sget_select_hyper_blocklist (vspace, (hsize_t)0, nblocks, buf);
+ for (l=0; l<nblocks; l++) {
+ printf("(");
+ for (k=0; k<RANK2-1; k++)
+ printf("%d,", (int)buf[k]);
+ printf("%d ) - (", (int)buf[k]);
+ for (k=0; k<RANK2-1; k++)
+ printf("%d,", (int)buf[RANK2+k]);
+ printf("%d)\n", (int)buf[RANK2+k]);
+ }
+ /* We also can use new APIs to get start, stride, count and block */
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf(" start = [%llu, %llu] \n", (unsigned long long)start_out[0], (unsigned long long)start_out[1]);
+ printf(" stride = [%llu, %llu] \n", (unsigned long long)stride_out[0], (unsigned long long)stride_out[1]);
+ printf(" count = [%llu, %llu] \n", (unsigned long long)count_out[0], (unsigned long long)count_out[1]);
+ printf(" block = [%llu, %llu] \n", (unsigned long long)block_out[0], (unsigned long long)block_out[1]);
+ }
+ }
+ /* Get source file name. */
+ len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);
+ filename = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_filename (dcpl, (size_t)i, filename, len+1);
+ printf(" Source filename %s\n", filename);
+
+ /* Get source dataset name. */
+ len = H5Pget_virtual_dsetname (dcpl, (size_t)i, NULL, 0);
+ dsetname = (char *)malloc((size_t)len*sizeof(char)+1);
+ H5Pget_virtual_dsetname (dcpl, (size_t)i, dsetname, len+1);
+ printf(" Source dataset name %s\n", dsetname);
+
+ /* Get selection in the source dataset. */
+ printf(" Selection in the source dataset ");
+ src_space = H5Pget_virtual_srcspace (dcpl, (size_t)i);
+
+ /* Make sure it is ALL selection and then print the coordinates. */
+ if(H5Sget_select_type(src_space) == H5S_SEL_ALL) {
+ printf("(0) - (%d) \n", DIM0-1);
+ }
+ H5Sclose(vspace);
+ H5Sclose(src_space);
+ free(filename);
+ free(dsetname);
+ free(buf);
+ }
+
+ /*
+ * Read the data using the default properties.
+ */
+ status = H5Dread (dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ rdata[0]);
+
+ /*
+ * Output the data to the screen.
+ */
+ printf (" VDS Data:\n");
+ for (i=0; i<VDSDIM0; i++) {
+ printf (" [");
+ for (j=0; j<VDSDIM1; j++)
+ printf (" %3d", rdata[i][j]);
+ printf ("]\n");
+ }
+ /*
+ * Close and release resources.
+ */
+ status = H5Pclose (dcpl);
+ status = H5Dclose (dset);
+ status = H5Fclose (file);
+
+ return 0;
+}
+
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index 6b5d0f7..1661344 100644
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -125,7 +125,23 @@ then
RunTest h5_elink_unix2win &&\
rm h5_elink_unix2win &&\
RunTest h5_shared_mesg &&\
- rm h5_shared_mesg); then
+ rm h5_shared_mesg &&\
+ RunTest h5_vds-eiger &&\
+ rm h5_vds-eiger &&\
+ RunTest h5_vds-exclim &&\
+ rm h5_vds-exclim &&\
+ RunTest h5_vds-exc &&\
+ rm h5_vds-exc &&\
+ RunTest h5_vds-simpleIO &&\
+ rm h5_vds-simpleIO &&\
+ RunTest h5_vds-percival &&\
+ rm h5_vds-percival &&\
+ RunTest h5_vds-percival-unlim &&\
+ rm h5_vds-percival-unlim &&\
+ RunTest h5_vds-percival-unlim-maxmin&&\
+ rm h5_vds-percival-unlim-maxmin &&\
+ RunTest h5_vds &&\
+ rm h5_vds); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}