summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/CMakeLists.txt1035
-rw-r--r--tools/h5dump/Makefile.am2
-rw-r--r--tools/h5dump/errfiles/filter_fail.err21
-rw-r--r--tools/h5dump/errfiles/tall-1.err25
-rw-r--r--tools/h5dump/errfiles/tall-2A.err25
-rw-r--r--tools/h5dump/errfiles/tall-2B.err25
-rw-r--r--tools/h5dump/errfiles/tarray1_big.err67
-rw-r--r--tools/h5dump/errfiles/tattr-3.err8
-rw-r--r--tools/h5dump/errfiles/tattrregR.err45
-rw-r--r--tools/h5dump/errfiles/tcomp-3.err16
-rw-r--r--tools/h5dump/errfiles/tdataregR.err45
-rw-r--r--tools/h5dump/errfiles/tdset-2.err33
-rw-r--r--tools/h5dump/errfiles/texceedsubblock.err1
-rw-r--r--tools/h5dump/errfiles/texceedsubcount.err1
-rw-r--r--tools/h5dump/errfiles/texceedsubstart.err1
-rw-r--r--tools/h5dump/errfiles/texceedsubstride.err1
-rw-r--r--tools/h5dump/errfiles/textlink.err50
-rw-r--r--tools/h5dump/errfiles/textlinkfar.err243
-rw-r--r--tools/h5dump/errfiles/textlinksrc.err243
-rw-r--r--tools/h5dump/errfiles/tgroup-2.err20
-rw-r--r--tools/h5dump/errfiles/tnofilename-with-packed-bits.err1
-rw-r--r--tools/h5dump/errfiles/torderlinks1.err25
-rw-r--r--tools/h5dump/errfiles/torderlinks2.err25
-rw-r--r--tools/h5dump/errfiles/tpbitsCharLengthExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsIncomplete.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsIntLengthExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsLengthExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsLengthPositive.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsLongLengthExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsMaxExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsOffsetExceeded.err1
-rw-r--r--tools/h5dump/errfiles/tpbitsOffsetNegative.err1
-rw-r--r--tools/h5dump/errfiles/tperror.err33
-rw-r--r--tools/h5dump/errfiles/tqmarkfile.err33
-rw-r--r--tools/h5dump/errfiles/tslink-D.err25
-rw-r--r--tools/h5dump/h5dump.c40
-rw-r--r--tools/h5dump/h5dump_ddl.c136
-rw-r--r--tools/h5dump/h5dump_xml.c1
-rw-r--r--tools/h5dump/h5dumpgentest.c4398
-rw-r--r--tools/h5dump/testh5dump.sh.in165
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in82
44 files changed, 4206 insertions, 2677 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 3bc481d..cf442d4 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -43,362 +43,420 @@ IF (BUILD_TESTING)
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
SET (HDF5_REFERENCE_FILES
- charsets.ddl
- file_space.ddl
- filter_fail.ddl
- packedbits.ddl
- tall-1.ddl
- tall-2.ddl
- tall-2A.ddl
- tall-2B.ddl
- tall-3.ddl
- tall-4s.ddl
- tall-5s.ddl
- tall-6.ddl
- tallfilters.ddl
- tarray1.ddl
- tarray1_big.ddl
- tarray2.ddl
- tarray3.ddl
- tarray4.ddl
- tarray5.ddl
- tarray6.ddl
- tarray7.ddl
- tarray8.ddl
- tattr-1.ddl
- tattrintsize.ddl
- tattr-2.ddl
- tattr-3.ddl
- tattr-4_be.ddl
- tattrreg.ddl
- tattrregR.ddl
- tbin1.ddl
- tbin1.ddl
- tbin2.ddl
- tbin3.ddl
- tbin4.ddl
- tbinregR.ddl
- tbigdims.ddl
- tboot1.ddl
- tboot2.ddl
- tchar1.ddl
- tchunked.ddl
- tcmpdattrintsize.ddl
- tcmpdintsize.ddl
- tcomp-1.ddl
- tcomp-2.ddl
- tcomp-3.ddl
- tcomp-4.ddl
- tcompact.ddl
- tcontents.ddl
- tcontiguos.ddl
- tdatareg.ddl
- tdataregR.ddl
- tdeflate.ddl
- tdset-1.ddl
- tdset-2.ddl
- tdset-3s.ddl
- tempty.ddl
- texceedsubstart.ddl
- texceedsubcount.ddl
- texceedsubstride.ddl
- texceedsubblock.ddl
- texternal.ddl
- textlinksrc.ddl
- textlinkfar.ddl
- textlink.ddl
- tfamily.ddl
- tfill.ddl
- tfletcher32.ddl
- tfpformat.ddl
- tgroup-1.ddl
- tgroup-2.ddl
- tgrp_comments.ddl
- thlink-1.ddl
- thlink-2.ddl
- thlink-3.ddl
- thlink-4.ddl
- thlink-5.ddl
- thyperslab.ddl
- tindicesno.ddl
- tindicessub1.ddl
- tindicessub2.ddl
- tindicessub3.ddl
- tindicessub4.ddl
- tindicesyes.ddl
- tlarge_objname.ddl
- #tldouble.ddl
- tlonglinks.ddl
- tloop-1.ddl
- tmulti.ddl
- tmultifile.ddl
-# tqmarkfile.ddl
-# tstarfile.ddl
- tnamed_dtype_attr.ddl
- tnestcomp-1.ddl
- tnbit.ddl
- tno-subset.ddl
- tnullspace.ddl
- zerodim.ddl
- tordergr1.ddl
- tordergr2.ddl
- tordergr3.ddl
- tordergr4.ddl
- tordergr5.ddl
- torderattr1.ddl
- torderattr2.ddl
- torderattr3.ddl
- torderattr4.ddl
- tperror.ddl
- treference.ddl
- tsaf.ddl
- tscaleoffset.ddl
- tshuffle.ddl
- tslink-1.ddl
- tslink-2.ddl
- tslink-D.ddl
- tsplit_file.ddl
- tstr-1.ddl
- tstr-2.ddl
- tstring.ddl
- tstring2.ddl
- tstringe.ddl
- tszip.ddl
- tudlink-1.ddl
- tudlink-2.ddl
- tuserfilter.ddl
- tvldtypes1.ddl
- tvldtypes2.ddl
- tvldtypes3.ddl
- tvldtypes4.ddl
- tvldtypes5.ddl
- tvlstr.ddl
- tvms.ddl
- h5dump-help.txt
- out3.h5import
- )
- SET (HDF5_XML_REFERENCE_FILES
- tall.h5.xml
- tall-2A.h5.xml
- tarray1.h5.xml
- tarray2.h5.xml
- tarray3.h5.xml
- tarray6.h5.xml
- tarray7.h5.xml
- tattr.h5.xml
- tbitfields.h5.xml
- tcompound_complex.h5.xml
- tcompound.h5.xml
- tcompound2.h5.xml
- tdatareg.h5.xml
- tdset.h5.xml
- tdset2.h5.xml
- tempty.h5.xml
- tempty-dtd.h5.xml
- tempty-dtd-2.h5.xml
- tempty-dtd-uri.h5.xml
- tempty-nons.h5.xml
- tempty-nons-2.h5.xml
- tempty-nons-uri.h5.xml
- tempty-ns.h5.xml
- tempty-ns-2.h5.xml
- tenum.h5.xml
- textlink.h5.xml
- tfpformat.h5.xml
- tgroup.h5.xml
- thlink.h5.xml
- tloop.h5.xml
- tloop2.h5.xml
- tmany.h5.xml
- tname-amp.h5.xml
- tname-apos.h5.xml
- tnamed_dtype_attr.h5.xml
- tname-gt.h5.xml
- tname-lt.h5.xml
- tname-quot.h5.xml
- tname-sp.h5.xml
- tnestedcomp.h5.xml
- tnodata.h5.xml
- tobjref.h5.xml
- topaque.h5.xml
- torderattr1.h5.xml
- torderattr2.h5.xml
- torderattr3.h5.xml
- torderattr4.h5.xml
- tref.h5.xml
- tref-escapes.h5.xml
- tref-escapes-at.h5.xml
- tsaf.h5.xml
- tslink.h5.xml
- tstr.h5.xml
- tstr2.h5.xml
- tstring.h5.xml
- tstring-at.h5.xml
- tudlink.h5.xml
- tvldtypes1.h5.xml
- tvldtypes2.h5.xml
- tvldtypes3.h5.xml
- tvldtypes4.h5.xml
- tvldtypes5.h5.xml
- tvlstr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl
+ ${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/tno-subset.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl
+ ${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/h5dump-help.txt
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
)
SET (HDF5_REFERENCE_TEST_FILES
- charsets.h5
- file_space.h5
- filter_fail.h5
- packedbits.h5
- taindices.h5
- tall.h5
- tarray1.h5
- tarray1_big.h5
- tarray2.h5
- tarray3.h5
- tarray4.h5
- tarray5.h5
- tarray6.h5
- tarray7.h5
- tarray8.h5
- tattr.h5
- tattr2.h5
- tattr4_be.h5
- tattrintsize.h5
- tattrreg.h5
- tbigdims.h5
- tbinary.h5
- tchar.h5
- tcmpdattrintsize.h5
- tcmpdintsize.h5
- tcompound.h5
- tcompound_complex.h5
- tdatareg.h5
- tdset.h5
- tempty.h5
- tsoftlinks.h5
- textlinkfar.h5
- textlinksrc.h5
- textlinktar.h5
- textlink.h5
- tfamily00000.h5
- tfamily00001.h5
- tfamily00002.h5
- tfamily00003.h5
- tfamily00004.h5
- tfamily00005.h5
- tfamily00006.h5
- tfamily00007.h5
- tfamily00008.h5
- tfamily00009.h5
- tfamily00010.h5
- tfcontents1.h5
- tfcontents2.h5
- tfilters.h5
- tfpformat.h5
- tfvalues.h5
- tgroup.h5
- tgrp_comments.h5
- thlink.h5
- thyperslab.h5
- tlarge_objname.h5
- #tldouble.h5
- tlonglinks.h5
- tloop.h5
- tmulti-b.h5
- tmulti-g.h5
- tmulti-l.h5
- tmulti-o.h5
- tmulti-r.h5
- tmulti-s.h5
- tnamed_dtype_attr.h5
- tnestedcomp.h5
- tno-subset.h5
- tnullspace.h5
- zerodim.h5
- torderattr.h5
- tordergr.h5
- tsaf.h5
- tslink.h5
- tsplit_file-m.h5
- tsplit_file-r.h5
- tstr.h5
- tstr2.h5
- tstr3.h5
- tudlink.h5
- tvldtypes1.h5
- tvldtypes2.h5
- tvldtypes3.h5
- tvldtypes4.h5
- tvldtypes5.h5
- tvlstr.h5
- tvms.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.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/tempty.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.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
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
)
- SET (HDF5_XML_REFERENCE_TEST_FILES
- tbitfields.h5
- tcompound2.h5
- tdset2.h5
- tenum.h5
- textlink.h5
- tloop2.h5
- tmany.h5
- tname-amp.h5
- tname-apos.h5
- tname-gt.h5
- tname-lt.h5
- tname-quot.h5
- tname-sp.h5
- tnodata.h5
- tobjref.h5
- topaque.h5
- tref.h5
- tref-escapes.h5
- tref-escapes-at.h5
- tstring.h5
- tstring-at.h5
+ SET (HDF5_ERROR_REFERENCE_TEST_FILES
+ ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlink.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tperror.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err
)
- FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #MESSAGE (STATUS " Copying ${ddl_file}")
+ # make test dir
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ #
+ # copy test files from source dir to test dir
+ #
+ FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_h5_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_file} ${ddldest}
+ ARGS -E copy_if_different ${tst_h5_file} ${dest}
)
- ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+ ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- FOREACH (xml_file ${HDF5_XML_REFERENCE_FILES})
- SET (xmldest "${PROJECT_BINARY_DIR}/${xml_file}")
- #MESSAGE (STATUS " Copying ${xml_file}")
+ FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_other_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${xml_file} ${xmldest}
+ ARGS -E copy_if_different ${tst_other_file} ${dest}
)
- ENDFOREACH (xml_file ${HDF5_XML_REFERENCE_FILES})
+ ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
+ FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_error_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
+ ARGS -E copy_if_different ${tst_error_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
- FOREACH (h5_xml_file ${HDF5_XML_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_xml_file}")
- #MESSAGE (STATUS " Copying ${h5_xml_file}")
+ #
+ # copy XML test files from source dir to test dir
+ #
+ SET (HDF5_XML_REFERENCE_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5
+ ${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/tnodata.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.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/tstring.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5
+ )
+ SET (HDF5_XML_REFERENCE_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml
+ )
+
+ 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}")
+ #MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_xml_file} ${dest}
+ ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
)
- ENDFOREACH (h5_xml_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ 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}")
+ #MESSAGE (STATUS " Copying ${tst_xml_other_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
+ )
+ ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
@@ -406,18 +464,18 @@ IF (BUILD_TESTING)
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/tbin1LE.ddl
+ 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}/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}/tbinregR.exp
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/tbinregR.exp
)
ENDIF (WIN32 AND NOT CYGWIN)
@@ -426,71 +484,99 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
#-- Copy all the HDF5 files from the test directory into the source directory
SET (HDF5_REFERENCE_PBITS
- tnofilename-with-packed-bits.ddl
- tpbitsArray.ddl
- tpbitsCompound.ddl
- tpbitsIncomplete.ddl
- tpbitsLengthExceeded.ddl
- tpbitsCharLengthExceeded.ddl
- tpbitsIntLengthExceeded.ddl
- tpbitsLongLengthExceeded.ddl
- tpbitsLengthPositive.ddl
- tpbitsMax.ddl
- tpbitsMaxExceeded.ddl
- tpbitsOffsetExceeded.ddl
- tpbitsCharOffsetExceeded.ddl
- tpbitsIntOffsetExceeded.ddl
- tpbitsLongOffsetExceeded.ddl
- tpbitsOffsetNegative.ddl
- tpbitsOverlapped.ddl
- tpbitsSigned.ddl
- tpbitsUnsigned.ddl
- tpbitsSignedInt.ddl
- tpbitsUnsignedInt.ddl
- tpbitsSignedLong.ddl
- tpbitsUnsignedLong.ddl
- tpbitsSignedLongLong.ddl
- tpbitsUnsignedLongLong.ddl
- tpbitsSignedWhole.ddl
- tpbitsUnsignedWhole.ddl
- tpbitsSignedIntWhole.ddl
- tpbitsUnsignedIntWhole.ddl
- tpbitsSignedLongWhole.ddl
- tpbitsUnsignedLongWhole.ddl
- tpbitsSignedLongLongWhole.ddl
- tpbitsUnsignedLongLongWhole.ddl
- tpbitsSignedLongLongWhole1.ddl
- tpbitsUnsignedLongLongWhole1.ddl
- tpbitsSignedLongLongWhole63.ddl
- tpbitsUnsignedLongLongWhole63.ddl
- tpbitsSigned4.ddl
- tpbitsUnsigned4.ddl
- tpbitsSignedInt8.ddl
- tpbitsUnsignedInt8.ddl
- tpbitsSignedLong16.ddl
- tpbitsUnsignedLong16.ddl
- tpbitsSignedLongLong32.ddl
- tpbitsUnsignedLongLong32.ddl
- tpbitsSigned2.ddl
- tpbitsUnsigned2.ddl
- tpbitsSignedInt4.ddl
- tpbitsUnsignedInt4.ddl
- tpbitsSignedLong8.ddl
- tpbitsUnsignedLong8.ddl
- tpbitsSignedLongLong16.ddl
- tpbitsUnsignedLongLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
+ )
+ SET (HDF5_ERROR_REFERENCE_PBITS
+ ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
)
FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_pbits}")
- #MESSAGE (STATUS " Translating ${ddl_pbits}")
+ GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${ddl_pbits}")
ADD_CUSTOM_COMMAND (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_pbits} ${ddldest}
+ ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
)
ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+
+ FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${ddl_pbits}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
+ )
+ ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
##############################################################################
##############################################################################
@@ -502,6 +588,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")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -512,12 +599,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")
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}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=h5dump-${testname}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=h5dump-${testname}.txt"
@@ -544,6 +632,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")
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
@@ -557,12 +646,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")
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}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
@@ -575,8 +665,9 @@ IF (BUILD_TESTING)
MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
ADD_TEST (
NAME H5DUMP-output-${resultfile}
- COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${targetfile}
+ COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${targetfile}
)
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -585,7 +676,7 @@ IF (BUILD_TESTING)
ADD_TEST (
NAME H5DUMP-output-cmp-${resultfile}
COMMAND ${CMAKE_COMMAND}
- -E compare_files ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${resultfile}.exp
+ -E compare_files ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.txt ${PROJECT_BINARY_DIR}/testfiles/${resultfile}.exp
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS ${last_test})
@@ -601,12 +692,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")
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}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.ddl"
@@ -617,6 +709,31 @@ IF (BUILD_TESTING)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_MASK_TEST file)
+ MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode)
+ IF (NOT 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")
+ 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_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5ERR_MASK_TEST file)
+
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -633,6 +750,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")
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
@@ -646,12 +764,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")
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}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_REFERENCE=${resultfile}.xml"
@@ -673,7 +792,7 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
##############################################################################
##############################################################################
@@ -736,6 +855,10 @@ IF (BUILD_TESTING)
tattr-3.out.err
tattr-4_be.out
tattr-4_be.out.err
+ tattrcontents1.out
+ tattrcontents1.out.err
+ tattrcontents2.out
+ tattrcontents2.out.err
tattrintsize.out
tattrintsize.out.err
tattrreg.out
@@ -860,6 +983,8 @@ IF (BUILD_TESTING)
tnamed_dtype_attr.out.err
tnestcomp-1.out
tnestcomp-1.out.err
+ tnestedcmpddt.out
+ tnestedcmpddt.out.err
tnbit.out
tnbit.out.err
tno-subset.out
@@ -886,6 +1011,14 @@ IF (BUILD_TESTING)
torderattr3.out.err
torderattr4.out
torderattr4.out.err
+ tordercontents1.out
+ tordercontents1.out.err
+ tordercontents2.out
+ tordercontents2.out.err
+ torderlinks1.out
+ torderlinks1.out.err
+ torderlinks2.out
+ torderlinks2.out.err
tperror.out
tperror.out.err
treference.out
@@ -936,7 +1069,10 @@ IF (BUILD_TESTING)
tvlstr.out.err
tvms.out
tvms.out.err
+ twidedisplay.out
+ twidedisplay.out.err
)
+ SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -945,6 +1081,9 @@ IF (BUILD_TESTING)
ADD_HELP_TEST(help 0 -h)
+ # test for maximum display datasets
+ ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
+
# test for signed/unsigned datasets
ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5)
# test for compound signed/unsigned datasets
@@ -956,21 +1095,19 @@ IF (BUILD_TESTING)
# test for displaying groups
ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5)
# test for displaying the selected groups
- # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5)
- # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group names are similar to version numbers
- ADD_H5_TEST (tgroup-2 1 --group=/g2 --group / -g /y tgroup.h5)
+ ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5)
# test for displaying simple space datasets
ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5)
# test for displaying selected datasets
- ADD_H5_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5)
+ ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5)
# test for displaying attributes
ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5)
# test for displaying the selected attributes of string type and scalar space
ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5)
# test for header and error messages
- ADD_H5_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5)
+ ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5)
# test for displaying attributes in shared datatype (also in group and dataset)
ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5)
# test for displaying at least 9 attributes on root from a be machine
@@ -983,7 +1120,7 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5)
ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5)
# test for displaying dangling soft links
- ADD_H5_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5)
+ ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5)
# tests for hard links
ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5)
@@ -997,18 +1134,16 @@ IF (BUILD_TESTING)
# test for named data types
ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5)
# test for unamed type
- # JIRA HDFFV-7936 ADD_H5_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
- ADD_H5_TEST (tcomp-3 0 "-t;/#6632;-g;/group2;tcompound.h5")
+ ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
# test complicated compound datatype
ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
#test for the nested compound type
ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5)
+ ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5)
# test for options
- # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tall-1 0 --enable-error-stack tall.h5)
- # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group/dataset names are similar to version numbers
- ADD_H5_TEST (tall-1 0 tall.h5)
+ ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5)
ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5)
ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5)
@@ -1035,8 +1170,7 @@ IF (BUILD_TESTING)
# test for files with array data
ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
# # added for bug# 2092 - tarray1_big.h5
- # JIRA HDFFV-7936 ADD_H5_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5)
- ADD_H5_TEST (tarray1_big 0 -R tarray1_big.h5)
+ ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5)
ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5)
ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5)
ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5)
@@ -1065,13 +1199,10 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5)
# test '-A' to suppress data but print attr's
- # JIRA HDFFV-7936 ADD_H5_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5)
- # cannot use TEST_MASK_ERROR and --enable-error-stack on this test because group/dataset names are similar to version numbers
- ADD_H5_TEST (tall-2A 0 -A tall.h5)
+ ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5)
# test '-r' to print attributes in ASCII instead of decimal
- # JIRA HDFFV-7936 ADD_H5_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5)
- ADD_H5_TEST (tall-2B 0 -A -r tall.h5)
+ ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5)
# test Subsetting
ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5)
@@ -1092,10 +1223,14 @@ IF (BUILD_TESTING)
ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5)
# test -p with a non existing dataset
- ADD_H5_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5)
+ ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5)
# test for file contents
ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5)
+ ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5)
+ ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5)
+ ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5)
+ ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5)
# tests for storage layout
# compact
@@ -1221,20 +1356,32 @@ IF (BUILD_TESTING)
# 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 "")
+ SET_TESTS_PROPERTIES (H5DUMP-tbin1 PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-tbin1")
+
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-tbin1 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-tbin1")
+ ADD_TEST (NAME H5DUMP-clear-out1D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/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 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 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 out1.h5)
+ ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/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 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 DEPENDS H5DUMP-h5import-out1)
SET (last_test "H5DUMP-h5diff-out1")
@@ -1248,20 +1395,32 @@ IF (BUILD_TESTING)
# the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST (tbin3 0 --enable-error-stack -d integer -o out3.bin -b NATIVE tbinary.h5)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-tbin3 PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-tbin3")
+
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-tbin3 PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-tbin3")
+ ADD_TEST (NAME H5DUMP-clear-out3D COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/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 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 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 out3.h5)
+ ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/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 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 DEPENDS H5DUMP-h5import-out3)
SET (last_test "H5DUMP-h5diff-out3")
@@ -1287,19 +1446,17 @@ IF (BUILD_TESTING)
out1.h5
out3.h5
)
+ SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-clear-objects")
ENDIF (NOT HDF5_NOCLEANUP)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-clear-objects")
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
- # JIRA HDFFV-7936 ADD_H5_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
- ADD_H5_TEST (tdataregR 0 -R tdatareg.h5)
- ADD_H5_TEST (tattrreg 0 --enable-error-stack tattrreg.h5)
- # JIRA HDFFV-7936 ADD_H5_TEST (tattrregR 0 --enable-error-stack -R tattrreg.h5)
- ADD_H5_TEST (tattrregR 0 -R tattrreg.h5)
+ ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
+ ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
# tests for group creation order
@@ -1316,20 +1473,22 @@ IF (BUILD_TESTING)
ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5)
+ # tests for link references and order
+ ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5)
+ ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5)
+
# tests for floating point user defined printf format
ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5)
# tests for traversal of external links
- # JIRA HDFFV-7936 ADD_H5_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5)
- ADD_H5_TEST (textlinksrc 0 textlinksrc.h5)
- # JIRA HDFFV-7936 ADD_H5_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5)
- ADD_H5_TEST (textlinkfar 0 textlinkfar.h5)
+ ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5)
+ ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5)
# test for dangling external links
- ADD_H5_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
+ ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
# test for error stack display (BZ2048)
- ADD_H5_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5)
+ 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)
@@ -1448,6 +1607,7 @@ IF (BUILD_TESTING)
tpbitsUnsignedLongLong16.out
tpbitsUnsignedLongLong16.out.err
)
+ SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -1668,6 +1828,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")
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/Makefile.am b/tools/h5dump/Makefile.am
index 38864f5..f80d12e 100644
--- a/tools/h5dump/Makefile.am
+++ b/tools/h5dump/Makefile.am
@@ -46,6 +46,6 @@ h5dump_SOURCES=h5dump.c h5dump_ddl.c h5dump_xml.c
# Temporary files. *.h5 are generated by h5dumpgentest. They should
# copied to the testfiles/ directory if update is required.
CHECK_CLEANFILES+=*.h5 *.bin
-DISTCLEANFILES=testh5dump.sh
+DISTCLEANFILES=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5dump/errfiles/filter_fail.err b/tools/h5dump/errfiles/filter_fail.err
new file mode 100644
index 0000000..8f0f990
--- /dev/null
+++ b/tools/h5dump/errfiles/filter_fail.err
@@ -0,0 +1,21 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Dread(): can't read data
+ major: Dataset
+ minor: Read failed
+ #001: (file name) line (number) in H5D__read(): can't read data
+ major: Dataset
+ minor: Read failed
+ #002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk
+ major: Low-level I/O
+ minor: Read failed
+ #003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
+ major: Data filters
+ minor: Filter operation failed
+ #004: (file name) line (number) in H5Z_pipeline(): required filter 'filter_fail_test' is not registered
+ major: Data filters
+ minor: Read failed
+h5dump error: unable to print data
+H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
+ #000: (file name) line (number) in h5tools_dump_simple_dset(): H5Dread failed
+ major: Failure in tools library
+ minor: error in function
diff --git a/tools/h5dump/errfiles/tall-1.err b/tools/h5dump/errfiles/tall-1.err
new file mode 100644
index 0000000..ba691d0
--- /dev/null
+++ b/tools/h5dump/errfiles/tall-1.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/tall-2A.err b/tools/h5dump/errfiles/tall-2A.err
new file mode 100644
index 0000000..ba691d0
--- /dev/null
+++ b/tools/h5dump/errfiles/tall-2A.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/tall-2B.err b/tools/h5dump/errfiles/tall-2B.err
new file mode 100644
index 0000000..ba691d0
--- /dev/null
+++ b/tools/h5dump/errfiles/tall-2B.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/tarray1_big.err b/tools/h5dump/errfiles/tarray1_big.err
new file mode 100644
index 0000000..457afdd
--- /dev/null
+++ b/tools/h5dump/errfiles/tarray1_big.err
@@ -0,0 +1,67 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
+ #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
+ #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
+ #002: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
diff --git a/tools/h5dump/errfiles/tattr-3.err b/tools/h5dump/errfiles/tattr-3.err
new file mode 100644
index 0000000..ce8ddda
--- /dev/null
+++ b/tools/h5dump/errfiles/tattr-3.err
@@ -0,0 +1,8 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Aopen(): unable to load attribute info from object header for attribute: 'attr'
+ major: Attribute
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5O_attr_open_by_name(): can't locate attribute: 'attr'
+ major: Attribute
+ minor: Object not found
+h5dump error: unable to open attribute "attr"
diff --git a/tools/h5dump/errfiles/tattrregR.err b/tools/h5dump/errfiles/tattrregR.err
new file mode 100644
index 0000000..7ab9afd
--- /dev/null
+++ b/tools/h5dump/errfiles/tattrregR.err
@@ -0,0 +1,45 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
+ #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
+ #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
diff --git a/tools/h5dump/errfiles/tcomp-3.err b/tools/h5dump/errfiles/tcomp-3.err
new file mode 100644
index 0000000..ee47ee5
--- /dev/null
+++ b/tools/h5dump/errfiles/tcomp-3.err
@@ -0,0 +1,16 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Topen2(): not found
+ major: Datatype
+ minor: Object not found
+ #001: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5G_loc_find_cb(): object '#6632' doesn't exist
+ major: Symbol table
+ minor: Object not found
diff --git a/tools/h5dump/errfiles/tdataregR.err b/tools/h5dump/errfiles/tdataregR.err
new file mode 100644
index 0000000..7ab9afd
--- /dev/null
+++ b/tools/h5dump/errfiles/tdataregR.err
@@ -0,0 +1,45 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Rdereference2(): unable to dereference object
+ major: References
+ minor: Unable to initialize object
+ #001: (file name) line (number) in H5R_dereference(): Unable to read dataset region information
+ major: References
+ minor: Read failed
+ #002: (file name) line (number) in H5HG_read(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #003: (file name) line (number) in H5HG_protect(): unable to protect global heap
+ major: Heap
+ minor: Unable to protect metadata
+ #004: (file name) line (number) in H5AC_protect(): H5C_protect() failed.
+ major: Object cache
+ minor: Unable to protect metadata
+ #005: (file name) line (number) in H5C_protect(): incorrect cache entry type
+ major: Object cache
+ minor: Inappropriate type
+H5tools-DIAG: Error detected in HDF5:tools (version (number)) thread (IDs):
+ #000: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
+ #001: (file name) line (number) in h5tools_dump_simple_data(): H5Rdereference failed
+ major: Failure in tools library
+ minor: error in function
diff --git a/tools/h5dump/errfiles/tdset-2.err b/tools/h5dump/errfiles/tdset-2.err
new file mode 100644
index 0000000..d9b92f3
--- /dev/null
+++ b/tools/h5dump/errfiles/tdset-2.err
@@ -0,0 +1,33 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Dopen2(): not found
+ major: Dataset
+ minor: Object not found
+ #001: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5G_loc_find_cb(): object 'dset3' doesn't exist
+ major: Symbol table
+ minor: Object not found
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Lget_info(): unable to get link info
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5L_get_info(): name doesn't exist
+ major: Symbol table
+ minor: Object already exists
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist
+ major: Symbol table
+ minor: Object not found
+h5dump error: unable to get link info from "dset3"
diff --git a/tools/h5dump/errfiles/texceedsubblock.err b/tools/h5dump/errfiles/texceedsubblock.err
new file mode 100644
index 0000000..4c87ab9
--- /dev/null
+++ b/tools/h5dump/errfiles/texceedsubblock.err
@@ -0,0 +1 @@
+h5dump error: number of block dims (2) exceed dataset dims (1)
diff --git a/tools/h5dump/errfiles/texceedsubcount.err b/tools/h5dump/errfiles/texceedsubcount.err
new file mode 100644
index 0000000..de1c9d1
--- /dev/null
+++ b/tools/h5dump/errfiles/texceedsubcount.err
@@ -0,0 +1 @@
+h5dump error: number of count dims (2) exceed dataset dims (1)
diff --git a/tools/h5dump/errfiles/texceedsubstart.err b/tools/h5dump/errfiles/texceedsubstart.err
new file mode 100644
index 0000000..4555224
--- /dev/null
+++ b/tools/h5dump/errfiles/texceedsubstart.err
@@ -0,0 +1 @@
+h5dump error: number of start dims (2) exceed dataset dims (1)
diff --git a/tools/h5dump/errfiles/texceedsubstride.err b/tools/h5dump/errfiles/texceedsubstride.err
new file mode 100644
index 0000000..32d5725
--- /dev/null
+++ b/tools/h5dump/errfiles/texceedsubstride.err
@@ -0,0 +1 @@
+h5dump error: number of stride dims (2) exceed dataset dims (1)
diff --git a/tools/h5dump/errfiles/textlink.err b/tools/h5dump/errfiles/textlink.err
new file mode 100644
index 0000000..03c0550
--- /dev/null
+++ b/tools/h5dump/errfiles/textlink.err
@@ -0,0 +1,50 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'filename', temp_file_name = 'filename'
+ major: Links
+ minor: Unable to open file
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'anotherfile', temp_file_name = 'anotherfile'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/textlinkfar.err b/tools/h5dump/errfiles/textlinkfar.err
new file mode 100644
index 0000000..969e17c
--- /dev/null
+++ b/tools/h5dump/errfiles/textlinkfar.err
@@ -0,0 +1,243 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #008: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #010: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #011: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #013: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #015: (file name) line (number) in H5G_traverse_slink_cb(): component not found
+ major: Symbol table
+ minor: Object not found
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #005: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #006: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #007: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #008: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #012: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #013: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #015: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #019: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #020: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #021: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #022: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #026: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #027: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #028: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #029: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #031: (file name) line (number) in H5G__traverse_special(): too many links
+ major: Links
+ minor: Too many soft links in path
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #005: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #006: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #007: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #008: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #012: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #013: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #015: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #019: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #020: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #021: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #022: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #026: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #027: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #028: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #029: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #031: (file name) line (number) in H5G__traverse_special(): too many links
+ major: Links
+ minor: Too many soft links in path
diff --git a/tools/h5dump/errfiles/textlinksrc.err b/tools/h5dump/errfiles/textlinksrc.err
new file mode 100644
index 0000000..969e17c
--- /dev/null
+++ b/tools/h5dump/errfiles/textlinksrc.err
@@ -0,0 +1,243 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #008: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #010: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #011: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #013: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #015: (file name) line (number) in H5G_traverse_slink_cb(): component not found
+ major: Symbol table
+ minor: Object not found
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #005: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #006: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #007: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #008: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #012: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #013: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #015: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #019: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #020: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #021: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #022: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #026: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #027: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #028: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #029: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #031: (file name) line (number) in H5G__traverse_special(): too many links
+ major: Links
+ minor: Too many soft links in path
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #003: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #004: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #005: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #006: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #007: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #008: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #009: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #010: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #011: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #012: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #013: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #014: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #015: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #016: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #017: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #018: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #019: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #020: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #021: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #022: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #023: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #024: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #025: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #026: (file name) line (number) in H5L_extern_traverse(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #027: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #028: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #029: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #030: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #031: (file name) line (number) in H5G__traverse_special(): too many links
+ major: Links
+ minor: Too many soft links in path
diff --git a/tools/h5dump/errfiles/tgroup-2.err b/tools/h5dump/errfiles/tgroup-2.err
new file mode 100644
index 0000000..3659b5c
--- /dev/null
+++ b/tools/h5dump/errfiles/tgroup-2.err
@@ -0,0 +1,20 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Gopen2(): unable to open group
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5G__open_name(): group not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #005: (file name) line (number) in H5G_loc_find_cb(): object 'y' doesn't exist
+ major: Symbol table
+ minor: Object not found
+h5dump error: unable to open group "/y"
diff --git a/tools/h5dump/errfiles/tnofilename-with-packed-bits.err b/tools/h5dump/errfiles/tnofilename-with-packed-bits.err
new file mode 100644
index 0000000..84a7011
--- /dev/null
+++ b/tools/h5dump/errfiles/tnofilename-with-packed-bits.err
@@ -0,0 +1 @@
+h5dump error: missing file name
diff --git a/tools/h5dump/errfiles/torderlinks1.err b/tools/h5dump/errfiles/torderlinks1.err
new file mode 100644
index 0000000..780c7e6
--- /dev/null
+++ b/tools/h5dump/errfiles/torderlinks1.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/torderlinks2.err b/tools/h5dump/errfiles/torderlinks2.err
new file mode 100644
index 0000000..780c7e6
--- /dev/null
+++ b/tools/h5dump/errfiles/torderlinks2.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Oopen(): unable to open object
+ major: Symbol table
+ minor: Can't open object
+ #001: (file name) line (number) in H5O_open_name(): object not found
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #004: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #006: (file name) line (number) in H5G_traverse_ud(): traversal callback returned invalid ID
+ major: Symbol table
+ minor: Unable to find atom information (already closed?)
+ #007: (file name) line (number) in H5L_extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname'
+ major: Links
+ minor: Unable to open file
diff --git a/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err b/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err
new file mode 100644
index 0000000..e5854ea
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsCharLengthExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err
new file mode 100644
index 0000000..e5854ea
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsCharOffsetExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/h5dump/errfiles/tpbitsIncomplete.err b/tools/h5dump/errfiles/tpbitsIncomplete.err
new file mode 100644
index 0000000..e0abee5
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsIncomplete.err
@@ -0,0 +1 @@
+h5dump error: Bad mask list(0,2,2,1,0,2,2,)
diff --git a/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err b/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err
new file mode 100644
index 0000000..7dd88ed
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsIntLengthExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err
new file mode 100644
index 0000000..7dd88ed
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsIntOffsetExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/h5dump/errfiles/tpbitsLengthExceeded.err b/tools/h5dump/errfiles/tpbitsLengthExceeded.err
new file mode 100644
index 0000000..d4673f2
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsLengthExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(65) too large. Max is 64
diff --git a/tools/h5dump/errfiles/tpbitsLengthPositive.err b/tools/h5dump/errfiles/tpbitsLengthPositive.err
new file mode 100644
index 0000000..4928007
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsLengthPositive.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit length value(0) must be positive.
diff --git a/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err b/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err
new file mode 100644
index 0000000..0318f79
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsLongLengthExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(33) too large. Max is 32
diff --git a/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err
new file mode 100644
index 0000000..0318f79
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsLongOffsetExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset+length value(33) too large. Max is 32
diff --git a/tools/h5dump/errfiles/tpbitsMaxExceeded.err b/tools/h5dump/errfiles/tpbitsMaxExceeded.err
new file mode 100644
index 0000000..a8d12fc
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsMaxExceeded.err
@@ -0,0 +1 @@
+h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1)
diff --git a/tools/h5dump/errfiles/tpbitsOffsetExceeded.err b/tools/h5dump/errfiles/tpbitsOffsetExceeded.err
new file mode 100644
index 0000000..b7d6dad
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsOffsetExceeded.err
@@ -0,0 +1 @@
+h5dump error: Packed Bit offset value(64) must be between 0 and 63
diff --git a/tools/h5dump/errfiles/tpbitsOffsetNegative.err b/tools/h5dump/errfiles/tpbitsOffsetNegative.err
new file mode 100644
index 0000000..8a027c1
--- /dev/null
+++ b/tools/h5dump/errfiles/tpbitsOffsetNegative.err
@@ -0,0 +1 @@
+h5dump error: Bad mask list(-1,1)
diff --git a/tools/h5dump/errfiles/tperror.err b/tools/h5dump/errfiles/tperror.err
new file mode 100644
index 0000000..19a7a73
--- /dev/null
+++ b/tools/h5dump/errfiles/tperror.err
@@ -0,0 +1,33 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Dopen2(): not found
+ major: Dataset
+ minor: Object not found
+ #001: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5G_loc_find_cb(): object 'bogus' doesn't exist
+ major: Symbol table
+ minor: Object not found
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Lget_info(): unable to get link info
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5L_get_info(): name doesn't exist
+ major: Symbol table
+ minor: Object already exists
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist
+ major: Symbol table
+ minor: Object not found
+h5dump error: unable to get link info from "bogus"
diff --git a/tools/h5dump/errfiles/tqmarkfile.err b/tools/h5dump/errfiles/tqmarkfile.err
new file mode 100644
index 0000000..06519fb
--- /dev/null
+++ b/tools/h5dump/errfiles/tqmarkfile.err
@@ -0,0 +1,33 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Dopen2(): not found
+ major: Dataset
+ minor: Object not found
+ #001: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5G_loc_find_cb(): object 'Dataset1' doesn't exist
+ major: Symbol table
+ minor: Object not found
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Lget_info(): unable to get link info
+ major: Symbol table
+ minor: Object not found
+ #001: (file name) line (number) in H5L_get_info(): name doesn't exist
+ major: Symbol table
+ minor: Object already exists
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #004: (file name) line (number) in H5L_get_info_cb(): name doesn't exist
+ major: Symbol table
+ minor: Object not found
+h5dump error: unable to get link info from "Dataset1"
diff --git a/tools/h5dump/errfiles/tslink-D.err b/tools/h5dump/errfiles/tslink-D.err
new file mode 100644
index 0000000..b98e324
--- /dev/null
+++ b/tools/h5dump/errfiles/tslink-D.err
@@ -0,0 +1,25 @@
+HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
+ #000: (file name) line (number) in H5Dopen2(): not found
+ major: Dataset
+ minor: Object not found
+ #001: (file name) line (number) in H5G_loc_find(): can't find object
+ major: Symbol table
+ minor: Object not found
+ #002: (file name) line (number) in H5G_traverse(): internal path traversal failed
+ major: Symbol table
+ minor: Object not found
+ #003: (file name) line (number) in H5G_traverse_real(): special link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #004: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed
+ major: Links
+ minor: Link traversal failure
+ #005: (file name) line (number) in H5G_traverse_slink(): unable to follow symbolic link
+ major: Symbol table
+ minor: Object not found
+ #006: (file name) line (number) in H5G_traverse_real(): traversal operator failed
+ major: Symbol table
+ minor: Callback failed
+ #007: (file name) line (number) in H5G_traverse_slink_cb(): component not found
+ major: Symbol table
+ minor: Object not found
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 2799d95..23fd1d9 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -71,11 +71,11 @@ struct handler_t {
*/
/* The following initialization makes use of C language cancatenating */
/* "xxx" "yyy" into "xxxyyy". */
-static const char *s_opts = "hnpeyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RECM:";
+static const char *s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RECM:";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "hel", no_arg, 'h' },
- { "contents", no_arg, 'n' },
+ { "contents", optional_arg, 'n' },
{ "properties", no_arg, 'p' },
{ "boot-block", no_arg, 'B' },
{ "boot-bloc", no_arg, 'B' },
@@ -235,6 +235,7 @@ usage(const char *prog)
HDfprintf(rawoutstream, " OPTIONS\n");
HDfprintf(rawoutstream, " -h, --help Print a usage message and exit\n");
HDfprintf(rawoutstream, " -n, --contents Print a list of the file contents and exit\n");
+ HDfprintf(rawoutstream, " Optional value 1 also prints attributes.\n");
HDfprintf(rawoutstream, " -B, --superblock Print the content of the super block\n");
HDfprintf(rawoutstream, " -H, --header Print the header only; no data is displayed\n");
HDfprintf(rawoutstream, " -A, --onlyattr Print the header and value of attributes\n");
@@ -296,10 +297,20 @@ usage(const char *prog)
HDfprintf(rawoutstream, " number of dimensions in the dataspace being queried\n");
HDfprintf(rawoutstream, "\n");
HDfprintf(rawoutstream, " D - is the file driver to use in opening the file. Acceptable values\n");
- HDfprintf(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n");
- HDfprintf(rawoutstream, " the file driver flag, the file will be opened with each driver in\n");
- HDfprintf(rawoutstream, " turn and in the order specified above until one driver succeeds\n");
- HDfprintf(rawoutstream, " in opening the file.\n");
+ HDfprintf(rawoutstream, " are \"sec2\", \"family\", \"split\", \"multi\", \"direct\", and \"stream\". Without\n");
+ HDfprintf(rawoutstream, " the file driver flag, the file will be opened with each driver in\n");
+ HDfprintf(rawoutstream, " turn and in the order specified above until one driver succeeds\n");
+ HDfprintf(rawoutstream, " in opening the file.\n");
+ HDfprintf(rawoutstream, " These are the letters that are appended to the file name(without .h5) when opening\n");
+ HDfprintf(rawoutstream, " names for the split(m,r) and multi(s,b,r,g,l,o) drivers. They are:\n");
+ HDfprintf(rawoutstream, " m: All meta data when using the split driver.\n");
+ HDfprintf(rawoutstream, " s: The userblock, superblock, and driver info block\n");
+ HDfprintf(rawoutstream, " b: B-tree nodes\n");
+ HDfprintf(rawoutstream, " r: Dataset raw data\n");
+ HDfprintf(rawoutstream, " g: Global heap\n");
+ HDfprintf(rawoutstream, " l: local heap (object names)\n");
+ HDfprintf(rawoutstream, " o: object headers\n");
+ HDfprintf(rawoutstream, "\n");
HDfprintf(rawoutstream, " F - is a filename.\n");
HDfprintf(rawoutstream, " P - is the full path from the root group to the object.\n");
HDfprintf(rawoutstream, " N - is an integer greater than 1.\n");
@@ -336,9 +347,13 @@ usage(const char *prog)
HDfprintf(rawoutstream, "\n");
HDfprintf(rawoutstream, " h5dump -d /dset -M 0,1,4,3 quux.h5\n");
HDfprintf(rawoutstream, "\n");
- HDfprintf(rawoutstream, " 5) Dataset foo in files multi1.h5 multi2.h5 multi3.h5\n");
+ HDfprintf(rawoutstream, " 5) Dataset foo in files file1.h5 file2.h5 file3.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -d /foo file1.h5 file2.h5 file3.h5\n");
HDfprintf(rawoutstream, "\n");
- HDfprintf(rawoutstream, " h5dump -d /foo multi1.h5 multi2.h5 multi3.h5\n");
+ HDfprintf(rawoutstream, " 6) Dataset foo in split files splitfile-m.h5 splitfile-r.h5\n");
+ HDfprintf(rawoutstream, "\n");
+ HDfprintf(rawoutstream, " h5dump -d /foo -f split splitfile\n");
HDfprintf(rawoutstream, "\n");
}
@@ -999,6 +1014,9 @@ parse_start:
case 'n':
display_fi = TRUE;
last_was_dset = FALSE;
+ if ( opt_arg != NULL) {
+ h5trav_set_verbose(HDatoi(opt_arg));
+ }
break;
case 'p':
display_dcpl = TRUE;
@@ -1035,6 +1053,9 @@ parse_start:
break;
case 'w':
h5tools_nCols = HDatoi(opt_arg);
+ if (h5tools_nCols==0) {
+ h5tools_nCols = 65535;
+ }
last_was_dset = FALSE;
break;
case 'a':
@@ -1461,6 +1482,9 @@ main(int argc, const char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+ /* Initialize indexing options */
+ h5trav_set_index(sort_by, sort_order);
+
while(opt_ind < argc) {
fname = HDstrdup(argv[opt_ind++]);
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index b8deaf9..6f5fd3f 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -543,6 +543,56 @@ done:
}
/*-------------------------------------------------------------------------
+ * Function: attr_iteration
+ *
+ * Purpose: Iterate and display attributes within the specified group
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+attr_iteration(hid_t gid, unsigned attr_crt_order_flags)
+{
+ /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
+ in the group for attributes, then, sort by creation order, otherwise by name */
+
+ if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) {
+ if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) {
+ error_msg("error getting attribute information\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ } /* end if */
+ } /* end if */
+ else {
+ if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) {
+ error_msg("error getting attribute information\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ } /* end if */
+ } /* end else */
+}
+
+/*-------------------------------------------------------------------------
+ * Function: link_iteration
+ *
+ * Purpose: Iterate and display links within the specified group
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+link_iteration(hid_t gid, unsigned crt_order_flags)
+{
+
+ /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
+ in the group, then, sort by creation order, otherwise by name */
+ if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
+ H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
+ else
+ H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
+}
+
+/*-------------------------------------------------------------------------
* Function: dump_named_datatype
*
* Purpose: Dump named datatype
@@ -659,21 +709,7 @@ dump_named_datatype(hid_t tid, const char *name)
/* print attributes */
dump_indent += COL;
- /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the datatype's create property list for attributes, then, sort by creation order, otherwise by name */
-
- if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) {
- if(H5Aiterate2(tid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end if */
- else {
- if(H5Aiterate2(tid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end else */
+ attr_iteration(tid, attr_crt_order_flags);
dump_indent -= COL;
@@ -829,53 +865,13 @@ dump_group(hid_t gid, const char *name)
}
else {
found_obj->displayed = TRUE;
- /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the group for attributes, then, sort by creation order, otherwise by name */
-
- if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) {
- if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end if */
- else {
- if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end else */
-
- /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the group, then, sort by creation order, otherwise by name */
- if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
- H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
- else
- H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
+ attr_iteration(gid, attr_crt_order_flags);
+ link_iteration(gid, crt_order_flags);
}
}
else {
- /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the group for attributes, then, sort by creation order, otherwise by name */
-
- if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) {
- if(H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end if */
- else {
- if(H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end else */
-
- /* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the group, then, sort by creation order, otherwise by name */
- if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
- H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
- else
- H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
+ attr_iteration(gid, attr_crt_order_flags);
+ link_iteration(gid, crt_order_flags);
}
dump_indent -= COL;
@@ -1050,20 +1046,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
H5Tclose(type);
if (!bin_output) {
- /* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
- in the group for attributes, then, sort by creation order, otherwise by name */
- if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED)) {
- if(H5Aiterate2(did, sort_by, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end if */
- else {
- if(H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL) < 0) {
- error_msg("error getting attribute information\n");
- h5tools_setstatus(EXIT_FAILURE);
- } /* end if */
- } /* end else */
+ attr_iteration(did, attr_crt_order_flags);
}
ctx.indent_level--;
dump_indent -= COL;
@@ -1488,15 +1471,18 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if(sset) {
unsigned int i;
+ unsigned int ndims;
hid_t sid = H5Dget_space(dsetid);
- int ndims = H5Sget_simple_extent_ndims(sid);
+ int ndims_res = H5Sget_simple_extent_ndims(sid);
H5Sclose(sid);
- if(ndims < 0) {
+ if(ndims_res < 0) {
error_msg("H5Sget_simple_extent_ndims failed\n");
h5tools_setstatus(EXIT_FAILURE);
return;
}
+ else
+ ndims = ndims_res;
if(!sset->start.data || !sset->stride.data || !sset->count.data || !sset->block.data) {
/* they didn't specify a ``stride'' or ``block''. default to 1 in all
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 1b247f1..1a29659 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -1781,7 +1781,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
hsize_t nelmts = 1;
int ndims;
int i;
- int depth;
int status = -1;
int stdindent = COL; /* should be 3 */
void *buf = NULL;
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index a37f908..b8ea020 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -97,11 +97,12 @@
#define FILE65 "file_space.h5"
#define FILE66 "packedbits.h5"
#define FILE67 "zerodim.h5"
-#define FILE68a "tdset_idx.h5"
#define FILE68 "charsets.h5"
+#define FILE68a "tdset_idx.h5"
#define FILE69 "tattrintsize.h5"
#define FILE70 "tcmpdintsize.h5"
#define FILE71 "tcmpdattrintsize.h5"
+#define FILE72 "tnestedcmpddt.h5"
/*-------------------------------------------------------------------------
* prototypes
@@ -113,16 +114,16 @@ static int
make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t tid, hid_t dcpl, void *buf);
static int
write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
- hid_t tid, void *buf);
+ hid_t tid, void *buf);
static int
write_dset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name,
- hid_t tid, void *buf );
+ hid_t tid, void *buf );
/* a filter operation callback function */
static size_t
myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
- const unsigned int UNUSED *cd_values, size_t nbytes,
- size_t UNUSED *buf_size, void UNUSED **buf);
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t UNUSED *buf_size, void UNUSED **buf);
/* a "set local" callback */
static herr_t
@@ -132,35 +133,35 @@ set_local_myfilter(hid_t dcpl_id, hid_t tid, hid_t UNUSED sid);
/* This message derives from H5Z */
const H5Z_class2_t H5Z_MYFILTER[1] = {{
- H5Z_CLASS_T_VERS,
- MYFILTER_ID, /* Filter id number */
- 1, 1,
- "myfilter", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- set_local_myfilter, /* The "set local" callback */
- myfilter, /* The actual filter function */
+ H5Z_CLASS_T_VERS,
+ MYFILTER_ID, /* Filter id number */
+ 1, 1,
+ "myfilter", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ set_local_myfilter, /* The "set local" callback */
+ myfilter, /* The actual filter function */
}};
/* A UD link traversal function. Shouldn't actually be called. */
static hid_t UD_traverse(UNUSED const char * link_name, UNUSED hid_t cur_group,
- UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
+ UNUSED const void * udata, UNUSED size_t udata_size, UNUSED hid_t lapl_id)
{
-return -1;
+ return -1;
}
#define MY_LINKCLASS 187
const H5L_class_t UD_link_class[1] = {{
- H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
- (H5L_type_t)MY_LINKCLASS, /* Link type id number */
- "UD link class", /* name for debugging */
- NULL, /* Creation callback */
- NULL, /* Move/rename callback */
- NULL, /* Copy callback */
- UD_traverse, /* The actual traversal function */
- NULL, /* Deletion callback */
- NULL /* Query callback */
+ H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */
+ (H5L_type_t)MY_LINKCLASS, /* Link type id number */
+ "UD link class", /* name for debugging */
+ NULL, /* Creation callback */
+ NULL, /* Move/rename callback */
+ NULL, /* Copy callback */
+ UD_traverse, /* The actual traversal function */
+ NULL, /* Deletion callback */
+ NULL /* Query callback */
}};
@@ -189,18 +190,18 @@ const H5L_class_t UD_link_class[1] = {{
#define POINT1_NPOINTS 10
typedef enum{
- RED,
- GREEN,
- BLUE,
- WHITE,
- BLACK
+ RED,
+ GREEN,
+ BLUE,
+ WHITE,
+ BLACK
} enumtype;
/* Compound datatype */
typedef struct s1_t {
- unsigned int a;
- unsigned int b;
- float c;
+ unsigned int a;
+ unsigned int b;
+ float c;
} s1_t;
@@ -262,7 +263,7 @@ typedef struct s1_t {
#define STRATEGY H5F_FILE_SPACE_AGGR_VFD /* File space handling strategy */
#define THRESHOLD10 10 /* Free space section threshold */
-/* "FILE66" macros */
+/* "FILE66" macros and for FILE69 */
#define F66_XDIM 8
#define F66_DATASETU08 "DU08BITS"
#define F66_DATASETS08 "DS08BITS"
@@ -279,14 +280,14 @@ typedef struct s1_t {
#define F66_DUMMYDBL "DummyDBL"
/* Declarations for gent_dataset_idx() for "FILE68a" */
-#define DSET_FIXED "dset_fixed"
-#define DSET_FIXED_FILTER "dset_filter"
-#define DSET_BTREE "dset_btree"
-#define DIM200 200
-#define DIM100 100
-#define DIM20 20
-#define DIM10 10
-#define CHUNK 5
+#define F68a_DSET_FIXED "dset_fixed"
+#define F68a_DSET_FIXED_FILTER "dset_filter"
+#define F68a_DSET_BTREE "dset_btree"
+#define F68a_DIM200 200
+#define F68a_DIM100 100
+#define F68a_DIM20 20
+#define F68a_DIM10 10
+#define F68a_CHUNK 5
/* "FILE70" macros and for FILE71 */
/* Name of dataset to create in datafile */
@@ -374,8 +375,8 @@ gent_dataset(void)
dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- for(j = 0; j < 20; j++)
- dset1[i][j] = j + i;
+ for(j = 0; j < 20; j++)
+ dset1[i][j] = j + i;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
@@ -387,8 +388,8 @@ gent_dataset(void)
dataset = H5Dcreate2(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 30; i++)
- for(j = 0; j < 20; j++)
- dset2[i][j] = 0.0001 * j + i;
+ for(j = 0; j < 20; j++)
+ dset2[i][j] = 0.0001 * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
@@ -419,8 +420,8 @@ gent_dataset2(void)
dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- for(j = 0; j < 20; j++)
- dset1[i][j] = j;
+ for(j = 0; j < 20; j++)
+ dset1[i][j] = j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
H5Sclose(space);
@@ -433,8 +434,8 @@ gent_dataset2(void)
dataset = H5Dcreate2(fid, "/dset2", H5T_IEEE_F64BE, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
for(i = 0; i < 30; i++)
- for(j = 0; j < 10; j++)
- dset2[i][j] = j;
+ for(j = 0; j < 10; j++)
+ dset2[i][j] = j;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
@@ -547,9 +548,9 @@ static int gent_softlink2(void)
int data2[NX][NY] = {{0,0},{0,1},{0,2},{3,3}};
herr_t status = SUCCEED;
- /*-----------------------------------------------------------------------
- * FILE
- *------------------------------------------------------------------------*/
+ /*-----------------------------------------------------------------------
+ * FILE
+ *------------------------------------------------------------------------*/
/* Create a new file */
fileid1 = H5Fcreate(FILE4_1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fileid1 < 0)
@@ -559,9 +560,9 @@ static int gent_softlink2(void)
goto out;
}
- /*-----------------------------------------------------------------------
- * Groups
- *------------------------------------------------------------------------*/
+ /*-----------------------------------------------------------------------
+ * Groups
+ *------------------------------------------------------------------------*/
gid1 = H5Gcreate2(fileid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid1 < 0)
{
@@ -578,9 +579,9 @@ static int gent_softlink2(void)
goto out;
}
- /*-----------------------------------------------------------------------
- * Named datatype
- *------------------------------------------------------------------------*/
+ /*-----------------------------------------------------------------------
+ * Named datatype
+ *------------------------------------------------------------------------*/
datatype = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(fileid1, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
@@ -590,9 +591,9 @@ static int gent_softlink2(void)
goto out;
}
- /*-----------------------------------------------------------------------
- * Datasets
- *------------------------------------------------------------------------*/
+ /*-----------------------------------------------------------------------
+ * Datasets
+ *------------------------------------------------------------------------*/
/*
* Describe the size of the array and create the data space for fixed
* size dataset.
@@ -610,7 +611,7 @@ static int gent_softlink2(void)
*/
/* Create a new dataset as sample object */
dset1 = H5Dcreate2(fileid1, "/dset1", H5T_NATIVE_INT, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset1 < 0)
{
fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
@@ -631,7 +632,7 @@ static int gent_softlink2(void)
*/
/* Create a new dataset as sample object */
dset2 = H5Dcreate2(fileid1, "/dset2", H5T_NATIVE_INT, dataspace,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset2 < 0)
{
fprintf(stderr, "Error: %s> H5Dcreate2 failed.\n", FILE4_1);
@@ -647,9 +648,9 @@ static int gent_softlink2(void)
goto out;
}
- /*-----------------------------------------------------------------------
- * Soft links
- *------------------------------------------------------------------------*/
+ /*-----------------------------------------------------------------------
+ * Soft links
+ *------------------------------------------------------------------------*/
/*
* create various soft links under '/' root
*/
@@ -746,7 +747,7 @@ static int gent_softlink2(void)
goto out;
}
-out:
+ out:
/*
* Close/release resources.
*/
@@ -793,7 +794,7 @@ out:
dset2 g1.1
|
dset3
-*/
+ */
static void gent_hardlink(void)
{
@@ -824,7 +825,7 @@ static void gent_hardlink(void)
H5Lcreate_hard(group, "/g2", H5L_SAME_LOC, "g1.1", H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group);
- /* create a link to the root group */
+ /* create a link to the root group */
H5Lcreate_hard(fid, "/", H5L_SAME_LOC, "g3", H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(fid);
}
@@ -865,38 +866,38 @@ static void gent_udlink(void)
|
dset2
-*/
+ */
static void gent_compound_dt(void) { /* test compound data type */
hid_t fid, group, dataset, space, space3, type, type2;
hid_t array_dt;
typedef struct {
- int a;
- float b;
- double c;
+ int a;
+ float b;
+ double c;
} dset1_t;
dset1_t dset1[5];
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset2_t;
dset2_t dset2[5];
typedef struct {
- int a[4];
- float b[5][6];
+ int a[4];
+ float b[5][6];
} dset3_t;
dset3_t dset3[3][6];
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset4_t;
dset4_t dset4[5];
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset5_t;
dset5_t dset5[5];
@@ -990,13 +991,13 @@ static void gent_compound_dt(void) { /* test compound data type */
space3 = H5Screate_simple(2, dset3_dim, NULL);
dataset = H5Dcreate2(group, "dset3", type, space3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < (int)dset3_dim[0]; i++)
- for(j = 0; j < (int)dset3_dim[1]; j++) {
- for(k = 0; k < 4; k++)
- dset3[i][j].a[k] = k + j + i;
- for(k = 0; k < 5; k++)
- for(l = 0; l < 6; l++)
- dset3[i][j].b[k][l] = (float)((k + 1) + l + j + i);
- }
+ for(j = 0; j < (int)dset3_dim[1]; j++) {
+ for(k = 0; k < 4; k++)
+ dset3[i][j].a[k] = k + j + i;
+ for(k = 0; k < 5; k++)
+ for(l = 0; l < 6; l++)
+ dset3[i][j].b[k][l] = (float)((k + 1) + l + j + i);
+ }
H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3);
H5Sclose(space3);
H5Tclose(type);
@@ -1051,38 +1052,38 @@ static void gent_compound_dt(void) { /* test compound data type */
|
dset2
-*/
+ */
static void gent_compound_dt2(void) { /* test compound data type */
hid_t fid, group, dataset, space, type, create_plist, type2;
hid_t array_dt;
typedef struct {
- int a;
- float b;
- double c;
+ int a;
+ float b;
+ double c;
} dset1_t;
dset1_t dset1[10];
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset2_t;
dset2_t dset2[10];
typedef struct {
- int a[4];
- float b[5][6];
+ int a[4];
+ float b[5][6];
} dset3_t;
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset4_t;
dset4_t dset4[10];
typedef struct {
- int a;
- float b;
+ int a;
+ float b;
} dset5_t;
dset5_t dset5[10];
@@ -1237,7 +1238,7 @@ g1.2 : g1.2.1 extlink
g1.2.1 : slink
g2 : dset2.1 dset2.2 udlink
-*/
+ */
static void gent_all(void)
{
@@ -1379,7 +1380,7 @@ static void gent_all(void)
o - group objects
-*/
+ */
static void gent_loop(void) {
hid_t fid, group;
@@ -1429,7 +1430,7 @@ static void gent_loop2(void)
| | (g1) (dset2) (dset3) (elink) udlink
dset1 link1 slink6
(dset1) (udlink)
-*/
+ */
static void
gent_many(void)
@@ -1446,9 +1447,9 @@ gent_many(void)
hsize_t sdim, maxdim;
typedef struct { /* compound type has members with rank > 1 */
- int a[2][2][2][2]; /* arrays are 2x2x2x2 */
- double b[2][2][2][2];
- double c[2][2][2][2];
+ int a[2][2][2][2]; /* arrays are 2x2x2x2 */
+ double b[2][2][2][2];
+ double c[2][2][2][2];
} dset1_t;
dset1_t dset1[6];
@@ -1628,13 +1629,13 @@ gent_many(void)
}
static hid_t mkstr(int size, H5T_str_t pad) {
-hid_t type;
+ hid_t type;
- if((type=H5Tcopy(H5T_C_S1)) < 0) return -1;
- if(H5Tset_size(type, (size_t)size) < 0) return -1;
- if(H5Tset_strpad(type, pad) < 0) return -1;
+ if((type=H5Tcopy(H5T_C_S1)) < 0) return -1;
+ if(H5Tset_size(type, (size_t)size) < 0) return -1;
+ if(H5Tset_strpad(type, pad) < 0) return -1;
- return type;
+ return type;
}
static void gent_str(void) {
@@ -1643,131 +1644,131 @@ static void gent_str(void) {
hsize_t dims1[] = { 3, 4};
char string1[12][3] = {"s1","s2","s3","s4","s5","s6","s7","s8","s9",
- "s0","s1","s2"};
+ "s0","s1","s2"};
hsize_t dims2[]={20};
char string2[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4",
- "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8",
- "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2",
- "ab cd ef3", "ab cd ef4", "ab cd ef5", "ab cd ef6",
- "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"};
+ "ab cd ef5", "ab cd ef6", "ab cd ef7", "ab cd ef8",
+ "ab cd ef9", "ab cd ef0", "ab cd ef1", "ab cd ef2",
+ "ab cd ef3", "ab cd ef4", "ab cd ef5", "ab cd ef6",
+ "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"};
hsize_t dims3[] = { 27};
char string3[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3",
- "abcd4", "abcd5", "abcd6", "abcd7",
- "abcd8", "abcd9", "abcd0", "abcd1",
- "abcd2", "abcd3", "abcd4", "abcd5",
- "abcd6", "abcd7", "abcd8", "abcd9",
- "abcd0", "abcd1", "abcd2", "abcd3",
- "abcd4", "abcd5", "abcd6"};
+ "abcd4", "abcd5", "abcd6", "abcd7",
+ "abcd8", "abcd9", "abcd0", "abcd1",
+ "abcd2", "abcd3", "abcd4", "abcd5",
+ "abcd6", "abcd7", "abcd8", "abcd9",
+ "abcd0", "abcd1", "abcd2", "abcd3",
+ "abcd4", "abcd5", "abcd6"};
int i, j, k, l;
hsize_t dims4[] = { 3 };
char string4[3][21] = { "s1234567890123456789", "s1234567890123456789",
- "s1234567890123456789"};
+ "s1234567890123456789"};
hsize_t dims5[] = { 3, 6};
typedef struct {
- int a[8][10];
- char s[12][33];
+ int a[8][10];
+ char s[12][33];
} compound_t;
compound_t comp1[3][6];
hsize_t mdims[2];
- fid = H5Fcreate(FILE13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- /* string 1 : nullterm string */
- space = H5Screate_simple(2, dims1, NULL);
- f_type = mkstr(5, H5T_STR_NULLTERM);
- m_type = mkstr(3, H5T_STR_NULLTERM);
- dataset = H5Dcreate2(fid, "/string1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string1);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Sclose(space);
- H5Dclose(dataset);
-
- /* string 2 : space pad string */
- space = H5Screate_simple(1, dims2, NULL);
- f_type = mkstr(11, H5T_STR_SPACEPAD);
- m_type = mkstr(10, H5T_STR_NULLTERM);
- dataset = H5Dcreate2(fid, "/string2", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string2);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Sclose(space);
- H5Dclose(dataset);
-
- /* string 3 : null pad string */
- space = H5Screate_simple(1, dims3, NULL);
- f_type = mkstr(8, H5T_STR_NULLPAD);
- m_type = mkstr(6, H5T_STR_NULLTERM);
- dataset = H5Dcreate2(fid, "/string3", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string3);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Sclose(space);
- H5Dclose(dataset);
-
- /* string 4 : space pad long string */
- space = H5Screate_simple(1, dims4, NULL);
- f_type = mkstr(168, H5T_STR_SPACEPAD);
- m_type = mkstr(21, H5T_STR_NULLTERM);
- dataset = H5Dcreate2(fid, "/string4", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4);
- H5Tclose(m_type);
- H5Tclose(f_type);
- H5Sclose(space);
- H5Dclose(dataset);
-
- /* compound data */
- space = H5Screate_simple(2, dims5, NULL);
- f_type = H5Tcreate (H5T_COMPOUND, sizeof(compound_t));
- f_type2 = H5Tcreate (H5T_COMPOUND, sizeof(compound_t));
-
- mdims[0] = 8; mdims[1] = 10;
-
- array_dt = H5Tarray_create2(H5T_STD_I32BE, 2, mdims);
- H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt);
- H5Tclose(array_dt);
-
- array_dt = H5Tarray_create2(H5T_NATIVE_INT, 2, mdims);
- H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt);
- H5Tclose(array_dt);
-
- mdims[0] = 3; mdims[1] = 4;
-
- str_type = mkstr(32, H5T_STR_SPACEPAD);
- array_dt = H5Tarray_create2(str_type, 2, mdims);
- H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt);
- H5Tclose(array_dt);
- H5Tclose(str_type);
-
- str_type = mkstr(33, H5T_STR_NULLTERM);
- array_dt = H5Tarray_create2(str_type, 2, mdims);
- H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt);
- H5Tclose(array_dt);
- H5Tclose(str_type);
-
- for(i = 0; i < 3; i++)
- for(j = 0; j < 6; j++) {
- for(k = 0 ; k < 8; k++)
+ fid = H5Fcreate(FILE13, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* string 1 : nullterm string */
+ space = H5Screate_simple(2, dims1, NULL);
+ f_type = mkstr(5, H5T_STR_NULLTERM);
+ m_type = mkstr(3, H5T_STR_NULLTERM);
+ dataset = H5Dcreate2(fid, "/string1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string1);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* string 2 : space pad string */
+ space = H5Screate_simple(1, dims2, NULL);
+ f_type = mkstr(11, H5T_STR_SPACEPAD);
+ m_type = mkstr(10, H5T_STR_NULLTERM);
+ dataset = H5Dcreate2(fid, "/string2", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string2);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* string 3 : null pad string */
+ space = H5Screate_simple(1, dims3, NULL);
+ f_type = mkstr(8, H5T_STR_NULLPAD);
+ m_type = mkstr(6, H5T_STR_NULLTERM);
+ dataset = H5Dcreate2(fid, "/string3", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string3);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* string 4 : space pad long string */
+ space = H5Screate_simple(1, dims4, NULL);
+ f_type = mkstr(168, H5T_STR_SPACEPAD);
+ m_type = mkstr(21, H5T_STR_NULLTERM);
+ dataset = H5Dcreate2(fid, "/string4", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4);
+ H5Tclose(m_type);
+ H5Tclose(f_type);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
+ /* compound data */
+ space = H5Screate_simple(2, dims5, NULL);
+ f_type = H5Tcreate (H5T_COMPOUND, sizeof(compound_t));
+ f_type2 = H5Tcreate (H5T_COMPOUND, sizeof(compound_t));
+
+ mdims[0] = 8; mdims[1] = 10;
+
+ array_dt = H5Tarray_create2(H5T_STD_I32BE, 2, mdims);
+ H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt);
+ H5Tclose(array_dt);
+
+ array_dt = H5Tarray_create2(H5T_NATIVE_INT, 2, mdims);
+ H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt);
+ H5Tclose(array_dt);
+
+ mdims[0] = 3; mdims[1] = 4;
+
+ str_type = mkstr(32, H5T_STR_SPACEPAD);
+ array_dt = H5Tarray_create2(str_type, 2, mdims);
+ H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt);
+ H5Tclose(array_dt);
+ H5Tclose(str_type);
+
+ str_type = mkstr(33, H5T_STR_NULLTERM);
+ array_dt = H5Tarray_create2(str_type, 2, mdims);
+ H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt);
+ H5Tclose(array_dt);
+ H5Tclose(str_type);
+
+ for(i = 0; i < 3; i++)
+ for(j = 0; j < 6; j++) {
+ for(k = 0 ; k < 8; k++)
for(l = 0; l < 10; l++)
- comp1[i][j].a[k][l] = (l + j + k) * (l + j + k);
- for(k = 0 ; k < 12; k++)
- strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678");
- }
+ comp1[i][j].a[k][l] = (l + j + k) * (l + j + k);
+ for(k = 0 ; k < 12; k++)
+ strcpy(comp1[i][j].s[k], "abcdefgh12345678abcdefgh12345678");
+ }
- dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1);
+ dataset = H5Dcreate2(fid, "/comp1", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(dataset, f_type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, comp1);
- H5Tclose(f_type);
- H5Tclose(f_type2);
- H5Sclose(space);
- H5Dclose(dataset);
+ H5Tclose(f_type);
+ H5Tclose(f_type2);
+ H5Sclose(space);
+ H5Dclose(dataset);
- H5Fclose(fid);
+ H5Fclose(fid);
}
/*
@@ -1777,163 +1778,163 @@ static void gent_str(void) {
| | | | \ \
string1 string3 string5
string2 string4 string6
-*/
+ */
static void gent_str2(void)
{
-hid_t fid, group, attr, dataset, space, space2, mem_space, hyper_space;
-hid_t fxdlenstr, fxdlenstr2, memtype;
-hsize_t dims[1], size[1], stride[1], count[1], block[1];
-hsize_t start[1];
-
-
-int i;
-char buf[LENSTR+10];
-char buf2[3*LENSTR2];
-hsize_t sdim;
-
- fid = H5Fcreate(FILE14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
- fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, LENSTR);
- H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
- H5Tset_strpad(fxdlenstr, H5T_STR_NULLTERM);
-
- memtype = H5Tcopy(H5T_C_S1);
- H5Tset_size(memtype, LENSTR);
- H5Tset_cset(memtype, H5T_CSET_ASCII);
- H5Tset_strpad(memtype, H5T_STR_NULLTERM);
-
- sdim = 10;
- size[0] = sdim;
- space = H5Screate_simple(1, size, NULL);
- size[0] = 1;
- mem_space = H5Screate_simple(1,size,NULL);
- hyper_space = H5Scopy(space);
-
- /* dset1 */
-
- group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset1", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- /* add attributes to dset1 */
-
- fxdlenstr2 = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr2, LENSTR2);
- H5Tset_cset(fxdlenstr2, H5T_CSET_ASCII);
- H5Tset_strpad(fxdlenstr2, H5T_STR_NULLTERM);
-
- dims[0] = 3;
- space2 = H5Screate_simple(1, dims, NULL);
- attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
- sprintf(&(buf2[0*LENSTR2]), "0123456789");
- sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
- sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
- H5Awrite(attr, fxdlenstr2, buf2);
- H5Sclose(space2);
- H5Tclose(fxdlenstr2);
- H5Aclose(attr);
-
- stride[0]=1;
- count[0]=1;
- block[0]=1;
-
- for(i = 0; (hsize_t)i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
- H5Tset_size(memtype, HDstrlen(buf)+1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
- H5Dclose(dataset);
- H5Gclose(group);
-
- group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset2", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- for(i = 0; (hsize_t)i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
- H5Tset_size(memtype, HDstrlen(buf)+1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
- H5Dclose(dataset);
- H5Gclose(group);
-
-
- H5Tclose(fxdlenstr);
- fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, LENSTR);
- H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
- H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD);
-
- group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset3", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- for(i = 0;(hsize_t) i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
- H5Tset_size(memtype, HDstrlen(buf)+1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
- H5Dclose(dataset);
- H5Gclose(group);
-
-
- group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset4", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- for(i = 0; (hsize_t)i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
- H5Tset_size(memtype, HDstrlen(buf)+1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
- H5Dclose(dataset);
- H5Gclose(group);
-
- H5Tclose(fxdlenstr);
- fxdlenstr = H5Tcopy(H5T_C_S1);
- H5Tset_size(fxdlenstr, LENSTR);
- H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
- H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD);
-
- group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset5", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- for(i = 0; (hsize_t)i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
- H5Dclose(dataset);
- H5Gclose(group);
-
-
- group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- dataset = H5Dcreate2(group, "dset6", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
-
- for(i = 0; (hsize_t)i < sdim; i++) {
- start[0] = i;
- sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
- H5Tset_size(memtype, HDstrlen(buf) + 1);
- H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
- H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
- }
-
- H5Dclose(dataset);
- H5Gclose(group);
- H5Tclose(fxdlenstr);
- H5Tclose(memtype);
- H5Sclose(mem_space);
- H5Sclose(hyper_space);
- H5Sclose(space);
- H5Fclose(fid);
+ hid_t fid, group, attr, dataset, space, space2, mem_space, hyper_space;
+ hid_t fxdlenstr, fxdlenstr2, memtype;
+ hsize_t dims[1], size[1], stride[1], count[1], block[1];
+ hsize_t start[1];
+
+
+ int i;
+ char buf[LENSTR+10];
+ char buf2[3*LENSTR2];
+ hsize_t sdim;
+
+ fid = H5Fcreate(FILE14, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ fxdlenstr = H5Tcopy(H5T_C_S1);
+ H5Tset_size(fxdlenstr, LENSTR);
+ H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
+ H5Tset_strpad(fxdlenstr, H5T_STR_NULLTERM);
+
+ memtype = H5Tcopy(H5T_C_S1);
+ H5Tset_size(memtype, LENSTR);
+ H5Tset_cset(memtype, H5T_CSET_ASCII);
+ H5Tset_strpad(memtype, H5T_STR_NULLTERM);
+
+ sdim = 10;
+ size[0] = sdim;
+ space = H5Screate_simple(1, size, NULL);
+ size[0] = 1;
+ mem_space = H5Screate_simple(1,size,NULL);
+ hyper_space = H5Scopy(space);
+
+ /* dset1 */
+
+ group = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset1", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ /* add attributes to dset1 */
+
+ fxdlenstr2 = H5Tcopy(H5T_C_S1);
+ H5Tset_size(fxdlenstr2, LENSTR2);
+ H5Tset_cset(fxdlenstr2, H5T_CSET_ASCII);
+ H5Tset_strpad(fxdlenstr2, H5T_STR_NULLTERM);
+
+ dims[0] = 3;
+ space2 = H5Screate_simple(1, dims, NULL);
+ attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
+ sprintf(&(buf2[0*LENSTR2]), "0123456789");
+ sprintf(&(buf2[1*LENSTR2]), "abcdefghij");
+ sprintf(&(buf2[2*LENSTR2]), "ABCDEFGHIJ");
+ H5Awrite(attr, fxdlenstr2, buf2);
+ H5Sclose(space2);
+ H5Tclose(fxdlenstr2);
+ H5Aclose(attr);
+
+ stride[0]=1;
+ count[0]=1;
+ block[0]=1;
+
+ for(i = 0; (hsize_t)i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ H5Tset_size(memtype, HDstrlen(buf)+1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+ group = H5Gcreate2(fid, "/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset2", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; (hsize_t)i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ H5Tset_size(memtype, HDstrlen(buf)+1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+
+ H5Tclose(fxdlenstr);
+ fxdlenstr = H5Tcopy(H5T_C_S1);
+ H5Tset_size(fxdlenstr, LENSTR);
+ H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
+ H5Tset_strpad(fxdlenstr, H5T_STR_NULLPAD);
+
+ group = H5Gcreate2(fid, "/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset3", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0;(hsize_t) i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ H5Tset_size(memtype, HDstrlen(buf)+1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+
+ group = H5Gcreate2(fid, "/g4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset4", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; (hsize_t)i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ H5Tset_size(memtype, HDstrlen(buf)+1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+ H5Tclose(fxdlenstr);
+ fxdlenstr = H5Tcopy(H5T_C_S1);
+ H5Tset_size(fxdlenstr, LENSTR);
+ H5Tset_cset(fxdlenstr, H5T_CSET_ASCII);
+ H5Tset_strpad(fxdlenstr, H5T_STR_SPACEPAD);
+
+ group = H5Gcreate2(fid, "/g5", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset5", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; (hsize_t)i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ H5Tset_size(memtype, HDstrlen(buf) + 1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+
+ group = H5Gcreate2(fid, "/g6", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(group, "dset6", fxdlenstr, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ for(i = 0; (hsize_t)i < sdim; i++) {
+ start[0] = i;
+ sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ H5Tset_size(memtype, HDstrlen(buf) + 1);
+ H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
+ H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
+ }
+
+ H5Dclose(dataset);
+ H5Gclose(group);
+ H5Tclose(fxdlenstr);
+ H5Tclose(memtype);
+ H5Sclose(mem_space);
+ H5Sclose(hyper_space);
+ H5Sclose(space);
+ H5Fclose(fid);
}
static void gent_enum(void)
@@ -1942,9 +1943,9 @@ static void gent_enum(void)
hid_t file, type, space, dset;
int val;
enumtype data[] = {RED, GREEN, BLUE, GREEN, WHITE,
- WHITE, BLACK, GREEN, BLUE, RED,
- RED, BLUE, GREEN, BLACK, WHITE,
- RED, WHITE, GREEN, GREEN, BLUE};
+ WHITE, BLACK, GREEN, BLUE, RED,
+ RED, BLUE, GREEN, BLACK, WHITE,
+ RED, WHITE, GREEN, GREEN, BLUE};
hsize_t size[1] = {NELMTS(data)};
file = H5Fcreate(FILE15,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1969,7 +1970,7 @@ static void gent_enum(void)
static void gent_objref(void)
{
-/*some code is taken from enum.c in the test dir */
+ /*some code is taken from enum.c in the test dir */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
@@ -1978,8 +1979,8 @@ static void gent_objref(void)
hid_t tid1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
hobj_ref_t *wbuf, /* buffer to write to disk */
- *rbuf, /* buffer read from disk */
- *tbuf; /* temp. buffer read from disk */
+ *rbuf, /* buffer read from disk */
+ *tbuf; /* temp. buffer read from disk */
uint32_t *tu32; /* Temporary pointer to uint32 data */
int i; /* counting variables */
const char *write_comment = "Foo!"; /* Comments for group */
@@ -2077,20 +2078,20 @@ static void gent_datareg(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dset1, /* Dataset ID */
- dset2; /* Dereferenced dataset ID */
+ dset2; /* Dereferenced dataset ID */
hid_t sid1, /* Dataspace ID #1 */
- sid2; /* Dataspace ID #2 */
+ sid2; /* Dataspace ID #2 */
hsize_t dims1[] = {SPACE1_DIM1},
- dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
+ dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
- *rbuf; /* buffer read from disk */
+ *rbuf; /* buffer read from disk */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
- *drbuf; /* Buffer for reading numeric data from disk */
+ *drbuf; /* Buffer for reading numeric data from disk */
uint8_t *tu8; /* Temporary pointer to uint8 data */
int i; /* counting variables */
@@ -2233,7 +2234,7 @@ static void gent_attrreg(void)
*/
sid1 = H5Screate (H5S_NULL);
dset1 = H5Dcreate2 (fid1, "Dataset1", H5T_STD_I32LE, sid1, H5P_DEFAULT,
- H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT);
H5Sclose (sid1);
/* Create references */
@@ -2273,7 +2274,7 @@ static void gent_attrreg(void)
/* Create the attribute and write the region references to it. */
attr1 = H5Acreate2 (dset1, "Attribute1", H5T_STD_REF_DSETREG, sid3, H5P_DEFAULT,
- H5P_DEFAULT);
+ H5P_DEFAULT);
H5Awrite (attr1, H5T_STD_REF_DSETREG, wbuf);
/* Close attribute dataspace */
@@ -2301,18 +2302,18 @@ static void gent_attrreg(void)
/*taken from Elena's compound test file*/
static void gent_nestcomp(void)
{
- /* Compound memeber of the compound datatype*/
+ /* Compound memeber of the compound datatype*/
typedef struct cmp_t {
- char a;
- float b[2];
+ char a;
+ float b[2];
} cmp_t;
/* First structure and dataset*/
typedef struct s1_t {
- int a;
- float b;
- double c;
- cmp_t d;
+ int a;
+ float b;
+ double c;
+ cmp_t d;
} s2_t;
hid_t cmp_tid; /* Handle for the compound datatype */
hid_t char_id; /* Handle for the string datatype */
@@ -2388,7 +2389,7 @@ static void gent_nestcomp(void)
*/
status = H5Dwrite(dataset, s2_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, s1);
if(status < 0)
- fprintf(stderr, "gent_nestcomp H5Dwrite failed\n");
+ fprintf(stderr, "gent_nestcomp H5Dwrite failed\n");
/*
* Release resources
@@ -2459,14 +2460,14 @@ static void gent_bitfields(void)
/* bitfield_1 */
nelmts = sizeof(buf);
if((type = H5Tcopy(H5T_STD_B8LE)) < 0 ||
- (space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
- (dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ (space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
+ (dset = H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
for(i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- goto error;
+ goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
if(H5Dclose(dset) < 0) goto error;
@@ -2474,25 +2475,25 @@ static void gent_bitfields(void)
/* bitfield_2 */
nelmts = sizeof(buf)/2;
if((type = H5Tcopy(H5T_STD_B16LE)) < 0 ||
- (space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
- (dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ (space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
+ (dset = H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
for(i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- goto error;
+ goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
if(H5Dclose(dset) < 0) goto error;
if(H5Gclose(grp) < 0) goto error;
H5Fclose(file);
- error:
+ error:
H5E_BEGIN_TRY {
- H5Gclose(grp);
- H5Tclose(type);
- H5Sclose(space);
- H5Dclose(dset);
+ H5Gclose(grp);
+ H5Tclose(type);
+ H5Sclose(space);
+ H5Dclose(dset);
} H5E_END_TRY;
}
@@ -2508,7 +2509,7 @@ static void gent_vldatatypes(void)
/* Allocate and initialize VL dataset to write */
for(i = 0; i < SPACE1_DIM1; i++) {
- int j;
+ int j;
wdata[i].p = HDmalloc((i + 1) * sizeof(int));
wdata[i].len = i + 1;
@@ -2535,7 +2536,7 @@ static void gent_vldatatypes(void)
/* Allocate and initialize VL dataset to write */
for(i = 0; i < SPACE1_DIM1; i++) {
- int j;
+ int j;
wdata[i].p = HDmalloc((i + 1) * sizeof(float));
wdata[i].len = i + 1;
@@ -2659,9 +2660,9 @@ gent_vldatatypes2(void)
static void gent_vldatatypes3(void)
{
typedef struct { /* Struct that the VL sequences are composed of */
- int i;
- float f;
- hvl_t v;
+ int i;
+ float f;
+ hvl_t v;
} s1;
s1 wdata[SPACE1_DIM1]; /* Information to write */
hid_t fid1; /* HDF5 File IDs */
@@ -2729,8 +2730,8 @@ static void gent_vldatatypes3(void)
static void gent_vldatatypes4(void)
{
typedef struct { /* Struct that the VL sequences are composed of */
- int i;
- float f;
+ int i;
+ float f;
} s1;
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
hid_t fid1; /* HDF5 File IDs */
@@ -2748,7 +2749,7 @@ static void gent_vldatatypes4(void)
for(j=0; j<(i+1); j++) {
((s1 *)wdata[i].p)[j].i=i*10+j;
((s1 *)wdata[i].p)[j].f=(float)((i*20+j)/3.0);
- } /* end for */
+ } /* end for */
} /* end for */
/* Create file */
@@ -2859,7 +2860,7 @@ static void gent_vldatatypes5(void)
via region reference for testing refion reference output.
Note: this was added originally prepared for bug2092. before the fix h5dump didn't
display array indices every 262 x N (N > 0) based on 2000x1000 dims.
-*/
+ */
#define SPACE_ARRAY1BIG_DIM 2000
#define ARRAY1BIG_DIM 1000
@@ -2875,7 +2876,7 @@ static void gent_array1_big(void)
int i,j; /* counting variables */
herr_t ret; /* Generic return value */
-
+
/* for region reference dataset */
hid_t dset2;
hid_t sid2;
@@ -3100,8 +3101,8 @@ static void gent_array3(void)
static void gent_array4(void)
{
typedef struct { /* Typedef for compound datatype */
- int i;
- float f;
+ int i;
+ float f;
} s2_t;
s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
hid_t fid1; /* HDF5 File IDs */
@@ -3166,8 +3167,8 @@ static void gent_array4(void)
static void gent_array5(void)
{
typedef struct { /* Typedef for compound datatype */
- int i;
- float f[ARRAY1_DIM1];
+ int i;
+ float f[ARRAY1_DIM1];
} s2_t;
s2_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
hid_t fid1; /* HDF5 File IDs */
@@ -3385,7 +3386,7 @@ static void gent_array8(void)
* elements within the array datatype.
*/
for (i=0; i<F64_DIM1; i++)
- wdata[i] = i;
+ wdata[i] = i;
/*
* Create a new file using the default properties.
@@ -3424,9 +3425,9 @@ static void gent_array8(void)
static void gent_empty(void)
{
typedef struct {
- int a;
- float b;
- char c;
+ int a;
+ float b;
+ char c;
} empty_struct;
hid_t file, dset, space, type;
hsize_t dims[] = { SPACE1_DIM1 };
@@ -3581,8 +3582,8 @@ void gent_split_file(void)
dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- for(j = 0; j < 15; j++)
- dset[i][j] = i + j;
+ for(j = 0; j < 15; j++)
+ dset[i][j] = i + j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
H5Sclose(space);
@@ -3613,8 +3614,8 @@ void gent_family(void)
dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- for(j = 0; j < 15; j++)
- dset[i][j] = i + j;
+ for(j = 0; j < 15; j++)
+ dset[i][j] = i + j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
H5Sclose(space);
@@ -3653,13 +3654,13 @@ void gent_multi(void)
memb_map[mt] = mt;
sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv[mt];
-/*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
+ /*printf("memb_name[%d]=%s, memb_map[%d]=%d; ", mt, memb_name[mt], mt, memb_map[mt]);*/
memb_addr[mt] = MAX(mt - 1,0) * (HADDR_MAX / 10);
}
memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER;
H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
- memb_addr, FALSE);
+ memb_addr, FALSE);
fid = H5Fcreate(FILE36, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -3670,8 +3671,8 @@ void gent_multi(void)
dataset = H5Dcreate2(fid, "/dset1", H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < 10; i++)
- for(j = 0; j < 15; j++)
- dset[i][j] = i + j;
+ for(j = 0; j < 15; j++)
+ dset[i][j] = i + j;
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset);
@@ -3704,11 +3705,11 @@ static void gent_large_objname(void)
static void gent_vlstr(void)
{
const char *wdata[SPACE1_DIM1]= {
- "Four score and seven years ago our forefathers brought forth on this continent a new nation,",
- "conceived in liberty and dedicated to the proposition that all men are created equal.",
- "",
- NULL
- }; /* Information to write */
+ "Four score and seven years ago our forefathers brought forth on this continent a new nation,",
+ "conceived in liberty and dedicated to the proposition that all men are created equal.",
+ "",
+ NULL
+ }; /* Information to write */
const char *string_att= "This is the string for the attribute";
hid_t fid1; /* HDF5 File IDs */
hid_t dataset, root; /* Dataset ID */
@@ -3753,12 +3754,12 @@ static void gent_vlstr(void)
static void gent_char(void)
{
const char *wdata =
- "Four score and seven years ago our forefathers brought "
- "forth on this continent a new nation, conceived in "
- "liberty and dedicated to the proposition that all "
- "men are created equal. Now we are engaged in a great "
- "civil war, testing whether that nation or any nation "
- "so conceived and so dedicated can long endure.";
+ "Four score and seven years ago our forefathers brought "
+ "forth on this continent a new nation, conceived in "
+ "liberty and dedicated to the proposition that all "
+ "men are created equal. Now we are engaged in a great "
+ "civil war, testing whether that nation or any nation "
+ "so conceived and so dedicated can long endure.";
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
@@ -3799,427 +3800,427 @@ static void gent_char(void)
*/
static void write_attr_in(hid_t loc_id,
- const char* dset_name, /* for saving reference to dataset*/
- hid_t fid)
+ const char* dset_name, /* for saving reference to dataset*/
+ hid_t fid)
{
- /* Compound datatype */
- typedef struct s_t
- {
- char a;
- double b;
- } s_t;
-
- typedef enum
- {
- E_RED,
- E_GREEN
- } e_t;
-
- hid_t aid;
- hid_t sid;
- hid_t tid;
- herr_t status;
- int val, i, j, k, n;
- float f;
-
- /* create 1D attributes with dimension [2], 2 elements */
- hsize_t dims[1]={2};
- char buf1[2][2]= {"ab","de"}; /* string */
- char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
- hobj_ref_t buf4[2]; /* reference */
- hvl_t buf5[2]; /* vlen */
- hsize_t dimarray[1]={3}; /* array dimension */
- int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
-
- /* create 2D attributes with dimension [3][2], 6 elements */
- hsize_t dims2[2]={3,2};
- char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */
- char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
- hobj_ref_t buf42[3][2]; /* reference */
- hvl_t buf52[3][2]; /* vlen */
- int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
- int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
-
- /* create 3D attributes with dimension [4][3][2], 24 elements */
- hsize_t dims3[3]={4,3,2};
- char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq",
- "rs","tu","vw","xz","AB","CD","EF","GH",
- "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */
- char buf23[4][3][2]; /* bitfield, opaque */
- s_t buf33[4][3][2]; /* compound */
- hobj_ref_t buf43[4][3][2]; /* reference */
- hvl_t buf53[4][3][2]; /* vlen */
- int buf63[24][3]; /* array */
- int buf73[4][3][2]; /* integer */
- float buf83[4][3][2]; /* float */
+ /* Compound datatype */
+ typedef struct s_t
+ {
+ char a;
+ double b;
+ } s_t;
+ typedef enum
+ {
+ E_RED,
+ E_GREEN
+ } e_t;
-/*-------------------------------------------------------------------------
- * 1D attributes
- *-------------------------------------------------------------------------
- */
+ hid_t aid;
+ hid_t sid;
+ hid_t tid;
+ herr_t status;
+ int val, i, j, k, n;
+ float f;
+
+ /* create 1D attributes with dimension [2], 2 elements */
+ hsize_t dims[1]={2};
+ char buf1[2][2]= {"ab","de"}; /* string */
+ char buf2[2]= {1,2}; /* bitfield, opaque */
+ s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ hobj_ref_t buf4[2]; /* reference */
+ hvl_t buf5[2]; /* vlen */
+ hsize_t dimarray[1]={3}; /* array dimension */
+ int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
+ int buf7[2]= {1,2}; /* integer */
+ float buf8[2]= {1,2}; /* float */
+
+ /* create 2D attributes with dimension [3][2], 6 elements */
+ hsize_t dims2[2]={3,2};
+ char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */
+ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
+ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
+ hobj_ref_t buf42[3][2]; /* reference */
+ hvl_t buf52[3][2]; /* vlen */
+ int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
+ int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
+ float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+
+ /* create 3D attributes with dimension [4][3][2], 24 elements */
+ hsize_t dims3[3]={4,3,2};
+ char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq",
+ "rs","tu","vw","xz","AB","CD","EF","GH",
+ "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */
+ char buf23[4][3][2]; /* bitfield, opaque */
+ s_t buf33[4][3][2]; /* compound */
+ hobj_ref_t buf43[4][3][2]; /* reference */
+ hvl_t buf53[4][3][2]; /* vlen */
+ int buf63[24][3]; /* array */
+ int buf73[4][3][2]; /* integer */
+ float buf83[4][3][2]; /* float */
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_attr(loc_id,1,dims,"string",tid,buf1);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_STD_B8LE);
- write_attr(loc_id,1,dims,"bitfield",tid,buf2);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * 1D attributes
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_attr(loc_id,1,dims,"opaque",tid,buf2);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_attr(loc_id,1,dims,"string",tid,buf1);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_attr(loc_id,1,dims,"compound",tid,buf3);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_attr(loc_id,1,dims,"bitfield",tid,buf2);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1);
- status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1);
- write_attr(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4);
- }
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_attr(loc_id,1,dims,"opaque",tid,buf2);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_attr(loc_id,1,dims,"enum",tid,0);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_attr(loc_id,1,dims,"compound",tid,buf3);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1);
+ status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1);
+ write_attr(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4);
+ }
- /* Allocate and initialize VL dataset to write */
-
- buf5[0].len = 1;
- buf5[0].p = HDmalloc(1 * sizeof(int));
- ((int *)buf5[0].p)[0] = 1;
- buf5[1].len = 2;
- buf5[1].p = HDmalloc(2 * sizeof(int));
- ((int *)buf5[1].p)[0] = 2;
- ((int *)buf5[1].p)[1] = 3;
-
- sid = H5Screate_simple(1, dims, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Awrite(aid, tid, buf5);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
- status = H5Aclose(aid);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_attr(loc_id,1,dims,"enum",tid,0);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_attr(loc_id, 1, dims, "array", tid, buf6);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_INTEGER and H5T_FLOAT
- *-------------------------------------------------------------------------
- */
- write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7);
- write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8);
+ /* Allocate and initialize VL dataset to write */
+ buf5[0].len = 1;
+ buf5[0].p = HDmalloc(1 * sizeof(int));
+ ((int *)buf5[0].p)[0] = 1;
+ buf5[1].len = 2;
+ buf5[1].p = HDmalloc(2 * sizeof(int));
+ ((int *)buf5[1].p)[0] = 2;
+ ((int *)buf5[1].p)[1] = 3;
+
+ sid = H5Screate_simple(1, dims, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ aid = H5Acreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf5);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ HDassert(status >= 0);
+ status = H5Aclose(aid);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
-/*-------------------------------------------------------------------------
- * 2D attributes
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_attr(loc_id, 1, dims, "array", tid, buf6);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_attr(loc_id,2,dims2,"string2D",tid,buf12);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER and H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
+ write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7);
+ write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_STD_B8LE);
- write_attr(loc_id,2,dims2,"bitfield2D",tid,buf22);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_attr(loc_id,2,dims2,"opaque2D",tid,buf22);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * 2D attributes
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_attr(loc_id,2,dims2,"compound2D",tid,buf32);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_attr(loc_id,2,dims2,"string2D",tid,buf12);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- for(i = 0; i < 3; i++) {
- for(j = 0; j < 2; j++) {
- status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1);
- }
- }
- write_attr(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42);
- }
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_attr(loc_id,2,dims2,"bitfield2D",tid,buf22);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_attr(loc_id,2,dims2,"enum2D",tid,0);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_attr(loc_id,2,dims2,"opaque2D",tid,buf22);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_attr(loc_id,2,dims2,"compound2D",tid,buf32);
+ status = H5Tclose(tid);
- /* Allocate and initialize VL dataset to write */
- n=0;
- for(i = 0; i < 3; i++) {
- for(j = 0; j < 2; j++) {
- int l;
-
- buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
- buf52[i][j].len = i + 1;
- for(l = 0; l < i + 1; l++)
- ((int *)buf52[i][j].p)[l] = n++;
- }
- }
-
- sid = H5Screate_simple(2, dims2, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Awrite(aid, tid, buf52);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
- status = H5Aclose(aid);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ for(i = 0; i < 3; i++) {
+ for(j = 0; j < 2; j++) {
+ status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1);
+ }
+ }
+ write_attr(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42);
+ }
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_attr(loc_id, 2, dims2, "array2D", tid, buf62);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_attr(loc_id,2,dims2,"enum2D",tid,0);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_INTEGER and H5T_FLOAT
- *-------------------------------------------------------------------------
- */
- write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72);
- write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82);
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
+ /* Allocate and initialize VL dataset to write */
+ n=0;
+ for(i = 0; i < 3; i++) {
+ for(j = 0; j < 2; j++) {
+ int l;
+
+ buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
+ buf52[i][j].len = i + 1;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf52[i][j].p)[l] = n++;
+ }
+ }
-/*-------------------------------------------------------------------------
- * 3D attributes
- *-------------------------------------------------------------------------
- */
+ sid = H5Screate_simple(2, dims2, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ aid = H5Acreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf52);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ HDassert(status >= 0);
+ status = H5Aclose(aid);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_attr(loc_id,3,dims3,"string3D",tid,buf13);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_attr(loc_id, 2, dims2, "array2D", tid, buf62);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER and H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
+ write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72);
+ write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82);
- n=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf23[i][j][k]=n++;
- }
- }
- }
- tid = H5Tcopy(H5T_STD_B8LE);
- write_attr(loc_id,3,dims3,"bitfield3D",tid,buf23);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_attr(loc_id,3,dims3,"opaque3D",tid,buf23);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * 3D attributes
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_attr(loc_id,3,dims3,"string3D",tid,buf13);
+ status = H5Tclose(tid);
- n=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf33[i][j][k].a=n++;
- buf33[i][j][k].b=n++;
- }
- }
- }
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_attr(loc_id,3,dims3,"compound3D",tid,buf33);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++)
- status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1);
- }
- }
- write_attr(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43);
- }
+ n=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf23[i][j][k]=n++;
+ }
+ }
+ }
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_attr(loc_id,3,dims3,"bitfield3D",tid,buf23);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_attr(loc_id,3,dims3,"enum3D",tid,0);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_attr(loc_id,3,dims3,"opaque3D",tid,buf23);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
- /* Allocate and initialize VL dataset to write */
- n = 0;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- int l;
-
- buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
- buf53[i][j][k].len = i + 1;
- for(l = 0; l < i + 1; l++)
- ((int *)buf53[i][j][k].p)[l] = n++;
- }
- }
- }
-
- sid = H5Screate_simple(3, dims3, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Awrite(aid, tid, buf53);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
- status = H5Aclose(aid);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ n=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf33[i][j][k].a=n++;
+ buf33[i][j][k].b=n++;
+ }
+ }
+ }
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_attr(loc_id,3,dims3,"compound3D",tid,buf33);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- n = 1;
- for(i = 0; i < 24; i++)
- for(j = 0; j < (int)dimarray[0]; j++)
- buf63[i][j] = n++;
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++)
+ status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1);
+ }
+ }
+ write_attr(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43);
+ }
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_attr(loc_id, 3, dims3, "array3D", tid, buf63);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_attr(loc_id,3,dims3,"enum3D",tid,0);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_INTEGER and H5T_FLOAT
- *-------------------------------------------------------------------------
- */
- n=1; f=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf73[i][j][k]=n++;
- buf83[i][j][k]=f++;
- }
- }
- }
- write_attr(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73);
- write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83);
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
+
+ /* Allocate and initialize VL dataset to write */
+ n = 0;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ int l;
+
+ buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
+ buf53[i][j][k].len = i + 1;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf53[i][j][k].p)[l] = n++;
+ }
+ }
+ }
+
+ sid = H5Screate_simple(3, dims3, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ aid = H5Acreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Awrite(aid, tid, buf53);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ HDassert(status >= 0);
+ status = H5Aclose(aid);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
+
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ n = 1;
+ for(i = 0; i < 24; i++)
+ for(j = 0; j < (int)dimarray[0]; j++)
+ buf63[i][j] = n++;
+
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_attr(loc_id, 3, dims3, "array3D", tid, buf63);
+ status = H5Tclose(tid);
+
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER and H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
+ n=1; f=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf73[i][j][k]=n++;
+ buf83[i][j][k]=f++;
+ }
+ }
+ }
+ write_attr(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73);
+ write_attr(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83);
}
@@ -4239,441 +4240,441 @@ static void write_attr_in(hid_t loc_id,
*/
static void write_dset_in(hid_t loc_id,
- const char* dset_name, /* for saving reference to dataset*/
- hid_t fid)
+ const char* dset_name, /* for saving reference to dataset*/
+ hid_t fid)
{
- /* Compound datatype */
- typedef struct s_t
- {
- char a;
- double b;
- } s_t;
-
- typedef enum
- {
- E_RED,
- E_GREEN
- } e_t;
-
- hid_t did;
- hid_t sid;
- hid_t tid;
- hid_t plist_id;
- herr_t status;
- int val, i, j, k, n;
- float f;
- int fillvalue=2;
-
- /* create 1D attributes with dimension [2], 2 elements */
- hsize_t dims[1]={2};
- char buf1[2][2]= {"ab","de"}; /* string */
- char buf2[2]= {1,2}; /* bitfield, opaque */
- s_t buf3[2]= {{1,2},{3,4}}; /* compound */
- hobj_ref_t buf4[2]; /* reference */
- hvl_t buf5[2]; /* vlen */
- hsize_t dimarray[1]={3}; /* array dimension */
- int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int buf7[2]= {1,2}; /* integer */
- float buf8[2]= {1,2}; /* float */
-
- /* create 2D attributes with dimension [3][2], 6 elements */
- hsize_t dims2[2]={3,2};
- char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */
- char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
- s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
- hobj_ref_t buf42[3][2]; /* reference */
- hvl_t buf52[3][2]; /* vlen */
- int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
- int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
- float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
-
- /* create 3D attributes with dimension [4][3][2], 24 elements */
- hsize_t dims3[3]={4,3,2};
- char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq",
- "rs","tu","vw","xz","AB","CD","EF","GH",
- "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */
- char buf23[4][3][2]; /* bitfield, opaque */
- s_t buf33[4][3][2]; /* compound */
- hobj_ref_t buf43[4][3][2]; /* reference */
- hvl_t buf53[4][3][2]; /* vlen */
- int buf63[24][3]; /* array */
- int buf73[4][3][2]; /* integer */
- float buf83[4][3][2]; /* float */
+ /* Compound datatype */
+ typedef struct s_t
+ {
+ char a;
+ double b;
+ } s_t;
+ typedef enum
+ {
+ E_RED,
+ E_GREEN
+ } e_t;
-/*-------------------------------------------------------------------------
- * 1D
- *-------------------------------------------------------------------------
- */
+ hid_t did;
+ hid_t sid;
+ hid_t tid;
+ hid_t plist_id;
+ herr_t status;
+ int val, i, j, k, n;
+ float f;
+ int fillvalue=2;
+
+ /* create 1D attributes with dimension [2], 2 elements */
+ hsize_t dims[1]={2};
+ char buf1[2][2]= {"ab","de"}; /* string */
+ char buf2[2]= {1,2}; /* bitfield, opaque */
+ s_t buf3[2]= {{1,2},{3,4}}; /* compound */
+ hobj_ref_t buf4[2]; /* reference */
+ hvl_t buf5[2]; /* vlen */
+ hsize_t dimarray[1]={3}; /* array dimension */
+ int buf6[2][3]= {{1,2,3},{4,5,6}}; /* array */
+ int buf7[2]= {1,2}; /* integer */
+ float buf8[2]= {1,2}; /* float */
+
+ /* create 2D attributes with dimension [3][2], 6 elements */
+ hsize_t dims2[2]={3,2};
+ char buf12[6][2]= {"ab","cd","ef","gh","ij","kl"}; /* string */
+ char buf22[3][2]= {{1,2},{3,4},{5,6}}; /* bitfield, opaque */
+ s_t buf32[6]= {{1,2},{3,4},{5,6},{7,8},{9,10},{11,12}}; /* compound */
+ hobj_ref_t buf42[3][2]; /* reference */
+ hvl_t buf52[3][2]; /* vlen */
+ int buf62[6][3]= {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15},{16,17,18}}; /* array */
+ int buf72[3][2]= {{1,2},{3,4},{5,6}}; /* integer */
+ float buf82[3][2]= {{1,2},{3,4},{5,6}}; /* float */
+
+ /* create 3D attributes with dimension [4][3][2], 24 elements */
+ hsize_t dims3[3]={4,3,2};
+ char buf13[24][2]= {"ab","cd","ef","gh","ij","kl","mn","pq",
+ "rs","tu","vw","xz","AB","CD","EF","GH",
+ "IJ","KL","MN","PQ","RS","TU","VW","XZ"}; /* string */
+ char buf23[4][3][2]; /* bitfield, opaque */
+ s_t buf33[4][3][2]; /* compound */
+ hobj_ref_t buf43[4][3][2]; /* reference */
+ hvl_t buf53[4][3][2]; /* vlen */
+ int buf63[24][3]; /* array */
+ int buf73[4][3][2]; /* integer */
+ float buf83[4][3][2]; /* float */
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_dset(loc_id,1,dims,"string",tid,buf1);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_STD_B8LE);
- write_dset(loc_id,1,dims,"bitfield",tid,buf2);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * 1D
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_dset(loc_id,1,dims,"opaque",tid,buf2);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_dset(loc_id,1,dims,"string",tid,buf1);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_dset(loc_id,1,dims,"compound",tid,buf3);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_dset(loc_id,1,dims,"bitfield",tid,buf2);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1);
- status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1);
- write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4);
- }
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_dset(loc_id,1,dims,"opaque",tid,buf2);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_dset(loc_id,1,dims,"enum",tid,0);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_dset(loc_id,1,dims,"compound",tid,buf3);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ status=H5Rcreate(&buf4[0],fid,dset_name,H5R_OBJECT,-1);
+ status=H5Rcreate(&buf4[1],fid,dset_name,H5R_OBJECT,-1);
+ write_dset(loc_id,1,dims,"reference",H5T_STD_REF_OBJ,buf4);
+ }
- /* Allocate and initialize VL dataset to write */
-
- buf5[0].len = 1;
- buf5[0].p = HDmalloc( 1 * sizeof(int));
- ((int *)buf5[0].p)[0]=1;
- buf5[1].len = 2;
- buf5[1].p = HDmalloc( 2 * sizeof(int));
- ((int *)buf5[1].p)[0]=2;
- ((int *)buf5[1].p)[1]=3;
-
- sid = H5Screate_simple(1, dims, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
- HDassert(status >= 0);
- status = H5Dclose(did);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_dset(loc_id,1,dims,"enum",tid,0);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_dset(loc_id, 1, dims, "array", tid, buf6);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_INTEGER and H5T_FLOAT
- *-------------------------------------------------------------------------
- */
- write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7);
- write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8);
+ /* Allocate and initialize VL dataset to write */
+ buf5[0].len = 1;
+ buf5[0].p = HDmalloc( 1 * sizeof(int));
+ ((int *)buf5[0].p)[0]=1;
+ buf5[1].len = 2;
+ buf5[1].p = HDmalloc( 2 * sizeof(int));
+ ((int *)buf5[1].p)[0]=2;
+ ((int *)buf5[1].p)[1]=3;
+
+ sid = H5Screate_simple(1, dims, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ did = H5Dcreate2(loc_id, "vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf5);
+ HDassert(status >= 0);
+ status = H5Dclose(did);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
-/*-------------------------------------------------------------------------
- * 2D
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_dset(loc_id, 1, dims, "array", tid, buf6);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_dset(loc_id,2,dims2,"string2D",tid,buf12);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER and H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
+ write_dset(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7);
+ write_dset(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_STD_B8LE);
- write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_dset(loc_id,2,dims2,"opaque2D",tid,buf22);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * 2D
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_dset(loc_id,2,dims2,"compound2D",tid,buf32);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_dset(loc_id,2,dims2,"string2D",tid,buf12);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- for(i = 0; i < 3; i++) {
- for(j = 0; j < 2; j++) {
- status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1);
- }
- }
- write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42);
- }
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_dset(loc_id,2,dims2,"enum2D",tid,0);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_dset(loc_id,2,dims2,"opaque2D",tid,buf22);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_dset(loc_id,2,dims2,"compound2D",tid,buf32);
+ status = H5Tclose(tid);
- /* Allocate and initialize VL dataset to write */
- n=0;
- for(i = 0; i < 3; i++)
- for(j = 0; j < 2; j++) {
- int l;
-
- buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
- buf52[i][j].len = i + 1;
- for(l = 0; l < i + 1; l++)
- ((int *)buf52[i][j].p)[l] = n++;
- }
-
- sid = H5Screate_simple(2, dims2, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
- HDassert(status >= 0);
- status = H5Dclose(did);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ for(i = 0; i < 3; i++) {
+ for(j = 0; j < 2; j++) {
+ status=H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1);
+ }
+ }
+ write_dset(loc_id,2,dims2,"reference2D",H5T_STD_REF_OBJ,buf42);
+ }
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_dset(loc_id, 2, dims2, "array2D", tid, buf62);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_dset(loc_id,2,dims2,"enum2D",tid,0);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_INTEGER, write a fill value
- *-------------------------------------------------------------------------
- */
- plist_id = H5Pcreate(H5P_DATASET_CREATE);
- status = H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue);
- sid = H5Screate_simple(2, dims2, NULL);
- did = H5Dcreate2(loc_id, "integer2D", H5T_NATIVE_INT, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT);
- status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf72);
- status = H5Pclose(plist_id);
- status = H5Dclose(did);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_FLOAT
- *-------------------------------------------------------------------------
- */
+ /* Allocate and initialize VL dataset to write */
+ n=0;
+ for(i = 0; i < 3; i++)
+ for(j = 0; j < 2; j++) {
+ int l;
- write_dset(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82);
+ buf52[i][j].p = HDmalloc((i + 1) * sizeof(int));
+ buf52[i][j].len = i + 1;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf52[i][j].p)[l] = n++;
+ }
+ sid = H5Screate_simple(2, dims2, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ did = H5Dcreate2(loc_id, "vlen2D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf52);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf52);
+ HDassert(status >= 0);
+ status = H5Dclose(did);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
-/*-------------------------------------------------------------------------
- * 3D
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_dset(loc_id, 2, dims2, "array2D", tid, buf62);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_STRING
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_C_S1);
- status = H5Tset_size(tid, 2);
- write_dset(loc_id,3,dims3,"string3D",tid,buf13);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER, write a fill value
+ *-------------------------------------------------------------------------
+ */
+ plist_id = H5Pcreate(H5P_DATASET_CREATE);
+ status = H5Pset_fill_value(plist_id, H5T_NATIVE_INT, &fillvalue);
+ sid = H5Screate_simple(2, dims2, NULL);
+ did = H5Dcreate2(loc_id, "integer2D", H5T_NATIVE_INT, sid, H5P_DEFAULT, plist_id, H5P_DEFAULT);
+ status = H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf72);
+ status = H5Pclose(plist_id);
+ status = H5Dclose(did);
+ status = H5Sclose(sid);
-/*-------------------------------------------------------------------------
- * H5T_BITFIELD
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
- n=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf23[i][j][k]=n++;
- }
- }
- }
- tid = H5Tcopy(H5T_STD_B8LE);
- write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23);
- status = H5Tclose(tid);
+ write_dset(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82);
-/*-------------------------------------------------------------------------
- * H5T_OPAQUE
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_OPAQUE, 1);
- status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
- write_dset(loc_id,3,dims3,"opaque3D",tid,buf23);
- status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_COMPOUND
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * 3D
+ *-------------------------------------------------------------------------
+ */
- n=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf33[i][j][k].a=n++;
- buf33[i][j][k].b=n++;
- }
- }
- }
- tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
- H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
- write_dset(loc_id,3,dims3,"compound3D",tid,buf33);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_STRING
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_C_S1);
+ status = H5Tset_size(tid, 2);
+ write_dset(loc_id,3,dims3,"string3D",tid,buf13);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_REFERENCE
- *-------------------------------------------------------------------------
- */
- /* Create references to dataset */
- if(dset_name)
- {
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++)
- status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1);
- }
- }
- write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43);
- }
+ /*-------------------------------------------------------------------------
+ * H5T_BITFIELD
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_ENUM
- *-------------------------------------------------------------------------
- */
- tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
- H5Tenum_insert(tid, "RED", (val = 0, &val));
- H5Tenum_insert(tid, "GREEN", (val = 1, &val));
- write_dset(loc_id,3,dims3,"enum3D",tid,0);
- status = H5Tclose(tid);
+ n=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf23[i][j][k]=n++;
+ }
+ }
+ }
+ tid = H5Tcopy(H5T_STD_B8LE);
+ write_dset(loc_id,3,dims3,"bitfield3D",tid,buf23);
+ status = H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * H5T_VLEN
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * H5T_OPAQUE
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_OPAQUE, 1);
+ status = H5Tset_tag(tid, "1-byte opaque type"); /* must set this */
+ write_dset(loc_id,3,dims3,"opaque3D",tid,buf23);
+ status = H5Tclose(tid);
- /* Allocate and initialize VL dataset to write */
- n = 0;
- for(i = 0; i < 4; i++)
- for(j = 0; j < 3; j++)
- for(k = 0; k < 2; k++) {
- int l;
-
- buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
- buf53[i][j][k].len = i + 1;
- for(l = 0; l < i + 1; l++)
- ((int *)buf53[i][j][k].p)[l] = n++;
- }
-
- sid = H5Screate_simple(3, dims3, NULL);
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
- status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
- HDassert(status >= 0);
- status = H5Dclose(did);
- status = H5Tclose(tid);
- status = H5Sclose(sid);
+ /*-------------------------------------------------------------------------
+ * H5T_COMPOUND
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * H5T_ARRAY
- *-------------------------------------------------------------------------
- */
- n=1;
- for(i = 0; i < 24; i++) {
- for(j = 0; j < (int)dimarray[0]; j++) {
- buf63[i][j]=n++;
- }
- }
+ n=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf33[i][j][k].a=n++;
+ buf33[i][j][k].b=n++;
+ }
+ }
+ }
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(s_t));
+ H5Tinsert(tid, "a", HOFFSET(s_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(s_t, b), H5T_NATIVE_DOUBLE);
+ write_dset(loc_id,3,dims3,"compound3D",tid,buf33);
+ status = H5Tclose(tid);
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_dset(loc_id, 3, dims3, "array3D", tid, buf63);
- status = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * H5T_REFERENCE
+ *-------------------------------------------------------------------------
+ */
+ /* Create references to dataset */
+ if(dset_name)
+ {
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++)
+ status=H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1);
+ }
+ }
+ write_dset(loc_id,3,dims3,"reference3D",H5T_STD_REF_OBJ,buf43);
+ }
-/*-------------------------------------------------------------------------
- * H5T_INTEGER and H5T_FLOAT
- *-------------------------------------------------------------------------
- */
- n=1; f=1;
- for(i = 0; i < 4; i++) {
- for(j = 0; j < 3; j++) {
- for(k = 0; k < 2; k++) {
- buf73[i][j][k]=n++;
- buf83[i][j][k]=f++;
- }
- }
- }
- write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73);
- write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83);
+ /*-------------------------------------------------------------------------
+ * H5T_ENUM
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcreate(H5T_ENUM, sizeof(e_t));
+ H5Tenum_insert(tid, "RED", (val = 0, &val));
+ H5Tenum_insert(tid, "GREEN", (val = 1, &val));
+ write_dset(loc_id,3,dims3,"enum3D",tid,0);
+ status = H5Tclose(tid);
+
+ /*-------------------------------------------------------------------------
+ * H5T_VLEN
+ *-------------------------------------------------------------------------
+ */
+
+ /* Allocate and initialize VL dataset to write */
+ n = 0;
+ for(i = 0; i < 4; i++)
+ for(j = 0; j < 3; j++)
+ for(k = 0; k < 2; k++) {
+ int l;
+
+ buf53[i][j][k].p = HDmalloc((i + 1) * sizeof(int));
+ buf53[i][j][k].len = i + 1;
+ for(l = 0; l < i + 1; l++)
+ ((int *)buf53[i][j][k].p)[l] = n++;
+ }
+
+ sid = H5Screate_simple(3, dims3, NULL);
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ did = H5Dcreate2(loc_id, "vlen3D", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ status = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf53);
+ HDassert(status >= 0);
+ status = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53);
+ HDassert(status >= 0);
+ status = H5Dclose(did);
+ status = H5Tclose(tid);
+ status = H5Sclose(sid);
+
+ /*-------------------------------------------------------------------------
+ * H5T_ARRAY
+ *-------------------------------------------------------------------------
+ */
+ n=1;
+ for(i = 0; i < 24; i++) {
+ for(j = 0; j < (int)dimarray[0]; j++) {
+ buf63[i][j]=n++;
+ }
+ }
+
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_dset(loc_id, 3, dims3, "array3D", tid, buf63);
+ status = H5Tclose(tid);
+
+ /*-------------------------------------------------------------------------
+ * H5T_INTEGER and H5T_FLOAT
+ *-------------------------------------------------------------------------
+ */
+ n=1; f=1;
+ for(i = 0; i < 4; i++) {
+ for(j = 0; j < 3; j++) {
+ for(k = 0; k < 2; k++) {
+ buf73[i][j][k]=n++;
+ buf83[i][j][k]=f++;
+ }
+ }
+ }
+ write_dset(loc_id,3,dims3,"integer3D",H5T_NATIVE_INT,buf73);
+ write_dset(loc_id,3,dims3,"float3D",H5T_NATIVE_FLOAT,buf83);
}
@@ -4719,18 +4720,18 @@ static void gent_attr_all(void)
root_id = H5Gopen2(fid, "/", H5P_DEFAULT);
/*-------------------------------------------------------------------------
- * write a series of attributes on the dataset, group
- *-------------------------------------------------------------------------
- */
+ * write a series of attributes on the dataset, group
+ *-------------------------------------------------------------------------
+ */
write_attr_in(did,"dset",fid);
write_attr_in(group_id,NULL,0);
write_attr_in(root_id,NULL,0);
/*-------------------------------------------------------------------------
- * write a series of datasets on group 2
- *-------------------------------------------------------------------------
- */
+ * write a series of datasets on group 2
+ *-------------------------------------------------------------------------
+ */
write_dset_in(group2_id,"/dset",fid);
@@ -4764,27 +4765,27 @@ static void gent_attr_all(void)
static
int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
- hid_t tid, void *buf)
+ hid_t tid, void *buf)
{
- hid_t aid;
- hid_t sid;
- herr_t status;
+ hid_t aid;
+ hid_t sid;
+ herr_t status;
- /* Create a buf space */
- sid = H5Screate_simple(rank, dims, NULL);
+ /* Create a buf space */
+ sid = H5Screate_simple(rank, dims, NULL);
- /* Create the attribute */
- aid = H5Acreate2(loc_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ /* Create the attribute */
+ aid = H5Acreate2(loc_id, attr_name, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- /* Write the buf */
- if(buf)
- status = H5Awrite(aid, tid, buf);
+ /* Write the buf */
+ if(buf)
+ status = H5Awrite(aid, tid, buf);
- /* Close */
- status = H5Aclose(aid);
- status = H5Sclose(sid);
+ /* Close */
+ status = H5Aclose(aid);
+ status = H5Sclose(sid);
- return status;
+ return status;
}
/*-------------------------------------------------------------------------
@@ -4803,7 +4804,7 @@ int write_attr(hid_t loc_id, int rank, hsize_t *dims, const char *attr_name,
static
int write_dset( hid_t loc_id, int rank, hsize_t *dims, const char *dset_name,
- hid_t tid, void *buf )
+ hid_t tid, void *buf )
{
hid_t did;
hid_t sid;
@@ -4831,23 +4832,23 @@ static void gent_compound_complex(void)
{
/* Structure and array for compound types */
typedef struct Array1Struct {
- int a;
- const char *b[F41_DIMb];
- char c[F41_ARRAY_DIMc];
- short d[F41_ARRAY_DIMd1][F41_ARRAY_DIMd2];
- float e;
- double f[F41_ARRAY_DIMf];
- char g;
+ int a;
+ const char *b[F41_DIMb];
+ char c[F41_ARRAY_DIMc];
+ short d[F41_ARRAY_DIMd1][F41_ARRAY_DIMd2];
+ float e;
+ double f[F41_ARRAY_DIMf];
+ char g;
} Array1Struct;
Array1Struct Array1[F41_LENGTH];
/* Define the value of the string array */
const char *quote [F41_DIMb] = {
- "A fight is a contract that takes two people to honor.",
- "A combative stance means that you've accepted the contract.",
- "In which case, you deserve what you get.",
- " -- Professor Cheng Man-ch'ing"
- };
+ "A fight is a contract that takes two people to honor.",
+ "A combative stance means that you've accepted the contract.",
+ "In which case, you deserve what you get.",
+ " -- Professor Cheng Man-ch'ing"
+ };
/* Define the value of the character array */
char chararray [F41_ARRAY_DIMc] = {'H', 'e', 'l', 'l', 'o', '!'};
@@ -4874,24 +4875,24 @@ static void gent_compound_complex(void)
Array1[m].a = m;
for(n = 0; n < F41_DIMb; n++) {
- Array1[m].b[n] = quote[n];
- }
+ Array1[m].b[n] = quote[n];
+ }
- for(n = 0; n < F41_ARRAY_DIMc; n++) {
+ for(n = 0; n < F41_ARRAY_DIMc; n++) {
Array1[m].c[n] = chararray[n];
- }
+ }
- for(n = 0; n < F41_ARRAY_DIMd1; n++) {
- for(o = 0; o < F41_ARRAY_DIMd2; o++){
- Array1[m].d[n][o] = m + n + o;
+ for(n = 0; n < F41_ARRAY_DIMd1; n++) {
+ for(o = 0; o < F41_ARRAY_DIMd2; o++){
+ Array1[m].d[n][o] = m + n + o;
}
}
Array1[m].e = (float)( m * .96 );
- for(n = 0; n < F41_ARRAY_DIMf; n++) {
+ for(n = 0; n < F41_ARRAY_DIMf; n++) {
Array1[m].f[n] = ( m * 1024.9637 );
- }
+ }
Array1[m].g = 'm';
}
@@ -4902,7 +4903,7 @@ static void gent_compound_complex(void)
/* Create the file */
datafile = H5Fcreate(FILE41, H5F_ACC_TRUNC, H5P_DEFAULT,
- H5P_DEFAULT);
+ H5P_DEFAULT);
HDassert(datafile >= 0);
/* Copy the array data type for the string array */
@@ -4939,40 +4940,40 @@ static void gent_compound_complex(void)
/* Insert the arrays and variables into the structure */
status = H5Tinsert(Array1Structid, "a_name",
- HOFFSET(Array1Struct, a), H5T_NATIVE_INT);
+ HOFFSET(Array1Struct, a), H5T_NATIVE_INT);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "b_name",
- HOFFSET(Array1Struct, b), str_array_id);
+ HOFFSET(Array1Struct, b), str_array_id);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "c_name",
- HOFFSET(Array1Struct, c), array1_tid);
+ HOFFSET(Array1Struct, c), array1_tid);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "d_name",
- HOFFSET(Array1Struct, d), array2_tid);
+ HOFFSET(Array1Struct, d), array2_tid);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "e_name",
- HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT);
+ HOFFSET(Array1Struct, e), H5T_NATIVE_FLOAT);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "f_name",
- HOFFSET(Array1Struct, f), array4_tid);
+ HOFFSET(Array1Struct, f), array4_tid);
HDassert(status >= 0);
status = H5Tinsert(Array1Structid, "g_name",
- HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR);
+ HOFFSET(Array1Struct, g), H5T_NATIVE_CHAR);
HDassert(status >= 0);
/* Create the dataset */
dataset = H5Dcreate2(datafile, F41_DATASETNAME, Array1Structid,
- dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
/* Write data to the dataset */
status = H5Dwrite(dataset, Array1Structid, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, Array1);
+ H5P_DEFAULT, Array1);
HDassert(status >= 0);
/* Release resources */
@@ -5007,106 +5008,106 @@ static void gent_compound_complex(void)
static void gent_named_dtype_attr(void)
{
- hid_t fid;
- hid_t did;
- hid_t sid;
- hid_t tid;
- hid_t aid;
- hid_t gid;
- int data=8;
- herr_t ret;
-
- /* Create a file */
- fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid>0);
+ hid_t fid;
+ hid_t did;
+ hid_t sid;
+ hid_t tid;
+ hid_t aid;
+ hid_t gid;
+ int data=8;
+ herr_t ret;
-/*-------------------------------------------------------------------------
- * datatype
- *-------------------------------------------------------------------------
- */
+ /* Create a file */
+ fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid>0);
- /* Create a datatype to commit and use */
- tid=H5Tcopy(H5T_NATIVE_INT);
- HDassert(tid>0);
+ /*-------------------------------------------------------------------------
+ * datatype
+ *-------------------------------------------------------------------------
+ */
- /* Commit datatype to file */
- ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ /* Create a datatype to commit and use */
+ tid=H5Tcopy(H5T_NATIVE_INT);
+ HDassert(tid>0);
- /* Create a hard link to the datatype */
- ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ /* Commit datatype to file */
+ ret = H5Tcommit2(fid, F42_TYPENAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(ret >= 0);
- /* Create a scalar dataspace used for all objects */
- sid = H5Screate(H5S_SCALAR);
- HDassert(sid > 0);
+ /* Create a hard link to the datatype */
+ ret = H5Lcreate_hard(fid, F42_TYPENAME, fid, F42_LINKNAME, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(ret >= 0);
- /* Create attribute on commited datatype */
- aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ /* Create a scalar dataspace used for all objects */
+ sid = H5Screate(H5S_SCALAR);
+ HDassert(sid > 0);
- /* Write data into the attribute */
- ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ /* Create attribute on commited datatype */
+ aid = H5Acreate2(tid, F42_ATTRNAME, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(aid > 0);
-/*-------------------------------------------------------------------------
- * dataset
- *-------------------------------------------------------------------------
- */
+ /* Write data into the attribute */
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ HDassert(ret >= 0);
- /* Create dataset */
- did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(did > 0);
+ /*-------------------------------------------------------------------------
+ * dataset
+ *-------------------------------------------------------------------------
+ */
- /* Create attribute on dataset */
- aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ /* Create dataset */
+ did = H5Dcreate2(fid, F42_DSETNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(did > 0);
- /* Write data into the attribute */
- ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ /* Create attribute on dataset */
+ aid = H5Acreate2(did, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(aid > 0);
-/*-------------------------------------------------------------------------
- * group
- *-------------------------------------------------------------------------
- */
+ /* Write data into the attribute */
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ HDassert(ret >= 0);
- /* Create a group */
- gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(gid > 0);
+ /*-------------------------------------------------------------------------
+ * group
+ *-------------------------------------------------------------------------
+ */
- /* Create attribute on group */
- aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(aid > 0);
+ /* Create a group */
+ gid = H5Gcreate2(fid, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(gid > 0);
- /* Write data into the attribute */
- ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
- HDassert(ret >= 0);
+ /* Create attribute on group */
+ aid = H5Acreate2(gid, F42_ATTRNAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(aid > 0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ /* Write data into the attribute */
+ ret = H5Awrite(aid, H5T_NATIVE_INT, &data);
+ HDassert(ret >= 0);
- /* Close attribute */
- ret = H5Aclose(aid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+
+ /* Close attribute */
+ ret = H5Aclose(aid);
+ HDassert(ret >= 0);
- /* Close dataset */
- ret = H5Dclose(did);
- HDassert(ret >= 0);
+ /* Close dataset */
+ ret = H5Dclose(did);
+ HDassert(ret >= 0);
- /* Close dataspace */
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ /* Close dataspace */
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
- /* Close datatype */
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ /* Close datatype */
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
- /* Close file */
- ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ /* Close file */
+ ret = H5Fclose(fid);
+ HDassert(ret >= 0);
}
@@ -5165,7 +5166,7 @@ static void gent_zero_dim_size(void)
/* dataset */
dataset = H5Dcreate2(fid, "dset of 0 dimension size", H5T_STD_I32BE, space, H5P_DEFAULT,
- H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT);
/* nothing should be written */
H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &dset_buf);
@@ -5189,11 +5190,11 @@ static void gent_zero_dim_size(void)
*/
static
int make_dset(hid_t loc_id,
- const char *name,
- hid_t sid,
- hid_t tid,
- hid_t dcpl,
- void *buf)
+ const char *name,
+ hid_t sid,
+ hid_t tid,
+ hid_t dcpl,
+ void *buf)
{
hid_t dsid;
@@ -5211,7 +5212,7 @@ int make_dset(hid_t loc_id,
return 0;
-out:
+ out:
H5E_BEGIN_TRY {
H5Dclose(dsid);
} H5E_END_TRY;
@@ -5230,38 +5231,38 @@ out:
static void
make_external(hid_t fid)
{
- hid_t dcpl; /*dataset creation property list */
- hid_t sid; /*dataspace ID */
- hid_t dsid; /*dataset ID */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
- hsize_t size; /*bytes reserved for data in the external file*/
- int ret;
+ hid_t dcpl; /*dataset creation property list */
+ hid_t sid; /*dataspace ID */
+ hid_t dsid; /*dataset ID */
+ hsize_t cur_size[1]; /*data space current size */
+ hsize_t max_size[1]; /*data space maximum size */
+ hsize_t size; /*bytes reserved for data in the external file*/
+ int ret;
- cur_size[0] = max_size[0] = 100;
- size = (max_size[0]*sizeof(int)/2);
+ cur_size[0] = max_size[0] = 100;
+ size = (max_size[0]*sizeof(int)/2);
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
- ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size);
- HDassert(ret >= 0);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ ret = H5Pset_external(dcpl, "ext1.bin", (off_t)0, size);
+ HDassert(ret >= 0);
- ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size);
- HDassert(ret >= 0);
+ ret = H5Pset_external(dcpl, "ext2.bin", (off_t)0, size);
+ HDassert(ret >= 0);
- sid = H5Screate_simple(1, cur_size, max_size);
- HDassert(ret >= 0);
+ sid = H5Screate_simple(1, cur_size, max_size);
+ HDassert(ret >= 0);
- dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- HDassert(ret >= 0);
+ dsid = H5Dcreate2(fid, "external", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ HDassert(ret >= 0);
- H5Dclose(dsid);
- HDassert(ret >= 0);
+ H5Dclose(dsid);
+ HDassert(ret >= 0);
- H5Sclose(sid);
- HDassert(ret >= 0);
+ H5Sclose(sid);
+ HDassert(ret >= 0);
- H5Pclose(dcpl);
- HDassert(ret >= 0);
+ H5Pclose(dcpl);
+ HDassert(ret >= 0);
}
/*-------------------------------------------------------------------------
@@ -5273,312 +5274,312 @@ make_external(hid_t fid)
*/
static void gent_filters(void)
{
- hid_t fid; /* file id */
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hid_t tid; /* datatype ID */
+ hid_t fid; /* file id */
+ hid_t dcpl; /* dataset creation property list */
+ hid_t sid; /* dataspace ID */
+ hid_t tid; /* datatype ID */
#ifdef H5_HAVE_FILTER_SZIP
- unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
- unsigned szip_pixels_per_block=4;
+ unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
+ unsigned szip_pixels_per_block=4;
#endif /* H5_HAVE_FILTER_SZIP */
- hsize_t dims1[RANK] = {DIM1,DIM2};
- hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
- int buf1[DIM1][DIM2];
- int i, j, n, ret;
-
- for(i=n=0; i<DIM1; i++){
- for(j=0; j<DIM2; j++){
- buf1[i][j]=n++;
- }
- }
+ hsize_t dims1[RANK] = {DIM1,DIM2};
+ hsize_t chunk_dims[RANK] = {CDIM1,CDIM2};
+ int buf1[DIM1][DIM2];
+ int i, j, n, ret;
+
+ for(i=n=0; i<DIM1; i++){
+ for(j=0; j<DIM2; j++){
+ buf1[i][j]=n++;
+ }
+ }
- /* create a file */
- fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid>=0);
+ /* create a file */
+ fid = H5Fcreate(FILE44, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid>=0);
- /* create a space */
- sid = H5Screate_simple(SPACE2_RANK, dims1, NULL);
+ /* create a space */
+ sid = H5Screate_simple(SPACE2_RANK, dims1, NULL);
- /* create a dataset creation property list; the same DCPL is used for all dsets */
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ /* create a dataset creation property list; the same DCPL is used for all dsets */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
-/*-------------------------------------------------------------------------
- * create a compact and contiguous storage layout dataset
- * add a comment to the datasets
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_layout(dcpl, H5D_COMPACT);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * create a compact and contiguous storage layout dataset
+ * add a comment to the datasets
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_layout(dcpl, H5D_COMPACT);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"compact",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"compact",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
- ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT);
- HDassert(ret >= 0);
+ ret = H5Oset_comment_by_name(fid, "compact", "This is a dataset with compact storage", H5P_DEFAULT);
+ HDassert(ret >= 0);
- ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS);
- HDassert(ret >= 0);
+ ret = H5Pset_layout(dcpl, H5D_CONTIGUOUS);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"contiguous",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"contiguous",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
- ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT);
- HDassert(ret >= 0);
+ ret = H5Oset_comment_by_name(fid, "contiguous", "This is a dataset with contiguous storage", H5P_DEFAULT);
+ HDassert(ret >= 0);
- ret = H5Pset_layout(dcpl, H5D_CHUNKED);
- HDassert(ret >= 0);
+ ret = H5Pset_layout(dcpl, H5D_CHUNKED);
+ HDassert(ret >= 0);
- ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
- HDassert(ret >= 0);
+ ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"chunked",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"chunked",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
- ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT);
- HDassert(ret >= 0);
+ ret = H5Oset_comment_by_name(fid, "chunked", "This is a dataset with chunked storage", H5P_DEFAULT);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * make several dataset with filters
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * make several dataset with filters
+ *-------------------------------------------------------------------------
+ */
- /* set up chunk */
- ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
- HDassert(ret >= 0);
+ /* set up chunk */
+ ret = H5Pset_chunk(dcpl, SPACE2_RANK, chunk_dims);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * SZIP
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * SZIP
+ *-------------------------------------------------------------------------
+ */
#ifdef H5_HAVE_FILTER_SZIP
- if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
-
- /* set szip data */
- ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block);
- HDassert(ret >= 0);
-
- ret=make_dset(fid,"szip",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
- }
+ if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
+
+ /* set szip data */
+ ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block);
+ HDassert(ret >= 0);
+
+ ret=make_dset(fid,"szip",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
+ }
#endif /* H5_HAVE_FILTER_SZIP */
-/*-------------------------------------------------------------------------
- * GZIP
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * GZIP
+ *-------------------------------------------------------------------------
+ */
#if defined (H5_HAVE_FILTER_DEFLATE)
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
- /* set deflate data */
- ret = H5Pset_deflate(dcpl, 9);
- HDassert(ret >= 0);
+ /* set deflate data */
+ ret = H5Pset_deflate(dcpl, 9);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"deflate",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"deflate",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
#endif
-/*-------------------------------------------------------------------------
- * shuffle
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * shuffle
+ *-------------------------------------------------------------------------
+ */
#if defined (H5_HAVE_FILTER_SHUFFLE)
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
- /* set the shuffle filter */
- ret = H5Pset_shuffle(dcpl);
- HDassert(ret >= 0);
+ /* set the shuffle filter */
+ ret = H5Pset_shuffle(dcpl);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"shuffle",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
#endif
-/*-------------------------------------------------------------------------
- * checksum
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * checksum
+ *-------------------------------------------------------------------------
+ */
#if defined (H5_HAVE_FILTER_FLETCHER32)
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
- /* set the checksum filter */
- ret = H5Pset_fletcher32(dcpl);
- HDassert(ret >= 0);
+ /* set the checksum filter */
+ ret = H5Pset_fletcher32(dcpl);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"fletcher32",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
#endif
-/*-------------------------------------------------------------------------
- * nbit
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * nbit
+ *-------------------------------------------------------------------------
+ */
#if defined (H5_HAVE_FILTER_NBIT)
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
-
- /* set the checksum filter */
- ret = H5Pset_nbit(dcpl);
- HDassert(ret >= 0);
-
- tid=H5Tcopy(H5T_NATIVE_INT);
- H5Tset_precision(tid,H5Tget_size(tid)-1);
- ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
+
+ /* set the checksum filter */
+ ret = H5Pset_nbit(dcpl);
+ HDassert(ret >= 0);
+
+ tid=H5Tcopy(H5T_NATIVE_INT);
+ H5Tset_precision(tid,H5Tget_size(tid)-1);
+ ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1);
+ HDassert(ret >= 0);
#endif
-/*-------------------------------------------------------------------------
- * scaleoffset
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * scaleoffset
+ *-------------------------------------------------------------------------
+ */
#if defined (H5_HAVE_FILTER_SCALEOFFSET)
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
- /* set the scaleoffset filter */
- ret = H5Pset_scaleoffset(dcpl,H5Z_SO_INT,(int)H5Tget_size(H5T_NATIVE_INT));
- HDassert(ret >= 0);
+ /* set the scaleoffset filter */
+ ret = H5Pset_scaleoffset(dcpl,H5Z_SO_INT,(int)H5Tget_size(H5T_NATIVE_INT));
+ HDassert(ret >= 0);
- ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
#endif
-/*-------------------------------------------------------------------------
- * all filters
- *-------------------------------------------------------------------------
- */
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * all filters
+ *-------------------------------------------------------------------------
+ */
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
#if defined (H5_HAVE_FILTER_SHUFFLE)
- /* set the shuffle filter */
- ret = H5Pset_shuffle(dcpl);
- HDassert(ret >= 0);
+ /* set the shuffle filter */
+ ret = H5Pset_shuffle(dcpl);
+ HDassert(ret >= 0);
#endif
#ifdef H5_HAVE_FILTER_SZIP
- if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
- szip_options_mask=H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK;
- /* set szip data */
- ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block);
- HDassert(ret >= 0);
- }
+ if(h5tools_can_encode(H5Z_FILTER_SZIP) == 1) {
+ szip_options_mask=H5_SZIP_CHIP_OPTION_MASK | H5_SZIP_EC_OPTION_MASK;
+ /* set szip data */
+ ret = H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block);
+ HDassert(ret >= 0);
+ }
#endif /* H5_HAVE_FILTER_SZIP */
#if defined (H5_HAVE_FILTER_DEFLATE)
- /* set deflate data */
- ret = H5Pset_deflate(dcpl, 5);
- HDassert(ret >= 0);
+ /* set deflate data */
+ ret = H5Pset_deflate(dcpl, 5);
+ HDassert(ret >= 0);
#endif
#if defined (H5_HAVE_FILTER_FLETCHER32)
- /* set the checksum filter */
- ret = H5Pset_fletcher32(dcpl);
- HDassert(ret >= 0);
+ /* set the checksum filter */
+ ret = H5Pset_fletcher32(dcpl);
+ HDassert(ret >= 0);
#endif
#if defined (H5_HAVE_FILTER_NBIT)
- /* set the nbit filter */
- ret = H5Pset_nbit(dcpl);
- HDassert(ret >= 0);
+ /* set the nbit filter */
+ ret = H5Pset_nbit(dcpl);
+ HDassert(ret >= 0);
#endif
- ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * user defined filter
- *-------------------------------------------------------------------------
- */
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * user defined filter
+ *-------------------------------------------------------------------------
+ */
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
- ret = H5Zregister (H5Z_MYFILTER);
- HDassert(ret >= 0);
+ ret = H5Zregister (H5Z_MYFILTER);
+ HDassert(ret >= 0);
- ret = H5Pset_filter (dcpl, MYFILTER_ID, 0, 0, NULL);
- HDassert(ret >= 0);
+ ret = H5Pset_filter (dcpl, MYFILTER_ID, 0, 0, NULL);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"myfilter",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"myfilter",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
- /* remove the filters from the dcpl */
- ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
- HDassert(ret >= 0);
+ /* remove the filters from the dcpl */
+ ret = H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * make an external dataset
- *-------------------------------------------------------------------------
- */
- make_external(fid);
+ /*-------------------------------------------------------------------------
+ * make an external dataset
+ *-------------------------------------------------------------------------
+ */
+ make_external(fid);
-/*-------------------------------------------------------------------------
- * H5D_ALLOC_TIME_EARLY
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY);
- HDassert(ret >= 0);
- ret=make_dset(fid,"alloc_time_early",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * H5D_ALLOC_TIME_EARLY
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY);
+ HDassert(ret >= 0);
+ ret=make_dset(fid,"alloc_time_early",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * H5D_ALLOC_TIME_INCR
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR);
- HDassert(ret >= 0);
- ret=make_dset(fid,"alloc_time_incr",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * H5D_ALLOC_TIME_INCR
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_INCR);
+ HDassert(ret >= 0);
+ ret=make_dset(fid,"alloc_time_incr",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * H5D_ALLOC_TIME_LATE
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE);
- HDassert(ret >= 0);
- ret=make_dset(fid,"alloc_time_late",sid,H5T_NATIVE_INT,dcpl,buf1);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * H5D_ALLOC_TIME_LATE
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE);
+ HDassert(ret >= 0);
+ ret=make_dset(fid,"alloc_time_late",sid,H5T_NATIVE_INT,dcpl,buf1);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * commit a H5G_TYPE type with a comment
- *-------------------------------------------------------------------------
- */
- tid = H5Tcopy(H5T_STD_B8LE);
- ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * commit a H5G_TYPE type with a comment
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tcopy(H5T_STD_B8LE);
+ ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(ret >= 0);
- ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT);
- HDassert(ret >= 0);
+ ret = H5Oset_comment_by_name(fid, "mytype", "This is a commited datatype", H5P_DEFAULT);
+ HDassert(ret >= 0);
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
- ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
- ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ ret = H5Fclose(fid);
+ HDassert(ret >= 0);
}
@@ -5591,10 +5592,10 @@ static void gent_filters(void)
*/
static size_t
myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
- const unsigned int UNUSED *cd_values, size_t nbytes,
- size_t UNUSED *buf_size, void UNUSED **buf)
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t UNUSED *buf_size, void UNUSED **buf)
{
- return nbytes;
+ return nbytes;
}
@@ -5609,21 +5610,21 @@ myfilter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
static herr_t
set_local_myfilter(hid_t dcpl_id, hid_t UNUSED tid, hid_t UNUSED sid)
{
- unsigned flags; /* Filter flags */
- size_t cd_nelmts = 0; /* Number of filter parameters */
- unsigned cd_values[2] = {5, 6}; /* Filter parameters */
+ unsigned flags; /* Filter flags */
+ size_t cd_nelmts = 0; /* Number of filter parameters */
+ unsigned cd_values[2] = {5, 6}; /* Filter parameters */
- /* Get the filter's current parameters */
- if(H5Pget_filter_by_id2(dcpl_id, MYFILTER_ID, &flags, &cd_nelmts, cd_values, 0, NULL, NULL) < 0)
- return(FAIL);
+ /* Get the filter's current parameters */
+ if(H5Pget_filter_by_id2(dcpl_id, MYFILTER_ID, &flags, &cd_nelmts, cd_values, 0, NULL, NULL) < 0)
+ return(FAIL);
- cd_nelmts = 2;
+ cd_nelmts = 2;
- /* Modify the filter's parameters for this dataset */
- if(H5Pmodify_filter(dcpl_id, MYFILTER_ID, flags, cd_nelmts, cd_values) < 0)
- return(FAIL);
+ /* Modify the filter's parameters for this dataset */
+ if(H5Pmodify_filter(dcpl_id, MYFILTER_ID, flags, cd_nelmts, cd_values) < 0)
+ return(FAIL);
- return(SUCCEED);
+ return(SUCCEED);
}
/*-------------------------------------------------------------------------
@@ -5652,9 +5653,9 @@ static void gent_fcontents(void)
/*-------------------------------------------------------------------------
- * links
- *-------------------------------------------------------------------------
- */
+ * links
+ *-------------------------------------------------------------------------
+ */
/* hard link to "dset" */
@@ -5703,9 +5704,9 @@ static void gent_fcontents(void)
HDassert(ret >= 0);
/*-------------------------------------------------------------------------
- * datatypes
- *-------------------------------------------------------------------------
- */
+ * datatypes
+ *-------------------------------------------------------------------------
+ */
tid = H5Tcopy(H5T_NATIVE_INT);
ret = H5Tcommit2(fid, "mytype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
HDassert(ret >= 0);
@@ -5725,9 +5726,9 @@ static void gent_fcontents(void)
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ * close
+ *-------------------------------------------------------------------------
+ */
ret = H5Fclose(fid);
@@ -5752,152 +5753,152 @@ static void gent_fcontents(void)
*/
static void gent_fvalues(void)
{
- /* compound datatype */
- typedef struct c_t
- {
- char a;
- double b;
- } c_t;
-
-
- hid_t fid; /* file id */
- hid_t dcpl; /* dataset creation property list */
- hid_t sid; /* dataspace ID */
- hid_t tid; /* datatype ID */
- hid_t did; /* datasetID */
- hsize_t dims[1]={2};
- int buf[2]={1,2}; /* integer */
- int fillval1=-99; /* integer fill value */
- c_t buf2[2]={{1,2},{3,4}}; /* compound */
- c_t fillval2[1]={{1,2}}; /* compound fill value */
- hvl_t buf3[2]; /* vlen */
- hvl_t fillval3; /* vlen fill value */
- hsize_t dimarray[1]={3}; /* array dimension */
- int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */
- int ret;
-
- /* create a file */
- fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid>=0);
-
- /* create a space */
- sid = H5Screate_simple(1, dims, NULL);
-
- /* create a dataset creation property list */
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ /* compound datatype */
+ typedef struct c_t
+ {
+ char a;
+ double b;
+ } c_t;
+
+
+ hid_t fid; /* file id */
+ hid_t dcpl; /* dataset creation property list */
+ hid_t sid; /* dataspace ID */
+ hid_t tid; /* datatype ID */
+ hid_t did; /* datasetID */
+ hsize_t dims[1]={2};
+ int buf[2]={1,2}; /* integer */
+ int fillval1=-99; /* integer fill value */
+ c_t buf2[2]={{1,2},{3,4}}; /* compound */
+ c_t fillval2[1]={{1,2}}; /* compound fill value */
+ hvl_t buf3[2]; /* vlen */
+ hvl_t fillval3; /* vlen fill value */
+ hsize_t dimarray[1]={3}; /* array dimension */
+ int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */
+ int ret;
-/*-------------------------------------------------------------------------
- * make datasets with fill value combinations
- * H5D_FILL_TIME_IFSET
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET);
- HDassert(ret >= 0);
+ /* create a file */
+ fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid>=0);
- ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ /* create a space */
+ sid = H5Screate_simple(1, dims, NULL);
- ret=make_dset(fid,"fill_time_ifset",sid,H5T_NATIVE_INT,dcpl,buf);
- HDassert(ret >= 0);
+ /* create a dataset creation property list */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
-/*-------------------------------------------------------------------------
- * H5D_FILL_TIME_NEVER
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * make datasets with fill value combinations
+ * H5D_FILL_TIME_IFSET
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET);
+ HDassert(ret >= 0);
- ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"fill_time_never",sid,H5T_NATIVE_INT,dcpl,buf);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"fill_time_ifset",sid,H5T_NATIVE_INT,dcpl,buf);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * H5D_FILL_TIME_ALLOC
- *-------------------------------------------------------------------------
- */
- ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * H5D_FILL_TIME_NEVER
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_NEVER);
+ HDassert(ret >= 0);
- ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
- HDassert(ret >= 0);
+ ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
+ HDassert(ret >= 0);
- ret=make_dset(fid,"fill_time_alloc",sid,H5T_NATIVE_INT,dcpl,buf);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"fill_time_never",sid,H5T_NATIVE_INT,dcpl,buf);
+ HDassert(ret >= 0);
- ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * H5D_FILL_TIME_ALLOC
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * dataset with no fill value
- *-------------------------------------------------------------------------
- */
- write_dset(fid,1,dims,"no_fill",H5T_NATIVE_INT,buf);
+ ret = H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fillval1);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * dataset with a H5T_COMPOUND fill value
- *-------------------------------------------------------------------------
- */
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
- tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t));
- H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR);
- H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE);
- ret = H5Pset_fill_value(dcpl, tid, &fillval2);
- HDassert(ret >= 0);
- ret=make_dset(fid,"fill_compound",sid,tid,dcpl,buf2);
- HDassert(ret >= 0);
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
- ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ ret=make_dset(fid,"fill_time_alloc",sid,H5T_NATIVE_INT,dcpl,buf);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * dataset with a H5T_VLEN fill value
- *-------------------------------------------------------------------------
- */
- buf3[0].len = 1;
- buf3[0].p = HDmalloc( 1 * sizeof(int));
- ((int *)buf3[0].p)[0]=1;
- buf3[1].len = 2;
- buf3[1].p = HDmalloc(2 * sizeof(int));
- ((int *)buf3[1].p)[0] = 2;
- ((int *)buf3[1].p)[1] = 3;
-
- tid = H5Tvlen_create(H5T_NATIVE_INT);
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
-
- fillval3.p=NULL; fillval3.len=0;
- ret = H5Pset_fill_value(dcpl, tid, &fillval3);
- HDassert(ret >= 0);
-
- did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
- HDassert(ret >= 0);
- ret = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf3);
- HDassert(ret >= 0);
- ret = H5Dclose(did);
- ret = H5Tclose(tid);
- ret = H5Pclose(dcpl);
- HDassert(ret >= 0);
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * dataset with a H5T_ARRAY fill value
- *-------------------------------------------------------------------------
- */
- tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
- write_dset(fid, 1, dims, "fill_array", tid, buf4);
- ret = H5Tclose(tid);
+ /*-------------------------------------------------------------------------
+ * dataset with no fill value
+ *-------------------------------------------------------------------------
+ */
+ write_dset(fid,1,dims,"no_fill",H5T_NATIVE_INT,buf);
+ /*-------------------------------------------------------------------------
+ * dataset with a H5T_COMPOUND fill value
+ *-------------------------------------------------------------------------
+ */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t));
+ H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_CHAR);
+ H5Tinsert(tid, "b", HOFFSET(c_t, b), H5T_NATIVE_DOUBLE);
+ ret = H5Pset_fill_value(dcpl, tid, &fillval2);
+ HDassert(ret >= 0);
+ ret=make_dset(fid,"fill_compound",sid,tid,dcpl,buf2);
+ HDassert(ret >= 0);
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
- ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * dataset with a H5T_VLEN fill value
+ *-------------------------------------------------------------------------
+ */
+ buf3[0].len = 1;
+ buf3[0].p = HDmalloc( 1 * sizeof(int));
+ ((int *)buf3[0].p)[0]=1;
+ buf3[1].len = 2;
+ buf3[1].p = HDmalloc(2 * sizeof(int));
+ ((int *)buf3[1].p)[0] = 2;
+ ((int *)buf3[1].p)[1] = 3;
+
+ tid = H5Tvlen_create(H5T_NATIVE_INT);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+
+ fillval3.p=NULL; fillval3.len=0;
+ ret = H5Pset_fill_value(dcpl, tid, &fillval3);
+ HDassert(ret >= 0);
+
+ did = H5Dcreate2(fid, "fill_vlen", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf3);
+ HDassert(ret >= 0);
+ ret = H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf3);
+ HDassert(ret >= 0);
+ ret = H5Dclose(did);
+ ret = H5Tclose(tid);
+ ret = H5Pclose(dcpl);
+ HDassert(ret >= 0);
+
+ /*-------------------------------------------------------------------------
+ * dataset with a H5T_ARRAY fill value
+ *-------------------------------------------------------------------------
+ */
+ tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray);
+ write_dset(fid, 1, dims, "fill_array", tid, buf4);
+ ret = H5Tclose(tid);
+
+
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
+ ret = H5Fclose(fid);
+ HDassert(ret >= 0);
}
@@ -5910,103 +5911,103 @@ static void gent_fvalues(void)
*/
static void gent_string(void)
{
- /* compound datatype */
- typedef struct c_t
- {
- int a;
- char str[255];
- } c_t;
-
- hid_t fid; /* file id */
- hid_t sid; /* dataspace ID */
- hid_t tid; /* datatype ID */
- hid_t str_tid; /* datatype ID */
- hid_t did; /* dataset ID */
- char buf1[]={"quote \" backspace\b form feed\f new line\n tab\t new line\n carriage return\r"};
- const char *buf2[SPACE1_DIM1]= {
- "Four score and seven\n years ago our forefathers brought forth on this continent a new nation,",
- "conceived in liberty\n and dedicated to the proposition that all men are created equal.",
- "Now we are engaged\n in a great civil war,",
- "testing whether that\n nation or any nation so conceived and so dedicated can long endure."
- };
- c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
- char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
- hsize_t dims1[] = {1};
- hsize_t dims2[] = {SPACE1_DIM1};
- hsize_t dims4[1];
- int ret;
-
- dims4[0] = sizeof(buf4);
-
- /* create a file */
- fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- HDassert(fid>=0);
+ /* compound datatype */
+ typedef struct c_t
+ {
+ int a;
+ char str[255];
+ } c_t;
+
+ hid_t fid; /* file id */
+ hid_t sid; /* dataspace ID */
+ hid_t tid; /* datatype ID */
+ hid_t str_tid; /* datatype ID */
+ hid_t did; /* dataset ID */
+ char buf1[]={"quote \" backspace\b form feed\f new line\n tab\t new line\n carriage return\r"};
+ const char *buf2[SPACE1_DIM1]= {
+ "Four score and seven\n years ago our forefathers brought forth on this continent a new nation,",
+ "conceived in liberty\n and dedicated to the proposition that all men are created equal.",
+ "Now we are engaged\n in a great civil war,",
+ "testing whether that\n nation or any nation so conceived and so dedicated can long endure."
+ };
+ c_t buf3 = {24, "Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
+ char buf4[] = {"Four score and seven\n years ago our forefathers brought forth on this continent a new nation"};
+ hsize_t dims1[] = {1};
+ hsize_t dims2[] = {SPACE1_DIM1};
+ hsize_t dims4[1];
+ int ret;
-/*-------------------------------------------------------------------------
- * str1
- *-------------------------------------------------------------------------
- */
+ dims4[0] = sizeof(buf4);
- tid=H5Tcopy(H5T_C_S1);
- ret = H5Tset_size(tid, sizeof(buf1));
- HDassert(ret >= 0);
- write_dset(fid,1,dims1,"str1",tid,buf1);
- HDassert(ret >= 0);
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
+ /* create a file */
+ fid = H5Fcreate(FILE49, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ HDassert(fid>=0);
-/*-------------------------------------------------------------------------
- * str2
- *-------------------------------------------------------------------------
- */
- sid = H5Screate_simple(SPACE1_RANK, dims2, NULL);
- tid = H5Tcopy(H5T_C_S1);
- ret = H5Tset_size(tid, H5T_VARIABLE);
- HDassert(ret >= 0);
- did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
- HDassert(ret >= 0);
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
- ret = H5Dclose(did);
- HDassert(ret >= 0);
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * str1
+ *-------------------------------------------------------------------------
+ */
-/*-------------------------------------------------------------------------
- * str3
- *-------------------------------------------------------------------------
- */
- sid = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t));
- str_tid = H5Tcopy( H5T_C_S1 );
- H5Tset_size( str_tid, 255 );
- H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT);
- H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid );
- ret=make_dset(fid,"str3",sid,tid,H5P_DEFAULT,&buf3);
- HDassert(ret >= 0);
- ret = H5Tclose(tid);
- HDassert(ret >= 0);
- ret = H5Tclose(str_tid);
- HDassert(ret >= 0);
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ tid=H5Tcopy(H5T_C_S1);
+ ret = H5Tset_size(tid, sizeof(buf1));
+ HDassert(ret >= 0);
+ write_dset(fid,1,dims1,"str1",tid,buf1);
+ HDassert(ret >= 0);
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * str4
- *-------------------------------------------------------------------------
- */
- sid = H5Screate_simple(SPACE1_RANK, dims4, NULL);
- ret=make_dset(fid,"str4",sid,H5T_NATIVE_CHAR,H5P_DEFAULT,buf4);
- ret = H5Sclose(sid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * str2
+ *-------------------------------------------------------------------------
+ */
+ sid = H5Screate_simple(SPACE1_RANK, dims2, NULL);
+ tid = H5Tcopy(H5T_C_S1);
+ ret = H5Tset_size(tid, H5T_VARIABLE);
+ HDassert(ret >= 0);
+ did = H5Dcreate2(fid, "str2", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2);
+ HDassert(ret >= 0);
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
+ ret = H5Dclose(did);
+ HDassert(ret >= 0);
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
- ret = H5Fclose(fid);
- HDassert(ret >= 0);
+ /*-------------------------------------------------------------------------
+ * str3
+ *-------------------------------------------------------------------------
+ */
+ sid = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ tid = H5Tcreate (H5T_COMPOUND, sizeof(c_t));
+ str_tid = H5Tcopy( H5T_C_S1 );
+ H5Tset_size( str_tid, 255 );
+ H5Tinsert(tid, "a", HOFFSET(c_t, a), H5T_NATIVE_INT);
+ H5Tinsert(tid, "str", HOFFSET(c_t, str), str_tid );
+ ret=make_dset(fid,"str3",sid,tid,H5P_DEFAULT,&buf3);
+ HDassert(ret >= 0);
+ ret = H5Tclose(tid);
+ HDassert(ret >= 0);
+ ret = H5Tclose(str_tid);
+ HDassert(ret >= 0);
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
+
+ /*-------------------------------------------------------------------------
+ * str4
+ *-------------------------------------------------------------------------
+ */
+ sid = H5Screate_simple(SPACE1_RANK, dims4, NULL);
+ ret=make_dset(fid,"str4",sid,H5T_NATIVE_CHAR,H5P_DEFAULT,buf4);
+ ret = H5Sclose(sid);
+ HDassert(ret >= 0);
+
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+ ret = H5Fclose(fid);
+ HDassert(ret >= 0);
}
@@ -6052,18 +6053,18 @@ static void gent_aindices(void)
HDassert(fid>=0);
/*-------------------------------------------------------------------------
- * root datasets
- *-------------------------------------------------------------------------
- */
+ * root datasets
+ *-------------------------------------------------------------------------
+ */
write_dset(fid,1,dims1,"1d",H5T_NATIVE_INT,buf1);
write_dset(fid,2,dims2,"2d",H5T_NATIVE_INT,buf2);
write_dset(fid,3,dims3,"3d",H5T_NATIVE_INT,buf3);
write_dset(fid,4,dims4,"4d",H5T_NATIVE_INT,buf4);
/*-------------------------------------------------------------------------
- * test with group indentation
- *-------------------------------------------------------------------------
- */
+ * test with group indentation
+ *-------------------------------------------------------------------------
+ */
gid[0] = H5Gcreate2(fid, "/g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
gid[1] = H5Gcreate2(fid, "g1/g2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
gid[2] = H5Gcreate2(fid, "g1/g2/g3", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
@@ -6078,9 +6079,9 @@ static void gent_aindices(void)
H5Gclose(gid[i]);
/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ * close
+ *-------------------------------------------------------------------------
+ */
ret = H5Fclose(fid);
HDassert(ret >= 0);
@@ -6146,45 +6147,45 @@ static void gent_longlinks(void)
*/
static int gent_ldouble(void)
{
- hid_t fid;
- hid_t did;
- hid_t tid;
- hid_t sid;
- hsize_t dims[1] = {3};
- long double buf[3] = {1,2,3};
+ hid_t fid;
+ hid_t did;
+ hid_t tid;
+ hid_t sid;
+ hsize_t dims[1] = {3};
+ long double buf[3] = {1,2,3};
- if((fid = H5Fcreate(FILE52, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ if((fid = H5Fcreate(FILE52, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
- if((sid = H5Screate_simple(1, dims, NULL)) < 0)
- goto error;
+ if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ goto error;
- if((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
- goto error;
+ if((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ goto error;
- if(H5Tget_size(tid) == 0)
- goto error;
+ if(H5Tget_size(tid) == 0)
+ goto error;
- if((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ if((did = H5Dcreate2(fid, "dset", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
- if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- goto error;
+ if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ goto error;
- if(H5Sclose(sid) < 0)
- goto error;
- if(H5Tclose(tid) < 0)
- goto error;
- if(H5Dclose(did) < 0)
- goto error;
- if(H5Fclose(fid) < 0)
- goto error;
+ if(H5Sclose(sid) < 0)
+ goto error;
+ if(H5Tclose(tid) < 0)
+ goto error;
+ if(H5Dclose(did) < 0)
+ goto error;
+ if(H5Fclose(fid) < 0)
+ goto error;
- return 0;
+ return 0;
-error:
- printf("error !\n");
- return -1;
+ error:
+ printf("error !\n");
+ return -1;
}
@@ -6203,48 +6204,48 @@ error:
static void
gent_binary(void)
{
- hid_t fid, sid, did, aid;
- hsize_t dims[1] = {6};
- int ibuf[6] = {1,2,3,4,5,6};
- float fbuf[6] = {1,2,3,4,5,6};
- double dbuf[6] = {1,2,3,4,5,6};
+ hid_t fid, sid, did, aid;
+ hsize_t dims[1] = {6};
+ int ibuf[6] = {1,2,3,4,5,6};
+ float fbuf[6] = {1,2,3,4,5,6};
+ double dbuf[6] = {1,2,3,4,5,6};
- fid = H5Fcreate(FILE55, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- sid = H5Screate_simple(1, dims, NULL);
+ fid = H5Fcreate(FILE55, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ sid = H5Screate_simple(1, dims, NULL);
-/*-------------------------------------------------------------------------
- * integer
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * integer
+ *-------------------------------------------------------------------------
+ */
- did = H5Dcreate2(fid, "integer", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
- H5Dclose(did);
+ did = H5Dcreate2(fid, "integer", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
+ H5Dclose(did);
-/*-------------------------------------------------------------------------
- * float
- *-------------------------------------------------------------------------
- */
- did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf);
- H5Dclose(did);
+ /*-------------------------------------------------------------------------
+ * float
+ *-------------------------------------------------------------------------
+ */
+ did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf);
+ H5Dclose(did);
-/*-------------------------------------------------------------------------
- * double
- *-------------------------------------------------------------------------
- */
- did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf);
- /* create an attribute */
- aid = H5Acreate2(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
- H5Aclose(aid);
- H5Dclose(did);
+ /*-------------------------------------------------------------------------
+ * double
+ *-------------------------------------------------------------------------
+ */
+ did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf);
+ /* create an attribute */
+ aid = H5Acreate2(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
+ H5Aclose(aid);
+ H5Dclose(did);
- /* close */
- H5Sclose(sid);
- H5Fclose(fid);
+ /* close */
+ H5Sclose(sid);
+ H5Fclose(fid);
}
/*-------------------------------------------------------------------------
@@ -6345,7 +6346,7 @@ gent_bigdims(void)
return;
-out:
+ out:
printf("Error.....\n");
H5E_BEGIN_TRY {
H5Pclose(dcpl);
@@ -6421,10 +6422,10 @@ gent_group_creation_order(void)
if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
goto out;
-/*-------------------------------------------------------------------------
- * create a group "2"
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a group "2"
+ *-------------------------------------------------------------------------
+ */
if((gid = H5Gcreate2(fid, "2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
@@ -6460,7 +6461,7 @@ gent_group_creation_order(void)
goto out;
gid = -1;
- if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
@@ -6472,10 +6473,10 @@ gent_group_creation_order(void)
gid = -1;
-/*-------------------------------------------------------------------------
- * create a group "1" with H5P_CRT_ORDER_TRACKED set
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a group "1" with H5P_CRT_ORDER_TRACKED set
+ *-------------------------------------------------------------------------
+ */
if(H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
goto out;
@@ -6513,7 +6514,7 @@ gent_group_creation_order(void)
goto out;
gid = -1;
- if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if(H5Gclose(gid) < 0)
goto out;
@@ -6537,7 +6538,7 @@ gent_group_creation_order(void)
return;
-out:
+ out:
printf("Error.....\n");
H5E_BEGIN_TRY {
H5Gclose(gid);
@@ -6604,10 +6605,10 @@ gent_attr_creation_order(void)
if((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
-/*-------------------------------------------------------------------------
- * create a dataset with creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a dataset with creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
/* create a dataset */
if((did = H5Dcreate2(fid, "dt", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
@@ -6630,10 +6631,10 @@ gent_attr_creation_order(void)
did = -1;
-/*-------------------------------------------------------------------------
- * create a dataset without creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a dataset without creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
/* create a dataset */
if((did = H5Dcreate2(fid, "d", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6657,10 +6658,10 @@ gent_attr_creation_order(void)
-/*-------------------------------------------------------------------------
- * create a group with creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a group with creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
if((gid = H5Gcreate2(fid, "gt", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
@@ -6681,10 +6682,10 @@ gent_attr_creation_order(void)
goto out;
gid = -1;
-/*-------------------------------------------------------------------------
- * create a group without creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a group without creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
@@ -6705,10 +6706,10 @@ gent_attr_creation_order(void)
goto out;
gid = -1;
-/*-------------------------------------------------------------------------
- * create a named datatype with creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a named datatype with creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
goto out;
@@ -6732,10 +6733,10 @@ gent_attr_creation_order(void)
goto out;
tid = -1;
-/*-------------------------------------------------------------------------
- * create a named datatype without creation order tracked for attributes and atributes in it
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create a named datatype without creation order tracked for attributes and atributes in it
+ *-------------------------------------------------------------------------
+ */
if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
goto out;
@@ -6759,10 +6760,10 @@ gent_attr_creation_order(void)
goto out;
tid = -1;
-/*-------------------------------------------------------------------------
- * add some attributes to the root group
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * add some attributes to the root group
+ *-------------------------------------------------------------------------
+ */
if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
goto out;
@@ -6782,10 +6783,10 @@ gent_attr_creation_order(void)
goto out;
gid = -1;
-/*-------------------------------------------------------------------------
- * close
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
if(H5Sclose(sid) < 0)
goto out;
sid = -1;
@@ -6806,7 +6807,7 @@ gent_attr_creation_order(void)
return;
-out:
+ out:
printf("Error.....\n");
H5E_BEGIN_TRY {
H5Gclose(gid);
@@ -6835,35 +6836,35 @@ out:
static void
gent_fpformat(void)
{
- hid_t fid, sid, did;
- hsize_t dims[1] = {6};
- double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0};
- float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
+ hid_t fid, sid, did;
+ hsize_t dims[1] = {6};
+ double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0};
+ float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0};
- fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- sid = H5Screate_simple(1, dims, NULL);
+ fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ sid = H5Screate_simple(1, dims, NULL);
-/*-------------------------------------------------------------------------
- * double
- *-------------------------------------------------------------------------
- */
- did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf);
- H5Dclose(did);
+ /*-------------------------------------------------------------------------
+ * double
+ *-------------------------------------------------------------------------
+ */
+ did = H5Dcreate2(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf);
+ H5Dclose(did);
-/*-------------------------------------------------------------------------
- * float
- *-------------------------------------------------------------------------
- */
- did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf);
- H5Dclose(did);
+ /*-------------------------------------------------------------------------
+ * float
+ *-------------------------------------------------------------------------
+ */
+ did = H5Dcreate2(fid, "float", H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, fbuf);
+ H5Dclose(did);
- /* close */
- H5Sclose(sid);
- H5Fclose(fid);
+ /* close */
+ H5Sclose(sid);
+ H5Fclose(fid);
}
/*-------------------------------------------------------------------------
@@ -6878,75 +6879,75 @@ gent_fpformat(void)
static void
gent_extlinks(void)
{
- hid_t source_fid, target_fid, far_fid, sid, did, gid, gid2, tid;
- hsize_t dims[1] = {6};
- int buf[6] = {1, 2, 3, 4, 5, 6};
+ hid_t source_fid, target_fid, far_fid, sid, did, gid, gid2, tid;
+ hsize_t dims[1] = {6};
+ int buf[6] = {1, 2, 3, 4, 5, 6};
- /* create two files, a source and a target */
- source_fid = H5Fcreate(FILE61, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- target_fid = H5Fcreate(FILE62, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- far_fid = H5Fcreate(FILE63, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ /* create two files, a source and a target */
+ source_fid = H5Fcreate(FILE61, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ target_fid = H5Fcreate(FILE62, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ far_fid = H5Fcreate(FILE63, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-/*-------------------------------------------------------------------------
- * create Groups, a Dataset, a committed Datatype, external links, and a
- * cycle in the target
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create Groups, a Dataset, a committed Datatype, external links, and a
+ * cycle in the target
+ *-------------------------------------------------------------------------
+ */
- gid = H5Gcreate2(target_fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Gclose(H5Gcreate2(target_fid, "empty_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT));
- sid = H5Screate_simple(1, dims, NULL);
- did = H5Dcreate2(gid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
- H5Lcreate_external(FILE61, "/", gid, "elink_t1", H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_external(FILE61, "/ext_link4", gid, "elink_t2", H5P_DEFAULT, H5P_DEFAULT);
+ gid = H5Gcreate2(target_fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Gclose(H5Gcreate2(target_fid, "empty_group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT));
+ sid = H5Screate_simple(1, dims, NULL);
+ did = H5Dcreate2(gid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ H5Lcreate_external(FILE61, "/", gid, "elink_t1", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE61, "/ext_link4", gid, "elink_t2", H5P_DEFAULT, H5P_DEFAULT);
- gid2 = H5Gcreate2(gid, "subgroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_hard(target_fid, "/group", gid2, "link_to_group", H5P_DEFAULT, H5P_DEFAULT);
+ gid2 = H5Gcreate2(gid, "subgroup", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_hard(target_fid, "/group", gid2, "link_to_group", H5P_DEFAULT, H5P_DEFAULT);
- H5Dclose(did);
- H5Sclose(sid);
- H5Gclose(gid2);
- H5Gclose(gid);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Gclose(gid2);
+ H5Gclose(gid);
- sid = H5Screate_simple(1, dims, NULL);
- did = H5Dcreate2(target_fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
- H5Dclose(did);
- H5Sclose(sid);
+ sid = H5Screate_simple(1, dims, NULL);
+ did = H5Dcreate2(target_fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ H5Dclose(did);
+ H5Sclose(sid);
- tid = H5Tcopy(H5T_NATIVE_INT);
- H5Tcommit2(target_fid, "type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- H5Tclose(tid);
+ tid = H5Tcopy(H5T_NATIVE_INT);
+ H5Tcommit2(target_fid, "type", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Tclose(tid);
-/*-------------------------------------------------------------------------
- * create external links in the source file pointing to the target objects
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * create external links in the source file pointing to the target objects
+ *-------------------------------------------------------------------------
+ */
- H5Lcreate_external(FILE62, "group", source_fid, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_external(FILE62, "dset", source_fid, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_external(FILE62, "type", source_fid, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_external(FILE62, "group/elink_t2", source_fid, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
- H5Lcreate_external(FILE62, "empty_group", source_fid, "ext_link5", H5P_DEFAULT, H5P_DEFAULT);
-/* external link to soft link which linked to a dataset */
- H5Lcreate_external(FILE4_1, "/soft_dset1", source_fid, "ext2soft_link1", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE62, "group", source_fid, "ext_link1", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE62, "dset", source_fid, "ext_link2", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE62, "type", source_fid, "ext_link3", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE62, "group/elink_t2", source_fid, "ext_link4", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_external(FILE62, "empty_group", source_fid, "ext_link5", H5P_DEFAULT, H5P_DEFAULT);
+ /* external link to soft link which linked to a dataset */
+ H5Lcreate_external(FILE4_1, "/soft_dset1", source_fid, "ext2soft_link1", H5P_DEFAULT, H5P_DEFAULT);
-/* external link to dangle soft link */
- H5Lcreate_external(FILE4_1, "/soft_dangle", source_fid, "ext2softdangle_link1", H5P_DEFAULT, H5P_DEFAULT);
+ /* external link to dangle soft link */
+ H5Lcreate_external(FILE4_1, "/soft_dangle", source_fid, "ext2softdangle_link1", H5P_DEFAULT, H5P_DEFAULT);
-/*-------------------------------------------------------------------------
- * create external link in the "far" file pointing to the source file
- *-------------------------------------------------------------------------
- */
- H5Lcreate_external(FILE61, "/", far_fid, "src_file", H5P_DEFAULT, H5P_DEFAULT);
+ /*-------------------------------------------------------------------------
+ * create external link in the "far" file pointing to the source file
+ *-------------------------------------------------------------------------
+ */
+ H5Lcreate_external(FILE61, "/", far_fid, "src_file", H5P_DEFAULT, H5P_DEFAULT);
- /* close */
- H5Fclose(source_fid);
- H5Fclose(target_fid);
- H5Fclose(far_fid);
+ /* close */
+ H5Fclose(source_fid);
+ H5Fclose(target_fid);
+ H5Fclose(far_fid);
}
/*-------------------------------------------------------------------------
@@ -6959,21 +6960,21 @@ gent_extlinks(void)
static void
gent_fs_strategy_threshold(void)
{
- hid_t fid; /* File id */
- hid_t fcpl; /* File creation property */
+ hid_t fid; /* File id */
+ hid_t fcpl; /* File creation property */
- /* Create file-creation template */
- fcpl = H5Pcreate(H5P_FILE_CREATE);
+ /* Create file-creation template */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
- /* Set file space information */
- H5Pset_file_space(fcpl, STRATEGY, (hsize_t)THRESHOLD10);
+ /* Set file space information */
+ H5Pset_file_space(fcpl, STRATEGY, (hsize_t)THRESHOLD10);
- /* Create the file with the specified strategy and threshold */
- fid = H5Fcreate(FILE65, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
+ /* Create the file with the specified strategy and threshold */
+ fid = H5Fcreate(FILE65, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
- /* close */
- H5Fclose(fid);
- H5Pclose(fcpl);
+ /* close */
+ H5Fclose(fid);
+ H5Pclose(fcpl);
}
/*
@@ -7009,32 +7010,32 @@ gent_dataset_idx(void)
fid = H5Fcreate(FILE68a, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- dims[0] = CHUNK;
- dims[1] = CHUNK;
+ dims[0] = F68a_CHUNK;
+ dims[1] = F68a_CHUNK;
/* set chunk */
ret = H5Pset_chunk(dcpl, RANK, dims);
assert(ret >= 0);
/* dataset with fixed dimensions */
- dims[0] = DIM20;
- dims[1] = DIM10;
+ dims[0] = F68a_DIM20;
+ dims[1] = F68a_DIM10;
space = H5Screate_simple(RANK, dims, NULL);
- for(i = 0; i < DIM20; i++)
- for(j = 0; j < DIM10; j++)
+ for(i = 0; i < F68a_DIM20; i++)
+ for(j = 0; j < F68a_DIM10; j++)
buf[i][j] = j;
- ret = make_dset(fid, DSET_FIXED, space, H5T_NATIVE_INT, dcpl, buf);
+ ret = make_dset(fid, F68a_DSET_FIXED, space, H5T_NATIVE_INT, dcpl, buf);
assert(ret >= 0);
H5Sclose(space);
/* dataset with non-fixed dimensions */
- maxdims[0] = DIM200;
- maxdims[1] = DIM100;
+ maxdims[0] = F68a_DIM200;
+ maxdims[1] = F68a_DIM100;
space = H5Screate_simple(RANK, dims, maxdims);
- ret = make_dset(fid, DSET_BTREE, space, H5T_NATIVE_INT, dcpl, buf);
+ ret = make_dset(fid, F68a_DSET_BTREE, space, H5T_NATIVE_INT, dcpl, buf);
assert(ret >= 0);
H5Sclose(space);
@@ -7050,7 +7051,7 @@ gent_dataset_idx(void)
assert(ret >= 0);
space = H5Screate_simple(RANK, dims, NULL);
- ret = make_dset(fid, DSET_FIXED_FILTER, space, H5T_NATIVE_INT, dcpl, buf);
+ ret = make_dset(fid, F68a_DSET_FIXED_FILTER, space, H5T_NATIVE_INT, dcpl, buf);
assert(ret >= 0);
H5Sclose(space);
@@ -7097,11 +7098,10 @@ gent_packedbits(void)
valu8bits = (uint8_t) ~0u; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dsetu8[i][0] = valu8bits;
- for(j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = dsetu8[i][j-1] << 1;
- }
- valu8bits <<= 1;
+ dsetu8[i][0] = valu8bits;
+ for(j = 1; j < dims[1]; j++)
+ dsetu8[i][j] = dsetu8[i][j-1] << 1;
+ valu8bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_UINT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu8);
@@ -7115,11 +7115,10 @@ gent_packedbits(void)
valu16bits = (uint16_t) ~0u; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dsetu16[i][0] = valu16bits;
- for(j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = dsetu16[i][j-1] << 1;
- }
- valu16bits <<= 1;
+ dsetu16[i][0] = valu16bits;
+ for(j = 1; j < dims[1]; j++)
+ dsetu16[i][j] = dsetu16[i][j-1] << 1;
+ valu16bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu16);
@@ -7133,11 +7132,10 @@ gent_packedbits(void)
valu32bits = (uint32_t) ~0u; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dsetu32[i][0] = valu32bits;
- for(j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j-1] << 1;
- }
- valu32bits <<= 1;
+ dsetu32[i][0] = valu32bits;
+ for(j = 1; j < dims[1]; j++)
+ dsetu32[i][j] = dsetu32[i][j-1] << 1;
+ valu32bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_UINT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu32);
@@ -7151,11 +7149,10 @@ gent_packedbits(void)
valu64bits = (uint64_t) ~0Lu; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dsetu64[i][0] = valu64bits;
- for(j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j-1] << 1;
- }
- valu64bits <<= 1;
+ dsetu64[i][0] = valu64bits;
+ for(j = 1; j < dims[1]; j++)
+ dsetu64[i][j] = dsetu64[i][j-1] << 1;
+ valu64bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
@@ -7169,11 +7166,10 @@ gent_packedbits(void)
val8bits = (int8_t) ~0; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dset8[i][0] = val8bits;
- for(j = 1; j < dims[1]; j++) {
- dset8[i][j] = dset8[i][j-1] << 1;
- }
- val8bits <<= 1;
+ dset8[i][0] = val8bits;
+ for(j = 1; j < dims[1]; j++)
+ dset8[i][j] = dset8[i][j-1] << 1;
+ val8bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_INT8, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset8);
@@ -7187,11 +7183,10 @@ gent_packedbits(void)
val16bits = (int16_t) ~0; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dset16[i][0] = val16bits;
- for(j = 1; j < dims[1]; j++) {
- dset16[i][j] = dset16[i][j-1] << 1;
- }
- val16bits <<= 1;
+ dset16[i][0] = val16bits;
+ for(j = 1; j < dims[1]; j++)
+ dset16[i][j] = dset16[i][j-1] << 1;
+ val16bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_INT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset16);
@@ -7205,11 +7200,10 @@ gent_packedbits(void)
val32bits = (int32_t) ~0; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dset32[i][0] = val32bits;
- for(j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j-1] << 1;
- }
- val32bits <<= 1;
+ dset32[i][0] = val32bits;
+ for(j = 1; j < dims[1]; j++)
+ dset32[i][j] = dset32[i][j-1] << 1;
+ val32bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32);
@@ -7223,11 +7217,10 @@ gent_packedbits(void)
val64bits = (int64_t) ~0L; /* all 1s */
for(i = 0; i < dims[0]; i++){
- dset64[i][0] = val64bits;
- for(j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j-1] << 1;
- }
- val64bits <<= 1;
+ dset64[i][0] = val64bits;
+ for(j = 1; j < dims[1]; j++)
+ dset64[i][j] = dset64[i][j-1] << 1;
+ val64bits <<= 1;
}
H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
@@ -7240,8 +7233,8 @@ gent_packedbits(void)
dataset = H5Dcreate2(fid, F66_DUMMYDBL, H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < dims[0]; i++)
- for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ for(j = 0; j < dims[1]; j++)
+ dsetdbl[i][j] = 0.0001 * j + i;
H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl);
@@ -7289,7 +7282,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dsetu8[i][0] = valu8bits;
for(j = 1; j < dims[1]; j++) {
- dsetu8[i][j] = dsetu8[i][j-1] << 1;
+ dsetu8[i][j] = dsetu8[i][j-1] << 1;
}
valu8bits <<= 1;
}
@@ -7307,7 +7300,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dsetu16[i][0] = valu16bits;
for(j = 1; j < dims[1]; j++) {
- dsetu16[i][j] = dsetu16[i][j-1] << 1;
+ dsetu16[i][j] = dsetu16[i][j-1] << 1;
}
valu16bits <<= 1;
}
@@ -7325,7 +7318,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dsetu32[i][0] = valu32bits;
for(j = 1; j < dims[1]; j++) {
- dsetu32[i][j] = dsetu32[i][j-1] << 1;
+ dsetu32[i][j] = dsetu32[i][j-1] << 1;
}
valu32bits <<= 1;
}
@@ -7343,7 +7336,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dsetu64[i][0] = valu64bits;
for(j = 1; j < dims[1]; j++) {
- dsetu64[i][j] = dsetu64[i][j-1] << 1;
+ dsetu64[i][j] = dsetu64[i][j-1] << 1;
}
valu64bits <<= 1;
}
@@ -7361,7 +7354,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dset8[i][0] = val8bits;
for(j = 1; j < dims[1]; j++) {
- dset8[i][j] = dset8[i][j-1] << 1;
+ dset8[i][j] = dset8[i][j-1] << 1;
}
val8bits <<= 1;
}
@@ -7379,7 +7372,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dset16[i][0] = val16bits;
for(j = 1; j < dims[1]; j++) {
- dset16[i][j] = dset16[i][j-1] << 1;
+ dset16[i][j] = dset16[i][j-1] << 1;
}
val16bits <<= 1;
}
@@ -7397,7 +7390,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dset32[i][0] = val32bits;
for(j = 1; j < dims[1]; j++) {
- dset32[i][j] = dset32[i][j-1] << 1;
+ dset32[i][j] = dset32[i][j-1] << 1;
}
val32bits <<= 1;
}
@@ -7415,7 +7408,7 @@ gent_attr_intsize(void)
for(i = 0; i < dims[0]; i++){
dset64[i][0] = val64bits;
for(j = 1; j < dims[1]; j++) {
- dset64[i][j] = dset64[i][j-1] << 1;
+ dset64[i][j] = dset64[i][j-1] << 1;
}
val64bits <<= 1;
}
@@ -7430,8 +7423,8 @@ gent_attr_intsize(void)
attr = H5Acreate2(root, F66_DUMMYDBL, H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT);
for(i = 0; i < dims[0]; i++)
- for(j = 0; j < dims[1]; j++)
- dsetdbl[i][j] = 0.0001 * j + i;
+ for(j = 0; j < dims[1]; j++)
+ dsetdbl[i][j] = 0.0001 * j + i;
H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl);
@@ -7463,22 +7456,26 @@ gent_charsets(void)
const char *utf8_p_;
} CharSetInfo;
+ hid_t charset_dtid;
+ hid_t ascii_dtid;
+ hid_t utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE );
+ const char * writeData[] = { "ascii", "utf8", };
+
sid = H5Screate_simple( 1, dim, NULL );
fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );
- hid_t charset_dtid = H5Tcreate( H5T_COMPOUND, sizeof( CharSetInfo ) );
+ charset_dtid = H5Tcreate( H5T_COMPOUND, sizeof( CharSetInfo ) );
- hid_t ascii_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE );
+ ascii_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE );
status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII );
H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid );
- hid_t utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE );
+ utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE );
status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 );
H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid );
did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT );
- const char * writeData[] = { "ascii", "utf8", };
status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData );
H5Tclose( charset_dtid );
@@ -7636,8 +7633,8 @@ static void gent_compound_intsizes(void) {
dims[0] = F70_XDIM; dims[1] = F70_YDIM8;
for(n = 0; n < dims[0]; n++)
- for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ for(o = 0; o < dims[1]; o++)
+ Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -7911,8 +7908,8 @@ static void gent_compound_attr_intsizes(void) {
dims[0] = F70_XDIM; dims[1] = F70_YDIM8;
for(n = 0; n < dims[0]; n++)
- for(o = 0; o < dims[1]; o++)
- Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
+ for(o = 0; o < dims[1]; o++)
+ Array1[m].dsetdbl[n][o] = 0.0001 * o + n;
}
/* Create the array data type for the 8 bits signed int array */
@@ -8041,6 +8038,155 @@ static void gent_compound_attr_intsizes(void) {
HDassert(status >= 0);
}
+static void gent_nested_compound_dt(void) { /* test nested data type */
+ hid_t fid, group, dataset, space, type, create_plist, type1, type2;
+ hid_t array_dt, enum_dt;
+ enumtype val;
+
+ typedef struct {
+ int a;
+ float b;
+ } dset1_t;
+ dset1_t dset1[10];
+
+ typedef struct {
+ int a;
+ float b;
+ enumtype c;
+ } dset2_t;
+ dset2_t dset2[10];
+
+ typedef struct {
+ int a[5];
+ float b[5][6];
+ dset1_t c;
+ } dset3_t;
+ dset3_t dset3[10];
+
+ enumtype dset4[] = {RED, GREEN, BLUE, GREEN, WHITE, BLUE};
+ dset1_t dset5[10];
+
+ int i, j, k;
+ unsigned ndims;
+ hsize_t dim[2];
+
+ hsize_t sdim, maxdim;
+
+ sdim = 10;
+ for(i = 0; i < (int)sdim; i++) {
+ dset1[i].a = i;
+ dset1[i].b = (float)(i*i);
+
+ dset2[i].a = i;
+ dset2[i].b = (float)(i+i*0.1);
+ dset2[i].c = GREEN;
+
+ for(j = 0; j < 5; j++) {
+ dset3[i].a[j] = i*j;
+ for(k = 0; k < 6; k++) {
+ dset3[i].b[j][k] = (float)(i*j*k*1.0);
+ }
+ }
+ dset3[i].c.a = i;
+ dset3[i].c.b = (float)(i*1.0);
+ }
+
+ fid = H5Fcreate(FILE72, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+
+ create_plist = H5Pcreate(H5P_DATASET_CREATE);
+
+ sdim = 2;
+ H5Pset_chunk(create_plist, 1, &sdim);
+
+
+ sdim = 6;
+ maxdim = H5S_UNLIMITED;
+
+ space = H5Screate_simple(1, &sdim, &maxdim);
+
+ type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0]));
+ H5Tinsert(type, "a_name", HOFFSET(dset1_t, a), H5T_STD_I32LE);
+ H5Tinsert(type, "b_name", HOFFSET(dset1_t, b), H5T_IEEE_F32LE);
+
+ dataset = H5Dcreate2(fid, "/dset1", type, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
+
+ H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
+
+ H5Tclose(type);
+ H5Dclose(dataset);
+
+ /* Create the shared enumerated datatype. */
+ enum_dt = H5Tenum_create (H5T_NATIVE_INT);
+ val = (enumtype) RED;
+ H5Tenum_insert (enum_dt, "Red", &val);
+ val = (enumtype) GREEN;
+ H5Tenum_insert (enum_dt, "Green", &val);
+ val = (enumtype) BLUE;
+ H5Tenum_insert (enum_dt, "Blue", &val);
+ val = (enumtype) WHITE;
+ H5Tenum_insert (enum_dt, "White", &val);
+ val = (enumtype) BLACK;
+ H5Tenum_insert (enum_dt, "Black", &val);
+ H5Tcommit2(fid, "enumtype", enum_dt, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset2[0]));
+
+ H5Tinsert(type2, "a_name", HOFFSET(dset2_t, a), H5T_NATIVE_INT);
+ H5Tinsert(type2, "b_name", HOFFSET(dset2_t, b), H5T_NATIVE_FLOAT);
+ H5Tinsert(type2, "c_name", HOFFSET(dset2_t, c), enum_dt);
+
+ dataset = H5Dcreate2(fid, "/dset2", type2, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
+
+ H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2);
+
+ H5Tclose(type2);
+
+ dataset = H5Dcreate2(fid, "/dset4", enum_dt, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
+ H5Dwrite(dataset, enum_dt, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset4);
+
+ H5Tclose(enum_dt);
+ H5Dclose(dataset);
+
+ /* shared data type 1 */
+ type1 = H5Tcreate(H5T_COMPOUND, sizeof(dset1_t));
+ H5Tinsert(type1, "int_name", HOFFSET(dset1_t, a), H5T_STD_I32LE);
+ H5Tinsert(type1, "float_name", HOFFSET(dset1_t, b), H5T_IEEE_F32LE);
+ H5Tcommit2(fid, "type1", type1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ group = H5Gcreate2(fid, "/group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t));
+
+ ndims = 1; dim[0] = 5;
+ array_dt = H5Tarray_create2(H5T_STD_I32LE, ndims, dim);
+ H5Tinsert(type2, "int_name", HOFFSET(dset3_t, a), array_dt);
+ H5Tclose(array_dt);
+
+ ndims = 2; dim[0] = 5; dim[1] = 6;
+ array_dt = H5Tarray_create2(H5T_IEEE_F32LE, ndims, dim);
+ H5Tinsert(type2, "float_name", HOFFSET(dset3_t, b), array_dt);
+ H5Tclose(array_dt);
+
+ H5Tinsert (type2, "cmpd_name", HOFFSET (dset3_t, c), type1);
+
+ dataset = H5Dcreate2(group, "dset3", type2, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
+
+ H5Dwrite(dataset, type2, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset3);
+
+ dataset = H5Dcreate2(fid, "/dset5", type1, space, H5P_DEFAULT, create_plist, H5P_DEFAULT);
+ H5Dwrite(dataset, type1, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1);
+
+ H5Tclose(type1);
+ H5Tclose(type2);
+ H5Sclose(space);
+ H5Dclose(dataset);
+ H5Gclose(group);
+
+ H5Pclose(create_plist);
+
+ H5Fclose(fid);
+
+}
/*-------------------------------------------------------------------------
* Function: main
@@ -8124,6 +8270,8 @@ int main(void)
gent_compound_intsizes();
gent_compound_attr_intsizes();
+ gent_nested_compound_dt();
+
return 0;
}
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 3bd0dfd..fa71558 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -55,6 +55,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
@@ -142,6 +143,7 @@ $SRC_H5DUMP_TESTFILES/tmulti-r.h5
$SRC_H5DUMP_TESTFILES/tmulti-s.h5
$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5
$SRC_H5DUMP_TESTFILES/tnestedcomp.h5
+$SRC_H5DUMP_TESTFILES/tnestedcmpddt.h5
$SRC_H5DUMP_TESTFILES/tno-subset.h5
$SRC_H5DUMP_TESTFILES/tnullspace.h5
$SRC_H5DUMP_TESTFILES/zerodim.h5
@@ -162,6 +164,7 @@ $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="
@@ -191,6 +194,8 @@ $SRC_H5DUMP_TESTFILES/tattr-1.ddl
$SRC_H5DUMP_TESTFILES/tattr-2.ddl
$SRC_H5DUMP_TESTFILES/tattr-3.ddl
$SRC_H5DUMP_TESTFILES/tattr-4_be.ddl
+$SRC_H5DUMP_TESTFILES/tattrcontents1.ddl
+$SRC_H5DUMP_TESTFILES/tattrcontents2.ddl
$SRC_H5DUMP_TESTFILES/tattrintsize.ddl
$SRC_H5DUMP_TESTFILES/tattrreg.ddl
$SRC_H5DUMP_TESTFILES/tattrregR.ddl
@@ -258,6 +263,7 @@ $SRC_H5DUMP_TESTFILES/tqmarkfile.ddl
$SRC_H5DUMP_TESTFILES/tstarfile.ddl
$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/tno-subset.ddl
$SRC_H5DUMP_TESTFILES/tnullspace.ddl
@@ -271,6 +277,10 @@ $SRC_H5DUMP_TESTFILES/torderattr1.ddl
$SRC_H5DUMP_TESTFILES/torderattr2.ddl
$SRC_H5DUMP_TESTFILES/torderattr3.ddl
$SRC_H5DUMP_TESTFILES/torderattr4.ddl
+$SRC_H5DUMP_TESTFILES/tordercontents1.ddl
+$SRC_H5DUMP_TESTFILES/tordercontents2.ddl
+$SRC_H5DUMP_TESTFILES/torderlinks1.ddl
+$SRC_H5DUMP_TESTFILES/torderlinks2.ddl
$SRC_H5DUMP_TESTFILES/tperror.ddl
$SRC_H5DUMP_TESTFILES/treference.ddl
$SRC_H5DUMP_TESTFILES/tsaf.ddl
@@ -301,10 +311,36 @@ $SRC_H5DUMP_TESTFILES/out3.h5import
$SRC_H5DUMP_TESTFILES/tbinregR.exp
"
+LIST_ERROR_TEST_FILES="
+${SRC_H5DUMP_ERRORFILES}/filter_fail.err
+${SRC_H5DUMP_ERRORFILES}/tall-1.err
+${SRC_H5DUMP_ERRORFILES}/tall-2A.err
+${SRC_H5DUMP_ERRORFILES}/tall-2B.err
+${SRC_H5DUMP_ERRORFILES}/tarray1_big.err
+${SRC_H5DUMP_ERRORFILES}/tattr-3.err
+${SRC_H5DUMP_ERRORFILES}/tattrregR.err
+${SRC_H5DUMP_ERRORFILES}/tcomp-3.err
+${SRC_H5DUMP_ERRORFILES}/tdataregR.err
+${SRC_H5DUMP_ERRORFILES}/tdset-2.err
+${SRC_H5DUMP_ERRORFILES}/texceedsubblock.err
+${SRC_H5DUMP_ERRORFILES}/texceedsubcount.err
+${SRC_H5DUMP_ERRORFILES}/texceedsubstart.err
+${SRC_H5DUMP_ERRORFILES}/texceedsubstride.err
+${SRC_H5DUMP_ERRORFILES}/textlink.err
+${SRC_H5DUMP_ERRORFILES}/textlinkfar.err
+${SRC_H5DUMP_ERRORFILES}/textlinksrc.err
+${SRC_H5DUMP_ERRORFILES}/tgroup-2.err
+${SRC_H5DUMP_ERRORFILES}/torderlinks1.err
+${SRC_H5DUMP_ERRORFILES}/torderlinks2.err
+${SRC_H5DUMP_ERRORFILES}/tperror.err
+${SRC_H5DUMP_ERRORFILES}/tqmarkfile.err
+${SRC_H5DUMP_ERRORFILES}/tslink-D.err
+"
+
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES"
COPY_TESTFILES_TO_TESTDIR()
{
@@ -495,6 +531,69 @@ 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
+TOOLTEST4() {
+
+ expect="$TESTDIR/$1"
+ expect_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.oerr"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ #cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -572,6 +671,9 @@ COPY_TESTFILES_TO_TESTDIR
#TOOLTEST h5dump-help.txt -h
+# test for maximum display datasets
+TOOLTEST twidedisplay.ddl --enable-error-stack -w0 packedbits.h5
+
# test for signed/unsigned datasets
TOOLTEST packedbits.ddl --enable-error-stack packedbits.h5
# test for compound signed/unsigned datasets
@@ -583,19 +685,19 @@ TOOLTEST tcmpdattrintsize.ddl --enable-error-stack tcmpdattrintsize.h5
# test for displaying groups
TOOLTEST tgroup-1.ddl --enable-error-stack tgroup.h5
# test for displaying the selected groups
-TOOLTEST tgroup-2.ddl --group=/g2 --group / -g /y tgroup.h5
+TOOLTEST4 tgroup-2.ddl --enable-error-stack --group=/g2 --group / -g /y tgroup.h5
# test for displaying simple space datasets
TOOLTEST tdset-1.ddl --enable-error-stack tdset.h5
# test for displaying selected datasets
-TOOLTEST3 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5
+TOOLTEST4 tdset-2.ddl --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5
# test for displaying attributes
TOOLTEST tattr-1.ddl --enable-error-stack tattr.h5
# test for displaying the selected attributes of string type and scalar space
TOOLTEST tattr-2.ddl --enable-error-stack -a "/\/attr1" --attribute /attr4 --attribute=/attr5 tattr.h5
# test for header and error messages
-TOOLTEST3 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5
+TOOLTEST4 tattr-3.ddl --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5
# test for displaying at least 9 attributes on root from a BE machine
TOOLTEST tattr-4_be.ddl --enable-error-stack tattr4_be.h5
# test for displaying attributes in shared datatype (also in group and dataset)
@@ -608,7 +710,7 @@ TOOLTEST tudlink-1.ddl --enable-error-stack tudlink.h5
TOOLTEST tslink-2.ddl --enable-error-stack -l slink2 tslink.h5
TOOLTEST tudlink-2.ddl --enable-error-stack -l udlink2 tudlink.h5
# test for displaying dangling soft links
-TOOLTEST3 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5
+TOOLTEST4 tslink-D.ddl --enable-error-stack -d /slink1 tslink.h5
# tests for hard links
TOOLTEST thlink-1.ddl --enable-error-stack thlink.h5
@@ -622,17 +724,16 @@ TOOLTEST tcomp-1.ddl --enable-error-stack tcompound.h5
# test for named data types
TOOLTEST tcomp-2.ddl --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5
# test for unamed type
-# JIRA HDFFV-7936 TOOLTEST tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
-TOOLTEST tcomp-3.ddl -t /#6632 -g /group2 tcompound.h5
+TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
# test complicated compound datatype
TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
#test for the nested compound type
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
+TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5
# test for options
-# JIRA HDFFV-7936 TOOLTEST tall-1.ddl --enable-error-stack tall.h5
-TOOLTEST tall-1.ddl tall.h5
+TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5
TOOLTEST tall-2.ddl --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5
TOOLTEST tall-3.ddl --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5
@@ -659,8 +760,7 @@ TOOLTEST tvlstr.ddl --enable-error-stack tvlstr.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
# # added for bug# 2092 - tarray1_big.h
-# JIRA HDFFV-7936 TOOLTEST tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
-TOOLTEST tarray1_big.ddl -R tarray1_big.h5
+TOOLTEST4 tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5
TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5
TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5
@@ -671,7 +771,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
-TOOLTEST3 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
@@ -689,18 +789,16 @@ TOOLTEST tmulti.ddl --enable-error-stack --filedriver=multi tmulti
TOOLTEST tlarge_objname.ddl --enable-error-stack -w157 tlarge_objname.h5
# test '-A' to suppress data but print attr's
-# JIRA HDFFV-7936 TOOLTEST tall-2A.ddl --enable-error-stack -A tall.h5
-TOOLTEST tall-2A.ddl -A tall.h5
+TOOLTEST4 tall-2A.ddl --enable-error-stack -A tall.h5
# test '-r' to print attributes in ASCII instead of decimal
-# JIRA HDFFV-7936 TOOLTEST tall-2B.ddl --enable-error-stack -A -r tall.h5
-TOOLTEST tall-2B.ddl -A -r tall.h5
+TOOLTEST4 tall-2B.ddl --enable-error-stack -A -r tall.h5
# test Subsetting
TOOLTEST tall-4s.ddl --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5
TOOLTEST tall-5s.ddl --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5
TOOLTEST tdset-3s.ddl --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5
-TOOLTEST tno-subset.ddl --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5
+TOOLTEST tno-subset.ddl --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5
# test printing characters in ASCII instead of decimal
TOOLTEST tchar1.ddl --enable-error-stack -r tchar.h5
@@ -716,10 +814,14 @@ TOOLTEST tboot2.ddl --enable-error-stack -B tfcontents2.h5
TOOLTEST file_space.ddl --enable-error-stack -B file_space.h5
# test -p with a non existing dataset
-TOOLTEST3 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5
+TOOLTEST4 tperror.ddl --enable-error-stack -p -d bogus tfcontents1.h5
# test for file contents
TOOLTEST tcontents.ddl --enable-error-stack -n tfcontents1.h5
+TOOLTEST tordercontents1.ddl --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5
+TOOLTEST tordercontents2.ddl --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5
+TOOLTEST tattrcontents1.ddl --enable-error-stack -n 1 --sort_order=ascending tall.h5
+TOOLTEST tattrcontents2.ddl --enable-error-stack -n 1 --sort_order=descending tall.h5
# tests for storage layout
# compact
@@ -851,6 +953,9 @@ TOOLTEST tbin1.ddl --enable-error-stack -d integer -o out1.bin -b LE tbinar
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
@@ -858,6 +963,9 @@ TOOLTEST tbin2.ddl --enable-error-stack -b BE -d float -o out2.bin tbina
TOOLTEST tbin3.ddl --enable-error-stack -d integer -o out3.bin -b NATIVE tbinary.h5
IMPORTTEST out3.bin -c out3.h5import -o out3.h5
DIFFTEST tbinary.h5 out3.h5 /integer /integer
+# Same but use h5dump as input to h5import
+IMPORTTEST out3.bin -c tbin3.ddl -o out3D.h5
+DIFFTEST tbinary.h5 out3D.h5 /integer /integer
TOOLTEST tbin4.ddl --enable-error-stack -d double -b FILE -o out4.bin tbinary.h5
@@ -870,11 +978,9 @@ fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-# JIRA HDFFV-7936 TOOLTEST tdataregR.ddl --enable-error-stack -R tdatareg.h5
-TOOLTEST tdataregR.ddl -R tdatareg.h5
+TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-# JIRA HDFFV-7936 TOOLTEST tattrregR.ddl --enable-error-stack -R tattrreg.h5
-TOOLTEST tattrregR.ddl -R 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
@@ -897,21 +1003,22 @@ TOOLTEST torderattr2.ddl --enable-error-stack -H --sort_by=name --sort_order=des
TOOLTEST torderattr3.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5
TOOLTEST torderattr4.ddl --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5
+# tests for link references and order
+TOOLTEST4 torderlinks1.ddl --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5
+TOOLTEST4 torderlinks2.ddl --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5
+
# tests for floating point user defined printf format
TOOLTEST tfpformat.ddl --enable-error-stack -m %.7f tfpformat.h5
# tests for traversal of external links
-# JIRA HDFFV-7936 TOOLTEST textlinksrc.ddl --enable-error-stack textlinksrc.h5
-TOOLTEST textlinksrc.ddl textlinksrc.h5
-# JIRA HDFFV-7936 TOOLTEST textlinkfar.ddl --enable-error-stack textlinkfar.h5
-TOOLTEST textlinkfar.ddl textlinkfar.h5
+TOOLTEST4 textlinksrc.ddl --enable-error-stack textlinksrc.h5
+TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
# test for dangling external links
-# JIRA HDFFV-7936 TOOLTEST textlink.ddl --enable-error-stack textlink.h5
-TOOLTEST3 textlink.ddl --enable-error-stack textlink.h5
+TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.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
diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in
index 393fcc1..991fe7a 100644
--- a/tools/h5dump/testh5dumppbits.sh.in
+++ b/tools/h5dump/testh5dumppbits.sh.in
@@ -55,6 +55,7 @@ SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
# testfiles source dirs for tools
SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
+SRC_H5DUMP_ERRORFILES="$srcdir/errfiles"
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
@@ -134,10 +135,26 @@ $SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl
$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl
"
+LIST_ERROR_TEST_FILES="
+${SRC_H5DUMP_ERRORFILES}/tnofilename-with-packed-bits.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsCharLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsCharOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsIncomplete.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsIntLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsIntOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsLengthPositive.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsLongLengthExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsLongOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsMaxExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetExceeded.err
+${SRC_H5DUMP_ERRORFILES}/tpbitsOffsetNegative.err
+"
+
#
# copy test files and expected output files from source dirs to test dir
#
-COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML"
+COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_ERROR_TEST_FILES"
COPY_TESTFILES_TO_TESTDIR()
{
@@ -328,6 +345,69 @@ 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
+TOOLTEST4() {
+
+ expect="$TESTDIR/$1"
+ expect_err="$TESTDIR/`basename $1 .ddl`.err"
+ actual="$TESTDIR/`basename $1 .ddl`.out"
+ actual_err="$TESTDIR/`basename $1 .ddl`.oerr"
+ actual_ext="$TESTDIR/`basename $1 .ddl`.ext"
+ actual_sav=${actual}-sav
+ actual_err_sav=${actual_err}-sav
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
+
+ # save actual and actual_err in case they are needed later.
+ cp $actual $actual_sav
+ STDOUT_FILTER $actual
+ cp $actual_err $actual_err_sav
+ STDERR_FILTER $actual_err
+
+ # Extract file name, line number, version and thread IDs because they may be different
+ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
+ -e 's/line [0-9]*/line (number)/' \
+ -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \
+ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \
+ -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
+ -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
+ $actual_err > $actual_ext
+ #cat $actual_ext >> $actual
+
+ if [ ! -f $expect ]; then
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ elif $CMP $expect $actual; then
+ if $CMP $expect_err $actual_ext; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.err) differs from actual result (*.oerr)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /'
+ fi
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ fi
+
+ # Clean up output file
+ if test -z "$HDF5_NOCLEANUP"; then
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
+ fi
+
+}
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@