summaryrefslogtreecommitdiff
path: root/tools/test/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc')
-rw-r--r--tools/test/misc/CMakeLists.txt45
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake264
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake199
-rw-r--r--tools/test/misc/CMakeTestsRepart.cmake96
-rw-r--r--tools/test/misc/Makefile.am45
-rw-r--r--tools/test/misc/Makefile.in1604
-rw-r--r--tools/test/misc/clear_open_chk.c71
-rw-r--r--tools/test/misc/h5clear_gentest.c277
-rw-r--r--tools/test/misc/h5perf_gentest.c609
-rw-r--r--tools/test/misc/h5repart_gentest.c99
-rw-r--r--tools/test/misc/repart_test.c163
-rw-r--r--tools/test/misc/talign.c242
-rw-r--r--tools/test/misc/testfiles/h5clear_log_v3.h5bin0 -> 2048 bytes
-rw-r--r--tools/test/misc/testfiles/h5clear_mdc_image.h5bin0 -> 23467 bytes
-rw-r--r--tools/test/misc/testfiles/h5clear_missing_file.ddl15
-rw-r--r--tools/test/misc/testfiles/h5clear_no_mdc_image.ddl1
-rw-r--r--tools/test/misc/testfiles/h5clear_open_fail.ddl1
-rw-r--r--tools/test/misc/testfiles/h5clear_sec2_v0.h5bin0 -> 800 bytes
-rw-r--r--tools/test/misc/testfiles/h5clear_sec2_v2.h5bin0 -> 830 bytes
-rw-r--r--tools/test/misc/testfiles/h5clear_sec2_v3.h5bin0 -> 195 bytes
-rw-r--r--tools/test/misc/testfiles/h5clear_usage.ddl14
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_help.txt7
-rw-r--r--tools/test/misc/testfiles/h5mkgrp_version.txt.in1
-rw-r--r--tools/test/misc/testfiles/latest_h5clear_log_v3.h5bin0 -> 2048 bytes
-rw-r--r--tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5bin0 -> 195 bytes
-rw-r--r--tools/test/misc/testfiles/mod_h5clear_mdc_image.h5bin0 -> 22048 bytes
-rw-r--r--tools/test/misc/testh5clear.sh.in338
-rw-r--r--tools/test/misc/testh5mkgrp.sh.in320
-rw-r--r--tools/test/misc/testh5repart.sh.in195
-rw-r--r--tools/test/misc/vds/CMakeLists.txt28
-rw-r--r--tools/test/misc/vds/Makefile.am36
-rw-r--r--tools/test/misc/vds/Makefile.in1485
-rw-r--r--tools/test/misc/vds/UC_1.h119
-rw-r--r--tools/test/misc/vds/UC_1_one_dim_gen.c267
-rw-r--r--tools/test/misc/vds/UC_2.h108
-rw-r--r--tools/test/misc/vds/UC_2_two_dims_gen.c268
-rw-r--r--tools/test/misc/vds/UC_3.h72
-rw-r--r--tools/test/misc/vds/UC_3_gaps_gen.c253
-rw-r--r--tools/test/misc/vds/UC_4.h84
-rw-r--r--tools/test/misc/vds/UC_4_printf_gen.c217
-rw-r--r--tools/test/misc/vds/UC_5.h81
-rw-r--r--tools/test/misc/vds/UC_5_stride_gen.c241
-rw-r--r--tools/test/misc/vds/UC_common.h39
43 files changed, 7904 insertions, 0 deletions
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
new file mode 100644
index 0000000..5e3c0a2
--- /dev/null
+++ b/tools/test/misc/CMakeLists.txt
@@ -0,0 +1,45 @@
+cmake_minimum_required (VERSION 3.2.2)
+PROJECT (HDF5_TOOLS_TEST_MISC)
+
+#-----------------------------------------------------------------------------
+# Setup include Directories
+#-----------------------------------------------------------------------------
+INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
+
+ # --------------------------------------------------------------------
+ # Add the misc test executables
+ # --------------------------------------------------------------------
+ if (HDF5_BUILD_GENERATORS)
+ add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c)
+ TARGET_NAMING (h5repart_gentest STATIC)
+ TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ")
+ target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
+ #add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>)
+
+ add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c)
+ TARGET_NAMING (h5clear_gentest STATIC)
+ TARGET_C_PROPERTIES (h5clear_gentest STATIC " " " ")
+ target_link_libraries (h5clear_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5clear_gentest PROPERTIES FOLDER tools)
+ #add_test (NAME H5CLEAR-h5clear_gentest COMMAND $<TARGET_FILE:h5clear_gentest>)
+
+ add_subdirectory (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/vds)
+
+ endif ()
+
+ add_executable (h5repart_test ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/repart_test.c)
+ TARGET_NAMING (h5repart_test STATIC)
+ TARGET_C_PROPERTIES (h5repart_test STATIC " " " ")
+ target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5repart_test PROPERTIES FOLDER tools)
+
+ add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c)
+ TARGET_NAMING (clear_open_chk STATIC)
+ TARGET_C_PROPERTIES (clear_open_chk STATIC " " " ")
+ target_link_libraries (clear_open_chk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (clear_open_chk PROPERTIES FOLDER tools)
+
+ include (CMakeTestsRepart.cmake)
+ include (CMakeTestsClear.cmake)
+ include (CMakeTestsMkgrp.cmake)
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
new file mode 100644
index 0000000..7eba4a1
--- /dev/null
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -0,0 +1,264 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ set (HDF5_TEST_FILES
+ h5clear_log_v3.h5
+ h5clear_mdc_image.h5
+ mod_h5clear_mdc_image.h5
+ latest_h5clear_log_v3.h5
+ latest_h5clear_sec2_v3.h5
+ )
+ set (HDF5_SEC2_TEST_FILES
+ h5clear_sec2_v0.h5
+ h5clear_sec2_v2.h5
+ h5clear_sec2_v3.h5
+ )
+ set (HDF5_REFERENCE_TEST_FILES
+ h5clear_usage.ddl
+ h5clear_open_fail.ddl
+ h5clear_missing_file.ddl
+ h5clear_no_mdc_image.ddl
+ )
+
+ foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES} ${HDF5_REFERENCE_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5clear_files")
+ endforeach ()
+ # make second copy of h5clear_sec2.h5
+ foreach (h5_file ${HDF5_SEC2_TEST_FILES})
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}" "h5clear_files")
+ endforeach ()
+ # make second copy of mod_h5clear_mdc_image.h5
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5" "h5clear_files")
+ add_custom_target(h5clear_files ALL COMMENT "Copying files needed by h5clear tests" DEPENDS ${h5clear_files_list})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ macro (ADD_H5_CMP testname resultfile resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testname}.out
+ ${testname}.out.err
+ )
+ add_test (
+ NAME H5CLEAR_CMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5clear>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5CLEAR_CMP-${testname} PROPERTIES DEPENDS H5CLEAR_CMP-${testname}-clear-objects)
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_RETTEST testname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR_RET-${testname}
+ COMMAND $<TARGET_FILE:h5clear> ${ARGN}
+ )
+ set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WILL_FAIL "${resultcode}")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR_RET-${testname}")
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_TEST testname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5CLEAR-clear_open_chk-copy_${testname}.h5
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/${testname}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testname}.h5"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-clear_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR-clear_open_chk-copy_${testname}.h5")
+ # Initial file open fails OR
+ # File open succeeds because the library does not check status_flags for file with < v3 superblock
+ add_test (NAME H5CLEAR-clear_open_chk-${testname}_${resultcode} COMMAND $<TARGET_FILE:clear_open_chk> ${testname}.h5)
+ set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}")
+ set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-clear_open_chk-${testname}_${resultcode} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ # After "h5clear" the file, the subsequent file open succeeds
+ add_test (NAME H5CLEAR-h5clear-${testname} COMMAND $<TARGET_FILE:h5clear> -s ${testname}.h5)
+ set_tests_properties (H5CLEAR-h5clear-${testname} PROPERTIES DEPENDS H5CLEAR-clear_open_chk-${testname}_${resultcode})
+ set_tests_properties (H5CLEAR-h5clear-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (NAME H5CLEAR-clear_open_chk-${testname} COMMAND $<TARGET_FILE:clear_open_chk> ${testname}.h5)
+ set_tests_properties (H5CLEAR-clear_open_chk-${testname} PROPERTIES DEPENDS H5CLEAR-h5clear-${testname})
+ set_tests_properties (H5CLEAR-clear_open_chk-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ set (last_test "H5CLEAR-clear_open_chk-${testname}")
+ endif ()
+ endmacro ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+#
+#
+#
+# The following are tests to verify the status_flags field is cleared properly:
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5CLEAR-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5clear_log_v3.h5
+ h5clear_mdc_image.h5
+ h5clear_sec2_v0.h5
+ h5clear_sec2_v2.h5
+ h5clear_sec2_v3.h5
+ orig_h5clear_sec2_v0.h5
+ orig_h5clear_sec2_v2.h5
+ orig_h5clear_sec2_v3.h5
+ latest_h5clear_log_v3.h5
+ latest_h5clear_sec2_v3.h5
+ mod_h5clear_mdc_image.h5
+ mod_h5clear_mdc_image2.h5
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR-clearall-objects")
+
+ foreach (h5_file ${HDF5_TEST_FILES} ${HDF5_SEC2_TEST_FILES})
+ add_test (
+ NAME H5CLEAR-copy_${h5_file}
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-copy_${h5_file} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR-copy_${h5_file}")
+ endforeach ()
+ # make second copy of h5clear_sec2.h5
+ foreach (h5_file ${HDF5_SEC2_TEST_FILES})
+ add_test (
+ NAME H5CLEAR-copy_orig_${h5_file}
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-copy_orig_${h5_file} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR-copy_orig_${h5_file}")
+ endforeach ()
+ # make second copy of mod_h5clear_mdc_image.h5
+ add_test (
+ NAME H5CLEAR-copy_mod_h5clear_mdc_image2.h5
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ "${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5CLEAR-copy_mod_h5clear_mdc_image2.h5 PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5CLEAR-copy_mod_h5clear_mdc_image2.h5")
+endif()
+
+#
+#
+#
+# The following are tests to verify the expected output from h5clear
+# "h5clear -h"
+# "h5clear" (no options, no file)
+# "h5clear junk.h5" (no options, nonexisting file)
+# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file)
+# "h5clear -m" (valid 1 option, no file)
+# "h5clear -s junk.h5" (valid 1 option, nonexisting file)
+# "h5clear -m -s" (valid 2 options, no file)
+# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file)
+# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image)
+# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image)
+ ADD_H5_CMP (h5clear_usage_h h5clear_usage 0 "-h")
+ ADD_H5_CMP (h5clear_usage h5clear_usage 1 "")
+ ADD_H5_CMP (h5clear_usage_junk h5clear_usage 1 "" junk.h5)
+ ADD_H5_CMP (h5clear_usage_none h5clear_usage 1 "" orig_h5clear_sec2_v3.h5)
+ ADD_H5_CMP (h5clear_missing_file_m h5clear_missing_file 1 "-m")
+ ADD_H5_CMP (h5clear_open_fail_s h5clear_open_fail 1 "-s" junk.h5)
+ ADD_H5_CMP (h5clear_missing_file_ms h5clear_missing_file 1 "-m" "-s")
+ ADD_H5_CMP (h5clear_open_fail_ms h5clear_open_fail 1 "-m" "-s" junk.h5)
+ ADD_H5_CMP (h5clear_no_mdc_image_m h5clear_no_mdc_image 0 "-m" orig_h5clear_sec2_v2.h5)
+ ADD_H5_CMP (h5clear_no_mdc_image_ms h5clear_no_mdc_image 0 "-s" "-m" orig_h5clear_sec2_v0.h5)
+#
+#
+#
+# The following are tests to verify the expected exit code from h5clear:
+# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code)
+# "h5clear --vers" (valid option, version #, succeed exit code)
+# "h5clear -k" (invalid 1 option, no file, fail exit code)
+# "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code)
+# "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code)
+# "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code)
+# "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code)
+# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code)
+# "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code)
+# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code)
+# "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code)
+ ADD_H5_RETTEST (h5clear_mdc_image "false" "-m" h5clear_mdc_image.h5)
+ ADD_H5_RETTEST (h5clear_vers "false" "--vers")
+ ADD_H5_RETTEST (h5clear_k "true" "-k")
+ ADD_H5_RETTEST (h5clear_k_junk "true" "-k" junk.h5)
+ ADD_H5_RETTEST (h5clear_l_sec2 "true" "-l" h5clear_sec2_v2.h5)
+ ADD_H5_RETTEST (h5clear_mk "true" "-m" "-k")
+ ADD_H5_RETTEST (h5clear_lm "true" "-l" "-m")
+ ADD_H5_RETTEST (h5clear_ml_junk "true" "-m" "-l" junk.h5)
+ ADD_H5_RETTEST (h5clear_lm_junk "true" "-l" "-m" junk.h5)
+ ADD_H5_RETTEST (h5clear_ml_sec2 "true" "-m" "-l" h5clear_sec2_v0.h5)
+ ADD_H5_RETTEST (h5clear_lm_sec2 "true" "-l" "-m" h5clear_sec2_v0.h5)
+#
+#
+#
+# h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear:
+ ADD_H5_CMP (h5clear_mdc_image_m h5clear_no_mdc_image 0 "-m" mod_h5clear_mdc_image.h5)
+ ADD_H5_CMP (h5clear_mdc_image_sm h5clear_no_mdc_image 0 "-s" "-m" mod_h5clear_mdc_image2.h5)
+#
+#
+#
+# The following are tests to verify the status_flags field is cleared properly:
+ ADD_H5_TEST (h5clear_sec2_v3 "true")
+ ADD_H5_TEST (h5clear_log_v3 "true")
+ ADD_H5_TEST (latest_h5clear_sec2_v3 "true")
+ ADD_H5_TEST (latest_h5clear_log_v3 "true")
+ ADD_H5_TEST (h5clear_sec2_v0 "false")
+ ADD_H5_TEST (h5clear_sec2_v2 "false")
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
new file mode 100644
index 0000000..7011b19
--- /dev/null
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -0,0 +1,199 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ set (HDF5_MKGRP_TEST_FILES
+ #h5mkgrp_help.txt
+ #h5mkgrp_version
+ h5mkgrp_single.ls
+ h5mkgrp_single_v.ls
+ h5mkgrp_single_p.ls
+ h5mkgrp_single_l.ls
+ h5mkgrp_several.ls
+ h5mkgrp_several_v.ls
+ h5mkgrp_several_p.ls
+ h5mkgrp_several_l.ls
+ h5mkgrp_nested_p.ls
+ h5mkgrp_nested_lp.ls
+ h5mkgrp_nested_mult_p.ls
+ h5mkgrp_nested_mult_lp.ls
+ )
+
+ # make test dir
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
+ endforeach ()
+
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/testfiles/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
+ add_custom_target(h5mkgrp_files ALL COMMENT "Copying files needed by h5mkgrp tests" DEPENDS ${h5mkgrp_files_list})
+
+ configure_file (${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ macro (ADD_H5_TEST resultfile resultcode resultoption)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5MKGRP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ endif ()
+
+ add_test (
+ NAME H5MKGRP-${resultfile}
+ COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
+ )
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else (HDF5_ENABLE_USING_MEMCHECKER)
+ set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
+ add_test (
+ NAME H5MKGRP-${resultfile}-h5ls
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_MASK_MOD=true"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_CMP resultfile resultcode)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
+ else ()
+ add_test (
+ NAME H5MKGRP_CMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ )
+ set_tests_properties (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ add_test (
+ NAME H5MKGRP_CMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (
+ NAME H5MKGRP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5mkgrp_help.out
+ h5mkgrp_help.out.err
+ h5mkgrp_version.out
+ h5mkgrp_version.out.err
+ h5mkgrp_single.h5
+ h5mkgrp_single.out
+ h5mkgrp_single.out.err
+ h5mkgrp_single_v.h5
+ h5mkgrp_single_v.out
+ h5mkgrp_single_v.out.err
+ h5mkgrp_single_p.h5
+ h5mkgrp_single_p.out
+ h5mkgrp_single_p.out.err
+ h5mkgrp_single_l.h5
+ h5mkgrp_single_l.out
+ h5mkgrp_single_l.out.err
+ h5mkgrp_several.h5
+ h5mkgrp_several.out
+ h5mkgrp_several.out.err
+ h5mkgrp_several_v.h5
+ h5mkgrp_several_v.out
+ h5mkgrp_several_v.out.err
+ h5mkgrp_several_p.h5
+ h5mkgrp_several_p.out
+ h5mkgrp_several_p.out.err
+ h5mkgrp_several_l.h5
+ h5mkgrp_several_l.out
+ h5mkgrp_several_l.out.err
+ h5mkgrp_nested_p.h5
+ h5mkgrp_nested_p.out
+ h5mkgrp_nested_p.out.err
+ h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_lp.out
+ h5mkgrp_nested_lp.out.err
+ h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_p.out
+ h5mkgrp_nested_mult_p.out.err
+ h5mkgrp_nested_mult_lp.h5
+ h5mkgrp_nested_mult_lp.out
+ h5mkgrp_nested_mult_lp.out.err
+ )
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5MKGRP-clearall-objects")
+ endif ()
+
+ # Check that help & version is displayed properly
+ ADD_H5_CMP (h5mkgrp_help 0 "-h")
+ ADD_H5_CMP (h5mkgrp_version 0 "-V")
+
+ # Create single group at root level
+ ADD_H5_TEST (h5mkgrp_single 0 "" single)
+ ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single)
+ ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single)
+ ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest)
+
+ # Create several groups at root level
+ ADD_H5_TEST (h5mkgrp_several 0 "" one two)
+ ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two)
+ ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two)
+ ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two)
+
+ # Create various nested groups
+ ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four)
+ ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four)
diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake
new file mode 100644
index 0000000..37da903
--- /dev/null
+++ b/tools/test/misc/CMakeTestsRepart.cmake
@@ -0,0 +1,96 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ set (HDF5_REFERENCE_TEST_FILES
+ family_file00000.h5
+ family_file00001.h5
+ family_file00002.h5
+ family_file00003.h5
+ family_file00004.h5
+ family_file00005.h5
+ family_file00006.h5
+ family_file00007.h5
+ family_file00008.h5
+ family_file00009.h5
+ family_file00010.h5
+ family_file00011.h5
+ family_file00012.h5
+ family_file00013.h5
+ family_file00014.h5
+ family_file00015.h5
+ family_file00016.h5
+ family_file00017.h5
+ )
+
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
+ endforeach ()
+ add_custom_target(h5repart_files ALL COMMENT "Copying files needed by h5repart tests" DEPENDS ${h5repart_files_list})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5REPART-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ fst_family00000.h5
+ scd_family00000.h5
+ scd_family00001.h5
+ scd_family00002.h5
+ scd_family00003.h5
+ family_to_sec2.h5
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5REPART-clearall-objects")
+
+ # repartition family member size to 20,000 bytes.
+ add_test (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ set_tests_properties (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # repartition family member size to 5 KB.
+ add_test (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ set_tests_properties (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # convert family file to sec2 file of 20,000 bytes
+ add_test (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ set_tests_properties (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # test the output files repartitioned above.
+ add_test (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
+ set_tests_properties (H5REPART-h5repart_test PROPERTIES DEPENDS "H5REPART-clearall-objects;H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_sec2")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ h5repart_test
+ )
diff --git a/tools/test/misc/Makefile.am b/tools/test/misc/Makefile.am
new file mode 100644
index 0000000..f2d2489
--- /dev/null
+++ b/tools/test/misc/Makefile.am
@@ -0,0 +1,45 @@
+#
+# 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 COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+SUBDIRS=vds
+
+# Include src directory
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
+
+#test scripts and programs
+TEST_PROG=h5repart_gentest h5clear_gentest talign
+TEST_SCRIPT=testh5repart.sh testh5mkgrp.sh testh5clear.sh
+
+check_PROGRAMS=$(TEST_PROG) repart_test clear_open_chk
+check_SCRIPTS=$(TEST_SCRIPT)
+SCRIPT_DEPEND=../../src/misc/h5repart$(EXEEXT) ../../src/misc/h5mkgrp$(EXEEXT) ../../src/misc/h5clear$(EXEEXT)
+
+# Temporary files. *.h5 are generated by h5repart_gentest. They should
+# copied to the testfiles/ directory if update is required. fst_family*.h5
+# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
+CHECK_CLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 append.log
+
+# These were generated by configure. Remove them only when distclean.
+DISTCLEANFILES=testh5repart.sh testh5clear.sh
+
+# All programs rely on hdf5 library and h5tools library
+LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+
+include $(top_srcdir)/config/conclude.am
diff --git a/tools/test/misc/Makefile.in b/tools/test/misc/Makefile.in
new file mode 100644
index 0000000..10ce8d8
--- /dev/null
+++ b/tools/test/misc/Makefile.in
@@ -0,0 +1,1604 @@
+# 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 COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF5 Library Makefile(.in)
+#
+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@
+check_PROGRAMS = $(am__EXEEXT_1) repart_test$(EXEEXT) \
+ clear_open_chk$(EXEEXT)
+TESTS = $(am__EXEEXT_1) $(TEST_SCRIPT)
+subdir = tools/test/misc
+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/ax_check_class.m4 \
+ $(top_srcdir)/m4/ax_check_classpath.m4 \
+ $(top_srcdir)/m4/ax_check_java_home.m4 \
+ $(top_srcdir)/m4/ax_check_junit.m4 \
+ $(top_srcdir)/m4/ax_java_options.m4 \
+ $(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_jar.m4 \
+ $(top_srcdir)/m4/ax_prog_java.m4 \
+ $(top_srcdir)/m4/ax_prog_java_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javac.m4 \
+ $(top_srcdir)/m4/ax_prog_javac_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javadoc.m4 \
+ $(top_srcdir)/m4/ax_try_compile_java.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 = testh5clear.sh testh5mkgrp.sh testh5repart.sh
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = h5repart_gentest$(EXEEXT) h5clear_gentest$(EXEEXT) \
+ talign$(EXEEXT)
+clear_open_chk_SOURCES = clear_open_chk.c
+clear_open_chk_OBJECTS = clear_open_chk.$(OBJEXT)
+clear_open_chk_LDADD = $(LDADD)
+clear_open_chk_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+h5clear_gentest_SOURCES = h5clear_gentest.c
+h5clear_gentest_OBJECTS = h5clear_gentest.$(OBJEXT)
+h5clear_gentest_LDADD = $(LDADD)
+h5clear_gentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+h5repart_gentest_SOURCES = h5repart_gentest.c
+h5repart_gentest_OBJECTS = h5repart_gentest.$(OBJEXT)
+h5repart_gentest_LDADD = $(LDADD)
+h5repart_gentest_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+repart_test_SOURCES = repart_test.c
+repart_test_OBJECTS = repart_test.$(OBJEXT)
+repart_test_LDADD = $(LDADD)
+repart_test_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+talign_SOURCES = talign.c
+talign_OBJECTS = talign.$(OBJEXT)
+talign_LDADD = $(LDADD)
+talign_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+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 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = clear_open_chk.c h5clear_gentest.c h5repart_gentest.c \
+ repart_test.c talign.c
+DIST_SOURCES = clear_open_chk.c h5clear_gentest.c h5repart_gentest.c \
+ repart_test.c talign.c
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+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)
+TEST_SUITE_LOG = test-suite.log
+LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+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)
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/testh5clear.sh.in \
+ $(srcdir)/testh5mkgrp.sh.in $(srcdir)/testh5repart.sh.in \
+ $(top_srcdir)/bin/depcomp $(top_srcdir)/bin/test-driver \
+ $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+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@
+
+# Include src directory
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tools/lib
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_JAVACFLAGS = @AM_JAVACFLAGS@
+AM_JAVAFLAGS = @AM_JAVAFLAGS@
+AM_JNIFLAGS = @AM_JNIFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+ASSERTS = @ASSERTS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+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@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+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_CLASSPATH = @H5_CLASSPATH@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_JAVACFLAGS = @H5_JAVACFLAGS@
+H5_JAVAFLAGS = @H5_JAVAFLAGS@
+H5_JNIFLAGS = @H5_JNIFLAGS@
+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@
+HDF_JAVA = @HDF_JAVA@
+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_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVACFLAGS = @JAVACFLAGS@
+JAVADOC = @JAVADOC@
+JAVAFLAGS = @JAVAFLAGS@
+JAVAPREFIX = @JAVAPREFIX@
+JAVA_JUNIT = @JAVA_JUNIT@
+JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
+JNIFLAGS = @JNIFLAGS@
+JUNIT = @JUNIT@
+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@
+MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+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@
+PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
+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@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+TESTS_JUNIT = @TESTS_JUNIT@
+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@
+UUDECODE = @UUDECODE@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+_ACJNI_JAVAC = @_ACJNI_JAVAC@
+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
+LIBH5JNI = $(top_builddir)/java/src/jni/libhdf5_java.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.
+
+# Temporary files. *.h5 are generated by h5repart_gentest. They should
+# copied to the testfiles/ directory if update is required. fst_family*.h5
+# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \
+ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 \
+ append.log
+SUBDIRS = vds
+
+#test scripts and programs
+TEST_PROG = h5repart_gentest h5clear_gentest talign
+TEST_SCRIPT = testh5repart.sh testh5mkgrp.sh testh5clear.sh
+check_SCRIPTS = $(TEST_SCRIPT)
+SCRIPT_DEPEND = ../../src/misc/h5repart$(EXEEXT) ../../src/misc/h5mkgrp$(EXEEXT) ../../src/misc/h5clear$(EXEEXT)
+
+# These were generated by configure. Remove them only when distclean.
+DISTCLEANFILES = testh5repart.sh testh5clear.sh
+
+# All programs rely on hdf5 library and h5tools library
+LDADD = $(LIBH5TOOLS) $(LIBHDF5)
+
+# Automake needs to be taught how to build lib, dyn, 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)
+
+DYN = $(dyn_LTLIBRARIES)
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+dyndir = $(libdir)
+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-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.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 tools/test/misc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tools/test/misc/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/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):
+testh5clear.sh: $(top_builddir)/config.status $(srcdir)/testh5clear.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+testh5mkgrp.sh: $(top_builddir)/config.status $(srcdir)/testh5mkgrp.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+testh5repart.sh: $(top_builddir)/config.status $(srcdir)/testh5repart.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clear_open_chk$(EXEEXT): $(clear_open_chk_OBJECTS) $(clear_open_chk_DEPENDENCIES) $(EXTRA_clear_open_chk_DEPENDENCIES)
+ @rm -f clear_open_chk$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(clear_open_chk_OBJECTS) $(clear_open_chk_LDADD) $(LIBS)
+
+h5clear_gentest$(EXEEXT): $(h5clear_gentest_OBJECTS) $(h5clear_gentest_DEPENDENCIES) $(EXTRA_h5clear_gentest_DEPENDENCIES)
+ @rm -f h5clear_gentest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(h5clear_gentest_OBJECTS) $(h5clear_gentest_LDADD) $(LIBS)
+
+h5repart_gentest$(EXEEXT): $(h5repart_gentest_OBJECTS) $(h5repart_gentest_DEPENDENCIES) $(EXTRA_h5repart_gentest_DEPENDENCIES)
+ @rm -f h5repart_gentest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(h5repart_gentest_OBJECTS) $(h5repart_gentest_LDADD) $(LIBS)
+
+repart_test$(EXEEXT): $(repart_test_OBJECTS) $(repart_test_DEPENDENCIES) $(EXTRA_repart_test_DEPENDENCIES)
+ @rm -f repart_test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(repart_test_OBJECTS) $(repart_test_LDADD) $(LIBS)
+
+talign$(EXEEXT): $(talign_OBJECTS) $(talign_DEPENDENCIES) $(EXTRA_talign_DEPENDENCIES)
+ @rm -f talign$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(talign_OBJECTS) $(talign_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_open_chk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5clear_gentest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5repart_gentest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repart_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/talign.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# 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 $(check_PROGRAMS) $(check_SCRIPTS)
+ @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 $$?
+h5repart_gentest.log: h5repart_gentest$(EXEEXT)
+ @p='h5repart_gentest$(EXEEXT)'; \
+ b='h5repart_gentest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+h5clear_gentest.log: h5clear_gentest$(EXEEXT)
+ @p='h5clear_gentest$(EXEEXT)'; \
+ b='h5clear_gentest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+talign.log: talign$(EXEEXT)
+ @p='talign$(EXEEXT)'; \
+ b='talign'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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 "$(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:
+
+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)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+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-recursive
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ check check-TESTS check-am clean clean-checkPROGRAMS \
+ clean-generic clean-libtool cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am
+
+.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
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-dyn: $(DYN)
+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 dyn 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/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
new file mode 100644
index 0000000..3a61385
--- /dev/null
+++ b/tools/test/misc/clear_open_chk.c
@@ -0,0 +1,71 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include "hdf5.h"
+#include "H5private.h"
+#include "h5tools.h"
+
+static void usage(void);
+
+static void
+usage(void)
+{
+ HDfprintf(stdout, "\n");
+ HDfprintf(stdout, "Usage error!\n");
+ HDfprintf(stdout, "Usage: clear_open_chk filename\n");
+} /* usage() */
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: To open the file which has zero or nonzero status_flags in
+ * the superblock.
+ *
+ * Return: 0 on success
+ * 1 on failure
+ *
+ * Programmer: Vailin Choi; July 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(int argc, char *argv[])
+{
+ char *fname; /* The HDF5 file name */
+ hid_t fid; /* File ID */
+
+ /* Check the # of arguments */
+ if(argc != 2) {
+ usage();
+ HDexit(EXIT_FAILURE);
+ }
+
+ /* Get the file name */
+ fname = HDstrdup(argv[1]);
+
+ /* Try opening the file */
+ if((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0) {
+ HDfprintf(stderr, "clear_open_chk: unable to open the file\n");
+ HDfree(fname);
+ HDexit(EXIT_FAILURE);
+ }
+ HDfree(fname);
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0) {
+ HDfprintf(stderr, "clear_open_chk: cannot close the file\n");
+ HDexit(EXIT_FAILURE);
+ }
+
+ /* Return success */
+ HDexit(EXIT_SUCCESS);
+} /* main() */
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
new file mode 100644
index 0000000..326109c
--- /dev/null
+++ b/tools/test/misc/h5clear_gentest.c
@@ -0,0 +1,277 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include "hdf5.h"
+#include "H5private.h"
+
+/* The HDF5 test files */
+const char *FILENAME[] = {
+ "h5clear_sec2_v3.h5", /* 0 -- sec2 file with superblock version 3 */
+ "h5clear_log_v3.h5", /* 1 -- log file with superblock veresion 3 */
+ "h5clear_sec2_v0.h5", /* 2 -- sec2 file with superblock version 0 */
+ "h5clear_sec2_v2.h5" /* 3 -- sec2 file with superblock version 2 */
+};
+
+#define KB 1024U
+
+#define CACHE_IMAGE_FILE "h5clear_mdc_image.h5"
+#define DSET "DSET"
+
+/*-------------------------------------------------------------------------
+ * Function: gen_cache_image_file
+ *
+ * Purpose: To create a file with cache image feature enabled.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Vailin Choi; March 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+gen_cache_image_file(const char *fname)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t did = -1, sid = -1; /* Dataset ID, dataspace ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hsize_t dims[2]; /* Dimension sizes */
+ hsize_t chunks[2]; /* Chunked dimension sizes */
+ int buf[50][100]; /* Buffer for data to write */
+ int i, j; /* Local index variables */
+ H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
+ { H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION,
+ TRUE, FALSE,
+ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+
+ /* Enable latest format in fapl */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+
+ /* Enable metadata cache image in fapl */
+ if(H5Pset_mdc_image_config(fapl, &cache_image_config) < 0)
+ goto error;
+
+ /* Create the file */
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Create dataspace */
+ dims[0] = 50;
+ dims[1] = 100;
+ if((sid = H5Screate_simple(2, dims, NULL)) < 0)
+ goto error;
+
+ /* Initialize buffer for writing to dataset */
+ for(i = 0; i < 50; i++)
+ for(j = 0; j < 100; j++)
+ buf[i][j] = i * j;
+
+ /* Set up to create a chunked dataset */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+ chunks[0] = 5;
+ chunks[1] = 10;
+ if(H5Pset_chunk(dcpl, 2, chunks) < 0)
+ goto error;
+ if((did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto error;
+
+ /* Closing */
+ if(H5Dclose(did) < 0)
+ goto error;
+ if(H5Pclose(dcpl) < 0)
+ goto error;
+ if(H5Pclose(fapl) < 0)
+ goto error;
+ if(H5Sclose(sid) < 0)
+ goto error;
+ if(H5Fclose(fid) < 0)
+ goto error;
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl);
+ H5Sclose(sid);
+ H5Dclose(did);
+ H5Fclose(fid);
+ H5Pclose(fapl);
+ H5Pclose(dcpl);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: To create HDF5 files with non-zero status_flags in the superblock
+ * via flushing and exiting without closing the library.
+ *
+ * Due to file locking, status_flags in the superblock will be
+ * nonzero after H5Fcreate. The library will clear status_flags
+ * on file closing. This program, after "H5Fcreate" the files,
+ * exits without going through library closing. Thus, status_flags
+ * for these files are not cleared.
+ * The library will check consistency of status_flags when opening
+ * a file with superblock >= v3 and will return error accordingly.
+ * The library will not check status_flags when opening a file
+ * with < v3 superblock.
+ *
+ * These files are used by "h5clear" to see if the tool clears
+ * status_flags properly so users can open the files afterwards.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Vailin Choi; July 2013
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fid; /* File ID */
+ hid_t fcpl; /* File creation property list */
+ hid_t fapl, new_fapl; /* File access property lists */
+ char fname[512]; /* File name */
+ unsigned new_format; /* To use latest library format or not */
+
+ /* Generate a file with cache image feature enabled */
+ if(gen_cache_image_file(CACHE_IMAGE_FILE) < 0)
+ goto error;
+
+ /*
+ * Generate files with invalid status_flags
+ */
+
+ /* Create a copy of the file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ goto error;
+
+ /* Copy the file access property list */
+ if((new_fapl = H5Pcopy(fapl)) < 0)
+ goto error;
+ /* Set to latest library format */
+ if(H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ goto error;
+
+ /* Files created within this for loop will have v3 superblock and nonzero status_flags */
+ for(new_format = FALSE; new_format <= TRUE; new_format++) {
+ hid_t fapl2, my_fapl; /* File access property lists */
+
+ /* Set to use the appropriate file access property list */
+ if(new_format)
+ fapl2 = new_fapl;
+ else
+ fapl2 = fapl;
+ /*
+ * Create a sec2 file
+ */
+ if((my_fapl = H5Pcopy(fapl2)) < 0)
+ goto error;
+ /* Create the file */
+ sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[0]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ goto error;
+
+ /* Flush the file */
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ goto error;
+
+ /* Close the property list */
+ if(H5Pclose(my_fapl) < 0)
+ goto error;
+
+ /*
+ * Create a log file
+ */
+ /* Create a copy of file access property list */
+ if((my_fapl = H5Pcopy(fapl2)) < 0)
+ goto error;
+
+ /* Setup the fapl for the log driver */
+ if(H5Pset_fapl_log(my_fapl, "append.log", (unsigned long long)H5FD_LOG_ALL, (size_t)(4 * KB)) < 0)
+ goto error;
+
+ /* Create the file */
+ sprintf(fname, "%s%s", new_format? "latest_":"", FILENAME[1]);
+ if((fid = H5Fcreate(fname, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT, my_fapl)) < 0)
+ goto error;
+
+ /* Flush the file */
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ goto error;
+
+ /* Close the property list */
+ if(H5Pclose(my_fapl) < 0)
+ goto error;
+
+ } /* end for */
+
+ /*
+ * Create a sec2 file with v0 superblock but nonzero status_flags
+ */
+ if((fid = H5Fcreate(FILENAME[2], H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ goto error;
+
+ /* Flush the file */
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ goto error;
+
+
+ /*
+ * Create a sec2 file with v2 superblock but nonzero status_flags
+ */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
+ goto error;
+ if(H5Pset_shared_mesg_nindexes(fcpl, 1) < 0)
+ goto error;
+ if(H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 50) < 0)
+ goto error;
+
+ if((fid = H5Fcreate(FILENAME[3], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
+ goto error;
+
+ /* Flush the file */
+ if(H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
+ goto error;
+
+
+ /* Close the property lists */
+ if(H5Pclose(fapl) < 0)
+ goto error;
+ if(H5Pclose(new_fapl) < 0)
+ goto error;
+ if(H5Pclose(fcpl) < 0)
+ goto error;
+
+ fflush(stdout);
+ fflush(stderr);
+
+ /* Not going through library closing by calling _exit(0) with success */
+ HD_exit(0);
+
+error:
+
+ /* Exit with failure */
+ HD_exit(1);
+}
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
new file mode 100644
index 0000000..3784278
--- /dev/null
+++ b/tools/test/misc/h5perf_gentest.c
@@ -0,0 +1,609 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*****************************************************************************
+ This test generates attributes, groups, and datasets of many types. It
+ creates a large number of attributes, groups, and datasets by specifying
+ -a, -g, -d options respectively. Using "-h" option to see details.
+
+ Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ ****************************************************************************/
+
+#include "hdf5.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+#define FNAME "test_perf.h5"
+#define NGROUPS 20
+#define NDSETS 20
+#define NATTRS 20
+#define DIM0 40
+#define NROWS 100
+#define NTYPES 9
+#define MAXVLEN 10
+#define FIXED_LEN 8
+
+typedef enum { SOLID=0, LIQUID, GAS, PLASMA } phase_t;
+
+typedef struct {
+ int i;
+ unsigned long long l;
+ float f;
+ double d;
+ char s[FIXED_LEN];
+ phase_t e;
+ float f_array[FIXED_LEN];
+ hvl_t i_vlen;
+ char *s_vlen;
+} test_comp_t;
+
+typedef struct {
+ int zipcode;
+ char *city;
+} zipcode_t;
+
+int add_attrs(hid_t oid, int idx);
+int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf) ;
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest);
+
+int main (int argc, char *argv[])
+{
+ char fname[32];
+ int i, ngrps=NGROUPS, ndsets=NDSETS, nattrs=NATTRS, dim0=DIM0,
+ chunk=DIM0/10+1, nrows=NROWS, vlen=MAXVLEN, l=0, z=0;
+
+ memset(fname, 0, 32);
+ for (i=1; i<argc; i++) {
+ if (strcmp(argv[i], "-f")==0)
+ strcpy(fname, argv[i+1]);
+ else if (strcmp(argv[i], "-g")==0)
+ ngrps = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-d")==0)
+ ndsets = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-a")==0)
+ nattrs = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-r")==0)
+ nrows = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-s")==0)
+ dim0 = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-c")==0)
+ chunk = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-v")==0)
+ vlen = atoi(argv[i+1]);
+ else if (strcmp(argv[i], "-l")==0)
+ l = 1;
+ else if (strcmp(argv[i], "-z")==0)
+ z = 1;
+ else if (strcmp(argv[i], "-h")==0) {
+ printf("\nOPTONS:\n");
+ printf("\t-f F:\tname of the test file (default: %s).\n", FNAME);
+ printf("\t-g N:\tnumber of top level groups (default: %d).\n", NGROUPS);
+ printf("\t-d N:\tnumber of datasets (default: %d).\n", NDSETS);
+ printf("\t-a N:\tnumber of attributes (default: %d).\n", NATTRS);
+ printf("\t-r N:\tnumber of rows in the large compound dataset (default: %d).\n", NROWS);
+ printf("\t-s N:\tsize of dim0 in datasets (default: %d).\n", DIM0);
+ printf("\t-c N:\tchunk size of dim0 (default: %d).\n", (DIM0/10+1));
+ printf("\t-v N:\tmax vlen size (default: %d).\n", MAXVLEN);
+ printf("\t-l:\tuse latest format (default: no).\n");
+ printf("\t-z:\tuse gzip compression (default: no).\n");
+ printf("\t-h:\tthis help information.\n");
+ printf("Example:\n");
+ printf("\t./a.out -f test.h5 -g 10000 -d 5000 -a 500 -r 10000 -s 200 -c 20 -v 40 -l -z\n\n");
+ exit(0);
+ }
+ }
+
+ if (strlen(fname)<=0)
+ sprintf(fname, FNAME);
+
+ create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows,
+ (hsize_t)dim0, (hsize_t)chunk, vlen, z, l);
+
+ return 0;
+}
+
+/*****************************************************************************
+ This function generates attributes, groups, and datasets of many types.
+
+ Parameters:
+ fname: file_name.
+ ngrps: number of top level groups.
+ ndsets: number of datasets.
+ attrs: number of attributes.
+ nrow: number of rows in a dataset.
+ chunk: chunk size (single number).
+ vlen: max vlen size.
+ comp: use latest format.
+ latest: use gzip comnpression.
+
+ Return: Non-negative on success/Negative on failure
+
+ Programmer: Peter Cao <xcao@hdfgroup.org>, Jan. 2013
+ ****************************************************************************/
+herr_t create_perf_test_file(const char *fname, int ngrps, int ndsets,
+ int nattrs, hsize_t nrows, hsize_t dim0, hsize_t chunk, int vlen,
+ int compressed, int latest)
+{
+ int i, j, k;
+ hid_t fid, sid_null, sid_scalar, sid_1d, sid_2d, did, aid, sid_2, sid_large,
+ fapl=H5P_DEFAULT, dcpl=H5P_DEFAULT, gid1, gid2, cmp_tid, tid_str,
+ tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s;
+ char name[32], tmp_name1[32], tmp_name2[32], tmp_name3[32];
+ hsize_t dims[1]={dim0}, dims2d[2]={dim0, (dim0/4+1)}, dims_array[1]={FIXED_LEN},
+ dim1[1]={2};
+ char *enum_names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"};
+ test_comp_t *buf_comp=NULL, *buf_comp_large=NULL;
+ int *buf_int=NULL;
+ float (*buf_float_a)[FIXED_LEN]=NULL;
+ double **buf_double2d=NULL;
+ hvl_t *buf_vlen_i=NULL;
+ char (*buf_str)[FIXED_LEN];
+ char **buf_vlen_s=NULL;
+ hobj_ref_t buf_ref[2];
+ hdset_reg_ref_t buf_reg_ref[2];
+ size_t offset, len;
+ herr_t status;
+ char *names[NTYPES] = { "int", "ulong", "float", "double", "fixed string",
+ "enum", "fixed float array", "vlen int array", "vlen strings"};
+ hid_t types[NTYPES] = { H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT,
+ H5T_NATIVE_DOUBLE, tid_str, tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s};
+ hsize_t coords[4][2] = { {0, 1}, {3, 5}, {1, 0}, {2, 4}}, start=0, stride=1, count=1;
+
+ if (nrows < NROWS) nrows = NROWS;
+ if (ngrps<NGROUPS) ngrps=NGROUPS;
+ if (ndsets<NDSETS) ndsets=NDSETS;
+ if (nattrs<NATTRS) nattrs=NATTRS;
+ if (dim0<DIM0) dim0=DIM0;
+ if (chunk>dim0) chunk=dim0/4;
+ if (chunk<1) chunk = 1;
+ if (vlen<1) vlen = MAXVLEN;
+
+ /* create fixed string datatype */
+ types[4] = tid_str = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid_str, FIXED_LEN);
+
+ /* create enum datatype */
+ types[5] = tid_enum = H5Tenum_create(H5T_NATIVE_INT);
+ for (i = (int) SOLID; i <= (int) PLASMA; i++) {
+ phase_t val = (phase_t) i;
+ status = H5Tenum_insert (tid_enum, enum_names[i], &val);
+ }
+
+ /* create float array datatype */
+ types[6] = tid_array_f = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims_array);
+
+ /* create variable length integer datatypes */
+ types[7] = tid_vlen_i = H5Tvlen_create (H5T_NATIVE_INT);
+
+ /* create variable length string datatype */
+ types[8] = tid_vlen_s = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid_vlen_s, H5T_VARIABLE);
+
+ /* create compound datatypes */
+ cmp_tid = H5Tcreate (H5T_COMPOUND, sizeof (test_comp_t));
+ offset = 0;
+ for (i=0; i<NTYPES-2; i++) {
+ H5Tinsert(cmp_tid, names[i], offset, types[i]);
+ offset += H5Tget_size(types[i]);
+ }
+
+ H5Tinsert(cmp_tid, names[7], offset, types[7]);
+ offset += sizeof (hvl_t);
+ H5Tinsert(cmp_tid, names[8], offset, types[8]);
+
+ /* create dataspace */
+ sid_1d = H5Screate_simple (1, dims, NULL);
+ sid_2d = H5Screate_simple (2, dims2d, NULL);
+ sid_2 = H5Screate_simple (1, dim1, NULL);
+ sid_large = H5Screate_simple (1, &nrows, NULL);
+ sid_null = H5Screate (H5S_NULL);
+ sid_scalar = H5Screate (H5S_SCALAR);
+
+ /* create fid access property */
+ fapl = H5Pcreate (H5P_FILE_ACCESS);
+ H5Pset_libver_bounds (fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
+
+ /* create dataset creation property */
+ dcpl = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* set dataset chunk */
+ if (chunk>0) {
+ H5Pset_chunk (dcpl, 1, &chunk);
+ }
+
+ /* set dataset compression */
+ if (compressed) {
+ if (chunk<=0) {
+ chunk = dim0/10+1;;
+ H5Pset_chunk (dcpl, 1, &chunk);
+ }
+ H5Pset_shuffle (dcpl);
+ H5Pset_deflate (dcpl, 6);
+ }
+
+ /* allocate buffers */
+ buf_comp = (test_comp_t *)calloc(dim0, sizeof(test_comp_t));
+ buf_comp_large = (test_comp_t *)calloc(nrows, sizeof(test_comp_t));
+ buf_int = (int *)calloc(dim0, sizeof(int));
+ buf_float_a = malloc(dim0*sizeof(*buf_float_a));
+ buf_vlen_i = (hvl_t *)calloc(dim0, sizeof (hvl_t));
+ buf_vlen_s = (char **)calloc(dim0, sizeof(char *));
+ buf_str = malloc(dim0*sizeof (*buf_str));
+
+ /* allocate array of doulbe pointers */
+ buf_double2d = (double **)calloc(dims2d[0],sizeof(double *));
+ /* allocate a contigous chunk of memory for the data */
+ buf_double2d[0] = (double *)calloc( dims2d[0]*dims2d[1],sizeof(double) );
+ /* assign memory city to pointer array */
+ for (i=1; i <dims2d[0]; i++) buf_double2d[i] = buf_double2d[0]+i*dims2d[1];
+
+ /* fill buffer values */
+ len = 1;
+ for (i=0; i<dims[0]; i++) {
+ buf_comp[i].i = buf_int[i] = i-2147483648;
+ buf_comp[i].l = 0xffffffffffffffff-i;
+ buf_comp[i].f = 1.0/(i+1.0);
+ buf_comp[i].d = 987654321.0*i+1.0/(i+1.0);
+ buf_comp[i].e = (phase_t) (i % (int) (PLASMA + 1));
+
+ for (j=0; j<FIXED_LEN; j++) {
+ buf_comp[i].f_array[j] = buf_float_a[i][j] = i*100+j;
+ buf_str[i][j] = 'a' + (i%26);
+ }
+ buf_str[i][FIXED_LEN-1] = 0;
+ strcpy(buf_comp[i].s, buf_str[i]);
+
+ len = (1-cos(i/8.0))/2*vlen+1;
+ if (!i) len = vlen;
+ buf_vlen_i[i].len = len;
+ buf_vlen_i[i].p = (int *)calloc(len, sizeof(int));
+ for (j=0; j<len; j++) ((int*)(buf_vlen_i[i].p))[j] = i*100+j;
+ buf_comp[i].i_vlen = buf_vlen_i[i];
+
+ buf_vlen_s[i] = (char *)calloc(len, sizeof(char));
+ for (j=0; j<len-1; j++)
+ buf_vlen_s[i][j] = j%26+'A';
+ buf_comp[i].s_vlen = buf_vlen_s[i];
+
+ for (j=0; j<dims2d[1]; j++)
+ buf_double2d[i][j] = i+j/10000.0;
+ }
+
+ for (i=0; i<nrows; i++) {
+ buf_comp_large[i].i = i-2147483648;
+ buf_comp_large[i].l = 0xffffffffffffffff-i;
+ buf_comp_large[i].f = 1.0/(i+1.0);
+ buf_comp_large[i].d = 987654321.0*i+1.0/(i+1.0);
+ buf_comp_large[i].e = (phase_t) (i % (int) (PLASMA + 1));
+ for (j=0; j<FIXED_LEN-1; j++) {
+ buf_comp_large[i].f_array[j] = i*100+j;
+ buf_comp_large[i].s[j] = 'a' + (i%26);
+ }
+ len = i%vlen+1;
+ buf_comp_large[i].i_vlen.len = len;
+ buf_comp_large[i].i_vlen.p = (int *)calloc(len, sizeof(int));
+ for (j=0; j<len; j++) ((int*)(buf_comp_large[i].i_vlen.p))[j] = i*100+j;
+ buf_comp_large[i].s_vlen = (char *)calloc(i+2, sizeof(char));
+ for (j=0; j<i+1; j++) (buf_comp_large[i].s_vlen)[j] = j%26+'A';
+ }
+
+ /* create file */
+ if (latest)
+ fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ else
+ fid = H5Fcreate (fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(fid, 0);
+
+ sprintf(name, "a cmp ds of %d rows", nrows);
+ did = H5Dcreate (fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
+ add_attrs(did, 0);
+ H5Dclose(did);
+
+ // /* add attributes*/
+ gid1 = H5Gcreate (fid, "attributes", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (nattrs<1) nattrs = 1;
+ i=0;
+ while (i<nattrs) i += add_attrs(gid1, i);
+ H5Gclose(gid1);
+
+ /* add many sub groups to a group*/
+ gid1 = H5Gcreate (fid, "groups", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(gid1, 0);
+ for (i=0; i<ngrps; i++) {
+ /* create sub groups */
+ sprintf(name, "g%02d", i);
+ gid2 = H5Gcreate (gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (i<10) add_attrs(gid2, 0);
+ H5Gclose(gid2);
+ }
+ H5Gclose(gid1);
+
+ /* add many datasets to a group */
+ gid1 = H5Gcreate (fid, "datasets", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ add_attrs(gid1, 0);
+ for (j=0; j<ndsets; j+=12) {
+ /* 1 add a null dataset */
+ sprintf(name, "%05d null dataset", j);
+ did = H5Dcreate (gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 2 add scalar int point */
+ sprintf(name, "%05d scalar int point", j);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 3 scalar vlen string */
+ sprintf(name, "%05d scalar vlen string", j);
+ did = H5Dcreate (gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 4 add fixed-length float array */
+ sprintf(name, "%05d fixed-length float array", j);
+ did = H5Dcreate (gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 5 add fixed-length strings */
+ sprintf(name, "%05d fixed-length strings", j);
+ did = H5Dcreate (gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 6 add compound data */
+ sprintf(name, "%05d compund data", j);
+ did = H5Dcreate (gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 7 add 2D double */
+ sprintf(name, "%05d 2D double", j);
+ strcpy (tmp_name1, name);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 8 add 1D int array */
+ sprintf(name, "%05d 1D int array", j);
+ did = H5Dcreate (gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 9 add vlen int array */
+ sprintf(name, "%05d vlen int array", j);
+ strcpy (tmp_name2, name);
+ did = H5Dcreate (gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 10 add vlen strings */
+ sprintf(name, "%05d vlen strings", j);
+ strcpy (tmp_name3, name);
+ did = H5Dcreate (gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ H5Dwrite (did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 11 add object refs */
+ H5Rcreate(&buf_ref[0],gid1, ".", H5R_OBJECT, (hid_t)-1);
+ H5Rcreate(&buf_ref[1],gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
+ sprintf(name, "%05d obj refs", j);
+ did = H5Dcreate (gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+
+ /* 12 add region refs */
+ H5Sselect_elements (sid_2d, H5S_SELECT_SET, 4, coords[0]);
+ H5Rcreate(&buf_reg_ref[0],gid1, tmp_name1, H5R_DATASET_REGION, sid_2d);
+ H5Sselect_none(sid_2d);
+ count = dims[0]/2+1;
+ H5Sselect_hyperslab (sid_1d, H5S_SELECT_SET, &start, &stride, &count,NULL);
+ H5Rcreate(&buf_reg_ref[1],gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
+ H5Sselect_none(sid_1d);
+ sprintf(name, "%05d region refs", j);
+ did = H5Dcreate (gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite (did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
+ if (!j) add_attrs(did, j);
+ H5Dclose(did);
+ }
+ H5Gclose(gid1);
+
+ H5Tclose (tid_array_f);
+ H5Tclose (tid_vlen_i);
+ H5Tclose (tid_vlen_s);
+ H5Tclose (tid_enum);
+ H5Tclose (tid_str);
+ H5Tclose (cmp_tid);
+ H5Pclose (dcpl);
+ H5Pclose (fapl);
+ H5Sclose (sid_1d);
+ H5Sclose (sid_2d);
+ H5Sclose (sid_2);
+ H5Sclose (sid_large);
+ H5Sclose (sid_null);
+ H5Sclose (sid_scalar);
+ H5Fclose (fid);
+
+ for (i=0; i<dims[0]; i++) {
+ if (buf_vlen_i[i].p) free(buf_vlen_i[i].p);
+ if (buf_vlen_s[i]) free(buf_vlen_s[i]);
+ }
+
+ for (i=0; i<nrows; i++) {
+ if (buf_comp_large[i].i_vlen.p) free(buf_comp_large[i].i_vlen.p);
+ if (buf_comp_large[i].s_vlen) free(buf_comp_large[i].s_vlen);
+ }
+
+ free (buf_comp);
+ free (buf_comp_large);
+ free (buf_int);
+ free (buf_float_a);
+ free (buf_double2d[0]);
+ free (buf_double2d);
+ free (buf_str);
+ free(buf_vlen_i);
+ free(buf_vlen_s);
+
+ return 0;
+}
+
+/* add a single attribute */
+int add_attr(hid_t oid, const char *name, hid_t tid, hid_t sid, void *buf)
+{
+ hid_t aid;
+
+ aid = H5Acreate (oid, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ if (aid <0)
+ return 0;
+
+ H5Awrite(aid, tid, buf);
+
+ H5Aclose(aid);
+
+ return 1;
+}
+
+/*
+ adds different types of attributes to an object.
+
+ returns the number of attributes added to the objects.
+ */
+int add_attrs(hid_t oid, int idx)
+{
+ char name[32];
+ int i0, i1, i2, j, nattrs=0;
+ hid_t aid, tid, tid1, sid;
+ hvl_t i_vlen[4];
+ hobj_ref_t ref;
+ zipcode_t cmp_data[4];
+ unsigned int i = 0xffffffff;
+ long long l = -2147483647;
+ float f = 123456789.987654321;
+ double d = 987654321.123456789;
+ char *s[7] = {"Parting", "is such", "sweeter", "sorrow."};
+ float f_array[4] = {1.0, 2.22, 3.333, 4.444};
+ char *s_vlen[4] = {"Parting", "is such", "sweet", "sorrow."};
+ hsize_t dims1[1]={1}, dims2[1]={4}, dims3[2]={3,5};
+ int int3d[4][3][5];
+ size_t offset = 0;
+
+ for (i0=0; i0<4; i0++) {
+ i_vlen[i0].len = (i0+1);
+ i_vlen[i0].p = (int *)calloc(i_vlen[i0].len, sizeof(int));
+ for (j=0; j<i_vlen[i0].len; j++)
+ ((int *)i_vlen[i0].p)[j] = i0*100+j;
+ for (i1=0; i1<3; i1++) {
+ for (i2=0; i2<5; i2++)
+ int3d[i0][i1][i2] = i0*i1-i1*i2+i0*i2;
+ }
+ }
+
+ cmp_data[0].zipcode = 01001;
+ cmp_data[0].city = "Agawam, Massachusetts";
+ cmp_data[1].zipcode = 99950;
+ cmp_data[1].city = "Ketchikan, Alaska";
+ cmp_data[2].zipcode = 00501;
+ cmp_data[2].city = "Holtsville, New York";
+ cmp_data[3].zipcode = 61820;
+ cmp_data[3].city = "Champaign, Illinois";
+
+ /* 1 scalar point */
+ sid = H5Screate (H5S_SCALAR);
+ sprintf(name, "%05d scalar int", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
+ sprintf(name, "%05d scalar ulong", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
+ sprintf(name, "%05d scalar str", idx);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, H5T_VARIABLE);
+ nattrs += add_attr(oid, name, tid, sid, &s[2]);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 4 single point */
+ sid = H5Screate_simple (1, dims1, NULL);
+ H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1);
+ sprintf(name, "%05d single float", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
+ sprintf(name, "%05d single double", idx);
+ nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
+ sprintf(name, "%05d single obj_ref", idx);
+ nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
+ H5Sclose(sid);
+
+ /* 7 fixed length 1D array */
+ sid = H5Screate_simple (1, dims1, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_FLOAT, 1, dims2);
+ sprintf(name, "%05d array float", idx);
+ nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
+ H5Tclose(tid);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, strlen(s[0])+1);
+ tid1 = H5Tarray_create (tid, 1, dims2);
+ sprintf(name, "%05d array str", idx);
+ nattrs += add_attr(oid, name, tid1, sid, s);
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 9 fixed length 2D int arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tarray_create (H5T_NATIVE_INT, 2, dims3);
+ sprintf(name, "%05d array int 2D", idx);
+ nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 10 variable length arrays */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid, H5T_VARIABLE);
+ sprintf(name, "%05d vlen strings", idx);
+ nattrs += add_attr(oid, name, tid, sid, s_vlen);
+ H5Tclose(tid);
+ tid = H5Tvlen_create (H5T_NATIVE_INT);;
+ sprintf(name, "%05d vlen int array", idx);
+ nattrs += add_attr(oid, name, tid, sid, i_vlen);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ /* 12 compound data */
+ sid = H5Screate_simple (1, dims2, NULL);
+ tid = H5Tcreate (H5T_COMPOUND, sizeof (zipcode_t));
+ tid1 = H5Tcopy (H5T_C_S1);
+ H5Tset_size (tid1, H5T_VARIABLE);
+ H5Tinsert (tid, "zip code", 0, H5T_NATIVE_INT); offset += sizeof(H5T_NATIVE_INT);
+ H5Tinsert (tid, "City", offset, tid1); offset += sizeof(char *);
+ sprintf(name, "%05d compound data", idx);
+ nattrs += add_attr(oid, name, tid, sid, cmp_data);
+ H5Tclose(tid1);
+ H5Tclose(tid);
+ H5Sclose(sid);
+
+ for (i0=0; i0<4; i0++)
+ free(i_vlen[i0].p);
+
+ return nattrs;
+}
diff --git a/tools/test/misc/h5repart_gentest.c b/tools/test/misc/h5repart_gentest.c
new file mode 100644
index 0000000..5c1ff87
--- /dev/null
+++ b/tools/test/misc/h5repart_gentest.c
@@ -0,0 +1,99 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * June 1, 2005
+ *
+ * Purpose: Generate a family file of 1024 bytes for each member
+ * for h5repart test.
+ */
+#include "hdf5.h"
+#include "H5private.h"
+
+#define FAMILY_NUMBER 4
+#define FAMILY_SIZE 1024
+#define FILENAME "family_file%05d.h5"
+
+static int buf[FAMILY_NUMBER][FAMILY_SIZE];
+
+int main(void)
+{
+ hid_t file=(-1), fapl, space=(-1), dset=(-1);
+ char dname[]="dataset";
+ int i, j;
+ hsize_t dims[2]={FAMILY_NUMBER, FAMILY_SIZE};
+
+ /* Set property list and file name for FAMILY driver */
+ if ((fapl=H5Pcreate(H5P_FILE_ACCESS)) < 0) {
+ perror ("H5Pcreate");
+ exit (EXIT_FAILURE);
+ }
+
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
+ perror ("H5Pset_fapl_family");
+ exit (EXIT_FAILURE);
+ }
+
+ if((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
+ perror("H5Fcreate");
+ exit(EXIT_FAILURE);
+ }
+
+ /* Create and write dataset */
+ if((space = H5Screate_simple(2, dims, NULL)) < 0) {
+ perror("H5Screate_simple");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ perror("H5Dcreate2");
+ exit(EXIT_FAILURE);
+ }
+
+
+ for(i = 0; i<FAMILY_NUMBER; i++)
+ for(j = 0; j<FAMILY_SIZE; j++)
+ buf[i][j] = i * 10000 + j;
+
+ if(H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
+ perror("H5Dwrite");
+ exit(EXIT_FAILURE);
+ }
+
+
+ if(H5Sclose(space) < 0) {
+ perror ("H5Sclose");
+ exit (EXIT_FAILURE);
+ }
+
+ if(H5Dclose(dset) < 0) {
+ perror ("H5Dclose");
+ exit (EXIT_FAILURE);
+ }
+
+ if(H5Pclose(fapl) < 0) {
+ perror ("H5Pclose");
+ exit (EXIT_FAILURE);
+ }
+
+ if(H5Fclose(file) < 0) {
+ perror ("H5Fclose");
+ exit (EXIT_FAILURE);
+ }
+
+ puts(" PASSED"); fflush(stdout);
+
+ return 0;
+}
diff --git a/tools/test/misc/repart_test.c b/tools/test/misc/repart_test.c
new file mode 100644
index 0000000..372f46a
--- /dev/null
+++ b/tools/test/misc/repart_test.c
@@ -0,0 +1,163 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * June 1, 2005
+ *
+ * Purpose: This program tests family files after being repartitioned
+ * by h5repart. It simply tries to reopen the files with
+ * correct family driver and member size.
+ */
+#include "hdf5.h"
+
+#define KB 1024
+#define FAMILY_H5REPART_SIZE1 20000
+#define FAMILY_H5REPART_SIZE2 (5*KB)
+#define MAX(a,b) (a>b ? a:b)
+
+const char *FILENAME[] = {
+ "fst_family%05d.h5",
+ "scd_family%05d.h5",
+ "family_to_sec2.h5",
+ NULL
+};
+
+herr_t test_family_h5repart_opens(void);
+herr_t test_sec2_h5repart_opens(void);
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_family_h5repart_opens
+ *
+ * Purpose: Tries to reopen family files.
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * June 1, 2005
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+herr_t
+test_family_h5repart_opens(void)
+{
+ hid_t file=(-1), fapl=(-1);
+
+ /* open 1st file(single member file) with correct family size(20000 byte) */
+ if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
+ goto error;
+
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0)
+ goto error;
+
+ if((file=H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl))<0)
+ goto error;
+
+ if(H5Fclose(file)<0)
+ goto error;
+
+ /* open 2nd file(multiple member files) with correct family size(5KB) */
+ if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE2, H5P_DEFAULT)<0)
+ goto error;
+
+ if((file=H5Fopen(FILENAME[1], H5F_ACC_RDWR, fapl))<0)
+ goto error;
+
+ if(H5Fclose(file)<0)
+ goto error;
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_sec2_h5repart_opens
+ *
+ * Purpose: Tries to reopen a sec2 file.
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * June 21, 2005
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+herr_t
+test_sec2_h5repart_opens(void)
+{
+ hid_t file=(-1);
+
+ /* open the sec2 file */
+ if((file=H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT))<0)
+ goto error;
+
+ if(H5Fclose(file)<0)
+ goto error;
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests h5repart-ed family files
+ *
+ * Return: Success: exit(0)
+ *
+ * Failure: exit(1)
+ *
+ * Programmer: Raymond Lu
+ * June 1, 2005
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ int nerrors=0;
+
+ nerrors += test_family_h5repart_opens()<0 ?1:0;
+ nerrors += test_sec2_h5repart_opens()<0 ?1:0;
+
+ if (nerrors) goto error;
+
+ return 0;
+
+error:
+ nerrors = MAX(1, nerrors);
+ printf("***** %d FAMILY FILE TEST%s FAILED! *****\n",
+ nerrors, 1 == nerrors ? "" : "S");
+ return 1;
+}
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
new file mode 100644
index 0000000..7ca1f92
--- /dev/null
+++ b/tools/test/misc/talign.c
@@ -0,0 +1,242 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Small program to illustrate the "misalignment" of members within a compound
+ * datatype, in a datatype fixed by H5Tget_native_type().
+ */
+#include <string.h>
+#include <stdlib.h>
+/*#include <unistd.h> *//* Required for unlink() */
+
+#include "hdf5.h"
+#include "H5private.h"
+#include "h5tools.h"
+
+const char *fname = "talign.h5";
+const char *setname = "align";
+
+/*
+ * This program assumes that there is no extra space between the members 'Ok'
+ * and 'Not Ok', (there shouldn't be because they are of the same atomic type
+ * H5T_NATIVE_FLOAT, and they are placed within the compound next to one
+ * another per construction)
+ */
+
+int main(void)
+{
+ hid_t fil=-1, spc=-1, set=-1;
+ hid_t cs6=-1, cmp=-1, fix=-1;
+ hid_t cmp1=-1, cmp2=-1, cmp3=-1;
+ hid_t plist=-1;
+ hid_t array_dt=-1;
+
+ hsize_t dim[2];
+ hsize_t cdim[4];
+
+ char string5[5];
+ float fok[2] = {1234.0f, 2341.0f};
+ float fnok[2] = {5678.0f, 6785.0f};
+ float *fptr = NULL;
+
+ char *data = NULL;
+
+ int result = 0;
+ herr_t error = 1;
+
+ printf("%-70s", "Testing alignment in compound datatypes");
+
+ strcpy(string5, "Hi!");
+ HDunlink(fname);
+ fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ if (fil < 0) {
+ puts("*FAILED*");
+ return 1;
+ }
+
+ H5E_BEGIN_TRY {
+ (void)H5Ldelete(fil, setname, H5P_DEFAULT);
+ } H5E_END_TRY;
+
+ cs6 = H5Tcopy(H5T_C_S1);
+ H5Tset_size(cs6, sizeof(string5));
+ H5Tset_strpad(cs6, H5T_STR_NULLPAD);
+
+ cmp = H5Tcreate(H5T_COMPOUND, sizeof(fok) + sizeof(string5) + sizeof(fnok));
+ H5Tinsert(cmp, "Awkward length", 0, cs6);
+
+ cdim[0] = sizeof(fok) / sizeof(float);
+ array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim);
+ H5Tinsert(cmp, "Ok", sizeof(string5), array_dt);
+ H5Tclose(array_dt);
+
+ cdim[0] = sizeof(fnok) / sizeof(float);
+ array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim);
+ H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt);
+ H5Tclose(array_dt);
+
+ fix = h5tools_get_native_type(cmp);
+
+ cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok));
+
+ cdim[0] = sizeof(fok) / sizeof(float);
+ array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim);
+ H5Tinsert(cmp1, "Ok", 0, array_dt);
+ H5Tclose(array_dt);
+
+ cmp2 = H5Tcreate(H5T_COMPOUND, sizeof(string5));
+ H5Tinsert(cmp2, "Awkward length", 0, cs6);
+
+ cmp3 = H5Tcreate(H5T_COMPOUND, sizeof(fnok));
+
+ cdim[0] = sizeof(fnok) / sizeof(float);
+ array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim);
+ H5Tinsert(cmp3, "Not Ok", 0, array_dt);
+ H5Tclose(array_dt);
+
+ plist = H5Pcreate(H5P_DATASET_XFER);
+ if((error = H5Pset_preserve(plist, 1)) < 0)
+ goto out;
+
+ /*
+ * Create a small dataset, and write data into it we write each field
+ * in turn so that we are avoid alignment issues at this point
+ */
+ dim[0] = 1;
+ spc = H5Screate_simple(1, dim, NULL);
+ set = H5Dcreate2(fil, setname, cmp, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ H5Dwrite(set, cmp1, spc, H5S_ALL, plist, fok);
+ H5Dwrite(set, cmp2, spc, H5S_ALL, plist, string5);
+ H5Dwrite(set, cmp3, spc, H5S_ALL, plist, fnok);
+
+ H5Dclose(set);
+
+ /* Now open the set, and read it back in */
+ data = (char *)HDmalloc(H5Tget_size(fix));
+
+ if(!data) {
+ perror("malloc() failed");
+ abort();
+ }
+
+ set = H5Dopen2(fil, setname, H5P_DEFAULT);
+
+ H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ H5Dclose(set);
+
+out:
+ if(error < 0) {
+ result = 1;
+ puts("*FAILED - HDF5 library error*");
+ } else if(!(H5_FLT_ABS_EQUAL(fok[0], fptr[0]))
+ || !(H5_FLT_ABS_EQUAL(fok[1], fptr[1]))
+ || !(H5_FLT_ABS_EQUAL(fnok[0], fptr[2]))
+ || !(H5_FLT_ABS_EQUAL(fnok[1], fptr[3]))) {
+ char *mname;
+
+ result = 1;
+ mname = H5Tget_member_name(fix, 0);
+ printf("%14s (%2d) %6s = %s\n",
+ mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0),
+ string5, (char *)(data + H5Tget_member_offset(fix, 0)));
+ if(mname)
+ H5free_memory(mname);
+
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ mname = H5Tget_member_name(fix, 1);
+ printf("Data comparison:\n"
+ "%14s (%2d) %6f = %f\n"
+ " %6f = %f\n",
+ mname ? mname : "(null)", (int)H5Tget_member_offset(fix,1),
+ (double)fok[0], (double)fptr[0],
+ (double)fok[1], (double)fptr[1]);
+ if(mname)
+ H5free_memory(mname);
+
+ fptr = (float *)(data + H5Tget_member_offset(fix, 2));
+ mname = H5Tget_member_name(fix, 2);
+ printf("%14s (%2d) %6f = %f\n"
+ " %6f = %6f\n",
+ mname ? mname : "(null)", (int)H5Tget_member_offset(fix,2),
+ (double)fnok[0], (double)fptr[0],
+ (double)fnok[1], (double)fptr[1]);
+ if(mname)
+ H5free_memory(mname);
+
+ fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ printf("\n"
+ "Short circuit\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %6f = %f\n"
+ " %6f = %f\n",
+ (double)fok[0], (double)fptr[0],
+ (double)fok[1], (double)fptr[1],
+ (double)fnok[0], (double)fptr[2],
+ (double)fnok[1], (double)fptr[3]);
+ puts("*FAILED - compound type alignmnent problem*");
+ } else {
+ puts(" PASSED");
+ }
+
+ if(data)
+ HDfree(data);
+ H5Sclose(spc);
+ H5Tclose(cs6);
+ H5Tclose(cmp);
+ H5Tclose(fix);
+ H5Tclose(cmp1);
+ H5Tclose(cmp2);
+ H5Tclose(cmp3);
+ H5Pclose(plist);
+ H5Fclose(fil);
+ HDunlink(fname);
+ fflush(stdout);
+ return result;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: h5tools_get_native_type
+ *
+ * Purpose: Wrapper around H5Tget_native_type() to work around
+ * Problems with bitfields.
+ *
+ * Return: Success: datatype ID
+ *
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, October 5, 2004
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+h5tools_get_native_type(hid_t type)
+{
+ hid_t p_type;
+ H5T_class_t type_class;
+
+ type_class = H5Tget_class(type);
+ if(type_class==H5T_BITFIELD)
+ p_type=H5Tcopy(type);
+ else
+ p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+
+ return(p_type);
+}
+
diff --git a/tools/test/misc/testfiles/h5clear_log_v3.h5 b/tools/test/misc/testfiles/h5clear_log_v3.h5
new file mode 100644
index 0000000..aed33a4
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_log_v3.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/h5clear_mdc_image.h5 b/tools/test/misc/testfiles/h5clear_mdc_image.h5
new file mode 100644
index 0000000..6ed8b70
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_mdc_image.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/h5clear_missing_file.ddl b/tools/test/misc/testfiles/h5clear_missing_file.ddl
new file mode 100644
index 0000000..1e5150c
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_missing_file.ddl
@@ -0,0 +1,15 @@
+usage: h5clear [OPTIONS] file_name
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -V, --version Print version number and exit
+ -s, --status Clear the status_flags field in the file's superblock
+ -m, --image Remove the metadata cache image from the file
+
+Examples of use:
+
+h5clear -s file_name
+ Clear the status_flags field in the superblock of the HDF5 file <file_name>.
+
+h5clear -m file_name
+ Remove the metadata cache image from the HDF5 file <file_name>.
+h5clear error: missing file name
diff --git a/tools/test/misc/testfiles/h5clear_no_mdc_image.ddl b/tools/test/misc/testfiles/h5clear_no_mdc_image.ddl
new file mode 100644
index 0000000..f5acd71
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_no_mdc_image.ddl
@@ -0,0 +1 @@
+h5clear warning: No cache image in the file
diff --git a/tools/test/misc/testfiles/h5clear_open_fail.ddl b/tools/test/misc/testfiles/h5clear_open_fail.ddl
new file mode 100644
index 0000000..895ecd4
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_open_fail.ddl
@@ -0,0 +1 @@
+h5clear error: h5tools_fopen
diff --git a/tools/test/misc/testfiles/h5clear_sec2_v0.h5 b/tools/test/misc/testfiles/h5clear_sec2_v0.h5
new file mode 100644
index 0000000..571fd46
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_sec2_v0.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/h5clear_sec2_v2.h5 b/tools/test/misc/testfiles/h5clear_sec2_v2.h5
new file mode 100644
index 0000000..92833e6
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_sec2_v2.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/h5clear_sec2_v3.h5
new file mode 100644
index 0000000..9f1e6ce
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_sec2_v3.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/h5clear_usage.ddl b/tools/test/misc/testfiles/h5clear_usage.ddl
new file mode 100644
index 0000000..a399ae7
--- /dev/null
+++ b/tools/test/misc/testfiles/h5clear_usage.ddl
@@ -0,0 +1,14 @@
+usage: h5clear [OPTIONS] file_name
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -V, --version Print version number and exit
+ -s, --status Clear the status_flags field in the file's superblock
+ -m, --image Remove the metadata cache image from the file
+
+Examples of use:
+
+h5clear -s file_name
+ Clear the status_flags field in the superblock of the HDF5 file <file_name>.
+
+h5clear -m file_name
+ Remove the metadata cache image from the HDF5 file <file_name>.
diff --git a/tools/test/misc/testfiles/h5mkgrp_help.txt b/tools/test/misc/testfiles/h5mkgrp_help.txt
new file mode 100644
index 0000000..ba130f6
--- /dev/null
+++ b/tools/test/misc/testfiles/h5mkgrp_help.txt
@@ -0,0 +1,7 @@
+usage: h5mkgrp [OPTIONS] FILE GROUP...
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -l, --latest Use latest version of file format to create groups
+ -p, --parents No error if existing, make parent groups as needed
+ -v, --verbose Print information about OBJECTS and OPTIONS
+ -V, --version Print version number and exit
diff --git a/tools/test/misc/testfiles/h5mkgrp_version.txt.in b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
new file mode 100644
index 0000000..75c13a5
--- /dev/null
+++ b/tools/test/misc/testfiles/h5mkgrp_version.txt.in
@@ -0,0 +1 @@
+h5mkgrp: Version @HDF5_PACKAGE_VERSION_STRING@
diff --git a/tools/test/misc/testfiles/latest_h5clear_log_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5
new file mode 100644
index 0000000..da5c426
--- /dev/null
+++ b/tools/test/misc/testfiles/latest_h5clear_log_v3.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5 b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5
new file mode 100644
index 0000000..e511248
--- /dev/null
+++ b/tools/test/misc/testfiles/latest_h5clear_sec2_v3.h5
Binary files differ
diff --git a/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5 b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5
new file mode 100644
index 0000000..310134b
--- /dev/null
+++ b/tools/test/misc/testfiles/mod_h5clear_mdc_image.h5
Binary files differ
diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in
new file mode 100644
index 0000000..2966b2c
--- /dev/null
+++ b/tools/test/misc/testh5clear.sh.in
@@ -0,0 +1,338 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tests for the h5clear tool
+#
+srcdir=@srcdir@
+TESTNAME=h5clear
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+H5CLEAR=../../src/misc/h5clear # The tool name
+H5CLEAR_BIN=`pwd`/$H5CLEAR # The path of the tool binary
+
+OPENCHK=clear_open_chk # Program to check whether the file can be opened
+OPENCHK_BIN=`pwd`/$OPENCHK # The path to the binary
+
+RM='rm -rf'
+CMP='cmp -s'
+DIFF='diff -c'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+SUCCEED=0
+FAIL=1
+
+nerrors=0
+verbose=yes
+
+# source dirs
+SRC_TOOLS="$srcdir/../.."
+
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+# testfiles source dirs for tools
+SRC_H5CLEAR_TESTFILES="$SRC_TOOLS/test/misc/testfiles"
+
+TESTDIR=./testh5clear
+test -d $TESTDIR || mkdir -p $TESTDIR
+
+######################################################################
+# test files
+# --------------------------------------------------------------------
+# All the test files copy from source directory to test directory
+# NOTE: Keep this framework to add/remove test files.
+# Any test files from other tools can be used in this framework.
+# This list are also used for checking exist.
+# Comment '#' without space can be used.
+# --------------------------------------------------------------------
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="
+$SRC_H5CLEAR_TESTFILES/h5clear_usage.ddl
+$SRC_H5CLEAR_TESTFILES/h5clear_open_fail.ddl
+$SRC_H5CLEAR_TESTFILES/h5clear_missing_file.ddl
+$SRC_H5CLEAR_TESTFILES/h5clear_no_mdc_image.ddl
+$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5
+$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5
+$SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5
+$SRC_H5CLEAR_TESTFILES/h5clear_log_v3.h5
+$SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5
+$SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5
+$SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5
+$SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5
+"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
+}
+
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=$SRC_H5CLEAR_TESTFILES
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $RM $TESTDIR
+ fi
+}
+
+#
+#
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# $1 is the expected output
+# $2 is the output from testing
+COMPARE_OUT() {
+ if $CMP $1 $2; then
+ echo "PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+}
+
+#
+#
+#
+# Run h5clear and verify the expected output
+# $1: the test file name
+# $2: option 1 passed to the tool
+# $3: option 2 passed to the tool
+# $4: the expected output
+TOOLTEST_OUT() {
+ fname=$1
+ option1=$2
+ option2=$3
+ expected=$4
+ # Prepare expected and actual output
+ expect="$TESTDIR/$expected"
+ actual="$TESTDIR/`basename $expected .ddl`.out"
+ actual_err="$TESTDIR/`basename $expected .ddl`.err"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+
+ # Run test.
+ TESTING $H5CLEAR $option1 $option2 $fname
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname
+ ) >$actual 2>$actual_err
+ cp $actual $actual_sav
+ cp $actual_err $actual_err_sav
+ cat $actual_err >> $actual
+
+ # Compare output
+ COMPARE_OUT $expect $actual
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ $RM $actual $actual_err $actual_sav $actual_err_sav
+ fi
+}
+
+# $1 is the filename to open
+# $2 is the expected return from the open/check program
+OPEN_CHK() {
+ fname=$1
+ expected=$2
+ (
+ cd $TESTDIR
+ $OPENCHK_BIN $fname 2>/dev/null
+ )
+ actual=$?
+ if test $actual -ne $expected; then
+ echo "Unexpected return from $OPENCHK"
+ nerrors=`expr $nerrors + 1`
+ fi
+}
+
+# Run h5clear and verify the expected exit code
+# $1 is the filename to open
+# $2 is option 1
+# $3 is option 2
+# $4 is the expected exit code from the tool
+TOOLTEST() {
+ fname=$1
+ option1=$2
+ option2=$3
+ ret_expected=$4
+ #
+ TESTING $H5CLEAR $option1 $option2 $fname
+ # h5clear $option1 $option2 $fname
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname 2>/dev/null 1>/dev/null
+ )
+ if test $? -ne $ret_expected; then
+ echo "*FAILED*"
+ nerrors=`expr $nerrors + 1`
+ else
+ echo "PASSED"
+ fi
+}
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+# prepare for testing
+COPY_TESTFILES_TO_TESTDIR
+# For Cmake
+$CP -f $TESTDIR/h5clear_sec2_v0.h5 $TESTDIR/orig_h5clear_sec2_v0.h5
+$CP -f $TESTDIR/h5clear_sec2_v2.h5 $TESTDIR/orig_h5clear_sec2_v2.h5
+$CP -f $TESTDIR/h5clear_sec2_v3.h5 $TESTDIR/orig_h5clear_sec2_v3.h5
+#
+#
+#
+# The following are tests to verify the expected output from h5clear
+# "h5clear -h"
+# "h5clear" (no options, no file)
+# "h5clear junk.h5" (no options, nonexisting file)
+# "h5clear orig_h5clear_sec2_v3.h5" (no options, existing file)
+# "h5clear -m" (valid 1 option, no file)
+# "h5clear -s junk.h5" (valid 1 option, nonexisting file)
+# "h5clear -m -s" (valid 2 options, no file)
+# "h5clear -m -s junk.h5" (valid 2 options, nonexisting file)
+# "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image)
+# "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image)
+TOOLTEST_OUT "" -h "" h5clear_usage.ddl
+TOOLTEST_OUT "" "" "" h5clear_usage.ddl
+TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl
+TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl
+TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl
+TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl
+TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl
+TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl
+TOOLTEST_OUT orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl
+TOOLTEST_OUT orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl
+#
+#
+#
+# The following are tests to verify the expected exit code from h5clear:
+# "h5clear -m h5clear_mdc_image.h5" (valid option, existing file, succeed exit code)
+# "h5clear --vers" (valid option, version #, succeed exit code)
+# "h5clear -k" (invalid 1 option, no file, fail exit code)
+# "h5clear -k junk.h5" (invalid 1 option, nonexisting file, fail exit code)
+# "h5clear -l h5clear_sec2_v2.h5" (invalid 1 option, existing file, fail exit code)
+# "h5clear -m -k" (valid/invalid 2 options, nofile, fail exit code)
+# "h5clear -l -m" (invalid/valid 2 options, nofile, fail exit code)
+# "h5clear -m -l junk.h5" (valid/invalid 2 options, nonexisting file, fail exit code)
+# "h5clear -l -m junk.h5" (invalid/valid 2 options, nonexisting file, fail exit code)
+# "h5clear -m -l h5clear_sec2_v0.h5" (valid/invalid 2 options, existing file, fail exit code)
+# "h5clear -l -m h5clear_sec2_v0.h5" (invalid/valid 2 options, existing file, fail exit code)
+TOOLTEST h5clear_mdc_image.h5 -m "" $SUCCEED
+TOOLTEST "" --vers "" $SUCCEED
+TOOLTEST "" -k "" $FAIL
+TOOLTEST junk.h5 -k "" $FAIL
+TOOLTEST h5clear_sec2_v2.h5 -l "" $FAIL
+TOOLTEST "" -m -k $FAIL
+TOOLTEST "" -l -m $FAIL
+TOOLTEST junk.h5 -m -l $FAIL
+TOOLTEST junk.h5 -l -m $FAIL
+TOOLTEST h5clear_sec2_v0.h5 -m -l $FAIL
+TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL
+#
+#
+#
+# h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear:
+TOOLTEST_OUT mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl
+TOOLTEST_OUT mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl
+#
+#
+#
+# The following are tests to verify the status_flags field is cleared properly:
+OPEN_CHK h5clear_sec2_v3.h5 $FAIL
+TOOLTEST h5clear_sec2_v3.h5 -s "" $SUCCEED
+OPEN_CHK h5clear_sec2_v3.h5 $SUCCEED
+#
+OPEN_CHK h5clear_log_v3.h5 $FAIL
+TOOLTEST h5clear_log_v3.h5 -s "" $SUCCEED
+OPEN_CHK h5clear_log_v3.h5 $SUCCEED
+#
+OPEN_CHK latest_h5clear_sec2_v3.h5 $FAIL
+TOOLTEST latest_h5clear_sec2_v3.h5 -s "" $SUCCEED
+OPEN_CHK latest_h5clear_sec2_v3.h5 $SUCCEED
+#
+OPEN_CHK latest_h5clear_log_v3.h5 $FAIL
+TOOLTEST latest_h5clear_log_v3.h5 -s "" $SUCCEED
+OPEN_CHK latest_h5clear_log_v3.h5 $SUCCEED
+#
+# File open succeeds for the following 2 test files because the
+# library does not check status_flags for files with < v3 superblock:
+OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED
+TOOLTEST h5clear_sec2_v0.h5 -s "" $SUCCEED
+OPEN_CHK h5clear_sec2_v0.h5 $SUCCEED
+#
+OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED
+TOOLTEST h5clear_sec2_v2.h5 -s "" $SUCCEED
+OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED
+#
+#
+#
+# Clean up test files
+if test -z "$HDF5_NOCLEANUP"; then
+ rm -f h5clear_*.h5 latest_h5clear*.h5
+fi
+#
+#
+#
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors error(s)."
+ exit $EXIT_FAILURE
+fi
diff --git a/tools/test/misc/testh5mkgrp.sh.in b/tools/test/misc/testh5mkgrp.sh.in
new file mode 100644
index 0000000..3990bd2
--- /dev/null
+++ b/tools/test/misc/testh5mkgrp.sh.in
@@ -0,0 +1,320 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tests for the h5mkgrp tool
+#
+# Quincey Koziol (koziol@hdfgroup.org)
+# Tuesday, February 13, 2007
+#
+
+srcdir=@srcdir@
+
+TESTNAME=h5mkgrp
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+H5MKGRP=../../src/misc/h5mkgrp # The tool name
+H5MKGRP_BIN=`pwd`/$H5MKGRP # The path of the tool binary
+H5LS=../../src/h5ls/h5ls # The h5ls tool name
+H5LS_ARGS=-vr # Arguments to the h5ls tool
+H5LS_BIN=`pwd`/$H5LS # The path of the h5ls tool binary
+
+RM='rm -rf'
+CMP='cmp -s'
+DIFF='diff -c'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+nerrors=0
+verbose=yes
+
+# source dirs
+SRC_TOOLS="$srcdir/../.."
+
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+# testfiles source dirs for tools
+SRC_H5MKGRP_TESTFILES="$SRC_TOOLS/test/misc/testfiles"
+
+TESTDIR=./testgrp
+test -d $TESTDIR || mkdir -p $TESTDIR
+
+######################################################################
+# test files
+# --------------------------------------------------------------------
+# All the test files copy from source directory to test directory
+# NOTE: Keep this framework to add/remove test files.
+# Any test files from other tools can be used in this framework.
+# This list are also used for checking exist.
+# Comment '#' without space can be used.
+# --------------------------------------------------------------------
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="
+$SRC_H5MKGRP_TESTFILES/h5mkgrp_help.txt
+$SRC_TOOLS_TESTFILES/h5mkgrp_single.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_v.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_single_l.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_v.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_several_l.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_lp.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_p.ls
+$SRC_TOOLS_TESTFILES/h5mkgrp_nested_mult_lp.ls
+"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
+}
+
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=$SRC_H5MKGRP_TESTFILES
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $RM $TESTDIR
+ fi
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+TESTING()
+{
+ SPACES=" "
+ echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
+}
+
+# Source in the output filter function definitions.
+. $srcdir/../../../bin/output_filter.sh
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Verifying".
+#
+VERIFY_H5LS()
+{
+ SPACES=" "
+ echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Run a test and print PASS or *FAIL*. If h5mkgrp can complete
+# with exit status 0, consider it pass. If a test fails then increment
+# the `nerrors' global variable.
+# Assumed arguments:
+# $* arguments for h5mkgrp.
+
+TOOLTEST()
+{
+ TESTING $H5MKGRP $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
+ ) > output.out
+ RET=$?
+ if [ $RET != 0 ]; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat output.out
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f output.out
+ fi
+ fi
+}
+
+# Call the h5ls tool to verify the correct output data in the destination file
+#
+H5LSTEST()
+{
+ expect="$TESTDIR/`basename $1 .h5`.ls"
+ actual="$TESTDIR/`basename $1 .h5`.out"
+ actual_sav=${actual}-sav
+
+ # Stderr is included in stdout so that the diff can detect
+ # any unexpected output from that stream too.
+ VERIFY_H5LS $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
+ ) 2>&1 |sed 's/Modified:.*/Modified: XXXX-XX-XX XX:XX:XX XXX/' >$actual
+
+ # save actual in case it is needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ STDERR_FILTER $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ls) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_sav
+ fi
+}
+
+# Single run of tool
+#
+# Assumed arguments:
+# $1 is test file name
+# $2 is h5mkgrp options
+# $* are groups to create
+RUNTEST()
+{
+ FILEOUT=$1
+ shift
+ H5MKGRP_ARGS=$1
+ shift
+
+ # Remove any output file left over from previous test run
+ rm -f $FILEOUT
+
+ # Run test
+ TOOLTEST $H5MKGRP_ARGS $FILEOUT $@
+
+ # Verify that the file created above is correct
+ H5LSTEST $FILEOUT
+
+ # Remove output file created, if the "no cleanup" environment variable is
+ # not defined
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $TESTDIR/$FILEOUT
+ fi
+}
+
+# Single run of tool
+#
+# Assumed arguments:
+# $1 is test expected output file
+# $2 is h5mkgrp options
+# $* are groups to create
+CMPTEST()
+{
+ FILEOUT=$1
+ expect="$TESTDIR/`basename $1 .h5`.txt"
+ actual="$TESTDIR/`basename $1 .h5`.out"
+ actual_err="$TESTDIR/`basename $1 .h5`.err"
+ shift
+
+ # Stderr is included in stdout so that the diff can detect
+ # any unexpected output from that stream too.
+ TESTING $H5MKGRP $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $H5MKGRP_BIN $@
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.txt) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err
+ fi
+}
+
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
+
+# Check that help & version is displayed properly
+CMPTEST h5mkgrp_help.h5 "-h"
+#CMPTEST h5mkgrp_version.h5 "-V"
+
+# Create single group at root level
+RUNTEST h5mkgrp_single.h5 " " single
+RUNTEST h5mkgrp_single_v.h5 "-v" single
+RUNTEST h5mkgrp_single_p.h5 "-p" single
+RUNTEST h5mkgrp_single_l.h5 "-l" latest
+
+# Create several groups at root level
+RUNTEST h5mkgrp_several.h5 " " one two
+RUNTEST h5mkgrp_several_v.h5 "-v" one two
+RUNTEST h5mkgrp_several_p.h5 "-p" one two
+RUNTEST h5mkgrp_several_l.h5 "-l" one two
+
+# Create various nested groups
+RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two
+RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
+RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four
+RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four
+
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
+fi
diff --git a/tools/test/misc/testh5repart.sh.in b/tools/test/misc/testh5repart.sh.in
new file mode 100644
index 0000000..594d37e
--- /dev/null
+++ b/tools/test/misc/testh5repart.sh.in
@@ -0,0 +1,195 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Tests for the h5repart tool
+
+srcdir=@srcdir@
+
+TESTNAME=h5repart
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+REPART=../../src/misc/h5repart # The tool name
+REPART_BIN=`pwd`/$REPART # The path of the tool binary
+
+REPARTED_FAM=repart_test # The test name
+REPARTED_FAM_BIN=`pwd`/$REPARTED_FAM # The path of the test binary
+
+RM='rm -rf'
+CMP='cmp -s'
+DIFF='diff -c'
+CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
+
+nerrors=0
+verbose=yes
+
+# source dirs
+SRC_TOOLS="$srcdir/../.."
+
+SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
+
+TESTDIR=./testrepart
+test -d $TESTDIR || mkdir -p $TESTDIR
+
+#
+# copy test files and expected output files from source dirs to test dir
+#
+COPY_TESTFILES="
+$SRC_TOOLS_TESTFILES/family_file00000.h5
+$SRC_TOOLS_TESTFILES/family_file00001.h5
+$SRC_TOOLS_TESTFILES/family_file00002.h5
+$SRC_TOOLS_TESTFILES/family_file00003.h5
+$SRC_TOOLS_TESTFILES/family_file00004.h5
+$SRC_TOOLS_TESTFILES/family_file00005.h5
+$SRC_TOOLS_TESTFILES/family_file00006.h5
+$SRC_TOOLS_TESTFILES/family_file00007.h5
+$SRC_TOOLS_TESTFILES/family_file00008.h5
+$SRC_TOOLS_TESTFILES/family_file00009.h5
+$SRC_TOOLS_TESTFILES/family_file00010.h5
+$SRC_TOOLS_TESTFILES/family_file00011.h5
+$SRC_TOOLS_TESTFILES/family_file00012.h5
+$SRC_TOOLS_TESTFILES/family_file00013.h5
+$SRC_TOOLS_TESTFILES/family_file00014.h5
+$SRC_TOOLS_TESTFILES/family_file00015.h5
+$SRC_TOOLS_TESTFILES/family_file00016.h5
+$SRC_TOOLS_TESTFILES/family_file00017.h5
+"
+
+COPY_TESTFILES_TO_TESTDIR()
+{
+ # copy test files. Used -f to make sure get a new copy
+ for tstfile in $COPY_TESTFILES
+ do
+ # ignore '#' comment
+ echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
+ RET=$?
+ if [ $RET -eq 1 ]; then
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
+ fi
+ fi
+ done
+}
+
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=$SRC_TOOLS_TESTFILES
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $RM $TESTDIR
+ fi
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Run a test and print PASS or *FAIL*. If a test fails then increment
+# the `nerrors' global variable.
+#
+TOOLTEST() {
+ # Run tool test.
+ TESTING $REPART $@
+ (
+# echo
+ cd $TESTDIR
+ $RUNSERIAL $REPART_BIN $@
+ )
+
+ if test $? -eq 0; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors=`expr $nerrors + 1`
+ fi
+}
+
+OUTPUTTEST() {
+ # Run test program.
+ TESTING $REPARTED_FAM $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $REPARTED_FAM_BIN $@
+ )
+
+ if test $? -eq 0; then
+ echo " PASSED"
+ else
+ echo " FAILED"
+ nerrors=`expr $nerrors + 1`
+ fi
+}
+
+# Print a "SKIP" message
+SKIP() {
+ TESTING $REPART $@
+ echo " -SKIP-"
+}
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
+
+# repartition family member size to 20,000 bytes.
+TOOLTEST -m 20000 family_file%05d.h5 fst_family%05d.h5
+# repartition family member size to 5 KB.
+TOOLTEST -m 5k family_file%05d.h5 scd_family%05d.h5
+# convert family file to sec2 file of 20,000 bytes
+TOOLTEST -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5
+
+# test the output files repartitioned above.
+OUTPUTTEST
+echo
+
+# Clean up output file
+CLEAN_TESTFILES_AND_TESTDIR
+
+if test -z "$HDF5_NOCLEANUP"; then
+ cd $actual_dir
+ rm -f fst_family*.h5 scd_family*.h5 family_to_sec2.h5
+fi
+
+if test $nerrors -eq 0 ; then
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
+fi
diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt
new file mode 100644
index 0000000..ec672e5
--- /dev/null
+++ b/tools/test/misc/vds/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required (VERSION 3.2.2)
+PROJECT (HDF5_TOOLS_TEST_MISC_VDS)
+
+#-----------------------------------------------------------------------------
+# Setup include Directories
+#-----------------------------------------------------------------------------
+INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
+
+MACRO (ADD_H5_GENERATOR genfile)
+ add_executable (${genfile} ${HDF5_TOOLS_TEST_MISC_VDS_SOURCE_DIR}/${genfile}.c)
+ TARGET_NAMING (${genfile} STATIC)
+ TARGET_C_PROPERTIES (${genfile} STATIC " " " ")
+ target_link_libraries (${genfile} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (${genfile} PROPERTIES FOLDER generator/tools)
+ENDMACRO ()
+
+# generator executables
+set (H5_GENERATORS
+ UC_1_one_dim_gen
+ UC_2_two_dims_gen
+ UC_3_gaps_gen
+ UC_4_printf_gen
+ UC_5_stride_gen
+)
+
+foreach (gen ${H5_GENERATORS})
+ ADD_H5_GENERATOR (${gen})
+endforeach ()
diff --git a/tools/test/misc/vds/Makefile.am b/tools/test/misc/vds/Makefile.am
new file mode 100644
index 0000000..73c335f
--- /dev/null
+++ b/tools/test/misc/vds/Makefile.am
@@ -0,0 +1,36 @@
+#
+# 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 COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+#
+# HDF5 Library Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Include src directory
+AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/test/misc/vds
+
+#test scripts and programs
+TEST_PROG=UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \
+ UC_5_stride_gen
+
+check_PROGRAMS=$(TEST_PROG)
+
+# Temporary files.
+CHECK_CLEANFILES+=*.h5
+
+# All programs rely on hdf5 library and h5tools library
+LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+
+include $(top_srcdir)/config/conclude.am
diff --git a/tools/test/misc/vds/Makefile.in b/tools/test/misc/vds/Makefile.in
new file mode 100644
index 0000000..1de8bf8
--- /dev/null
+++ b/tools/test/misc/vds/Makefile.in
@@ -0,0 +1,1485 @@
+# 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 COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# HDF5 Library Makefile(.in)
+#
+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@
+check_PROGRAMS = $(am__EXEEXT_1)
+TESTS = $(am__EXEEXT_1)
+subdir = tools/test/misc/vds
+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/ax_check_class.m4 \
+ $(top_srcdir)/m4/ax_check_classpath.m4 \
+ $(top_srcdir)/m4/ax_check_java_home.m4 \
+ $(top_srcdir)/m4/ax_check_junit.m4 \
+ $(top_srcdir)/m4/ax_java_options.m4 \
+ $(top_srcdir)/m4/ax_jni_include_dir.m4 \
+ $(top_srcdir)/m4/ax_prog_jar.m4 \
+ $(top_srcdir)/m4/ax_prog_java.m4 \
+ $(top_srcdir)/m4/ax_prog_java_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javac.m4 \
+ $(top_srcdir)/m4/ax_prog_javac_works.m4 \
+ $(top_srcdir)/m4/ax_prog_javadoc.m4 \
+ $(top_srcdir)/m4/ax_try_compile_java.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 =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = UC_1_one_dim_gen$(EXEEXT) UC_2_two_dims_gen$(EXEEXT) \
+ UC_3_gaps_gen$(EXEEXT) UC_4_printf_gen$(EXEEXT) \
+ UC_5_stride_gen$(EXEEXT)
+UC_1_one_dim_gen_SOURCES = UC_1_one_dim_gen.c
+UC_1_one_dim_gen_OBJECTS = UC_1_one_dim_gen.$(OBJEXT)
+UC_1_one_dim_gen_LDADD = $(LDADD)
+UC_1_one_dim_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+UC_2_two_dims_gen_SOURCES = UC_2_two_dims_gen.c
+UC_2_two_dims_gen_OBJECTS = UC_2_two_dims_gen.$(OBJEXT)
+UC_2_two_dims_gen_LDADD = $(LDADD)
+UC_2_two_dims_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+UC_3_gaps_gen_SOURCES = UC_3_gaps_gen.c
+UC_3_gaps_gen_OBJECTS = UC_3_gaps_gen.$(OBJEXT)
+UC_3_gaps_gen_LDADD = $(LDADD)
+UC_3_gaps_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+UC_4_printf_gen_SOURCES = UC_4_printf_gen.c
+UC_4_printf_gen_OBJECTS = UC_4_printf_gen.$(OBJEXT)
+UC_4_printf_gen_LDADD = $(LDADD)
+UC_4_printf_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+UC_5_stride_gen_SOURCES = UC_5_stride_gen.c
+UC_5_stride_gen_OBJECTS = UC_5_stride_gen.$(OBJEXT)
+UC_5_stride_gen_LDADD = $(LDADD)
+UC_5_stride_gen_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
+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 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/fortran/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \
+ UC_4_printf_gen.c UC_5_stride_gen.c
+DIST_SOURCES = UC_1_one_dim_gen.c UC_2_two_dims_gen.c UC_3_gaps_gen.c \
+ UC_4_printf_gen.c UC_5_stride_gen.c
+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)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+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
+LOG_DRIVER = $(SHELL) $(top_srcdir)/bin/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+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__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bin/depcomp \
+ $(top_srcdir)/bin/test-driver $(top_srcdir)/config/commence.am \
+ $(top_srcdir)/config/conclude.am
+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@
+
+# Include src directory
+AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src \
+ -I$(top_srcdir)/tools/lib -I$(top_srcdir)/tools/test/misc/vds
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
+AM_JAVACFLAGS = @AM_JAVACFLAGS@
+AM_JAVAFLAGS = @AM_JAVAFLAGS@
+AM_JNIFLAGS = @AM_JNIFLAGS@
+AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
+AR = @AR@
+ASSERTS = @ASSERTS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_MODE = @BUILD_MODE@
+BYTESEX = @BYTESEX@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CC_VERSION = @CC_VERSION@
+CFLAGS = @CFLAGS@
+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@
+DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DEV_WARNINGS = @DEV_WARNINGS@
+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_CLASSPATH = @H5_CLASSPATH@
+H5_CPPFLAGS = @H5_CPPFLAGS@
+H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_FCFLAGS = @H5_FCFLAGS@
+H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_JAVACFLAGS = @H5_JAVACFLAGS@
+H5_JAVAFLAGS = @H5_JAVAFLAGS@
+H5_JNIFLAGS = @H5_JNIFLAGS@
+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@
+HDF_JAVA = @HDF_JAVA@
+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_LIBRARY = @INSTRUMENT_LIBRARY@
+INTERNAL_DEBUG_OUTPUT = @INTERNAL_DEBUG_OUTPUT@
+JAR = @JAR@
+JAVA = @JAVA@
+JAVAC = @JAVAC@
+JAVACFLAGS = @JAVACFLAGS@
+JAVADOC = @JAVADOC@
+JAVAFLAGS = @JAVAFLAGS@
+JAVAPREFIX = @JAVAPREFIX@
+JAVA_JUNIT = @JAVA_JUNIT@
+JAVA_PATH_NAME = @JAVA_PATH_NAME@
+JAVA_VERSION = @JAVA_VERSION@
+JNIFLAGS = @JNIFLAGS@
+JUNIT = @JUNIT@
+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@
+MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+METADATATRACEFILE = @METADATATRACEFILE@
+MKDIR_P = @MKDIR_P@
+MPE = @MPE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJECT_NAMELEN_DEFAULT_F = @OBJECT_NAMELEN_DEFAULT_F@
+OBJEXT = @OBJEXT@
+OPTIMIZATION = @OPTIMIZATION@
+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@
+PAC_FORTRAN_NUM_INTEGER_KINDS = @PAC_FORTRAN_NUM_INTEGER_KINDS@
+PARALLEL = @PARALLEL@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROFILING = @PROFILING@
+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@
+SYMBOLS = @SYMBOLS@
+TESTPARALLEL = @TESTPARALLEL@
+TESTS_JUNIT = @TESTS_JUNIT@
+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@
+UUDECODE = @UUDECODE@
+VERSION = @VERSION@
+WORDS_BIGENDIAN = @WORDS_BIGENDIAN@
+_ACJNI_JAVAC = @_ACJNI_JAVAC@
+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
+LIBH5JNI = $(top_builddir)/java/src/jni/libhdf5_java.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.
+
+# Temporary files.
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5
+
+#test scripts and programs
+TEST_PROG = UC_1_one_dim_gen UC_2_two_dims_gen UC_3_gaps_gen UC_4_printf_gen \
+ UC_5_stride_gen
+
+
+# All programs rely on hdf5 library and h5tools library
+LDADD = $(LIBH5TOOLS) $(LIBHDF5)
+
+# Automake needs to be taught how to build lib, dyn, 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)
+
+DYN = $(dyn_LTLIBRARIES)
+PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
+ $(EXTRA_PROG)
+
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+dyndir = $(libdir)
+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: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.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 tools/test/misc/vds/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tools/test/misc/vds/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/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):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+UC_1_one_dim_gen$(EXEEXT): $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_DEPENDENCIES) $(EXTRA_UC_1_one_dim_gen_DEPENDENCIES)
+ @rm -f UC_1_one_dim_gen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(UC_1_one_dim_gen_OBJECTS) $(UC_1_one_dim_gen_LDADD) $(LIBS)
+
+UC_2_two_dims_gen$(EXEEXT): $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_DEPENDENCIES) $(EXTRA_UC_2_two_dims_gen_DEPENDENCIES)
+ @rm -f UC_2_two_dims_gen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(UC_2_two_dims_gen_OBJECTS) $(UC_2_two_dims_gen_LDADD) $(LIBS)
+
+UC_3_gaps_gen$(EXEEXT): $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_DEPENDENCIES) $(EXTRA_UC_3_gaps_gen_DEPENDENCIES)
+ @rm -f UC_3_gaps_gen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(UC_3_gaps_gen_OBJECTS) $(UC_3_gaps_gen_LDADD) $(LIBS)
+
+UC_4_printf_gen$(EXEEXT): $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_DEPENDENCIES) $(EXTRA_UC_4_printf_gen_DEPENDENCIES)
+ @rm -f UC_4_printf_gen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(UC_4_printf_gen_OBJECTS) $(UC_4_printf_gen_LDADD) $(LIBS)
+
+UC_5_stride_gen$(EXEEXT): $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_DEPENDENCIES) $(EXTRA_UC_5_stride_gen_DEPENDENCIES)
+ @rm -f UC_5_stride_gen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(UC_5_stride_gen_OBJECTS) $(UC_5_stride_gen_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_1_one_dim_gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_2_two_dims_gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_3_gaps_gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_4_printf_gen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UC_5_stride_gen.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# 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 $(check_PROGRAMS)
+ @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 $$?
+UC_1_one_dim_gen.log: UC_1_one_dim_gen$(EXEEXT)
+ @p='UC_1_one_dim_gen$(EXEEXT)'; \
+ b='UC_1_one_dim_gen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+UC_2_two_dims_gen.log: UC_2_two_dims_gen$(EXEEXT)
+ @p='UC_2_two_dims_gen$(EXEEXT)'; \
+ b='UC_2_two_dims_gen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+UC_3_gaps_gen.log: UC_3_gaps_gen$(EXEEXT)
+ @p='UC_3_gaps_gen$(EXEEXT)'; \
+ b='UC_3_gaps_gen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+UC_4_printf_gen.log: UC_4_printf_gen$(EXEEXT)
+ @p='UC_4_printf_gen$(EXEEXT)'; \
+ b='UC_4_printf_gen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+UC_5_stride_gen.log: UC_5_stride_gen$(EXEEXT)
+ @p='UC_5_stride_gen$(EXEEXT)'; \
+ b='UC_5_stride_gen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.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_PROGRAMS)
+ $(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 "$(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:
+
+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-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am
+
+.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
+
+# lib/progs/tests targets recurse into subdirectories. build-* targets
+# build files in this directory.
+build-dyn: $(DYN)
+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 dyn 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/tools/test/misc/vds/UC_1.h b/tools/test/misc/vds/UC_1.h
new file mode 100644
index 0000000..9d1f758
--- /dev/null
+++ b/tools/test/misc/vds/UC_1.h
@@ -0,0 +1,119 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_1_H
+#define UC_1_H
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 1
+ *
+ * Datasets have a single unlimited dimension and two fixed dimensions. They
+ * are mapped along a single dimension in the VDS with no gaps between them.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes
+
+ ***************** --+
+ * A * K
+ ***************** --+
+ * * |
+ * B * N
+ * * |
+ ***************** --+
+ * C *
+ *****************
+ * *
+ * D *
+ * *
+ *****************
+ * E *
+ *****************
+ * *
+ * F *
+ * *
+ *****************
+
+ | |
+ +-------M-------+
+
+
+ dim[0]
+ /
+ /
+ /
+ -----> dim[2]
+ |
+ |
+ |
+ dim[1]
+
+ */
+
+
+#define UC_1_N_SOURCES 6
+
+/* Dataset dimensions */
+#define UC_1_SM_HEIGHT 2 /* K */
+#define UC_1_LG_HEIGHT 4 /* N */
+#define UC_1_SM_LG_HEIGHT 6 /* SM_HEIGHT + LG_HEIGHT */
+#define UC_1_FULL_HEIGHT 18 /* (3 * K) + (3 * N) */
+#define UC_1_HALF_HEIGHT 9
+#define UC_1_WIDTH 8 /* M */
+#define UC_1_HALF_WIDTH 4
+
+#define UC_1_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */
+#define UC_1_N_TEST_PLANES 5 /* number of planes we write */
+
+/* Dataset datatypes */
+#define UC_1_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_1_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_1_DIMS[UC_1_N_SOURCES][RANK] = {
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {0, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+
+/* Maximum size of datasets, both source and VDS */
+static hsize_t UC_1_MAX_DIMS[UC_1_N_SOURCES][RANK] = {
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {UC_1_N_MAX_PLANES, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+
+/* File names for source datasets */
+static char UC_1_FILE_NAMES[UC_1_N_SOURCES][NAME_LEN] = {
+ {"1_a.h5"},
+ {"1_b.h5"},
+ {"1_c.h5"},
+ {"1_d.h5"},
+ {"1_e.h5"},
+ {"1_f.h5"}
+};
+
+/* Dataset names */
+static char UC_1_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+
+#endif /* UC_1_H */
+
diff --git a/tools/test/misc/vds/UC_1_one_dim_gen.c b/tools/test/misc/vds/UC_1_one_dim_gen.c
new file mode 100644
index 0000000..b997280
--- /dev/null
+++ b/tools/test/misc/vds/UC_1_one_dim_gen.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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 1
+ *
+ * See the header file for a description.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+#include "UC_1.h"
+
+static hsize_t UC_1_VDS_DIMS[RANK] = {0, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+static hsize_t UC_1_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_1_FULL_HEIGHT, UC_1_WIDTH};
+
+/* Planes */
+static hsize_t UC_1_PLANES[UC_1_N_SOURCES][RANK] = {
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_SM_HEIGHT, UC_1_WIDTH},
+ {1, UC_1_LG_HEIGHT, UC_1_WIDTH}
+};
+
+/* VDS file name */
+static char UC_1_VDS_FILE_NAME[NAME_LEN] = "1_vds.h5";
+
+/* Dataset names */
+static char UC_1_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_1_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static int UC_1_FILL_VALUES[UC_1_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5,
+ -6
+};
+static int UC_1_VDS_FILL_VALUE = -9;
+
+int
+main(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t extent[RANK]; /* dataset extents */
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ hsize_t map_start = 0; /* starting point in the VDS map */
+
+ int *buffer = NULL; /* data buffer */
+ hsize_t count = 0; /* number of elements in a plane */
+ int n_planes = -1; /* number of planes to write */
+ int value = -1; /* value written to datasets */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ hsize_t k; /* iterator */
+
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_1_VDS_DATATYPE,
+ &UC_1_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_1_VDS_DIMS,
+ UC_1_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ map_start = 0;
+
+ for(i = 0; i < UC_1_N_SOURCES; i++) {
+
+ /* Create source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_1_PLANES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_1_SOURCE_DATATYPE,
+ &UC_1_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(0 != i % 2)
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_1_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i],
+ UC_1_MAX_DIMS[i])) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_1_SOURCE_DSET_NAME,
+ UC_1_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent (will eventually vary with i) */
+ extent[0] = UC_1_N_TEST_PLANES;
+ extent[1] = UC_1_PLANES[i][1];
+ extent[2] = UC_1_PLANES[i][2];
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ count = UC_1_PLANES[i][1] * UC_1_PLANES[i][2];
+ if(NULL == (buffer = (int *)malloc(count * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_1_PLANES[i], NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset, number will eventually vary with i */
+ n_planes = UC_1_N_TEST_PLANES;
+ for(j = 0; j < n_planes; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < count; k++)
+ buffer[k] = value;
+
+ start[0] = (hsize_t)j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_1_PLANES[i], NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ start[0] = 0;
+ start[1] = map_start;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ map_start += UC_1_PLANES[i][1];
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i],
+ UC_1_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_1_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_1_VDS_DSET_NAME, UC_1_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main */
+
diff --git a/tools/test/misc/vds/UC_2.h b/tools/test/misc/vds/UC_2.h
new file mode 100644
index 0000000..a3ee0f7
--- /dev/null
+++ b/tools/test/misc/vds/UC_2.h
@@ -0,0 +1,108 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_2_H
+#define UC_2_H
+
+#include "hdf5.h"
+
+/*
+ * Definitions for VDS use case 2
+ *
+ * Datasets have a single unlimited dimension and two fixed dimensions. They
+ * are mapped along two dimensions in the VDS with no gaps between them.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes
+
+ **********************************
+ * A * *
+ ***************** D *
+ * * *
+ * B * *
+ * ******************
+ ***************** E *
+ * C * *
+ **********************************
+
+
+ dim[0]
+ /
+ /
+ /
+ -----> dim[2]
+ |
+ |
+ |
+ dim[1]
+
+ */
+
+#define UC_2_N_SOURCES 5
+
+/* Dataset dimensions */
+#define UC_2_A_HEIGHT 2
+#define UC_2_B_HEIGHT 4
+#define UC_2_AB_HEIGHT 6 /* For hyperslab start position */
+#define UC_2_C_HEIGHT 2
+#define UC_2_D_HEIGHT 5
+#define UC_2_E_HEIGHT 3
+#define UC_2_FULL_HEIGHT 8 /* A+B+C and D+E */
+#define UC_2_WIDTH 7
+#define UC_2_FULL_WIDTH 14 /* 2*width */
+
+#define UC_2_N_PLANES_IN_SERIES 3 /* number of planes in a series of sub-images */
+#define UC_2_N_MAX_PLANES H5S_UNLIMITED /* max number of planes */
+#define UC_2_N_TEST_PLANES 6 /* number of planes we write */
+
+/* Dataset datatypes */
+#define UC_2_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_2_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_2_DIMS[UC_2_N_SOURCES][RANK] = {
+ {0, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {0, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* Maximum size of datasets, both source and VDS */
+static hsize_t UC_2_MAX_DIMS[UC_2_N_SOURCES][RANK] = {
+ {UC_2_N_MAX_PLANES, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_MAX_PLANES, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* File names for source datasets */
+static char UC_2_FILE_NAMES[UC_2_N_SOURCES][NAME_LEN] = {
+ {"2_a.h5"},
+ {"2_b.h5"},
+ {"2_c.h5"},
+ {"2_d.h5"},
+ {"2_e.h5"}
+};
+
+/* VDS file name */
+#define UC_2_VDS_FILE_NAME "2_vds.h5"
+
+/* Dataset names */
+#define UC_2_SOURCE_DSET_NAME "source_dset"
+#define UC_2_SOURCE_DSET_PATH "/source_dset"
+#define UC_2_VDS_DSET_NAME "vds_dset"
+
+#endif /* UC_2_H */
+
diff --git a/tools/test/misc/vds/UC_2_two_dims_gen.c b/tools/test/misc/vds/UC_2_two_dims_gen.c
new file mode 100644
index 0000000..bd70fda
--- /dev/null
+++ b/tools/test/misc/vds/UC_2_two_dims_gen.c
@@ -0,0 +1,268 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 2
+ *
+ * See the header file for a description.
+ */
+
+
+#include <stdlib.h>
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+#include "UC_2.h"
+
+static hsize_t UC_2_VDS_DIMS[RANK] = {0, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+static hsize_t UC_2_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_2_FULL_HEIGHT, UC_2_FULL_WIDTH};
+
+/* Positions of source datasets in the VDS */
+static hsize_t UC_2_POSITIONS[UC_2_N_SOURCES][RANK] = {
+ /* A */ {0, 0, 0},
+ /* B */ {0, UC_2_A_HEIGHT, 0},
+ /* C */ {0, UC_2_AB_HEIGHT, 0},
+ /* D */ {0, 0, UC_2_WIDTH},
+ /* E */ {0, UC_2_D_HEIGHT, UC_2_WIDTH}
+};
+
+/* Planes */
+static hsize_t UC_2_PLANES[UC_2_N_SOURCES][RANK] = {
+ {1, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {1, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* Chunk dimensions */
+static hsize_t UC_2_CHUNK_DIMS[UC_2_N_SOURCES][RANK] = {
+ {UC_2_N_PLANES_IN_SERIES, UC_2_A_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_B_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_C_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_D_HEIGHT, UC_2_WIDTH},
+ {UC_2_N_PLANES_IN_SERIES, UC_2_E_HEIGHT, UC_2_WIDTH}
+};
+
+/* Fill values */
+static int UC_2_FILL_VALUES[UC_2_N_SOURCES] = {
+ -1,
+ -2,
+ -3,
+ -4,
+ -5
+};
+static int UC_2_VDS_FILL_VALUE = -9;
+
+int
+main(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ hsize_t extent[RANK]; /* dataset extents */
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+ hsize_t count = 0; /* number of elements in a plane */
+ int n_planes = -1; /* number of planes to write */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ hsize_t k; /* iterator */
+
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_2_VDS_DATATYPE,
+ &UC_2_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_2_VDS_DIMS,
+ UC_2_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ for(i = 0; i < UC_2_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_2_CHUNK_DIMS[i]) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_2_SOURCE_DATATYPE,
+ &UC_2_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_2_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i],
+ UC_2_MAX_DIMS[i])) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_2_SOURCE_DSET_NAME,
+ UC_2_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent (will eventually vary with i) */
+ extent[0] = UC_2_N_TEST_PLANES;
+ extent[1] = UC_2_PLANES[i][1];
+ extent[2] = UC_2_PLANES[i][2];
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ count = UC_2_PLANES[i][1] * UC_2_PLANES[i][2];
+ if(NULL == (buffer = (int *)malloc(count * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_2_PLANES[i], NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset, number will eventually vary with i */
+ n_planes = UC_2_N_TEST_PLANES;
+ for(j = 0; j < n_planes; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < count; k++)
+ buffer[k] = value;
+
+ start[0] = (hsize_t)j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_2_PLANES[i], NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_2_POSITIONS[i], NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i],
+ UC_2_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_2_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_2_VDS_DSET_NAME, UC_2_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/test/misc/vds/UC_3.h b/tools/test/misc/vds/UC_3.h
new file mode 100644
index 0000000..0c26dfb
--- /dev/null
+++ b/tools/test/misc/vds/UC_3.h
@@ -0,0 +1,72 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_3_H
+#define UC_3_H
+
+#include "hdf5.h"
+
+#include "UC_1.h"
+#include "UC_2.h"
+
+/*
+ * Definitions for VDS use case 3
+ *
+ * Datasets have a single unlimited dimension and one or two fixed
+ * dimensions (they are reused from use cases 1 and 2). In this use case,
+ * the datasets are mapped in the VDS with gaps between them.
+ */
+
+/* VDS dimensions
+ * Height and width are large enough to encompass the
+ * mapped source datasets with gaps.
+ */
+#define UC_31_VDS_HEIGHT 25 /* full height + 7 (gaps of 1) */
+#define UC_31_VDS_WIDTH 8 /* full width + 0 (no gaps) */
+#define UC_32_VDS_HEIGHT 13 /* full height + 5 */
+#define UC_32_VDS_WIDTH 19 /* full width + 5 */
+#define UC_31_GAP 1
+
+/* VDS datatypes */
+#define UC_31_VDS_DATATYPE H5T_STD_I32LE
+#define UC_32_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of virtual datasets */
+static hsize_t UC_31_VDS_DIMS[RANK] = {0, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
+static hsize_t UC_32_VDS_DIMS[RANK] = {0, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
+
+/* Maximum size of virtual datasets */
+static hsize_t UC_31_VDS_MAX_DIMS[RANK] = {UC_1_N_MAX_PLANES, UC_31_VDS_HEIGHT, UC_31_VDS_WIDTH};
+static hsize_t UC_32_VDS_MAX_DIMS[RANK] = {UC_2_N_MAX_PLANES, UC_32_VDS_HEIGHT, UC_32_VDS_WIDTH};
+
+/* Positions of mapped source datasets */
+static hsize_t UC_32_POSITIONS[UC_2_N_SOURCES][RANK] = {
+ /* A */ {0, 1, 1},
+ /* B */ {0, 4, 0},
+ /* C */ {0, 11, 4},
+ /* D */ {0, 1, 9},
+ /* E */ {0, 8, 12}
+};
+
+/* VDS file names */
+#define UC_31_VDS_FILE_NAME "3_1_vds.h5"
+#define UC_32_VDS_FILE_NAME "3_2_vds.h5"
+
+/* Dataset name */
+#define UC_3_VDS_DSET_NAME "vds_dset"
+
+/* Fill value */
+static int UC_3_VDS_FILL_VALUE = -9;
+
+#endif /* UC_3_H */
+
diff --git a/tools/test/misc/vds/UC_3_gaps_gen.c b/tools/test/misc/vds/UC_3_gaps_gen.c
new file mode 100644
index 0000000..e6e7226
--- /dev/null
+++ b/tools/test/misc/vds/UC_3_gaps_gen.c
@@ -0,0 +1,253 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 3
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_3.h"
+
+/* Create the VDS that uses use case 1 files */
+static herr_t
+create_3_1_vds(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+
+ hsize_t start[RANK]; /* source starting point for hyperslab */
+ hsize_t position[RANK]; /* vds mapping positions */
+
+ int i; /* iterator */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_31_VDS_DATATYPE,
+ &UC_3_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_31_VDS_DIMS,
+ UC_31_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /* Set starting positions */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ position[0] = 0;
+ position[1] = UC_31_GAP;
+ position[2] = 0;
+
+ /******************************
+ * Create source-VDS mappings *
+ ******************************/
+ for(i = 0; i < UC_1_N_SOURCES; i++) {
+
+ if((src_sid = H5Screate_simple(RANK, UC_1_DIMS[i],
+ UC_1_MAX_DIMS[i])) < 0)
+ UC_ERROR
+
+ /* set up hyperslabs for source and destination datasets */
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, position,
+ NULL, UC_1_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ position[1] += UC_1_DIMS[i][1] + UC_31_GAP;
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_1_FILE_NAMES[i],
+ UC_1_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_31_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_31_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return 0;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ } H5E_END_TRY
+
+ return -1;
+
+} /* end create_3_1_vds() */
+
+/* Create the VDS that uses use case 2 files */
+static herr_t
+create_3_2_vds(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+
+ hsize_t start[RANK]; /* source starting point for hyperslab */
+
+ int i; /* iterator */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_32_VDS_DATATYPE,
+ &UC_3_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_32_VDS_DIMS,
+ UC_32_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /* Set starting positions */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+
+ /******************************
+ * Create source-VDS mappings *
+ ******************************/
+ for(i = 0; i < UC_2_N_SOURCES; i++) {
+
+ if((src_sid = H5Screate_simple(RANK, UC_2_DIMS[i],
+ UC_2_MAX_DIMS[i])) < 0)
+ UC_ERROR
+
+ /* set up hyperslabs for source and destination datasets */
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, UC_32_POSITIONS[i],
+ NULL, UC_2_MAX_DIMS[i], NULL) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_2_FILE_NAMES[i],
+ UC_2_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /*******************************
+ * Create VDS file and dataset *
+ *******************************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_32_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_3_VDS_DSET_NAME, UC_32_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return 0;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ } H5E_END_TRY
+
+ return -1;
+
+} /* end create_3_2_vds() */
+
+int
+main(void)
+{
+
+ if(create_3_1_vds() < 0)
+ UC_ERROR
+
+ if(create_3_2_vds() < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/test/misc/vds/UC_4.h b/tools/test/misc/vds/UC_4.h
new file mode 100644
index 0000000..5dba4fb
--- /dev/null
+++ b/tools/test/misc/vds/UC_4.h
@@ -0,0 +1,84 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_4_H
+#define UC_4_H
+
+#include "hdf5.h"
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 4
+ *
+ * Source datasets have three fixed dimensions. In this use case, the
+ * datasets are mapped consecutively in the VDS along a single dimension with
+ * no gaps between them. Datasets are automatically loaded using a
+ * printf-like format string for the file name.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes */
+
+#define UC_4_N_SOURCES 3
+
+/* Dataset dimensions */
+#define UC_4_SRC_PLANES 3
+#define UC_4_HEIGHT 4
+#define UC_4_WIDTH 4
+
+/* max number of planes for VDS (sources are finite) */
+#define UC_4_VDS_MAX_PLANES H5S_UNLIMITED
+#define UC_4_N_TEST_PLANES 9 /* number of planes in the VDS */
+
+/* Dataset datatypes */
+#define UC_4_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_4_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_4_SOURCE_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH};
+static hsize_t UC_4_VDS_DIMS[RANK] = {0, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* Max size of datasets, both source and VDS */
+static hsize_t UC_4_SOURCE_MAX_DIMS[RANK] = {UC_4_SRC_PLANES, UC_4_HEIGHT, UC_4_WIDTH};
+static hsize_t UC_4_VDS_MAX_DIMS[RANK] = {UC_4_VDS_MAX_PLANES, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* Planes (both source and VDS) */
+static hsize_t UC_4_PLANE[RANK] = {1, UC_4_HEIGHT, UC_4_WIDTH};
+
+/* File names for source datasets */
+static char UC_4_FILE_NAMES[UC_4_N_SOURCES][NAME_LEN] = {
+ {"4_0.h5"},
+ {"4_1.h5"},
+ {"4_2.h5"}
+};
+static char UC_4_MAPPING_FILE_NAME[NAME_LEN] = "4_%b.h5";
+
+/* VDS file name */
+static char UC_4_VDS_FILE_NAME[NAME_LEN] = "4_vds.h5";
+
+/* Dataset names */
+static char UC_4_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_4_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+static char UC_4_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static int UC_4_FILL_VALUES[UC_4_N_SOURCES] = {
+ -1,
+ -2,
+ -3
+};
+static int UC_4_VDS_FILL_VALUE = -9;
+
+#endif /* UC_4_H */
+
+
diff --git a/tools/test/misc/vds/UC_4_printf_gen.c b/tools/test/misc/vds/UC_4_printf_gen.c
new file mode 100644
index 0000000..b328046
--- /dev/null
+++ b/tools/test/misc/vds/UC_4_printf_gen.c
@@ -0,0 +1,217 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 4
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_4.h"
+
+int
+main(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ /* Hyperslab arrays */
+ hsize_t start[RANK] = {0, 0, 0};
+ hsize_t count[RANK] = {H5S_UNLIMITED, 1, 1};
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+
+ hsize_t n = 0; /* number of elements in a plane */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ hsize_t k; /* iterator */
+
+ /************************************
+ * Create source files and datasets *
+ ************************************/
+
+ /* Create source dataspace ID */
+ if((src_sid = H5Screate_simple(RANK, UC_4_SOURCE_DIMS,
+ UC_4_SOURCE_MAX_DIMS)) < 0)
+ UC_ERROR
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_4_SOURCE_MAX_DIMS, NULL) < 0)
+ UC_ERROR
+
+ /* Create source files and datasets */
+ for(i = 0; i < UC_4_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_4_PLANE) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_4_SOURCE_DATATYPE,
+ &UC_4_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file and dataset */
+ if((fid = H5Fcreate(UC_4_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_4_SOURCE_DSET_NAME,
+ UC_4_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent */
+ if(H5Dset_extent(did, UC_4_SOURCE_MAX_DIMS) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ n = UC_4_PLANE[1] * UC_4_PLANE[2];
+ if(NULL == (buffer = (int *)malloc(n * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_4_PLANE, NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset */
+ for(j = 0; j < UC_4_SRC_PLANES; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < n; k++)
+ buffer[k] = value;
+
+ start[0] = (hsize_t)j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_4_PLANE, NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* Create file */
+ if((fid = H5Fcreate(UC_4_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_4_VDS_DATATYPE,
+ &UC_4_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_4_VDS_DIMS,
+ UC_4_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start,
+ UC_4_SOURCE_MAX_DIMS, count, UC_4_SOURCE_MAX_DIMS) < 0)
+ UC_ERROR
+
+ /* Add VDS mapping - The mapped file name uses a printf-like
+ * naming scheme that automatically maps new files.
+ */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_4_MAPPING_FILE_NAME,
+ UC_4_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* Create dataset */
+ if((did = H5Dcreate2(fid, UC_4_VDS_DSET_NAME, UC_4_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/test/misc/vds/UC_5.h b/tools/test/misc/vds/UC_5.h
new file mode 100644
index 0000000..3f8fe41
--- /dev/null
+++ b/tools/test/misc/vds/UC_5.h
@@ -0,0 +1,81 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef UC_5_H
+#define UC_5_H
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+
+/*
+ * Definitions for VDS use case 5
+ *
+ * Source datasets have one unlimited dimension and two fixed dimensions. In
+ * this use case, the datasets are mapped in the VDS so that alternating
+ * planes in the source are interleaved in the VDS.
+ */
+
+/* virtual dataset <---> source dataset mapping and sizes */
+
+#define UC_5_N_SOURCES 3
+
+/* Dataset dimensions */
+#define UC_5_SRC_PLANES 3
+#define UC_5_HEIGHT 4
+#define UC_5_WIDTH 4
+
+/* max number of planes for datasets */
+#define UC_5_MAX_PLANES H5S_UNLIMITED
+#define UC_5_N_TEST_PLANES 9 /* number of planes in VDS */
+
+/* Dataset datatypes */
+#define UC_5_SOURCE_DATATYPE H5T_STD_I32LE
+#define UC_5_VDS_DATATYPE H5T_STD_I32LE
+
+/* Starting size of datasets, both source and VDS */
+static hsize_t UC_5_SOURCE_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH};
+static hsize_t UC_5_VDS_DIMS[RANK] = {0, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* Max size of datasets, both source and VDS */
+static hsize_t UC_5_SOURCE_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH};
+static hsize_t UC_5_VDS_MAX_DIMS[RANK] = {UC_5_MAX_PLANES, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* Planes (both source and VDS) */
+static hsize_t UC_5_PLANE[RANK] = {1, UC_5_HEIGHT, UC_5_WIDTH};
+
+/* File names for source datasets */
+static char UC_5_FILE_NAMES[UC_5_N_SOURCES][NAME_LEN] = {
+ {"5_a.h5"},
+ {"5_b.h5"},
+ {"5_c.h5"}
+};
+
+/* VDS file name */
+static char UC_5_VDS_FILE_NAME[NAME_LEN] = "5_vds.h5";
+
+/* Dataset names */
+static char UC_5_SOURCE_DSET_NAME[NAME_LEN] = "source_dset";
+static char UC_5_SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
+static char UC_5_VDS_DSET_NAME[NAME_LEN] = "vds_dset";
+
+/* Fill values */
+static int UC_5_FILL_VALUES[UC_5_N_SOURCES] = {
+ -1,
+ -2,
+ -3
+};
+static int UC_5_VDS_FILL_VALUE = -9;
+
+#endif /* UC_5_H */
+
diff --git a/tools/test/misc/vds/UC_5_stride_gen.c b/tools/test/misc/vds/UC_5_stride_gen.c
new file mode 100644
index 0000000..a105bbd
--- /dev/null
+++ b/tools/test/misc/vds/UC_5_stride_gen.c
@@ -0,0 +1,241 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * File/dataset generator for VDS use case 5
+ *
+ * See the header file for a description.
+ */
+
+#include <stdlib.h>
+
+#include <hdf5.h>
+
+#include "UC_common.h"
+#include "UC_5.h"
+
+int
+main(void)
+{
+ hid_t src_sid = -1; /* source dataset's dataspace ID */
+ hid_t src_dcplid = -1; /* source dataset property list ID */
+
+ hid_t vds_sid = -1; /* VDS dataspace ID */
+ hid_t vds_dcplid = -1; /* VDS dataset property list ID */
+
+ hid_t fid = -1; /* HDF5 file ID */
+ hid_t did = -1; /* dataset ID */
+ hid_t msid = -1; /* memory dataspace ID */
+ hid_t fsid = -1; /* file dataspace ID */
+
+ hsize_t extent[RANK]; /* source dataset extents */
+ hsize_t start[RANK]; /* starting point for hyperslab */
+ hsize_t stride[RANK]; /* hypserslab stride */
+ hsize_t count[RANK]; /* hypserslab count */
+ hsize_t map_start = 0; /* starting point in the VDS map */
+
+ int *buffer = NULL; /* data buffer */
+ int value = -1; /* value written to datasets */
+
+ hsize_t n = 0; /* number of elements in a plane */
+
+ int i; /* iterator */
+ int j; /* iterator */
+ hsize_t k; /* iterator */
+
+ /* Start by creating the virtual dataset (VDS) dataspace and creation
+ * property list. The individual source datasets are then created
+ * and the VDS map (stored in the VDS property list) is updated.
+ */
+
+ /* Create VDS dcpl */
+ if((vds_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(vds_dcplid, UC_5_VDS_DATATYPE,
+ &UC_5_VDS_FILL_VALUE) < 0)
+ UC_ERROR
+
+ /* Create VDS dataspace */
+ if((vds_sid = H5Screate_simple(RANK, UC_5_VDS_DIMS,
+ UC_5_VDS_MAX_DIMS)) < 0)
+ UC_ERROR
+
+ /*********************************
+ * Map source files and datasets *
+ *********************************/
+
+ /* Hyperslab array setup */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ map_start = 0;
+
+ stride[0] = UC_5_N_SOURCES;
+ stride[1] = 1;
+ stride[2] = 1;
+
+ count[0] = H5S_UNLIMITED;
+ count[1] = 1;
+ count[2] = 1;
+
+ extent[0] = UC_5_SRC_PLANES;
+ extent[1] = UC_5_HEIGHT;
+ extent[2] = UC_5_WIDTH;
+
+ for(i = 0; i < UC_5_N_SOURCES; i++) {
+
+ /* source dataset dcpl */
+ if((src_dcplid = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ UC_ERROR
+ if(H5Pset_chunk(src_dcplid, RANK, UC_5_PLANE) < 0)
+ UC_ERROR
+ if(H5Pset_fill_value(src_dcplid, UC_5_SOURCE_DATATYPE,
+ &UC_5_FILL_VALUES[i]) < 0)
+ UC_ERROR
+ if(H5Pset_deflate(src_dcplid, COMPRESSION_LEVEL) < 0)
+ UC_ERROR
+
+ /* Create source file, dataspace, and dataset */
+ if((fid = H5Fcreate(UC_5_FILE_NAMES[i], H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+ if((src_sid = H5Screate_simple(RANK, UC_5_SOURCE_DIMS,
+ UC_5_SOURCE_MAX_DIMS)) < 0)
+ UC_ERROR
+ if((did = H5Dcreate2(fid, UC_5_SOURCE_DSET_NAME,
+ UC_5_SOURCE_DATATYPE, src_sid,
+ H5P_DEFAULT, src_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* Set the dataset's extent */
+ if(H5Dset_extent(did, extent) < 0)
+ UC_ERROR
+
+ /* Create a data buffer that represents a plane */
+ n = UC_5_PLANE[1] * UC_5_PLANE[2];
+ if(NULL == (buffer = (int *)malloc(n * sizeof(int))))
+ UC_ERROR
+
+ /* Create the memory dataspace */
+ if((msid = H5Screate_simple(RANK, UC_5_PLANE, NULL)) < 0)
+ UC_ERROR
+
+ /* Get the file dataspace */
+ if((fsid = H5Dget_space(did)) < 0)
+ UC_ERROR
+
+ /* Write planes to the dataset */
+ for(j = 0; j < UC_5_SRC_PLANES; j++) {
+
+ value = ((i + 1) * 10) + j;
+ for(k = 0; k < n; k++)
+ buffer[k] = value;
+
+ start[0] = (hsize_t)j;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, UC_5_PLANE, NULL) < 0)
+ UC_ERROR
+ if(H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, buffer) < 0)
+ UC_ERROR
+
+ } /* end for */
+
+ /* set up hyperslabs for source and destination datasets */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ if(H5Sselect_hyperslab(src_sid, H5S_SELECT_SET, start, NULL,
+ UC_5_SOURCE_MAX_DIMS, NULL) < 0)
+ UC_ERROR
+ start[0] = map_start;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, start, stride,
+ count, UC_5_PLANE) < 0)
+ UC_ERROR
+ map_start += 1;
+
+ /* Add VDS mapping */
+ if(H5Pset_virtual(vds_dcplid, vds_sid, UC_5_FILE_NAMES[i],
+ UC_5_SOURCE_DSET_PATH, src_sid) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Sclose(msid) < 0)
+ UC_ERROR
+ if(H5Sclose(fsid) < 0)
+ UC_ERROR
+ if(H5Sclose(src_sid) < 0)
+ UC_ERROR
+ if(H5Pclose(src_dcplid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+ free(buffer);
+
+ } /* end for */
+
+ /*******************
+ * Create VDS file *
+ *******************/
+
+ /* file */
+ if((fid = H5Fcreate(UC_5_VDS_FILE_NAME, H5F_ACC_TRUNC,
+ H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* dataset */
+ if((did = H5Dcreate2(fid, UC_5_VDS_DSET_NAME, UC_5_VDS_DATATYPE, vds_sid,
+ H5P_DEFAULT, vds_dcplid, H5P_DEFAULT)) < 0)
+ UC_ERROR
+
+ /* close */
+ if(H5Pclose(vds_dcplid) < 0)
+ UC_ERROR
+ if(H5Sclose(vds_sid) < 0)
+ UC_ERROR
+ if(H5Dclose(did) < 0)
+ UC_ERROR
+ if(H5Fclose(fid) < 0)
+ UC_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+
+ H5E_BEGIN_TRY {
+ if(src_sid >= 0)
+ (void)H5Sclose(src_sid);
+ if(src_dcplid >= 0)
+ (void)H5Pclose(src_dcplid);
+ if(vds_sid >= 0)
+ (void)H5Sclose(vds_sid);
+ if(vds_dcplid >= 0)
+ (void)H5Pclose(vds_dcplid);
+ if(fid >= 0)
+ (void)H5Fclose(fid);
+ if(did >= 0)
+ (void)H5Dclose(did);
+ if(msid >= 0)
+ (void)H5Sclose(msid);
+ if(fsid >= 0)
+ (void)H5Sclose(fsid);
+ if(buffer != NULL)
+ free(buffer);
+ } H5E_END_TRY
+
+ return EXIT_FAILURE;
+
+} /* end main() */
+
diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h
new file mode 100644
index 0000000..962a091
--- /dev/null
+++ b/tools/test/misc/vds/UC_common.h
@@ -0,0 +1,39 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * 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 COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef USE_CASE_COMMON_H
+#define USE_CASE_COMMON_H
+
+/******************************************
+ * Symbols used across multiple use cases *
+ ******************************************/
+
+/* All datasets are 3D */
+#define RANK 3
+
+/* Lengths of string identifiers (file, dataset names, etc.) */
+#define NAME_LEN 32
+
+/* Compression level */
+#define COMPRESSION_LEVEL 7
+
+/* Booleans */
+#define TRUE 1
+#define FALSE 0
+
+/* Testing macros */
+#define AT() printf (" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
+#define UC_ERROR {puts("*ERROR*"); fflush(stdout); AT(); goto error;}
+
+#endif /* USE_CASE_COMMON_H */
+