summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt26
-rw-r--r--MANIFEST54
-rw-r--r--README.txt2
-rwxr-xr-xbin/cmakehdf5196
-rw-r--r--c++/CMakeLists.txt2
-rw-r--r--c++/examples/CMakeLists.txt2
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/src/Makefile.in2
-rw-r--r--c++/test/CMakeLists.txt2
-rw-r--r--config/cmake/CPack.cmake597
-rw-r--r--config/cmake/ConfigureChecks.cmake7
-rw-r--r--config/cmake/H5pubconf.h.in3
-rw-r--r--config/cmake/HDF5UseFortran.cmake4
-rw-r--r--config/cmake/prunTest.cmake26
-rw-r--r--config/cmake/runTest.cmake67
-rw-r--r--config/lt_vers.am2
-rwxr-xr-xconfigure43
-rw-r--r--configure.ac21
-rw-r--r--examples/CMakeLists.txt16
-rw-r--r--examples/Makefile.am22
-rw-r--r--examples/Makefile.in22
-rw-r--r--examples/h5_cmprss.c125
-rw-r--r--examples/h5_crtatt.c63
-rw-r--r--examples/h5_crtdat.c51
-rw-r--r--examples/h5_crtgrp.c40
-rw-r--r--examples/h5_crtgrpar.c48
-rw-r--r--examples/h5_crtgrpd.c91
-rw-r--r--examples/h5_extend.c146
-rw-r--r--examples/h5_rdwt.c53
-rw-r--r--examples/h5_subset.c153
-rw-r--r--examples/run-c-ex.sh.in20
-rw-r--r--fortran/CMakeLists.txt2
-rw-r--r--fortran/examples/CMakeLists.txt22
-rw-r--r--fortran/examples/Makefile.am40
-rw-r--r--fortran/examples/Makefile.in40
-rw-r--r--fortran/examples/attrexample.f90117
-rw-r--r--fortran/examples/dsetexample.f9085
-rw-r--r--fortran/examples/fileexample.f9049
-rw-r--r--fortran/examples/grpdsetexample.f90156
-rw-r--r--fortran/examples/grpsexample.f9083
-rw-r--r--fortran/examples/h5_cmprss.f90131
-rw-r--r--fortran/examples/h5_crtatt.f90106
-rw-r--r--fortran/examples/h5_crtdat.f9086
-rw-r--r--fortran/examples/h5_crtgrp.f90 (renamed from fortran/examples/groupexample.f90)68
-rw-r--r--fortran/examples/h5_crtgrpar.f9083
-rw-r--r--fortran/examples/h5_crtgrpd.f90155
-rw-r--r--fortran/examples/h5_extend.f90233
-rw-r--r--fortran/examples/h5_rdwt.f9096
-rw-r--r--fortran/examples/h5_subset.f90184
-rw-r--r--fortran/examples/run-fortran-ex.sh.in32
-rw-r--r--fortran/examples/rwdsetexample.f9096
-rw-r--r--fortran/src/CMakeLists.txt11
-rw-r--r--fortran/src/H5test_kind_SIZEOF.f904
-rw-r--r--fortran/src/Makefile.in2
-rw-r--r--fortran/src/hdf5_fortrandll.def.in34
-rw-r--r--fortran/test/CMakeLists.txt6
-rw-r--r--fortran/testpar/CMakeLists.txt2
-rw-r--r--hl/CMakeLists.txt2
-rw-r--r--hl/c++/CMakeLists.txt2
-rw-r--r--hl/c++/examples/CMakeLists.txt13
-rw-r--r--hl/c++/examples/Makefile.am5
-rw-r--r--hl/c++/examples/Makefile.in5
-rw-r--r--hl/c++/examples/ptExampleVL.cpp112
-rw-r--r--hl/c++/examples/run-hlc++-ex.sh.in4
-rw-r--r--hl/c++/src/CMakeLists.txt2
-rw-r--r--hl/c++/src/Makefile.in2
-rw-r--r--hl/c++/test/CMakeLists.txt2
-rw-r--r--hl/examples/CMakeLists.txt3
-rw-r--r--hl/examples/Makefile.am5
-rw-r--r--hl/examples/Makefile.in5
-rw-r--r--hl/examples/ptExampleVL.c126
-rw-r--r--hl/examples/run-hlc-ex.sh.in2
-rw-r--r--hl/fortran/CMakeLists.txt2
-rw-r--r--hl/fortran/examples/CMakeLists.txt2
-rw-r--r--hl/fortran/src/CMakeLists.txt2
-rw-r--r--hl/fortran/src/Makefile.in2
-rw-r--r--hl/fortran/test/CMakeLists.txt2
-rw-r--r--hl/src/CMakeLists.txt4
-rw-r--r--hl/src/H5DO.c137
-rw-r--r--hl/src/H5DOprivate.h37
-rw-r--r--hl/src/H5DOpublic.h42
-rw-r--r--hl/src/Makefile.am4
-rw-r--r--hl/src/Makefile.in11
-rw-r--r--hl/src/hdf5_hl.h1
-rw-r--r--hl/test/CMakeLists.txt6
-rw-r--r--hl/test/Makefile.am5
-rw-r--r--hl/test/Makefile.in24
-rw-r--r--hl/test/dectris_hl_perf.c643
-rw-r--r--hl/test/test_dset_opt.c1138
-rw-r--r--hl/test/test_lite.c4
-rw-r--r--hl/test/test_table.c6
-rw-r--r--hl/test/test_table_be.h5 (renamed from hl/test/test_table_be.hdf5)bin55912 -> 55912 bytes
-rw-r--r--hl/test/test_table_cray.h5 (renamed from hl/test/test_table_cray.hdf5)bin55912 -> 55912 bytes
-rw-r--r--hl/test/test_table_le.h5 (renamed from hl/test/test_table_le.hdf5)bin53880 -> 53880 bytes
-rw-r--r--hl/tools/CMakeLists.txt2
-rw-r--r--perform/CMakeLists.txt2
-rw-r--r--release_docs/CMake.txt11
-rw-r--r--release_docs/RELEASE.txt3
-rw-r--r--release_docs/USING_CMake.txt4
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/H5Dchunk.c102
-rw-r--r--src/H5Dio.c102
-rw-r--r--src/H5Dprivate.h5
-rw-r--r--src/H5Dpublic.h6
-rw-r--r--src/H5FDcore.c550
-rw-r--r--src/H5FDlog.c412
-rw-r--r--src/H5FDmpi.c5
-rw-r--r--src/H5FDmpi.h53
-rw-r--r--src/H5FDmpio.c5
-rw-r--r--src/H5FDmpio.h3
-rw-r--r--src/H5FDmpiposix.c62
-rw-r--r--src/H5FDmpiposix.h3
-rw-r--r--src/H5FDprivate.h41
-rw-r--r--src/H5FDsec2.c381
-rw-r--r--src/H5Fmpi.c1
-rw-r--r--src/H5Pdxpl.c38
-rw-r--r--src/H5VLnative.c7
-rw-r--r--src/H5config.h.in3
-rw-r--r--src/H5private.h18
-rw-r--r--src/H5public.h4
-rw-r--r--src/Makefile.in2
-rw-r--r--test/CMakeLists.txt6
-rw-r--r--test/dsets.c4
-rw-r--r--test/test_filters_be.h5 (renamed from test/test_filters_be.hdf5)bin5720 -> 5720 bytes
-rw-r--r--test/test_filters_le.h5 (renamed from test/test_filters_le.hdf5)bin5720 -> 5720 bytes
-rw-r--r--test/testfiles/err_compat_15
-rw-r--r--test/th5s.c4
-rw-r--r--testpar/CMakeLists.txt2
-rw-r--r--tools/CMakeLists.txt2
-rw-r--r--tools/h5copy/CMakeLists.txt2
-rw-r--r--tools/h5diff/CMakeLists.txt2
-rw-r--r--tools/h5dump/CMakeLists.txt428
-rw-r--r--tools/h5dump/testh5dump.sh.in155
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in4
-rw-r--r--tools/h5dump/testh5dumpxml.sh.in30
-rw-r--r--tools/h5import/CMakeLists.txt2
-rw-r--r--tools/h5jam/CMakeLists.txt2
-rw-r--r--tools/h5ls/CMakeLists.txt2
-rw-r--r--tools/h5repack/CMakeLists.txt2
-rw-r--r--tools/h5stat/CMakeLists.txt2
-rw-r--r--tools/lib/CMakeLists.txt2
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/misc/CMakeLists.txt2
-rw-r--r--tools/testfiles/tall-6.exp11
-rw-r--r--tools/testfiles/tnoddl.ddl402
-rw-r--r--tools/testfiles/tnoddlfile.ddl0
-rw-r--r--tools/testfiles/tnoddlfile.exp402
-rw-r--r--tools/testfiles/trawdatafile.ddl58
-rw-r--r--tools/testfiles/trawdatafile.exp402
-rw-r--r--tools/testfiles/tstr2bin2.exp1
-rw-r--r--tools/testfiles/tstr2bin6.exp1
-rw-r--r--tools/testfiles/twithddl.ddl58
-rw-r--r--tools/testfiles/twithddlfile.ddl0
-rw-r--r--tools/testfiles/twithddlfile.exp402
-rw-r--r--vms/src/h5pubconf.h6
155 files changed, 8047 insertions, 2376 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d2db1d..ef4e1c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5 C CXX)
#-----------------------------------------------------------------------------
@@ -274,10 +274,10 @@ SET (H5_ENABLE_SHARED_LIB NO)
SET (H5_ENABLE_STATIC_LIB NO)
IF (BUILD_SHARED_LIBS)
SET (LIB_TYPE SHARED)
- ADD_DEFINITIONS (-DH5_BUILT_AS_DYNAMIC_LIB)
+ SET (H5_BUILT_AS_DYNAMIC_LIB 1)
SET (H5_ENABLE_SHARED_LIB YES)
ELSE (BUILD_SHARED_LIBS)
- ADD_DEFINITIONS (-DH5_BUILT_AS_STATIC_LIB)
+ SET (H5_BUILT_AS_STATIC_LIB 1)
SET (H5_ENABLE_STATIC_LIB YES)
IF (NOT WIN32)
# should this be a user setting : Everyone uses it anyway ?
@@ -666,7 +666,7 @@ IF (WIN32 AND NOT CYGWIN)
IF (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
IF (HDF5_ENABLE_PARALLEL)
- MESSAGE (FATAL " **** Parallel and Threadsafe options are mutually exclusive **** ")
+ MESSAGE (FATAL_ERROR " **** Parallel and Threadsafe options are mutually exclusive **** ")
ENDIF (HDF5_ENABLE_PARALLEL)
SET (H5_HAVE_THREADSAFE 1)
IF (H5_HAVE_IOEO)
@@ -675,7 +675,7 @@ IF (WIN32 AND NOT CYGWIN)
ELSE (H5_HAVE_IOEO)
IF (NOT H5_HAVE_PTHREAD_H)
SET (H5_HAVE_THREADSAFE 0)
- MESSAGE (FATAL " **** Threadsafe option requires thread library **** ")
+ MESSAGE (FATAL_ERROR " **** Threadsafe option requires thread library **** ")
ENDIF (NOT H5_HAVE_PTHREAD_H)
ENDIF (H5_HAVE_IOEO)
ENDIF (HDF5_ENABLE_THREADSAFE)
@@ -757,8 +757,16 @@ SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
IF (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
OPTION (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
IF (HDF5_BUILD_FORTRAN)
+ IF (BUILD_SHARED_LIBS AND APPLE)
+ MESSAGE (FATAL_ERROR " **** Shared FORTRAN libraries are unsupported **** ")
+ ENDIF (BUILD_SHARED_LIBS AND APPLE)
OPTION (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" OFF)
INCLUDE (${HDF5_RESOURCES_DIR}/HDF5UseFortran.cmake)
+ IF (HDF5_ENABLE_F2003)
+ IF (NOT FORTRAN_HAVE_ISO_C_BINDING)
+ SET (HDF5_ENABLE_F2003 OFF)
+ ENDIF (NOT FORTRAN_HAVE_ISO_C_BINDING)
+ ENDIF (HDF5_ENABLE_F2003)
# -----------------------------------------------------------------------
# wrapper script variables
@@ -793,7 +801,7 @@ IF (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
IF (HDF5_BUILD_CPP_LIB)
# check for unsupported options
IF (HDF5_ENABLE_PARALLEL)
- MESSAGE (FATAL " **** Parallel and C++ options are mutually exclusive **** ")
+ MESSAGE (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive **** ")
ENDIF (HDF5_ENABLE_PARALLEL)
IF (CMAKE_NO_STD_NAMESPACE)
SET (H5_NO_STD 1)
@@ -994,7 +1002,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
SET (CPACK_PACKAGE_VENDOR "HDF_Group")
SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}")
- SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}")
SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
@@ -1007,10 +1014,15 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
SET (CPACK_PACKAGE_RELOCATABLE TRUE)
IF (WIN32)
+ SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_NAME}-${HDF5_PACKAGE_VERSION}-${LIB_TYPE}")
SET (CPACK_MONOLITHIC_INSTALL ON)
SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
SET (CPACK_NSIS_MODIFY_PATH ON)
SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}")
+ ELSEIF (APPLE)
+ SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+ SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
+ SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
ELSE (WIN32)
SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr")
SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
diff --git a/MANIFEST b/MANIFEST
index 1d4f5be..6070f12 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -46,6 +46,7 @@
./bin/chkconfigure _DO_NOT_DISTRIBUTE_
./bin/chkcopyright _DO_NOT_DISTRIBUTE_
./bin/chkmanifest
+./bin/cmakehdf5
./bin/compile
./bin/config.guess
./bin/config.sub
@@ -121,6 +122,15 @@
./examples/Makefile.in
./examples/h5_chunk_read.c
./examples/h5_compound.c
+./examples/h5_crtgrpd.c
+./examples/h5_subset.c
+./examples/h5_cmprss.c
+./examples/h5_rdwt.c
+./examples/h5_crtgrpar.c
+./examples/h5_extend.c
+./examples/h5_crtatt.c
+./examples/h5_crtgrp.c
+./examples/h5_crtdat.c
./examples/h5_drivers.c
./examples/h5_dtransform.c
./examples/h5_elink_unix2win.c
@@ -238,22 +248,24 @@
./fortran/examples/Makefile.am
./fortran/examples/Makefile.in
-./fortran/examples/attrexample.f90
./fortran/examples/compound.f90
./fortran/examples/compound_fortran2003.f90
./fortran/examples/compound_complex_fortran2003.f90
-./fortran/examples/dsetexample.f90
-./fortran/examples/fileexample.f90
-./fortran/examples/groupexample.f90
-./fortran/examples/grpdsetexample.f90
-./fortran/examples/grpsexample.f90
+./fortran/examples/h5_cmprss.f90
+./fortran/examples/h5_crtatt.f90
+./fortran/examples/h5_crtdat.f90
+./fortran/examples/h5_crtgrp.f90
+./fortran/examples/h5_crtgrpar.f90
+./fortran/examples/h5_crtgrpd.f90
+./fortran/examples/h5_extend.f90
+./fortran/examples/h5_rdwt.f90
+./fortran/examples/h5_subset.f90
./fortran/examples/hyperslab.f90
./fortran/examples/mountexample.f90
./fortran/examples/ph5example.f90
./fortran/examples/refobjexample.f90
./fortran/examples/refregexample.f90
./fortran/examples/run-fortran-ex.sh.in
-./fortran/examples/rwdsetexample.f90
./fortran/examples/selectele.f90
./fortran/examples/testh5fc.sh.in
./fortran/examples/nested_derived_type.f90
@@ -1078,8 +1090,8 @@
./test/tvltypes.c
./test/unlink.c
./test/vfd.c
-./test/test_filters_le.hdf5
-./test/test_filters_be.hdf5
+./test/test_filters_le.h5
+./test/test_filters_be.h5
./test/gen_filters.c
./test/chunk_info.c
@@ -1357,6 +1369,7 @@
./tools/testfiles/tall-4s.ddl
./tools/testfiles/tall-5s.ddl
./tools/testfiles/tall-6.ddl
+./tools/testfiles/tall-6.exp
./tools/testfiles/tall.h5
./tools/testfiles/tarray1.ddl
./tools/testfiles/tarray1.h5
@@ -1475,12 +1488,17 @@
./tools/testfiles/tnestedcomp.h5
./tools/testfiles/tnestedcmpddt.ddl
./tools/testfiles/tnestedcmpddt.h5
+./tools/testfiles/tnoddl.ddl
+./tools/testfiles/tnoddlfile.ddl
+./tools/testfiles/tnoddlfile.exp
./tools/testfiles/tno-subset.h5
./tools/testfiles/tno-subset.ddl
./tools/testfiles/tnullspace.h5
./tools/testfiles/tnullspace.ddl
./tools/testfiles/tobjref.h5
./tools/testfiles/topaque.h5
+./tools/testfiles/trawdatafile.ddl
+./tools/testfiles/trawdatafile.exp
./tools/testfiles/tsaf.ddl
./tools/testfiles/tsaf.h5
./tools/testfiles/tscalarattrintsize.ddl
@@ -1501,6 +1519,8 @@
./tools/testfiles/tstr.h5
./tools/testfiles/tstr2.h5
./tools/testfiles/tstr-2.ddl
+./tools/testfiles/tstr2bin2.exp
+./tools/testfiles/tstr2bin6.exp
./tools/testfiles/tvldtypes1.ddl
./tools/testfiles/tvldtypes1.h5
./tools/testfiles/tvldtypes2.ddl
@@ -1570,6 +1590,9 @@
./tools/testfiles/tbigdims.h5
./tools/testfiles/thyperslab.h5
./tools/testfiles/twidedisplay.ddl
+./tools/testfiles/twithddl.ddl
+./tools/testfiles/twithddlfile.ddl
+./tools/testfiles/twithddlfile.exp
# h5dump test error files
./tools/h5dump/errfiles/filter_fail.err
@@ -2148,12 +2171,14 @@
./hl/examples/image8.txt
./hl/examples/pal_rgb.h
./hl/examples/ptExampleFL.c
-./hl/examples/ptExampleVL.c
./hl/examples/run-hl-ex.sh
./hl/examples/run-hlc-ex.sh.in
./hl/src/COPYING
./hl/src/Makefile.am
./hl/src/Makefile.in
+./hl/src/H5DO.c
+./hl/src/H5DOprivate.h
+./hl/src/H5DOpublic.h
./hl/src/H5DS.c
./hl/src/H5DSprivate.h
./hl/src/H5DSpublic.h
@@ -2192,8 +2217,10 @@
./hl/test/image24plane.txt
./hl/test/pal_rgb.h
./hl/test/sepia.pal
+./hl/test/dectris_hl_perf.c
./hl/test/gen_test_ds.c
./hl/test/test_ds.c
+./hl/test/test_dset_opt.c
./hl/test/test_file_image.c
./hl/test/test_image.c
./hl/test/test_lite.c
@@ -2201,9 +2228,9 @@
./hl/test/test_table.c
./hl/test/test_ds_le.h5
./hl/test/test_ds_be.h5
-./hl/test/test_table_le.hdf5
-./hl/test/test_table_be.hdf5
-./hl/test/test_table_cray.hdf5
+./hl/test/test_table_le.h5
+./hl/test/test_table_be.h5
+./hl/test/test_table_cray.h5
./hl/test/usa.wri
# tools
@@ -2261,7 +2288,6 @@
./hl/c++/examples/Makefile.am
./hl/c++/examples/Makefile.in
./hl/c++/examples/ptExampleFL.cpp
-./hl/c++/examples/ptExampleVL.cpp
./hl/c++/examples/run-hlc++-ex.sh.in
./hl/c++/src/H5PacketTable.h
./hl/c++/src/H5PacketTable.cpp
diff --git a/README.txt b/README.txt
index e986042..cd9e7c2 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.135 currently under development
+HDF5 version 1.9.141 currently under development
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/cmakehdf5 b/bin/cmakehdf5
new file mode 100755
index 0000000..4627828
--- /dev/null
+++ b/bin/cmakehdf5
@@ -0,0 +1,196 @@
+#! /bin/sh
+# Build and Test HDF5 using cmake.
+# Author: Allen Byrne
+# Albert Cheng
+# Creation Date: Nov 2012
+
+# Copyright: The HDF Group, 2012
+
+# Debug: remove the comment hash if you want DPRINT to do echo
+DPRINT=:
+#DPRINT=echo
+
+# variable names
+progname=`basename $0` # program name
+cminfile="cmakemin.$$" # Cmake minimum file
+cfgfile=$progname.$$ # configure file
+$DPRINT $cfgfile
+
+# Remove temporary generated files if exit 0
+trap "rm -f $cminfile $cfgfile" 0
+
+#==========
+# main
+#==========
+# First generate the two needed input files, the $cimnfile and $cfgfile.
+# Then use ctest to use the two input files.
+
+#==========
+# create the configure file
+#==========
+# Create the cmake minimum required file to be used by the following
+# configure file. Though not absolute needed, it is better to generate
+# this file before the configure file. Quote the EOF to preven substitution
+# in the text.
+#==========
+#==========
+cat > $cfgfile <<'EOF'
+cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
+########################################################
+# This dashboard is maintained by The HDF Group
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+########################################################
+
+set (CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set (CTEST_SOURCE_DIRECTORY "../hdf5")
+set (CTEST_BINARY_DIRECTORY ".")
+set (CTEST_CMAKE_GENERATOR "Unix Makefiles")
+set (CTEST_BUILD_CONFIGURATION "Release")
+
+# -- CDash variables
+#set (LOCAL_NO_SUBMIT TRUE)
+set (MODEL "Experimental")
+set (CDASH_LOCAL TRUE)
+set (SITE_BUILDNAME_SUFFIX "SHARED")
+
+# -- URL set for internal check, default is to not update
+set (LOCAL_SKIP_UPDATE TRUE)
+set (REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+# -- Standard build options
+set (ADD_BUILD_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local/hdf5.1.8 -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=\"SVN\" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
+
+# Use multiple CPU cores to build
+SET (CTEST_BUILD_FLAGS "-j4")
+
+# -----------------------------------------------------------
+# -- Get environment
+# -----------------------------------------------------------
+ ## -- set hostname
+ ## --------------------------
+ find_program (HOSTNAME_CMD NAMES hostname)
+ exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
+ set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
+ find_program (UNAME NAMES uname)
+ macro (getuname name flag)
+ exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
+ endmacro (getuname)
+
+ getuname (osname -s)
+ getuname (osrel -r)
+ getuname (cpu -m)
+
+ if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}-${SITE_BUILDNAME_SUFFIX}")
+ else (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
+ endif (SITE_BUILDNAME_SUFFIX)
+# -----------------------------------------------------------
+
+set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if (APPLE)
+ # Compiler choice
+ execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ SET(ENV{CC} "${XCODE_CC}")
+ SET(ENV{CXX} "${XCODE_CXX}")
+ # Shared fortran is not supported, build static
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif (APPLE)
+
+
+# -----------------------------------------------------------
+find_package (Subversion)
+set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
+# -- Only clean build folder if LOCAL_CLEAR_BUILD is set
+if (LOCAL_CLEAR_BUILD)
+ set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+ ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
+endif (LOCAL_CLEAR_BUILD)
+
+#-----------------------------------------------------------------------------
+# Send the main script as a note.
+list (APPEND CTEST_NOTES_FILES
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+ )
+
+# Check for required variables.
+foreach (req
+ CTEST_CMAKE_GENERATOR
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ )
+ if (NOT DEFINED ${req})
+ message(FATAL_ERROR "The containing script must set ${req}")
+ endif (NOT DEFINED ${req})
+endforeach (req)
+
+## -- set output to english
+set($ENV{LC_MESSAGES} "en_EN")
+
+#-----------------------------------------------------------------------------
+# Initialize the CTEST commands
+#------------------------------
+SET (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+SET (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\"")
+
+# Print summary information.
+foreach (v
+ CTEST_SITE
+ CTEST_BUILD_NAME
+ CTEST_SOURCE_DIRECTORY
+ CTEST_BINARY_DIRECTORY
+ CTEST_CMAKE_GENERATOR
+ CTEST_BUILD_CONFIGURATION
+ CTEST_CONFIGURE_COMMAND
+ CTEST_SCRIPT_DIRECTORY
+ )
+ set (vars "${vars} ${v}=[${${v}}]\n")
+endforeach (v)
+message ("Dashboard script configuration:\n${vars}\n")
+
+CTEST_START (${MODEL} TRACK ${MODEL})
+if (NOT LOCAL_SKIP_UPDATE)
+ CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
+endif (NOT LOCAL_SKIP_UPDATE)
+CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+message ("Configure DONE")
+CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+if (NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Update Configure Notes)
+endif (NOT LOCAL_NO_SUBMIT)
+CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+if (NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Build)
+endif (NOT LOCAL_NO_SUBMIT)
+message ("build DONE")
+if (NOT LOCAL_SKIP_TEST)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ if (NOT LOCAL_NO_SUBMIT)
+ CTEST_SUBMIT (PARTS Test)
+ endif (NOT LOCAL_NO_SUBMIT)
+ message ("test DONE")
+endif (NOT LOCAL_SKIP_TEST)
+
+message ("DONE")
+EOF
+
+
+# Run ctest
+date
+ctest -S $cfgfile -C Release -O testhdf.log
+exit_code=$?
+if [ $exit_code = 0 ]; then
+ echo Complete without error
+else
+ echo Error encountered
+fi
+date
+exit $exit_code
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 0076335..50ea838 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index f60d96e..f45251b 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
# with "cpp_ex_". This allows for easier filtering of the examples.
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index d983d1e..fea68cd 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_CPP_SRC)
#-----------------------------------------------------------------------------
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index 35cd338..566ec2f 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -459,7 +459,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
# Include src directory
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 7f4437c..124edb9 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_CPP_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
diff --git a/config/cmake/CPack.cmake b/config/cmake/CPack.cmake
index 2e6b23a..d96fe43 100644
--- a/config/cmake/CPack.cmake
+++ b/config/cmake/CPack.cmake
@@ -1,5 +1,7 @@
-# - Build binary and source package installers
-#
+##section Variables common to all CPack generators
+##end
+##module
+# - Build binary and source package installers.
# The CPack module generates binary and source installers in a variety
# of formats using the cpack program. Inclusion of the CPack module
# adds two new targets to the resulting makefiles, package and
@@ -29,16 +31,16 @@
# on a per-generator basis. It only need contain overrides.
#
# Here's how it works:
-# - cpack runs
-# - it includes CPackConfig.cmake
-# - it iterates over the generators listed in that file's
-# CPACK_GENERATOR list variable (unless told to use just a
-# specific one via -G on the command line...)
+# - cpack runs
+# - it includes CPackConfig.cmake
+# - it iterates over the generators listed in that file's
+# CPACK_GENERATOR list variable (unless told to use just a
+# specific one via -G on the command line...)
#
-# - foreach generator, it then
-# - sets CPACK_GENERATOR to the one currently being iterated
-# - includes the CPACK_PROJECT_CONFIG_FILE
-# - produces the package for that generator
+# - foreach generator, it then
+# - sets CPACK_GENERATOR to the one currently being iterated
+# - includes the CPACK_PROJECT_CONFIG_FILE
+# - produces the package for that generator
#
# This is the key: For each generator listed in CPACK_GENERATOR
# in CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR
@@ -48,174 +50,225 @@
# Before including this CPack module in your CMakeLists.txt file,
# there are a variety of variables that can be set to customize
# the resulting installers. The most commonly-used variables are:
-#
-# CPACK_PACKAGE_NAME - The name of the package (or application). If
-# not specified, defaults to the project name.
-#
-# CPACK_PACKAGE_VENDOR - The name of the package vendor (e.g.,
-# "Kitware").
-#
-# CPACK_PACKAGE_VERSION_MAJOR - Package major Version
-#
-# CPACK_PACKAGE_VERSION_MINOR - Package minor Version
-#
-# CPACK_PACKAGE_VERSION_PATCH - Package patch Version
-#
-# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
-# project. Used, for example, the introduction screen of a
-# CPack-generated Windows installer to describe the project.
-#
-# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
-# project (only a few words).
-#
-# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
-# not including the extension. For example, cmake-2.6.1-Linux-i686.
-#
-# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
-# target system, e.g., "CMake 2.5".
-#
-# CPACK_PROJECT_CONFIG_FILE - File included at cpack time, once per
-# generator after setting CPACK_GENERATOR to the actual generator
-# being used. Allows per-generator setting of CPACK_* variables at
-# cpack time.
-#
-# CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
-# will typically be displayed to the user (often with an explicit
-# "Accept" button, for graphical installers) prior to installation.
-#
-# CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
-# typically describes in some detail
-#
-# CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
-# welcomes users to this installer. Typically used in the graphical
-# installers on Windows and Mac OS X.
-#
-# CPACK_MONOLITHIC_INSTALL - Disables the component-based
-# installation mechanism, so that all components are always installed.
-#
-# CPACK_GENERATOR - List of CPack generators to use. If not
-# specified, CPack will create a set of options (e.g.,
-# CPACK_BINARY_NSIS) allowing the user to enable/disable individual
-# generators.
-#
-# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
-# for binary installers that will be generated by the CPack
-# module. Defaults to CPackConfig.cmake.
-#
-# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
-# with a text label, to be used to create Start Menu shortcuts on
-# Windows. For example, setting this to the list ccmake;CMake will
-# create a shortcut named "CMake" that will execute the installed
-# executable ccmake.
-#
-# CPACK_STRIP_FILES - List of files to be stripped. Starting with
-# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
-# enables stripping of all files (a list of files evaluates to TRUE
-# in CMake, so this change is compatible).
-#
-# The following CPack variables are specific to source packages, and
+##end
+#
+##variable
+# CPACK_PACKAGE_NAME - The name of the package (or application). If
+# not specified, defaults to the project name.
+##end
+#
+##variable
+# CPACK_PACKAGE_VENDOR - The name of the package vendor. (e.g.,
+# "Kitware").
+##end
+#
+##variable
+# CPACK_PACKAGE_DIRECTORY - The directory in which CPack is doing its
+# packaging. If it is not set then this will default (internally) to the
+# build dir. This variable may be defined in CPack config file or from
+# the cpack command line option "-B". If set the command line option
+# override the value found in the config file.
+##end
+#
+##variable
+# CPACK_PACKAGE_VERSION_MAJOR - Package major Version
+##end
+#
+##variable
+# CPACK_PACKAGE_VERSION_MINOR - Package minor Version
+##end
+#
+##variable
+# CPACK_PACKAGE_VERSION_PATCH - Package patch Version
+##end
+#
+##variable
+# CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
+# project. Used, for example, the introduction screen of a
+# CPack-generated Windows installer to describe the project.
+##end
+#
+##variable
+# CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
+# project (only a few words).
+##end
+#
+##variable
+# CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
+# not including the extension. For example, cmake-2.6.1-Linux-i686.
+# The default value is
+#
+# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
+##end
+#
+##variable
+# CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
+# target system. This may be used by some CPack generators
+# like NSIS to create an installation directory e.g., "CMake 2.5"
+# below the installation prefix. All installed element will be
+# put inside this directory.
+##end
+#
+##variable
+# CPACK_PACKAGE_ICON - A branding image that will be displayed inside
+# the installer (used by GUI installers).
+##end
+#
+##variable
+# CPACK_PROJECT_CONFIG_FILE - CPack-time project CPack configuration
+# file. This file included at cpack time, once per
+# generator after CPack has set CPACK_GENERATOR to the actual generator
+# being used. It allows per-generator setting of CPACK_* variables at
+# cpack time.
+##end
+#
+##variable
+# CPACK_RESOURCE_FILE_LICENSE - License to be embedded in the installer. It
+# will typically be displayed to the user by the produced installer
+# (often with an explicit "Accept" button, for graphical installers)
+# prior to installation. This license file is NOT added to installed
+# file but is used by some CPack generators like NSIS. If you want
+# to install a license file (may be the same as this one)
+# along with your project you must add an appropriate CMake INSTALL
+# command in your CMakeLists.txt.
+##end
+#
+##variable
+# CPACK_RESOURCE_FILE_README - ReadMe file to be embedded in the installer. It
+# typically describes in some detail the purpose of the project
+# during the installation. Not all CPack generators uses
+# this file.
+##end
+#
+##variable
+# CPACK_RESOURCE_FILE_WELCOME - Welcome file to be embedded in the
+# installer. It welcomes users to this installer.
+# Typically used in the graphical installers on Windows and Mac OS X.
+##end
+#
+##variable
+# CPACK_MONOLITHIC_INSTALL - Disables the component-based
+# installation mechanism. When set the component specification is ignored
+# and all installed items are put in a single "MONOLITHIC" package.
+# Some CPack generators do monolithic packaging by default and
+# may be asked to do component packaging by setting
+# CPACK_<GENNAME>_COMPONENT_INSTALL to 1/TRUE.
+##end
+#
+##variable
+# CPACK_GENERATOR - List of CPack generators to use. If not
+# specified, CPack will create a set of options CPACK_BINARY_<GENNAME> (e.g.,
+# CPACK_BINARY_NSIS) allowing the user to enable/disable individual
+# generators. This variable may be used on the command line
+# as well as in:
+#
+# cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree
+##end
+#
+##variable
+# CPACK_OUTPUT_CONFIG_FILE - The name of the CPack binary configuration
+# file. This file is the CPack configuration generated by the CPack module
+# for binary installers. Defaults to CPackConfig.cmake.
+##end
+#
+##variable
+# CPACK_PACKAGE_EXECUTABLES - Lists each of the executables and associated
+# text label to be used to create Start Menu shortcuts. For example,
+# setting this to the list ccmake;CMake will
+# create a shortcut named "CMake" that will execute the installed
+# executable ccmake. Not all CPack generators use it (at least NSIS and
+# OSXX11 do).
+##end
+#
+##variable
+# CPACK_STRIP_FILES - List of files to be stripped. Starting with
+# CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
+# enables stripping of all files (a list of files evaluates to TRUE
+# in CMake, so this change is compatible).
+##end
+#
+# The following CPack variables are specific to source packages, and
# will not affect binary packages:
#
-# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
-# e.g., cmake-2.6.1
-#
-# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
-# will be stripped. Starting with CMake 2.6.0
-# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
-# stripping of all files (a list of files evaluates to TRUE in CMake,
-# so this change is compatible).
-#
-# CPACK_SOURCE_GENERATOR - List of generators used for the source
-# packages. As with CPACK_GENERATOR, if this is not specified then
-# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
-# allowing users to select which packages will be generated.
-#
-# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
-# configuration file for source installers that will be generated by
-# the CPack module. Defaults to CPackSourceConfig.cmake.
-#
-# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
-# that won't be packaged when building a source package. This is a
-# list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
-#
-# The following variables are specific to the DragNDrop installers
-# built on Mac OS X:
-#
-# CPACK_DMG_VOLUME_NAME - The volume name of the generated disk
-# image. Defaults to CPACK_PACKAGE_FILE_NAME.
-#
-# CPACK_DMG_FORMAT - The disk image format. Common values are UDRO
-# (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF
-# bzip2-compressed). Refer to hdiutil(1) for more information on
-# other available formats.
-#
-# CPACK_DMG_DS_STORE - Path to a custom .DS_Store file which e.g.
-# can be used to specify the Finder window position/geometry and
-# layout (such as hidden toolbars, placement of the icons etc.).
-# This file has to be generated by the Finder (either manually or
-# through OSA-script) using a normal folder from which the .DS_Store
-# file can then be extracted.
-#
-# CPACK_DMG_BACKGROUND_IMAGE - Path to an image file which is to be
-# used as the background for the Finder Window when the disk image
-# is opened. By default no background image is set. The background
-# image is applied after applying the custom .DS_Store file.
-#
-# CPACK_COMMAND_HDIUTIL - Path to the hdiutil(1) command used to
-# operate on disk image files on Mac OS X. This variable can be used
-# to override the automatically detected command (or specify its
-# location if the auto-detection fails to find it.)
-#
-# CPACK_COMMAND_SETFILE - Path to the SetFile(1) command used to set
-# extended attributes on files and directories on Mac OS X. This
-# variable can be used to override the automatically detected
-# command (or specify its location if the auto-detection fails to
-# find it.)
-#
-# CPACK_COMMAND_REZ - Path to the Rez(1) command used to compile
-# resources on Mac OS X. This variable can be used to override the
-# automatically detected command (or specify its location if the
-# auto-detection fails to find it.)
-#
-# The following variable is specific to installers build on Mac OS X
-# using PackageMaker:
-#
-# CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
-# resulting PackageMaker archive should be compatible
-# with. Different versions of Mac OS X support different
-# features. For example, CPack can only build component-based
-# installers for Mac OS X 10.4 or newer, and can only build
-# installers that download component son-the-fly for Mac OS X 10.5
-# or newer. If left blank, this value will be set to the minimum
-# version of Mac OS X that supports the requested features. Set this
-# variable to some value (e.g., 10.4) only if you want to guarantee
-# that your installer will work on that version of Mac OS X, and
-# don't mind missing extra features available in the installer
-# shipping with later versions of Mac OS X.
+##variable
+# CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package. For
+# example cmake-2.6.1.
+##end
+#
+##variable
+# CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
+# will be stripped. Starting with CMake 2.6.0
+# CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
+# stripping of all files (a list of files evaluates to TRUE in CMake,
+# so this change is compatible).
+##end
+#
+##variable
+# CPACK_SOURCE_GENERATOR - List of generators used for the source
+# packages. As with CPACK_GENERATOR, if this is not specified then
+# CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
+# allowing users to select which packages will be generated.
+##end
+#
+##variable
+# CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack source
+# configuration file. This file is the CPack configuration generated by the
+# CPack module for source installers. Defaults to CPackSourceConfig.cmake.
+##end
+#
+##variable
+# CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
+# that won't be packaged when building a source package. This is a
+# list of regular expression patterns (that must be properly escaped),
+# e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
+##end
#
# The following variables are for advanced uses of CPack:
#
-# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
-# project is CMake project. Defaults to the value of CMAKE_GENERATOR;
-# few users will want to change this setting.
-#
-# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
-# what project to install. The four values are: Build directory,
-# Project Name, Project Component, Directory. If omitted, CPack will
-# build an installer that installers everything.
-#
-# CPACK_SYSTEM_NAME - System name, defaults to the value of
-# ${CMAKE_SYSTEM_NAME}.
-#
-# CPACK_PACKAGE_VERSION - Package full version, used internally. By
-# default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
-# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
-#
-# CPACK_TOPLEVEL_TAG - Directory for the installed files.
-#
-# CPACK_INSTALL_COMMANDS - Extra commands to install components.
-#
-# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
+##variable
+# CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
+# project is CMake project. Defaults to the value of CMAKE_GENERATOR
+# few users will want to change this setting.
+##end
+#
+##variable
+# CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
+# what project to install. The four values are: Build directory,
+# Project Name, Project Component, Directory. If omitted, CPack will
+# build an installer that installers everything.
+##end
+#
+##variable
+# CPACK_SYSTEM_NAME - System name, defaults to the value of
+# ${CMAKE_SYSTEM_NAME}.
+##end
+#
+##variable
+# CPACK_PACKAGE_VERSION - Package full version, used internally. By
+# default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
+# CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
+##end
+#
+##variable
+# CPACK_TOPLEVEL_TAG - Directory for the installed files.
+##end
+#
+##variable
+# CPACK_INSTALL_COMMANDS - Extra commands to install components.
+##end
+#
+##variable
+# CPACK_INSTALLED_DIRECTORIES - Extra directories to install.
+##end
+#
+##variable
+# CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
+# installing this project. This is only used
+# by installer for Windows.
+##end
+##variable
+# CPACK_CREATE_DESKTOP_LINKS - List of desktop links to create.
+##end
#
#=============================================================================
@@ -232,48 +285,48 @@
# License text for the above reference.)
# Define this var in order to avoid (or warn) concerning multiple inclusion
-IF(CPack_CMake_INCLUDED)
- MESSAGE(WARNING "CPack.cmake has already been included!!")
-ELSE(CPack_CMake_INCLUDED)
- SET(CPack_CMake_INCLUDED 1)
-ENDIF(CPack_CMake_INCLUDED)
+if(CPack_CMake_INCLUDED)
+ message(WARNING "CPack.cmake has already been included!!")
+else()
+ set(CPack_CMake_INCLUDED 1)
+endif()
# Pick a configuration file
-SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
- SET(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-SET(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
- SET(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+ set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+endif()
+set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+ set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+endif()
# Backward compatibility
# Include CPackComponent macros if it has not already been included before.
include(CPackComponent)
# Macro for setting values if a user did not overwrite them
-MACRO(cpack_set_if_not_set name value)
- IF(NOT DEFINED "${name}")
- SET(${name} "${value}")
- ENDIF(NOT DEFINED "${name}")
-ENDMACRO(cpack_set_if_not_set)
+macro(cpack_set_if_not_set name value)
+ if(NOT DEFINED "${name}")
+ set(${name} "${value}")
+ endif()
+endmacro()
-# Macro to encode variables for the configuration file
+# cpack_encode_variables - Macro to encode variables for the configuration file
# find any variable that starts with CPACK and create a variable
# _CPACK_OTHER_VARIABLES_ that contains SET commands for
# each cpack variable. _CPACK_OTHER_VARIABLES_ is then
# used as an @ replacment in configure_file for the CPackConfig.
-MACRO(cpack_encode_variables)
- SET(_CPACK_OTHER_VARIABLES_)
- GET_CMAKE_PROPERTY(res VARIABLES)
- FOREACH(var ${res})
- IF("xxx${var}" MATCHES "xxxCPACK")
- SET(_CPACK_OTHER_VARIABLES_
+macro(cpack_encode_variables)
+ set(_CPACK_OTHER_VARIABLES_)
+ get_cmake_property(res VARIABLES)
+ foreach(var ${res})
+ if("xxx${var}" MATCHES "xxxCPACK")
+ set(_CPACK_OTHER_VARIABLES_
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
- ENDIF("xxx${var}" MATCHES "xxxCPACK")
- ENDFOREACH(var ${res})
-ENDMACRO(cpack_encode_variables)
+ endif()
+ endforeach()
+endmacro()
# Set the package name
cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
@@ -297,27 +350,31 @@ cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
-IF(CPACK_NSIS_MODIFY_PATH)
- SET(CPACK_NSIS_MODIFY_PATH ON)
-ENDIF(CPACK_NSIS_MODIFY_PATH)
-
-SET(__cpack_system_name ${CMAKE_SYSTEM_NAME})
-IF(${__cpack_system_name} MATCHES Windows)
- IF(CMAKE_CL_64)
- SET(__cpack_system_name win64)
- ELSE(CMAKE_CL_64)
- SET(__cpack_system_name win32)
- ENDIF(CMAKE_CL_64)
-ENDIF(${__cpack_system_name} MATCHES Windows)
+if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
+ set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+endif()
+
+if(CPACK_NSIS_MODIFY_PATH)
+ set(CPACK_NSIS_MODIFY_PATH ON)
+endif()
+
+set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
+if(${__cpack_system_name} MATCHES Windows)
+ if(CMAKE_CL_64)
+ set(__cpack_system_name win64)
+ else()
+ set(__cpack_system_name win32)
+ endif()
+endif()
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
# Root dir: default value should be the string literal "$PROGRAMFILES"
# for backwards compatibility. Projects may set this value to anything.
if(CMAKE_CL_64)
set(__cpack_root_default "$PROGRAMFILES64")
-else(CMAKE_CL_64)
+else()
set(__cpack_root_default "$PROGRAMFILES")
-endif(CMAKE_CL_64)
+endif()
cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}")
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
@@ -333,15 +390,15 @@ cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
# always force to exactly "true" or "false" for CPack.Info.plist.in:
if(CPACK_PACKAGE_RELOCATABLE)
set(CPACK_PACKAGE_RELOCATABLE "true")
-else(CPACK_PACKAGE_RELOCATABLE)
+else()
set(CPACK_PACKAGE_RELOCATABLE "false")
-endif(CPACK_PACKAGE_RELOCATABLE)
+endif()
macro(cpack_check_file_exists file description)
if(NOT EXISTS "${file}")
message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.")
- endif(NOT EXISTS "${file}")
-endmacro(cpack_check_file_exists)
+ endif()
+endmacro()
cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description")
cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource")
@@ -351,9 +408,15 @@ cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
macro(cpack_optional_append _list _cond _item)
if(${_cond})
set(${_list} ${${_list}} ${_item})
- endif(${_cond})
-endmacro(cpack_optional_append _list _cond _item)
-
+ endif()
+endmacro()
+
+##variable
+# CPACK_BINARY_<GENNAME> - CPack generated options for binary generators. The
+# CPack.cmake module generates (when CPACK_GENERATOR is not set)
+# a set of CMake options (see CMake option command) which may then be used to
+# select the CPack generator(s) to be used when launching the package target.
+##end
# Provide options to choose generators
# we might check here if the required tools for the generates exist
# and set the defaults according to the results
@@ -361,27 +424,27 @@ if(NOT CPACK_GENERATOR)
if(UNIX)
if(CYGWIN)
option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON)
- else(CYGWIN)
+ else()
if(APPLE)
option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF)
option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
- else(APPLE)
+ else()
option(CPACK_BINARY_TZ "Enable to build TZ packages" ON)
- endif(APPLE)
+ endif()
option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF)
option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
- endif(CYGWIN)
- else(UNIX)
+ endif()
+ else()
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
- endif(UNIX)
-
+ endif()
+
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker)
@@ -395,37 +458,37 @@ if(NOT CPACK_GENERATOR)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
-
-endif(NOT CPACK_GENERATOR)
+
+endif()
# Provide options to choose source generators
if(NOT CPACK_SOURCE_GENERATOR)
if(UNIX)
if(CYGWIN)
option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON)
- else(CYGWIN)
+ else()
option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON)
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF)
- endif(CYGWIN)
- else(UNIX)
+ endif()
+ else()
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON)
- endif(UNIX)
+ endif()
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP)
-endif(NOT CPACK_SOURCE_GENERATOR)
+endif()
# mark the above options as advanced
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
- CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
- CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
+ CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
+ CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
- CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
+ CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
# Set some other variables
@@ -435,16 +498,16 @@ cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
# if the user has set CPACK_NSIS_DISPLAY_NAME remember it
if(DEFINED CPACK_NSIS_DISPLAY_NAME)
- SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
+ set(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
endif()
# if the user has set CPACK_NSIS_DISPLAY
# explicitly, then use that as the default
# value of CPACK_NSIS_PACKAGE_NAME instead
-# of CPACK_PACKAGE_INSTALL_DIRECTORY
+# of CPACK_PACKAGE_INSTALL_DIRECTORY
cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
if(CPACK_NSIS_DISPLAY_NAME_SET)
- string(REPLACE "\\" "\\\\"
+ string(REPLACE "\\" "\\\\"
_NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}")
cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}")
else()
@@ -463,31 +526,31 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
-IF(DEFINED CPACK_COMPONENTS_ALL)
- IF(CPACK_MONOLITHIC_INSTALL)
- MESSAGE("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
- SET(CPACK_COMPONENTS_ALL)
- ELSE(CPACK_MONOLITHIC_INSTALL)
+if(DEFINED CPACK_COMPONENTS_ALL)
+ if(CPACK_MONOLITHIC_INSTALL)
+ message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
+ set(CPACK_COMPONENTS_ALL)
+ else()
# The user has provided the set of components to be installed as
# part of a component-based installation; trust her.
- SET(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
- ENDIF(CPACK_MONOLITHIC_INSTALL)
-ELSE(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
+ endif()
+else()
# If the user has not specifically requested a monolithic installer
# but has specified components in various "install" commands, tell
# CPack about those components.
- IF(NOT CPACK_MONOLITHIC_INSTALL)
- GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
- LIST(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
- IF(CPACK_COMPONENTS_LEN EQUAL 1)
+ if(NOT CPACK_MONOLITHIC_INSTALL)
+ get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
+ list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
+ if(CPACK_COMPONENTS_LEN EQUAL 1)
# Only one component: this is not a component-based installation
# (at least, it isn't a component-based installation, but may
# become one later if the user uses the cpack_add_* commands).
- SET(CPACK_COMPONENTS_ALL)
- ENDIF(CPACK_COMPONENTS_LEN EQUAL 1)
- SET(CPACK_COMPONENTS_LEN)
- ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
-ENDIF(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL)
+ endif()
+ set(CPACK_COMPONENTS_LEN)
+ endif()
+endif()
# CMake always generates a component named "Unspecified", which is
# used to install everything that doesn't have an explicitly-provided
@@ -507,13 +570,13 @@ cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
-SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
-SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
-SET(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
-SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
-SET(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
-SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
+set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
+set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
+set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
+set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
+set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
+set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
cpack_encode_variables()
configure_file("${cpack_source_input_file}"
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 79691c8..55a7f58 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -14,7 +14,7 @@ INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
-# Always SET this for now IF we are on an OS X box
+# APPLE/Darwin setup
#-----------------------------------------------------------------------------
IF (APPLE)
LIST(LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
@@ -28,6 +28,11 @@ IF (APPLE)
SET (H5_AC_APPLE_UNIVERSAL_BUILD 0)
ENDIF (APPLE)
+# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ SET (H5_HAVE_DARWIN 1)
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
#-----------------------------------------------------------------------------
# Option to Clear File Buffers before write --enable-clear-file-buffers
#-----------------------------------------------------------------------------
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index b965c64..93a6bfd 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -114,6 +114,9 @@
/* Define if the function stack tracing code is to be compiled in */
#cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@
+/* Define if Darwin or Mac OS X */
+#cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@
+
/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
*/
#cmakedefine H5_HAVE_DECL_TZNAME @H5_HAVE_DECL_TZNAME@
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 323c9ef..8fa76b8 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -110,6 +110,9 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble
FORTRAN_DEFAULT_REAL_NOT_DOUBLE
)
+#-----------------------------------------------------------------------------
+# Checks if the ISO_C_BINDING module meets all the requirements
+#-----------------------------------------------------------------------------
CHECK_FORTRAN_FEATURE(iso_c_binding
"
PROGRAM main
@@ -117,6 +120,7 @@ CHECK_FORTRAN_FEATURE(iso_c_binding
IMPLICIT NONE
TYPE(C_PTR) :: ptr
TYPE(C_FUNPTR) :: funptr
+ INTEGER(C_INT64_T) :: c_int64_type
CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
ptr = C_LOC(ichr(1:1))
END PROGRAM
diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake
index 8bcf729..b9ead6f 100644
--- a/config/cmake/prunTest.cmake
+++ b/config/cmake/prunTest.cmake
@@ -1,5 +1,6 @@
# runTest.cmake executes a command and captures the output in a file. File is then compared
# against a reference file. Exit status of command can also be compared.
+cmake_policy(SET CMP0007 NEW)
# arguments checking
IF (NOT TEST_PROGRAM)
@@ -107,12 +108,35 @@ IF (NOT TEST_SKIP_COMPARE)
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/P_${TEST_REFERENCE}
RESULT_VARIABLE TEST_RESULT
)
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
+ SET (TEST_RESULT 0)
+ FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
+ LIST (LENGTH test_act len_act)
+ FILE (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
+ LIST (LENGTH test_ref len_ref)
+ IF (NOT ${len_act} STREQUAL "0")
+ MATH (EXPR _FP_LEN "${len_ref} - 1")
+ FOREACH (line RANGE 0 ${_FP_LEN})
+ LIST (GET test_act ${line} str_act)
+ LIST (GET test_ref ${line} str_ref)
+ IF (NOT "${str_act}" STREQUAL "${str_ref}")
+ IF (NOT "${str_act}" STREQUAL "")
+ SET (TEST_RESULT 1)
+ MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ ENDIF (NOT "${str_act}" STREQUAL "")
+ ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
+ ENDFOREACH (line RANGE 0 ${_FP_LEN})
+ ENDIF (NOT ${len_act} STREQUAL "0")
+ IF (NOT ${len_act} STREQUAL ${len_ref})
+ SET (TEST_RESULT 1)
+ ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
# again, if return value is !=0 scream and shout
IF (NOT ${TEST_RESULT} STREQUAL 0)
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match P_${TEST_REFERENCE}")
+ MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
ENDIF (NOT TEST_SKIP_COMPARE)
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 78ccf9f..0a80873 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -1,5 +1,6 @@
# runTest.cmake executes a command and captures the output in a file. File is then compared
# against a reference file. Exit status of command can also be compared.
+cmake_policy(SET CMP0007 NEW)
# arguments checking
IF (NOT TEST_PROGRAM)
@@ -108,24 +109,33 @@ IF (NOT TEST_SKIP_COMPARE)
ENDIF (WIN32 AND NOT MINGW)
# now compare the output with the reference
+ EXECUTE_PROCESS (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
SET (TEST_RESULT 0)
FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- LIST (LENGTH "${test_act}" len_act)
+ LIST (LENGTH test_act len_act)
FILE (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- LIST (LENGTH "${test_ref}" len_ref)
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- FOREACH (line RANGE 0 ${_FP_LEN})
- LIST (GET "${test_act}" ${line} str_act)
- LIST (GET "${test_ref}" ${line} str_ref)
- STRING (COMPARE NOTEQUAL ${str_act} ${str_ref} str_res)
- IF (${str_res})
- SET (TEST_RESULT 1)
- MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}")
- ENDIF (${str_res})
- ENDFOREACH (line RANGE 0 ${_FP_LEN})
+ LIST (LENGTH test_ref len_ref)
+ IF (NOT ${len_act} STREQUAL "0")
+ MATH (EXPR _FP_LEN "${len_ref} - 1")
+ FOREACH (line RANGE 0 ${_FP_LEN})
+ LIST (GET test_act ${line} str_act)
+ LIST (GET test_ref ${line} str_ref)
+ IF (NOT "${str_act}" STREQUAL "${str_ref}")
+ IF (NOT "${str_act}" STREQUAL "")
+ SET (TEST_RESULT 1)
+ MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ ENDIF (NOT "${str_act}" STREQUAL "")
+ ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
+ ENDFOREACH (line RANGE 0 ${_FP_LEN})
+ ENDIF (NOT ${len_act} STREQUAL "0")
IF (NOT ${len_act} STREQUAL ${len_ref})
SET (TEST_RESULT 1)
ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
@@ -141,24 +151,34 @@ IF (NOT TEST_SKIP_COMPARE)
ENDIF (WIN32 AND NOT MINGW)
# now compare the error output with the error reference
+ EXECUTE_PROCESS (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
SET (TEST_RESULT 0)
FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
- LIST (LENGTH "${test_act}" len_act)
+ LIST (LENGTH test_act len_act)
FILE (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
- LIST (LENGTH "${test_ref}" len_ref)
+ LIST (LENGTH test_ref len_ref)
MATH (EXPR _FP_LEN "${len_ref} - 1")
- FOREACH (line RANGE 0 ${_FP_LEN})
- LIST (GET "${test_act}" ${line} str_act)
- LIST (GET "${test_ref}" ${line} str_ref)
- STRING (COMPARE NOTEQUAL ${str_act} ${str_ref} str_res)
- IF (${str_res})
- SET (TEST_RESULT 1)
- MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}")
- ENDIF (${str_res})
- ENDFOREACH (line RANGE 0 ${_FP_LEN})
+ IF (NOT ${len_act} STREQUAL "0")
+ MATH (EXPR _FP_LEN "${len_ref} - 1")
+ FOREACH (line RANGE 0 ${_FP_LEN})
+ LIST (GET test_act ${line} str_act)
+ LIST (GET test_ref ${line} str_ref)
+ IF (NOT "${str_act}" STREQUAL "${str_ref}")
+ IF (NOT "${str_act}" STREQUAL "")
+ SET (TEST_RESULT 1)
+ MESSAGE ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
+ ENDIF (NOT "${str_act}" STREQUAL "")
+ ENDIF (NOT "${str_act}" STREQUAL "${str_ref}")
+ ENDFOREACH (line RANGE 0 ${_FP_LEN})
+ ENDIF (NOT ${len_act} STREQUAL "0")
IF (NOT ${len_act} STREQUAL ${len_ref})
SET (TEST_RESULT 1)
ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
@@ -171,4 +191,3 @@ ENDIF (NOT TEST_SKIP_COMPARE)
# everything went fine...
MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
-
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 8df7c6f..82d664d 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -17,7 +17,7 @@
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure b/configure
index c0945b1..36d9349 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id: configure.ac 22697 2012-08-19 14:35:47Z hdftest .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for HDF5 1.9.135.
+# Generated by GNU Autoconf 2.69 for HDF5 1.9.141.
#
# Report bugs to <help@hdfgroup.org>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='HDF5'
PACKAGE_TARNAME='hdf5'
-PACKAGE_VERSION='1.9.135'
-PACKAGE_STRING='HDF5 1.9.135'
+PACKAGE_VERSION='1.9.141'
+PACKAGE_STRING='HDF5 1.9.141'
PACKAGE_BUGREPORT='help@hdfgroup.org'
PACKAGE_URL=''
@@ -1484,7 +1484,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures HDF5 1.9.135 to adapt to many kinds of systems.
+\`configure' configures HDF5 1.9.141 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1554,7 +1554,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of HDF5 1.9.135:";;
+ short | recursive ) echo "Configuration of HDF5 1.9.141:";;
esac
cat <<\_ACEOF
@@ -1750,7 +1750,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-HDF5 configure 1.9.135
+HDF5 configure 1.9.141
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2844,7 +2844,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by HDF5 $as_me 1.9.135, which was
+It was created by HDF5 $as_me 1.9.141, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3676,7 +3676,7 @@ fi
# Define the identity of the package.
PACKAGE='hdf5'
- VERSION='1.9.135'
+ VERSION='1.9.141'
cat >>confdefs.h <<_ACEOF
@@ -22754,6 +22754,14 @@ fi
done
+## Also need to detect Darwin for pubconf
+case $host_os in
+ darwin*)
+
+$as_echo "#define HAVE_DARWIN 1" >>confdefs.h
+
+ ;;
+esac
## Windows
case "`uname`" in
@@ -27152,19 +27160,12 @@ if ${hdf5_cv_lone_colon+:} false; then :
else
echo "int main(int argc, char * argv) {return 0;}" > conftest.c
- $CC $CFLAGS conftest.c > /dev/null 2> /dev/null
-case "`uname`" in
- CYGWIN*)
- echo "./a.exe :" > conftest.sh
- ;;
- *)
- echo "./a.out :" > conftest.sh
- ;;
-esac
+ $CC $CFLAGS conftest.c -o a.out> /dev/null 2> /dev/null
+ echo "./a.out :" > conftest.sh
chmod 700 conftest.sh
./conftest.sh 2> conftest.out
- rm -f a.out a.exe
+ rm -f a.out
TEST_OUTPUT=`cat conftest.out`
if test "X$TEST_OUTPUT" = "X"; then
@@ -31722,7 +31723,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by HDF5 $as_me 1.9.135, which was
+This file was extended by HDF5 $as_me 1.9.141, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31788,7 +31789,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-HDF5 config.status 1.9.135
+HDF5 config.status 1.9.141
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -34561,7 +34562,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-HDF5 config.lt 1.9.135
+HDF5 config.lt 1.9.141
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
diff --git a/configure.ac b/configure.ac
index 31815c1..15ecc37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_PREREQ([2.69])
## NOTE: Do not forget to change the version number here when we do a
## release!!!
##
-AC_INIT([HDF5], [1.9.135], [help@hdfgroup.org])
+AC_INIT([HDF5], [1.9.141], [help@hdfgroup.org])
AC_CONFIG_SRCDIR([src/H5.c])
AC_CONFIG_HEADER([src/H5config.h])
@@ -1278,6 +1278,12 @@ AC_CHECK_HEADERS([stdint.h], [C9x=yes])
## Darwin
AC_CHECK_HEADERS([mach/mach_time.h])
+## Also need to detect Darwin for pubconf
+case $host_os in
+ darwin*)
+ AC_DEFINE([HAVE_DARWIN], [1], [Define if Darwin or Mac OS X])
+ ;;
+esac
## Windows
case "`uname`" in
@@ -2232,19 +2238,12 @@ AC_CACHE_CHECK([if lone colon can be used as an argument],
[hdf5_cv_lone_colon],
[
echo "int main(int argc, char * argv[]) {return 0;}" > conftest.c
- $CC $CFLAGS conftest.c > /dev/null 2> /dev/null
-case "`uname`" in
- CYGWIN*)
- echo "./a.exe :" > conftest.sh
- ;;
- *)
- echo "./a.out :" > conftest.sh
- ;;
-esac
+ $CC $CFLAGS conftest.c -o a.out> /dev/null 2> /dev/null
+ echo "./a.out :" > conftest.sh
chmod 700 conftest.sh
./conftest.sh 2> conftest.out
- rm -f a.out a.exe
+ rm -f a.out
TEST_OUTPUT=`cat conftest.out`
if test "X$TEST_OUTPUT" = "X"; then
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index b23c6f8..3abf97a 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_EXAMPLES)
#-----------------------------------------------------------------------------
@@ -10,6 +10,15 @@ ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
# Define Sources
#-----------------------------------------------------------------------------
SET (examples
+ h5_crtdat
+ h5_rdwt
+ h5_crtatt
+ h5_crtgrp
+ h5_crtgrpar
+ h5_crtgrpd
+ h5_cmprss
+ h5_extend
+ h5_subset
h5_write
h5_read
h5_extend_write
@@ -51,11 +60,15 @@ IF (BUILD_TESTING)
-E remove
Attributes.h5
btrees_file.h5
+ cmprss.h5
default_file.h5
+ dset.h5
+ extend.h5
extlink_prefix_source.h5
extlink_source.h5
extlink_target.h5
group.h5
+ groups.h5
hard_link.h5
mount1.h5
mount2.h5
@@ -71,6 +84,7 @@ IF (BUILD_TESTING)
separate_indexes_file.h5
small_lists_file.h5
soft_link.h5
+ subset.h5
unix2win.h5
)
IF (NOT "${last_test}" STREQUAL "")
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 58f50e7..d8eac95 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -29,7 +29,9 @@ endif
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
-EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
+EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
+ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
+ h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg
TEST_SCRIPT=testh5cc.sh
@@ -37,6 +39,8 @@ TEST_SCRIPT=testh5cc.sh
# Install files
# List all file that should be installed in examples directory
INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
+ h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \
+ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \
h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c
@@ -55,9 +59,14 @@ $(EXTRA_PROG): $(H5CC)
$(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
endif
-# Two of the examples depend on files created by other examples.
+# Some examples depend on files created by other examples.
h5_read.chkexe_: h5_write.chkexe_
h5_chunk_read.chkexe_: h5_extend_write.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
# The external link examples demonstrate how to use paths; they need
# directories to be created to do this.
@@ -82,6 +91,15 @@ EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples
# library above.
h5_chunk_read: $(srcdir)/h5_chunk_read.c
h5_compound: $(srcdir)/h5_compound.c
+h5_crtgrpd: $(srcdir)/h5_crtgrpd.c
+h5_subset: $(srcdir)/h5_subset.c
+h5_cmprss: $(srcdir)/h5_cmprss.c
+h5_rdwt: $(srcdir)/h5_rdwt.c
+h5_crtgrpar: $(srcdir)/h5_crtgrpar.c
+h5_extend: $(srcdir)/h5_extend.c
+h5_crtatt: $(srcdir)/h5_crtatt.c
+h5_crtgrp: $(srcdir)/h5_crtgrp.c
+h5_crtdat: $(srcdir)/h5_crtdat.c
h5_extend_write: $(srcdir)/h5_extend_write.c
h5_group: $(srcdir)/h5_group.c
h5_write: $(srcdir)/h5_write.c
diff --git a/examples/Makefile.in b/examples/Makefile.in
index fc0f541..340f3d9 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -389,7 +389,9 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
-EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
+EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
+ h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
+ h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_reference h5_drivers \
h5_ref2reg h5_extlink h5_elink_unix2win h5_shared_mesg
@@ -398,6 +400,8 @@ TEST_SCRIPT = testh5cc.sh
# Install files
# List all file that should be installed in examples directory
INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c \
+ h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c \
+ h5_extend.c h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
h5_compound.c h5_group.c h5_select.c h5_attribute.c h5_mount.c \
h5_reference.c h5_drivers.c h5_extlink.c h5_elink_unix2win.c \
h5_ref2reg.c h5_shared_mesg.c ph5example.c
@@ -663,9 +667,14 @@ help:
@BUILD_PARALLEL_CONDITIONAL_FALSE@$(EXTRA_PROG): $(H5CC)
@BUILD_PARALLEL_CONDITIONAL_FALSE@ $(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
-# Two of the examples depend on files created by other examples.
+# Some examples depend on files created by other examples.
h5_read.chkexe_: h5_write.chkexe_
h5_chunk_read.chkexe_: h5_extend_write.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
$(EXTLINK_DIRS):
echo $(mkdir_p) $@
@@ -679,6 +688,15 @@ $(EXTLINK_DIRS):
# library above.
h5_chunk_read: $(srcdir)/h5_chunk_read.c
h5_compound: $(srcdir)/h5_compound.c
+h5_crtgrpd: $(srcdir)/h5_crtgrpd.c
+h5_subset: $(srcdir)/h5_subset.c
+h5_cmprss: $(srcdir)/h5_cmprss.c
+h5_rdwt: $(srcdir)/h5_rdwt.c
+h5_crtgrpar: $(srcdir)/h5_crtgrpar.c
+h5_extend: $(srcdir)/h5_extend.c
+h5_crtatt: $(srcdir)/h5_crtatt.c
+h5_crtgrp: $(srcdir)/h5_crtgrp.c
+h5_crtdat: $(srcdir)/h5_crtdat.c
h5_extend_write: $(srcdir)/h5_extend_write.c
h5_group: $(srcdir)/h5_group.c
h5_write: $(srcdir)/h5_write.c
diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c
new file mode 100644
index 0000000..4a2f982
--- /dev/null
+++ b/examples/h5_cmprss.c
@@ -0,0 +1,125 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a compressed dataset.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+
+#define FILE "cmprss.h5"
+#define RANK 2
+#define DIM0 100
+#define DIM1 20
+
+int main () {
+
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hid_t plist_id;
+
+ size_t nelmts;
+ unsigned flags, filter_info;
+ H5Z_filter_t filter_type;
+
+ herr_t status;
+ hsize_t dims[2];
+ hsize_t cdims[2];
+
+ int idx;
+ int i,j, numfilt;
+ int buf[DIM0][DIM1];
+ int rbuf [DIM0][DIM1];
+
+ /* Uncomment these variables to use SZIP compression
+ unsigned szip_options_mask;
+ unsigned szip_pixels_per_block;
+ */
+
+ /* Create a file. */
+ file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+
+ /* Create dataset "Compressed Data" in the group using absolute name. */
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ dataspace_id = H5Screate_simple (RANK, dims, NULL);
+
+ plist_id = H5Pcreate (H5P_DATASET_CREATE);
+
+ /* Dataset must be chunked for compression */
+ cdims[0] = 20;
+ cdims[1] = 20;
+ status = H5Pset_chunk (plist_id, 2, cdims);
+
+ /* Set ZLIB / DEFLATE Compression using compression level 6.
+ * To use SZIP Compression comment out these lines.
+ */
+ status = H5Pset_deflate (plist_id, 6);
+
+ /* Uncomment these lines to set SZIP Compression
+ szip_options_mask = H5_SZIP_NN_OPTION_MASK;
+ szip_pixels_per_block = 16;
+ status = H5Pset_szip (plist_id, szip_options_mask, szip_pixels_per_block);
+ */
+
+ dataset_id = H5Dcreate2 (file_id, "Compressed_Data", H5T_STD_I32BE,
+ dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
+
+ for (i = 0; i< DIM0; i++)
+ for (j=0; j<DIM1; j++)
+ buf[i][j] = i+j;
+
+ status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+
+ status = H5Sclose (dataspace_id);
+ status = H5Dclose (dataset_id);
+ status = H5Pclose (plist_id);
+ status = H5Fclose (file_id);
+
+ /* Now reopen the file and dataset in the file. */
+ file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ dataset_id = H5Dopen2 (file_id, "Compressed_Data", H5P_DEFAULT);
+
+ /* Retrieve filter information. */
+ plist_id = H5Dget_create_plist (dataset_id);
+
+ numfilt = H5Pget_nfilters (plist_id);
+ printf ("Number of filters associated with dataset: %i\n", numfilt);
+
+ for (i=0; i<numfilt; i++) {
+ nelmts = 0;
+ filter_type = H5Pget_filter2 (plist_id, 0, &flags, &nelmts, NULL, 0, NULL,
+ &filter_info);
+ printf ("Filter Type: ");
+ switch (filter_type) {
+ case H5Z_FILTER_DEFLATE:
+ printf ("H5Z_FILTER_DEFLATE\n");
+ break;
+ case H5Z_FILTER_SZIP:
+ printf ("H5Z_FILTER_SZIP\n");
+ break;
+ default:
+ printf ("Other filter type included.\n");
+ }
+ }
+
+ status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, rbuf);
+
+ status = H5Dclose (dataset_id);
+ status = H5Pclose (plist_id);
+ status = H5Fclose (file_id);
+}
diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c
new file mode 100644
index 0000000..416839f
--- /dev/null
+++ b/examples/h5_crtatt.c
@@ -0,0 +1,63 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create an attribute attached to a
+ * dataset. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */
+ hsize_t dims;
+ int attr_data[2];
+ herr_t status;
+
+ /* Initialize the attribute data. */
+ attr_data[0] = 100;
+ attr_data[1] = 200;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+
+ /* Create the data space for the attribute. */
+ dims = 2;
+ dataspace_id = H5Screate_simple(1, &dims, NULL);
+
+ /* Create a dataset attribute. */
+ attribute_id = H5Acreate2 (dataset_id, "Units", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the attribute data. */
+ status = H5Awrite(attribute_id, H5T_NATIVE_INT, attr_data);
+
+ /* Close the attribute. */
+ status = H5Aclose(attribute_id);
+
+ /* Close the dataspace. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close to the dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c
new file mode 100644
index 0000000..bbb29b2
--- /dev/null
+++ b/examples/h5_crtdat.c
@@ -0,0 +1,51 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a dataset that is a 4 x 6
+ * array. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create the data space for the dataset. */
+ dims[0] = 4;
+ dims[1] = 6;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create the dataset. */
+ dataset_id = H5Dcreate2(file_id, "/dset", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* End access to the dataset and release resources used by it. */
+ status = H5Dclose(dataset_id);
+
+ /* Terminate access to the data space. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
+
diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c
new file mode 100644
index 0000000..3a94a8f
--- /dev/null
+++ b/examples/h5_crtgrp.c
@@ -0,0 +1,40 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create and close a group.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "group.h5"
+
+int main() {
+
+ hid_t file_id, group_id; /* identifiers */
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create a group named "/MyGroup" in the file. */
+ group_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Close the group. */
+ status = H5Gclose(group_id);
+
+ /* Terminate access to the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c
new file mode 100644
index 0000000..9e6fc40
--- /dev/null
+++ b/examples/h5_crtgrpar.c
@@ -0,0 +1,48 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates the creation of groups using absolute and
+ * relative names. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "groups.h5"
+
+int main() {
+
+ hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */
+ herr_t status;
+
+ /* Create a new file using default properties. */
+ file_id = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "MyGroup" in the root group using absolute name. */
+ group1_id = H5Gcreate2(file_id, "/MyGroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "Group_A" in group "MyGroup" using absolute name. */
+ group2_id = H5Gcreate2(file_id, "/MyGroup/Group_A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Create group "Group_B" in group "MyGroup" using relative name. */
+ group3_id = H5Gcreate2(group1_id, "Group_B", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Close groups. */
+ status = H5Gclose(group1_id);
+ status = H5Gclose(group2_id);
+ status = H5Gclose(group3_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c
new file mode 100644
index 0000000..9c45928
--- /dev/null
+++ b/examples/h5_crtgrpd.c
@@ -0,0 +1,91 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to create a dataset in a group.
+ * It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "groups.h5"
+
+int main() {
+
+ hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */
+ hsize_t dims[2];
+ herr_t status;
+ int i, j, dset1_data[3][3], dset2_data[2][10];
+
+ /* Initialize the first dataset. */
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
+ dset1_data[i][j] = j + 1;
+
+ /* Initialize the second dataset. */
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 10; j++)
+ dset2_data[i][j] = j + 1;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Create the data space for the first dataset. */
+ dims[0] = 3;
+ dims[1] = 3;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create a dataset in group "MyGroup". */
+ dataset_id = H5Dcreate2(file_id, "/MyGroup/dset1", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the first dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset1_data);
+
+ /* Close the data space for the first dataset. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the first dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Open an existing group of the specified file. */
+ group_id = H5Gopen2(file_id, "/MyGroup/Group_A", H5P_DEFAULT);
+
+ /* Create the data space for the second dataset. */
+ dims[0] = 2;
+ dims[1] = 10;
+ dataspace_id = H5Screate_simple(2, dims, NULL);
+
+ /* Create the second dataset in group "Group_A". */
+ dataset_id = H5Dcreate2(group_id, "dset2", H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Write the second dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset2_data);
+
+ /* Close the data space for the second dataset. */
+ status = H5Sclose(dataspace_id);
+
+ /* Close the second dataset */
+ status = H5Dclose(dataset_id);
+
+ /* Close the group. */
+ status = H5Gclose(group_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
+
diff --git a/examples/h5_extend.c b/examples/h5_extend.c
new file mode 100644
index 0000000..105e553
--- /dev/null
+++ b/examples/h5_extend.c
@@ -0,0 +1,146 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example how to work with extendible datasets. The dataset
+ * must be chunked in order to be extendible.
+ *
+ * It is used in the HDF5 Tutorial.
+ */
+
+
+#include "hdf5.h"
+
+#define FILENAME "extend.h5"
+#define DATASETNAME "ExtendibleArray"
+#define RANK 2
+
+int
+main (void)
+{
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t filespace, memspace;
+ hid_t prop;
+
+ hsize_t dims[2] = {3, 3}; /* dataset dimensions at creation time */
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ herr_t status;
+ hsize_t chunk_dims[2] = {2, 5};
+ int data[3][3] = { {1, 1, 1}, /* data to write */
+ {1, 1, 1},
+ {1, 1, 1} };
+
+ /* Variables used in extending and writing to the extended portion of dataset */
+ hsize_t size[2];
+ hsize_t offset[2];
+ hsize_t dimsext[2] = {7, 3}; /* extend dimensions */
+ int dataext[7][3] = { {2, 3, 4},
+ {2, 3, 4},
+ {2, 3, 4},
+ {2, 3, 4},
+ {2, 3, 4},
+ {2, 3, 4},
+ {2, 3, 4} };
+
+ /* Variables used in reading data back */
+ hsize_t chunk_dimsr[2];
+ hsize_t dimsr[2];
+ hsize_t i, j;
+ int rdata[10][3];
+ herr_t status_n;
+ int rank, rank_chunk;
+
+ /* Create the data space with unlimited dimensions. */
+ dataspace = H5Screate_simple (RANK, dims, maxdims);
+
+ /* Create a new file. If file exists its contents will be overwritten. */
+ file = H5Fcreate (FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* Modify dataset creation properties, i.e. enable chunking */
+ prop = H5Pcreate (H5P_DATASET_CREATE);
+ status = H5Pset_chunk (prop, RANK, chunk_dims);
+
+ /* Create a new dataset within the file using chunk
+ creation properties. */
+ dataset = H5Dcreate2 (file, DATASETNAME, H5T_NATIVE_INT, dataspace,
+ H5P_DEFAULT, prop, H5P_DEFAULT);
+
+ /* Write data to dataset */
+ status = H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, data);
+
+ /* Extend the dataset. Dataset becomes 10 x 3 */
+ size[0] = dims[0]+ dimsext[0];
+ size[1] = dims[1];
+ status = H5Dset_extent (dataset, size);
+
+ /* Select a hyperslab in extended portion of dataset */
+ filespace = H5Dget_space (dataset);
+ offset[0] = 3;
+ offset[1] = 0;
+ status = H5Sselect_hyperslab (filespace, H5S_SELECT_SET, offset, NULL,
+ dimsext, NULL);
+
+ /* Define memory space */
+ memspace = H5Screate_simple (RANK, dimsext, NULL);
+
+ /* Write the data to the extended portion of dataset */
+ status = H5Dwrite (dataset, H5T_NATIVE_INT, memspace, filespace,
+ H5P_DEFAULT, dataext);
+
+ /* Close resources */
+ status = H5Dclose (dataset);
+ status = H5Pclose (prop);
+ status = H5Sclose (dataspace);
+ status = H5Sclose (memspace);
+ status = H5Sclose (filespace);
+ status = H5Fclose (file);
+
+ /********************************************
+ * Re-open the file and read the data back. *
+ ********************************************/
+
+ file = H5Fopen (FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
+ dataset = H5Dopen2 (file, DATASETNAME, H5P_DEFAULT);
+
+ filespace = H5Dget_space (dataset);
+ rank = H5Sget_simple_extent_ndims (filespace);
+ status_n = H5Sget_simple_extent_dims (filespace, dimsr, NULL);
+
+ prop = H5Dget_create_plist (dataset);
+
+ if (H5D_CHUNKED == H5Pget_layout (prop))
+ rank_chunk = H5Pget_chunk (prop, rank, chunk_dimsr);
+
+ memspace = H5Screate_simple (rank, dimsr, NULL);
+ status = H5Dread (dataset, H5T_NATIVE_INT, memspace, filespace,
+ H5P_DEFAULT, rdata);
+
+ printf("\n");
+ printf("Dataset: \n");
+ for (j = 0; j < dimsr[0]; j++)
+ {
+ for (i = 0; i < dimsr[1]; i++)
+ printf("%d ", rdata[j][i]);
+ printf("\n");
+ }
+
+ status = H5Pclose (prop);
+ status = H5Dclose (dataset);
+ status = H5Sclose (filespace);
+ status = H5Sclose (memspace);
+ status = H5Fclose (file);
+}
diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c
new file mode 100644
index 0000000..d5444e0
--- /dev/null
+++ b/examples/h5_rdwt.c
@@ -0,0 +1,53 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to write and read data in an existing
+ * dataset. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+#define FILE "dset.h5"
+
+int main() {
+
+ hid_t file_id, dataset_id; /* identifiers */
+ herr_t status;
+ int i, j, dset_data[4][6];
+
+ /* Initialize the dataset. */
+ for (i = 0; i < 4; i++)
+ for (j = 0; j < 6; j++)
+ dset_data[i][j] = i * 6 + j + 1;
+
+ /* Open an existing file. */
+ file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ /* Open an existing dataset. */
+ dataset_id = H5Dopen2(file_id, "/dset", H5P_DEFAULT);
+
+ /* Write the dataset. */
+ status = H5Dwrite(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset_data);
+
+ status = H5Dread(dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ dset_data);
+
+ /* Close the dataset. */
+ status = H5Dclose(dataset_id);
+
+ /* Close the file. */
+ status = H5Fclose(file_id);
+}
diff --git a/examples/h5_subset.c b/examples/h5_subset.c
new file mode 100644
index 0000000..66872ea
--- /dev/null
+++ b/examples/h5_subset.c
@@ -0,0 +1,153 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This example illustrates how to read/write a subset of data (a slab)
+ * from/to a dataset in an HDF5 file. It is used in the HDF5 Tutorial.
+ */
+
+#include "hdf5.h"
+
+#define FILE "subset.h5"
+#define DATASETNAME "IntArray"
+#define RANK 2
+
+#define DIM0_SUB 3 /* subset dimensions */
+#define DIM1_SUB 4
+
+
+#define DIM0 8 /* size of dataset */
+#define DIM1 10
+
+int
+main (void)
+{
+ hsize_t dims[2], dimsm[2];
+ int data[DIM0][DIM1]; /* data to write */
+ int sdata[DIM0_SUB][DIM1_SUB]; /* subset to write */
+ int rdata[DIM0][DIM1]; /* buffer for read */
+
+ hid_t file_id, dataset_id; /* handles */
+ hid_t dataspace_id, memspace_id;
+
+ herr_t status;
+
+ hsize_t count[2]; /* size of subset in the file */
+ hsize_t offset[2]; /* subset offset in the file */
+ hsize_t stride[2];
+ hsize_t block[2];
+ int i, j;
+
+
+ /*****************************************************************
+ * Create a new file with default creation and access properties.*
+ * Then create a dataset and write data to it and close the file *
+ * and dataset. *
+ *****************************************************************/
+
+ file_id = H5Fcreate (FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ dims[0] = DIM0;
+ dims[1] = DIM1;
+ dataspace_id = H5Screate_simple (RANK, dims, NULL);
+
+ dataset_id = H5Dcreate2 (file_id, DATASETNAME, H5T_STD_I32BE, dataspace_id,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+
+ for (j = 0; j < DIM0; j++) {
+ for (i = 0; i < DIM1; i++)
+ if (i< (DIM1/2))
+ data[j][i] = 1;
+ else
+ data[j][i] = 2;
+ }
+
+ status = H5Dwrite (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, data);
+
+ printf ("\nData Written to File:\n");
+ for (i = 0; i<DIM0; i++){
+ for (j = 0; j<DIM1; j++)
+ printf (" %i", data[i][j]);
+ printf ("\n");
+ }
+ status = H5Sclose (dataspace_id);
+ status = H5Dclose (dataset_id);
+ status = H5Fclose (file_id);
+
+
+ /*****************************************************
+ * Reopen the file and dataset and write a subset of *
+ * values to the dataset.
+ *****************************************************/
+
+ file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
+ dataset_id = H5Dopen2 (file_id, DATASETNAME, H5P_DEFAULT);
+
+ /* Specify size and shape of subset to write. */
+
+ offset[0] = 1;
+ offset[1] = 2;
+
+ count[0] = DIM0_SUB;
+ count[1] = DIM1_SUB;
+
+ stride[0] = 1;
+ stride[1] = 1;
+
+ block[0] = 1;
+ block[1] = 1;
+
+ /* Create memory space with size of subset. Get file dataspace
+ and select subset from file dataspace. */
+
+ dimsm[0] = DIM0_SUB;
+ dimsm[1] = DIM1_SUB;
+ memspace_id = H5Screate_simple (RANK, dimsm, NULL);
+
+ dataspace_id = H5Dget_space (dataset_id);
+ status = H5Sselect_hyperslab (dataspace_id, H5S_SELECT_SET, offset,
+ stride, count, block);
+
+ /* Write a subset of data to the dataset, then read the
+ entire dataset back from the file. */
+
+ printf ("\nWrite subset to file specifying:\n");
+ printf (" offset=1x2 stride=1x1 count=3x4 block=1x1\n");
+ for (j = 0; j < DIM0_SUB; j++) {
+ for (i = 0; i < DIM1_SUB; i++)
+ sdata[j][i] = 5;
+ }
+
+ status = H5Dwrite (dataset_id, H5T_NATIVE_INT, memspace_id,
+ dataspace_id, H5P_DEFAULT, sdata);
+
+ status = H5Dread (dataset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ H5P_DEFAULT, rdata);
+
+ printf ("\nData in File after Subset is Written:\n");
+ for (i = 0; i<DIM0; i++){
+ for (j = 0; j<DIM1; j++)
+ printf (" %i", rdata[i][j]);
+ printf ("\n");
+ }
+
+ status = H5Sclose (memspace_id);
+ status = H5Sclose (dataspace_id);
+ status = H5Dclose (dataset_id);
+ status = H5Fclose (file_id);
+
+}
diff --git a/examples/run-c-ex.sh.in b/examples/run-c-ex.sh.in
index 8d0bdcd..9b2a2bb 100644
--- a/examples/run-c-ex.sh.in
+++ b/examples/run-c-ex.sh.in
@@ -78,7 +78,25 @@ fi
# Run tests
if [ $? -eq 0 ]
then
- if (RunTest h5_write &&\
+ if (RunTest h5_crtdat &&\
+ rm h5_crtdat &&\
+ RunTest h5_extend &&\
+ rm h5_extend &&\
+ RunTest h5_rdwt &&\
+ rm h5_rdwt &&\
+ RunTest h5_crtatt &&\
+ rm h5_crtatt &&\
+ RunTest h5_crtgrp &&\
+ rm h5_crtgrp &&\
+ RunTest h5_crtgrpar &&\
+ rm h5_crtgrpar &&\
+ RunTest h5_crtgrpd &&\
+ rm h5_crtgrpd &&\
+ RunTest h5_subset &&\
+ rm h5_subset &&\
+ RunTest h5_cmprss &&\
+ rm h5_cmprss &&\
+ RunTest h5_write &&\
rm h5_write &&\
RunTest h5_read &&\
rm h5_read &&\
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index d18cdb4..9dbe8ca 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90 C CXX Fortran)
IF (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 4bd236e..0536183 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -14,13 +14,15 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
# Define Sources
#-----------------------------------------------------------------------------
SET (examples
- dsetexample
- fileexample
- rwdsetexample
- attrexample
- groupexample
- grpsexample
- grpdsetexample
+ h5_cmprss
+ h5_crtdat
+ h5_rdwt
+ h5_crtatt
+ h5_crtgrp
+ h5_crtgrpar
+ h5_crtgrpd
+ h5_extend
+ h5_subset
hyperslab
selectele
refobjexample
@@ -63,7 +65,7 @@ FOREACH (example ${examples})
ENDFOREACH (example ${examples})
-IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+IF (HDF5_ENABLE_F2003)
FOREACH (example ${F2003_examples})
ADD_EXECUTABLE (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example} ${LIB_TYPE})
@@ -88,7 +90,7 @@ IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
SET (last_test "f03_ex_${example}")
ENDIF (BUILD_TESTING)
ENDFOREACH (example ${F2003_examples})
-ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+ENDIF (HDF5_ENABLE_F2003)
IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index 310c4e2..e994d4e 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -32,15 +32,15 @@ endif
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
-EXAMPLE_PROG=dsetexample fileexample rwdsetexample attrexample groupexample \
- grpsexample grpdsetexample hyperslab selectele refobjexample \
- refregexample mountexample compound
+EXAMPLE_PROG=h5_crtdat h5_rdwt h5_crtatt h5_crtgrp \
+ h5_crtgrpar h5_crtgrpd h5_extend h5_subset h5_cmprss hyperslab selectele \
+ refobjexample refregexample mountexample compound
# List files to be installed here
-INSTALL_FILES=dsetexample.f90 fileexample.f90 rwdsetexample.f90 \
- attrexample.f90 groupexample.f90 grpsexample.f90 grpdsetexample.f90 \
- hyperslab.f90 selectele.f90 refobjexample.f90 \
- refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
+INSTALL_FILES=h5_crtdat.f90 h5_rdwt.f90 \
+ h5_crtatt.f90 h5_crtgrp.f90 h5_crtgrpar.f90 h5_crtgrpd.f90 \
+ h5_extend.f90 h5_subset.f90 h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
+ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
@@ -57,12 +57,12 @@ TEST_SCRIPT=testh5fc.sh
FORTRAN_API=yes
# Some examples depend on files created by other examples.
-grpdsetexample.chkexe_: grpsexample.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
refregexample.chkexe_: refobjexample.chkexe_
-# rwdsetexample and attrexample both modify the same file created by
-# dsetexample. Serialize them.
-rwdsetexample.chkexe_: dsetexample.chkexe_
-attrexample.chkexe_: rwdsetexample.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Tell automake how to build examples using h5fc
# Additional dependencies for the examples are listed below
@@ -84,13 +84,15 @@ EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/fortran
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# and fortran libraries above.
-dsetexample: dsetexample.f90
-fileexample: fileexample.f90
-rwdsetexample: rwdsetexample.f90
-attrexample: attrexample.f90
-groupexample: groupexample.f90
-grpsexample: grpsexample.f90
-grpdsetexample: grpdsetexample.f90
+h5_crtdat: h5_crtdat.f90
+h5_extend: h5_extend.f90
+h5_subset: h5_subset.f90
+h5_rdwt: h5_rdwt.f90
+h5_crtatt: h5_crtatt.f90
+h5_crtgrp: h5_crtgrp.f90
+h5_crtgrpar: h5_crtgrpar.f90
+h5_crtgrpd: h5_crtgrpd.f90
+h5_cmprss: h5_cmprss.f90
hyperslab: hyperslab.f90
selectele: selectele.f90
refobjexample: refobjexample.f90
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index ac2314f..0978ac5 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -400,17 +400,17 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# be run.
# We don't tell automake about these programs so that it doesn't try to
# compile them with the regular fortran compiler.
-EXAMPLE_PROG = dsetexample fileexample rwdsetexample attrexample \
- groupexample grpsexample grpdsetexample hyperslab selectele \
+EXAMPLE_PROG = h5_crtdat h5_rdwt h5_crtatt h5_crtgrp h5_crtgrpar \
+ h5_crtgrpd h5_extend h5_subset h5_cmprss hyperslab selectele \
refobjexample refregexample mountexample compound \
$(am__append_1)
# List files to be installed here
-INSTALL_FILES = dsetexample.f90 fileexample.f90 rwdsetexample.f90 \
- attrexample.f90 groupexample.f90 grpsexample.f90 \
- grpdsetexample.f90 hyperslab.f90 selectele.f90 \
- refobjexample.f90 refregexample.f90 mountexample.f90 \
- compound.f90 ph5example.f90 $(am__append_2)
+INSTALL_FILES = h5_crtdat.f90 h5_rdwt.f90 h5_crtatt.f90 h5_crtgrp.f90 \
+ h5_crtgrpar.f90 h5_crtgrpd.f90 h5_extend.f90 h5_subset.f90 \
+ h5_cmprss.f90 hyperslab.f90 selectele.f90 refobjexample.f90 \
+ refregexample.f90 mountexample.f90 compound.f90 ph5example.f90 \
+ $(am__append_2)
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
TEST_SCRIPT = testh5fc.sh
@@ -663,12 +663,12 @@ help:
@$(top_srcdir)/bin/makehelp
# Some examples depend on files created by other examples.
-grpdsetexample.chkexe_: grpsexample.chkexe_
+h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
refregexample.chkexe_: refobjexample.chkexe_
-# rwdsetexample and attrexample both modify the same file created by
-# dsetexample. Serialize them.
-rwdsetexample.chkexe_: dsetexample.chkexe_
-attrexample.chkexe_: rwdsetexample.chkexe_
+# h5_rdwt and h5_crtatt both modify the same file created by
+# h5_crtdat. Serialize them.
+h5_rdwt.chkexe_: h5_crtdat.chkexe_
+h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Tell automake how to build examples using h5fc
# Additional dependencies for the examples are listed below
@@ -683,13 +683,15 @@ attrexample.chkexe_: rwdsetexample.chkexe_
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# and fortran libraries above.
-dsetexample: dsetexample.f90
-fileexample: fileexample.f90
-rwdsetexample: rwdsetexample.f90
-attrexample: attrexample.f90
-groupexample: groupexample.f90
-grpsexample: grpsexample.f90
-grpdsetexample: grpdsetexample.f90
+h5_crtdat: h5_crtdat.f90
+h5_extend: h5_extend.f90
+h5_subset: h5_subset.f90
+h5_rdwt: h5_rdwt.f90
+h5_crtatt: h5_crtatt.f90
+h5_crtgrp: h5_crtgrp.f90
+h5_crtgrpar: h5_crtgrpar.f90
+h5_crtgrpd: h5_crtgrpd.f90
+h5_cmprss: h5_cmprss.f90
hyperslab: hyperslab.f90
selectele: selectele.f90
refobjexample: refobjexample.f90
diff --git a/fortran/examples/attrexample.f90 b/fortran/examples/attrexample.f90
deleted file mode 100644
index ffbeabe..0000000
--- a/fortran/examples/attrexample.f90
+++ /dev/null
@@ -1,117 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the files COPYING and Copyright.html. COPYING can be found at the root *
-! of the source code distribution tree; Copyright.html can be found at the *
-! root level of an installed copy of the electronic HDF5 document set and *
-! is linked from the top-level documents page. It can also be found at *
-! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
-! access to either file, you may request a copy from help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-! This example shows how to create and write a dataset attribute.
-! It opens the existing file 'dset.h5', obtains the identifier of
-! the dataset "/dset", defines attribute's dataspace,
-! creates dataset attribute, writes the attribute, and then closes
-! the attribute's dataspace, attribute, dataset, and file.
-
- PROGRAM ATTREXAMPLE
-
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
- CHARACTER(LEN=9), PARAMETER :: aname = "attr_long" ! Attribute name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: attr_id ! Attribute identifier
- INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier
- INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier
- INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension
- INTEGER :: arank = 1 ! Attribure rank
- INTEGER(SIZE_T) :: attrlen ! Length of the attribute string
-
- CHARACTER(LEN=80), DIMENSION(2) :: attr_data ! Attribute data
-
- INTEGER :: error ! Error flag
- INTEGER(HSIZE_T), DIMENSION(1) :: data_dims
-
-
- !
- ! Initialize attribute's data
- !
- attr_data(1) = "Dataset character attribute"
- attr_data(2) = "Some other string here "
- attrlen = 80
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Open an existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
-
- !
- ! Create scalar data space for the attribute.
- !
- CALL h5screate_simple_f(arank, adims, aspace_id, error)
- !
- ! Create datatype for the attribute.
- !
- CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error)
- CALL h5tset_size_f(atype_id, attrlen, error)
-
- !
- ! Create dataset attribute.
- !
- CALL h5acreate_f(dset_id, aname, atype_id, aspace_id, &
- attr_id, error)
-
- !
- ! Write the attribute data.
- !
- data_dims(1) = 2
- CALL h5awrite_f(attr_id, atype_id, attr_data, data_dims, error)
-
- !
- ! Close the attribute.
- !
- CALL h5aclose_f(attr_id, error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(aspace_id, error)
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM ATTREXAMPLE
-
diff --git a/fortran/examples/dsetexample.f90 b/fortran/examples/dsetexample.f90
deleted file mode 100644
index 209a516..0000000
--- a/fortran/examples/dsetexample.f90
+++ /dev/null
@@ -1,85 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! 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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example shows how to create an empty dataset.
-! It creates a file called 'dsetf.h5', defines the
-! dataset dataspace, creates a dataset which is a 4x6 integer array,
-! and then closes the dataspace, the dataset, and the file.
-!
-
- PROGRAM DSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
- INTEGER(HID_T) :: dspace_id ! Dataspace identifier
-
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
- INTEGER :: rank = 2 ! Dataset rank
-
- INTEGER :: error ! Error flag
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create the dataspace.
- !
- CALL h5screate_simple_f(rank, dims, dspace_id, error)
-
- !
- ! Create the dataset with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
- dset_id, error)
-
- !
- ! End access to the dataset and release resources used by it.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Terminate access to the data space.
- !
- CALL h5sclose_f(dspace_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM DSETEXAMPLE
-
-
diff --git a/fortran/examples/fileexample.f90 b/fortran/examples/fileexample.f90
deleted file mode 100644
index 87119d2..0000000
--- a/fortran/examples/fileexample.f90
+++ /dev/null
@@ -1,49 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! 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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example demonstrates how to create and close an HDF5 file.
-! It creates a file called 'file.h5', and then closes the file.
-!
-
- PROGRAM FILEEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "filef.h5" ! File name
- INTEGER(HID_T) :: file_id ! File identifier
-
- INTEGER :: error ! Error flag
-
-!
-! Initialize FORTRAN interface.
-!
- CALL h5open_f (error)
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-!
-! Close FORTRAN interface.
-!
- CALL h5close_f(error)
- END PROGRAM FILEEXAMPLE
diff --git a/fortran/examples/grpdsetexample.f90 b/fortran/examples/grpdsetexample.f90
deleted file mode 100644
index 19fc660..0000000
--- a/fortran/examples/grpdsetexample.f90
+++ /dev/null
@@ -1,156 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the files COPYING and Copyright.html. COPYING can be found at the root *
-! of the source code distribution tree; Copyright.html can be found at the *
-! root level of an installed copy of the electronic HDF5 document set and *
-! is linked from the top-level documents page. It can also be found at *
-! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
-! access to either file, you may request a copy from help@hdfgroup.org. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! This example shows how to create a dataset in a particular group.
-! It opens the file created in the previous example and creates two datasets.
-! Absolute and relative dataset names are used.
-!
-
-
- PROGRAM GRPDSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
- CHARACTER(LEN=15), PARAMETER :: groupname = "MyGroup/Group_A" ! Group name
- CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name
- CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group_id ! Group identifier
- INTEGER(HID_T) :: dataset_id ! Dataset identifier
- INTEGER(HID_T) :: dataspace_id ! Data space identifier
-
- INTEGER :: i, j
- INTEGER :: error ! Error flag
-
- INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays
- INTEGER, DIMENSION(2,10) :: dset2_data !
-
- INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Datasets dimensions
- INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)!
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
-
- INTEGER :: rank = 2 ! Datasets rank
-
- !
- !Initialize dset1_data array
- !
- do i = 1, 3
- do j = 1, 3
- dset1_data(i,j) = j;
- end do
- end do
-
-
- !
- !Initialize dset2_data array
- !
- do i = 1, 2
- do j = 1, 10
- dset2_data(i,j) = j;
- end do
- end do
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Create the data space for the first dataset.
- !
- CALL h5screate_simple_f(rank, dims1, dataspace_id, error)
-
- !
- ! Create a dataset in group "MyGroup" with default properties.
- !
- CALL h5dcreate_f(file_id, dsetname1, H5T_NATIVE_INTEGER, dataspace_id, &
- dataset_id, error)
-
- !
- ! Write the first dataset.
- !
- data_dims(1) = 3
- data_dims(2) = 3
- CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error)
-
- !
- ! Close the dataspace for the first dataset.
- !
- CALL h5sclose_f(dataspace_id, error)
-
- !
- ! Close the first dataset.
- !
- CALL h5dclose_f(dataset_id, error)
-
- !
- ! Open an existing group in the specified file.
- !
- CALL h5gopen_f(file_id, groupname, group_id, error)
-
- !
- !Create the data space for the second dataset.
- !
- CALL h5screate_simple_f(rank, dims2, dataspace_id, error)
-
- !
- ! Create the second dataset in group "Group_A" with default properties.
- !
- CALL h5dcreate_f(group_id, dsetname2, H5T_NATIVE_INTEGER, dataspace_id, &
- dataset_id, error)
-
- !
- ! Write the second dataset.
- !
- data_dims(1) = 2
- data_dims(1) = 10
- CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error)
-
- !
- ! Close the dataspace for the second dataset.
- !
- CALL h5sclose_f(dataspace_id, error)
-
- !
- ! Close the second dataset.
- !
- CALL h5dclose_f(dataset_id, error)
-
- !
- ! Close the group.
- !
- CALL h5gclose_f(group_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM GRPDSETEXAMPLE
diff --git a/fortran/examples/grpsexample.f90 b/fortran/examples/grpsexample.f90
deleted file mode 100644
index 0f694e9..0000000
--- a/fortran/examples/grpsexample.f90
+++ /dev/null
@@ -1,83 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! 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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example code shows how to create groups
-! using absolute and relative names. It creates three groups:
-! the first two groups are created using the file identifier and
-! the group absolute names, and the third group is created using
-! a group identifier and the name relative to the specified group.
-!
-
-
- PROGRAM GRPSEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
- CHARACTER(LEN=8), PARAMETER :: groupname1 = "/MyGroup" ! Group name
- CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A"
- ! Group name
- CHARACTER(LEN=7), PARAMETER :: groupname3 = "Group_B" ! Group name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers
-
- INTEGER :: error ! Error flag
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create group "MyGroup" in the root group using absolute name.
- !
- CALL h5gcreate_f(file_id, groupname1, group1_id, error)
-
- !
- ! Create group "Group_A" in group "MyGroup" using absolute name.
- !
- CALL h5gcreate_f(file_id, groupname2, group2_id, error)
-
- !
- ! Create group "Group_B" in group "MyGroup" using relative name.
- !
- CALL h5gcreate_f(group1_id, groupname3, group3_id, error)
-
- !
- ! Close the groups.
- !
- CALL h5gclose_f(group1_id, error)
- CALL h5gclose_f(group2_id, error)
- CALL h5gclose_f(group3_id, error)
-
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM GRPSEXAMPLE
diff --git a/fortran/examples/h5_cmprss.f90 b/fortran/examples/h5_cmprss.f90
new file mode 100644
index 0000000..847a922
--- /dev/null
+++ b/fortran/examples/h5_cmprss.f90
@@ -0,0 +1,131 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example illustrates how to create a compressed dataset.
+! It is used in the HDF5 Tutorial.
+!
+PROGRAM h5_cmprss
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+ !
+ ! The dataset is stored in file "h5_cmprss.h5"
+ !
+ CHARACTER(LEN=12), PARAMETER :: filename = "h5_cmprss.h5"
+ INTEGER, PARAMETER :: rank = 2 ! Rank of the data set
+ INTEGER, PARAMETER :: dim0 = 100 ! Data set sizes
+ INTEGER, PARAMETER :: dim1 = 20
+
+ INTEGER(hid_t) :: file_id, dataset_id, dataspace_id ! Identifiers
+ INTEGER(hid_t) :: plist_id ! Property list identifier
+
+ INTEGER :: error
+ INTEGER(hsize_t), DIMENSION(1:rank) :: dims ! dimensions of data
+ INTEGER(hsize_t), DIMENSION(1:rank) :: cdims ! sizes of chunked data
+
+ INTEGER :: i,j, numfilt
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: buf ! write buffer
+ INTEGER, DIMENSION(1:dim0,1:dim1) :: rbuf ! read buffer
+ INTEGER(HSIZE_T), DIMENSION(1:rank) :: data_dims ! dimensions of data buffers
+
+ INTEGER, DIMENSION(1:1) :: cd_values ! Auxiliary data for the filter
+ INTEGER(size_t) :: nelmts ! Number of elements in cd_values
+ INTEGER :: flags ! Bit vector specifying certain general properties of the filter
+ INTEGER(SIZE_T) :: namelen = 180 ! Anticipated number of characters in name
+ CHARACTER(LEN=180) :: name ! Name of the filter
+ INTEGER :: filter_id ! Filter identification number
+
+ ! Uncomment these variables to use SZIP compression
+ !INTEGER :: szip_options_mask
+ !INTEGER :: szip_pixels_per_block
+
+ !
+ !Initialize FORTRAN predifined datatypes
+ !
+ CALL h5open_f(error)
+ !
+ ! Create a file
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+ !
+ ! Create dataset "Compressed Data" in the group using absolute name.
+ dims(1:2) = (/dim0, dim1/)
+ CALL h5screate_simple_f(rank, dims, dataspace_id, error)
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, plist_id, error)
+ !
+ ! Dataset must be chunked for compression
+ cdims(1:2) = 20
+ CALL h5pset_chunk_f(plist_id, 2, cdims, error)
+
+ ! Set ZLIB / DEFLATE Compression using compression level 6.
+ ! To use SZIP Compression comment out these lines.
+ CALL h5pset_deflate_f(plist_id, 6, error)
+
+ ! Uncomment these lines to set SZIP Compression
+ !szip_options_mask = H5_SZIP_NN_OM_F
+ !szip_pixels_per_block = 16
+ !CALL H5Pset_szip_f(plist_id, szip_options_mask, szip_pixels_per_block, error)
+
+ ! Create data set
+ CALL h5dcreate_f(file_id, "Compressed_Data", H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error, dcpl_id=plist_id)
+
+ DO j = 1, dim1
+ DO i = 1, dim0
+ buf(i,j) = i+j
+ ENDDO
+ ENDDO
+
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, buf, data_dims, error)
+
+ ! Close resources
+ CALL h5sclose_f(dataspace_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ ! Now reopen the file and dataset in the file.
+ CALL h5fopen_f(filename, H5F_ACC_RDONLY_F, file_id, error)
+ CALL h5dopen_f(file_id, "Compressed_Data", dataset_id, error)
+
+ ! Retrieve filter information.
+ CALL h5dget_create_plist_f(dataset_id, plist_id, error)
+
+ CALL h5pget_nfilters_f(plist_id, numfilt, error)
+ WRITE(*,'(A, I0)') "Number of filters associated with dataset: ", numfilt
+
+ DO i = 1, numfilt
+ nelmts = 1
+ CALL h5pget_filter_f(plist_id, 0, flags, nelmts, cd_values, &
+ namelen, name, filter_id, error)
+
+ WRITE(*,'(30X,A)', ADVANCE='NO')"Filter Type: "
+ IF(filter_id.EQ.H5Z_FILTER_DEFLATE_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_DEFLATE"
+ ELSEIF (filter_id.EQ.H5Z_FILTER_SZIP_F)THEN
+ WRITE(*,'(A)') "H5Z_FILTER_SZIP"
+ ELSE
+ WRITE(*,'(A)') "Other filter type included"
+ ENDIF
+ ENDDO
+ data_dims(1:2) = (/dim0,dim1/)
+ CALL h5dread_f(dataset_id, H5T_NATIVE_INTEGER, rbuf, data_dims, error)
+
+ CALL h5dclose_f(dataset_id, error)
+ CALL h5pclose_f(plist_id, error)
+ CALL h5fclose_f(file_id, error)
+
+END PROGRAM h5_cmprss
diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90
new file mode 100644
index 0000000..79bc576
--- /dev/null
+++ b/fortran/examples/h5_crtatt.f90
@@ -0,0 +1,106 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example shows how to create and write a dataset attribute.
+! It opens the existing file 'dset.h5', obtains the identifier of
+! the dataset "/dset", defines attribute's dataspace,
+! creates dataset attribute, writes the attribute, and then closes
+! the attribute's dataspace, attribute, dataset, and file.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTATT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+ CHARACTER(LEN=9), PARAMETER :: aname = "attr_long" ! Attribute name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: attr_id ! Attribute identifier
+ INTEGER(HID_T) :: aspace_id ! Attribute Dataspace identifier
+ INTEGER(HID_T) :: atype_id ! Attribute Dataspace identifier
+ INTEGER(HSIZE_T), DIMENSION(1) :: adims = (/2/) ! Attribute dimension
+ INTEGER :: arank = 1 ! Attribure rank
+ INTEGER(SIZE_T) :: attrlen ! Length of the attribute string
+
+ CHARACTER(LEN=80), DIMENSION(2) :: attr_data ! Attribute data
+
+ INTEGER :: error ! Error flag
+ INTEGER(HSIZE_T), DIMENSION(1) :: data_dims
+
+ !
+ ! Initialize attribute's data
+ !
+ attr_data(1) = "Dataset character attribute"
+ attr_data(2) = "Some other string here "
+ attrlen = 80
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+ !
+ ! Open an existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+ !
+ ! Create scalar data space for the attribute.
+ !
+ CALL h5screate_simple_f(arank, adims, aspace_id, error)
+ !
+ ! Create datatype for the attribute.
+ !
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, atype_id, error)
+ CALL h5tset_size_f(atype_id, attrlen, error)
+ !
+ ! Create dataset attribute.
+ !
+ CALL h5acreate_f(dset_id, aname, atype_id, aspace_id, attr_id, error)
+ !
+ ! Write the attribute data.
+ !
+ data_dims(1) = 2
+ CALL h5awrite_f(attr_id, atype_id, attr_data, data_dims, error)
+ !
+ ! Close the attribute.
+ !
+ CALL h5aclose_f(attr_id, error)
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(aspace_id, error)
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTATT
+
diff --git a/fortran/examples/h5_crtdat.f90 b/fortran/examples/h5_crtdat.f90
new file mode 100644
index 0000000..6e4c3a4
--- /dev/null
+++ b/fortran/examples/h5_crtdat.f90
@@ -0,0 +1,86 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example shows how to create an empty dataset.
+! It creates a file called 'dsetf.h5', defines the
+! dataset dataspace, creates a dataset which is a 4x6 integer array,
+! and then closes the dataspace, the dataset, and the file.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTDAT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dspace_id ! Dataspace identifier
+
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions
+ INTEGER :: rank = 2 ! Dataset rank
+
+ INTEGER :: error ! Error flag
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create the dataspace.
+ !
+ CALL h5screate_simple_f(rank, dims, dspace_id, error)
+
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
+ dset_id, error)
+
+ !
+ ! End access to the dataset and release resources used by it.
+ !
+ CALL h5dclose_f(dset_id, error)
+
+ !
+ ! Terminate access to the data space.
+ !
+ CALL h5sclose_f(dspace_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTDAT
+
+
diff --git a/fortran/examples/groupexample.f90 b/fortran/examples/h5_crtgrp.f90
index 91ebc50..278d175 100644
--- a/fortran/examples/groupexample.f90
+++ b/fortran/examples/h5_crtgrp.f90
@@ -18,47 +18,47 @@
! It creates a file called 'group.h5', creates a group
! called MyGroup in the root group, and then closes the group and file.
!
+! This example is used in the HDF5 Tutorial.
+PROGRAM H5_CRTGRP
- PROGRAM GROUPEXAMPLE
+ USE HDF5 ! This module contains all necessary modules
- USE HDF5 ! This module contains all necessary modules
+ IMPLICIT NONE
- IMPLICIT NONE
+ CHARACTER(LEN=9), PARAMETER :: filename = "groupf.h5" ! File name
+ CHARACTER(LEN=7), PARAMETER :: groupname = "MyGroup" ! Group name
- CHARACTER(LEN=9), PARAMETER :: filename = "groupf.h5" ! File name
- CHARACTER(LEN=7), PARAMETER :: groupname = "MyGroup" ! Group name
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group_id ! Group identifier
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: group_id ! Group identifier
+ INTEGER :: error ! Error flag
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
- INTEGER :: error ! Error flag
-!
-! Initialize FORTRAN interface.
-!
- CALL h5open_f(error)
- !
- ! Create a new file using default properties.
- !
- CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
-
- !
- ! Create a group named "/MyGroup" in the file.
- !
- CALL h5gcreate_f(file_id, groupname, group_id, error)
+ !
+ ! Create a group named "/MyGroup" in the file.
+ !
+ CALL h5gcreate_f(file_id, groupname, group_id, error)
- !
- ! Close the group.
- !
- CALL h5gclose_f(group_id, error)
+ !
+ ! Close the group.
+ !
+ CALL h5gclose_f(group_id, error)
- !
- ! Terminate access to the file.
- !
- CALL h5fclose_f(file_id, error)
-!
-! Close FORTRAN interface.
-!
- CALL h5close_f(error)
+ !
+ ! Terminate access to the file.
+ !
+ CALL h5fclose_f(file_id, error)
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
- END PROGRAM GROUPEXAMPLE
+END PROGRAM H5_CRTGRP
diff --git a/fortran/examples/h5_crtgrpar.f90 b/fortran/examples/h5_crtgrpar.f90
new file mode 100644
index 0000000..4ef008a
--- /dev/null
+++ b/fortran/examples/h5_crtgrpar.f90
@@ -0,0 +1,83 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example code shows how to create groups
+! using absolute and relative names. It creates three groups:
+! the first two groups are created using the file identifier and
+! the group absolute names, and the third group is created using
+! a group identifier and the name relative to the specified group.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTGRPAR
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
+ CHARACTER(LEN=8), PARAMETER :: groupname1 = "/MyGroup" ! Group name
+ CHARACTER(LEN=16), PARAMETER :: groupname2 = "/MyGroup/Group_A"
+ ! Group name
+ CHARACTER(LEN=7), PARAMETER :: groupname3 = "Group_B" ! Group name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group1_id, group2_id, group3_id ! Group identifiers
+
+ INTEGER :: error ! Error flag
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create group "MyGroup" in the root group using absolute name.
+ !
+ CALL h5gcreate_f(file_id, groupname1, group1_id, error)
+
+ !
+ ! Create group "Group_A" in group "MyGroup" using absolute name.
+ !
+ CALL h5gcreate_f(file_id, groupname2, group2_id, error)
+
+ !
+ ! Create group "Group_B" in group "MyGroup" using relative name.
+ !
+ CALL h5gcreate_f(group1_id, groupname3, group3_id, error)
+
+ !
+ ! Close the groups.
+ !
+ CALL h5gclose_f(group1_id, error)
+ CALL h5gclose_f(group2_id, error)
+ CALL h5gclose_f(group3_id, error)
+
+ !
+ ! Terminate access to the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTGRPAR
diff --git a/fortran/examples/h5_crtgrpd.f90 b/fortran/examples/h5_crtgrpd.f90
new file mode 100644
index 0000000..d35f03d
--- /dev/null
+++ b/fortran/examples/h5_crtgrpd.f90
@@ -0,0 +1,155 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! This example shows how to create a dataset in a particular group.
+! It opens the file created in the previous example and creates two datasets.
+! Absolute and relative dataset names are used.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_CRTGRPD
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=10), PARAMETER :: filename = "groupsf.h5" ! File name
+ CHARACTER(LEN=15), PARAMETER :: groupname = "MyGroup/Group_A" ! Group name
+ CHARACTER(LEN=13), PARAMETER :: dsetname1 = "MyGroup/dset1" ! Dataset name
+ CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: group_id ! Group identifier
+ INTEGER(HID_T) :: dataset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace_id ! Data space identifier
+
+ INTEGER :: i, j
+ INTEGER :: error ! Error flag
+
+ INTEGER, DIMENSION(3,3) :: dset1_data ! Data arrays
+ INTEGER, DIMENSION(2,10) :: dset2_data !
+
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims1 = (/3,3/) ! Datasets dimensions
+ INTEGER(HSIZE_T), DIMENSION(2) :: dims2 = (/2,10/)!
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ INTEGER :: rank = 2 ! Datasets rank
+
+ !
+ !Initialize dset1_data array
+ !
+ DO i = 1, 3
+ DO j = 1, 3
+ dset1_data(i,j) = j;
+ END DO
+ END DO
+
+ !
+ !Initialize dset2_data array
+ !
+ DO i = 1, 2
+ DO j = 1, 10
+ dset2_data(i,j) = j;
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Create the data space for the first dataset.
+ !
+ CALL h5screate_simple_f(rank, dims1, dataspace_id, error)
+
+ !
+ ! Create a dataset in group "MyGroup" with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname1, H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error)
+
+ !
+ ! Write the first dataset.
+ !
+ data_dims(1) = 3
+ data_dims(2) = 3
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset1_data, data_dims, error)
+
+ !
+ ! Close the dataspace for the first dataset.
+ !
+ CALL h5sclose_f(dataspace_id, error)
+
+ !
+ ! Close the first dataset.
+ !
+ CALL h5dclose_f(dataset_id, error)
+
+ !
+ ! Open an existing group in the specified file.
+ !
+ CALL h5gopen_f(file_id, groupname, group_id, error)
+
+ !
+ !Create the data space for the second dataset.
+ !
+ CALL h5screate_simple_f(rank, dims2, dataspace_id, error)
+
+ !
+ ! Create the second dataset in group "Group_A" with default properties.
+ !
+ CALL h5dcreate_f(group_id, dsetname2, H5T_NATIVE_INTEGER, dataspace_id, &
+ dataset_id, error)
+
+ !
+ ! Write the second dataset.
+ !
+ data_dims(1) = 2
+ data_dims(1) = 10
+ CALL h5dwrite_f(dataset_id, H5T_NATIVE_INTEGER, dset2_data, data_dims, error)
+
+ !
+ ! Close the dataspace for the second dataset.
+ !
+ CALL h5sclose_f(dataspace_id, error)
+
+ !
+ ! Close the second dataset.
+ !
+ CALL h5dclose_f(dataset_id, error)
+
+ !
+ ! Close the group.
+ !
+ CALL h5gclose_f(group_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_CRTGRPD
diff --git a/fortran/examples/h5_extend.f90 b/fortran/examples/h5_extend.f90
new file mode 100644
index 0000000..1316281
--- /dev/null
+++ b/fortran/examples/h5_extend.f90
@@ -0,0 +1,233 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example extends an HDF5 dataset. It is used in the HDF5 Tutorial.
+
+PROGRAM H5_EXTEND
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ !
+ !the dataset is stored in file "extend.h5"
+ !
+ CHARACTER(LEN=9), PARAMETER :: filename = "extend.h5"
+
+ !
+ !dataset rank is 2 and name is "ExtendibleArray"
+ !
+ CHARACTER(LEN=15), PARAMETER :: dsetname = "ExtendibleArray"
+ INTEGER :: RANK = 2
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace ! Dataspace identifier
+ INTEGER(HID_T) :: memspace ! Memory dataspace identifier
+ INTEGER(HID_T) :: crp_list ! Dataset creation property identifier
+
+ !
+ !dataset dimensions at creation time
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dims = (/3,3/)
+
+ !
+ !data dimensions
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsc = (/2,5/)
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsm = (/3,7/)
+
+ !
+ !Maximum dimensions
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: maxdims
+
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: offset
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: count
+
+ !
+ ! Variables for reading and writing
+ !
+ INTEGER, DIMENSION(1:3,1:3) :: data1
+ INTEGER, DIMENSION(1:21) :: data2 = &
+ (/2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4/)
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: data_dims
+
+ !
+ !Size of data in the file
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: size
+
+ !
+ !general purpose integer
+ !
+ INTEGER :: i, j
+
+ !
+ !flag to check operation success
+ !
+ INTEGER :: error
+
+ !
+ !Variables used in reading data back
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsr, maxdimsr
+ INTEGER :: rankr
+ INTEGER, DIMENSION(1:3,1:10) :: rdata
+
+ !
+ !Initialize FORTRAN predifined datatypes
+ !
+ CALL h5open_f(error)
+
+ !
+ !Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ !Create the data space with unlimited dimensions.
+ !
+ maxdims = (/H5S_UNLIMITED_F, H5S_UNLIMITED_F/)
+
+ CALL h5screate_simple_f(RANK, dims, dataspace, error, maxdims)
+
+ !
+ !Modify dataset creation properties, i.e. enable chunking
+ !
+ CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error)
+
+ CALL h5pset_chunk_f(crp_list, RANK, dimsc, error)
+
+ !
+ !Create a dataset with 3X3 dimensions using cparms creation propertie .
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error, crp_list )
+ CALL h5sclose_f(dataspace, error)
+
+ !
+ !Fill data array with 1's
+ !
+ DO i = 1, dims(1)
+ DO j = 1, dims(2)
+ data1(i,j) = 1
+ END DO
+ END DO
+
+ !
+ !Write data array to dataset
+ !
+ data_dims(1:2) = (/3,3/)
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data1, data_dims, error)
+
+ !
+ !Extend the dataset. Dataset becomes 10 x 3.
+ !
+ size(1:2) = (/3,10/)
+ CALL h5dset_extent_f(dset_id, size, error)
+
+ offset(1:2) = (/0,3/)
+ count(1:2) = (/3,7/)
+
+ CALL h5screate_simple_f (2, dimsm, memspace, error)
+
+ !
+ !Write to 3x7 extended part of dataset
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+ CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, &
+ offset, count, error)
+
+ data_dims(1:2) = (/3,7/)
+ CALL H5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data2, data_dims, error, &
+ memspace, dataspace)
+
+ !
+ !Close the objects that were opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5pclose_f(crp_list, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ !read the data back
+ !
+ !Open the file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDONLY_F, file_id, error)
+
+ !
+ !Open the dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ !Get dataset's dataspace handle.
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+
+ !
+ !Get dataspace's rank.
+ !
+ CALL h5sget_simple_extent_ndims_f(dataspace, rankr, error)
+
+ !
+ !Get dataspace's dimensions.
+ !
+ CALL h5sget_simple_extent_dims_f(dataspace, dimsr, maxdimsr, error)
+
+ !
+ !Get creation property list.
+ !
+ CALL h5dget_create_plist_f(dset_id, crp_list, error)
+
+ !
+ ! Fill read buffer with zeroes
+ !
+ rdata(1:dimsr(1),1:dimsr(2)) = 0
+
+ !
+ !create memory dataspace
+ !
+ CALL h5screate_simple_f(rankr, dimsr, memspace, error)
+
+ !
+ !Read data
+ !
+ data_dims(1:2) = (/3,10/)
+ CALL H5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, data_dims, &
+ error, memspace, dataspace)
+
+ WRITE(*,'(A)') "Dataset:"
+ DO i = 1, dimsr(1)
+ WRITE(*,'(100(I0,1X))') rdata(i,1:dimsr(2))
+ END DO
+
+ !
+ !Close the objects that were opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5sclose_f(memspace, error)
+ CALL h5pclose_f(crp_list, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !Close FORTRAN predefined datatypes
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_EXTEND
diff --git a/fortran/examples/h5_rdwt.f90 b/fortran/examples/h5_rdwt.f90
new file mode 100644
index 0000000..ba05b2f
--- /dev/null
+++ b/fortran/examples/h5_rdwt.f90
@@ -0,0 +1,96 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! 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. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+!
+! The following example shows how to write and read to/from an existing dataset.
+! It opens the file created in the previous example, obtains the dataset
+! identifier, writes the data to the dataset in the file,
+! then reads the dataset to memory.
+!
+! This example is used in the HDF5 Tutorial.
+
+PROGRAM H5_RDWT
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
+ CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+
+ INTEGER :: error ! Error flag
+ INTEGER :: i, j
+
+ INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ !
+ ! Initialize the dset_data array.
+ !
+ DO i = 1, 4
+ DO j = 1, 6
+ dset_data(i,j) = (i-1)*6 + j
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Open an existing file.
+ !
+ CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Open an existing dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = 4
+ data_dims(2) = 6
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
+
+ !
+ ! Read the dataset.
+ !
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
+
+ !
+ ! Close the dataset.
+ !
+ CALL h5dclose_f(dset_id, error)
+
+ !
+ ! Close the file.
+ !
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_RDWT
+
+
+
diff --git a/fortran/examples/h5_subset.f90 b/fortran/examples/h5_subset.f90
new file mode 100644
index 0000000..6cb8f7a
--- /dev/null
+++ b/fortran/examples/h5_subset.f90
@@ -0,0 +1,184 @@
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! This example shows how to write and read a hyperslab.
+! It is used in the HDF5 Tutorial.
+!
+
+PROGRAM H5_SUBSET
+
+ USE HDF5 ! This module contains all necessary modules
+
+ IMPLICIT NONE
+
+ CHARACTER(LEN=9), PARAMETER :: filename = "subset.h5" ! File name
+ CHARACTER(LEN=8), PARAMETER :: dsetname = "IntArray" ! Dataset name
+
+ INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: dset_id ! Dataset identifier
+ INTEGER(HID_T) :: dataspace ! Dataspace identifier
+ INTEGER(HID_T) :: memspace ! memspace identifier
+
+ !
+ ! To change the subset size, modify size of dimsm, sdata, dim0_sub,
+ ! dim1_sub, and count
+ !
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsm = (/4,3/) ! Dataset dimensions
+ INTEGER, DIMENSION(1:4,1:3) :: sdata ! Subset buffer
+ INTEGER :: dim0_sub = 4
+ INTEGER :: dim1_sub = 3
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: count = (/4,3/) ! Size of hyperslab
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: offset = (/2,1/) ! Hyperslab offset
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: stride = (/1,1/) ! Hyperslab stride
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: block = (/1,1/) ! Hyperslab block size
+
+ INTEGER(HSIZE_T), DIMENSION(1:2) :: dimsf = (/10,8/) ! Dataset dimensions
+
+
+ INTEGER, DIMENSION(1:10,1:8) :: data ! Data to write
+ INTEGER, DIMENSION(1:10,1:8) :: rdata ! Data to read
+
+ INTEGER :: rank = 2 ! Dataset rank ( in file )
+ INTEGER :: dim0 = 10 ! Dataset size in file
+ INTEGER :: dim1 = 8
+
+ INTEGER :: i, j
+
+ INTEGER :: error ! Error flag
+ INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
+
+ !
+ ! Write data to the HDF5 file.
+ !
+
+ !
+ ! Data initialization.
+ !
+ DO i = 1, dim0
+ DO j = 1, dim1
+ IF (i .LE. (dim0 / 2)) THEN
+ data(i,j) = 1
+ ELSE
+ data(i,j) = 2
+ END IF
+ END DO
+ END DO
+
+ !
+ ! Initialize FORTRAN interface.
+ !
+ CALL h5open_f(error)
+
+ !
+ ! Create a new file using default properties.
+ !
+ CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, error)
+
+ !
+ ! Create the data space for the dataset.
+ !
+ CALL h5screate_simple_f(rank, dimsf, dataspace, error)
+
+ !
+ ! Create the dataset with default properties.
+ !
+ CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dataspace, &
+ dset_id, error)
+
+ !
+ ! Write the dataset.
+ !
+ data_dims(1) = dim0
+ data_dims(2) = dim1
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, data_dims, error)
+
+ !
+ ! Data Written to File
+ !
+ WRITE(*,'(/,A)') "Original Data Written to File:"
+ DO i = 1, dim0
+ WRITE(*,'(100(1X,I0,1X))') DATA(i,1:dim1)
+ END DO
+
+ !
+ !
+ ! Close the dataspace, dataset, and file.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Initialize subset data array.
+ !
+ sdata(1:dim0_sub,1:dim1_sub) = 5
+
+ !
+ ! Open the file.
+ !
+ CALL h5fopen_f(filename, H5F_ACC_RDWR_F, file_id, error)
+
+ !
+ ! Open the dataset.
+ !
+ CALL h5dopen_f(file_id, dsetname, dset_id, error)
+
+ !
+ ! Get dataset's dataspace identifier and select subset.
+ !
+ CALL h5dget_space_f(dset_id, dataspace, error)
+ CALL h5sselect_hyperslab_f(dataspace, H5S_SELECT_SET_F, &
+ offset, count, error, stride, BLOCK)
+ !
+ ! Create memory dataspace.
+ !
+ CALL h5screate_simple_f(rank, dimsm, memspace, error)
+
+ WRITE(*,'(/,A)') "Write subset to file specifying:"
+ WRITE(*,'(A,/)') " offset=2x1 stride=1x1 count=4x3 block=1x1"
+
+ !
+ ! Write subset to dataset
+ !
+ data_dims(1:2) = (/dim0_sub, dim1_sub/)
+ CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, sdata, data_dims, error, &
+ memspace, dataspace)
+
+ data_dims(1:2) = (/dim0, dim1/)
+ CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, rdata, data_dims, error)
+
+ !
+ ! Read entire dataset back
+ !
+ WRITE(*,'(A)') "Data in File after Subset Written:"
+ DO i = 1, dim0
+ WRITE(*,'(100(1X,I0,1X))') rdata(i,1:dim1)
+ END DO
+ PRINT *, " "
+
+ !
+ ! Close everything opened.
+ !
+ CALL h5sclose_f(dataspace, error)
+ CALL h5sclose_f(memspace, error)
+ CALL h5dclose_f(dset_id, error)
+ CALL h5fclose_f(file_id, error)
+
+ !
+ ! Close FORTRAN interface.
+ !
+ CALL h5close_f(error)
+
+END PROGRAM H5_SUBSET
diff --git a/fortran/examples/run-fortran-ex.sh.in b/fortran/examples/run-fortran-ex.sh.in
index 873669f..c5c379e 100644
--- a/fortran/examples/run-fortran-ex.sh.in
+++ b/fortran/examples/run-fortran-ex.sh.in
@@ -70,20 +70,24 @@ RunTest()
# Run tests
if [ $? -eq 0 ]
then
- if (RunTest dsetexample &&\
- rm dsetexample &&\
- RunTest fileexample &&\
- rm fileexample &&\
- RunTest rwdsetexample &&\
- rm rwdsetexample &&\
- RunTest attrexample &&\
- rm attrexample &&\
- RunTest groupexample &&\
- rm groupexample &&\
- RunTest grpsexample &&\
- rm grpsexample &&\
- RunTest grpdsetexample &&\
- rm grpdsetexample &&\
+ if (RunTest h5_cmprss &&\
+ rm h5_cmprss &&\
+ RunTest h5_crtdat &&\
+ rm h5_crtdat &&\
+ RunTest h5_extend &&\
+ rm h5_extend &&\
+ RunTest h5_rdwt &&\
+ rm h5_rdwt &&\
+ RunTest h5_crtatt &&\
+ rm h5_crtatt &&\
+ RunTest h5_crtgrp &&\
+ rm h5_crtgrp &&\
+ RunTest h5_crtgrpar &&\
+ rm h5_crtgrpar &&\
+ RunTest h5_crtgrpd &&\
+ rm h5_crtgrpd &&\
+ RunTest h5_subset &&\
+ rm h5_subset &&\
RunTest hyperslab &&\
rm hyperslab &&\
RunTest selectele &&\
diff --git a/fortran/examples/rwdsetexample.f90 b/fortran/examples/rwdsetexample.f90
deleted file mode 100644
index 1e84e23..0000000
--- a/fortran/examples/rwdsetexample.f90
+++ /dev/null
@@ -1,96 +0,0 @@
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! 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. *
-! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-!
-!
-! The following example shows how to write and read to/from an existing dataset.
-! It opens the file created in the previous example, obtains the dataset
-! identifier, writes the data to the dataset in the file,
-! then reads the dataset to memory.
-!
-
-
- PROGRAM RWDSETEXAMPLE
-
- USE HDF5 ! This module contains all necessary modules
-
- IMPLICIT NONE
-
- CHARACTER(LEN=8), PARAMETER :: filename = "dsetf.h5" ! File name
- CHARACTER(LEN=4), PARAMETER :: dsetname = "dset" ! Dataset name
-
- INTEGER(HID_T) :: file_id ! File identifier
- INTEGER(HID_T) :: dset_id ! Dataset identifier
-
- INTEGER :: error ! Error flag
- INTEGER :: i, j
-
- INTEGER, DIMENSION(4,6) :: dset_data, data_out ! Data buffers
- INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
-
- !
- ! Initialize the dset_data array.
- !
- do i = 1, 4
- do j = 1, 6
- dset_data(i,j) = (i-1)*6 + j;
- end do
- end do
-
- !
- ! Initialize FORTRAN interface.
- !
- CALL h5open_f(error)
-
- !
- ! Open an existing file.
- !
- CALL h5fopen_f (filename, H5F_ACC_RDWR_F, file_id, error)
-
- !
- ! Open an existing dataset.
- !
- CALL h5dopen_f(file_id, dsetname, dset_id, error)
-
- !
- ! Write the dataset.
- !
- data_dims(1) = 4
- data_dims(2) = 6
- CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, dset_data, data_dims, error)
-
- !
- ! Read the dataset.
- !
- CALL h5dread_f(dset_id, H5T_NATIVE_INTEGER, data_out, data_dims, error)
-
- !
- ! Close the dataset.
- !
- CALL h5dclose_f(dset_id, error)
-
- !
- ! Close the file.
- !
- CALL h5fclose_f(file_id, error)
-
- !
- ! Close FORTRAN interface.
- !
- CALL h5close_f(error)
-
- END PROGRAM RWDSETEXAMPLE
-
-
-
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 7cde8df..765bb65 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -9,6 +9,9 @@ IF (WIN32 AND NOT CYGWIN)
IF (NOT H5_HAVE_PARALLEL)
SET (H5_NOPAREXP ";")
ENDIF (NOT H5_HAVE_PARALLEL)
+ IF (NOT HDF5_ENABLE_F2003)
+ SET (H5_NOF03EXP ";")
+ ENDIF (NOT HDF5_ENABLE_F2003)
CONFIGURE_FILE (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY)
ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
@@ -139,13 +142,13 @@ SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C)
#-----------------------------------------------------------------------------
# Fortran 2003 standard
#-----------------------------------------------------------------------------
-IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+IF (HDF5_ENABLE_F2003)
# default real is 4 bytes, so include double signatures
SET (F_STATUS "_F03")
-ELSE (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+ELSE (HDF5_ENABLE_F2003)
# default real is 8 bytes, so exclude double signatures
SET (F_STATUS "_F90")
-ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+ENDIF (HDF5_ENABLE_F2003)
#-----------------------------------------------------------------------------
# Fortran Real Size
diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90
index ba982ee..867ec1e 100644
--- a/fortran/src/H5test_kind_SIZEOF.f90
+++ b/fortran/src/H5test_kind_SIZEOF.f90
@@ -15,7 +15,9 @@
! NOTES
! This program is used in place of H5test_kind.f90 when the Fortran intrinsic
! function SIZEOF is available. It generates code that makes use of SIZEOF in
-! H5fortran_detect.f90 which is a portable solution.
+! H5fortran_detect.f90 which is a portable solution but is not standard
+! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic
+! function instead, which is the preferred method.
!
! The availability of SIZEOF is checked at configure time and the TRUE/FALSE
! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF".
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index d9ed42d..070e366 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -507,7 +507,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 9e53ee3..bf7596d 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -6,6 +6,7 @@ H5LIB_mp_H5GET_LIBVERSION_F
H5LIB_mp_H5CHECK_VERSION_F
H5LIB_mp_H5GARBAGE_COLLECT_F
H5LIB_mp_H5DONT_ATEXIT_F
+@H5_NOF03EXP@H5LIB_PROVISIONAL_mp_H5OFFSETOF
; H5_DBLE_INTERFACE
H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_SCALAR
H5_DBLE_INTERFACE_mp_H5AREAD_DOUBLE_1
@@ -120,6 +121,8 @@ H5A_mp_H5AEXISTS_F
H5A_mp_H5AEXISTS_BY_NAME_F
H5A_mp_H5AOPEN_BY_NAME_F
H5A_mp_H5ARENAME_F
+@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AWRITE_PTR
+@H5_NOF03EXP@H5A_PROVISIONAL_mp_H5AREAD_PTR
; H5D
H5D_mp_H5DCREATE_F
H5D_mp_H5DOPEN_F
@@ -200,6 +203,9 @@ H5D_mp_H5DGET_CREATE_PLIST_F
H5D_mp_H5DGET_STORAGE_SIZE_F
H5D_mp_H5DVLEN_GET_MAX_LEN_F
H5D_mp_H5DGET_ACCESS_PLIST_F
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DWRITE_PTR
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DREAD_PTR
+@H5_NOF03EXP@H5D_PROVISIONAL_mp_H5DVLEN_RECLAIM_F
; H5E
H5E_mp_H5ECLEAR_F
H5E_mp_H5EPRINT_F
@@ -283,6 +289,8 @@ H5L_mp_H5LGET_INFO_BY_IDX_F
H5L_mp_H5LIS_REGISTERED_F
H5L_mp_H5LMOVE_F
H5L_mp_H5LGET_NAME_BY_IDX_F
+@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_F
+@H5_NOF03EXP@H5L_PROVISIONAL_mp_H5LITERATE_BY_NAME_F
; H5O
H5O_mp_H5OCLOSE_F
H5O_mp_H5OCOPY_F
@@ -297,12 +305,11 @@ H5O_mp_H5OOPEN_BY_IDX_F
H5O_mp_H5OOPEN_F
H5O_mp_H5OSET_COMMENT_F
H5O_mp_H5OSET_COMMENT_BY_NAME_F
-; These should only get compiled with option --enable-fortran2003
-;H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F
-;H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F
-;H5O_PROVISIONAL_mp_H5OGET_INFO_F
-;H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F
-;H5O_PROVISIONAL_mp_H5OVISIT_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_IDX_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_BY_NAME_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OGET_INFO_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_BY_NAME_F
+@H5_NOF03EXP@H5O_PROVISIONAL_mp_H5OVISIT_F
; H5P
H5P_mp_H5PCREATE_F
H5P_mp_H5PSET_PRESERVE_F
@@ -439,16 +446,26 @@ H5P_mp_H5PGET_NLINKS_F
H5P_mp_H5PGET_CREATE_INTER_GROUP_F
H5P_mp_H5PSET_CHUNK_CACHE_F
H5P_mp_H5PGET_CHUNK_CACHE_F
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_FILL_VALUE_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_FILL_VALUE_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PSET_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PGET_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PREGISTER_PTR
+@H5_NOF03EXP@H5P_PROVISIONAL_mp_H5PINSERT_PTR
; H5R
H5R_PROVISIONAL_mp_H5RCREATE_OBJECT_F
H5R_PROVISIONAL_mp_H5RCREATE_REGION_F
H5R_PROVISIONAL_mp_H5RDEREFERENCE_OBJECT_F
H5R_PROVISIONAL_mp_H5RDEREFERENCE_REGION_F
H5R_PROVISIONAL_mp_H5RGET_REGION_REGION_F
-
H5R_mp_H5RGET_OBJECT_TYPE_OBJ_F
H5R_PROVISIONAL_mp_H5RGET_NAME_OBJECT_F
H5R_PROVISIONAL_mp_H5RGET_NAME_REGION_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_REGION_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RCREATE_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RDEREFERENCE_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_NAME_PTR_F
+@H5_NOF03EXP@H5R_PROVISIONAL_mp_H5RGET_OBJ_TYPE_F
; H5S
H5S_mp_H5SCREATE_SIMPLE_F
H5S_mp_H5SCLOSE_F
@@ -538,6 +555,7 @@ H5T_mp_H5TENCODE_F
H5T_mp_H5TGET_CREATE_PLIST_F
H5T_mp_H5TCOMPILER_CONV_F
H5T_mp_H5TGET_NATIVE_TYPE_F
+@H5_NOF03EXP@H5T_PROVISIONAL_mp_H5TCONVERT_F
; H5Z
H5Z_mp_H5ZUNREGISTER_F
H5Z_mp_H5ZFILTER_AVAIL_F
@@ -549,4 +567,4 @@ H5Z_mp_H5ZGET_FILTER_INFO_F
@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_DXPL_MPIO_F
@H5_NOPAREXP@H5FDMPIO_mp_H5PSET_FAPL_MPIPOSIX_F
@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_FAPL_MPIPOSIX_F
-@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F \ No newline at end of file
+@H5_NOPAREXP@H5FDMPIO_mp_H5PGET_MPIO_ACTUAL_IO_MODE_F
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3a3d084..5b41a32 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -100,7 +100,7 @@ ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
#-- Adding test for fortranlib_test_F03
-IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+IF (HDF5_ENABLE_F2003)
ADD_EXECUTABLE (fortranlib_test_F03
fortranlib_test_F03.f90
tH5F.f90
@@ -125,7 +125,7 @@ IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003)
+ENDIF (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
ADD_EXECUTABLE (fflush1 fflush1.f90)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index b112db3..1c7248c 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index e66329e..5c9403d 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt
index 3601a91..8d68dd0 100644
--- a/hl/c++/CMakeLists.txt
+++ b/hl/c++/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_CPP)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 3034a78..4c60165 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_CPP_EXAMPLES)
#-----------------------------------------------------------------------------
@@ -20,17 +20,6 @@ TARGET_LINK_LIBRARIES (
)
SET_TARGET_PROPERTIES (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
-ADD_EXECUTABLE (ptExampleVL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleVL.cpp)
-TARGET_NAMING (ptExampleVL ${LIB_TYPE})
-TARGET_LINK_LIBRARIES (
- ptExampleVL
- ${HDF5_HL_CPP_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
-SET_TARGET_PROPERTIES (ptExampleVL PROPERTIES FOLDER examples/hl/cpp)
-
IF (BUILD_TESTING)
ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
- ADD_TEST (NAME cpp_hl_ex_ptExampleVL COMMAND $<TARGET_FILE:ptExampleVL>)
ENDIF (BUILD_TESTING)
diff --git a/hl/c++/examples/Makefile.am b/hl/c++/examples/Makefile.am
index 5dd5a75..df15257 100644
--- a/hl/c++/examples/Makefile.am
+++ b/hl/c++/examples/Makefile.am
@@ -23,10 +23,10 @@ include $(top_srcdir)/config/commence.am
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
-EXAMPLE_PROG=ptExampleFL ptExampleVL
+EXAMPLE_PROG=ptExampleFL
# These are the example files to be installed
-INSTALL_FILES=ptExampleFL.cpp ptExampleVL.cpp
+INSTALL_FILES=ptExampleFL.cpp
INSTALL_SCRIPT_FILES = run-hlc++-ex.sh
# Tell conclude.am that these are C++ tests.
@@ -45,7 +45,6 @@ $(EXTRA_PROG): $(H5CPP)
# will try to build them with the normal C++ compiler, not h5c++. This is
# an inelegant way of solving the problem, unfortunately.
ptExampleFL: ptExampleFL.cpp
-ptExampleVL: ptExampleVL.cpp
include $(top_srcdir)/config/examples.am
include $(top_srcdir)/config/conclude.am
diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in
index cbc0e90..e20efc0 100644
--- a/hl/c++/examples/Makefile.in
+++ b/hl/c++/examples/Makefile.in
@@ -385,10 +385,10 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
-EXAMPLE_PROG = ptExampleFL ptExampleVL
+EXAMPLE_PROG = ptExampleFL
# These are the example files to be installed
-INSTALL_FILES = ptExampleFL.cpp ptExampleVL.cpp
+INSTALL_FILES = ptExampleFL.cpp
INSTALL_SCRIPT_FILES = run-hlc++-ex.sh
# Tell conclude.am that these are C++ tests.
@@ -646,7 +646,6 @@ $(EXTRA_PROG): $(H5CPP)
# will try to build them with the normal C++ compiler, not h5c++. This is
# an inelegant way of solving the problem, unfortunately.
ptExampleFL: ptExampleFL.cpp
-ptExampleVL: ptExampleVL.cpp
# How to create EXAMPLEDIR if it doesn't already exist
$(EXAMPLEDIR):
diff --git a/hl/c++/examples/ptExampleVL.cpp b/hl/c++/examples/ptExampleVL.cpp
deleted file mode 100644
index c3feccd..0000000
--- a/hl/c++/examples/ptExampleVL.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include "H5PacketTable.h"
-
-/*-------------------------------------------------------------------------
- * Packet Table Variable-Length Example
- *
- * Example program that creates a packet table and performs
- * writes and reads.
- *
- *-------------------------------------------------------------------------
- */
-
-int main(void)
-{
-#ifdef VLPT_REMOVED
- herr_t err; /* Return value from function calls */
- hid_t fileID; /* HDF5 identifier for file */
- hsize_t count; /* Number of records in table */
- int x; /* Loop variable */
-
- /* This example has two different sizes of "record": longs and shorts */
- long longBuffer[5];
- short shortBuffer[5];
-
- /* Buffer of hvl_t structs to read back records */
- hvl_t readBuffer[5];
-
- /* Initialize buffers */
- for(x=0; x<5; x++)
- {
- longBuffer[x] = -x;
- shortBuffer[x] = x;
- }
-
- /* Create a new HDF5 file */
- fileID = H5Fcreate("PTcppexampleVL.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- if(fileID <0)
- fprintf(stderr, "Couldn't create file.\n");
-
- /* Create a variable-length packet table. */
- VL_PacketTable ptable(fileID, "/examplePacketTable", 1);
-
- if(! ptable.IsValid())
- fprintf(stderr, "Unable to create packet table.");
-
- /* Append five packets to the packet table. */
- /* In C++, there is no need to package data into hvl_t structs. */
- err = ptable.AppendPacket( &(longBuffer[0]), sizeof(long));
- if(err < 0)
- fprintf(stderr, "Error adding record.");
- err = ptable.AppendPacket( &(shortBuffer[1]), sizeof(short));
- if(err < 0)
- fprintf(stderr, "Error adding record.");
- err = ptable.AppendPacket( &(longBuffer[2]), sizeof(long));
- if(err < 0)
- fprintf(stderr, "Error adding record.");
- err = ptable.AppendPacket( &(longBuffer[3]), sizeof(long));
- if(err < 0)
- fprintf(stderr, "Error adding record.");
- err = ptable.AppendPacket( &(shortBuffer[4]), sizeof(short));
- if(err < 0)
- fprintf(stderr, "Error adding record.");
-
- /* Get the number of packets in the packet table. This should be five. */
- count = ptable.GetPacketCount(err);
- if(err < 0)
- fprintf(stderr, "Error getting packet count.");
-
- printf("Number of packets in packet table after five appends: %d\n", count);
-
- /* Initialize packet table's "current record" */
- ptable.ResetIndex();
-
- /* Iterate through packets, read each one back */
- for(x=0; x<5; x++)
- {
- err = ptable.GetNextPacket( &(readBuffer[x]) );
- if(err < 0)
- fprintf(stderr, "Error reading record.");
-
- printf("Packet %d's length is %d.\n", x, readBuffer[x].len);
- if(readBuffer[x].len == sizeof(long))
- printf("Packet %d's value is %d.\n", x, *((long *) readBuffer[x].p) );
- else
- printf("Packet %d's value is %d.\n", x, *((short *) readBuffer[x].p) );
- }
-
- /* The packet table will close automatically when its object goes */
- /* out of scope. */
-
- err = H5Fclose(fileID);
- if( err < 0 )
- fprintf(stderr, "Failed to close file.\n");
-
-#endif /* VLPT_REMOVED */
- return 0;
-}
-
diff --git a/hl/c++/examples/run-hlc++-ex.sh.in b/hl/c++/examples/run-hlc++-ex.sh.in
index 7742f99..103dd76 100644
--- a/hl/c++/examples/run-hlc++-ex.sh.in
+++ b/hl/c++/examples/run-hlc++-ex.sh.in
@@ -64,9 +64,7 @@ RunTest()
if [ $? -eq 0 ]
then
if (RunTest ptExampleFL &&\
- rm ptExampleFL &&\
- RunTest ptExampleVL &&\
- rm ptExampleVL); then
+ rm ptExampleFL); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index e0ca0e9..5a2a7c4 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_CPP_SRC)
#-----------------------------------------------------------------------------
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 59d7821..2086025 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -450,7 +450,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
# Include src directory
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 7d29035..0f82748 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_CPP_TEST)
#-----------------------------------------------------------------------------
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index c95322c..1f4807a 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_EXAMPLES )
SET (HDF5_TEST_FILES
@@ -23,7 +23,6 @@ SET (examples
ex_lite2
ex_lite3
ptExampleFL
- ptExampleVL
ex_image1
ex_image2
ex_table_01
diff --git a/hl/examples/Makefile.am b/hl/examples/Makefile.am
index 1c51f05..5108c5e 100644
--- a/hl/examples/Makefile.am
+++ b/hl/examples/Makefile.am
@@ -34,7 +34,7 @@ EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
-EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL ptExampleVL \
+EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \
ex_image1 ex_image2 \
ex_table_01 ex_table_02 ex_table_03 ex_table_04 \
ex_table_05 ex_table_06 ex_table_07 ex_table_08 \
@@ -43,7 +43,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL ptExampleVL \
# Install files
# List all file that should be installed in examples directory
-INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c ptExampleVL.c \
+INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \
ex_image1.c ex_image2.c \
ex_table_01.c ex_table_02.c ex_table_03.c ex_table_04.c \
ex_table_05.c ex_table_06.c ex_table_07.c ex_table_08.c \
@@ -75,7 +75,6 @@ ex_lite1: $(srcdir)/ex_lite1.c
ex_lite2: $(srcdir)/ex_lite2.c
ex_lite3: $(srcdir)/ex_lite3.c
ptExampleFL: $(srcdir)/ptExampleFL.c
-ptExampleVL: $(srcdir)/ptExampleVL.c
ex_image1: $(srcdir)/ex_image1.c
ex_image2: $(srcdir)/ex_image2.c
ex_table01: $(srcdir)/ex_table01.c
diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in
index 3435edb..2d47e99 100644
--- a/hl/examples/Makefile.in
+++ b/hl/examples/Makefile.in
@@ -393,7 +393,7 @@ EXAMPLETOPDIR = ${DESTDIR}$(exec_prefix)/share/hdf5_examples/hl
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
-EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL ptExampleVL \
+EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL \
ex_image1 ex_image2 \
ex_table_01 ex_table_02 ex_table_03 ex_table_04 \
ex_table_05 ex_table_06 ex_table_07 ex_table_08 \
@@ -403,7 +403,7 @@ EXAMPLE_PROG = ex_lite1 ex_lite2 ex_lite3 ptExampleFL ptExampleVL \
# Install files
# List all file that should be installed in examples directory
-INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c ptExampleVL.c \
+INSTALL_FILES = ex_lite1.c ex_lite2.c ex_lite3.c ptExampleFL.c \
ex_image1.c ex_image2.c \
ex_table_01.c ex_table_02.c ex_table_03.c ex_table_04.c \
ex_table_05.c ex_table_06.c ex_table_07.c ex_table_08.c \
@@ -672,7 +672,6 @@ ex_lite1: $(srcdir)/ex_lite1.c
ex_lite2: $(srcdir)/ex_lite2.c
ex_lite3: $(srcdir)/ex_lite3.c
ptExampleFL: $(srcdir)/ptExampleFL.c
-ptExampleVL: $(srcdir)/ptExampleVL.c
ex_image1: $(srcdir)/ex_image1.c
ex_image2: $(srcdir)/ex_image2.c
ex_table01: $(srcdir)/ex_table01.c
diff --git a/hl/examples/ptExampleVL.c b/hl/examples/ptExampleVL.c
deleted file mode 100644
index 310aa07..0000000
--- a/hl/examples/ptExampleVL.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * 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. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#include "hdf5.h"
-#include "hdf5_hl.h"
-#include <stdlib.h>
-
-/*-------------------------------------------------------------------------
- * Packet Table Variable-Length Example
- *
- * Example program that creates a variable-length packet table and performs
- * writes and reads.
- *
- *-------------------------------------------------------------------------
- */
-
-int main(void)
-{
-#ifdef VLPT_REMOVED
- hid_t fid; /* File identifier */
- hid_t ptable; /* Packet table identifier */
-
- herr_t err; /* Function return status */
- hsize_t count; /* Number of records in the table */
- int x; /* Loop variable */
-
- /* Buffers to hold data */
- hvl_t writeBuffer[5];
- hvl_t readBuffer[5];
-
- /* This example has two different sizes of "record": longs and shorts */
- long longBuffer[5];
- short shortBuffer[5];
-
- /* Initialize buffers */
- for(x=0; x<5; x++)
- {
- longBuffer[x] = -x;
- shortBuffer[x] = x;
- }
-
- /* Fill the write buffer with a mix of longs and shorts */
- /* We need to supply the length of each record and a pointer to */
- /* the beginning of each record. */
- writeBuffer[0].len = sizeof(long);
- writeBuffer[0].p = &(longBuffer[0]);
- writeBuffer[1].len = sizeof(short);
- writeBuffer[1].p = &(shortBuffer[1]);
- writeBuffer[2].len = sizeof(long);
- writeBuffer[2].p = &(longBuffer[2]);
- writeBuffer[3].len = sizeof(long);
- writeBuffer[3].p = &(longBuffer[3]);
- writeBuffer[4].len = sizeof(short);
- writeBuffer[4].p = &(shortBuffer[4]);
-
- /* Create a file using default properties */
- fid=H5Fcreate("packet_table_VLexample.h5",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);
-
- /* Create a variable-length packet table within the file */
- ptable = H5PTcreate_vl(fid, "Packet Test Dataset", (hsize_t)1);
- if(ptable == H5I_INVALID_HID)
- goto out;
-
- /* Write the entire buffer to the packet table */
- err = H5PTappend(ptable, (hsize_t)5, writeBuffer );
- if(err < 0)
- goto out;
-
- /* Get the number of packets in the packet table. This should be five. */
- err = H5PTget_num_packets(ptable, &count);
- if(err < 0)
- goto out;
-
- printf("Number of packets in packet table after five appends: %d\n", count);
-
- /* Read all five packets back */
- err = H5PTread_packets(ptable, (hsize_t)0, (hsize_t)5, readBuffer );
- if(err < 0)
- goto out;
-
- for(x=0; x<5; x++)
- {
- printf("Packet %d's length is %d\n", x, readBuffer[x].len);
- if(readBuffer[x].len == sizeof(long))
- printf("Packet %d's value is %d\n", x, *( (long *) readBuffer[x].p) );
- else
- printf("Packet %d's value is %d\n", x, *( (short *) readBuffer[x].p) );
- }
-
- /* Before we close the packet table, we must free the memory that */
- /* the pointers in readBuffer point to. */
- err = H5PTfree_vlen_readbuff(ptable, (hsize_t)5, readBuffer);
- if(err < 0)
- goto out;
-
- /* Close the packet table */
- err = H5PTclose(ptable);
- if(err < 0)
- goto out;
-
- /* Close the file */
- H5Fclose(fid);
-#endif /* VLPT_REMOVED */
-
- return 0;
-
-#ifdef VLPT_REMOVED
- out: /* An error has occurred. Clean up and exit. */
- fprintf(stderr, "An error has occurred!\n");
- H5PTclose(ptable);
- H5Fclose(fid);
- return -1;
-#endif /* VLPT_REMOVED */
-}
diff --git a/hl/examples/run-hlc-ex.sh.in b/hl/examples/run-hlc-ex.sh.in
index a82e591..a79f67a 100644
--- a/hl/examples/run-hlc-ex.sh.in
+++ b/hl/examples/run-hlc-ex.sh.in
@@ -76,8 +76,6 @@ then
rm ex_lite3 &&\
RunTest ptExampleFL &&\
rm ptExampleFL &&\
- RunTest ptExampleVL &&\
- rm ptExampleVL &&\
RunTest ex_image1 &&\
rm ex_image1 &&\
RunTest ex_image2 &&\
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index ae38588..0da0825 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_F90 C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index 7098119..03b9e9b 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index ec54d8c..c580516 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 59895ce..2d84aad 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -464,7 +464,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \
-I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index c9b0533..d76e7f2 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 2df2c23..edba042 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_SRC)
#-----------------------------------------------------------------------------
@@ -14,6 +14,7 @@ ENDIF (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
SET (HL_SRCS
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5DO.c
${HDF5_HL_SRC_SOURCE_DIR}/H5DS.c
${HDF5_HL_SRC_SOURCE_DIR}/H5IM.c
${HDF5_HL_SRC_SOURCE_DIR}/H5LT.c
@@ -24,6 +25,7 @@ SET (HL_SRCS
)
SET (HL_HEADERS
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5DOpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5DSpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5IMpublic.h
${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
new file mode 100644
index 0000000..9cfd8c1
--- /dev/null
+++ b/hl/src/H5DO.c
@@ -0,0 +1,137 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+* 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. *
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+
+#include "H5DOprivate.h"
+
+/*-------------------------------------------------------------------------
+ * Function: H5DOwrite_chunk
+ *
+ * Purpose: Writes an entire chunk to the file directly.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 30 July 2012
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DOwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset,
+ size_t data_size, const void *buf)
+{
+ hbool_t created_dxpl = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ if(dset_id < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(!buf) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(!offset) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(!data_size) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(H5P_DEFAULT == dxpl_id) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ created_dxpl = TRUE;
+ }
+
+ if(H5DO_write_chunk(dset_id, dxpl_id, filters, offset, data_size, buf) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+done:
+ if(created_dxpl) {
+ if(H5Pclose(dxpl_id) < 0)
+ ret_value = FAIL;
+ }
+
+ return ret_value;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: H5DO_write_chunk
+ *
+ * Purpose: Private function for H5DOwrite_chunk
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 30 July 2012
+ *
+ * Modifications:
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DO_write_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset,
+ size_t data_size, const void *buf)
+{
+ hbool_t do_direct_write = TRUE;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &filters) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &offset) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &data_size) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+ if(H5Dwrite(dset_id, 0, H5S_ALL, H5S_ALL, dxpl_id, buf) < 0) {
+ ret_value = FAIL;
+ goto done;
+ }
+
+done:
+ do_direct_write = FALSE;
+ if(H5Pset(dxpl_id, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &do_direct_write) < 0)
+ ret_value = FAIL;
+
+ return ret_value;
+}
diff --git a/hl/src/H5DOprivate.h b/hl/src/H5DOprivate.h
new file mode 100644
index 0000000..fcea585
--- /dev/null
+++ b/hl/src/H5DOprivate.h
@@ -0,0 +1,37 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef _H5DOprivate_H
+#define _H5DOprivate_H
+
+/* High-level library internal header file */
+#include "H5HLprivate2.h"
+
+/* public LT prototypes */
+#include "H5DOpublic.h"
+
+/*-------------------------------------------------------------------------
+ * Private functions
+ *-------------------------------------------------------------------------
+ */
+
+H5_HLDLL herr_t H5DO_write_chunk(hid_t dset_id,
+ hid_t dxpl_id,
+ uint32_t filters,
+ const hsize_t *offset,
+ size_t data_size,
+ const void *buf);
+
+#endif
diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h
new file mode 100644
index 0000000..774709e
--- /dev/null
+++ b/hl/src/H5DOpublic.h
@@ -0,0 +1,42 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#ifndef _H5DOpublic_H
+#define _H5DOpublic_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*-------------------------------------------------------------------------
+ *
+ * Direct chunk write function
+ *
+ *-------------------------------------------------------------------------
+ */
+
+H5_HLDLL herr_t H5DOwrite_chunk(hid_t dset_id,
+ hid_t dxpl_id,
+ uint32_t filters,
+ const hsize_t *offset,
+ size_t data_size,
+ const void *buf);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am
index f3d09ab..1e781a9 100644
--- a/hl/src/Makefile.am
+++ b/hl/src/Makefile.am
@@ -31,12 +31,12 @@ lib_LTLIBRARIES=libhdf5_hl.la
libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
# List sources to include in the HDF5 HL Library.
-libhdf5_hl_la_SOURCES=H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
+libhdf5_hl_la_SOURCES=H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
# HDF5 HL library depends on HDF5 Library.
libhdf5_hl_la_LIBADD=$(LIBHDF5)
# Public header files (to be installed)
-include_HEADERS=hdf5_hl.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
+include_HEADERS=hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
include $(top_srcdir)/config/conclude.am
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index debe9f0..7df4d8f 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -115,8 +115,8 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libhdf5_hl_la_DEPENDENCIES = $(LIBHDF5)
-am_libhdf5_hl_la_OBJECTS = H5DS.lo H5IM.lo H5LT.lo H5LTanalyze.lo \
- H5LTparse.lo H5PT.lo H5TB.lo
+am_libhdf5_hl_la_OBJECTS = H5DO.lo H5DS.lo H5IM.lo H5LT.lo \
+ H5LTanalyze.lo H5LTparse.lo H5PT.lo H5TB.lo
libhdf5_hl_la_OBJECTS = $(am_libhdf5_hl_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -449,7 +449,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
# This library is our main target.
@@ -459,13 +459,13 @@ lib_LTLIBRARIES = libhdf5_hl.la
libhdf5_hl_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
# List sources to include in the HDF5 HL Library.
-libhdf5_hl_la_SOURCES = H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
+libhdf5_hl_la_SOURCES = H5DO.c H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c
# HDF5 HL library depends on HDF5 Library.
libhdf5_hl_la_LIBADD = $(LIBHDF5)
# Public header files (to be installed)
-include_HEADERS = hdf5_hl.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
+include_HEADERS = hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h H5DSpublic.h H5PTpublic.h
# Automake needs to be taught how to build lib, progs, and tests targets.
# These will be filled in automatically for the most part (e.g.,
@@ -564,6 +564,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5DO.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5DS.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5IM.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5LT.Plo@am__quote@
diff --git a/hl/src/hdf5_hl.h b/hl/src/hdf5_hl.h
index 0fff932..4643932 100644
--- a/hl/src/hdf5_hl.h
+++ b/hl/src/hdf5_hl.h
@@ -22,6 +22,7 @@
#ifndef _HDF5_HL_H
#define _HDF5_HL_H
+#include "H5DOpublic.h" /* dataset optimization */
#include "H5DSpublic.h" /* dimension scales */
#include "H5LTpublic.h" /* lite */
#include "H5IMpublic.h" /* image */
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 89baac4..39a3811 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
@@ -65,6 +65,7 @@ ADD_TEST (
test_ds7.h5
test_ds8.h5
test_ds9.h5
+ test_dectris.h5
test_image1.h5
test_image2.h5
test_image3.h5
@@ -76,10 +77,11 @@ ADD_TEST (
)
HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
+HL_ADD_TEST (test_dset_opt "")
HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
HL_ADD_TEST (test_lite "dtype_file.txt")
HL_ADD_TEST (test_packet "")
-HL_ADD_TEST (test_table "test_table_be.hdf5;test_table_cray.hdf5;test_table_le.hdf5")
+HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
# --------------------------------------------------------------------
# This executable is used to generate test files for the test_ds test.
diff --git a/hl/test/Makefile.am b/hl/test/Makefile.am
index 8893b93..0809deb 100644
--- a/hl/test/Makefile.am
+++ b/hl/test/Makefile.am
@@ -29,7 +29,7 @@ LDADD=$(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
# Test programs. These are our main targets. They should be listed in the
# order to be executed, generally most specific tests to least specific tests.
-TEST_PROG=test_lite test_image test_file_image test_table test_ds test_packet
+TEST_PROG=test_lite test_image test_file_image test_table test_ds test_packet test_dset_opt
check_PROGRAMS=$(TEST_PROG)
# These programs generate test files for the tests. They don't need to be
@@ -46,6 +46,7 @@ endif
# Temporary files. These files are the ones created by running `make test'.
CHECK_CLEANFILES+=combine_tables[1-2].h5 test_ds[1-9].h5 test_ds10.h5 \
test_image[1-3].h5 file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \
- test_packet_table.h5 test_packet_compress.h5 test_detach.h5
+ test_packet_table.h5 test_packet_compress.h5 test_detach.h5 \
+ test_dectris.h5
include $(top_srcdir)/config/conclude.am
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index 611863f..d8c5614 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -89,7 +89,7 @@ CONFIG_CLEAN_FILES = H5srcdir_str.h
CONFIG_CLEAN_VPATH_FILES =
am__EXEEXT_1 = test_lite$(EXEEXT) test_image$(EXEEXT) \
test_file_image$(EXEEXT) test_table$(EXEEXT) test_ds$(EXEEXT) \
- test_packet$(EXEEXT)
+ test_packet$(EXEEXT) test_dset_opt$(EXEEXT)
am__EXEEXT_2 = gen_test_ds$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
gen_test_ds_SOURCES = gen_test_ds.c
@@ -103,6 +103,10 @@ test_ds_SOURCES = test_ds.c
test_ds_OBJECTS = test_ds.$(OBJEXT)
test_ds_LDADD = $(LDADD)
test_ds_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
+test_dset_opt_SOURCES = test_dset_opt.c
+test_dset_opt_OBJECTS = test_dset_opt.$(OBJEXT)
+test_dset_opt_LDADD = $(LDADD)
+test_dset_opt_DEPENDENCIES = $(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
test_file_image_SOURCES = test_file_image.c
test_file_image_OBJECTS = test_file_image.$(OBJEXT)
test_file_image_LDADD = $(LDADD)
@@ -149,10 +153,11 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = gen_test_ds.c test_ds.c test_file_image.c test_image.c \
- test_lite.c test_packet.c test_table.c
-DIST_SOURCES = gen_test_ds.c test_ds.c test_file_image.c test_image.c \
- test_lite.c test_packet.c test_table.c
+SOURCES = gen_test_ds.c test_ds.c test_dset_opt.c test_file_image.c \
+ test_image.c test_lite.c test_packet.c test_table.c
+DIST_SOURCES = gen_test_ds.c test_ds.c test_dset_opt.c \
+ test_file_image.c test_image.c test_lite.c test_packet.c \
+ test_table.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -452,14 +457,15 @@ TRACE = perl $(top_srcdir)/bin/trace
CHECK_CLEANFILES = *.chkexe *.chklog *.clog combine_tables[1-2].h5 \
test_ds[1-9].h5 test_ds10.h5 test_image[1-3].h5 \
file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \
- test_packet_table.h5 test_packet_compress.h5 test_detach.h5
+ test_packet_table.h5 test_packet_compress.h5 test_detach.h5 \
+ test_dectris.h5
# The tests depend on the hdf5, hdf5 test, and hdf5_hl libraries
LDADD = $(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5)
# Test programs. These are our main targets. They should be listed in the
# order to be executed, generally most specific tests to least specific tests.
-TEST_PROG = test_lite test_image test_file_image test_table test_ds test_packet
+TEST_PROG = test_lite test_image test_file_image test_table test_ds test_packet test_dset_opt
# These programs generate test files for the tests. They don't need to be
# compiled every time we want to test the library. However, putting
@@ -548,6 +554,9 @@ gen_test_ds$(EXEEXT): $(gen_test_ds_OBJECTS) $(gen_test_ds_DEPENDENCIES) $(EXTRA
test_ds$(EXEEXT): $(test_ds_OBJECTS) $(test_ds_DEPENDENCIES) $(EXTRA_test_ds_DEPENDENCIES)
@rm -f test_ds$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ds_OBJECTS) $(test_ds_LDADD) $(LIBS)
+test_dset_opt$(EXEEXT): $(test_dset_opt_OBJECTS) $(test_dset_opt_DEPENDENCIES) $(EXTRA_test_dset_opt_DEPENDENCIES)
+ @rm -f test_dset_opt$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dset_opt_OBJECTS) $(test_dset_opt_LDADD) $(LIBS)
test_file_image$(EXEEXT): $(test_file_image_OBJECTS) $(test_file_image_DEPENDENCIES) $(EXTRA_test_file_image_DEPENDENCIES)
@rm -f test_file_image$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_file_image_OBJECTS) $(test_file_image_LDADD) $(LIBS)
@@ -572,6 +581,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_test_ds.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ds.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_dset_opt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_file_image.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_image.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_lite.Po@am__quote@
diff --git a/hl/test/dectris_hl_perf.c b/hl/test/dectris_hl_perf.c
new file mode 100644
index 0000000..a3e382a
--- /dev/null
+++ b/hl/test/dectris_hl_perf.c
@@ -0,0 +1,643 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * This test is for the DECTRIS project to the H5DOwrite_chunk function
+ *
+ */
+
+#include "hdf5.h"
+#include "hdf5_hl.h"
+#include <zlib.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+const char *FILENAME[] = {
+ "dectris_perf",
+ "unix.raw",
+ NULL
+};
+
+/*
+ * Print the current location on the standard output stream.
+ */
+#define FUNC __func__
+#define AT() printf (" at %s:%d in %s()...\n", \
+ __FILE__, __LINE__, FUNC);
+#define H5_FAILED() {puts("*FAILED*");fflush(stdout);}
+#define TEST_ERROR {H5_FAILED(); AT(); goto error;}
+#define TESTING(WHAT) {printf("Testing %-62s",WHAT); fflush(stdout);}
+#define PASSED() {puts(" PASSED");fflush(stdout);}
+
+#define DIRECT_UNCOMPRESSED_DSET "direct_uncompressed_dset"
+#define DIRECT_COMPRESSED_DSET "direct_compressed_dset"
+#define REG_COMPRESSED_DSET "reg_compressed_dset"
+#define REG_NO_COMPRESS_DSET "reg_no_compress_dset"
+#define RANK 3
+#define NX 100
+#define NY 1000
+#define NZ 250
+#define CHUNK_NX 1
+#define CHUNK_NY 1000
+#define CHUNK_NZ 250
+
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
+char filename[1024];
+unsigned int *outbuf[NX];
+size_t data_size[NX];
+double total_size = 0.0;
+unsigned int *direct_buf[NX];
+double MB = 1048576.0;
+
+/*--------------------------------------------------
+ * Function to report IO rate
+ *--------------------------------------------------
+ */
+void reportTime(struct timeval start, double mbytes)
+{
+ struct timeval timeval_stop,timeval_diff;
+
+ /*end timing*/
+ gettimeofday(&timeval_stop,NULL);
+
+ /* Calculate the elapsed gettimeofday time */
+ timeval_diff.tv_usec=timeval_stop.tv_usec-start.tv_usec;
+ timeval_diff.tv_sec=timeval_stop.tv_sec-start.tv_sec;
+
+ if(timeval_diff.tv_usec<0) {
+ timeval_diff.tv_usec+=1000000;
+ timeval_diff.tv_sec--;
+ } /* end if */
+
+/*printf("mbytes=%lf, sec=%lf, usec=%lf\n", mbytes, (double)timeval_diff.tv_sec, (double)timeval_diff.tv_usec);*/
+ printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0)));
+}
+
+/*--------------------------------------------------
+ * Create file, datasets, and initialize data
+ *--------------------------------------------------
+ */
+int create_file(hid_t fapl_id)
+{
+ hid_t file; /* handles */
+ hid_t fapl;
+ hid_t cparms;
+ hid_t dataspace, dataset;
+ hsize_t dims[RANK] = {NX, NY, NZ};
+ hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ unsigned int aggression = 9; /* Compression aggression setting */
+ int ret;
+ int i, j, n;
+
+ int flag;
+ int unix_file;
+
+ unsigned int *p;
+ size_t buf_size = CHUNK_NY*CHUNK_NZ*sizeof(unsigned int);
+
+ const Bytef *z_src;
+ Bytef *z_dst; /*destination buffer */
+ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ uLong z_src_nbytes = (uLong)buf_size;
+
+ TESTING("Create a file and dataset");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /*
+ * Create a new file. If file exists its contents will be overwritten.
+ */
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ TEST_ERROR;
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking and compression
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+
+ if(H5Pset_chunk( cparms, RANK, chunk_dims) < 0)
+ TEST_ERROR;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DIRECT_UNCOMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dataset) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dcreate2(file, REG_NO_COMPRESS_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dataset) < 0)
+ TEST_ERROR;
+
+ /* Set compression */
+ if(H5Pset_deflate( cparms, aggression) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dcreate2(file, DIRECT_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dataset) < 0)
+ TEST_ERROR;
+
+
+ if((dataset = H5Dcreate2(file, REG_COMPRESSED_DSET, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if(H5Dclose(dataset) < 0)
+ TEST_ERROR;
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR;
+
+ if(H5Sclose(dataspace) < 0)
+ TEST_ERROR;
+
+ if(H5Pclose(cparms) < 0)
+ TEST_ERROR;
+
+ /* create a unix file*/
+ flag = O_CREAT|O_TRUNC|O_WRONLY;
+
+ if ((unix_file=open(FILENAME[1],flag,S_IRWXU))== -1)
+ TEST_ERROR;
+
+ if (close(unix_file) < 0)
+ {
+ printf(" unable to close the file\n");
+ TEST_ERROR;
+ }
+
+
+ /* Initialize data for chunks */
+ for(i = 0; i < NX; i++) {
+ p = direct_buf[i] = (unsigned int*)malloc(CHUNK_NY*CHUNK_NZ*sizeof(unsigned int));
+
+ for(j=0; j < CHUNK_NY*CHUNK_NZ; j++, p++)
+ *p = rand() % 65000;
+
+ z_src = (const Bytef*)direct_buf[i];
+
+ z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ /* Allocate output (compressed) buffer */
+ outbuf[i] = (unsigned int*)malloc((size_t)z_dst_nbytes);
+ z_dst = (Bytef *)outbuf[i];
+
+ /* Perform compression from the source to the destination buffer */
+ ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
+
+ data_size[i] = (size_t)z_dst_nbytes;
+ total_size += data_size[i];
+
+ /* Check for various zlib errors */
+ if(Z_BUF_ERROR == ret) {
+ fprintf(stderr, "overflow");
+ TEST_ERROR;
+ } else if(Z_MEM_ERROR == ret) {
+ fprintf(stderr, "deflate memory error");
+ TEST_ERROR;
+ } else if(Z_OK != ret) {
+ fprintf(stderr, "other deflate error");
+ TEST_ERROR;
+ }
+ }
+
+
+ PASSED();
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*--------------------------------------------------
+ * Benchmark the performance of the new function
+ * with precompressed data.
+ *--------------------------------------------------
+ */
+int
+test_direct_write_uncompressed_data(hid_t fapl_id)
+{
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ unsigned filter_mask = 0;
+ hsize_t offset[RANK] = {0, 0, 0};
+
+ struct timeval timeval_start;
+
+ TESTING("H5DOwrite_chunk for uncompressed data");
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+
+ /* Start the timer */
+ gettimeofday(&timeval_start,NULL);
+
+ /* Reopen the file and dataset */
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dopen2(file, DIRECT_UNCOMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for(i=0; i<NX; i++) {
+ status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, CHUNK_NY*CHUNK_NZ*sizeof(unsigned int), direct_buf[i]);
+ (offset[0])++;
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+}
+
+
+/*--------------------------------------------------
+ * Benchmark the performance of the new function
+ * with precompressed data.
+ *--------------------------------------------------
+ */
+int
+test_direct_write_compressed_data(hid_t fapl_id)
+{
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ unsigned filter_mask = 0;
+ hsize_t offset[RANK] = {0, 0, 0};
+
+ struct timeval timeval_start;
+
+ TESTING("H5DOwrite_chunk for pre-compressed data");
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+
+ /* Start the timer */
+ gettimeofday(&timeval_start,NULL);
+
+ /* Reopen the file and dataset */
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dopen2(file, DIRECT_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for(i=0; i<NX; i++) {
+ status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, data_size[i], outbuf[i]);
+ (offset[0])++;
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size/MB));
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*--------------------------------------------------
+ * Benchmark the performance of the regular H5Dwrite
+ * with compression filter enabled.
+ *--------------------------------------------------
+ */
+int
+test_compressed_write(hid_t fapl_id)
+{
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t mem_space;
+ hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ hsize_t start[RANK]; /* Start of hyperslab */
+ hsize_t stride[RANK]; /* Stride of hyperslab */
+ hsize_t count[RANK]; /* Block count */
+ hsize_t block[RANK]; /* Block sizes */
+
+ struct timeval timeval_start;
+
+ TESTING("H5Dwrite with compression enabled");
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Start the timer */
+ gettimeofday(&timeval_start,NULL);
+
+ /* Reopen the file and dataset */
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dopen2(file, REG_COMPRESSED_DSET, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if((dataspace = H5Dget_space(dataset)) < 0)
+ TEST_ERROR;
+
+ start[0] = start[1] = start[2] = 0;
+ stride[0] = stride[1] = stride[2] = 1;
+ count[0] = count[1] = count[2] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
+
+ for(i=0; i<NX; i++) {
+ /*
+ * Select hyperslab for one chunk in the file
+ */
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ TEST_ERROR;
+ (start[0])++;
+
+ if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
+ H5P_DEFAULT, direct_buf[i])) < 0)
+ TEST_ERROR;
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(dataspace);
+ H5Sclose(mem_space);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(dataspace);
+ H5Sclose(mem_space);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*--------------------------------------------------
+ * Benchmark the performance of the regular H5Dwrite
+ * with compression
+ *--------------------------------------------------
+ */
+int
+test_no_compress_write(hid_t fapl_id)
+{
+ hid_t file; /* handles */
+ hid_t dataspace, dataset;
+ hid_t mem_space;
+ hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ};
+ hid_t dxpl;
+ herr_t status;
+ int i;
+
+ hsize_t start[RANK]; /* Start of hyperslab */
+ hsize_t stride[RANK]; /* Stride of hyperslab */
+ hsize_t count[RANK]; /* Block count */
+ hsize_t block[RANK]; /* Block sizes */
+
+ struct timeval timeval_start;
+
+ TESTING("H5Dwrite without compression");
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Start the timer */
+ gettimeofday(&timeval_start,NULL);
+
+ /* Reopen the file and dataset */
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
+ TEST_ERROR;
+
+ if((dataset = H5Dopen2(file, REG_NO_COMPRESS_DSET, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if((dataspace = H5Dget_space(dataset)) < 0)
+ TEST_ERROR;
+
+ start[0] = start[1] = start[2] = 0;
+ stride[0] = stride[1] = stride[2] = 1;
+ count[0] = count[1] = count[2] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ;
+
+ for(i=0; i<NX; i++) {
+ /*
+ * Select hyperslab for one chunk in the file
+ */
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ TEST_ERROR;
+ (start[0])++;
+
+ if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace,
+ H5P_DEFAULT, direct_buf[i])) < 0)
+ TEST_ERROR;
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(dataspace);
+ H5Sclose(mem_space);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB));
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(dataspace);
+ H5Sclose(mem_space);
+ H5Pclose(dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+}
+
+/*--------------------------------------------------
+ * Benchmark the performance for writing compressed
+ * data to a Unix file
+ *--------------------------------------------------
+ */
+int
+test_unix_write(void)
+{
+ int file, flag;
+ ssize_t op_size;
+ int i;
+ struct timeval timeval_start;
+
+ TESTING("Write compressed data to a Unix file");
+
+ /* create file*/
+ flag = O_WRONLY;
+
+ /* Start the timer */
+ gettimeofday(&timeval_start,NULL);
+
+ if ((file=open(FILENAME[1],flag))== -1)
+ TEST_ERROR;
+
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for(i=0; i<NX; i++) {
+ op_size = write(file, outbuf[i],data_size[i]);
+ if (op_size < 0)
+ {
+ printf(" Error in writing data to file because %s \n", strerror(errno));
+ TEST_ERROR;
+ }
+ else if (op_size == 0)
+ {
+ printf(" unable to write sufficent data to file because %s \n", strerror(errno));
+ TEST_ERROR;
+ }
+ }
+
+ if (close(file) < 0)
+ {
+ printf(" unable to close the file\n");
+ TEST_ERROR;
+ }
+
+ /* Report the performance */
+ reportTime(timeval_start, (double)(total_size/MB));
+
+ PASSED();
+ return 0;
+
+error:
+ return 1;
+}
+
+/*--------------------------------------------------
+ * Main function
+ *--------------------------------------------------
+ */
+int
+main (void)
+{
+ hid_t fapl = H5P_DEFAULT;
+ int i;
+
+ /* Testing setup */
+/* h5_reset();
+ fapl = h5_fileaccess();
+
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);*/
+
+ sprintf(filename, "%s.h5", FILENAME[0]);
+
+ create_file(fapl);
+ test_direct_write_uncompressed_data(fapl);
+ test_direct_write_compressed_data(fapl);
+ test_no_compress_write(fapl);
+ test_compressed_write(fapl);
+ test_unix_write();
+
+ for(i=0; i<NX; i++) {
+ free(outbuf[i]);
+ free(direct_buf[i]);
+ }
+
+/* h5_cleanup(FILENAME, fapl);*/
+ return 0;
+}
diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c
new file mode 100644
index 0000000..9a0ffb0
--- /dev/null
+++ b/hl/test/test_dset_opt.c
@@ -0,0 +1,1138 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+* 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. *
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include <stdlib.h>
+#include <string.h>
+#include "h5hltest.h"
+#include "H5srcdir.h"
+#include "H5DOpublic.h"
+#include <math.h>
+
+#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER)
+# define H5_ZLIB_HEADER "zlib.h"
+#endif
+#if defined(H5_ZLIB_HEADER)
+# include H5_ZLIB_HEADER /* "zlib.h" */
+#endif
+
+#define FILE_NAME "test_dectris.h5"
+
+#define DATASETNAME1 "direct_write"
+#define DATASETNAME2 "skip_one_filter"
+#define DATASETNAME3 "skip_two_filters"
+#define DATASETNAME4 "data_conv"
+#define DATASETNAME5 "contiguous_dset"
+#define DATASETNAME6 "invalid_argue"
+#define RANK 2
+#define NX 16
+#define NY 16
+#define CHUNK_NX 4
+#define CHUNK_NY 4
+
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
+
+/* Temporary filter IDs used for testing */
+#define H5Z_FILTER_BOGUS1 305
+#define H5Z_FILTER_BOGUS2 306
+#define ADD_ON 7
+#define FACTOR 3
+
+/* Local prototypes for filter functions */
+static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_BOGUS1[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_BOGUS1, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "bogus1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_bogus1, /* The actual filter function */
+}};
+
+const H5Z_class2_t H5Z_BOGUS2[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_BOGUS2, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "bogus2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_bogus2, /* The actual filter function */
+}};
+
+/*-------------------------------------------------------------------------
+ * Function: test_direct_chunk_write
+ *
+ * Purpose: Test the basic functionality of H5DOwrite_chunk
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifdef H5_HAVE_FILTER_DEFLATE
+static int
+test_direct_chunk_write (hid_t file)
+{
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int ret;
+ int data[NX][NY];
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
+
+ const Bytef *z_src = (const Bytef*)(direct_buf);
+ Bytef *z_dst; /*destination buffer */
+ uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
+ uLong z_src_nbytes = (uLong)buf_size;
+ int aggression = 9; /* Compression aggression setting */
+ void *outbuf = NULL; /* Pointer to new buffer */
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ TESTING("basic functionality of H5DOwrite_chunk");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ goto error;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ goto error;
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking and compression
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ goto error;
+
+ if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ goto error;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Initialize the dataset */
+ for(i = n = 0; i < NX; i++)
+ for(j = 0; j < NY; j++)
+ data[i][j] = n++;
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ /*
+ * Write the data for the dataset. It should stay in the chunk cache.
+ * It will be evicted from the cache by the H5DOwrite_chunk calls.
+ */
+ if((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
+ dxpl, data)) < 0)
+ goto error;
+
+ /* Initialize data for one chunk */
+ for(i = n = 0; i < CHUNK_NX; i++)
+ for(j = 0; j < CHUNK_NY; j++)
+ direct_buf[i][j] = n++;
+
+ /* Allocate output (compressed) buffer */
+ outbuf = malloc(z_dst_nbytes);
+ z_dst = (Bytef *)outbuf;
+
+ /* Perform compression from the source to the destination buffer */
+ ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
+
+ /* Check for various zlib errors */
+ if(Z_BUF_ERROR == ret) {
+ fprintf(stderr, "overflow");
+ goto error;
+ } else if(Z_MEM_ERROR == ret) {
+ fprintf(stderr, "deflate memory error");
+ goto error;
+ } else if(Z_OK != ret) {
+ fprintf(stderr, "other deflate error");
+ goto error;
+ }
+
+ /* Write the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ for(i=0; i<NX/CHUNK_NX; i++) {
+ for(j=0; j<NY/CHUNK_NY; j++) {
+ status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
+ offset[1] += CHUNK_NY;
+ }
+ offset[0] += CHUNK_NX;
+ offset[1] = 0;
+ }
+
+ if(outbuf)
+ free(outbuf);
+
+ if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /*
+ * Select hyperslab for one chunk in the file
+ */
+ start[0] = CHUNK_NX; start[1] = CHUNK_NY;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ goto error;
+
+ /* Read the chunk back */
+ if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ goto error;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ if(direct_buf[i][j] != check_chunk[i][j]) {
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ /* Reinitialize different data for one chunk */
+ for(i = 0; i < CHUNK_NX; i++)
+ for(j = 0; j < CHUNK_NY; j++)
+ direct_buf[i][j] = i + j;
+
+ /* Allocate output (compressed) buffer */
+ outbuf = malloc(z_dst_nbytes);
+ z_dst = (Bytef *)outbuf;
+
+ /* Perform compression from the source to the destination buffer */
+ ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
+
+ /* Check for various zlib errors */
+ if(Z_BUF_ERROR == ret) {
+ fprintf(stderr, "overflow");
+ goto error;
+ } else if(Z_MEM_ERROR == ret) {
+ fprintf(stderr, "deflate memory error");
+ goto error;
+ } else if(Z_OK != ret) {
+ fprintf(stderr, "other deflate error");
+ goto error;
+ }
+
+ /* Rewrite the compressed chunk data repeatedly to cover all the chunks in the
+ * dataset, using the direct writing function. */
+ offset[0] = offset[1] = 0;
+ for(i=0; i<NX/CHUNK_NX; i++) {
+ for(j=0; j<NY/CHUNK_NY; j++) {
+ status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
+ offset[1] += CHUNK_NY;
+ }
+ offset[0] += CHUNK_NX;
+ offset[1] = 0;
+ }
+
+ if(outbuf)
+ free(outbuf);
+
+ if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Read the chunk back */
+ if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ goto error;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ if(direct_buf[i][j] != check_chunk[i][j]) {
+ printf(" 2. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ } H5E_END_TRY;
+
+ if(outbuf)
+ free(outbuf);
+
+ return 1;
+}
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+/*-------------------------------------------------------------------------
+ * Function: test_skip_compress_write1
+ *
+ * Purpose: Test skipping compression filter when it is the only filter
+ * for the dataset
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_skip_compress_write1(hid_t file)
+{
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ TESTING("skipping compression filter for H5DOwrite_chunk");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ goto error;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ goto error;
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking and compression
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ goto error;
+
+ if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0)
+ goto error;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ /* Initialize data for one chunk */
+ for(i = n = 0; i < CHUNK_NX; i++)
+ for(j = 0; j < CHUNK_NY; j++) {
+ direct_buf[i][j] = n++;
+ }
+
+ /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
+ * Indicate skipping the compression filter. */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY;
+
+ filter_mask = 0x00000001;
+
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ goto error;
+
+ if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /*
+ * Select hyperslab for the chunk just written in the file
+ */
+ start[0] = CHUNK_NX; start[1] = CHUNK_NY;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ goto error;
+
+ /* Read the chunk back */
+ if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ goto error;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ if(direct_buf[i][j] != check_chunk[i][j]) {
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: filter_bogus1
+ *
+ * Purpose: A bogus filte that adds ADD_ON to the original value
+ *
+ * Return: Success: Data chunk size
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+filter_bogus1(unsigned int flags, size_t UNUSED cd_nelmts,
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr=(int *)*buf; /* Pointer to the data values */
+ ssize_t buf_left=*buf_size; /* Amount of data buffer left to process */
+
+ if(flags & H5Z_FLAG_REVERSE) { /* read */
+ /* Substract the "add on" value to all the data values */
+ while(buf_left>0) {
+ *int_ptr++ -= (int)ADD_ON;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /* write */
+ /* Add the "add on" value to all the data values */
+ while(buf_left>0) {
+ *int_ptr++ += (int)ADD_ON;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: filter_bogus2
+ *
+ * Purpose: A bogus filter that multiplies the original value by FACTOR.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *-------------------------------------------------------------------------
+ */
+static size_t
+filter_bogus2(unsigned int flags, size_t UNUSED cd_nelmts,
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t *buf_size, void **buf)
+{
+ int *int_ptr=(int *)*buf; /* Pointer to the data values */
+ ssize_t buf_left=*buf_size; /* Amount of data buffer left to process */
+
+ if(flags & H5Z_FLAG_REVERSE) { /* read */
+ /* Substract the "add on" value to all the data values */
+ while(buf_left>0) {
+ *int_ptr++ /= (int)FACTOR;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end if */
+ else { /* write */
+ /* Add the "add on" value to all the data values */
+ while(buf_left>0) {
+ *int_ptr++ *= (int)FACTOR;
+ buf_left -= sizeof(int);
+ } /* end while */
+ } /* end else */
+
+ return nbytes;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_skip_compress_write2
+ *
+ * Purpose: Test skipping compression filter when there are three filters
+ * for the dataset
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_skip_compress_write2(hid_t file)
+{
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int origin_direct_buf[CHUNK_NX][CHUNK_NY];
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ int check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ TESTING("skipping compression filters but keep two other filters");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ goto error;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ goto error;
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking and compression.
+ * The order of filters is bogus 1 + deflate + bogus 2.
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ goto error;
+
+ /* Register and enable first bogus filter */
+ if(H5Zregister (H5Z_BOGUS1) < 0)
+ goto error;
+
+ if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0)
+ goto error;
+
+ /* Enable compression filter */
+ if((status = H5Pset_deflate( cparms, (unsigned) aggression)) < 0)
+ goto error;
+
+ /* Register and enable second bogus filter */
+ if(H5Zregister (H5Z_BOGUS2) < 0)
+ goto error;
+
+ if(H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0)
+ goto error;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ /* Initialize data for one chunk. Apply operations of two bogus filters to the chunk */
+ for(i = n = 0; i < CHUNK_NX; i++)
+ for(j = 0; j < CHUNK_NY; j++) {
+ origin_direct_buf[i][j] = n++;
+ direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR;
+ }
+
+ /* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
+ * Indicate skipping the compression filter but keep the other two bogus filters */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY;
+
+ /* compression filter is the middle one to be skipped */
+ filter_mask = 0x00000002;
+
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ goto error;
+
+ if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /*
+ * Select hyperslab for one chunk in the file
+ */
+ start[0] = CHUNK_NX; start[1] = CHUNK_NY;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ goto error;
+
+ /* Read the chunk back */
+ if((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ goto error;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ if(origin_direct_buf[i][j] != check_chunk[i][j]) {
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j], check_chunk[i][j]);
+ goto error;
+ }
+ }
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_data_conv
+ *
+ * Purpose: Test data conversion
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_data_conv(hid_t file)
+{
+ typedef struct {
+ int a, b, c[4], d, e;
+ } src_type_t;
+ typedef struct {
+ int a, c[4], e;
+ } dst_type_t;
+
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+ const hsize_t four = 4;
+ hid_t st=-1, dt=-1;
+ hid_t array_dt;
+
+ unsigned filter_mask = 0;
+ src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
+ dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(src_type_t);
+
+ hsize_t start[2]; /* Start of hyperslab */
+ hsize_t stride[2]; /* Stride of hyperslab */
+ hsize_t count[2]; /* Block count */
+ hsize_t block[2]; /* Block sizes */
+
+ TESTING("data conversion for H5DOwrite_chunk");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
+ goto error;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ goto error;
+
+ /*
+ * Modify dataset creation properties, i.e. enable chunking
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ goto error;
+
+ /* Build hdf5 datatypes */
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
+ if((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 ||
+ H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 ||
+ H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+
+ if(H5Tclose(array_dt) < 0)
+ goto error;
+
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
+ if((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 ||
+ H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 ||
+ H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 ||
+ H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0)
+ goto error;
+
+ if(H5Tclose(array_dt) < 0)
+ goto error;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ /* Initialize data for one chunk */
+ for(i = n = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ (direct_buf[i][j]).a = i*j+0;
+ (direct_buf[i][j]).b = i*j+1;
+ (direct_buf[i][j]).c[0] = i*j+2;
+ (direct_buf[i][j]).c[1] = i*j+3;
+ (direct_buf[i][j]).c[2] = i*j+4;
+ (direct_buf[i][j]).c[3] = i*j+5;
+ (direct_buf[i][j]).d = i*j+6;
+ (direct_buf[i][j]).e = i*j+7;
+ }
+ }
+
+ /* write the chunk data to dataset, using the direct writing function.
+ * There should be no data conversion involved. */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY;
+
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
+ goto error;
+
+ if(H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
+ goto error;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ if((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /*
+ * Select hyperslab for the chunk just written in the file
+ */
+ start[0] = CHUNK_NX; start[1] = CHUNK_NY;
+ stride[0] = 1; stride[1] = 1;
+ count[0] = 1; count[1] = 1;
+ block[0] = CHUNK_NX; block[1] = CHUNK_NY;
+ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
+ goto error;
+
+ /* Read the chunk back. Data should be converted */
+ if((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
+ goto error;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < CHUNK_NX; i++) {
+ for(j = 0; j < CHUNK_NY; j++) {
+ if ((direct_buf[i][j]).a != (check_chunk[i][j]).a ||
+ (direct_buf[i][j]).c[0] != (check_chunk[i][j]).c[0] ||
+ (direct_buf[i][j]).c[1] != (check_chunk[i][j]).c[1] ||
+ (direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] ||
+ (direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] ||
+ (direct_buf[i][j]).e != (check_chunk[i][j]).e) {
+ printf(" 1. Read different values than written.");
+ printf(" At index %d,%d\n", i, j);
+ printf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n",
+ (direct_buf[i][j]).a, (direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
+ (direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d, (direct_buf[i][j]).e);
+ printf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n",
+ (check_chunk[i][j]).a, (check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
+ (check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
+
+ goto error;
+ }
+ }
+ }
+
+ /*
+ * Close/release resources.
+ */
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ H5Tclose(st);
+ H5Tclose(dt);
+
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ H5Tclose(st);
+ H5Tclose(dt);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: test_invalid_parameters
+ *
+ * Purpose: Test invalid parameters for H5DOwrite_chunk
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_invalid_parameters(hid_t file)
+{
+ hid_t dataspace = -1, dataset = -1;
+ hid_t mem_space = -1;
+ hid_t cparms = -1, dxpl = -1;
+ hsize_t dims[2] = {NX, NY};
+ hsize_t chunk_dims[2] ={CHUNK_NX, CHUNK_NY};
+ herr_t status;
+ int i, j, n;
+
+ unsigned filter_mask = 0;
+ int direct_buf[CHUNK_NX][CHUNK_NY];
+ hsize_t offset[2] = {0, 0};
+ size_t buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
+ int aggression = 9; /* Compression aggression setting */
+
+ TESTING("invalid parameters for H5DOwrite_chunk");
+
+ /*
+ * Create the data space with unlimited dimensions.
+ */
+ if((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
+ goto error;
+
+ if((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
+ goto error;
+
+ /*
+ * Modify dataset creation properties
+ */
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ goto error;
+
+ /*
+ * Create a new contiguous dataset to verify H5DOwrite_chunk doesn't work
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ goto error;
+
+ /* Initialize data for one chunk */
+ for(i = n = 0; i < CHUNK_NX; i++)
+ for(j = 0; j < CHUNK_NY; j++) {
+ direct_buf[i][j] = n++;
+ }
+
+ /* Try to write the chunk data to contiguous dataset. It should fail */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY;
+
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ /* Create a chunked dataset with compression filter */
+ if((status = H5Pset_chunk( cparms, RANK, chunk_dims)) < 0)
+ goto error;
+
+ if((status = H5Pset_deflate( cparms, (unsigned ) aggression)) < 0)
+ goto error;
+
+ /*
+ * Create a new dataset within the file using cparms
+ * creation properties.
+ */
+ if((dataset = H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT,
+ cparms, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Check invalid dataset ID */
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check invalid DXPL ID */
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, -1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check invalid OFFSET */
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check when OFFSET is out of dataset range */
+ offset[0] = NX + 1;
+ offset[1] = NY;
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check when OFFSET is not on chunk boundary */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY + 1;
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check invalid buffer size */
+ offset[0] = CHUNK_NX;
+ offset[1] = CHUNK_NY;
+ buf_size = 0;
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ /* Check invalid data buffer */
+ buf_size = CHUNK_NX*CHUNK_NY*sizeof(int);
+ H5E_BEGIN_TRY {
+ if((status = H5DOwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL)
+ goto error;
+ } H5E_END_TRY;
+
+ if(H5Dclose(dataset) < 0)
+ goto error;
+
+ /*
+ * Close/release resources.
+ */
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dataset);
+ H5Sclose(mem_space);
+ H5Sclose(dataspace);
+ H5Pclose(cparms);
+ H5Pclose(dxpl);
+ } H5E_END_TRY;
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: Main function
+ *
+ * Purpose: Test direct chunk write function H5DOwrite_chunk
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Raymond Lu
+ * 30 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+int main( void )
+{
+ hid_t file_id;
+ int nerrors=0;
+
+ /*
+ * Create a new file. If file exists its contents will be overwritten.
+ */
+ if((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Test direct chunk write */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ nerrors += test_direct_chunk_write(file_id);
+#endif /* H5_HAVE_FILTER_DEFLATE */
+ nerrors += test_skip_compress_write1(file_id);
+ nerrors += test_skip_compress_write2(file_id);
+ nerrors += test_data_conv(file_id);
+ nerrors += test_invalid_parameters(file_id);
+
+ if(H5Fclose(file_id) < 0)
+ goto error;
+
+ /* check for errors */
+ if (nerrors)
+ goto error;
+
+ return 0;
+
+error:
+ return 1;
+}
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index a611088..282755e 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -51,7 +51,6 @@
static herr_t make_attributes( hid_t loc_id, const char* obj_name );
-
/*-------------------------------------------------------------------------
* test dataset functions
*-------------------------------------------------------------------------
@@ -2137,7 +2136,6 @@ static int test_valid_path(void)
return -1;
}
-
/*-------------------------------------------------------------------------
* the main program
*-------------------------------------------------------------------------
@@ -2166,6 +2164,4 @@ int main( void )
error:
return 1;
-
-
}
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index cdae768..488cbe2 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -19,9 +19,9 @@
#include "H5srcdir.h"
#include "H5TBpublic.h"
-#define TEST_FILE_BE "test_table_be.hdf5"
-#define TEST_FILE_LE "test_table_le.hdf5"
-#define TEST_FILE_CRAY "test_table_cray.hdf5"
+#define TEST_FILE_BE "test_table_be.h5"
+#define TEST_FILE_LE "test_table_le.h5"
+#define TEST_FILE_CRAY "test_table_cray.h5"
/*-------------------------------------------------------------------------
diff --git a/hl/test/test_table_be.hdf5 b/hl/test/test_table_be.h5
index 3639695..3639695 100644
--- a/hl/test/test_table_be.hdf5
+++ b/hl/test/test_table_be.h5
Binary files differ
diff --git a/hl/test/test_table_cray.hdf5 b/hl/test/test_table_cray.h5
index d22dce3..d22dce3 100644
--- a/hl/test/test_table_cray.hdf5
+++ b/hl/test/test_table_cray.h5
Binary files differ
diff --git a/hl/test/test_table_le.hdf5 b/hl/test/test_table_le.h5
index 6c330fd..6c330fd 100644
--- a/hl/test/test_table_le.hdf5
+++ b/hl/test/test_table_le.h5
Binary files differ
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 28943d6..4887b6c 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_TOOLS)
#-----------------------------------------------------------------------------
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt
index 0a34677..3f8b9b7 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_PERFORM )
#-----------------------------------------------------------------------------
diff --git a/release_docs/CMake.txt b/release_docs/CMake.txt
index 1d36e21..8fb5f5e 100644
--- a/release_docs/CMake.txt
+++ b/release_docs/CMake.txt
@@ -39,7 +39,7 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires CMake version 2.8.6.
+ web site. The HDF5 1.8.x product requires CMake version 2.8.10.
2. If you plan to use Zlib or Szip;
A. Download the packages and install them
@@ -61,6 +61,15 @@ Notes: This short instruction is written for users who want to quickly build
where "some_location" is the URL or full path to the compressed file and
ext is the type of compression file.
+ 3. Building on Apple Darwin platforms should add the following options:
+ Compiler choice - use xcode by setting the ENV variables of CC and CXX
+ Shared fortran is not supported, build static:
+ BUILD_SHARED_LIBS:BOOL=OFF
+ Additional options:
+ CMAKE_ANSI_CFLAGS:STRING=-fPIC
+ CTEST_USE_LAUNCHERS:BOOL=ON
+ CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
+
========================================================================
Building HDF5 C/C++ Libraries with CMake
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index d6416f8..146f3e2 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.135 currently under development
+HDF5 version 1.9.141 currently under development
================================================================================
@@ -41,6 +41,7 @@ New Features
Configuration:
-------------
+ - CMake minimum is now 2.8.10. (ADB 2013/1/14)
- Fixed AIX Fortran compiler flags to use appropriate settings for
debugging, profiling, optimization situations. HDFFV-8069. (AKC
2012/09/27)
diff --git a/release_docs/USING_CMake.txt b/release_docs/USING_CMake.txt
index 71f2fcf..4397750 100644
--- a/release_docs/USING_CMake.txt
+++ b/release_docs/USING_CMake.txt
@@ -37,7 +37,7 @@ Notes: This short instruction is written for users who want to quickly build
========================================================================
1. We suggest you obtain the latest CMake for windows from the Kitware
- web site. The HDF5 1.8.x product requires CMake version 2.8.6 (minimum).
+ web site. The HDF5 1.8.x product requires CMake version 2.8.10 (minimum).
2. You have installed the HDF5 library built with CMake, by executing the
HDF Install Utility (The *.exe file in the binary package for Windows).
@@ -185,7 +185,7 @@ Notes: This short instruction is written for users who want to quickly build
9. Create a CMakeLists.txt file at the source root.
..........................................................................
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5MyApp C CXX)
FIND_PACKAGE (HDF5 REQURIED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 876711a..3048484 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_SRC C CXX)
#-----------------------------------------------------------------------------
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 7a06477..e3f060a 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -281,6 +281,108 @@ H5FL_DEFINE(H5D_chunk_info_t);
/* Declare a free list to manage the chunk sequence information */
H5FL_BLK_DEFINE_STATIC(chunk);
+
+/*-------------------------------------------------------------------------
+ * Function: H5D__chunk_direct_write
+ *
+ * Purpose: Internal routine to write a chunk
+ * directly into the file.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 30 July 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters, hsize_t *offset,
+ size_t data_size, const void *buf)
+{
+ const H5O_layout_t *layout = &(dset->shared->layout); /* Dataset layout */
+ H5D_chunk_ud_t udata; /* User data for querying chunk info */
+ hsize_t chunk_idx;
+ H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
+ H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
+ const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk); /*raw data chunk cache */
+ int space_ndims; /* Dataset's space rank */
+ hsize_t space_dim[H5O_LAYOUT_NDIMS]; /* Dataset's dataspace dimensions */
+ H5FD_t *lf;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_STATIC_TAG(dxpl_id, dset->oloc.addr, FAIL)
+
+ /* Allocate data space and initialize it if it hasn't been. */
+ if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
+ /* Allocate storage */
+ if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_WRITE, FALSE, NULL) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
+ } /* end if */
+
+
+ /* Retrieve the dataset dimensions */
+ if((space_ndims = H5S_get_simple_extent_dims(dset->shared->space, space_dim, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get simple dataspace info")
+
+ /* Calculate the index of this chunk */
+ if(H5V_chunk_index((unsigned)space_ndims, offset,
+ layout->u.chunk.dim, layout->u.chunk.down_chunks, &chunk_idx) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't get chunk index")
+
+ /* Find out the file address of the chunk */
+ if(H5D__chunk_lookup(dset, dxpl_id, offset, chunk_idx,
+ &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
+
+ udata.filter_mask = filters;
+
+ /* Check if the chunk needs to be 'inserted' (could exist already and
+ * the 'insert' operation could resize it)
+ */
+ {
+ H5D_chk_idx_info_t idx_info; /* Chunked index info */
+
+ /* Compose chunked index info struct */
+ idx_info.f = dset->oloc.file;
+ idx_info.dxpl_id = dxpl_id;
+ idx_info.pline = &(dset->shared->dcpl_cache.pline);
+ idx_info.layout = &(dset->shared->layout.u.chunk);
+ idx_info.storage = &(dset->shared->layout.storage.u.chunk);
+
+ /* Set up the size of chunk for user data */
+ udata.nbytes = data_size;
+
+ /* Create the chunk it if it doesn't exist, or reallocate the chunk
+ * if its size changed.
+ */
+ if((dset->shared->layout.storage.u.chunk.ops->insert)(&idx_info, &udata) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert/resize chunk")
+
+ /* Make sure the address of the chunk is returned. */
+ if(!H5F_addr_defined(udata.addr))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "chunk address isn't defined")
+ } /* end if */
+
+ /* Fill the DXPL cache values for later use */
+ if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
+
+ /* Evict the entry from the cache if present, but do not flush
+ * it to disk */
+ if(UINT_MAX != udata.idx_hint) {
+ if(H5D__chunk_cache_evict(dset, dxpl_id, dxpl_cache,
+ rdcc->slot[udata.idx_hint], FALSE) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to evict chunk")
+ } /* end if */
+
+ /* Write the data to the file */
+ if(H5F_block_write(dset->oloc.file, H5FD_MEM_DRAW, udata.addr, data_size, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data to file")
+
+
+done:
+ FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
+}
/*-------------------------------------------------------------------------
diff --git a/src/H5Dio.c b/src/H5Dio.c
index a37b4b3..e61205e 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -28,6 +28,8 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Sprivate.h" /* Dataspace */
#include "H5VLprivate.h" /* VOL plugins */
#ifdef H5_HAVE_PARALLEL
@@ -116,12 +118,15 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
{
H5VL_t *vol_plugin;
void *dset;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiiix", dset_id, mem_type_id, mem_space_id, file_space_id,
plist_id, buf);
+ if(mem_space_id < 0 || file_space_id < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
+
/* Get the default dataset transfer property list if the user didn't provide one */
if (H5P_DEFAULT == plist_id)
plist_id= H5P_DATASET_XFER_DEFAULT;
@@ -184,13 +189,15 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
{
H5VL_t *vol_plugin;
void *dset;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE6("e", "iiiii*x", dset_id, mem_type_id, mem_space_id, file_space_id,
dxpl_id, buf);
/* check arguments */
+ if(!dset_id)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
/* Get the default dataset transfer property list if the user didn't provide one */
if(H5P_DEFAULT == dxpl_id)
@@ -217,6 +224,97 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D__pre_write
+ *
+ * Purpose: Preparation for writing data.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Raymond Lu
+ * 2 November 2012
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5D__pre_write(H5D_t *dset, hid_t mem_type_id, const H5S_t *mem_space,
+ const H5S_t *file_space, hid_t dxpl_id, const void *buf)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ hbool_t direct_write = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Get the default dataset transfer property list if the user didn't provide one */
+ if(H5P_DEFAULT == dxpl_id)
+ dxpl_id= H5P_DATASET_XFER_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(dxpl_id, H5P_DATASET_XFER))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+ if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, &direct_write) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting flag for direct chunk write")
+
+ /* Direct chunk write */
+ if(direct_write) {
+ uint32_t direct_filters = 0;
+ hsize_t *direct_offset;
+ size_t direct_datasize = 0;
+ int ndims = 0;
+ hsize_t dims[H5O_LAYOUT_NDIMS];
+ hsize_t internal_offset[H5O_LAYOUT_NDIMS];
+ int i;
+
+ if(H5D_CHUNKED != dset->shared->layout.type)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
+
+ if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, &direct_filters) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting filter info for direct chunk write")
+
+ if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, &direct_offset) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting offset info for direct chunk write")
+
+ if(H5P_get(plist, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, &direct_datasize) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data size for direct chunk write")
+
+ /* The library's chunking code requires the offset terminates with a zero. So transfer the
+ * offset array to an internal offset array */
+ if((ndims = H5S_get_simple_extent_dims(dset->shared->space, dims, NULL)) < 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve dataspace extent dims")
+
+ for(i=0; i<ndims; i++) {
+ /* Make sure the offset doesn't exceed the dataset's dimensions */
+ if(direct_offset[i] > dims[i])
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset exceeds dimensions of dataset")
+
+ /* Make sure the offset fall right on a chunk's boundary */
+ if(direct_offset[i] % dset->shared->layout.u.chunk.dim[i])
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL, "offset doesn't fall on chunks's boundary")
+
+ internal_offset[i] = direct_offset[i];
+ }
+
+ /* Terminate the offset with a zero */
+ internal_offset[ndims] = 0;
+
+ /* write raw data */
+ if(H5D__chunk_direct_write(dset, dxpl_id, direct_filters, internal_offset, direct_datasize, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write chunk directly")
+ } else { /* Normal write */
+ /* write raw data */
+ if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__pre_write() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__read
*
* Purpose: Reads (part of) a DATASET into application memory BUF. See
diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h
index 3a2fc86..8baafe9 100644
--- a/src/H5Dprivate.h
+++ b/src/H5Dprivate.h
@@ -155,6 +155,8 @@ typedef struct H5D_copy_file_ud_t {
/* Library Private Prototypes */
/******************************/
/* Internal I/O routines */
+H5_DLL herr_t H5D__pre_write(H5D_t *dset, hid_t mem_type_id, const H5S_t *mem_space,
+ const H5S_t *file_space, hid_t dxpl_id, const void *buf);
H5_DLL herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
const H5S_t *file_space, hid_t dset_xfer_plist,
void *buf/*out*/);
@@ -185,5 +187,8 @@ H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_ad
H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
int indent, int fwidth, unsigned ndims);
+H5_DLL herr_t H5D__chunk_direct_write(const H5D_t *dset, hid_t dxpl_id, uint32_t filters,
+ hsize_t *offset, size_t data_size, const void *buf);
+
#endif /* _H5Dprivate_H */
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index c878d4a..523f2b2 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -34,6 +34,12 @@
#define H5D_CHUNK_CACHE_NBYTES_DEFAULT ((size_t) -1)
#define H5D_CHUNK_CACHE_W0_DEFAULT -1.
+/* Property names for H5LTDdirect_chunk_write */
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME "direct_chunk_flag"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME "direct_chunk_filters"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME "direct_chunk_offset"
+#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME "direct_chunk_datasize"
+
/*******************/
/* Public Typedefs */
/*******************/
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 07f4551..03cc15e 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -17,57 +17,40 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, August 10, 1999
*
- * Purpose: A driver which stores the HDF5 data in main memory using
- * only the HDF5 public API. This driver is useful for fast
- * access to small, temporary hdf5 files.
+ * Purpose: A driver which stores the HDF5 data in main memory using
+ * only the HDF5 public API. This driver is useful for fast
+ * access to small, temporary hdf5 files.
*/
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5FD_core_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDcore.h" /* Core file driver */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDcore.h" /* Core file driver */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_CORE_g = 0;
-/* Since Windows doesn't follow the rest of the world when it comes
- * to POSIX I/O types, some typedefs and constants are needed to avoid
- * making the code messy with #ifdefs.
- * NOTE: These are only used when writing data to the backing store on
- * file close.
- */
-#ifdef H5_HAVE_WIN32_API
-typedef unsigned int h5_core_io_t;
-typedef int h5_core_io_ret_t;
-static int H5_CORE_MAX_IO_BYTES_g = INT_MAX;
-#else
-/* Unix, everyone else */
-typedef size_t h5_core_io_t;
-typedef ssize_t h5_core_io_ret_t;
-static size_t H5_CORE_MAX_IO_BYTES_g = SSIZET_MAX;
-#endif /* H5_HAVE_WIN32_API */
-
-/* The description of a file belonging to this driver. The `eoa' and `eof'
+/* The description of a file belonging to this driver. The 'eoa' and 'eof'
* determine the amount of hdf5 address space in use and the high-water mark
* of the file (the current size of the underlying memory).
*/
typedef struct H5FD_core_t {
- H5FD_t pub; /*public stuff, must be first */
- char *name; /*for equivalence testing */
- unsigned char *mem; /*the underlying memory */
- haddr_t eoa; /*end of allocated region */
- haddr_t eof; /*current allocated size */
- size_t increment; /*multiples for mem allocation */
- hbool_t backing_store; /*write to file name on flush */
- int fd; /*backing store file descriptor */
+ H5FD_t pub; /* public stuff, must be first */
+ char *name; /* for equivalence testing */
+ unsigned char *mem; /* the underlying memory */
+ haddr_t eoa; /* end of allocated region */
+ haddr_t eof; /* current allocated size */
+ size_t increment; /* multiples for mem allocation */
+ hbool_t backing_store; /* write to file name on flush */
+ int fd; /* backing store file descriptor */
/* Information for determining uniqueness of a file with a backing store */
#ifndef H5_HAVE_WIN32_API
/* On most systems the combination of device and i-node number uniquely
@@ -100,44 +83,44 @@ typedef struct H5FD_core_t {
HANDLE hFile; /* Native windows file handle */
#endif /* H5_HAVE_WIN32_API */
- hbool_t dirty; /*changes not saved? */
- H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
+ hbool_t dirty; /* changes not saved? */
+ H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */
} H5FD_core_t;
/* Driver-specific file access properties */
typedef struct H5FD_core_fapl_t {
- size_t increment; /*how much to grow memory */
- hbool_t backing_store; /*write to file name on flush */
+ size_t increment; /* how much to grow memory */
+ hbool_t backing_store; /* write to file name on flush */
} H5FD_core_fapl_t;
/* Allocate memory in multiples of this size by default */
-#define H5FD_CORE_INCREMENT 8192
+#define H5FD_CORE_INCREMENT 8192
/* These macros check for overflow of various quantities. These macros
* assume that file_offset_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely in memory.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely in memory.
*/
-#define MAXADDR ((haddr_t)((~(size_t)0)-1))
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || (A) > (haddr_t)MAXADDR)
-#define SIZE_OVERFLOW(Z) ((Z) > (hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (size_t)((A)+(Z))<(size_t)(A))
+#define MAXADDR ((haddr_t)((~(size_t)0)-1))
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || (A) > (haddr_t)MAXADDR)
+#define SIZE_OVERFLOW(Z) ((Z) > (hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ HADDR_UNDEF==(A)+(Z) || \
+ (size_t)((A)+(Z))<(size_t)(A))
/* Prototypes */
static herr_t H5FD_core_term(void);
static void *H5FD_core_fapl_get(H5FD_t *_file);
static H5FD_t *H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_core_close(H5FD_t *_file);
static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_core_query(const H5FD_t *_f1, unsigned long *flags);
@@ -146,61 +129,58 @@ static herr_t H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_core_get_eof(const H5FD_t *_file);
static herr_t H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
+ size_t size, void *buf);
static herr_t H5FD_core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
+ size_t size, const void *buf);
static herr_t H5FD_core_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing);
static herr_t H5FD_core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_core_g = {
- "core", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /*fc_degree */
- H5FD_core_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- sizeof(H5FD_core_fapl_t), /*fapl_size */
- H5FD_core_fapl_get, /*fapl_get */
- NULL, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_core_open, /*open */
- H5FD_core_close, /*close */
- H5FD_core_cmp, /*cmp */
- H5FD_core_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_core_get_eoa, /*get_eoa */
- H5FD_core_set_eoa, /*set_eoa */
- H5FD_core_get_eof, /*get_eof */
- H5FD_core_get_handle, /*get_handle */
- H5FD_core_read, /*read */
- H5FD_core_write, /*write */
- H5FD_core_flush, /*flush */
- H5FD_core_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "core", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_core_term, /* terminate */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ sizeof(H5FD_core_fapl_t), /* fapl_size */
+ H5FD_core_fapl_get, /* fapl_get */
+ NULL, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_core_open, /* open */
+ H5FD_core_close, /* close */
+ H5FD_core_cmp, /* cmp */
+ H5FD_core_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_core_get_eoa, /* get_eoa */
+ H5FD_core_set_eoa, /* set_eoa */
+ H5FD_core_get_eof, /* get_eof */
+ H5FD_core_get_handle, /* get_handle */
+ H5FD_core_read, /* read */
+ H5FD_core_write, /* write */
+ H5FD_core_flush, /* flush */
+ H5FD_core_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
-/*--------------------------------------------------------------------------
-NAME
- H5FD_core_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_core_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_core_init currently).
-
---------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------
+ * Function: H5FD_core_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Success: The driver ID for the core driver.
+ * Failure: Negative.
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
H5FD_core_init_interface(void)
{
@@ -211,16 +191,15 @@ H5FD_core_init_interface(void)
/*-------------------------------------------------------------------------
- * Function: H5FD_core_init
- *
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Function: H5FD_core_init
*
- * Return: Success: The driver ID for the core driver.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Failure: Negative.
+ * Return: Success: The driver ID for the core driver.
+ * Failure: Negative.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -228,15 +207,15 @@ H5FD_core_init_interface(void)
hid_t
H5FD_core_init(void)
{
- hid_t ret_value=H5FD_CORE_g; /* Return value */
+ hid_t ret_value = H5FD_CORE_g; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
- if (H5I_VFL!=H5Iget_type(H5FD_CORE_g))
+ if(H5I_VFL != H5Iget_type(H5FD_CORE_g))
H5FD_CORE_g = H5FD_register(&H5FD_core_g,sizeof(H5FD_class_t),FALSE);
/* Set return value */
- ret_value=H5FD_CORE_g;
+ ret_value = H5FD_CORE_g;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -244,11 +223,11 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_core_term
+ * Function: H5FD_core_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Returns: Non-negative on success or negative on failure
+ * Returns: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
@@ -261,32 +240,32 @@ H5FD_core_term(void)
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Reset VFL ID */
- H5FD_CORE_g=0;
+ H5FD_CORE_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_core_term() */
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_core
+ * Function: H5Pset_fapl_core
*
- * Purpose: Modify the file access property list to use the H5FD_CORE
- * driver defined in this source file. The INCREMENT specifies
- * how much to grow the memory each time we need more.
+ * Purpose: Modify the file access property list to use the H5FD_CORE
+ * driver defined in this source file. The INCREMENT specifies
+ * how much to grow the memory each time we need more.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 19, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
{
- H5FD_core_fapl_t fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value;
+ H5FD_core_fapl_t fa;
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value;
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "izb", fapl_id, increment, backing_store);
@@ -306,26 +285,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_core
+ * Function: H5Pget_fapl_core
*
- * Purpose: Queries properties set by the H5Pset_fapl_core() function.
+ * Purpose: Queries properties set by the H5Pset_fapl_core() function.
*
- * Return: Success: Non-negative
+ * Return: SUCCEED/FAIL
*
- * Failure: Negative
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Pget_fapl_core(hid_t fapl_id, size_t *increment/*out*/,
- hbool_t *backing_store/*out*/)
+H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/)
{
- H5FD_core_fapl_t *fa;
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_core_fapl_t *fa;
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "ixx", fapl_id, increment, backing_store);
@@ -348,15 +324,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_fapl_get
+ * Function: H5FD_core_fapl_get
*
- * Purpose: Returns a copy of the file access properties.
+ * Purpose: Returns a copy of the file access properties.
*
- * Return: Success: Ptr to new file access properties.
+ * Return: Success: Ptr to new file access properties.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -364,9 +340,9 @@ done:
static void *
H5FD_core_fapl_get(H5FD_t *_file)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- H5FD_core_fapl_t *fa;
- void *ret_value; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t*)_file;
+ H5FD_core_fapl_t *fa;
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -377,7 +353,7 @@ H5FD_core_fapl_get(H5FD_t *_file)
fa->backing_store = (hbool_t)(file->fd >= 0);
/* Set return value */
- ret_value=fa;
+ ret_value = fa;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -385,36 +361,35 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_open
+ * Function: H5FD_core_open
*
- * Purpose: Create memory as an HDF5 file.
+ * Purpose: Create memory as an HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
static H5FD_t *
-H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- int o_flags;
- H5FD_core_t *file=NULL;
- H5FD_core_fapl_t *fa=NULL;
- H5P_genplist_t *plist; /* Property list pointer */
+ int o_flags;
+ H5FD_core_t *file = NULL;
+ H5FD_core_fapl_t *fa = NULL;
+ H5P_genplist_t *plist; /* Property list pointer */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
- h5_stat_t sb;
- int fd=-1;
- H5FD_file_image_info_t file_image_info;
- H5FD_t *ret_value;
+ h5_stat_t sb;
+ int fd = -1;
+ H5FD_file_image_info_t file_image_info;
+ H5FD_t *ret_value;
FUNC_ENTER_NOAPI_NOINIT
@@ -554,20 +529,23 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
/* Read in existing data, being careful of interrupted system calls,
* partial results, and the end of the file.
*/
+
+ uint8_t *mem = file->mem; /* memory pointer for writes */
+
while(size > 0) {
- h5_core_io_t bytes_in = 0; /* # of bytes to read */
- h5_core_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_CORE_MAX_IO_BYTES_g)
- bytes_in = H5_CORE_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_core_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
- bytes_read = HDread(file->fd, file->mem, bytes_in);
+ bytes_read = HDread(file->fd, mem, bytes_in);
} while(-1 == bytes_read && EINTR == errno);
if(-1 == bytes_read) { /* error */
@@ -575,12 +553,13 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id,
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', file->mem = %p, size = %lu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), file->mem, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', file->mem = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), file->mem, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_read >= 0);
HDassert((size_t)bytes_read <= size);
+ mem += bytes_read;
size -= (size_t)bytes_read;
} /* end while */
} /* end else */
@@ -596,15 +575,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_close
- *
- * Purpose: Closes the file.
+ * Function: H5FD_core_close
*
- * Return: Success: 0
+ * Purpose: Closes the file.
*
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -612,8 +589,8 @@ done:
static herr_t
H5FD_core_close(H5FD_t *_file)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t*)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -644,19 +621,19 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_cmp
+ * Function: H5FD_core_cmp
*
- * Purpose: Compares two files belonging to this driver by name. If one
- * file doesn't have a name then it is less than the other file.
- * If neither file has a name then the comparison is by file
- * address.
+ * Purpose: Compares two files belonging to this driver by name. If one
+ * file doesn't have a name then it is less than the other file.
+ * If neither file has a name then the comparison is by file
+ * address.
*
- * Return: Success: A value like strcmp()
+ * Return: Success: A value like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -664,9 +641,9 @@ done:
static int
H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_core_t *f1 = (const H5FD_core_t*)_f1;
- const H5FD_core_t *f2 = (const H5FD_core_t*)_f2;
- int ret_value = 0;
+ const H5FD_core_t *f1 = (const H5FD_core_t*)_f1;
+ const H5FD_core_t *f2 = (const H5FD_core_t*)_f2;
+ int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -728,15 +705,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_query
+ * Function: H5FD_core_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 7, 2008
*
*-------------------------------------------------------------------------
@@ -744,7 +720,7 @@ done:
static herr_t
H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -768,17 +744,15 @@ H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
/*-------------------------------------------------------------------------
- * Function: H5FD_core_get_eoa
+ * Function: H5FD_core_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
+ * Return: The end-of-address marker. (Can't fail)
*
- * Failure: HADDR_UNDEF
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
*-------------------------------------------------------------------------
@@ -786,7 +760,7 @@ H5FD_core_query(const H5FD_t * _file, unsigned long *flags /* out */)
static haddr_t
H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -795,17 +769,15 @@ H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
/*-------------------------------------------------------------------------
- * Function: H5FD_core_set_eoa
- *
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Function: H5FD_core_set_eoa
*
- * Return: Success: 0
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -813,8 +785,8 @@ H5FD_core_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
static herr_t
H5FD_core_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t*)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -829,19 +801,17 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_get_eof
+ * Function: H5FD_core_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the size of the underlying memory or the HDF5
- * end-of-address markers.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the size of the underlying memory or the HDF5
+ * end-of-address markers.
*
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the memory
- * or the HDF5 file.
+ * Return: End of file address, the first address past
+ * the end of the "file", either the memory
+ * or the HDF5 file. (Can't fail)
*
- * Failure: HADDR_UNDEF
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -849,7 +819,7 @@ done:
static haddr_t
H5FD_core_get_eof(const H5FD_t *_file)
{
- const H5FD_core_t *file = (const H5FD_core_t*)_file;
+ const H5FD_core_t *file = (const H5FD_core_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -860,9 +830,9 @@ H5FD_core_get_eof(const H5FD_t *_file)
/*-------------------------------------------------------------------------
* Function: H5FD_core_get_handle
*
- * Purpose: Returns the file handle of CORE file driver.
+ * Purpose: Gets the file handle of CORE file driver.
*
- * Returns: Non-negative if succeed or negative if fails.
+ * Returns: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sept. 16, 2002
@@ -873,7 +843,7 @@ static herr_t
H5FD_core_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
{
H5FD_core_t *file = (H5FD_core_t *)_file; /* core VFD info */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -918,26 +888,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_read
+ * Function: H5FD_core_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: SUCCEED. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Failure: FAIL, Contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+ size_t size, void *buf/*out*/)
{
H5FD_core_t *file = (H5FD_core_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
@@ -984,28 +953,25 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_write
+ * Function: H5FD_core_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: SUCCEED/FAIL
*
- * Failure: -1
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1044,7 +1010,7 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had
} /* end else */
#ifdef H5_CLEAR_MEMORY
-HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
+ HDmemset(x + file->eof, 0, (size_t)(new_eof - file->eof));
#endif /* H5_CLEAR_MEMORY */
file->mem = x;
@@ -1063,49 +1029,46 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_flush
- *
- * Purpose: Flushes the file to backing store if there is any and if the
- * dirty flag is set.
+ * Function: H5FD_core_flush
*
- * Return: Success: 0
+ * Purpose: Flushes the file to backing store if there is any and if the
+ * dirty flag is set.
*
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, October 15, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_core_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
{
- H5FD_core_t *file = (H5FD_core_t*)_file;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5FD_core_t *file = (H5FD_core_t*)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Write to backing store */
- if (file->dirty && file->fd>=0 && file->backing_store) {
+ if (file->dirty && file->fd >= 0 && file->backing_store) {
haddr_t size = file->eof;
unsigned char *ptr = file->mem;
- if (0!=HDlseek(file->fd, (off_t)0, SEEK_SET))
+ if(0 != HDlseek(file->fd, (off_t)0, SEEK_SET))
HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "error seeking in backing store")
while (size > 0) {
- h5_core_io_t bytes_in = 0; /* # of bytes to write */
- h5_core_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_CORE_MAX_IO_BYTES_g)
- bytes_in = H5_CORE_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_core_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, ptr, bytes_in);
@@ -1116,7 +1079,7 @@ H5FD_core_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing)
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', ptr = %p, size = %lu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "write to backing store failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', ptr = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->name, file->fd, myerrno, HDstrerror(myerrno), ptr, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_wrote > 0);
@@ -1136,42 +1099,40 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_truncate
+ * Function: H5FD_core_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
- * Addendum -- 12/2/11
- * For file images opened with the core file driver, it is
- * necessary that we avoid reallocating the core file driver's
- * buffer uneccessarily.
+ * Addendum -- 12/2/11
+ * For file images opened with the core file driver, it is
+ * necessary that we avoid reallocating the core file driver's
+ * buffer uneccessarily.
*
- * To this end, I have made the following functional changes
- * to this function.
+ * To this end, I have made the following functional changes
+ * to this function.
*
- * If we are closing, and there is no backing store, this
- * function becomes a no-op.
+ * If we are closing, and there is no backing store, this
+ * function becomes a no-op.
*
- * If we are closing, and there is backing store, we set the
- * eof to equal the eoa, and truncate the backing store to
- * the new eof
+ * If we are closing, and there is backing store, we set the
+ * eof to equal the eoa, and truncate the backing store to
+ * the new eof
*
- * If we are not closing, we realloc the buffer to size equal
- * to the smallest multiple of the allocation increment that
- * equals or exceeds the eoa and set the eof accordingly.
- * Note that we no longer truncate the backing store to the
- * new eof if applicable.
- * -- JRM
+ * If we are not closing, we realloc the buffer to size equal
+ * to the smallest multiple of the allocation increment that
+ * equals or exceeds the eoa and set the eof accordingly.
+ * Note that we no longer truncate the backing store to the
+ * new eof if applicable.
+ * -- JRM
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 7, 2008
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_core_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t closing)
{
@@ -1262,4 +1223,3 @@ H5FD_core_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_truncate() */
-
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 9f4abd3..81d050d 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -14,50 +14,35 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Monday, April 17, 2000
*
- * Purpose: The POSIX unbuffered file driver using only the HDF5 public
- * API and with a few optimizations: the lseek() call is made
- * only when the current file position is unknown or needs to be
- * changed based on previous I/O through this driver (don't mix
- * I/O from this driver with I/O from other parts of the
- * application to the same file).
- * With custom modifications...
+ * Purpose: The POSIX unbuffered file driver using only the HDF5 public
+ * API and with a few optimizations: the lseek() call is made
+ * only when the current file position is unknown or needs to be
+ * changed based on previous I/O through this driver (don't mix
+ * I/O from this driver with I/O from other parts of the
+ * application to the same file).
+ * With custom modifications...
*/
/* Interface initialization */
#define H5_INTERFACE_INIT_FUNC H5FD_log_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDlog.h" /* Logging file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDlog.h" /* Logging file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_LOG_g = 0;
-/* Since Windows doesn't follow the rest of the world when it comes
- * to POSIX I/O types, some typedefs and constants are needed to avoid
- * making the code messy with #ifdefs.
- */
-#ifdef H5_HAVE_WIN32_API
-typedef unsigned int h5_log_io_t;
-typedef int h5_log_io_ret_t;
-static int H5_LOG_MAX_IO_BYTES_g = INT_MAX;
-#else
-/* Unix, everyone else */
-typedef size_t h5_log_io_t;
-typedef ssize_t h5_log_io_ret_t;
-static size_t H5_LOG_MAX_IO_BYTES_g = SSIZET_MAX;
-#endif /* H5_HAVE_WIN32_API */
-
/* Driver-specific file access properties */
typedef struct H5FD_log_fapl_t {
char *logfile; /* Allocated log file name */
@@ -161,24 +146,23 @@ typedef struct H5FD_log_t {
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely by the second
+ * argument of the file seek function.
*/
-#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ HADDR_UNDEF==(A)+(Z) || \
+ (HDoff_t)((A)+(Z))<(HDoff_t)(A))
/* Prototypes */
static herr_t H5FD_log_term(void);
@@ -186,7 +170,7 @@ static void *H5FD_log_fapl_get(H5FD_t *file);
static void *H5FD_log_fapl_copy(const void *_old_fa);
static herr_t H5FD_log_fapl_free(void *_fa);
static H5FD_t *H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_log_close(H5FD_t *_file);
static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
@@ -196,9 +180,9 @@ static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_log_get_eof(const H5FD_t *_file);
static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
+ size_t size, void *buf);
static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
+ size_t size, const void *buf);
static herr_t H5FD_log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_log_g = {
@@ -240,19 +224,16 @@ static const H5FD_class_t H5FD_log_g = {
H5FL_DEFINE_STATIC(H5FD_log_t);
-/*--------------------------------------------------------------------------
-NAME
- H5FD_log_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_log_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_log_init currently).
-
---------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------
+ * Function: H5FD_log_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Success: The driver ID for the log driver.
+ * Failure: Negative.
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
H5FD_log_init_interface(void)
{
@@ -263,15 +244,15 @@ H5FD_log_init_interface(void)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_init
+ * Function: H5FD_log_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the log driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the log driver.
+ * Failure: Negative.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -295,11 +276,11 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_log_term
+ * Function: H5FD_log_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Returns: Non-negative on success or negative on failure
+ * Returns: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
@@ -319,15 +300,15 @@ H5FD_log_term(void)
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_log
+ * Function: H5Pset_fapl_log
*
- * Purpose: Modify the file access property list to use the H5FD_LOG
- * driver defined in this source file.
+ * Purpose: Modify the file access property list to use the H5FD_LOG
+ * driver defined in this source file.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 19, 1998
*
*-------------------------------------------------------------------------
*/
@@ -360,17 +341,17 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_get
+ * Function: H5FD_log_fapl_get
*
- * Purpose: Returns a file access property list which indicates how the
- * specified file is being accessed. The return list could be
- * used to access another file the same way.
+ * Purpose: Returns a file access property list which indicates how the
+ * specified file is being accessed. The return list could be
+ * used to access another file the same way.
*
- * Return: Success: Ptr to new file access property list with all
- * members copied from the file struct.
- * Failure: NULL
+ * Return: Success: Ptr to new file access property list with all
+ * members copied from the file struct.
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, April 20, 2000
*
*-------------------------------------------------------------------------
@@ -378,8 +359,8 @@ done:
static void *
H5FD_log_fapl_get(H5FD_t *_file)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- void *ret_value; /* Return value */
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -391,14 +372,14 @@ H5FD_log_fapl_get(H5FD_t *_file)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_copy
+ * Function: H5FD_log_fapl_copy
*
- * Purpose: Copies the log-specific file access properties.
+ * Purpose: Copies the log-specific file access properties.
*
- * Return: Success: Ptr to a new property list
- * Failure: NULL
+ * Return: Success: Ptr to a new property list
+ * Failure: NULL
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, April 20, 2000
*
*-------------------------------------------------------------------------
@@ -406,9 +387,9 @@ H5FD_log_fapl_get(H5FD_t *_file)
static void *
H5FD_log_fapl_copy(const void *_old_fa)
{
- const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa;
- H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
- void *ret_value; /* Return value */
+ const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa;
+ H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -442,14 +423,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_fapl_free
+ * Function: H5FD_log_fapl_free
*
- * Purpose: Frees the log-specific file access properties.
+ * Purpose: Frees the log-specific file access properties.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, April 20, 2000
*
*-------------------------------------------------------------------------
@@ -471,16 +451,16 @@ H5FD_log_fapl_free(void *_fa)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_open
+ * Function: H5FD_log_open
*
- * Purpose: Create and/or opens a file as an HDF5 file.
+ * Purpose: Create and/or opens a file as an HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
- * Failure: NULL
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -488,11 +468,11 @@ H5FD_log_fapl_free(void *_fa)
static H5FD_t *
H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_log_t *file = NULL;
- H5P_genplist_t *plist; /* Property list */
- H5FD_log_fapl_t *fa; /* File access property list information */
- int fd = (-1); /* File descriptor */
- int o_flags; /* Flags for open() call */
+ H5FD_log_t *file = NULL;
+ H5P_genplist_t *plist; /* Property list */
+ H5FD_log_fapl_t *fa; /* File access property list information */
+ int fd = -1; /* File descriptor */
+ int o_flags; /* Flags for open() call */
#ifdef H5_HAVE_WIN32_API
struct _BY_HANDLE_FILE_INFORMATION fileinfo;
#endif
@@ -501,8 +481,8 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
struct timeval open_timeval_diff;
struct timeval stat_timeval_diff;
#endif /* H5_HAVE_GETTIMEOFDAY */
- h5_stat_t sb;
- H5FD_t *ret_value; /* Return value */
+ h5_stat_t sb;
+ H5FD_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -679,14 +659,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_close
+ * Function: H5FD_log_close
*
- * Purpose: Closes an HDF5 file.
+ * Purpose: Closes an HDF5 file.
*
- * Return: Success: 0
- * Failure: -1, file not closed.
+ * Return: Success: SUCCEED
+ * Failure: FAIL, file not closed.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -827,16 +807,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_cmp
+ * Function: H5FD_log_cmp
*
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
+ * Purpose: Compares two files belonging to this driver using an
+ * arbitrary (but consistent) ordering.
*
- * Return: Success: A value like strcmp()
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Return: Success: A value like strcmp()
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -844,8 +824,8 @@ done:
static int
H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
- const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
+ const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
+ const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -888,15 +868,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_query
+ * Function: H5FD_log_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
*-------------------------------------------------------------------------
@@ -904,7 +883,7 @@ done:
static herr_t
H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
- const H5FD_log_t *file = (const H5FD_log_t *)_file;
+ const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -927,19 +906,18 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_alloc
+ * Function: H5FD_log_alloc
*
- * Purpose: Allocate file memory.
+ * Purpose: Allocate file memory.
*
- * Return: Success: Address of new memory
- * Failure: HADDR_UNDEF
+ * Return: Success: Address of new memory
+ * Failure: HADDR_UNDEF
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2000
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static haddr_t
H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, hsize_t size)
{
@@ -981,16 +959,16 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, hsize_t siz
/*-------------------------------------------------------------------------
- * Function: H5FD_log_get_eoa
+ * Function: H5FD_log_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
- * Failure: HADDR_UNDEF
+ * Return: Success: The end-of-address marker.
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
*-------------------------------------------------------------------------
@@ -998,7 +976,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, hsize_t siz
static haddr_t
H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
- const H5FD_log_t *file = (const H5FD_log_t *)_file;
+ const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -1007,16 +985,15 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_set_eoa
+ * Function: H5FD_log_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -1024,25 +1001,25 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
static herr_t
H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
if(file->fa.flags != 0) {
- if(H5F_addr_gt(addr, file->eoa) && H5F_addr_gt(addr, 0)) {
- hsize_t size = addr - file->eoa;
+ if(H5F_addr_gt(addr, file->eoa) && H5F_addr_gt(addr, 0)) {
+ hsize_t size = addr - file->eoa;
/* Retain the flavor of the space allocated by the extension */
- if(file->fa.flags & H5FD_LOG_FLAVOR) {
- HDassert(addr < file->iosize);
- H5_CHECK_OVERFLOW(size, hsize_t, size_t);
- HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
- } /* end if */
+ if(file->fa.flags & H5FD_LOG_FLAVOR) {
+ HDassert(addr < file->iosize);
+ H5_CHECK_OVERFLOW(size, hsize_t, size_t);
+ HDmemset(&file->flavor[file->eoa], (int)type, (size_t)size);
+ } /* end if */
/* Log the extension like an allocation */
- if(file->fa.flags & H5FD_LOG_ALLOC)
- HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
- } /* end if */
+ if(file->fa.flags & H5FD_LOG_ALLOC)
+ HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, flavors[type]);
+ } /* end if */
} /* end if */
file->eoa = addr;
@@ -1052,18 +1029,18 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
/*-------------------------------------------------------------------------
- * Function: H5FD_log_get_eof
+ * Function: H5FD_log_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the filesystem end-of-file or the HDF5 end-of-address
- * markers.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the filesystem end-of-file or the HDF5 end-of-address
+ * markers.
*
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the filesystem file
- * or the HDF5 file.
- * Failure: HADDR_UNDEF
+ * Return: Success: End of file address, the first address past
+ * the end of the "file", either the filesystem file
+ * or the HDF5 file.
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -1084,14 +1061,13 @@ H5FD_log_get_eof(const H5FD_t *_file)
*
* Purpose: Returns the file handle of LOG file driver.
*
- * Returns: Non-negative if succeed or negative if fails.
+ * Returns: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sept. 16, 2002
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_log_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void **file_handle)
{
@@ -1111,27 +1087,26 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_read
+ * Function: H5FD_log_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Return: Success: SUCCEED. Result is stored in caller-supplied
+ * buffer BUF.
+ * Failure: FAIL, Contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, void *buf/*out*/)
+ size_t size, void *buf/*out*/)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
size_t orig_size = size; /* Save the original size for later */
haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
@@ -1219,16 +1194,16 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
#endif /* H5_HAVE_GETTIMEOFDAY */
while(size > 0) {
- h5_log_io_t bytes_in = 0; /* # of bytes to read */
- h5_log_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_LOG_MAX_IO_BYTES_g)
- bytes_in = H5_LOG_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_log_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_read = HDread(file->fd, buf, bytes_in);
@@ -1242,7 +1217,7 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr
if(file->fa.flags & H5FD_LOG_LOC_READ)
HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
if(0 == bytes_read) {
@@ -1313,26 +1288,24 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_write
+ * Function: H5FD_log_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t addr,
- size_t size, const void *buf)
+ size_t size, const void *buf)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
+ H5FD_log_t *file = (H5FD_log_t *)_file;
size_t orig_size = size; /* Save the original size for later */
haddr_t orig_addr = addr;
#ifdef H5_HAVE_GETTIMEOFDAY
@@ -1425,16 +1398,16 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
#endif /* H5_HAVE_GETTIMEOFDAY */
while(size > 0) {
- h5_log_io_t bytes_in = 0; /* # of bytes to write */
- h5_log_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_LOG_MAX_IO_BYTES_g)
- bytes_in = H5_LOG_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_log_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, buf, bytes_in);
@@ -1448,7 +1421,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
if(file->fa.flags & H5FD_LOG_LOC_WRITE)
HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr, (orig_addr + orig_size) - 1, orig_size);
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_wrote > 0);
@@ -1518,25 +1491,23 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_log_truncate
+ * Function: H5FD_log_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_log_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
{
- H5FD_log_t *file = (H5FD_log_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_log_t *file = (H5FD_log_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -1597,4 +1568,3 @@ H5FD_log_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_truncate() */
-
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 866a2cf..295e3c9f 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -29,11 +29,6 @@
#include "H5FDmpi.h" /* Common MPI file driver */
#include "H5Pprivate.h" /* Property lists */
-/*
- * The view is set to this value
- */
-char H5FD_mpi_native_g[] = "native";
-
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h
index 4140671..dcb8df9 100644
--- a/src/H5FDmpi.h
+++ b/src/H5FDmpi.h
@@ -55,62 +55,9 @@ typedef enum H5FD_mpio_collective_opt_t {
H5FD_MPIO_INDIVIDUAL_IO /*zero is the default*/
} H5FD_mpio_collective_opt_t;
-
-#ifdef H5_HAVE_PARALLEL
-
-/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
-typedef struct H5FD_class_mpi_t {
- H5FD_class_t super; /* Superclass information & methods */
- int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
- int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
- MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
-} H5FD_class_mpi_t;
-#endif /* H5_HAVE_PARALLEL */
-
/* Include all the MPI VFL headers */
#include "H5FDmpio.h" /* MPI I/O file driver */
#include "H5FDmpiposix.h" /* MPI/posix I/O file driver */
-/* Macros */
-
-#ifdef H5_HAVE_PARALLEL
-/* ======== Temporary data transfer properties ======== */
-/* Definitions for memory MPI type property */
-#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
-/* Definitions for file MPI type property */
-#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
-
-/*
- * The view is set to this value
- */
-H5_DLLVAR char H5FD_mpi_native_g[];
-
-/* Function prototypes */
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* General routines */
-H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
-H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
-H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
- MPI_Comm *comm_new, MPI_Info *info_new);
-H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
-#ifdef NOT_YET
-H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
-H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
-#endif /* NOT_YET */
-H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype,
- MPI_Datatype *ftype);
-
-/* Driver specific methods */
-H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
-H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
-H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H5_HAVE_PARALLEL */
-
#endif /* H5FDmpi_H */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 2db77c9..878bf82 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -45,6 +45,11 @@
static hid_t H5FD_MPIO_g = 0;
/*
+ * The view is set to this value
+ */
+static char H5FD_mpi_native_g[] = "native";
+
+/*
* The description of a file belonging to this driver.
* The EOF value is only used just after the file is opened in order for the
* library to determine whether the file is empty, truncated, or okay. The MPIO
diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h
index fe2d11f..d836086 100644
--- a/src/H5FDmpio.h
+++ b/src/H5FDmpio.h
@@ -30,9 +30,6 @@
/* Macros */
-#define IS_H5FD_MPIO(f) /* (H5F_t *f) */ \
- (H5FD_MPIO==H5F_DRIVER_ID(f))
-
#ifdef H5_HAVE_PARALLEL
/*Turn on H5FDmpio_debug if H5F_DEBUG is on */
#ifdef H5F_DEBUG
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 092cd24..978494e 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -71,21 +71,6 @@
*/
static hid_t H5FD_MPIPOSIX_g = 0;
-/* Since Windows doesn't follow the rest of the world when it comes
- * to POSIX I/O types, some typedefs and constants are needed to avoid
- * making the code messy with #ifdefs.
- */
-#ifdef H5_HAVE_WIN32_API
-typedef unsigned int h5_mpiposix_io_t;
-typedef int h5_mpiposix_io_ret_t;
-static int H5_MPIPOSIX_MAX_IO_BYTES_g = INT_MAX;
-#else
-/* Unix, everyone else */
-typedef size_t h5_mpiposix_io_t;
-typedef ssize_t h5_mpiposix_io_ret_t;
-static size_t H5_MPIPOSIX_MAX_IO_BYTES_g = SSIZET_MAX;
-#endif /* H5_HAVE_WIN32_API */
-
/*
* The description of a file belonging to this driver.
* The EOF value is only used just after the file is opened in order for the
@@ -238,19 +223,16 @@ static const H5FD_class_mpi_t H5FD_mpiposix_g = {
};
-/*--------------------------------------------------------------------------
-NAME
- H5FD_mpiposix_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_mpiposix_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_mpiposix_init currently).
-
---------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------
+ * Function: H5FD_mpiposix_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Success: The driver ID for the mpiposix driver.
+ * Failure: Negative.
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
H5FD_mpiposix_init_interface(void)
{
@@ -1081,16 +1063,16 @@ H5FD_mpiposix_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
*/
while(size > 0) {
- h5_mpiposix_io_t bytes_in = 0; /* # of bytes to read */
- h5_mpiposix_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_MPIPOSIX_MAX_IO_BYTES_g)
- bytes_in = H5_MPIPOSIX_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_mpiposix_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_read = HDread(file->fd, buf, bytes_in);
@@ -1101,7 +1083,7 @@ H5FD_mpiposix_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
if(0 == bytes_read) {
@@ -1265,16 +1247,16 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
*/
while(size > 0) {
- h5_mpiposix_io_t bytes_in = 0; /* # of bytes to write */
- h5_mpiposix_io_ret_t bytes_wrote = -1; /* # of bytes actually written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes actually written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_MPIPOSIX_MAX_IO_BYTES_g)
- bytes_in = H5_MPIPOSIX_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_mpiposix_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, buf, bytes_in);
@@ -1285,7 +1267,7 @@ H5FD_mpiposix_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file write failed: time = %s, file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file write failed: time = %s, file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
if(0 == bytes_wrote) {
diff --git a/src/H5FDmpiposix.h b/src/H5FDmpiposix.h
index e3764e1..12ff206 100644
--- a/src/H5FDmpiposix.h
+++ b/src/H5FDmpiposix.h
@@ -31,9 +31,6 @@
/* Macros */
-#define IS_H5FD_MPIPOSIX(f) /* (H5F_t *f) */ \
- (H5FD_MPIPOSIX==H5F_DRIVER_ID(f))
-
#ifdef H5_HAVE_PARALLEL
/* Function prototypes */
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index 64b71d4..600cae1 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -39,6 +39,28 @@
/* Length of filename buffer */
#define H5FD_MAX_FILENAME_LEN 1024
+/* MPI based VFDs */
+#define IS_H5FD_MPIO(f) /* (H5F_t *f) */ \
+ (H5FD_MPIO==H5F_DRIVER_ID(f))
+
+#define IS_H5FD_MPIPOSIX(f) /* (H5F_t *f) */ \
+ (H5FD_MPIPOSIX==H5F_DRIVER_ID(f))
+
+#ifdef H5_HAVE_PARALLEL
+/* ======== Temporary data transfer properties ======== */
+/* Definitions for memory MPI type property */
+#define H5FD_MPI_XFER_MEM_MPI_TYPE_NAME "H5FD_mpi_mem_mpi_type"
+/* Definitions for file MPI type property */
+#define H5FD_MPI_XFER_FILE_MPI_TYPE_NAME "H5FD_mpi_file_mpi_type"
+
+/* Sub-class the H5FD_class_t to add more specific functions for MPI-based VFDs */
+typedef struct H5FD_class_mpi_t {
+ H5FD_class_t super; /* Superclass information & methods */
+ int (*get_rank)(const H5FD_t *file); /* Get the MPI rank of a process */
+ int (*get_size)(const H5FD_t *file); /* Get the MPI size of a communicator */
+ MPI_Comm (*get_comm)(const H5FD_t *file); /* Get the communicator for a file */
+} H5FD_class_mpi_t;
+#endif
/****************************/
/* Library Private Typedefs */
@@ -123,9 +145,28 @@ H5_DLL herr_t H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum);
H5_DLL herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle);
H5_DLL herr_t H5FD_set_base_addr(H5FD_t *file, haddr_t base_addr);
H5_DLL haddr_t H5FD_get_base_addr(const H5FD_t *file);
+
+/* Function prototypes for MPI based VFDs*/
#ifdef H5_HAVE_PARALLEL
+/* General routines */
+H5_DLL haddr_t H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off);
+H5_DLL herr_t H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/);
+H5_DLL herr_t H5FD_mpi_comm_info_dup(MPI_Comm comm, MPI_Info info,
+ MPI_Comm *comm_new, MPI_Info *info_new);
+H5_DLL herr_t H5FD_mpi_comm_info_free(MPI_Comm *comm, MPI_Info *info);
+#ifdef NOT_YET
+H5_DLL herr_t H5FD_mpio_wait_for_left_neighbor(H5FD_t *file);
+H5_DLL herr_t H5FD_mpio_signal_right_neighbor(H5FD_t *file);
+#endif /* NOT_YET */
+H5_DLL herr_t H5FD_mpi_setup_collective(hid_t dxpl_id, MPI_Datatype *btype,
+ MPI_Datatype *ftype);
H5_DLL herr_t H5FD_set_mpio_atomicity(H5FD_t *file, hbool_t flag);
H5_DLL herr_t H5FD_get_mpio_atomicity(H5FD_t *file, hbool_t *flag);
+
+/* Driver specific methods */
+H5_DLL int H5FD_mpi_get_rank(const H5FD_t *file);
+H5_DLL int H5FD_mpi_get_size(const H5FD_t *file);
+H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file);
#endif /* H5_HAVE_PARALLEL */
#endif /* !_H5FDprivate_H */
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 241609d..ca5127e 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -17,56 +17,41 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Thursday, July 29, 1999
*
- * Purpose: The POSIX unbuffered file driver using only the HDF5 public
- * API and with a few optimizations: the lseek() call is made
- * only when the current file position is unknown or needs to be
- * changed based on previous I/O through this driver (don't mix
- * I/O from this driver with I/O from other parts of the
- * application to the same file).
+ * Purpose: The POSIX unbuffered file driver using only the HDF5 public
+ * API and with a few optimizations: the lseek() call is made
+ * only when the current file position is unknown or needs to be
+ * changed based on previous I/O through this driver (don't mix
+ * I/O from this driver with I/O from other parts of the
+ * application to the same file).
*/
/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5FD_sec2_init_interface
+#define H5_INTERFACE_INIT_FUNC H5FD_sec2_init_interface
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDsec2.h" /* Sec2 file driver */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDsec2.h" /* Sec2 file driver */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The driver identification number, initialized at runtime */
static hid_t H5FD_SEC2_g = 0;
-/* Since Windows doesn't follow the rest of the world when it comes
- * to POSIX I/O types, some typedefs and constants are needed to avoid
- * making the code messy with #ifdefs.
- */
-#ifdef H5_HAVE_WIN32_API
-typedef unsigned int h5_sec2_io_t;
-typedef int h5_sec2_io_ret_t;
-static int H5_SEC2_MAX_IO_BYTES_g = INT_MAX;
-#else
-/* Unix, everyone else */
-typedef size_t h5_sec2_io_t;
-typedef ssize_t h5_sec2_io_ret_t;
-static size_t H5_SEC2_MAX_IO_BYTES_g = SSIZET_MAX;
-#endif /* H5_HAVE_WIN32_API */
-
-/* The description of a file belonging to this driver. The `eoa' and `eof'
+/* The description of a file belonging to this driver. The 'eoa' and 'eof'
* determine the amount of hdf5 address space in use and the high-water mark
* of the file (the current size of the underlying filesystem file). The
- * `pos' value is used to eliminate file position updates when they would be a
+ * 'pos' value is used to eliminate file position updates when they would be a
* no-op. Unfortunately we've found systems that use separate file position
* indicators for reading and writing so the lseek can only be eliminated if
* the current operation is the same as the previous operation. When opening
- * a file the `eof' will be set to the current file size, `eoa' will be set
- * to zero, `pos' will be set to H5F_ADDR_UNDEF (as it is when an error
- * occurs), and `op' will be set to H5F_OP_UNKNOWN.
+ * a file the 'eof' will be set to the current file size, `eoa' will be set
+ * to zero, 'pos' will be set to H5F_ADDR_UNDEF (as it is when an error
+ * occurs), and 'op' will be set to H5F_OP_UNKNOWN.
*/
typedef struct H5FD_sec2_t {
H5FD_t pub; /* public stuff, must be first */
@@ -123,29 +108,28 @@ typedef struct H5FD_sec2_t {
* These macros check for overflow of various quantities. These macros
* assume that HDoff_t is signed and haddr_t and size_t are unsigned.
*
- * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
- * is too large to be represented by the second argument
- * of the file seek function.
+ * ADDR_OVERFLOW: Checks whether a file address of type `haddr_t'
+ * is too large to be represented by the second argument
+ * of the file seek function.
*
- * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
- * large to be represented by the `size_t' type.
+ * SIZE_OVERFLOW: Checks whether a buffer size of type `hsize_t' is too
+ * large to be represented by the `size_t' type.
*
- * REGION_OVERFLOW: Checks whether an address and size pair describe data
- * which can be addressed entirely by the second
- * argument of the file seek function.
+ * REGION_OVERFLOW: Checks whether an address and size pair describe data
+ * which can be addressed entirely by the second
+ * argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
- ((A) & ~(haddr_t)MAXADDR))
-#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
-#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
- HADDR_UNDEF==(A)+(Z) || \
- (HDoff_t)((A)+(Z))<(HDoff_t)(A))
+#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
+#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
+#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
+ HADDR_UNDEF==(A)+(Z) || \
+ (HDoff_t)((A)+(Z))<(HDoff_t)(A))
/* Prototypes */
static herr_t H5FD_sec2_term(void);
static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
static herr_t H5FD_sec2_close(H5FD_t *_file);
static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
@@ -154,63 +138,60 @@ static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_sec2_get_eof(const H5FD_t *_file);
static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, void *buf);
+ size_t size, void *buf);
static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
- size_t size, const void *buf);
+ size_t size, const void *buf);
static herr_t H5FD_sec2_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static const H5FD_class_t H5FD_sec2_g = {
- "sec2", /*name */
- MAXADDR, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
- H5FD_sec2_term, /*terminate */
- NULL, /*sb_size */
- NULL, /*sb_encode */
- NULL, /*sb_decode */
- 0, /*fapl_size */
- NULL, /*fapl_get */
- NULL, /*fapl_copy */
- NULL, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_sec2_open, /*open */
- H5FD_sec2_close, /*close */
- H5FD_sec2_cmp, /*cmp */
- H5FD_sec2_query, /*query */
- NULL, /*get_type_map */
- NULL, /*alloc */
- NULL, /*free */
- H5FD_sec2_get_eoa, /*get_eoa */
- H5FD_sec2_set_eoa, /*set_eoa */
- H5FD_sec2_get_eof, /*get_eof */
- H5FD_sec2_get_handle, /*get_handle */
- H5FD_sec2_read, /*read */
- H5FD_sec2_write, /*write */
- NULL, /*flush */
- H5FD_sec2_truncate, /*truncate */
- NULL, /*lock */
- NULL, /*unlock */
- H5FD_FLMAP_DICHOTOMY /*fl_map */
+ "sec2", /* name */
+ MAXADDR, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+ H5FD_sec2_term, /* terminate */
+ NULL, /* sb_size */
+ NULL, /* sb_encode */
+ NULL, /* sb_decode */
+ 0, /* fapl_size */
+ NULL, /* fapl_get */
+ NULL, /* fapl_copy */
+ NULL, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD_sec2_open, /* open */
+ H5FD_sec2_close, /* close */
+ H5FD_sec2_cmp, /* cmp */
+ H5FD_sec2_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD_sec2_get_eoa, /* get_eoa */
+ H5FD_sec2_set_eoa, /* set_eoa */
+ H5FD_sec2_get_eof, /* get_eof */
+ H5FD_sec2_get_handle, /* get_handle */
+ H5FD_sec2_read, /* read */
+ H5FD_sec2_write, /* write */
+ NULL, /* flush */
+ H5FD_sec2_truncate, /* truncate */
+ NULL, /* lock */
+ NULL, /* unlock */
+ H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_sec2_t struct */
H5FL_DEFINE_STATIC(H5FD_sec2_t);
-/*--------------------------------------------------------------------------
-NAME
- H5FD_sec2_init_interface -- Initialize interface-specific information
-USAGE
- herr_t H5FD_sec2_init_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5FD_sec2_init currently).
-
---------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------
+ * Function: H5FD_sec2_init_interface
+ *
+ * Purpose: Initializes any interface-specific data or routines.
+ *
+ * Return: Success: The driver ID for the sec2 driver.
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
static herr_t
H5FD_sec2_init_interface(void)
{
@@ -221,15 +202,15 @@ H5FD_sec2_init_interface(void)
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_init
+ * Function: H5FD_sec2_init
*
- * Purpose: Initialize this driver by registering the driver with the
- * library.
+ * Purpose: Initialize this driver by registering the driver with the
+ * library.
*
- * Return: Success: The driver ID for the sec2 driver.
- * Failure: Negative.
+ * Return: Success: The driver ID for the sec2 driver.
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -253,11 +234,11 @@ done:
/*---------------------------------------------------------------------------
- * Function: H5FD_sec2_term
+ * Function: H5FD_sec2_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
- * Returns: Non-negative on success or negative on failure
+ * Returns: SUCCEED (Can't fail)
*
* Programmer: Quincey Koziol
* Friday, Jan 30, 2004
@@ -277,16 +258,16 @@ H5FD_sec2_term(void)
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_sec2
+ * Function: H5Pset_fapl_sec2
*
- * Purpose: Modify the file access property list to use the H5FD_SEC2
- * driver defined in this source file. There are no driver
- * specific properties.
+ * Purpose: Modify the file access property list to use the H5FD_SEC2
+ * driver defined in this source file. There are no driver
+ * specific properties.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
- * Thursday, February 19, 1998
+ * Programmer: Robb Matzke
+ * Thursday, February 19, 1998
*
*-------------------------------------------------------------------------
*/
@@ -310,16 +291,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_open
+ * Function: H5FD_sec2_open
*
- * Purpose: Create and/or opens a file as an HDF5 file.
+ * Purpose: Create and/or opens a file as an HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
- * Failure: NULL
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -435,14 +416,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_close
+ * Function: H5FD_sec2_close
*
- * Purpose: Closes an HDF5 file.
+ * Purpose: Closes an HDF5 file.
*
- * Return: Success: 0
- * Failure: -1, file not closed.
+ * Return: Success: SUCCEED
+ * Failure: FAIL, file not closed.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -450,8 +431,8 @@ done:
static herr_t
H5FD_sec2_close(H5FD_t *_file)
{
- H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_sec2_t *file = (H5FD_sec2_t *)_file;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@@ -471,16 +452,16 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_cmp
+ * Function: H5FD_sec2_cmp
*
- * Purpose: Compares two files belonging to this driver using an
- * arbitrary (but consistent) ordering.
+ * Purpose: Compares two files belonging to this driver using an
+ * arbitrary (but consistent) ordering.
*
- * Return: Success: A value like strcmp()
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Return: Success: A value like strcmp()
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -488,8 +469,8 @@ done:
static int
H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
- const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
+ const H5FD_sec2_t *f1 = (const H5FD_sec2_t *)_f1;
+ const H5FD_sec2_t *f2 = (const H5FD_sec2_t *)_f2;
int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -530,15 +511,14 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_query
+ * Function: H5FD_sec2_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
*-------------------------------------------------------------------------
@@ -569,21 +549,19 @@ H5FD_sec2_query(const H5FD_t *_file, unsigned long *flags /* out */)
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eoa
+ * Function: H5FD_sec2_get_eoa
*
- * Purpose: Gets the end-of-address marker for the file. The EOA marker
- * is the first address past the last byte allocated in the
- * format address space.
+ * Purpose: Gets the end-of-address marker for the file. The EOA marker
+ * is the first address past the last byte allocated in the
+ * format address space.
*
- * Return: Success: The end-of-address marker.
- * Failure: HADDR_UNDEF
+ * Return: The end-of-address marker.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 2, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static haddr_t
H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
{
@@ -596,21 +574,19 @@ H5FD_sec2_get_eoa(const H5FD_t *_file, H5FD_mem_t UNUSED type)
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_set_eoa
+ * Function: H5FD_sec2_set_eoa
*
- * Purpose: Set the end-of-address marker for the file. This function is
- * called shortly after an existing HDF5 file is opened in order
- * to tell the driver where the end of the HDF5 data is located.
+ * Purpose: Set the end-of-address marker for the file. This function is
+ * called shortly after an existing HDF5 file is opened in order
+ * to tell the driver where the end of the HDF5 data is located.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: SUCCEED (Can't fail)
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
{
@@ -625,18 +601,16 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_get_eof
+ * Function: H5FD_sec2_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the filesystem end-of-file or the HDF5 end-of-address
- * markers.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the filesystem end-of-file or the HDF5 end-of-address
+ * markers.
*
- * Return: Success: End of file address, the first address past
- * the end of the "file", either the filesystem file
- * or the HDF5 file.
- * Failure: HADDR_UNDEF
+ * Return: End of file address, the first address past the end of the
+ * "file", either the filesystem file or the HDF5 file.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
@@ -644,7 +618,7 @@ H5FD_sec2_set_eoa(H5FD_t *_file, H5FD_mem_t UNUSED type, haddr_t addr)
static haddr_t
H5FD_sec2_get_eof(const H5FD_t *_file)
{
- const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
+ const H5FD_sec2_t *file = (const H5FD_sec2_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -657,14 +631,13 @@ H5FD_sec2_get_eof(const H5FD_t *_file)
*
* Purpose: Returns the file handle of sec2 file driver.
*
- * Returns: Non-negative if succeed or negative if fails.
+ * Returns: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sept. 16, 2002
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_sec2_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void **file_handle)
{
@@ -684,22 +657,21 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_read
+ * Function: H5FD_sec2_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
- * Failure: -1, Contents of buffer BUF are undefined.
+ * Return: Success: SUCCEED. Result is stored in caller-supplied
+ * buffer BUF.
+ * Failure: FAIL, Contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
haddr_t addr, size_t size, void *buf /*out*/)
@@ -732,16 +704,16 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
*/
while(size > 0) {
- h5_sec2_io_t bytes_in = 0; /* # of bytes to read */
- h5_sec2_io_ret_t bytes_read = -1; /* # of bytes actually read */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to read */
+ h5_posix_io_ret_t bytes_read = -1; /* # of bytes actually read */
/* Trying to read more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_SEC2_MAX_IO_BYTES_g)
- bytes_in = H5_SEC2_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_sec2_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_read = HDread(file->fd, buf, bytes_in);
@@ -752,7 +724,7 @@ H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total read size = %llu, bytes this sub-read = %llu, bytes actually read = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_read, (unsigned long long)myoffset);
} /* end if */
if(0 == bytes_read) {
@@ -785,21 +757,19 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_write
+ * Function: H5FD_sec2_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
- * Failure: -1
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, July 29, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
haddr_t addr, size_t size, const void *buf)
@@ -831,16 +801,16 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
*/
while(size > 0) {
- h5_sec2_io_t bytes_in = 0; /* # of bytes to write */
- h5_sec2_io_ret_t bytes_wrote = -1; /* # of bytes written */
+ h5_posix_io_t bytes_in = 0; /* # of bytes to write */
+ h5_posix_io_ret_t bytes_wrote = -1; /* # of bytes written */
/* Trying to write more bytes than the return type can handle is
* undefined behavior in POSIX.
*/
- if(size > H5_SEC2_MAX_IO_BYTES_g)
- bytes_in = H5_SEC2_MAX_IO_BYTES_g;
+ if(size > H5_POSIX_MAX_IO_BYTES)
+ bytes_in = H5_POSIX_MAX_IO_BYTES;
else
- bytes_in = (h5_sec2_io_t)size;
+ bytes_in = (h5_posix_io_t)size;
do {
bytes_wrote = HDwrite(file->fd, buf, bytes_in);
@@ -851,7 +821,7 @@ H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id,
time_t mytime = HDtime(NULL);
HDoff_t myoffset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR);
- HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, size = %lu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long)size, (unsigned long long)myoffset);
+ HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, error message = '%s', buf = %p, total write size = %llu, bytes this sub-write = %llu, bytes actually written = %llu, offset = %llu", HDctime(&mytime), file->filename, file->fd, myerrno, HDstrerror(myerrno), buf, (unsigned long long)size, (unsigned long long)bytes_in, (unsigned long long)bytes_wrote, (unsigned long long)myoffset);
} /* end if */
HDassert(bytes_wrote > 0);
@@ -880,20 +850,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_sec2_truncate
+ * Function: H5FD_sec2_truncate
*
- * Purpose: Makes sure that the true file size is the same (or larger)
- * than the end-of-address.
+ * Purpose: Makes sure that the true file size is the same (or larger)
+ * than the end-of-address.
*
- * Return: Success: Non-negative
- * Failure: Negative
+ * Return: SUCCEED/FAIL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
-/* ARGSUSED */
static herr_t
H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
{
@@ -954,4 +922,3 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t UNUSED dxpl_id, hbool_t UNUSED closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_sec2_truncate() */
-
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 966528a..07d29f2 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -37,7 +37,6 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
-#include "H5FDmpi.h" /* MPI-based file drivers */
#include "H5FDprivate.h" /* File drivers */
#include "H5Iprivate.h" /* IDs */
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 04ff54a..552ea63 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -158,6 +158,15 @@
#define H5D_XFER_XFORM_COPY H5P__dxfr_xform_copy
#define H5D_XFER_XFORM_CMP H5P__dxfr_xform_cmp
#define H5D_XFER_XFORM_CLOSE H5P__dxfr_xform_close
+/* Definitions for properties of direct chunk write */
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_SIZE sizeof(hbool_t)
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_DEF FALSE
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_SIZE sizeof(uint32_t)
+#define H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_DEF 0
+#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_SIZE sizeof(hsize_t *)
+#define H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_DEF NULL
+#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_SIZE sizeof(size_t)
+#define H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_DEF 0
/******************/
/* Local Typedefs */
@@ -255,7 +264,10 @@ static const H5Z_EDC_t H5D_def_enable_edc_g = H5D_XFER_EDC_DEF; /* De
static const H5Z_cb_t H5D_def_filter_cb_g = H5D_XFER_FILTER_CB_DEF; /* Default value for filter callback */
static const H5T_conv_cb_t H5D_def_conv_cb_g = H5D_XFER_CONV_CB_DEF; /* Default value for datatype conversion callback */
static const void *H5D_def_xfer_xform_g = H5D_XFER_XFORM_DEF; /* Default value for data transform */
-
+static const hbool_t H5D_def_direct_chunk_flag_g = H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_DEF; /* Default value for the flag of direct chunk write */
+static const uint32_t H5D_def_direct_chunk_filters_g = H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_DEF; /* Default value for the filters of direct chunk write */
+static const hsize_t *H5D_def_direct_chunk_offset_g = H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_DEF; /* Default value for the offset of direct chunk write */
+static const size_t H5D_def_direct_chunk_datasize_g = H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_DEF; /* Default value for the datasize of direct chunk write */
/*-------------------------------------------------------------------------
@@ -426,6 +438,30 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass)
H5D_XFER_XFORM_DEL, H5D_XFER_XFORM_COPY, H5D_XFER_XFORM_CMP, H5D_XFER_XFORM_CLOSE) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ /* Register the property of flag for direct chunk write */
+ /* (Note: this property should not have an encode/decode callback -QAK) */
+ if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_NAME, H5D_XFER_DIRECT_CHUNK_WRITE_FLAG_SIZE, &H5D_def_direct_chunk_flag_g,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the property of filter for direct chunk write */
+ /* (Note: this property should not have an encode/decode callback -QAK) */
+ if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_NAME, H5D_XFER_DIRECT_CHUNK_WRITE_FILTERS_SIZE, &H5D_def_direct_chunk_filters_g,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the property of offset for direct chunk write */
+ /* (Note: this property should not have an encode/decode callback -QAK) */
+ if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_NAME, H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_SIZE, &H5D_def_direct_chunk_offset_g,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the property of datasize for direct chunk write */
+ /* (Note: this property should not have an encode/decode callback -QAK) */
+ if(H5P_register_real(pclass, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_NAME, H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_SIZE, &H5D_def_direct_chunk_datasize_g,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__dxfr_reg_prop() */
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 2903fc4..5900068 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1320,6 +1320,7 @@ H5VL_native_dataset_read(void *obj, hid_t mem_type_id, hid_t mem_space_id,
/* check arguments */
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+
if(H5S_ALL != mem_space_id) {
if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
@@ -1384,6 +1385,7 @@ H5VL_native_dataset_write(void *obj, hid_t mem_type_id, hid_t mem_space_id,
/* check arguments */
if(NULL == dset->oloc.file)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+
if(H5S_ALL != mem_space_id) {
if(NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
@@ -1411,9 +1413,8 @@ H5VL_native_dataset_write(void *obj, hid_t mem_type_id, hid_t mem_space_id,
if(!buf)
buf = &fake_char;
- /* write raw data */
- if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
+ if(H5D__pre_write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't prepare for writing data")
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 4158ee8..d9016dc 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -77,6 +77,9 @@
/* Define if the function stack tracing code is to be compiled in */
#undef HAVE_CODESTACK
+/* Define if Darwin or Mac OS X */
+#undef HAVE_DARWIN
+
/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
*/
#undef HAVE_DECL_TZNAME
diff --git a/src/H5private.h b/src/H5private.h
index 6eb3496..ef239b8 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -430,6 +430,24 @@
#define HSSIZET_MIN (~(HSSIZET_MAX))
/*
+ * Types and max sizes for POSIX I/O.
+ * OS X (Darwin) is odd since the max I/O size does not match the types.
+ */
+#if defined(H5_HAVE_WIN32_API)
+# define h5_posix_io_t unsigned int
+# define h5_posix_io_ret_t int
+# define H5_POSIX_MAX_IO_BYTES INT_MAX
+#elif defined(H5_HAVE_DARWIN)
+# define h5_posix_io_t size_t
+# define h5_posix_io_ret_t ssize_t
+# define H5_POSIX_MAX_IO_BYTES INT_MAX
+#else
+# define h5_posix_io_t size_t
+# define h5_posix_io_ret_t ssize_t
+# define H5_POSIX_MAX_IO_BYTES SSIZET_MAX
+#endif
+
+/*
* A macro to portably increment enumerated types.
*/
#ifndef H5_INC_ENUM
diff --git a/src/H5public.h b/src/H5public.h
index ad6f1ec..793d4df 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -75,10 +75,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 135 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 141 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.135" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.141" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
diff --git a/src/Makefile.in b/src/Makefile.in
index a344901..c9b6e3b 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -514,7 +514,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 125
+LT_VERS_REVISION = 131
LT_VERS_AGE = 0
H5detect_CFLAGS = -g $(AM_CFLAGS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5551fa3..aa92371 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TEST)
#-----------------------------------------------------------------------------
@@ -148,8 +148,8 @@ SET (HDF5_REFERENCE_TEST_FILES
tarrold.h5
tbad_msg_count.h5
tbogus.h5
- test_filters_be.hdf5
- test_filters_le.hdf5
+ test_filters_be.h5
+ test_filters_le.h5
th5s.h5
tlayouto.h5
tmtimen.h5
diff --git a/test/dsets.c b/test/dsets.c
index 3b081da..838ef48 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6571,7 +6571,7 @@ test_filters_endianess(void)
hid_t dsid=-1; /* dataset ID */
hid_t sid=-1; /* dataspace ID */
hid_t dcpl=-1; /* dataset creation property list ID */
- const char *data_file = H5_get_srcdir_filename("test_filters_le.hdf5"); /* Corrected test file name */
+ const char *data_file = H5_get_srcdir_filename("test_filters_le.h5"); /* Corrected test file name */
TESTING("filters with big-endian/little-endian data");
@@ -6596,7 +6596,7 @@ test_filters_endianess(void)
*/
/* compose the name of the file to open, using the srcdir, if appropriate */
- data_file = H5_get_srcdir_filename("test_filters_be.hdf5"); /* Corrected test file name */
+ data_file = H5_get_srcdir_filename("test_filters_be.h5"); /* Corrected test file name */
/* open */
if((fid = H5Fopen(data_file, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
diff --git a/test/test_filters_be.hdf5 b/test/test_filters_be.h5
index c4c127b..c4c127b 100644
--- a/test/test_filters_be.hdf5
+++ b/test/test_filters_be.h5
Binary files differ
diff --git a/test/test_filters_le.hdf5 b/test/test_filters_le.h5
index ff8b846..ff8b846 100644
--- a/test/test_filters_le.hdf5
+++ b/test/test_filters_le.h5
Binary files differ
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index e2b37ab..5f4fd47 100644
--- a/test/testfiles/err_compat_1
+++ b/test/testfiles/err_compat_1
@@ -57,6 +57,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed
major: Error API
minor: Write failed
- #002: (file name) line (number) in H5Dwrite(): not a dataset
+ #002: (file name) line (number) in H5Dwrite(): can't prepare for writing data
+ major: Dataset
+ minor: Write failed
+ #003: (file name) line (number) in H5D__pre_write(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
diff --git a/test/th5s.c b/test/th5s.c
index 87aa0f1..a026545 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -725,8 +725,8 @@ test_h5s_zero_dim(void)
ret = H5Pset_chunk(plist_id, SPACE1_RANK, chunk_dims);
CHECK(ret, FAIL, "H5Pset_chunk");
- // ret = H5Pset_alloc_time(plist_id, alloc_time);
- // CHECK(ret, FAIL, "H5Pset_alloc_time");
+ /* ret = H5Pset_alloc_time(plist_id, alloc_time); */
+ /* CHECK(ret, FAIL, "H5Pset_alloc_time"); */
dset1 = H5Dcreate2(fid1, BASICDATASET1, H5T_NATIVE_INT, sid_chunk, H5P_DEFAULT, plist_id, H5P_DEFAULT);
CHECK(dset1, FAIL, "H5Dcreate2");
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 88c47f5..cccb148 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TEST_PAR)
#-----------------------------------------------------------------------------
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index b48a1b9..3bb4a1f 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS)
#-----------------------------------------------------------------------------
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 95341a2..970cc12 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5COPY)
#-----------------------------------------------------------------------------
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index 994a6f2..87eca15 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5DIFF)
#-----------------------------------------------------------------------------
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index c3d3e1b..28b40b4 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5DUMP)
#-----------------------------------------------------------------------------
@@ -140,8 +140,11 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddl.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddlfile.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
@@ -185,9 +188,19 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddl.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddlfile.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt
${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
)
+ SET (HDF5_REFERENCE_EXP_FILES
+ tall-6.exp
+ tnoddlfile.exp
+ trawdatafile.exp
+ tstr2bin2.exp
+ tstr2bin6.exp
+ twithddlfile.exp
+ )
SET (HDF5_REFERENCE_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5
@@ -314,7 +327,7 @@ IF (BUILD_TESTING)
#
FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#MESSAGE (STATUS " Copying ${tst_h5_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -323,10 +336,24 @@ IF (BUILD_TESTING)
ARGS -E copy_if_different ${tst_h5_file} ${dest}
)
ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+ FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ IF (WIN32 AND NOT CYGWIN)
+ FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
+ FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
+ ELSE (WIN32 AND NOT CYGWIN)
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+ ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#MESSAGE (STATUS " Copying ${tst_other_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -338,7 +365,7 @@ IF (BUILD_TESTING)
FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
#MESSAGE (STATUS " Copying ${tst_error_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -348,15 +375,53 @@ IF (BUILD_TESTING)
)
ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ # --------------------------------------------------------------------
+ # Special file handling
+ # --------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
+ )
+
+ IF (WIN32 AND NOT CYGWIN)
+ FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
+ FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
+ ELSE (WIN32 AND NOT CYGWIN)
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+
#
# copy XML test files from source dir to test dir
#
SET (HDF5_XML_REFERENCE_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5
@@ -365,14 +430,28 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
)
SET (HDF5_XML_REFERENCE_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
@@ -442,7 +521,7 @@ IF (BUILD_TESTING)
FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
#MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -454,7 +533,7 @@ IF (BUILD_TESTING)
FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
#MESSAGE (STATUS " Copying ${tst_xml_other_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -463,28 +542,6 @@ IF (BUILD_TESTING)
ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
)
ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
-
- # --------------------------------------------------------------------
- # Special file handling
- # --------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/tbin1LE.ddl
- )
-
- IF (WIN32 AND NOT CYGWIN)
- FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
- FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/tbinregR.exp "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/tbinregR.exp
- )
- ENDIF (WIN32 AND NOT CYGWIN)
# --------------------------------------------------------------------
# Packed Bits
@@ -545,6 +602,11 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
)
+ SET (HDF5_REFERENCE_TEST_PBITS
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
+ )
SET (HDF5_ERROR_REFERENCE_PBITS
${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
@@ -561,9 +623,22 @@ IF (BUILD_TESTING)
${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
)
+ FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #MESSAGE (STATUS " Copying ${pbits_h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${pbits_h5_file} ${dest}
+ )
+ ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+
+
FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
#MESSAGE (STATUS " Copying ${ddl_pbits}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -575,7 +650,7 @@ IF (BUILD_TESTING)
FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
#MESSAGE (STATUS " Copying ${ddl_pbits}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
@@ -595,7 +670,7 @@ IF (BUILD_TESTING)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -606,13 +681,13 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
-E remove h5dump-${testname}.out h5dump-${testname}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-h5dump-${testname}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-h5dump-${testname}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=h5dump-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=h5dump-${testname}.txt"
@@ -639,7 +714,7 @@ IF (BUILD_TESTING)
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
@@ -653,13 +728,13 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
@@ -669,12 +744,56 @@ IF (BUILD_TESTING)
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
+ MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-${resultfile}")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-clear-${resultfile}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ ADD_TEST (
+ NAME H5DUMP-output-cmp-${resultfile}
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-output-cmp-${resultfile}")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_EXPORT file)
+
MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
ADD_TEST (
NAME H5DUMP-output-${resultfile}
- COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${targetfile}
+ COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
)
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -683,8 +802,9 @@ IF (BUILD_TESTING)
ADD_TEST (
NAME H5DUMP-output-cmp-${resultfile}
COMMAND ${CMAKE_COMMAND}
- -E compare_files ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.exp
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
)
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -699,13 +819,13 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
ADD_TEST (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
@@ -729,7 +849,7 @@ IF (BUILD_TESTING)
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
@@ -741,6 +861,40 @@ IF (BUILD_TESTING)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
+ MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-${resultfile}")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-clear-${resultfile}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_PBITS_TEST file)
+
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -757,7 +911,7 @@ IF (BUILD_TESTING)
MACRO (ADD_XML_H5_TEST resultfile resultcode)
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
@@ -771,13 +925,13 @@ IF (BUILD_TESTING)
COMMAND ${CMAKE_COMMAND}
-E remove ${resultfile}.out ${resultfile}.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-clear-${resultfile}-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
ADD_TEST (
NAME H5DUMP-XML-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=--xml;${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.xml"
@@ -822,6 +976,7 @@ IF (BUILD_TESTING)
tall-4s.out.err
tall-5s.out
tall-5s.out.err
+ tall-6.txt
tall-6.out
tall-6.out.err
tallfilters.out
@@ -984,6 +1139,13 @@ IF (BUILD_TESTING)
tnestedcmpddt.out.err
tnbit.out
tnbit.out.err
+ tnoddl.out
+ tnoddl.out.err
+ tnoddlfile.out
+ tnoddlfile.out.err
+ trawdatafile.out
+ trawdatafile.out.err
+ twithddlfile.txt
tno-subset.out
tno-subset.out.err
tnullspace.out
@@ -1044,6 +1206,8 @@ IF (BUILD_TESTING)
tstr-1.out.err
tstr-2.out
tstr-2.out.err
+ tstr2bin2.txt
+ tstr2bin6.txt
tstring.out
tstring.out.err
tstring2.out
@@ -1074,8 +1238,12 @@ IF (BUILD_TESTING)
tvms.out.err
twidedisplay.out
twidedisplay.out.err
+ twithddl.txt
+ twithddlfile.out
+ twithddlfile.out.err
+ twithddlfile.txt
)
- SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -1084,6 +1252,32 @@ IF (BUILD_TESTING)
ADD_HELP_TEST(help 0 -h)
+ # test data output redirection
+ ADD_H5_TEST (tnoddl 0 --enable-error-stack --redirect-ddl=NULL -y packedbits.h5)
+ ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
+ ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack --redirect-ddl=NULL -y -o)
+ ADD_TEST (
+ NAME H5DUMP-clear-twithddlfile-export
+ COMMAND ${CMAKE_COMMAND}
+ -E remove twithddl.txt
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-clear-twithddlfile-export PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-twithddlfile-export PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-clear-twithddlfile-export")
+ ADD_H5_TEST_EXPORT (twithddlfile packedbits.h5 0 --enable-error-stack --redirect-ddl=twithddl.txt -y -o)
+ ADD_TEST (
+ NAME H5DUMP-output-cmp-meta-twithddlfile
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files twithddl.txt twithddl.ddl
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-meta-twithddlfile PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-meta-twithddlfile PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-output-cmp-meta-twithddlfile")
+
# test for maximum display datasets
ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
@@ -1335,6 +1529,10 @@ IF (BUILD_TESTING)
# test for binary output
ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o out1LE.bin -b LE tbinary.h5)
+ # test for string binary output
+ ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o)
+ ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o)
+
# NATIVE default. the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST (tbin1 0 --enable-error-stack -d integer -o out1.bin -b tbinary.h5)
IF (NOT "${last_test}" STREQUAL "")
@@ -1343,26 +1541,26 @@ IF (BUILD_TESTING)
SET (last_test "H5DUMP-tbin1")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out1D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out1D.h5)
+ ADD_TEST (NAME H5DUMP-clear-out1D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out1D.h5)
SET_TESTS_PROPERTIES (H5DUMP-clear-out1D PROPERTIES DEPENDS H5DUMP-tbin1)
ADD_TEST (NAME H5DUMP-h5import-out1D COMMAND h5import out1.bin -c tbin1.out -o out1D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5import-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5import-out1D PROPERTIES DEPENDS H5DUMP-clear-out1D)
ADD_TEST (NAME H5DUMP-h5diff-out1D COMMAND h5diff tbinary.h5 out1D.h5 /integer /integer)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1D PROPERTIES DEPENDS H5DUMP-h5import-out1D)
SET (last_test "H5DUMP-h5diff-out1D")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out1.h5)
+ ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out1.h5)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clear-out1 PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
ADD_TEST (NAME H5DUMP-h5import-out1 COMMAND h5import out1.bin -c out3.h5import -o out1.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5import-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5import-out1 PROPERTIES DEPENDS H5DUMP-clear-out1)
ADD_TEST (NAME H5DUMP-h5diff-out1 COMMAND h5diff tbinary.h5 out1.h5 /integer /integer)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5diff-out1 PROPERTIES DEPENDS H5DUMP-h5import-out1)
SET (last_test "H5DUMP-h5diff-out1")
@@ -1382,26 +1580,26 @@ IF (BUILD_TESTING)
SET (last_test "H5DUMP-tbin3")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out3D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out3D.h5)
+ ADD_TEST (NAME H5DUMP-clear-out3D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out3D.h5)
SET_TESTS_PROPERTIES (H5DUMP-clear-out3D PROPERTIES DEPENDS H5DUMP-tbin3)
ADD_TEST (NAME H5DUMP-h5import-out3D COMMAND h5import out3.bin -c tbin3.out -o out3D.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5import-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5import-out3D PROPERTIES DEPENDS H5DUMP-clear-out3D)
ADD_TEST (NAME H5DUMP-h5diff-out3D COMMAND h5diff tbinary.h5 out3D.h5 /integer /integer -q)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3D PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3D PROPERTIES DEPENDS H5DUMP-h5import-out3D)
SET (last_test "H5DUMP-h5diff-out3D")
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/out3.h5)
+ ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/std/out3.h5)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clear-out3 PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
ADD_TEST (NAME H5DUMP-h5import-out3 COMMAND h5import out3.bin -c out3.h5import -o out3.h5)
- SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5import-out3 PROPERTIES DEPENDS H5DUMP-clear-out3)
ADD_TEST (NAME H5DUMP-h5diff-out3 COMMAND h5diff tbinary.h5 out3.h5 /integer /integer -q)
- SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-h5diff-out3 PROPERTIES DEPENDS H5DUMP-h5import-out3)
SET (last_test "H5DUMP-h5diff-out3")
@@ -1427,7 +1625,7 @@ IF (BUILD_TESTING)
out1.h5
out3.h5
)
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -1472,7 +1670,7 @@ IF (BUILD_TESTING)
ADD_H5ERR_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5)
# test for -o -y for dataset with attributes
- ADD_H5_TEST (tall-6 0 --enable-error-stack -y -o data -d /g1/g1.1/dset1.1.1 tall.h5)
+ ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o)
####### test for dataset packed bits ######
IF (HDF5_ENABLE_USING_MEMCHECKER)
@@ -1588,7 +1786,7 @@ IF (BUILD_TESTING)
tpbitsUnsignedLongLong16.out
tpbitsUnsignedLongLong16.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -1597,7 +1795,7 @@ IF (BUILD_TESTING)
# test failure handling
# Missing file name
- ADD_H5_TEST (tnofilename-with-packed-bits 1 --enable-error-stack)
+ ADD_H5_PBITS_TEST (tnofilename-with-packed-bits 1 --enable-error-stack)
# Limits:
# Maximum number of packed bits is 8 (for now).
# Maximum integer size is 8*sizeof(long long).
@@ -1607,72 +1805,72 @@ IF (BUILD_TESTING)
# Normal operation on both signed and unsigned int datasets.
# Sanity check
# Their rawdata output should be the same.
- ADD_H5_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5)
# Half sections
- ADD_H5_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5)
# Quarter sections
- ADD_H5_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
# Begin and End
- ADD_H5_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5)
- ADD_H5_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5)
- ADD_H5_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5)
# Overlapped packed bits.
- ADD_H5_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
# Maximum number of packed bits.
- ADD_H5_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
# Compound type.
- ADD_H5_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5)
+ ADD_H5_PBITS_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5)
# Array type.
- ADD_H5_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5)
+ ADD_H5_PBITS_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5)
# Test Error handling.
# Too many packed bits requested. Max is 8 for now.
- ADD_H5_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
# Offset too large. Max is 8*sizeof(long long.
- ADD_H5_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5)
- ADD_H5_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5)
- ADD_H5_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5)
- ADD_H5_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5)
# Bad offset, must not be negative.
- ADD_H5_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5)
# Bad length, must not be positive.
- ADD_H5_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5)
# Offset+Length is too large. Max is 8*sizeof(long long).
- ADD_H5_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5)
- ADD_H5_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5)
- ADD_H5_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5)
- ADD_H5_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5)
# Incomplete pair of packed bits request.
- ADD_H5_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
IF (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
@@ -1809,7 +2007,7 @@ IF (BUILD_TESTING)
tvlstr.h5.out
tvlstr.h5.out.err
)
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 8a2483b..88ec698 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -56,8 +56,8 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
-TESTDIR=./testfiles
-test -d $TESTDIR || mkdir $TESTDIR
+TESTDIR=./testfiles/std
+test -d $TESTDIR || mkdir -p $TESTDIR
######################################################################
# test files
@@ -160,7 +160,6 @@ $SRC_H5DUMP_TESTFILES/tvldtypes4.h5
$SRC_H5DUMP_TESTFILES/tvldtypes5.h5
$SRC_H5DUMP_TESTFILES/tvlstr.h5
$SRC_H5DUMP_TESTFILES/tvms.h5
-$SRC_H5DUMP_TESTFILES/twidedisplay.ddl
"
LIST_OTHER_TEST_FILES="
@@ -176,6 +175,7 @@ $SRC_H5DUMP_TESTFILES/tall-3.ddl
$SRC_H5DUMP_TESTFILES/tall-4s.ddl
$SRC_H5DUMP_TESTFILES/tall-5s.ddl
$SRC_H5DUMP_TESTFILES/tall-6.ddl
+$SRC_H5DUMP_TESTFILES/tall-6.exp
$SRC_H5DUMP_TESTFILES/tallfilters.ddl
$SRC_H5DUMP_TESTFILES/tarray1.ddl
$SRC_H5DUMP_TESTFILES/tarray1_big.ddl
@@ -261,8 +261,13 @@ $SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.ddl
$SRC_H5DUMP_TESTFILES/tnestcomp-1.ddl
$SRC_H5DUMP_TESTFILES/tnestedcmpddt.ddl
$SRC_H5DUMP_TESTFILES/tnbit.ddl
+$SRC_H5DUMP_TESTFILES/tnoddl.ddl
+$SRC_H5DUMP_TESTFILES/tnoddlfile.ddl
+$SRC_H5DUMP_TESTFILES/tnoddlfile.exp
$SRC_H5DUMP_TESTFILES/tno-subset.ddl
$SRC_H5DUMP_TESTFILES/tnullspace.ddl
+$SRC_H5DUMP_TESTFILES/trawdatafile.ddl
+$SRC_H5DUMP_TESTFILES/trawdatafile.exp
$SRC_H5DUMP_TESTFILES/zerodim.ddl
$SRC_H5DUMP_TESTFILES/tordergr1.ddl
$SRC_H5DUMP_TESTFILES/tordergr2.ddl
@@ -291,6 +296,8 @@ $SRC_H5DUMP_TESTFILES/tslink-D.ddl
$SRC_H5DUMP_TESTFILES/tsplit_file.ddl
$SRC_H5DUMP_TESTFILES/tstr-1.ddl
$SRC_H5DUMP_TESTFILES/tstr-2.ddl
+$SRC_H5DUMP_TESTFILES/tstr2bin2.exp
+$SRC_H5DUMP_TESTFILES/tstr2bin6.exp
$SRC_H5DUMP_TESTFILES/tstring.ddl
$SRC_H5DUMP_TESTFILES/tstring2.ddl
$SRC_H5DUMP_TESTFILES/tstringe.ddl
@@ -305,6 +312,10 @@ $SRC_H5DUMP_TESTFILES/tvldtypes4.ddl
$SRC_H5DUMP_TESTFILES/tvldtypes5.ddl
$SRC_H5DUMP_TESTFILES/tvlstr.ddl
$SRC_H5DUMP_TESTFILES/tvms.ddl
+$SRC_H5DUMP_TESTFILES/twidedisplay.ddl
+$SRC_H5DUMP_TESTFILES/twithddl.ddl
+$SRC_H5DUMP_TESTFILES/twithddlfile.ddl
+$SRC_H5DUMP_TESTFILES/twithddlfile.exp
$SRC_H5DUMP_TESTFILES/h5dump-help.txt
$SRC_H5DUMP_TESTFILES/out3.h5import
$SRC_H5DUMP_TESTFILES/tbinregR.exp
@@ -387,7 +398,7 @@ TESTING() {
# the actual output file is calculated by replacing the `.ddl' with
# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
# non-zero value.
-#
+# ADD_H5_TEST
TOOLTEST() {
expect="$TESTDIR/$1"
actual="$TESTDIR/`basename $1 .ddl`.out"
@@ -434,6 +445,7 @@ TOOLTEST() {
# same as TOOLTEST1 but compares generated file to expected output
# and compares the generated data file to the expected data file
# used for the binary tests that expect a full path in -o without -b
+# ADD_H5_EXPORT_TEST
TOOLTEST2() {
expectdata="$TESTDIR/$1"
@@ -482,6 +494,111 @@ TOOLTEST2() {
}
+# same as TOOLTEST2 but compares generated file to expected ddl file
+# and compares the generated data file to the expected data file
+# used for the binary tests that expect a full path in -o without -b
+# ADD_H5_TEST_EXPORT
+TOOLTEST2A() {
+
+ expectdata="$TESTDIR/$1"
+ expect="$TESTDIR/`basename $1 .exp`.ddl"
+ actualdata="$TESTDIR/`basename $1 .exp`.txt"
+ actual="$TESTDIR/`basename $1 .exp`.out"
+ actual_err="$TESTDIR/`basename $1 .exp`.err"
+ shift
+ expectmeta="$TESTDIR/$1"
+ actualmeta="$TESTDIR/`basename $1 .ddl`.txt"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ elif $CMP $expectdata $actualdata; then
+ if [ ! -f $expectmeta ]; then
+ # Create the expect meta file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualmeta $expectmeta
+ elif $CMP $expectmeta $actualmeta; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected metafile (*.ddl) differs from actual metafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectmeta $actualmeta |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actualdata $actual_err $actualmeta
+ fi
+
+}
+
+# same as TOOLTEST2 but only compares the generated data file to the expected data file
+# used for the binary tests that expect a full path in -o with -b
+# ADD_H5_EXPORT_TEST
+TOOLTEST2B() {
+
+ expectdata="$TESTDIR/$1"
+ actualdata="$TESTDIR/`basename $1 .exp`.txt"
+ actual="$TESTDIR/`basename $1 .exp`.out"
+ actual_err="$TESTDIR/`basename $1 .exp`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ if [ ! -f $expectdata ]; then
+ # Create the expect data file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actualdata $expectdata
+ elif $CMP $expectdata $actualdata; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actualdata $actual_err
+ fi
+
+}
+
# same as TOOLTEST but filters error stack outp
# Extract file name, line number, version and thread IDs because they may be different
TOOLTEST3() {
@@ -539,6 +656,7 @@ TOOLTEST3() {
# same as TOOLTEST3 but filters error stack output and compares to an error file
# Extract file name, line number, version and thread IDs because they may be different
+# ADD_H5ERR_MASK_TEST
TOOLTEST4() {
expect="$TESTDIR/$1"
@@ -669,7 +787,7 @@ IMPORTTEST()
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
# prepare for test
@@ -677,6 +795,12 @@ COPY_TESTFILES_TO_TESTDIR
#TOOLTEST h5dump-help.txt -h
+# test data output redirection
+#TOOLTEST tnoddl.ddl --enable-error-stack --ddl=NULL -y packedbits.h5
+#TOOLTEST2 trawdatafile.exp --enable-error-stack -y -o trawdatafile.txt packedbits.h5
+#TOOLTEST2 tnoddlfile.exp --enable-error-stack --ddl=NULL -y -o tnoddlfile.txt packedbits.h5
+#TOOLTEST2A twithddlfile.exp twithddl.ddl --enable-error-stack --ddl=twithddl.txt -y -o twithddlfile.txt packedbits.h5
+
# test for maximum display datasets
TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5
@@ -783,7 +907,7 @@ TOOLTEST tarray8.ddl --enable-error-stack tarray8.h5
# test for wildcards in filename (does not work with cmake)
# inconsistent across platforms TOOLTEST3 tstarfile.ddl --enable-error-stack -H -d Dataset1 tarr*.h5
-TOOLTEST4 tqmarkfile.ddl --enable-error-stack -H -d Dataset1 tarray?.h5
+#TOOLTEST4 tqmarkfile.ddl --enable-error-stack -H -d Dataset1 tarray?.h5
TOOLTEST tmultifile.ddl --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5
# test for files with empty data
@@ -924,17 +1048,21 @@ TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5
TOOLTEST tvms.ddl --enable-error-stack tvms.h5
# test for binary output
-TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b LE tbinary.h5
+TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b LE tbinary.h5
+
+# test for string binary output
+TOOLTEST2B tstr2bin2.exp --enable-error-stack -d /g2/dset2 -b -o tstr2bin2.txt tstr2.h5
+TOOLTEST2B tstr2bin6.exp --enable-error-stack -d /g6/dset6 -b -o tstr2bin6.txt tstr2.h5
# NATIVE default. the NATIVE test can be validated with h5import/h5diff
-TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b tbinary.h5
+TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b tbinary.h5
IMPORTTEST out1.bin -c out3.h5import -o out1.h5
DIFFTEST tbinary.h5 out1.h5 /integer /integer
# Same but use h5dump as input to h5import
IMPORTTEST out1.bin -c tbin1.ddl -o out1D.h5
DIFFTEST tbinary.h5 out1D.h5 /integer /integer
-TOOLTEST tbin2.ddl --enable-error-stack -b BE -d float -o out2.bin tbinary.h5
+TOOLTEST tbin2.ddl --enable-error-stack -b BE -d float -o out2.bin tbinary.h5
# the NATIVE test can be validated with h5import/h5diff
TOOLTEST tbin3.ddl --enable-error-stack -d integer -o out3.bin -b NATIVE tbinary.h5
@@ -954,12 +1082,11 @@ if test -z "$HDF5_NOCLEANUP"; then
fi
# test for dataset region references
-TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
+TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5
-TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
+TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5
-
-TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
+TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
# Clean up text output files
if test -z "$HDF5_NOCLEANUP"; then
@@ -998,7 +1125,7 @@ TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
-TOOLTEST tall-6.ddl --enable-error-stack -y -o data -d /g1/g1.1/dset1.1.1 tall.h5
+TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5
# Report test results and exit
diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in
index a390766..8e8e0c0 100644
--- a/tools/h5dump/testh5dumppbits.sh.in
+++ b/tools/h5dump/testh5dumppbits.sh.in
@@ -64,8 +64,8 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
-TESTDIR=./testfiles
-test -d $TESTDIR || mkdir $TESTDIR
+TESTDIR=./testfiles/pbits
+test -d $TESTDIR || mkdir -p $TESTDIR
######################################################################
# test files
diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in
index 374f504..a70d31c 100644
--- a/tools/h5dump/testh5dumpxml.sh.in
+++ b/tools/h5dump/testh5dumpxml.sh.in
@@ -50,8 +50,8 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
-TESTDIR=./testfiles
-test -d $TESTDIR || mkdir $TESTDIR
+TESTDIR=./testfiles/xml
+test -d $TESTDIR || mkdir -p $TESTDIR
######################################################################
# test files
@@ -223,6 +223,9 @@ TESTING() {
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
+# Source in the output filter function definitions.
+. $srcdir/../../bin/output_filter.sh
+
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
# difference between the actual output and the expected output. The
@@ -232,18 +235,17 @@ TESTING() {
# non-zero value.
#
TOOLTEST() {
- expect="$srcdir/../testfiles/$1"
- actual="../testfiles/`basename $1 .ddl`.out"
- actual_err="../testfiles/`basename $1 .ddl`.err"
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .xml`.out"
+ actual_err="$TESTDIR/`basename $1 .xml`.err"
shift
- # Run test.
- TESTING $DUMPER $@
- (
- cd $srcdir/../testfiles
- $RUNSERIAL $DUMPER_BIN $@
- ) >$actual 2>$actual_err
- cat $actual_err >> $actual
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
if [ ! -f $expect ]; then
@@ -254,7 +256,7 @@ TOOLTEST() {
echo " PASSED"
else
echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
@@ -277,6 +279,8 @@ SKIP() {
### T H E T E S T S ###
##############################################################################
##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
# test XML
TOOLTEST tall.h5.xml --xml tall.h5
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index bc47244..235cb9f 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5IMPORT)
#-----------------------------------------------------------------------------
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index b44e734..437fed3 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5JAM)
#-----------------------------------------------------------------------------
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index e2b3285..5cce6cb 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5LS)
#-----------------------------------------------------------------------------
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 7351fd5..7166357 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5REPACK)
#-----------------------------------------------------------------------------
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 3518cfd..9afb365 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_H5STAT)
#-----------------------------------------------------------------------------
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 7f7b451..f0d0d01 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_LIB)
#-----------------------------------------------------------------------------
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 7b6098d..3e29cbd 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1133,7 +1133,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
}
for (i = 0; i < size && (s[i] || pad != H5T_STR_NULLTERM); i++) {
HDmemcpy(&tempuchar, &s[i], sizeof(unsigned char));
- if (1 != HDfwrite(&tempuchar, size, 1, stream))
+ if (1 != HDfwrite(&tempuchar, sizeof(unsigned char), 1, stream))
H5E_THROW(FAIL, H5E_tools_min_id_g, "fwrite failed");
} /* i */
} /* for (block_index = 0; block_index < block_nelmts; block_index++) */
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 909b2ca..d310d3d 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8.6)
+cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_TOOLS_MISC)
#-----------------------------------------------------------------------------
diff --git a/tools/testfiles/tall-6.exp b/tools/testfiles/tall-6.exp
new file mode 100644
index 0000000..8580cd6
--- /dev/null
+++ b/tools/testfiles/tall-6.exp
@@ -0,0 +1,11 @@
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
+ 0, 3, 6, 9, 12, 15, 18, 21, 24, 27,
+ 0, 4, 8, 12, 16, 20, 24, 28, 32, 36,
+ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45,
+ 0, 6, 12, 18, 24, 30, 36, 42, 48, 54,
+ 0, 7, 14, 21, 28, 35, 42, 49, 56, 63,
+ 0, 8, 16, 24, 32, 40, 48, 56, 64, 72,
+ 0, 9, 18, 27, 36, 45, 54, 63, 72, 81 \ No newline at end of file
diff --git a/tools/testfiles/tnoddl.ddl b/tools/testfiles/tnoddl.ddl
new file mode 100644
index 0000000..dc19888
--- /dev/null
+++ b/tools/testfiles/tnoddl.ddl
@@ -0,0 +1,402 @@
+
+ -1, -2, -4, -8, -16, -32, -64, -128,
+ -2, -4, -8, -16, -32, -64, -128, 0,
+ -4, -8, -16, -32, -64, -128, 0, 0,
+ -8, -16, -32, -64, -128, 0, 0, 0,
+ -16, -32, -64, -128, 0, 0, 0, 0,
+ -32, -64, -128, 0, 0, 0, 0, 0,
+ -64, -128, 0, 0, 0, 0, 0, 0,
+ -128, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0,
+ 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0,
+ 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, -4294967296, -8589934592, -17179869184,
+ -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0
+ 255, 254, 252, 248, 240, 224, 192, 128,
+ 254, 252, 248, 240, 224, 192, 128, 0,
+ 252, 248, 240, 224, 192, 128, 0, 0,
+ 248, 240, 224, 192, 128, 0, 0, 0,
+ 240, 224, 192, 128, 0, 0, 0, 0,
+ 224, 192, 128, 0, 0, 0, 0, 0,
+ 192, 128, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0
+ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ 64512, 63488, 61440, 57344, 49152, 32768,
+ 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ 63488, 61440, 57344, 49152, 32768, 0,
+ 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ 61440, 57344, 49152, 32768, 0, 0,
+ 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ 57344, 49152, 32768, 0, 0, 0,
+ 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ 49152, 32768, 0, 0, 0, 0,
+ 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ 32768, 0, 0, 0, 0, 0,
+ 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768,
+ 0, 0, 0, 0, 0, 0,
+ 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ 0, 0, 0, 0
+ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648,
+ 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0,
+ 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648,
+ 0, 0,
+ 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0,
+ 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0,
+ 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0, 0, 0, 0, 0, 0, 0
+ 18446744073709551615, 18446744073709551614, 18446744073709551612,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808,
+ 18446744073709551614, 18446744073709551612, 18446744073709551608,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0,
+ 18446744073709551612, 18446744073709551608, 18446744073709551600,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0, 0, 0, 0,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0, 0, 0, 0
+ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007,
+ 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007,
+ 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007,
+ 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007,
+ 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007,
+ 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007,
+ 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007,
+ 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 \ No newline at end of file
diff --git a/tools/testfiles/tnoddlfile.ddl b/tools/testfiles/tnoddlfile.ddl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/testfiles/tnoddlfile.ddl
diff --git a/tools/testfiles/tnoddlfile.exp b/tools/testfiles/tnoddlfile.exp
new file mode 100644
index 0000000..dc19888
--- /dev/null
+++ b/tools/testfiles/tnoddlfile.exp
@@ -0,0 +1,402 @@
+
+ -1, -2, -4, -8, -16, -32, -64, -128,
+ -2, -4, -8, -16, -32, -64, -128, 0,
+ -4, -8, -16, -32, -64, -128, 0, 0,
+ -8, -16, -32, -64, -128, 0, 0, 0,
+ -16, -32, -64, -128, 0, 0, 0, 0,
+ -32, -64, -128, 0, 0, 0, 0, 0,
+ -64, -128, 0, 0, 0, 0, 0, 0,
+ -128, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0,
+ 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0,
+ 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, -4294967296, -8589934592, -17179869184,
+ -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0
+ 255, 254, 252, 248, 240, 224, 192, 128,
+ 254, 252, 248, 240, 224, 192, 128, 0,
+ 252, 248, 240, 224, 192, 128, 0, 0,
+ 248, 240, 224, 192, 128, 0, 0, 0,
+ 240, 224, 192, 128, 0, 0, 0, 0,
+ 224, 192, 128, 0, 0, 0, 0, 0,
+ 192, 128, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0
+ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ 64512, 63488, 61440, 57344, 49152, 32768,
+ 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ 63488, 61440, 57344, 49152, 32768, 0,
+ 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ 61440, 57344, 49152, 32768, 0, 0,
+ 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ 57344, 49152, 32768, 0, 0, 0,
+ 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ 49152, 32768, 0, 0, 0, 0,
+ 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ 32768, 0, 0, 0, 0, 0,
+ 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768,
+ 0, 0, 0, 0, 0, 0,
+ 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ 0, 0, 0, 0
+ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648,
+ 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0,
+ 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648,
+ 0, 0,
+ 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0,
+ 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0,
+ 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0, 0, 0, 0, 0, 0, 0
+ 18446744073709551615, 18446744073709551614, 18446744073709551612,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808,
+ 18446744073709551614, 18446744073709551612, 18446744073709551608,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0,
+ 18446744073709551612, 18446744073709551608, 18446744073709551600,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0, 0, 0, 0,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0, 0, 0, 0
+ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007,
+ 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007,
+ 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007,
+ 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007,
+ 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007,
+ 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007,
+ 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007,
+ 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 \ No newline at end of file
diff --git a/tools/testfiles/trawdatafile.ddl b/tools/testfiles/trawdatafile.ddl
new file mode 100644
index 0000000..f99d906
--- /dev/null
+++ b/tools/testfiles/trawdatafile.ddl
@@ -0,0 +1,58 @@
+HDF5 "packedbits.h5" {
+GROUP "/" {
+ DATASET "DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+ DATASET "DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ DATA {
+ }
+ }
+ DATASET "DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ DATA {
+ }
+ }
+ DATASET "DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ DATA {
+ }
+ }
+ DATASET "DU08BITS" {
+ DATATYPE H5T_STD_U8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+ DATASET "DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ DATA {
+ }
+ }
+ DATASET "DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ DATA {
+ }
+ }
+ DATASET "DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ DATA {
+ }
+ }
+ DATASET "DummyDBL" {
+ DATATYPE H5T_IEEE_F64BE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+}
+}
diff --git a/tools/testfiles/trawdatafile.exp b/tools/testfiles/trawdatafile.exp
new file mode 100644
index 0000000..dc19888
--- /dev/null
+++ b/tools/testfiles/trawdatafile.exp
@@ -0,0 +1,402 @@
+
+ -1, -2, -4, -8, -16, -32, -64, -128,
+ -2, -4, -8, -16, -32, -64, -128, 0,
+ -4, -8, -16, -32, -64, -128, 0, 0,
+ -8, -16, -32, -64, -128, 0, 0, 0,
+ -16, -32, -64, -128, 0, 0, 0, 0,
+ -32, -64, -128, 0, 0, 0, 0, 0,
+ -64, -128, 0, 0, 0, 0, 0, 0,
+ -128, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0,
+ 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0,
+ 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, -4294967296, -8589934592, -17179869184,
+ -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0
+ 255, 254, 252, 248, 240, 224, 192, 128,
+ 254, 252, 248, 240, 224, 192, 128, 0,
+ 252, 248, 240, 224, 192, 128, 0, 0,
+ 248, 240, 224, 192, 128, 0, 0, 0,
+ 240, 224, 192, 128, 0, 0, 0, 0,
+ 224, 192, 128, 0, 0, 0, 0, 0,
+ 192, 128, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0
+ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ 64512, 63488, 61440, 57344, 49152, 32768,
+ 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ 63488, 61440, 57344, 49152, 32768, 0,
+ 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ 61440, 57344, 49152, 32768, 0, 0,
+ 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ 57344, 49152, 32768, 0, 0, 0,
+ 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ 49152, 32768, 0, 0, 0, 0,
+ 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ 32768, 0, 0, 0, 0, 0,
+ 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768,
+ 0, 0, 0, 0, 0, 0,
+ 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ 0, 0, 0, 0
+ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648,
+ 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0,
+ 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648,
+ 0, 0,
+ 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0,
+ 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0,
+ 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0, 0, 0, 0, 0, 0, 0
+ 18446744073709551615, 18446744073709551614, 18446744073709551612,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808,
+ 18446744073709551614, 18446744073709551612, 18446744073709551608,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0,
+ 18446744073709551612, 18446744073709551608, 18446744073709551600,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0, 0, 0, 0,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0, 0, 0, 0
+ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007,
+ 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007,
+ 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007,
+ 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007,
+ 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007,
+ 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007,
+ 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007,
+ 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 \ No newline at end of file
diff --git a/tools/testfiles/tstr2bin2.exp b/tools/testfiles/tstr2bin2.exp
new file mode 100644
index 0000000..5d4c544
--- /dev/null
+++ b/tools/testfiles/tstr2bin2.exp
@@ -0,0 +1 @@
+This is row 0 of type H5T_STR_NULLTERM of string This is row 1 of type H5T_STR_NULLTERM of string This is row 2 of type H5T_STR_NULLTERM of string This is row 3 of type H5T_STR_NULLTERM of string This is row 4 of type H5T_STR_NULLTERM of string This is row 5 of type H5T_STR_NULLTERM of string This is row 6 of type H5T_STR_NULLTERM of string This is row 7 of type H5T_STR_NULLTERM of string This is row 8 of type H5T_STR_NULLTERM of string This is row 9 of type H5T_STR_NULLTERM of string \ No newline at end of file
diff --git a/tools/testfiles/tstr2bin6.exp b/tools/testfiles/tstr2bin6.exp
new file mode 100644
index 0000000..5c6c22a
--- /dev/null
+++ b/tools/testfiles/tstr2bin6.exp
@@ -0,0 +1 @@
+This is row 0 of type H5T_STR_SPACEPAD of string aThis is row 1 of type H5T_STR_SPACEPAD of string aThis is row 2 of type H5T_STR_SPACEPAD of string aThis is row 3 of type H5T_STR_SPACEPAD of string aThis is row 4 of type H5T_STR_SPACEPAD of string aThis is row 5 of type H5T_STR_SPACEPAD of string aThis is row 6 of type H5T_STR_SPACEPAD of string aThis is row 7 of type H5T_STR_SPACEPAD of string aThis is row 8 of type H5T_STR_SPACEPAD of string aThis is row 9 of type H5T_STR_SPACEPAD of string a \ No newline at end of file
diff --git a/tools/testfiles/twithddl.ddl b/tools/testfiles/twithddl.ddl
new file mode 100644
index 0000000..f99d906
--- /dev/null
+++ b/tools/testfiles/twithddl.ddl
@@ -0,0 +1,58 @@
+HDF5 "packedbits.h5" {
+GROUP "/" {
+ DATASET "DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+ DATASET "DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ DATA {
+ }
+ }
+ DATASET "DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ DATA {
+ }
+ }
+ DATASET "DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ DATA {
+ }
+ }
+ DATASET "DU08BITS" {
+ DATATYPE H5T_STD_U8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+ DATASET "DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ DATA {
+ }
+ }
+ DATASET "DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ DATA {
+ }
+ }
+ DATASET "DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ DATA {
+ }
+ }
+ DATASET "DummyDBL" {
+ DATATYPE H5T_IEEE_F64BE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ DATA {
+ }
+ }
+}
+}
diff --git a/tools/testfiles/twithddlfile.ddl b/tools/testfiles/twithddlfile.ddl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/testfiles/twithddlfile.ddl
diff --git a/tools/testfiles/twithddlfile.exp b/tools/testfiles/twithddlfile.exp
new file mode 100644
index 0000000..dc19888
--- /dev/null
+++ b/tools/testfiles/twithddlfile.exp
@@ -0,0 +1,402 @@
+
+ -1, -2, -4, -8, -16, -32, -64, -128,
+ -2, -4, -8, -16, -32, -64, -128, 0,
+ -4, -8, -16, -32, -64, -128, 0, 0,
+ -8, -16, -32, -64, -128, 0, 0, 0,
+ -16, -32, -64, -128, 0, 0, 0, 0,
+ -32, -64, -128, 0, 0, 0, 0, 0,
+ -64, -128, 0, 0, 0, 0, 0, 0,
+ -128, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0,
+ 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0, 0,
+ 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0
+ -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ -8192, -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ -4294967296, -8589934592, -17179869184, -34359738368, -68719476736,
+ -137438953472, -274877906944, -549755813888, -1099511627776,
+ -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ -35184372088832, -70368744177664, -140737488355328, -281474976710656,
+ -562949953421312, -1125899906842624, -2251799813685248,
+ -4503599627370496, -9007199254740992, -18014398509481984,
+ -36028797018963968, -72057594037927936, -144115188075855872,
+ -288230376151711744, -576460752303423488, -1152921504606846976,
+ -2305843009213693952, -4611686018427387904, -9223372036854775808, 0,
+ -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0,
+ -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ -16384, -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0,
+ -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ -8589934592, -17179869184, -34359738368, -68719476736, -137438953472,
+ -274877906944, -549755813888, -1099511627776, -2199023255552,
+ -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ -70368744177664, -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0,
+ -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0,
+ -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ -17179869184, -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0,
+ -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, -65536,
+ -131072, -262144, -524288, -1048576, -2097152, -4194304, -8388608,
+ -16777216, -33554432, -67108864, -134217728, -268435456, -536870912,
+ -1073741824, -2147483648, -4294967296, -8589934592, -17179869184,
+ -34359738368, -68719476736, -137438953472, -274877906944,
+ -549755813888, -1099511627776, -2199023255552, -4398046511104,
+ -8796093022208, -17592186044416, -35184372088832, -70368744177664,
+ -140737488355328, -281474976710656, -562949953421312,
+ -1125899906842624, -2251799813685248, -4503599627370496,
+ -9007199254740992, -18014398509481984, -36028797018963968,
+ -72057594037927936, -144115188075855872, -288230376151711744,
+ -576460752303423488, -1152921504606846976, -2305843009213693952,
+ -4611686018427387904, -9223372036854775808, 0, 0, 0, 0, 0, 0, 0
+ 255, 254, 252, 248, 240, 224, 192, 128,
+ 254, 252, 248, 240, 224, 192, 128, 0,
+ 252, 248, 240, 224, 192, 128, 0, 0,
+ 248, 240, 224, 192, 128, 0, 0, 0,
+ 240, 224, 192, 128, 0, 0, 0, 0,
+ 224, 192, 128, 0, 0, 0, 0, 0,
+ 192, 128, 0, 0, 0, 0, 0, 0,
+ 128, 0, 0, 0, 0, 0, 0, 0
+ 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ 64512, 63488, 61440, 57344, 49152, 32768,
+ 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ 63488, 61440, 57344, 49152, 32768, 0,
+ 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ 61440, 57344, 49152, 32768, 0, 0,
+ 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ 57344, 49152, 32768, 0, 0, 0,
+ 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ 49152, 32768, 0, 0, 0, 0,
+ 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ 32768, 0, 0, 0, 0, 0,
+ 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768,
+ 0, 0, 0, 0, 0, 0,
+ 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ 0, 0, 0, 0
+ 4294967295, 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648,
+ 4294967294, 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0,
+ 4294967292, 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ 4294967040, 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ 4294950912, 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ 4293918720, 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ 4227858432, 4160749568, 4026531840, 3758096384, 3221225472, 2147483648,
+ 0, 0,
+ 4294967288, 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ 4294966784, 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ 4294934528, 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ 4292870144, 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0,
+ 4294967280, 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ 4294966272, 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ 4294901760, 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ 4290772992, 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0,
+ 4294967264, 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ 4294965248, 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ 4294836224, 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ 4286578688, 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ 4294967232, 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ 4294963200, 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ 4294705152, 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ 4278190080, 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ 4294967168, 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ 4294959104, 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ 4294443008, 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ 4261412864, 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ 2147483648, 0, 0, 0, 0, 0, 0, 0
+ 18446744073709551615, 18446744073709551614, 18446744073709551612,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808,
+ 18446744073709551614, 18446744073709551612, 18446744073709551608,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0,
+ 18446744073709551612, 18446744073709551608, 18446744073709551600,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0,
+ 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0,
+ 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0,
+ 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0,
+ 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ 9223372036854775808, 0, 0, 0, 0, 0, 0,
+ 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ 16140901064495857664, 13835058055282163712, 9223372036854775808, 0, 0,
+ 0, 0, 0, 0, 0
+ 0, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007,
+ 1, 1.0001, 1.0002, 1.0003, 1.0004, 1.0005, 1.0006, 1.0007,
+ 2, 2.0001, 2.0002, 2.0003, 2.0004, 2.0005, 2.0006, 2.0007,
+ 3, 3.0001, 3.0002, 3.0003, 3.0004, 3.0005, 3.0006, 3.0007,
+ 4, 4.0001, 4.0002, 4.0003, 4.0004, 4.0005, 4.0006, 4.0007,
+ 5, 5.0001, 5.0002, 5.0003, 5.0004, 5.0005, 5.0006, 5.0007,
+ 6, 6.0001, 6.0002, 6.0003, 6.0004, 6.0005, 6.0006, 6.0007,
+ 7, 7.0001, 7.0002, 7.0003, 7.0004, 7.0005, 7.0006, 7.0007 \ No newline at end of file
diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h
index 389489b..021967a 100644
--- a/vms/src/h5pubconf.h
+++ b/vms/src/h5pubconf.h
@@ -505,7 +505,7 @@
#define H5_PACKAGE_NAME "HDF5"
/* Define to the full name and version of this package. */
-#define H5_PACKAGE_STRING "HDF5 1.9.135"
+#define H5_PACKAGE_STRING "HDF5 1.9.141"
/* Define to the one symbol short name of this package. */
#define H5_PACKAGE_TARNAME "hdf5"
@@ -514,7 +514,7 @@
#define H5_PACKAGE_URL ""
/* Define to the version of this package. */
-#define H5_PACKAGE_VERSION "1.9.135"
+#define H5_PACKAGE_VERSION "1.9.141"
/* Width for printf() for type `long long' or `__int64', use `ll' */
#define H5_PRINTF_LL_WIDTH "ll"
@@ -677,7 +677,7 @@
/* #undef H5_USING_MEMCHECKER */
/* Version number of package */
-#define H5_VERSION "1.9.135"
+#define H5_VERSION "1.9.141"
/* Define if vsnprintf() returns the correct value for formatted strings that
don't fit into size allowed */