summaryrefslogtreecommitdiffstats
path: root/HDF5Examples/FORTRAN/H5G
diff options
context:
space:
mode:
Diffstat (limited to 'HDF5Examples/FORTRAN/H5G')
-rw-r--r--HDF5Examples/FORTRAN/H5G/CMakeLists.txt356
-rw-r--r--HDF5Examples/FORTRAN/H5G/Fortran_sourcefiles.cmake17
-rw-r--r--HDF5Examples/FORTRAN/H5G/Makefile.am33
-rw-r--r--HDF5Examples/FORTRAN/H5G/h5ex_g_compact.F90114
-rw-r--r--HDF5Examples/FORTRAN/H5G/h5ex_g_corder.F9097
-rw-r--r--HDF5Examples/FORTRAN/H5G/h5ex_g_create.F9042
-rw-r--r--HDF5Examples/FORTRAN/H5G/h5ex_g_phase.F90113
-rwxr-xr-xHDF5Examples/FORTRAN/H5G/test.sh.in118
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_iterate_F03.tst5
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_traverse_F03.tst32
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_visit_F03.tst8
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact1.ddl6
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact2.ddl6
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_corder.tst11
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_create.ddl6
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_iterate_F03.tst5
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_phase.tst15
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_traverse_F03.tst32
-rw-r--r--HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_visit_F03.tst8
19 files changed, 1024 insertions, 0 deletions
diff --git a/HDF5Examples/FORTRAN/H5G/CMakeLists.txt b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt
new file mode 100644
index 0000000..d2587e0
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/CMakeLists.txt
@@ -0,0 +1,356 @@
+cmake_minimum_required (VERSION 3.12)
+project (HDF5Examples_FORTRAN_H5G C CXX Fortran)
+
+# --------------------------------------------------------------------
+# Notes: When creating examples they should be prefixed
+# with "f90_". This allows for easier filtering of the examples.
+# --------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# Setup include Directories
+#-----------------------------------------------------------------------------
+INCLUDE_DIRECTORIES (
+ ${CMAKE_Fortran_MODULE_DIRECTORY}
+ ${PROJECT_BINARY_DIR}
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+)
+
+#-----------------------------------------------------------------------------
+# Define Sources
+#-----------------------------------------------------------------------------
+include (Fortran_sourcefiles.cmake)
+
+foreach (example_name ${common_examples})
+ add_executable (${EXAMPLE_VARNAME}_f90_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.F90)
+ target_compile_options(${EXAMPLE_VARNAME}_f90_${example_name}
+ PRIVATE
+ "-DH5_LIBVER_DIR=${H5_LIBVER_DIR}"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_16_API}>:-DH5_USE_16_API>"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_18_API}>:-DH5_USE_18_API>"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_110_API}>:-DH5_USE_110_API>"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_112_API}>:-DH5_USE_112_API>"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_114_API}>:-DH5_USE_114_API>"
+ "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_116_API}>:-DH5_USE_116_API>"
+ )
+ if (H5_HAVE_PARALLEL)
+ target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
+ endif ()
+ target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${LINK_Fortran_LIBS})
+ set_target_properties (${EXAMPLE_VARNAME}_f90_${example_name} PROPERTIES LINKER_LANGUAGE Fortran)
+ if (H5EX_BUILD_TESTING)
+ if (NOT ${example_name} STREQUAL "h5ex_g_create" AND NOT ${example_name} STREQUAL "h5ex_g_compact")
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+ )
+ endif ()
+ endif ()
+endforeach ()
+
+#if (HDF_ENABLE_F2003)
+# foreach (example_name ${f03examples})
+# add_executable (${EXAMPLE_VARNAME}_f90_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.c)
+# target_compile_options(${EXAMPLE_VARNAME}_f90_${example_name}
+# PRIVATE
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_16_API}>:-DH5_USE_16_API>"
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_18_API}>:-DH5_USE_18_API>"
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_110_API}>:-DH5_USE_110_API>"
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_112_API}>:-DH5_USE_112_API>"
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_114_API}>:-DH5_USE_114_API>"
+# "$<$<BOOL:${${EXAMPLE_VARNAME}_USE_116_API}>:-DH5_USE_116_API>"
+# )
+# if (H5_HAVE_PARALLEL)
+# target_include_directories (${EXAMPLE_VARNAME}_f90_${example_name} PUBLIC ${MPI_C_INCLUDE_DIRS})
+# endif ()
+# target_link_libraries (${EXAMPLE_VARNAME}_f90_${example_name} ${H5EX_HDF5_LINK_LIBS})
+# if (H5EX_BUILD_TESTING)
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/F03/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+# )
+# endif ()
+# endforeach ()
+#endif ()
+
+#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.10")
+# foreach (example_name ${1_10_examples})
+# if (H5EX_BUILD_TESTING)
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/110/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+# )
+# endif ()
+# endforeach ()
+#endif ()
+#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12")
+# foreach (example_name ${1_12_examples})
+# if (H5EX_BUILD_TESTING)
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/112/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+# )
+# endif ()
+# endforeach ()
+#endif ()
+#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.14")
+# foreach (example_name ${1_14_examples})
+# if (H5EX_BUILD_TESTING)
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+# )
+# endif ()
+# endforeach ()
+#endif ()
+#if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.16")
+# foreach (example_name ${1_16_examples})
+# if (H5EX_BUILD_TESTING)
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/116/${example_name}.tst ${PROJECT_BINARY_DIR}/${example_name}.tst
+# )
+# endif ()
+# endforeach ()
+#endif ()
+
+if (HDF5_BUILD_TOOLS)
+ foreach (example_name ${common_examples})
+ if (${example_name} STREQUAL "h5ex_g_create")
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+ )
+ endif ()
+ endforeach ()
+
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_f90_h5ex_g_compact
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/h5ex_g_compact1.ddl ${PROJECT_BINARY_DIR}/h5ex_g_compact1.ddl
+ )
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_f90_h5ex_g_compact
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/h5ex_g_compact2.ddl ${PROJECT_BINARY_DIR}/h5ex_g_compact2.ddl
+ )
+endif ()
+
+#if (HDF_ENABLE_F2003)
+# foreach (example_name ${f03examples})
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example_name}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/F03/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+# )
+# endforeach ()
+
+# foreach (example_name ${1_10_examples})
+# endforeach ()
+# foreach (example_name ${1_12_examples})
+# endforeach ()
+# foreach (example_name ${1_14_examples})
+# endforeach ()
+# foreach (example_name ${1_16_examples})
+# endforeach ()
+#endif ()
+
+if (H5EX_BUILD_TESTING)
+# if (HDF_ENABLE_F2003)
+# set (exfiles
+# h5ex_g_iterate
+# h5ex_g_traverse
+# h5ex_g_visit
+# )
+# foreach (example ${exfiles})
+# add_custom_command (
+# TARGET ${EXAMPLE_VARNAME}_f90_${example}
+# POST_BUILD
+# COMMAND ${CMAKE_COMMAND}
+# ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${example}.h5 ${PROJECT_BINARY_DIR}/${example}.h5
+# )
+# endforeach ()
+# endif ()
+
+ macro (ADD_DUMP_TEST testname)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}-clearall
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testname}.h5
+ )
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_f90_${testname}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname}-clearall)
+ if (HDF5_BUILD_TOOLS)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
+ -D "TEST_ARGS:STRING=${ARGN};${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=${testname}.ddl"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname})
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_DUMP_TEST testname)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_f90_${testname}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_REFERENCE=${testname}.tst"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ if (HDF5_BUILD_TOOLS)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
+ -D "TEST_ARGS:STRING=${ARGN};${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testname}.ddl.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=${testname}.ddl"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname})
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_DUMP2_TEST testname)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}-clearall
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testname}1.h5
+ ${testname}2.h5
+ )
+ if (${ARGN} STREQUAL "NULL")
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_f90_${testname}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ else ()
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_f90_${testname}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_REFERENCE=${testname}.tst"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (${EXAMPLE_VARNAME}_f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname}-clearall)
+ if (HDF5_BUILD_TOOLS)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
+ -D "TEST_ARGS:STRING=${testname}1.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testname}1.ddl.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=${testname}1.ddl"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}1 PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname})
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}2
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${H5EX_HDF5_DUMP_EXECUTABLE}"
+ -D "TEST_ARGS:STRING=${testname}2.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testname}2.ddl.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=${testname}2.ddl"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}2 PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_H5DUMP-f90_${testname}1)
+ endif ()
+ endmacro ()
+
+ macro (ADD_H5_CMP_TEST testname)
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}-clearall
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testname}.out.tmp
+ )
+ add_test (
+ NAME ${EXAMPLE_VARNAME}_f90_${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${EXAMPLE_VARNAME}_f90_${testname}>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_REFERENCE=${testname}.tst"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_LIB_DIRECTORY}"
+ -P "${${EXAMPLE_PACKAGE_NAME}_RESOURCES_DIR}/runTest.cmake"
+ )
+ set_tests_properties (${EXAMPLE_VARNAME}_f90_${testname} PROPERTIES DEPENDS ${EXAMPLE_VARNAME}_f90_${testname}-clearall)
+ endmacro ()
+
+ ADD_H5_DUMP2_TEST (h5ex_g_compact NULL)
+ ADD_DUMP_TEST (h5ex_g_create)
+ ADD_H5_CMP_TEST (h5ex_g_corder)
+ ADD_H5_CMP_TEST (h5ex_g_phase)
+# if (HDF_ENABLE_F2003)
+# ADD_H5_CMP_TEST (h5ex_g_iterate_F03)
+# ADD_H5_CMP_TEST (h5ex_g_traverse_F03)
+# ADD_H5_CMP_TEST (h5ex_g_visit_F03)
+# endif ()
+
+endif ()
diff --git a/HDF5Examples/FORTRAN/H5G/Fortran_sourcefiles.cmake b/HDF5Examples/FORTRAN/H5G/Fortran_sourcefiles.cmake
new file mode 100644
index 0000000..fa38fe6
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/Fortran_sourcefiles.cmake
@@ -0,0 +1,17 @@
+#-----------------------------------------------------------------------------
+# Define Sources, one file per application
+#-----------------------------------------------------------------------------
+set (examples)
+
+set (common_examples
+ h5ex_g_compact
+ h5ex_g_corder
+ h5ex_g_phase
+ h5ex_g_create
+)
+
+#set (f03_examples
+# h5ex_g_iterate_F03
+# h5ex_g_traverse_F03
+# h5ex_g_visit_F03
+#)
diff --git a/HDF5Examples/FORTRAN/H5G/Makefile.am b/HDF5Examples/FORTRAN/H5G/Makefile.am
new file mode 100644
index 0000000..39f13c6
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/Makefile.am
@@ -0,0 +1,33 @@
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF5 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help@hdfgroup.org.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+##
+noinst_PROGRAMS = h5ex_g_compact h5ex_g_create \
+ h5ex_g_corder h5ex_g_phase
+
+h5ex_g_compact_SOURCES = h5ex_g_compact.F90
+h5ex_g_create_SOURCES = h5ex_g_create.F90
+h5ex_g_corder_SOURCES = h5ex_g_corder.F90
+h5ex_g_phase_SOURCES = h5ex_g_phase.F90
+
+EXTRA_DIST = tfiles/h5ex_g_create.ddl \
+tfiles/h5ex_g_compact1.ddl tfiles/h5ex_g_compact2.ddl tfiles/h5ex_g_corder.tst \
+tfiles/h5ex_g_phase.tst \
+test.sh
+
+TESTS = test.sh
+
+CLEANFILES = Makefile test.sh
diff --git a/HDF5Examples/FORTRAN/H5G/h5ex_g_compact.F90 b/HDF5Examples/FORTRAN/H5G/h5ex_g_compact.F90
new file mode 100644
index 0000000..9625b22
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/h5ex_g_compact.F90
@@ -0,0 +1,114 @@
+!************************************************************
+!
+! This example shows how to create "compact-or-indexed"
+! format groups, new to 1.8. This example also illustrates
+! the space savings of compact groups by creating 2 files
+! which are identical except for the group format, and
+! displaying the file size of each. Both files have one
+! empty group in the root group.
+!
+! This file is intended for use with HDF5 Library version 1.8
+!
+!************************************************************
+
+PROGRAM main
+
+ USE HDF5
+ IMPLICIT NONE
+
+ CHARACTER(LEN=18), PARAMETER :: filename1 = "h5ex_g_compact1.h5"
+ CHARACTER(LEN=18), PARAMETER :: filename2 = "h5ex_g_compact2.h5"
+ CHARACTER(LEN=2) , PARAMETER :: groupname = "G1"
+
+ INTEGER(HID_T) :: file, group, fapl ! handles
+ INTEGER :: hdferr
+ INTEGER :: storage_type ! Type of storage for links in group:
+ ! H5G_STORAGE_TYPE_COMPACT: Compact storage
+ ! H5G_STORAGE_TYPE_DENSE: Indexed storage
+ ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables
+ INTEGER :: nlinks ! Number of links in group
+ INTEGER :: max_corder ! Current maximum creation order value for group
+ INTEGER(HSIZE_T) :: size
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(hdferr)
+ !
+ ! Create file 1. This file will use original format groups.
+ !
+ CALL h5fcreate_f(filename1, H5F_ACC_TRUNC_F, file, hdferr)
+ CALL h5gcreate_f(file, groupname, group, hdferr)
+ !
+ ! Obtain the group info and print the group storage type.
+ !
+ CALL H5Gget_info_f(group, storage_type, nlinks, max_corder, hdferr)
+
+ WRITE(*,'("Group storage type for ",A," is: ")', ADVANCE='NO' ) filename1
+
+ IF(storage_type.EQ.H5G_STORAGE_TYPE_COMPACT_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_COMPACT_F")') ! New compact format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_DENSE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_DENSE_F")') ! New dense (indexed) format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_SYMBOL_TABLE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_SYMBOL_TABLE_F")') ! Original format
+ ENDIF
+ !
+ ! Close and re-open file. Needed to get the correct file size.
+ !
+ CALL h5gclose_f(group, hdferr)
+ CALL h5fclose_f(file , hdferr)
+ CALL h5fopen_f(filename1, H5F_ACC_RDONLY_F, file, hdferr)
+ !
+ ! Obtain and print the file size.
+ !
+ CALL h5fget_filesize_f(file, size, hdferr)
+ WRITE(*,'("File size for ",A," is: ",i6," bytes",/)') filename1, size
+ !
+ ! Close filename1
+ !
+ CALL h5fclose_f(file, hdferr)
+ !
+ ! Set file access property list to allow the latest file format.
+ ! This will allow the library to create new compact format groups.
+ !
+ CALL h5pcreate_f (H5P_FILE_ACCESS_F, fapl, hdferr)
+ CALL h5pset_libver_bounds_f (fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, hdferr)
+ !
+ ! Create file 2 using the new file access property list.
+ !
+ CALL h5fcreate_f(filename2, H5F_ACC_TRUNC_F, file, hdferr, access_prp=fapl)
+ CALL h5gcreate_f(file, groupname, group, hdferr)
+ !
+ ! Obtain the group info and print the group storage type.
+ !
+ CALL H5Gget_info_f(group, storage_type, nlinks, max_corder, hdferr)
+
+ WRITE(*,'("Group storage type for ",A," is: ")', ADVANCE='NO' ) filename2
+
+ IF(storage_type.EQ.H5G_STORAGE_TYPE_COMPACT_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_COMPACT_F")') ! New compact format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_DENSE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_DENSE_F")') ! New dense (indexed) format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_SYMBOL_TABLE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_SYMBOL_TABLE_F")') ! Original format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_UNKNOWN_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_UNKNOWN_F")') ! Unknown format
+ ENDIF
+ !
+ ! Close and re-open file. Needed to get the correct file size.
+ !
+ CALL h5gclose_f(group, hdferr)
+ CALL h5fclose_f(file , hdferr)
+ CALL h5fopen_f(filename2, H5F_ACC_RDONLY_F, file, hdferr, fapl)
+ !
+ ! Obtain and print the file size.
+ !
+ CALL h5fget_filesize_f(file, size, hdferr)
+ WRITE(*,'("File size for ",A," is: ",i6,"bytes",/)') filename2, size
+ !
+ ! Close and release resources.
+ !
+ CALL h5pclose_f(fapl, hdferr)
+ CALL h5fclose_f(file, hdferr)
+
+END PROGRAM main
diff --git a/HDF5Examples/FORTRAN/H5G/h5ex_g_corder.F90 b/HDF5Examples/FORTRAN/H5G/h5ex_g_corder.F90
new file mode 100644
index 0000000..5418e34
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/h5ex_g_corder.F90
@@ -0,0 +1,97 @@
+!************************************************************
+!
+! This example shows how to track links in a group by
+! creation order. The program creates a series of groups,
+! then reads back their names: first in alphabetical order,
+! then in creation order.
+!
+! This file is intended for use with HDF5 Library version 1.8
+!
+!************************************************************
+
+PROGRAM main
+
+ USE HDF5
+ IMPLICIT NONE
+
+ CHARACTER(LEN=16), PARAMETER :: filename = "h5ex_g_corder.h5"
+
+ INTEGER(HID_T) :: file, group, subgroup, gcpl ! handles
+ INTEGER :: hdferr
+ INTEGER :: storage_type ! Type of storage for links in group:
+ ! H5G_STORAGE_TYPE_COMPACT: Compact storage
+ ! H5G_STORAGE_TYPE_DENSE: Indexed storage
+ ! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables
+ INTEGER :: nlinks ! Number of links in group
+ INTEGER :: max_corder ! Current maximum creation order value for group
+ INTEGER(SIZE_T) :: size ! Size of name
+ INTEGER(HSIZE_T) :: i ! Index
+ CHARACTER(LEN=80) :: name ! Output buffer
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(hdferr)
+ !
+ ! Create a new file using the default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, hdferr)
+ !
+ ! Create group creation property list and enable link creation
+ ! order tracking. Attempting to track by creation order in a
+ ! group that does not have this property set will result in an
+ ! error.
+ !
+ CALL h5pcreate_f(H5P_GROUP_CREATE_F, gcpl, hdferr)
+ CALL h5pset_link_creation_order_f( gcpl, IOR(H5P_CRT_ORDER_TRACKED_F,H5P_CRT_ORDER_INDEXED_F),hdferr)
+ !
+ ! Create primary group using the property list.
+ !
+ CALL h5gcreate_f(file, "index_group", group, hdferr, gcpl_id=gcpl)
+ !
+ ! Create subgroups in the primary group. These will be tracked
+ ! by creation order. Note that these groups do not have to have
+ ! the creation order tracking property set.
+ !
+ CALL h5gcreate_f(group, "H", subgroup, hdferr)
+ CALL h5gclose_f(subgroup,hdferr)
+ CALL h5gcreate_f(group, "D", subgroup, hdferr)
+ CALL h5gclose_f(subgroup,hdferr)
+ CALL h5gcreate_f(group, "F", subgroup, hdferr)
+ CALL h5gclose_f(subgroup,hdferr)
+ CALL h5gcreate_f(group, "5", subgroup, hdferr)
+ CALL h5gclose_f(subgroup,hdferr)
+ !
+ ! Get group info.
+ !
+ CALL H5Gget_info_f(group, storage_type, nlinks, max_corder, hdferr)
+ !
+ ! Traverse links in the primary group using alphabetical indices
+ ! (H5_INDEX_NAME).
+ !
+ WRITE(*,'("Traversing group using alphabetical indices:")')
+ DO i = 0, nlinks-1
+ !
+ ! Get name and size of name
+ !
+ CALL H5Lget_name_by_idx_f(group, ".", H5_INDEX_NAME_F, H5_ITER_INC_F, i, name, hdferr, size)
+ WRITE(*,'("Index ",i2,": ",A)') INT(i), TRIM(name)
+ ENDDO
+ !
+ !Traverse links in the primary group by creation order
+ ! (H5_INDEX_CRT_ORDER).
+ !
+ WRITE(*,'(/,"Traversing group using creation order indices:")')
+ DO i = 0, nlinks-1
+ !
+ ! Get name and size of name
+ !
+ CALL H5Lget_name_by_idx_f(group, ".", H5_INDEX_CRT_ORDER_F, H5_ITER_INC_F, i, name, hdferr, size)
+ WRITE(*,'("Index ",i2,": ",A)') INT(i), TRIM(name)
+ ENDDO
+ !
+ ! Close and release resources.
+ !
+ CALL h5pclose_f(gcpl, hdferr)
+ CALL h5gclose_f(group, hdferr)
+ CALL h5fclose_f(file, hdferr)
+END PROGRAM main
diff --git a/HDF5Examples/FORTRAN/H5G/h5ex_g_create.F90 b/HDF5Examples/FORTRAN/H5G/h5ex_g_create.F90
new file mode 100644
index 0000000..5812a97
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/h5ex_g_create.F90
@@ -0,0 +1,42 @@
+!************************************************************
+!
+! This example shows how to create, open, and close a group.
+!
+! This file is intended for use with HDF5 Library version 1.8
+!
+!************************************************************
+PROGRAM main
+
+ USE HDF5
+ IMPLICIT NONE
+
+ CHARACTER(LEN=16), PARAMETER :: filename = "h5ex_g_create.h5"
+ INTEGER(HID_T) :: file, group ! Handles
+ INTEGER :: hdferr
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(hdferr)
+ !
+ ! Create a new file using the default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, hdferr)
+ !
+ ! Create a group named "G1" in the file.
+ !
+ CALL h5gcreate_f(file, "/G1", group, hdferr)
+ !
+ ! Close the group. The handle "group" can no longer be used.
+ !
+ CALL h5gclose_f(group,hdferr)
+ !
+ ! Re-open the group, obtaining a new handle.
+ !
+ CALL h5gopen_f(file, "/G1", group, hdferr)
+ !
+ ! Close and release resources.
+ !
+ CALL h5gclose_f(group, hdferr)
+ CALL h5fclose_f(file , hdferr)
+
+END PROGRAM main
diff --git a/HDF5Examples/FORTRAN/H5G/h5ex_g_phase.F90 b/HDF5Examples/FORTRAN/H5G/h5ex_g_phase.F90
new file mode 100644
index 0000000..d9cfd69
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/h5ex_g_phase.F90
@@ -0,0 +1,113 @@
+!************************************************************
+!
+! This example shows how to set the conditions for
+! conversion between compact and dense (indexed) groups.
+!
+! This file is intended for use with HDF5 Library version 1.8
+!
+!************************************************************
+PROGRAM main
+
+ USE HDF5
+ IMPLICIT NONE
+
+ CHARACTER(LEN=15), PARAMETER :: filename = "h5ex_g_phase.h5"
+ INTEGER, PARAMETER :: MAX_GROUPS = 7
+ INTEGER, PARAMETER :: MAX_COMPACT = 5
+ INTEGER, PARAMETER :: MIN_DENSE = 3
+
+ INTEGER(HID_T) :: file, group, subgroup, fapl, gcpl ! handles
+ INTEGER :: hdferr
+ INTEGER :: storage_type ! Type of storage for links in group:
+ ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage
+ ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage
+ ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables
+ INTEGER :: nlinks ! Number of links in group
+ INTEGER :: max_corder ! Current maximum creation order value for group
+ CHARACTER(LEN=2) :: name = "G0" ! Name of subgroup
+ INTEGER :: i
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(hdferr)
+ !
+ ! Set file access property list to allow the latest file format.
+ ! This will allow the library to create new format groups.
+ !
+ CALL h5pcreate_f (H5P_FILE_ACCESS_F, fapl, hdferr)
+ CALL h5pset_libver_bounds_f (fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, hdferr)
+ !
+ ! Create group access property list and set the phase change
+ ! conditions. In this example we lowered the conversion threshold
+ ! to simplify the output, though this may not be optimal.
+ !
+ CALL h5pcreate_f (H5P_GROUP_CREATE_F, gcpl, hdferr)
+ CALL h5pset_link_phase_change_f (gcpl, MAX_COMPACT, MIN_DENSE, hdferr)
+ !
+ ! Create a new file using the default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file, hdferr, access_prp=fapl )
+ !
+ ! Create primary group.
+ !
+ CALL h5gcreate_f(file, name, group, hdferr, gcpl_id=gcpl)
+ !
+ ! Add subgroups to "group" one at a time, print the storage type
+ ! for "group" after each subgroup is created.
+ !
+ DO i = 1, MAX_GROUPS
+ !
+ ! Define the subgroup name and create the subgroup.
+ !
+ WRITE(name,'(A,I1)') "G",i ! G1, G2, G3 etc.
+
+ CALL h5gcreate_f(group, name, subgroup, hdferr)
+ CALL h5gclose_f(subgroup, hdferr)
+ !
+ ! Obtain the group info and print the group storage type
+ !
+ CALL H5Gget_info_f(group, storage_type, nlinks, max_corder, hdferr)
+ WRITE(*,'(I1," Groups: Storage type is ")', ADVANCE='NO') nlinks
+ IF(storage_type.EQ. H5G_STORAGE_TYPE_COMPACT_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_COMPACT_F")') ! New compact format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_DENSE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_DENSE_F")') ! New dense (indexed) format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_SYMBOL_TABLE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_SYMBOL_TABLE")') ! Original format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_UNKNOWN_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_UNKNOWN_F")') ! Unknown format
+ END IF
+ ENDDO
+ WRITE(*,'()')
+ !
+ ! Delete subgroups one at a time, print the storage type for
+ !"group" after each subgroup is deleted.
+ !
+ DO i = MAX_GROUPS,1, -1
+ !
+ ! Define the subgroup name and delete the subgroup.
+ !
+ WRITE(name,'(A,I1)') "G",i ! G1, G2, G3 etc.
+ CALL h5ldelete_f(group, name, hdferr)
+ !
+ ! Obtain the group info and print the group storage type
+ !
+ CALL H5Gget_info_f(group, storage_type, nlinks, max_corder, hdferr)
+ WRITE(*,'(I1," Groups: Storage type is ")', ADVANCE='NO') nlinks
+ IF(storage_type.EQ. H5G_STORAGE_TYPE_COMPACT_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_COMPACT_F")') ! New compact format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_DENSE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_DENSE_F")') ! New dense (indexed) format
+ ELSE IF(storage_type.EQ.H5G_STORAGE_TYPE_SYMBOL_TABLE_F)THEN
+ WRITE(*,'("H5G_STORAGE_TYPE_SYMBOL_TABLE")') ! Original format
+ END IF
+ ENDDO
+ !
+ ! Close and release resources.
+ !
+ CALL h5pclose_f(fapl, hdferr)
+ CALL h5pclose_f(gcpl, hdferr)
+ CALL h5gclose_f(group, hdferr)
+ CALL h5fclose_f(file, hdferr)
+
+END PROGRAM main
diff --git a/HDF5Examples/FORTRAN/H5G/test.sh.in b/HDF5Examples/FORTRAN/H5G/test.sh.in
new file mode 100755
index 0000000..e2082e9
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/test.sh.in
@@ -0,0 +1,118 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF5 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help@hdfgroup.org.
+
+srcdir=@srcdir@
+
+
+case $FC in
+*/*) H5DUMP=`echo $FC | sed -e 's/\/[^/]*$/\/h5dump/'`;
+ test -x $H5DUMP || H5DUMP=h5dump;;
+*) H5DUMP=h5dump;;
+esac
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ;;
+ *) ECHO_N= ECHO_C='\c' ;;
+esac
+ECHO_N="echo $ECHO_N"
+
+
+exout() {
+ $*
+}
+
+dumpout() {
+ $H5DUMP $*
+}
+
+H5_LIBVER=@H5_LIBVER@
+H5_LIBVER_DIR=@H5_LIBVER_DIR@
+
+return_val=0
+
+
+$ECHO_N "Testing FORTRAN/H5G/h5ex_g_create...$ECHO_C"
+./h5ex_g_create
+dumpout h5ex_g_create.h5 >tmp.test
+rm -f h5ex_g_create.h5
+cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_create.ddl
+status=$?
+if test $status -ne 0
+then
+ echo " FAILED!"
+else
+ echo " Passed"
+fi
+return_val=`expr $status + $return_val`
+
+
+$ECHO_N "Testing FORTRAN/H5G/h5ex_g_compact...$ECHO_C"
+./h5ex_g_compact >/dev/null
+dumpout h5ex_g_compact1.h5 >tmp.test
+cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact1.ddl
+status=$?
+if test $status -ne 0
+then
+ echo " FAILED!"
+else
+ dumpout h5ex_g_compact2.h5 >tmp.test
+ cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact2.ddl
+ status=$?
+ if test $status -ne 0
+ then
+ echo " FAILED!"
+ else
+ echo " Passed"
+ fi
+fi
+return_val=`expr $status + $return_val`
+rm -f h5ex_g_compact1.h5
+rm -f h5ex_g_compact2.h5
+
+
+$ECHO_N "Testing FORTRAN/H5G/h5ex_g_phase...$ECHO_C"
+exout ./h5ex_g_phase >tmp.test
+cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_phase.tst
+status=$?
+if test $status -ne 0
+then
+ echo " FAILED!"
+else
+ echo " Passed"
+fi
+return_val=`expr $status + $return_val`
+rm -f h5ex_g_phase.h5
+
+
+$ECHO_N "Testing FORTRAN/H5G/h5ex_g_corder...$ECHO_C"
+exout ./h5ex_g_corder >tmp.test
+cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_corder.tst
+status=$?
+if test $status -ne 0
+then
+ echo " FAILED!"
+else
+ echo " Passed"
+fi
+return_val=`expr $status + $return_val`
+rm -f h5ex_g_corder.h5
+
+
+rm -f tmp.test
+echo "$return_val tests failed in /FORTRAN/H5G/"
+exit $return_val
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_iterate_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_iterate_F03.tst
new file mode 100644
index 0000000..10eb221
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_iterate_F03.tst
@@ -0,0 +1,5 @@
+Objects in root group:
+ Dataset: DS1
+ Datatype: DT1
+ Group: G1
+ Dataset: L1
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_traverse_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_traverse_F03.tst
new file mode 100644
index 0000000..9d44d2f
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_traverse_F03.tst
@@ -0,0 +1,32 @@
+/ {
+ Group: group1 {
+ Dataset: dset1
+ Group: group3 {
+ Dataset: dset2
+ Group: group4 {
+ Group: group1 {
+ Group: group5 {
+ Warning: Loop detected!
+ }
+ }
+ Group: group2 {
+ }
+ }
+ }
+ }
+ Group: group2 {
+ Dataset: dset2
+ Group: group4 {
+ Group: group1 {
+ Group: group5 {
+ Dataset: dset1
+ Group: group3 {
+ Warning: Loop detected!
+ }
+ }
+ }
+ Group: group2 {
+ }
+ }
+ }
+}
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_visit_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_visit_F03.tst
new file mode 100644
index 0000000..1a1e825
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/F03/h5ex_g_visit_F03.tst
@@ -0,0 +1,8 @@
+Objects in the file:
+/ (Group)
+/group1 (Group)
+/group1/dset1 (Dataset)
+/group1/group3 (Group)
+/group1/group3/group4 (Group)
+/group1/group3/group4/group1 (Group)
+/group1/group3/group4/group2 (Group)
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact1.ddl b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact1.ddl
new file mode 100644
index 0000000..9bcd0a0
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact1.ddl
@@ -0,0 +1,6 @@
+HDF5 "h5ex_g_compact1.h5" {
+GROUP "/" {
+ GROUP "G1" {
+ }
+}
+}
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact2.ddl b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact2.ddl
new file mode 100644
index 0000000..0016bb9
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_compact2.ddl
@@ -0,0 +1,6 @@
+HDF5 "h5ex_g_compact2.h5" {
+GROUP "/" {
+ GROUP "G1" {
+ }
+}
+}
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_corder.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_corder.tst
new file mode 100644
index 0000000..d238daa
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_corder.tst
@@ -0,0 +1,11 @@
+Traversing group using alphabetical indices:
+Index 0: 5
+Index 1: D
+Index 2: F
+Index 3: H
+
+Traversing group using creation order indices:
+Index 0: H
+Index 1: D
+Index 2: F
+Index 3: 5
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_create.ddl b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_create.ddl
new file mode 100644
index 0000000..d180d82
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_create.ddl
@@ -0,0 +1,6 @@
+HDF5 "h5ex_g_create.h5" {
+GROUP "/" {
+ GROUP "G1" {
+ }
+}
+}
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_iterate_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_iterate_F03.tst
new file mode 100644
index 0000000..10eb221
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_iterate_F03.tst
@@ -0,0 +1,5 @@
+Objects in root group:
+ Dataset: DS1
+ Datatype: DT1
+ Group: G1
+ Dataset: L1
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_phase.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_phase.tst
new file mode 100644
index 0000000..43222fb
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_phase.tst
@@ -0,0 +1,15 @@
+1 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+2 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+3 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+4 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+5 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+6 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+7 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+
+6 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+5 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+4 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+3 Groups: Storage type is H5G_STORAGE_TYPE_DENSE_F
+2 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+1 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
+0 Groups: Storage type is H5G_STORAGE_TYPE_COMPACT_F
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_traverse_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_traverse_F03.tst
new file mode 100644
index 0000000..9d44d2f
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_traverse_F03.tst
@@ -0,0 +1,32 @@
+/ {
+ Group: group1 {
+ Dataset: dset1
+ Group: group3 {
+ Dataset: dset2
+ Group: group4 {
+ Group: group1 {
+ Group: group5 {
+ Warning: Loop detected!
+ }
+ }
+ Group: group2 {
+ }
+ }
+ }
+ }
+ Group: group2 {
+ Dataset: dset2
+ Group: group4 {
+ Group: group1 {
+ Group: group5 {
+ Dataset: dset1
+ Group: group3 {
+ Warning: Loop detected!
+ }
+ }
+ }
+ Group: group2 {
+ }
+ }
+ }
+}
diff --git a/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_visit_F03.tst b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_visit_F03.tst
new file mode 100644
index 0000000..1a1e825
--- /dev/null
+++ b/HDF5Examples/FORTRAN/H5G/tfiles/18/h5ex_g_visit_F03.tst
@@ -0,0 +1,8 @@
+Objects in the file:
+/ (Group)
+/group1 (Group)
+/group1/dset1 (Dataset)
+/group1/group3 (Group)
+/group1/group3/group4 (Group)
+/group1/group3/group4/group1 (Group)
+/group1/group3/group4/group2 (Group)