From ebe023d2c71043cc676cb99004f0766a57441069 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 29 Dec 2020 12:22:44 -0600 Subject: [PATCH 01/66] HDFFV-10865 - merge from dev, HDFArray perf fix. --- java/src/hdf/hdf5lib/HDFArray.java | 304 ++++++++++++----------------- release_docs/RELEASE.txt | 11 +- 2 files changed, 130 insertions(+), 185 deletions(-) diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 30f0fc847d5..63e17e85bc3 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -16,6 +16,7 @@ import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5JavaException; +import java.util.Arrays; /** * This is a class for handling multidimensional arrays for HDF. @@ -394,6 +395,7 @@ public Object arrayify(byte[] bytes) throws HDF5JavaException { throw (ex); } _barray = bytes; /* hope that the bytes are correct.... */ + if (ArrayDescriptor.dims == 1) { /* special case */ /* 2 data copies here! */ @@ -496,8 +498,62 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { Object oo = _theArray; int n = 0; /* the current byte */ + int m = 0; /* the current array index */ int index = 0; int i; + Object flattenedArray = null; + switch (ArrayDescriptor.NT) { + case 'J': + flattenedArray = (Object) HDFNativeData.byteToLong(_barray); + break; + case 'S': + flattenedArray = (Object) HDFNativeData.byteToShort(_barray); + break; + case 'I': + flattenedArray = (Object) HDFNativeData.byteToInt(_barray); + break; + case 'F': + flattenedArray = (Object) HDFNativeData.byteToFloat(_barray); + break; + case 'D': + flattenedArray = (Object) HDFNativeData.byteToDouble(_barray); + break; + case 'B': + flattenedArray = (Object) _barray; + break; + case 'L': + switch (ArrayDescriptor.className) { + case "java.lang.Byte": + flattenedArray = (Object) ByteToByteObj(_barray); + break; + case "java.lang.Short": + flattenedArray = (Object) ByteToShort(_barray); + break; + case "java.lang.Integer": + flattenedArray = (Object) ByteToInteger(_barray); + break; + case "java.lang.Long": + flattenedArray = (Object) ByteToLongObj(_barray); + break; + case "java.lang.Float": + flattenedArray = (Object) ByteToFloatObj(_barray); + break; + case "java.lang.Double": + flattenedArray = (Object) ByteToDoubleObj(_barray); + break; + default: + HDF5JavaException ex = new HDF5JavaException( + "HDFArray: unsupported Object type: " + + ArrayDescriptor.NT); + throw (ex); + } // end of switch statement for arrays of boxed objects + default: + HDF5JavaException ex = new HDF5JavaException( + "HDFArray: unknown or unsupported type: " + + ArrayDescriptor.NT); + throw (ex); + } // end of switch statement for arrays of primitives + while (n < ArrayDescriptor.totalSize) { oo = ArrayDescriptor.objs[0]; index = n / ArrayDescriptor.bytetoindex[0]; @@ -524,172 +580,58 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { /* array-ify */ try { - if (ArrayDescriptor.NT == 'J') { - long[] arow = HDFNativeData.byteToLong(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.NT == 'I') { - int[] arow = HDFNativeData.byteToInt(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.NT == 'S') { - short[] arow = HDFNativeData.byteToShort(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.NT == 'B') { - System.arraycopy(_barray, n, - ArrayDescriptor.objs[ArrayDescriptor.dims - 1], 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims]); - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - } - else if (ArrayDescriptor.NT == 'F') { - float arow[] = HDFNativeData.byteToFloat(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.NT == 'D') { - double[] arow = HDFNativeData.byteToDouble(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.NT == 'L') { - if (ArrayDescriptor.className.equals("java.lang.Byte")) { - Byte I[] = ByteToByteObj(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { - Integer I[] = ByteToInteger(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { - Short I[] = ByteToShort(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { - Float I[] = ByteToFloatObj(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { - Double I[] = ByteToDoubleObj(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else if (ArrayDescriptor.className.equals("java.lang.Long")) { - Long I[] = ByteToLongObj(n, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - _barray); - java.lang.reflect.Array - .set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - I); - - n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; - ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; - } - else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unsupported Object type: " - + ArrayDescriptor.NT); - throw (ex); - } - } - else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown or unsupported type: " - + ArrayDescriptor.NT); - throw (ex); - } + + Object arow = null; + int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims]; + switch (ArrayDescriptor.NT) { + case 'B': + arow = (Object) Arrays.copyOfRange((byte[]) flattenedArray, m, mm); + break; + case 'S': + arow = (Object) Arrays.copyOfRange((short[]) flattenedArray, m, mm); + break; + case 'I': + arow = (Object) Arrays.copyOfRange((int[]) flattenedArray, m, mm); + break; + case 'J': + arow = (Object) Arrays.copyOfRange((long[]) flattenedArray, m, mm); + break; + case 'F': + arow = (Object) Arrays.copyOfRange((float[]) flattenedArray, m, mm); + break; + case 'D': + arow = (Object) Arrays.copyOfRange((double[]) flattenedArray, m, mm); + break; + case 'L': + switch (ArrayDescriptor.className) { + case "java.lang.Byte": + arow = (Object) Arrays.copyOfRange((Byte[])flattenedArray, m, mm); + break; + case "java.lang.Short": + arow = (Object) Arrays.copyOfRange((Short[])flattenedArray, m, mm); + break; + case "java.lang.Integer": + arow = (Object) Arrays.copyOfRange((Integer[])flattenedArray, m, mm); + break; + case "java.lang.Long": + arow = (Object) Arrays.copyOfRange((Long[])flattenedArray, m, mm); + break; + case "java.lang.Float": + arow = (Object) Arrays.copyOfRange((Float[])flattenedArray, m, mm); + break; + case "java.lang.Double": + arow = (Object) Arrays.copyOfRange((Double[])flattenedArray, m, mm); + break; + } // end of switch statement for arrays of boxed numerics + } // end of switch statement for arrays of primitives + + java.lang.reflect.Array.set( + ArrayDescriptor.objs[ArrayDescriptor.dims - 2], + (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), + arow); + n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; + ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; + m = mm; } catch (OutOfMemoryError err) { HDF5JavaException ex = new HDF5JavaException( @@ -717,25 +659,15 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { + (ArrayDescriptor.dimlen[i] - 1) + "?")); } } - if (ArrayDescriptor.NT != 'B') { - if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " + (ArrayDescriptor.dimlen[i]) - + "?")); - } - } - else { - if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != (ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1] - 1)) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " - + (ArrayDescriptor.dimlen[i] - 1) + "?")); - } + if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) { + throw new java.lang.InternalError(new String( + "HDFArray::arrayify Panic didn't complete all data: currentindex[" + + i + "] = " + ArrayDescriptor.currentindex[i] + + " (should be " + (ArrayDescriptor.dimlen[i]) + + "?")); } + return _theArray; } @@ -944,6 +876,7 @@ class ArrayDescriptor { static int[] currentindex = null; static int[] bytetoindex = null; static int totalSize = 0; + static int totalElements = 0; static Object[] objs = null; static char NT = ' '; /* must be B,S,I,L,F,D, else error */ static int NTsize = 0; @@ -1052,6 +985,7 @@ else if (css.startsWith("Ljava.lang.String")) { dimlen[0] = 1; dimstart[0] = 0; currentindex[0] = 0; + int elements = 1; int i; for (i = 1; i <= dims; i++) { dimlen[i] = java.lang.reflect.Array.getLength((Object) o); @@ -1059,7 +993,9 @@ else if (css.startsWith("Ljava.lang.String")) { objs[i] = o; dimstart[i] = 0; currentindex[i] = 0; + elements *= dimlen[i]; } + totalElements = elements; int j; int dd; @@ -1083,7 +1019,7 @@ public void dumpInfo() { System.out.println("Class: " + theClass); System.out.println("NT: " + NT + " NTsize: " + NTsize); System.out.println("Array has " + dims + " dimensions (" + totalSize - + " bytes)"); + + " bytes, " + totalElements + " elements)"); int i; for (i = 0; i <= dims; i++) { Class tc = objs[i].getClass(); diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 14b7f44441e..8b26c7052d2 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -170,7 +170,16 @@ Bug Fixes since HDF5-1.10.7 release Java Library: ---------------- - - + - The H5FArray.java class, in which virtually the entire execution time + is spent using the HDFNativeData method that converts from an array + of bytes to an array of the destination Java type. + + 1. Convert the entire byte array into a 1-d array of the desired type, + rather than performing 1 conversion per row; + 2. Use the Java Arrays method copyOfRange to grab the section of the + array from (1) that is desired to be inserted into the destination array. + + (PGT,ADB - 2020/12/29, HDFFV-10865) Configuration ------------- From cc749db7513ffcb9a20da665f6c41b4841c3319e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 4 Jan 2021 10:20:32 -0600 Subject: [PATCH 02/66] Remove duplicate setting --- config/cmake/HDF5PluginCache.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 99ea4b25e24..2b9e48c26f7 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -8,7 +8,6 @@ set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable h5pl testing" FORCE) set (BUILD_EXAMPLES ON CACHE BOOL "Build h5pl Examples" FORCE) -set (HDF5_PACKAGE_NAME "hdf5" CACHE STRING "Name of HDF5 package" FORCE) set (HDF5_HDF5_HEADER "h5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE) set (HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "hdf5 target" FORCE) #set (HDF5_INCLUDE_DIR $ CACHE PATH "hdf5 include dirs" FORCE) From 12c9d1a1095a59cf7359f5199cf40ffb7e90b3d2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 27 Jan 2021 13:17:26 -0600 Subject: [PATCH 03/66] Whitespace changes after clang format --- c++/src/H5PredType.h | 2 +- c++/test/tfilter.cpp | 2 +- c++/test/th5s.cpp | 2 +- doxygen/examples/H5Fclose.c | 17 ++--- doxygen/examples/H5Fcreate.c | 17 ++--- doxygen/examples/hello_hdf5.c | 15 ++-- examples/ph5example.c | 2 +- fortran/src/H5Pf.c | 2 +- hl/tools/gif2h5/gifread.c | 2 +- hl/tools/gif2h5/hdfgifwr.c | 2 +- java/src/jni/h5sImp.c | 4 +- src/H5.c | 4 +- src/H5AC.c | 18 ++--- src/H5ACmpio.c | 8 +-- src/H5ACproxy_entry.c | 8 +-- src/H5Adense.c | 2 +- src/H5Aint.c | 2 +- src/H5Aprivate.h | 8 +-- src/H5B2.c | 4 +- src/H5B2cache.c | 12 ++-- src/H5C.c | 56 +++++++-------- src/H5CX.c | 28 ++++---- src/H5Cdbg.c | 6 +- src/H5Cimage.c | 16 ++--- src/H5Dchunk.c | 6 +- src/H5Defl.c | 6 +- src/H5Dint.c | 8 +-- src/H5Dmpio.c | 4 +- src/H5Dpkg.h | 6 +- src/H5Dvirtual.c | 8 +-- src/H5E.c | 14 ++-- src/H5EAcache.c | 20 +++--- src/H5EAtest.c | 4 +- src/H5Eint.c | 24 +++---- src/H5Epkg.h | 4 +- src/H5FAcache.c | 12 ++-- src/H5FAtest.c | 6 +- src/H5FDcore.c | 14 ++-- src/H5FDdirect.c | 4 +- src/H5FDlog.c | 16 ++--- src/H5FDmirror.c | 4 +- src/H5FDmpio.c | 4 +- src/H5FDsec2.c | 8 +-- src/H5FDspace.c | 2 +- src/H5FDsplitter.c | 2 +- src/H5FDstdio.c | 12 ++-- src/H5FS.c | 4 +- src/H5FScache.c | 16 ++--- src/H5Fint.c | 14 ++-- src/H5Fprivate.h | 70 +++++++++---------- src/H5Fsuper.c | 14 ++-- src/H5Gent.c | 2 +- src/H5Gprivate.h | 6 +- src/H5Gpublic.h | 2 +- src/H5Groot.c | 4 +- src/H5HFcache.c | 8 +-- src/H5HG.c | 2 +- src/H5MF.c | 10 +-- src/H5MFsection.c | 4 +- src/H5MM.c | 26 +++---- src/H5MMprivate.h | 4 +- src/H5Ocache.c | 6 +- src/H5Odtype.c | 2 +- src/H5Oint.c | 40 +++++------ src/H5Opkg.h | 4 +- src/H5Oprivate.h | 22 +++--- src/H5Oshared.h | 10 +-- src/H5PLpath.c | 2 +- src/H5Pdcpl.c | 2 +- src/H5Pfapl.c | 2 +- src/H5Ppkg.h | 2 +- src/H5SM.c | 4 +- src/H5Shyper.c | 6 +- src/H5Spkg.h | 18 ++--- src/H5Spoint.c | 16 ++--- src/H5TS.c | 10 +-- src/H5Tpkg.h | 2 +- src/H5Tprivate.h | 2 +- src/H5Tpublic.h | 2 +- src/H5VM.c | 2 +- src/H5Z.c | 14 ++-- src/H5Znbit.c | 12 ++-- src/H5Zpublic.h | 30 ++++---- src/H5Zscaleoffset.c | 18 ++--- src/H5Zshuffle.c | 12 ++-- src/H5Ztrans.c | 2 +- src/H5detect.c | 2 +- src/H5make_libsettings.c | 2 +- src/H5private.h | 76 ++++++++++----------- src/H5public.h | 26 +++---- src/H5system.c | 2 +- src/H5timer.c | 6 +- src/H5win32defs.h | 2 +- test/accum.c | 4 +- test/btree2.c | 4 +- test/cache.c | 10 +-- test/cache_common.h | 2 +- test/cache_tagging.c | 84 +++++++++++------------ test/cross_read.c | 8 +-- test/dsets.c | 38 +++++------ test/dt_arith.c | 4 +- test/dtypes.c | 4 +- test/earray.c | 6 +- test/error_test.c | 2 +- test/farray.c | 2 +- test/fheap.c | 44 ++++++------ test/filter_plugin.c | 4 +- test/gen_bad_ohdr.c | 2 +- test/gen_bogus.c | 2 +- test/gen_cross.c | 4 +- test/links.c | 20 +++--- test/mount.c | 2 +- test/objcopy.c | 6 +- test/s3comms.c | 2 +- test/set_extent.c | 4 +- test/stab.c | 2 +- test/swmr.c | 4 +- test/swmr_generator.c | 2 +- test/swmr_remove_reader.c | 2 +- test/swmr_sparse_writer.c | 4 +- test/tattr.c | 16 ++--- test/tfile.c | 2 +- test/th5s.c | 4 +- test/thread_id.c | 2 +- test/tmisc.c | 34 +++++----- test/tsohm.c | 18 ++--- test/ttsafe.c | 2 +- test/use_disable_mdc_flushes.c | 6 +- test/vds.c | 2 +- test/vfd.c | 4 +- testpar/t_cache.c | 4 +- testpar/t_chunk_alloc.c | 2 +- testpar/t_dset.c | 6 +- testpar/t_filter_read.c | 2 +- testpar/t_mpi.c | 6 +- testpar/t_shapesame.c | 4 +- testpar/testphdf5.h | 102 ++++++++++++++-------------- tools/lib/h5diff.c | 10 +-- tools/lib/h5diff_array.c | 2 +- tools/lib/h5tools_str.c | 4 +- tools/src/h5dump/h5dump.h | 2 +- tools/src/h5dump/h5dump_extern.h | 2 +- tools/test/h5dump/h5dumpgentest.c | 4 +- tools/test/perform/perf.c | 2 +- tools/test/perform/pio_standalone.h | 18 ++--- tools/test/perform/sio_standalone.h | 18 ++--- 146 files changed, 762 insertions(+), 759 deletions(-) diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index 2d1185b2b54..02f0cbc5483 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -435,7 +435,7 @@ class H5_DLLCPP PredType : public AtomType { #if H5_SIZEOF_UINT_FAST64_T != 0 static PredType *NATIVE_UINT_FAST64_; #endif /* H5_SIZEOF_UINT_FAST64_T */ - // End of Declaration of pointers + // End of Declaration of pointers #endif // DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index e7788e53472..e583c3bbeeb 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -222,7 +222,7 @@ test_szip_filter(H5File &file1) SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SUBTEST("szip filter"); SKIPPED(); H5std_string fname = file1.getFileName(); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 8709c25f731..4cce6246092 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -33,7 +33,7 @@ using namespace H5; #include "h5test.h" #include "h5cpputil.h" // C++ utilility header file -#include "H5srcdir.h" // srcdir querying header file +#include "H5srcdir.h" // srcdir querying header file const H5std_string TESTFILE("th5s.h5"); const H5std_string DATAFILE("th5s1.h5"); diff --git a/doxygen/examples/H5Fclose.c b/doxygen/examples/H5Fclose.c index 6bb1d9f595a..525bad38f0b 100644 --- a/doxygen/examples/H5Fclose.c +++ b/doxygen/examples/H5Fclose.c @@ -1,12 +1,13 @@ #include "hdf5.h" -int main() +int +main() { - hid_t file; - if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - /* Do something good with this file. */ - if(H5Fclose(file) < 0) - return -2; - return 0; + hid_t file; + if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + /* Do something good with this file. */ + if (H5Fclose(file) < 0) + return -2; + return 0; } diff --git a/doxygen/examples/H5Fcreate.c b/doxygen/examples/H5Fcreate.c index 6bb1d9f595a..525bad38f0b 100644 --- a/doxygen/examples/H5Fcreate.c +++ b/doxygen/examples/H5Fcreate.c @@ -1,12 +1,13 @@ #include "hdf5.h" -int main() +int +main() { - hid_t file; - if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - return -1; - /* Do something good with this file. */ - if(H5Fclose(file) < 0) - return -2; - return 0; + hid_t file; + if ((file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + return -1; + /* Do something good with this file. */ + if (H5Fclose(file) < 0) + return -2; + return 0; } diff --git a/doxygen/examples/hello_hdf5.c b/doxygen/examples/hello_hdf5.c index 56a179c3c5c..a37d39ff808 100644 --- a/doxygen/examples/hello_hdf5.c +++ b/doxygen/examples/hello_hdf5.c @@ -1,12 +1,13 @@ #include "hdf5.h" -int main() +int +main() { - herr_t retval; - unsigned majnum, minnum, relnum; + herr_t retval; + unsigned majnum, minnum, relnum; - if ((retval = H5get_libversion(&majnum, &minnum, &relnum)) >= 0) { - printf("Hello, HDF5 %d.%d.%d!\n", majnum, minnum, relnum); - } - return retval; + if ((retval = H5get_libversion(&majnum, &minnum, &relnum)) >= 0) { + printf("Hello, HDF5 %d.%d.%d!\n", majnum, minnum, relnum); + } + return retval; } diff --git a/examples/ph5example.c b/examples/ph5example.c index 06c89191dbd..da777a906a4 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -1087,7 +1087,7 @@ main(int argc, char **argv) return (nerrors); } -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLE is not configured in */ int main(void) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 626aeb6c6cb..8de694825fe 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -513,7 +513,7 @@ h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int *freelist = (int_f)c_freelist; *stab = (int_f)c_stab; *shhdr = (int_f)c_shhdr; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ] */ diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index 705e6f3965f..a4210c3132a 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -354,7 +354,7 @@ ReadDataSubBlocks(GIFBYTE **MemGif2, /* GIF image file input FILE stream #ifdef COMMENTED_OUT *ptr1++ = dataSize; /* Write the data count */ #endif /* COMMENTED_OUT */ - while (dataSize--) /* Read/write the Plain Text data */ + while (dataSize--) /* Read/write the Plain Text data */ *ptr1++ = *(*MemGif2)++; /* Check if there is another data sub-block */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 7be68dcebd1..63e92a5842a 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -73,7 +73,7 @@ static unsigned long cur_accum = 0; static int cur_bits = 0; #define MAXCODE(n_bits) ((1 << (n_bits)) - 1) -#define XV_BITS 12 /* BITS was already defined on some systems */ +#define XV_BITS 12 /* BITS was already defined on some systems */ #define HSIZE 5003 /* 80% occupancy */ typedef unsigned char char_type; diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 95be74d22b4..3a9aa87e802 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -1348,7 +1348,7 @@ Java_hdf_hdf5lib_H5_H5Sget_1regular_1hyperslab(JNIEnv *env, jclass clss, jlong s JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Sselect_1copy(JNIEnv *env, jclass clss, jlong dst_id, jlong src_id) { - herr_t status = FAIL; + herr_t status = FAIL; UNUSED(clss); @@ -1692,7 +1692,7 @@ Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Smodify_1select(JNIEnv *env, jclass clss, jlong space1_id, jint op, jlong space2_id) { - herr_t status = FAIL; + herr_t status = FAIL; UNUSED(clss); diff --git a/src/H5.c b/src/H5.c index b96e7fd3c6e..7820335c836 100644 --- a/src/H5.c +++ b/src/H5.c @@ -360,7 +360,7 @@ H5_term_library(void) HDfprintf(stderr, " %s\n", loop); #ifndef NDEBUG HDabort(); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -1072,7 +1072,7 @@ H5is_library_threadsafe(hbool_t *is_ts) /* At this time, it is impossible for this to fail. */ #ifdef H5_HAVE_THREADSAFE *is_ts = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ *is_ts = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/src/H5AC.c b/src/H5AC.c index a1ea6c1be39..1b002af80a9 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -374,7 +374,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1), H5AC_class_s, H5AC__check_if_write_permitted, TRUE, NULL, NULL); #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ if (NULL == f->shared->cache) @@ -432,7 +432,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_create() */ @@ -466,7 +466,7 @@ H5AC_dest(H5F_t *f) hbool_t curr_logging; /* TRUE if currently logging */ #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -585,7 +585,7 @@ H5AC_dest(H5F_t *f) aux_ptr->magic = 0; aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1143,7 +1143,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne { #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1453,7 +1453,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi #ifdef H5_HAVE_PARALLEL HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG)))); -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG)))); #endif /* H5_HAVE_PARALLEL */ @@ -1670,7 +1670,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un hbool_t deleted; #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1713,7 +1713,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un if (deleted && aux_ptr->mpi_rank == 0) if (H5AC__log_deleted_entry((H5AC_info_t *)thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC__log_deleted_entry() failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ if (H5C_unprotect(f, addr, thing, flags) < 0) @@ -2176,7 +2176,7 @@ H5AC__check_if_write_permitted(const H5F_t write_permitted = aux_ptr->write_permitted; else write_permitted = FALSE; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ *write_permitted_ptr = write_permitted; diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index a806b351565..1d2444149b0 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -760,7 +760,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end if */ /* the entry is dirty. If it exists on the cleaned entries list, @@ -776,7 +776,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1090,7 +1090,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end else */ /* insert / reinsert the entry in the dirty slist */ @@ -1104,7 +1104,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else-if */ + } /* end else-if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c index 76e885f09ac..4426189ebec 100644 --- a/src/H5ACproxy_entry.c +++ b/src/H5ACproxy_entry.c @@ -521,7 +521,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -529,7 +529,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_FLUSH: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -605,10 +605,10 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Adense.c b/src/H5Adense.c index 81e97496697..4924b456068 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -1103,7 +1103,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Release the space allocated for the attribute */ diff --git a/src/H5Aint.c b/src/H5Aint.c index 0a3926b2747..572459bd6d0 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -1792,7 +1792,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Increment the number of entries passed through */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index 4132f86b66e..e637052e11f 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -43,8 +43,8 @@ typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data); /* Describe kind of callback to make for each attribute */ typedef enum H5A_attr_iter_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_ATTR_OP_APP, /* Application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_ATTR_OP_APP, /* Application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_ATTR_OP_APP2, /* Revised application callback */ H5A_ATTR_OP_LIB /* Library internal callback */ } H5A_attr_iter_op_type_t; @@ -53,8 +53,8 @@ typedef struct H5A_attr_iter_op_t { H5A_attr_iter_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_operator1_t app_op; /* Application callback for each attribute */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_operator1_t app_op; /* Application callback for each attribute */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_operator2_t app_op2; /* Revised application callback for each attribute */ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */ } u; diff --git a/src/H5B2.c b/src/H5B2.c index 2b889dc32dd..ecf95cbcd74 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -1313,9 +1313,9 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) */ #ifdef OLD_WAY HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node") -#else /* OLD_WAY */ +#else /* OLD_WAY */ HGOTO_DONE(FAIL) -#endif /* OLD_WAY */ +#endif /* OLD_WAY */ } /* end if */ else { /* Make callback for current record */ diff --git a/src/H5B2cache.c b/src/H5B2cache.c index ce910850aa8..106542e7aab 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -486,9 +486,9 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -904,9 +904,9 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -1283,9 +1283,9 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else diff --git a/src/H5C.c b/src/H5C.c index 527374d8581..509b8ebbd83 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -573,7 +573,7 @@ void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, #ifndef NDEBUG int32_t version, -#else /* NDEBUG */ +#else /* NDEBUG */ int32_t H5_ATTR_UNUSED version, #endif /* NDEBUG */ double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size, @@ -803,7 +803,7 @@ H5C_prep_for_file_close(H5F_t *f) */ if (H5C__serialize_cache(f) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialization of the cache failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1309,7 +1309,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t set_flush_marker; hbool_t write_permitted = TRUE; size_t empty_space; @@ -2090,7 +2090,7 @@ H5C_resize_entry(void *thing, size_t new_size) H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->coll_list_len), (cache_ptr->coll_list_size), (entry_ptr->size), (new_size)) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* update statistics just before changing the entry size */ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size); @@ -2225,7 +2225,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t write_permitted; hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ size_t empty_space; @@ -2345,7 +2345,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, NULL) } /* end else-if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ #if H5C_DO_TAGGING_SANITY_CHECKS { @@ -3356,7 +3356,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (!dirtied) clear_entry = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (!entry_ptr->is_protected) @@ -3535,7 +3535,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry") } /* end else if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) @@ -3896,7 +3896,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) for (u = 0; u < child_entry->flush_dep_nparents; u++) HDassert(child_entry->flush_dep_parent[u] != parent_entry); } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* More sanity checks */ if (child_entry == parent_entry) @@ -5809,7 +5809,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e HDassert(cache_ptr->slist_size == (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase)); } /* end if */ -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ /* Since we are doing a destroy, we must make a pass through * the hash table and try to flush - destroy all entries that @@ -6308,7 +6308,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e HDassert(cache_ptr->slist_ring_size[ring] == 0); } /* end if */ -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ done: @@ -6749,7 +6749,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) @@ -7116,8 +7116,8 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e int mpi_rank = 0; /* MPI process rank */ MPI_Comm comm = MPI_COMM_NULL; /* File MPI Communicator */ int mpi_code; /* MPI error code */ -#endif /* H5_HAVE_PARALLEL */ - void *ret_value = NULL; /* Return value */ +#endif /* H5_HAVE_PARALLEL */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -7164,7 +7164,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e if ((comm = H5F_mpi_get_comm(f)) == MPI_COMM_NULL) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed") } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Get the on-disk entry image */ if (0 == (type->flags & H5C__CLASS_SKIP_READS)) { @@ -7193,7 +7193,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e image = (uint8_t *)new_image; #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); -#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ } /* end if */ #ifdef H5_HAVE_PARALLEL @@ -7214,7 +7214,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e if (MPI_SUCCESS != (mpi_code = MPI_Bcast(image, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* If the entry could be read speculatively and the length is still * changing, check for updating the actual size @@ -7262,9 +7262,9 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e (mpi_code = MPI_Bcast(image + len, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end if */ - } /* end if (actual_len != len) */ +#endif /* H5_HAVE_PARALLEL */ + } /* end if */ + } /* end if (actual_len != len) */ else { /* The length has stabilized */ len_changed = FALSE; @@ -8093,7 +8093,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e return (in_slist); - } /* H5C_entry_in_skip_list() */ + } /* H5C_entry_in_skip_list() */ #endif /* H5C_DO_SLIST_SANITY_CHECKS */ /*------------------------------------------------------------------------- @@ -8485,7 +8485,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry); FUNC_LEAVE_NOAPI_VOID - } /* H5C__assert_flush_dep_nocycle() */ + } /* H5C__assert_flush_dep_nocycle() */ #endif /* NDEBUG */ /*------------------------------------------------------------------------- @@ -8599,7 +8599,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* set cache_ptr->serialization_in_progress to TRUE, and back * to FALSE at the end of the function. Must maintain this flag @@ -8665,7 +8665,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ done: cache_ptr->serialization_in_progress = FALSE; @@ -8841,7 +8841,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -8910,7 +8910,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ else { @@ -8974,7 +8974,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); -#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ } /* end if */ /* Generate image for entry */ @@ -9282,7 +9282,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e entry->coll_access = FALSE; H5C__REMOVE_FROM_COLL_LIST(cache, entry, FAIL) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache, entry, FAIL) diff --git a/src/H5CX.c b/src/H5CX.c index 0dce4cacb5f..c7b7850e50a 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -213,7 +213,7 @@ typedef struct H5CX_t { MPI_Datatype ftype; /* MPI datatype for file, when using collective I/O */ hbool_t mpi_file_flushing; /* Whether an MPI-opened file is being flushed */ hbool_t rank0_bcast; /* Whether a dataset meets read-with-rank0-and-bcast requirements */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Cached DXPL properties */ size_t max_temp_buf; /* Maximum temporary buffer size */ @@ -241,8 +241,8 @@ typedef struct H5CX_t { hbool_t mpio_chunk_opt_num_valid; /* Whether collective chunk threshold is valid */ unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ hbool_t mpio_chunk_opt_ratio_valid; /* Whether collective chunk ratio is valid */ -#endif /* H5_HAVE_PARALLEL */ - H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ +#endif /* H5_HAVE_PARALLEL */ + H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ hbool_t err_detect_valid; /* Whether error detection info is valid */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ hbool_t filter_cb_valid; /* Whether filter callback function is valid */ @@ -298,8 +298,8 @@ typedef struct H5CX_t { (H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */ hbool_t mpio_coll_rank0_bcast_set; /* Whether instrumented "collective chunk multi ratio ind" value is set */ -#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ +#endif /* H5_HAVE_PARALLEL */ /* Cached LCPL properties */ H5T_cset_t encoding; /* Link name character encoding */ @@ -364,10 +364,10 @@ typedef struct H5CX_dxpl_cache_t { uint32_t mpio_global_no_coll_cause; /* Global reason for breaking collective I/O (H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME) */ H5FD_mpio_chunk_opt_t - mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ - unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ - unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ -#endif /* H5_HAVE_PARALLEL */ + mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ + unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ + unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ +#endif /* H5_HAVE_PARALLEL */ H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ H5Z_data_xform_t * data_transform; /* Data transform info (H5D_XFER_XFORM_NAME) */ @@ -431,7 +431,7 @@ hbool_t H5_PKG_INIT_VAR = FALSE; #ifndef H5_HAVE_THREADSAFE static H5CX_node_t *H5CX_head_g = NULL; /* Pointer to head of context stack */ -#endif /* H5_HAVE_THREADSAFE */ +#endif /* H5_HAVE_THREADSAFE */ /* Define a "default" dataset transfer property list cache structure to use for default DXPLs */ static H5CX_dxpl_cache_t H5CX_def_dxpl_cache; @@ -1111,8 +1111,8 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, if (H5P_USER_TRUE == md_coll_read) is_collective = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end else */ +#endif /* H5_HAVE_PARALLEL */ + } /* end else */ #ifdef H5_HAVE_PARALLEL /* Check for collective operation */ @@ -1138,7 +1138,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, MPI_Barrier(mpi_comm); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1199,7 +1199,7 @@ H5CX_set_loc(hid_t done: FUNC_LEAVE_NOAPI(ret_value) -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ FUNC_ENTER_NOAPI_NOINIT_NOERR FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 64450056e6c..31d43953e95 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -434,7 +434,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, double average_entries_skipped_per_calls_to_msic = 0.0f; double average_dirty_pf_entries_skipped_per_call_to_msic = 0.0f; double average_entries_scanned_per_calls_to_msic = 0.0f; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -489,7 +489,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, if (aggregate_max_pins < cache_ptr->max_pins[i]) aggregate_max_pins = cache_ptr->max_pins[i]; #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ - } /* end for */ + } /* end for */ if ((total_hits > 0) || (total_misses > 0)) hit_rate = (double)100.0f * ((double)(total_hits)) / ((double)(total_hits + total_misses)); @@ -738,7 +738,7 @@ H5C_stats__reset(H5C_t *cache_ptr) #else /* NDEBUG */ #if H5C_COLLECT_CACHE_STATS H5C_stats__reset(H5C_t *cache_ptr) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr) #endif /* H5C_COLLECT_CACHE_STATS */ #endif /* NDEBUG */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index f6c23ae7a9d..3631a998bac 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -361,7 +361,7 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr) fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_xfree(fake_cache_ptr->image_entries); fake_cache_ptr = (H5C_t *)H5MM_xfree(fake_cache_ptr); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ done: @@ -955,7 +955,7 @@ H5C_get_cache_image_config(const H5C_t *cache_ptr, H5C_cache_image_ctl_t *config herr_t #if H5C_COLLECT_CACHE_STATS H5C_image_stats(H5C_t *cache_ptr, hbool_t print_header) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) #endif /* H5C_COLLECT_CACHE_STATS */ { @@ -965,7 +965,7 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) int64_t total_misses = 0; double hit_rate; double prefetch_use_rate; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1071,7 +1071,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr) HMPI_GOTO_ERROR(FAIL, "can't receive cache image MPI_Bcast", mpi_result) } /* end else-if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1654,7 +1654,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl HDassert(!(cache_ptr->image_ctl.generate_image)); } /* end else */ #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ done: @@ -2135,7 +2135,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e u++; } /* end while */ HDassert(found); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -3219,7 +3219,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) * we add code to store and restore adaptive resize status. */ HDassert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ /* Check to see if the cache is oversize, and evict entries as @@ -3527,7 +3527,7 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr) #ifdef H5_HAVE_PARALLEL } /* end if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index c59fef4c80b..7b84cafec4c 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2424,7 +2424,7 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -4421,7 +4421,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ /* Check for the chunk expanding too much to encode in a 32-bit value */ if (orig_chunk_size > ((size_t)0xffffffff)) HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") -#endif /* H5_SIZEOF_SIZE_T > 4 */ +#endif /* H5_SIZEOF_SIZE_T > 4 */ } /* end if */ } /* end if */ @@ -4623,7 +4623,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end if */ + } /* end if */ /* Insert the chunk record into the index */ if (need_insert && ops->insert) diff --git a/src/H5Defl.c b/src/H5Defl.c index 1ab677a9a39..77ea0565c04 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -272,8 +272,8 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t); to_read = (size_t)tempto_read; -#else /* NDEBUG */ - to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); +#else /* NDEBUG */ + to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); #endif /* NDEBUG */ if ((n = HDread(fd, buf, to_read)) < 0) HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file") @@ -364,7 +364,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size); H5_CHECK_OVERFLOW(tempto_write, hsize_t, size_t); to_write = (size_t)tempto_write; -#else /* NDEBUG */ +#else /* NDEBUG */ to_write = MIN((size_t)(efl->slot[u].size - skip), size); #endif /* NDEBUG */ if ((size_t)HDwrite(fd, buf, to_write) != to_write) diff --git a/src/H5Dint.c b/src/H5Dint.c index 542ed77f9d1..bad6da73ff8 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1962,7 +1962,7 @@ H5D_close(H5D_t *dataset) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2126,7 +2126,7 @@ H5D_mult_refresh_close(hid_t dset_id) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2359,7 +2359,7 @@ H5D__alloc_storage(const H5D_io_info_t *io_info, H5D_time_alloc_t time_alloc, hb HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Check if we need to initialize the space */ @@ -2481,7 +2481,7 @@ H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_t HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ done: diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 068ab5860ab..11b78d0f093 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -424,7 +424,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, co #ifdef H5_HAVE_INSTRUMENTED_LIBRARY H5CX_test_set_mpio_coll_rank0_bcast(TRUE); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end if */ + } /* end if */ /* Set the return value, based on the global cause */ ret_value = global_cause[0] > 0 ? FALSE : TRUE; @@ -843,7 +843,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf else temp_not_link_io = TRUE; #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end else */ + } /* end else */ #ifdef H5_HAVE_INSTRUMENTED_LIBRARY { diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 0c63fab2bff..ffbd4c9829d 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -212,9 +212,9 @@ typedef enum H5D_io_op_type_t { typedef struct H5D_io_info_t { const H5D_t *dset; /* Pointer to dataset being operated on */ #ifdef H5_HAVE_PARALLEL - MPI_Comm comm; /* MPI communicator for file */ - hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ -#endif /* H5_HAVE_PARALLEL */ + MPI_Comm comm; /* MPI communicator for file */ + hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ +#endif /* H5_HAVE_PARALLEL */ H5D_storage_t * store; /* Dataset storage info */ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */ H5D_io_ops_t io_ops; /* I/O operation function pointers */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index ac840c26f42..fb687221986 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -832,8 +832,8 @@ herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) { #ifdef NOT_YET - int heap_rc; /* Reference count of global heap object */ -#endif /* NOT_YET */ + int heap_rc; /* Reference count of global heap object */ +#endif /* NOT_YET */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2820,8 +2820,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ #endif /* NDEBUG */ - } /* end if */ - } /* end if */ + } /* end if */ + } /* end if */ done: /* Cleanup I/O operation */ diff --git a/src/H5E.c b/src/H5E.c index 2d6ae61c5df..2b3647f6474 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -306,14 +306,14 @@ H5E__set_default_auto(H5E_t *stk) #ifndef H5_NO_DEPRECATED_SYMBOLS #ifdef H5_USE_16_API_DEFAULT stk->auto_op.vers = 1; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ stk->auto_op.vers = 2; #endif /* H5_USE_16_API_DEFAULT */ stk->auto_op.func1 = stk->auto_op.func1_default = (H5E_auto1_t)H5Eprint1; stk->auto_op.func2 = stk->auto_op.func2_default = (H5E_auto2_t)H5Eprint2; stk->auto_op.is_default = TRUE; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ stk->auto_op.func2 = (H5E_auto2_t)H5Eprint2; #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -1325,9 +1325,9 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid va_list ap; /* Varargs info */ H5E_t * estack; /* Pointer to error stack to modify */ #ifndef H5_HAVE_VASPRINTF - int tmp_len; /* Current size of description buffer */ - int desc_len; /* Actual length of description when formatted */ -#endif /* H5_HAVE_VASPRINTF */ + int tmp_len; /* Current size of description buffer */ + int desc_len; /* Actual length of description when formatted */ +#endif /* H5_HAVE_VASPRINTF */ char * tmp = NULL; /* Buffer to place formatted description in */ hbool_t va_started = FALSE; /* Whether the variable argument list is open */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1360,7 +1360,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ /* Allocate space for the formatted description buffer */ tmp_len = 128; if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) @@ -1395,7 +1395,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid */ if (tmp) HDfree(tmp); -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ if (tmp) H5MM_xfree(tmp); #endif /* H5_HAVE_VASPRINTF */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 6316ded6d01..a41c25c183c 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -555,9 +555,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -939,10 +939,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1346,10 +1346,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1750,10 +1750,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -2125,10 +2125,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 0a85729064e..9a7db423ecd 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -263,8 +263,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5Eint.c b/src/H5Eint.c index 78b28de867e..52ac57e6124 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -440,10 +440,10 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible) walk_op.u.func1 = H5E__walk1_cb; if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0) HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack print without deprecated symbols!"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ else { walk_op.vers = 2; walk_op.u.func2 = H5E__walk2_cb; @@ -539,10 +539,10 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o if (ret_value < 0) HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack"); } /* end if */ -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack walk without deprecated symbols!"); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + } /* end if */ else { HDassert(op->vers == 2); if (op->u.func2) { @@ -652,9 +652,9 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin { va_list ap; /* Varargs info */ #ifndef H5_HAVE_VASPRINTF - int tmp_len; /* Current size of description buffer */ - int desc_len; /* Actual length of description when formatted */ -#endif /* H5_HAVE_VASPRINTF */ + int tmp_len; /* Current size of description buffer */ + int desc_len; /* Actual length of description when formatted */ +#endif /* H5_HAVE_VASPRINTF */ char * tmp = NULL; /* Buffer to place formatted description in */ hbool_t va_started = FALSE; /* Whether the variable argument list is open */ herr_t ret_value = SUCCEED; /* Return value */ @@ -687,7 +687,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) HGOTO_DONE(FAIL) -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ /* Allocate space for the formatted description buffer */ tmp_len = 128; if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) @@ -722,7 +722,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin */ if (tmp) HDfree(tmp); -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ if (tmp) H5MM_xfree(tmp); #endif /* H5_HAVE_VASPRINTF */ @@ -970,7 +970,7 @@ H5E_dump_api_stack(hbool_t is_api) #ifdef H5_NO_DEPRECATED_SYMBOLS if (estack->auto_op.func2) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ if (estack->auto_op.vers == 1) { if (estack->auto_op.func1) (void)((estack->auto_op.func1)(estack->auto_data)); @@ -980,7 +980,7 @@ H5E_dump_api_stack(hbool_t is_api) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Epkg.h b/src/H5Epkg.h index a1db8852ab5..fe5e1277633 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -73,7 +73,7 @@ typedef struct { H5E_auto1_t func1_default; /* The saved library's default function - old style. */ H5E_auto2_t func2_default; /* The saved library's default function - new style. */ } H5E_auto_op_t; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ typedef struct { H5E_auto2_t func2; /* Only the new style callback function is available. */ } H5E_auto_op_t; @@ -85,7 +85,7 @@ typedef struct { union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5E_walk1_t func1; /* Old-style callback, NO error stack param. */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5E_walk2_t func2; /* New-style callback, with error stack param. */ } u; } H5E_walk_op_t; diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 37723996af9..b9c2f9347f0 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -478,9 +478,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -862,9 +862,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ @@ -1205,10 +1205,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5FAtest.c b/src/H5FAtest.c index 4da7d6fd5d7..de9e6d7d07a 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -200,7 +200,7 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ /* Sanity checks */ HDassert(raw); @@ -242,8 +242,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 96b1a42889f..cb65ad876eb 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -87,7 +87,7 @@ typedef struct H5FD_core_t { DWORD dwVolumeSerialNumber; HANDLE hFile; /* Native windows file handle */ -#endif /* H5_HAVE_WIN32_API */ +#endif /* H5_HAVE_WIN32_API */ hbool_t dirty; /* changes not saved? */ H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */ H5SL_t * dirty_list; /* dirty parts of the file */ @@ -726,11 +726,11 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ - } /* end if */ + } /* end if */ /* If an existing file is opened, load the whole file into memory. */ if (!(H5F_ACC_CREAT & flags)) { @@ -972,7 +972,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -989,7 +989,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(1) #endif /*H5_HAVE_WIN32_API*/ - } /* end if */ + } /* end if */ else { if (NULL == f1->name && NULL == f2->name) { if (f1 < f2) @@ -1236,7 +1236,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU temp_nbytes = file->eof - addr; H5_CHECK_OVERFLOW(temp_nbytes, hsize_t, size_t); nbytes = MIN(size, (size_t)temp_nbytes); -#else /* NDEBUG */ +#else /* NDEBUG */ nbytes = MIN(size, (size_t)(file->eof - addr)); #endif /* NDEBUG */ @@ -1508,7 +1508,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 21cefef0678..9ac71d684f1 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -660,7 +660,7 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1276,7 +1276,7 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN); if (SetEndOfFile((HANDLE)filehandle) == 0) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 91037f9885f..60aefa1dc8b 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -570,7 +570,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -856,7 +856,7 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1174,7 +1174,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1242,7 +1242,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for read operation */ if (file->fa.flags & H5FD_LOG_TIME_READ) { @@ -1272,7 +1272,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -1388,7 +1388,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1464,7 +1464,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for write operation */ if (file->fa.flags & H5FD_LOG_TIME_WRITE) { @@ -1640,7 +1640,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ if (0 == SetEndOfFile(file->hFile)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") } -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Truncate/extend the file */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index 3895b42ee4f..9530e59ec25 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -126,7 +126,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_XMIT_BYTES(label, buf, len) /* no-op */ -#endif /* MIRROR_DEBUG_XMIT_BYTE */ +#endif /* MIRROR_DEBUG_XMIT_BYTE */ #if MIRROR_DEBUG_OP_CALLS #define LOG_OP_CALL(name) \ @@ -136,7 +136,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_OP_CALL(name) /* no-op */ -#endif /* MIRROR_DEBUG_OP_CALLS */ +#endif /* MIRROR_DEBUG_OP_CALLS */ /* Prototypes */ static herr_t H5FD__mirror_term(void); diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 53e8c226f2a..86c5e772689 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -203,7 +203,7 @@ H5FD_mpio_init(void) { #ifdef H5FDmpio_DEBUG static int H5FD_mpio_Debug_inited = 0; -#endif /* H5FDmpio_DEBUG */ +#endif /* H5FDmpio_DEBUG */ const char *s; /* String for environment variables */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -232,7 +232,7 @@ H5FD_mpio_init(void) } /* end while */ } /* end if */ H5FD_mpio_Debug_inited++; - } /* end if */ + } /* end if */ #endif /* H5FDmpio_DEBUG */ /* Set return value */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 7789d393144..02323c6190b 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -377,7 +377,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -507,7 +507,7 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -742,7 +742,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -945,7 +945,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 611b54ac1c4..b74eb9a25d3 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -333,7 +333,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 5ba1a273889..e3135e84957 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -94,7 +94,7 @@ typedef struct H5FD_splitter_t { } while (0) #else #define H5FD_SPLITTER_LOG_CALL(name) /* no-op */ -#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ +#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ /* Private functions */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 4650c39982b..c66765a214a 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -115,7 +115,7 @@ typedef struct H5FD_stdio_t { DWORD nFileIndexHigh; DWORD dwVolumeSerialNumber; - HANDLE hFile; /* Native windows file handle */ + HANDLE hFile; /* Native windows file handle */ #endif /* H5_HAVE_WIN32_API */ } H5FD_stdio_t; @@ -338,7 +338,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr static const char *func = "H5FD_stdio_open"; /* Function Name for error reporting */ #ifdef H5_HAVE_WIN32_API struct _BY_HANDLE_FILE_INFORMATION fileinfo; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ struct stat sb; #endif /* H5_HAVE_WIN32_API */ @@ -431,7 +431,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Get the file descriptor (needed for truncate and some Windows information) */ #ifdef H5_HAVE_WIN32_API file->fd = _fileno(file->fp); -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); #endif /* H5_HAVE_WIN32_API */ if (file->fd < 0) { @@ -458,7 +458,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (fstat(file->fd, &sb) < 0) { free(file); fclose(f); @@ -549,7 +549,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2) return -1; if (f1->device > f2->device) return 1; -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1075,7 +1075,7 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ if (0 == bError) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1) -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Reset seek offset to beginning of file, so that file isn't re-extended later */ rewind(file->fp); diff --git a/src/H5FS.c b/src/H5FS.c index 4a050a63a07..d75711cb8d3 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -362,7 +362,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG @@ -513,7 +513,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) */ #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG diff --git a/src/H5FScache.c b/src/H5FScache.c index c75c20e7cd7..2acaa7ef2ca 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -797,10 +797,10 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -981,10 +981,10 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l if (fspace->serial_sect_count > 0) { hsize_t old_tot_sect_count; /* Total section count from header */ hsize_t H5_ATTR_NDEBUG_UNUSED - old_serial_sect_count; /* Total serializable section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ - unsigned sect_cnt_size; /* The size of the section size counts */ + old_serial_sect_count; /* Total serializable section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ + unsigned sect_cnt_size; /* The size of the section size counts */ /* Compute the size of the section counts */ sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count); @@ -1327,9 +1327,9 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 404333a82cf..967a1a39322 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1645,10 +1645,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags) -#else /* H5_USING_MEMCHECKER */ +#else /* H5_USING_MEMCHECKER */ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) -#endif /* H5_USING_MEMCHECKER */ +#endif /* H5_USING_MEMCHECKER */ } /* end if */ H5E_clear_stack(NULL); tent_flags = flags; @@ -1659,10 +1659,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags) -#else /* H5_USING_MEMCHECKER */ +#else /* H5_USING_MEMCHECKER */ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) -#endif /* H5_USING_MEMCHECKER */ +#endif /* H5_USING_MEMCHECKER */ } /* end if */ } /* end if */ @@ -2465,8 +2465,8 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n hid_t new_fapl_id = H5I_INVALID_HID; /* ID for duplicated FAPL */ #ifdef H5_HAVE_SYMLINK /* This has to be declared here to avoid unfreed resources on errors */ - char *realname = NULL; /* Fully resolved path name of file */ -#endif /* H5_HAVE_SYMLINK */ + char *realname = NULL; /* Fully resolved path name of file */ +#endif /* H5_HAVE_SYMLINK */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -2547,7 +2547,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path") } /* end if */ } /* end if */ -#endif /* H5_HAVE_SYMLINK */ +#endif /* H5_HAVE_SYMLINK */ /* Check if we've resolved the file's name */ if (NULL == *actual_name) { diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 84421214008..6917ba54a42 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -30,8 +30,8 @@ typedef struct H5F_t H5F_t; /* Private headers needed by this file */ #include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_PARALLEL -#include "H5Pprivate.h" /* Property lists */ -#endif /* H5_HAVE_PARALLEL */ +#include "H5Pprivate.h" /* Property lists */ +#endif /* H5_HAVE_PARALLEL */ #include "H5VMprivate.h" /* Vectors and arrays */ /**************************/ @@ -530,33 +530,33 @@ typedef struct H5F_t H5F_t; #define H5F_DEFAULT_CSET H5T_CSET_ASCII /* ========= File Creation properties ============ */ -#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ +#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ #define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ #define H5F_CRT_SYM_LEAF_DEF 4 -#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ +#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ #define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ -#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ +#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ #define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ /* Number of shared object header message indexes */ #define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" #define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ /* Minimum size of messages in each index */ #define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" -#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ -#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ -#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ -#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ +#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ +#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ +#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ +#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ #define H5F_CRT_FREE_SPACE_THRESHOLD_NAME "free_space_threshold" /* Free space section threshold */ #define H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME "file_space_page_size" /* File space page size */ /* ========= File Access properties ============ */ #define H5F_ACS_META_CACHE_INIT_CONFIG_NAME \ - "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ + "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ #define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ -#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ -#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ -#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ +#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ +#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ +#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ #define H5F_ACS_META_BLOCK_SIZE_NAME \ "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */ #define H5F_ACS_SIEVE_BUF_SIZE_NAME \ @@ -564,34 +564,34 @@ typedef struct H5F_t H5F_t; #define H5F_ACS_SDATA_BLOCK_SIZE_NAME \ "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data \ allocations) */ -#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ -#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ -#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ +#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ +#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ +#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ #define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ #define H5F_ACS_FAMILY_NEWSIZE_NAME \ "family_newsize" /* New member size of family driver. (private property only used by h5repart) */ #define H5F_ACS_FAMILY_TO_SINGLE_NAME \ "family_to_single" /* Whether to convert family to a single-file driver. (private property only used by \ h5repart) */ -#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ -#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ +#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ +#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ #define H5F_ACS_LIBVER_HIGH_BOUND_NAME "libver_high_bound" /* 'high' bound of library format versions */ #define H5F_ACS_WANT_POSIX_FD_NAME \ "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address \ */ #define H5F_ACS_METADATA_READ_ATTEMPTS_NAME "metadata_read_attempts" /* # of metadata read attempts */ -#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ -#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ +#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ +#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ #define H5F_ACS_FILE_IMAGE_INFO_NAME \ "file_image_info" /* struct containing initial file image and callback info */ #define H5F_ACS_CLEAR_STATUS_FLAGS_NAME \ "clear_status_flags" /* Whether to clear superblock status_flags (private property only used by h5clear) \ */ -#define H5F_ACS_NULL_FSM_ADDR_NAME "null_fsm_addr" /* Nullify addresses of free-space managers */ - /* Private property used only by h5clear */ -#define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ - /* Private property used only by h5clear */ -#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ +#define H5F_ACS_NULL_FSM_ADDR_NAME "null_fsm_addr" /* Nullify addresses of free-space managers */ +/* Private property used only by h5clear */ +#define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ +/* Private property used only by h5clear */ +#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ #define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */ #define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME \ "start_mdc_log_on_access" /* Whether logging starts on file create/open */ @@ -637,7 +637,7 @@ typedef struct H5F_t H5F_t; 3 /* With file locking and consistency flags (at least this version for SWMR support) */ #define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_3 /* The maximum super block format */ #define HDF5_SUPERBLOCK_VERSION_V18_LATEST \ - HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ + HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ #define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ #define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ #define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ @@ -646,14 +646,14 @@ typedef struct H5F_t H5F_t; /* B-tree internal 'K' values */ #define HDF5_BTREE_SNODE_IK_DEF 16 #define HDF5_BTREE_CHUNK_IK_DEF \ - 32 /* Note! this value is assumed \ - to be 32 for version 0 \ - of the superblock and \ - if it is changed, the code \ - must compensate. -QAK \ - */ + 32 /* Note! this value is assumed \ + to be 32 for version 0 \ + of the superblock and \ + if it is changed, the code \ + must compensate. -QAK \ + */ #define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */ - /* See format specification on version 1 B-trees */ +/* See format specification on version 1 B-trees */ /* Default file space handling strategy */ #define H5F_FILE_SPACE_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR @@ -687,7 +687,7 @@ typedef struct H5F_t H5F_t; #define H5F_PAGED_AGGR(F) (F->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && F->shared->fs_page_size) /* Metadata read attempt values */ -#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ +#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ #define H5F_SWMR_METADATA_READ_ATTEMPTS 100 /* Default # of read attempts for SWMR access */ /* Macros to define signatures of all objects in the file */ @@ -803,7 +803,7 @@ typedef enum H5F_mem_page_t { } H5F_mem_page_t; /* Aliases for H5F_mem_page_t enum values */ -#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ +#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ #define H5F_MEM_PAGE_GENERIC H5F_MEM_PAGE_LARGE_SUPER /* Large-sized generic: meta and raw */ /* Type of prefix for opening prefixed files */ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 817e707da65..1292bcc28a6 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -337,7 +337,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) hbool_t skip_eof_check = FALSE; /* Whether to skip checking the EOF value */ #ifdef H5_HAVE_PARALLEL int mpi_size = 1; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG) @@ -884,12 +884,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Do the same kluge until we know for sure. VC */ #if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ - /* KLUGE ALERT!! - * - * H5F__super_ext_write_msg() expects f->shared->sblock to - * be set -- verify that it is NULL, and then set it. - * Set it back to NULL when we are done. - */ + /* KLUGE ALERT!! + * + * H5F__super_ext_write_msg() expects f->shared->sblock to + * be set -- verify that it is NULL, and then set it. + * Set it back to NULL when we are done. + */ HDassert(f->shared->sblock == NULL); f->shared->sblock = sblock; #endif /* JRM */ diff --git a/src/H5Gent.c b/src/H5Gent.c index 10c94994161..4fb70ce726e 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -424,7 +424,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk HDassert(!stab_exists); } /* end else */ #endif /* NDEBUG */ - } /* end if */ + } /* end if */ else if (obj_type == H5O_TYPE_UNKNOWN) { /* Try to retrieve symbol table information for caching */ H5O_loc_t targ_oloc; /* Location of link target */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 2f5ba1529db..893a2588a51 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -167,8 +167,8 @@ typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc /*in*/, const char *name, typedef enum H5G_link_iterate_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_LINK_OP_OLD, /* "Old" application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5G_LINK_OP_NEW /* "New" application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5G_LINK_OP_NEW /* "New" application callback */ } H5G_link_iterate_op_type_t; typedef struct { @@ -176,7 +176,7 @@ typedef struct { union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_iterate_t op_old; /* "Old" application callback for each link */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5L_iterate_t op_new; /* "New" application callback for each link */ } op_func; } H5G_link_iterate_t; diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index fd0106b7baf..6db23e0643a 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -98,7 +98,7 @@ H5_DLL herr_t H5Grefresh(hid_t group_id); /* Macros for types of objects in a group (see H5G_obj_t definition) */ #define H5G_NTYPES 256 /* Max possible number of types */ -#define H5G_NLIBTYPES 8 /* Number of internal types */ +#define H5G_NLIBTYPES 8 /* Number of internal types */ #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES) #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */ diff --git a/src/H5Groot.c b/src/H5Groot.c index d7fbb49ab53..29cb46ee50c 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -246,8 +246,8 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ - } /* end else */ + } /* end if */ + } /* end else */ /* Cache the root group's symbol table information in the root group symbol * table entry. It will have been allocated by now if it needs to be diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 06360ac8ccd..84df876d679 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1302,9 +1302,9 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - size_t max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ +#endif /* NDEBUG */ uint32_t metadata_chksum; /* Computed metadata checksum value */ size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1378,7 +1378,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG max_child = u; } /* end if */ #endif /* NDEBUG */ - } /* end for */ + } /* end for */ /* Compute checksum */ metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); diff --git a/src/H5HG.c b/src/H5HG.c index 100310d974a..d206e750d69 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -548,7 +548,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size)); #endif /* OLD_WAY */ - } /* end if */ + } /* end if */ heap_flags |= H5AC__DIRTIED_FLAG; /* Return value */ diff --git a/src/H5MF.c b/src/H5MF.c index de22930d15e..b8e215031f1 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1204,7 +1204,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ else { htri_t merged; /* Whether node was merged */ H5MF_sect_ud_t udata; /* User data for callback */ @@ -1377,7 +1377,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* If no extension so far, try to extend into a free-space section */ @@ -1403,7 +1403,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi "error extending block in free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* For paged aggregation and a metadata block: try to extend into page end threshold */ @@ -1414,7 +1414,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi ret_value = TRUE; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ } /* end if */ } /* allow_extend */ @@ -2971,7 +2971,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HDassert(fs_stat.serial_sect_count > 0); HDassert(fs_stat.alloc_sect_size > 0); HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ else { HDassert(!H5F_addr_defined(fs_stat.addr)); diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 597da762dd9..473c1dc5cd2 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -648,7 +648,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: section is dropped\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ /* Adjust the section if it is not at page end but its size + prem is at page end */ else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; @@ -656,7 +656,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5MM.c b/src/H5MM.c index 7b49c72cab0..1effd6a6fad 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -53,7 +53,7 @@ struct H5MM_block_t; /* Forward declaration for typedef */ typedef struct H5MM_block_t { unsigned char - sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ + sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ struct H5MM_block_t *next; /* Pointer to next block in the list of allocated blocks */ struct H5MM_block_t *prev; /* Pointer to previous block in the list of allocated blocks */ union { @@ -70,7 +70,7 @@ typedef struct H5MM_block_t { /********************/ /* Local Prototypes */ /********************/ -#if defined H5_MEMORY_ALLOC_SANITY_CHECK +#if defined H5_MEMORY_ALLOC_SANITY_CHECK static hbool_t H5MM__is_our_block(void *mem); static void H5MM__sanity_check_block(const H5MM_block_t *block); static void H5MM__sanity_check(void *mem); @@ -271,7 +271,7 @@ H5MM_malloc(size_t size) H5MM_block_head_s.u.info.in_use = TRUE; H5MM_init_s = TRUE; - } /* end if */ + } /* end if */ #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (size) { @@ -309,10 +309,10 @@ H5MM_malloc(size_t size) } /* end if */ else ret_value = NULL; -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDmalloc(size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -352,10 +352,10 @@ H5MM_calloc(size_t size) #if defined H5_MEMORY_ALLOC_SANITY_CHECK if (NULL != (ret_value = H5MM_malloc(size))) HDmemset(ret_value, 0, size); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDcalloc((size_t)1, size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -417,14 +417,14 @@ H5MM_realloc(void *mem, size_t size) } else ret_value = H5MM_xfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDrealloc(mem, size); /* Some platforms do not return NULL if size is zero. */ if (0 == size) ret_value = NULL; #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end else */ + } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MM_realloc() */ @@ -542,10 +542,10 @@ H5MM_xfree(void *mem) } else HDfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ HDfree(mem); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ FUNC_LEAVE_NOAPI(NULL) } /* end H5MM_xfree() */ @@ -642,8 +642,8 @@ H5MM_get_alloc_stats(H5_alloc_stats_t *stats) stats->total_alloc_blocks_count = H5MM_total_alloc_blocks_count_s; stats->curr_alloc_blocks_count = H5MM_curr_alloc_blocks_count_s; stats->peak_alloc_blocks_count = H5MM_peak_alloc_blocks_count_s; - } /* end if */ -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ + } /* end if */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (stats) HDmemset(stats, 0, sizeof(H5_alloc_stats_t)); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index d957686da7d..b4a59bac76e 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -49,8 +49,8 @@ H5_DLL void * H5MM_xfree_const(const void *mem); H5_DLL void * H5MM_memcpy(void *dest, const void *src, size_t n); H5_DLL herr_t H5MM_get_alloc_stats(H5_alloc_stats_t *stats); #if defined H5_MEMORY_ALLOC_SANITY_CHECK -H5_DLL void H5MM_sanity_check_all(void); -H5_DLL void H5MM_final_sanity_check(void); +H5_DLL void H5MM_sanity_check_all(void); +H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ #endif /* _H5MMprivate_H */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index e2b4b873a8e..9acbd91ef41 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -995,10 +995,10 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1284,7 +1284,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image unsigned chunkno; /* Current chunk's index */ #ifndef NDEBUG unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ hbool_t mesgs_modified = FALSE; /* Whether any messages were modified when the object header was deserialized */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 38a212cfa31..2e92e6c0330 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -81,7 +81,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in if (H5T__upgrade_version((DT), (VERS)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \ *(IOF) |= H5O_DECODEIO_DIRTY; \ - } /* end if */ + } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ /* This message derives from H5O message class */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 7d3f8e1a726..7c86a113ba7 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -98,25 +98,25 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { H5O_MSG_LAYOUT, /*0x0008 Data Layout */ #ifdef H5O_ENABLE_BOGUS H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ NULL, /*0x0009 "Bogus valid" (for testing) */ -#endif /* H5O_ENABLE_BOGUS */ - H5O_MSG_GINFO, /*0x000A Group information */ - H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ - H5O_MSG_ATTR, /*0x000C Attribute */ - H5O_MSG_NAME, /*0x000D Object name */ - H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ - H5O_MSG_CONT, /*0x0010 Object header continuation */ - H5O_MSG_STAB, /*0x0011 Symbol table */ - H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ - H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ - H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ - H5O_MSG_AINFO, /*0x0015 Attribute information */ - H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ - H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ - H5O_MSG_MDCI, /*0x0018 Metadata cache image */ - H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ +#endif /* H5O_ENABLE_BOGUS */ + H5O_MSG_GINFO, /*0x000A Group information */ + H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ + H5O_MSG_ATTR, /*0x000C Attribute */ + H5O_MSG_NAME, /*0x000D Object name */ + H5O_MSG_MTIME, /*0x000E Object modification date and time */ + H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ + H5O_MSG_CONT, /*0x0010 Object header continuation */ + H5O_MSG_STAB, /*0x0011 Symbol table */ + H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ + H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ + H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ + H5O_MSG_AINFO, /*0x0015 Attribute information */ + H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ + H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ + H5O_MSG_MDCI, /*0x0018 Metadata cache image */ + H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ }; /* Format version bounds for object header */ @@ -1065,7 +1065,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */ #ifndef NDEBUG size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Bring the chunk into the cache */ /* (which adds to the object header) */ @@ -1113,7 +1113,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ #ifdef H5O_DEBUG H5O_assert(oh); diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 30f0b1c538c..bcc1c8fe6de 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -277,10 +277,10 @@ struct H5O_t { /* (This is to simulate a bug in earlier * versions of the library) */ -#endif /* H5O_ENABLE_BAD_MESG_COUNT */ +#endif /* H5O_ENABLE_BAD_MESG_COUNT */ #ifndef NDEBUG size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Chunk management information (not stored) */ size_t rc; /* Reference count of [continuation] chunks using this structure */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 31b37482fe7..c9c53c69fad 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -37,13 +37,13 @@ typedef struct H5O_fill_t H5O_fill_t; #include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ -#include "H5Tprivate.h" /* Datatype functions */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Tprivate.h" /* Datatype functions */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; @@ -66,8 +66,8 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* Object header macros */ #define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */ -#define H5O_ALL (-1) /* Operate on all messages of type */ -#define H5O_FIRST (-2) /* Operate on first message of type */ +#define H5O_ALL (-1) /* Operate on all messages of type */ +#define H5O_FIRST (-2) /* Operate on first message of type */ /* Flags needed when encoding messages */ #define H5O_MSG_NO_FLAGS_SET 0x00u @@ -95,10 +95,10 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* #define H5O_ENABLE_BOGUS */ /* ========= Object Creation properties ============ */ -#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ -#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ +#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ +#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ #define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */ -#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ +#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ #define H5O_CRT_PIPELINE_DEF \ { \ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \ @@ -231,7 +231,7 @@ typedef struct H5O_copy_t { #define H5O_FSINFO_ID 0x0017 /* File space info message. */ #define H5O_MDCI_MSG_ID 0x0018 /* Metadata Cache Image Message */ #define H5O_UNKNOWN_ID 0x0019 /* Placeholder message ID for unknown message. */ - /* (this should never exist in a file) */ +/* (this should never exist in a file) */ /* * Note: Must increment H5O_MSG_TYPES in H5Opkg.h and update H5O_msg_class_g * in H5O.c when creating a new message type. Also bump the value of @@ -375,7 +375,7 @@ typedef struct H5O_link_t { * External File List Message * (Data structure in memory) */ -#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ +#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ #define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */ typedef struct H5O_efl_entry_t { diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 840e5e16387..a0704ecb2b1 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -72,10 +72,10 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla #ifdef H5_STRICT_FORMAT_CHECKS if (*ioflags & H5O_DECODEIO_DIRTY) HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ *ioflags &= ~H5O_DECODEIO_DIRTY; #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ else { /* Decode native message directly */ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, open_oh, mesg_flags, ioflags, p_size, p))) @@ -237,7 +237,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Decrement the reference count on the native message directly */ if (H5O_SHARED_DELETE_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_DELETE_REAL */ done: @@ -288,7 +288,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Increment the reference count on the native message directly */ if (H5O_SHARED_LINK_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_LINK_REAL */ done: @@ -333,7 +333,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file") -#else /* H5O_SHARED_COPY_FILE_REAL */ +#else /* H5O_SHARED_COPY_FILE_REAL */ /* No copy file callback defined, just copy the message itself */ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message") diff --git a/src/H5PLpath.c b/src/H5PLpath.c index 1858cf8da3b..ab708c189eb 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -691,7 +691,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__find_plugin_in_path() */ -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index f1ebd99e3ab..25efc551772 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -313,7 +313,7 @@ static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ +#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 0f271272b86..fe8d65c5b2e 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -443,7 +443,7 @@ static const H5P_coll_md_read_flag_t H5F_def_coll_md_read_flag_g = H5F_ACS_COLL_MD_READ_FLAG_DEF; /* Default setting for the collective metedata read flag */ static const hbool_t H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ static const H5AC_cache_image_config_t H5F_def_mdc_initCacheImageCfg_g = H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_DEF; /* Default metadata cache image settings */ static const size_t H5F_def_page_buf_size_g = H5F_ACS_PAGE_BUFFER_SIZE_DEF; /* Default page buffer size */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 239afd15ca0..9dcfd43b6fd 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -87,7 +87,7 @@ struct H5P_genclass_t { H5P_plist_type_t type; /* Type of property */ size_t nprops; /* Number of properties in class */ unsigned - plists; /* Number of property lists that have been created since the last modification to the class */ + plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of outstanding ID's open on this class object */ hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists diff --git a/src/H5SM.c b/src/H5SM.c index 90b1c5ddd5d..3d68503f0e8 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -1050,7 +1050,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, if (defer_flags & H5SM_WAS_DEFERRED) #ifndef NDEBUG deferred_type = ((H5O_shared_t *)mesg)->type; -#else /* NDEBUG */ +#else /* NDEBUG */ if ((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM)) HGOTO_DONE(FALSE); @@ -1369,7 +1369,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (defer) HDmemset(&shared.u, 0, sizeof(shared.u)); #endif /* H5_USING_MEMCHECKER */ - } /* end if */ + } /* end if */ else { htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 6e20f8a5e8f..330392c77ad 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2124,7 +2124,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Decrement number of blocks */ fast_dim_count--; } /* end while */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -2160,7 +2160,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS /* Increment offset in destination buffer */ @@ -11561,7 +11561,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, for (u = 0; u < H5S_MAX_RANK; u++) HDassert(!udata.ps_span_info[u]); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e0042bd2d2f..ccd672e2bb1 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -133,10 +133,10 @@ struct H5S_pnt_list_t { H5S_pnt_node_t *head; /* Pointer to head of point list */ H5S_pnt_node_t *tail; /* Pointer to tail of point list */ - hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */ + hsize_t last_idx; /* Index of the point after the last returned from H5S__get_select_elem_pointlist() */ H5S_pnt_node_t *last_idx_pnt; /* Point after the last returned from H5S__get_select_elem_pointlist(). - * If we ever add a way to remove points or add points in the middle of - * the pointlist we will need to invalidate these fields. */ + * If we ever add a way to remove points or add points in the middle of + * the pointlist we will need to invalidate these fields. */ }; /* Information about hyperslab spans */ @@ -281,7 +281,7 @@ typedef struct { H5S_sel_release_func_t release; /* Method to release current selection */ H5S_sel_is_valid_func_t is_valid; /* Method to determine if current selection is valid for dataspace */ H5S_sel_serial_size_func_t - serial_size; /* Method to determine number of bytes required to store current selection */ + serial_size; /* Method to determine number of bytes required to store current selection */ H5S_sel_serialize_func_t serialize; /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte @@ -289,7 +289,7 @@ typedef struct { H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t - offset; /* Method to determine linear offset of initial element in selection within dataspace */ + offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ @@ -299,9 +299,9 @@ typedef struct { H5S_sel_shape_same_func_t shape_same; /* Method to determine if two dataspaces' selections are the same shape */ H5S_sel_intersect_block_func_t - intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ - H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ - H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ + intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ + H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ + H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ H5S_sel_project_scalar project_scalar; /* Method to construct scalar dataspace projection */ H5S_sel_project_simple project_simple; /* Method to construct simple dataspace projection */ H5S_sel_iter_init_func_t iter_init; /* Method to initialize iterator for current selection */ @@ -365,7 +365,7 @@ typedef struct H5S_sel_iter_class_t { H5S_sel_iter_next_block_func_t iter_next_block; /* Method to move selection iterator to the next block in the selection */ H5S_sel_iter_get_seq_list_func_t - iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ + iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ H5S_sel_iter_release_func_t iter_release; /* Method to release iterator for current selection */ } H5S_sel_iter_class_t; diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 00e9335bc2f..b8067ee5513 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -834,7 +834,7 @@ H5S__copy_pnt_list(const H5S_pnt_list_t *src, unsigned rank) H5MM_memcpy(dst->low_bounds, src->low_bounds, (rank * sizeof(hsize_t))); /* Clear cached iteration point */ - dst->last_idx = 0; + dst->last_idx = 0; dst->last_idx_pnt = NULL; /* Set return value */ @@ -1361,8 +1361,8 @@ static herr_t H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t numpoints, hsize_t *buf) { const hsize_t endpoint = startpoint + numpoints; /* Index of last point in iteration */ - H5S_pnt_node_t *node; /* Point node */ - unsigned rank; /* Dataspace rank */ + H5S_pnt_node_t *node; /* Point node */ + unsigned rank; /* Dataspace rank */ FUNC_ENTER_STATIC_NOERR @@ -1373,8 +1373,8 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n rank = space->extent.rank; /* Check for cached point at the correct index */ - if(space->select.sel_info.pnt_lst->last_idx_pnt - && startpoint == space->select.sel_info.pnt_lst->last_idx) + if (space->select.sel_info.pnt_lst->last_idx_pnt && + startpoint == space->select.sel_info.pnt_lst->last_idx) node = space->select.sel_info.pnt_lst->last_idx_pnt; else { /* Get the head of the point list */ @@ -1385,7 +1385,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n startpoint--; node = node->next; } /* end while */ - } /* end else */ + } /* end else */ /* Iterate through the node, copying each point's information */ while (node != NULL && numpoints > 0) { @@ -1396,7 +1396,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, hsize_t n } /* end while */ /* Cached next point in iteration */ - space->select.sel_info.pnt_lst->last_idx = endpoint; + space->select.sel_info.pnt_lst->last_idx = endpoint; space->select.sel_info.pnt_lst->last_idx_pnt = node; FUNC_LEAVE_NOAPI(SUCCEED) @@ -2191,7 +2191,7 @@ H5S__point_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *of } /* end else */ /* Clear cached iteration point */ - new_space->select.sel_info.pnt_lst->last_idx = 0; + new_space->select.sel_info.pnt_lst->last_idx = 0; new_space->select.sel_info.pnt_lst->last_idx_pnt = NULL; /* Number of elements selected will be the same */ diff --git a/src/H5TS.c b/src/H5TS.c index bd1b748faf4..ebefd2a1178 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -29,7 +29,7 @@ typedef struct H5TS_cancel_struct { /* Global variable definitions */ #ifdef H5_HAVE_WIN_THREADS H5TS_once_t H5TS_first_init_g; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; #endif /* H5_HAVE_WIN_THREADS */ H5TS_key_t H5TS_errstk_key_g; @@ -291,7 +291,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS EnterCriticalSection(&mutex->CriticalSection); return 0; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ herr_t ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) @@ -342,7 +342,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) /* Releases ownership of the specified critical section object. */ LeaveCriticalSection(&mutex->CriticalSection); return 0; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ herr_t ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) @@ -394,7 +394,7 @@ H5TS_cancel_count_inc(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported; just return 0 */ return SUCCEED; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_cancel_t *cancel_counter; herr_t ret_value = SUCCEED; @@ -456,7 +456,7 @@ H5TS_cancel_count_dec(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported; will just return 0 */ return SUCCEED; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ register H5TS_cancel_t *cancel_counter; herr_t ret_value = SUCCEED; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index ee29522cd3f..f3e1458c17c 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -302,7 +302,7 @@ typedef struct H5T_shared_t { size_t size; /*total size of an instance of this type */ unsigned version; /* Version of object header message to encode this object with */ hbool_t - force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ + force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t *parent; /*parent type for derived datatypes */ union { H5T_atomic_t atomic; /* an atomic datatype */ diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 342914050fc..85230d92f52 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -27,7 +27,7 @@ typedef struct H5T_t H5T_t; #include "H5MMpublic.h" /* Memory management */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5Gprivate.h" /* Groups */ #include "H5Rprivate.h" /* References */ diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index eb8436ad502..90af459e704 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -199,7 +199,7 @@ typedef struct { /* Opaque information */ #define H5T_OPAQUE_TAG_MAX 256 /* Maximum length of an opaque tag */ - /* This could be raised without too much difficulty */ +/* This could be raised without too much difficulty */ #ifdef __cplusplus extern "C" { diff --git a/src/H5VM.c b/src/H5VM.c index a5461e8a216..73eaf1d1e47 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -491,7 +491,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, #ifdef NO_INLINED_CODE dst_start = H5VM_hyper_stride(n, size, dst_size, dst_offset, dst_stride); src_start = H5VM_hyper_stride(n, size, src_size, src_offset, src_stride); -#else /* NO_INLINED_CODE */ +#else /* NO_INLINED_CODE */ /* in-line version of two calls to H5VM_hyper_stride() */ { hsize_t dst_acc; /*accumulator */ diff --git a/src/H5Z.c b/src/H5Z.c index 0e14ba35b82..6fb2e39ba22 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -47,7 +47,7 @@ typedef struct H5Z_object_t { #ifdef H5_HAVE_PARALLEL hbool_t sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5Z_object_t; /* Enumerated type for dataset creation prelude callbacks */ @@ -172,7 +172,7 @@ H5Z_term_package(void) } /* end for */ } /* end for */ } /* end if */ -#endif /* H5Z_DEBUG */ +#endif /* H5Z_DEBUG */ /* Free the table of filters */ if (H5Z_table_g) { @@ -246,11 +246,11 @@ H5Zregister(const void *cls) /* Set cls_real to point to the translated structure */ cls_real = &cls_new; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Deprecated symbols not allowed, throw an error */ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5Z_class_t version number"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") @@ -318,7 +318,7 @@ H5Z_register(const H5Z_class2_t *cls) #ifdef H5Z_DEBUG HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - } /* end if */ + } /* end if */ /* Filter already registered */ else { /* Replace old contents */ @@ -578,7 +578,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key H5_ATTR H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */ #ifdef H5_HAVE_PARALLEL H5Z_object_t *object = (H5Z_object_t *)key; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ int ret_value = FALSE; /* Return value */ FUNC_ENTER_STATIC @@ -623,7 +623,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key H5_ATTR if (H5P_USER_TRUE == coll_md_read) H5CX_set_coll_metadata_read(TRUE); } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0) diff --git a/src/H5Znbit.c b/src/H5Znbit.c index d85ebfe5a37..ca5f74a6149 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -95,13 +95,13 @@ H5Z_class2_t H5Z_NBIT[1] = {{ }}; /* Local macros */ -#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ -#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ -#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ -#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ +#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ +#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ +#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ +#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ #define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */ -#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ -#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ +#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ +#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ /* Local variables */ diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index 97da13ccbe9..d01f9b58c29 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -32,26 +32,26 @@ typedef int H5Z_filter_t; /* Filter IDs */ #define H5Z_FILTER_ERROR (-1) /*no filter */ -#define H5Z_FILTER_NONE 0 /*reserved indefinitely */ -#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */ -#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */ -#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */ -#define H5Z_FILTER_SZIP 4 /*szip compression */ -#define H5Z_FILTER_NBIT 5 /*nbit compression */ -#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */ -#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */ +#define H5Z_FILTER_NONE 0 /*reserved indefinitely */ +#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */ +#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */ +#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */ +#define H5Z_FILTER_SZIP 4 /*szip compression */ +#define H5Z_FILTER_NBIT 5 /*nbit compression */ +#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */ +#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */ #define H5Z_FILTER_MAX 65535 /*maximum filter id */ /* General macros */ -#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */ +#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */ #define H5Z_MAX_NFILTERS 32 /* Maximum number of filters allowed in a pipeline */ - /* (should probably be allowed to be an - * unlimited amount, but currently each - * filter uses a bit in a 32-bit field, - * so the format would have to be - * changed to accommodate that) - */ +/* (should probably be allowed to be an + * unlimited amount, but currently each + * filter uses a bit in a 32-bit field, + * so the format would have to be + * changed to accommodate that) + */ /* Flags for filter definition (stored) */ #define H5Z_FLAG_DEFMASK 0x00ff /*definition flag mask */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 96360eb7be5..d4a72a4ed18 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -103,14 +103,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Local macros */ #define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */ -#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ -#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ -#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ -#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ -#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ -#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ -#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ -#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ +#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ +#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ +#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ +#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ +#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ +#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ +#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ +#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ #define H5Z_SCALEOFFSET_PARM_FILVAL 8 /* "Local" parameter for start location to store dataset fill value */ #define H5Z_SCALEOFFSET_CLS_INTEGER 0 /* Integer (datatype class) */ @@ -1232,7 +1232,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) : ((unsigned char *)*buf)[4]; - minval = 0; + minval = 0; for (i = 0; i < minval_size; i++) { minval_mask = ((unsigned char *)*buf)[5 + i]; minval_mask <<= i * 8; diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index bd28f84b03b..a5d33aa707d 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -122,8 +122,8 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] size_t numofelements; /* Number of elements in buffer */ size_t i; /* Local index variables */ #ifdef NO_DUFFS_DEVICE - size_t j; /* Local index variable */ -#endif /* NO_DUFFS_DEVICE */ + size_t j; /* Local index variable */ +#endif /* NO_DUFFS_DEVICE */ size_t leftover; /* Extra bytes at end of buffer */ size_t ret_value = 0; /* Return value */ @@ -165,7 +165,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -201,7 +201,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ @@ -229,7 +229,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -265,7 +265,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index a61a52def37..cde186224cd 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -1033,7 +1033,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size #if CHAR_MIN >= 0 else if (array_type == H5T_NATIVE_SCHAR) H5Z_XFORM_DO_OP5(signed char, array_size) -#else /* CHAR_MIN >= 0 */ +#else /* CHAR_MIN >= 0 */ else if (array_type == H5T_NATIVE_UCHAR) H5Z_XFORM_DO_OP5(unsigned char, array_size) #endif /* CHAR_MIN >= 0 */ diff --git a/src/H5detect.c b/src/H5detect.c index e851d799d52..6ea347f1989 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -1142,7 +1142,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index 617d1f5da1b..2afa531c693 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -144,7 +144,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5private.h b/src/H5private.h index 3b290ee24ad..eba2a189c0b 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -473,11 +473,11 @@ typedef unsigned char uint8_t; #if H5_SIZEOF_INT16_T >= 2 #elif H5_SIZEOF_SHORT >= 2 -typedef short int16_t; +typedef short int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 2 -typedef int int16_t; +typedef int int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_INT #else @@ -499,11 +499,11 @@ typedef unsigned uint16_t; #if H5_SIZEOF_INT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short int32_t; +typedef short int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef int int32_t; +typedef int int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 @@ -675,7 +675,7 @@ typedef struct { #endif /* HDabs */ #ifndef HDaccept #define HDaccept(A, B, C) accept((A), (B), (C)) /* mirror VFD */ -#endif /* HDaccept */ +#endif /* HDaccept */ #ifndef HDaccess #define HDaccess(F, M) access(F, M) #endif /* HDaccess */ @@ -697,7 +697,7 @@ typedef struct { #endif /* HDasin */ #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ -#endif /* HDasprintf */ +#endif /* HDasprintf */ #ifndef HDassert #define HDassert(X) assert(X) #endif /* HDassert */ @@ -724,7 +724,7 @@ typedef struct { #endif /* HDatol */ #ifndef HDbind #define HDbind(A, B, C) bind((A), (B), (C)) /* mirror VFD */ -#endif /* HDbind */ +#endif /* HDbind */ #ifndef HDbsearch #define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F) #endif /* HDbsearch */ @@ -772,7 +772,7 @@ typedef struct { #endif /* HDclosedir */ #ifndef HDconnect #define HDconnect(A, B, C) connect((A), (B), (C)) /* mirror VFD */ -#endif /* HDconnect */ +#endif /* HDconnect */ #ifndef HDcos #define HDcos(X) cos(X) #endif /* HDcos */ @@ -1019,7 +1019,7 @@ typedef off_t h5_stat_size_t; #endif /* HDgetgroups */ #ifndef HDgethostbyaddr #define HDgethostbyaddr(A, B, C) gethostbyaddr((A), (B), (C)) /* mirror VFD */ -#endif /* HDgethostbyaddr */ +#endif /* HDgethostbyaddr */ #ifndef HDgethostname #define HDgethostname(N, L) gethostname(N, L) #endif /* HDgethostname */ @@ -1061,55 +1061,55 @@ typedef off_t h5_stat_size_t; #endif /* HDgmtime */ #ifndef HDhtonl #define HDhtonl(X) htonl((X)) /* mirror VFD */ -#endif /* HDhtonl */ +#endif /* HDhtonl */ #ifndef HDhtons #define HDhtons(X) htons((X)) /* mirror VFD */ -#endif /* HDhtons */ +#endif /* HDhtons */ #ifndef HDinet_addr #define HDinet_addr(C) inet_addr((C)) /* mirror VFD */ -#endif /* HDinet_addr */ +#endif /* HDinet_addr */ #ifndef HDinet_ntoa #define HDinet_ntoa(C) inet_ntoa((C)) /* mirror VFD */ -#endif /* HDinet_ntoa */ +#endif /* HDinet_ntoa */ #ifndef HDisalnum #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalnum */ +#endif /* HDisalnum */ #ifndef HDisalpha #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalpha */ +#endif /* HDisalpha */ #ifndef HDisatty #define HDisatty(F) isatty(F) #endif /* HDisatty */ #ifndef HDiscntrl #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#endif /* HDiscntrl */ +#endif /* HDiscntrl */ #ifndef HDisdigit #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisdigit */ +#endif /* HDisdigit */ #ifndef HDisgraph #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#endif /* HDisgraph */ +#endif /* HDisgraph */ #ifndef HDislower #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#endif /* HDislower */ +#endif /* HDislower */ #ifndef HDisnan #define HDisnan(X) isnan(X) #endif /* HDisnan */ #ifndef HDisprint #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#endif /* HDisprint */ +#endif /* HDisprint */ #ifndef HDispunct #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#endif /* HDispunct */ +#endif /* HDispunct */ #ifndef HDisspace #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#endif /* HDisspace */ +#endif /* HDisspace */ #ifndef HDisupper #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ -#endif /* HDisupper */ +#endif /* HDisupper */ #ifndef HDisxdigit #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisxdigit */ +#endif /* HDisxdigit */ #ifndef HDkill #define HDkill(P, S) kill(P, S) #endif /* HDkill */ @@ -1127,7 +1127,7 @@ typedef off_t h5_stat_size_t; #endif /* HDlink */ #ifndef HDlisten #define HDlisten(A, B) listen((A), (B)) /* mirror VFD */ -#endif /* HDlisten */ +#endif /* HDlisten */ #ifndef HDllround #define HDllround(V) llround(V) #endif /* HDround */ @@ -1211,10 +1211,10 @@ typedef off_t h5_stat_size_t; #endif /* HDnanosleep */ #ifndef HDntohl #define HDntohl(A) ntohl((A)) /* mirror VFD */ -#endif /* HDntohl */ +#endif /* HDntohl */ #ifndef HDntohs #define HDntohs(A) ntohs((A)) /* mirror VFD */ -#endif /* HDntohs */ +#endif /* HDntohs */ #ifndef HDopen #define HDopen(F, ...) open(F, __VA_ARGS__) #endif /* HDopen */ @@ -1286,7 +1286,7 @@ H5_DLL void HDsrand(unsigned int seed); #ifndef HDsrandom #define HDsrandom(S) srandom(S) #endif /* HDsrandom */ -#else /* H5_HAVE_RANDOM */ +#else /* H5_HAVE_RANDOM */ #ifndef HDrand #define HDrand() rand() #endif /* HDrand */ @@ -1364,7 +1364,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetsid */ #ifndef HDsetsockopt #define HDsetsockopt(A, B, C, D, E) setsockopt((A), (B), (C), (D), (E)) /* mirror VFD */ -#endif /* HDsetsockopt */ +#endif /* HDsetsockopt */ #ifndef HDsetuid #define HDsetuid(U) setuid(U) #endif /* HDsetuid */ @@ -1373,7 +1373,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetvbuf */ #ifndef HDshutdown #define HDshutdown(A, B) shutdown((A), (B)) /* mirror VFD */ -#endif /* HDshutdown */ +#endif /* HDshutdown */ #ifndef HDsigaction #define HDsigaction(S, A, O) sigaction((S), (A), (O)) #endif /* HDsigaction */ @@ -1421,13 +1421,13 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsleep */ #ifndef HDsnprintf #define HDsnprintf snprintf /*varargs*/ -#endif /* HDsnprintf */ +#endif /* HDsnprintf */ #ifndef HDsocket #define HDsocket(A, B, C) socket((A), (B), (C)) /* mirror VFD */ -#endif /* HDsocket */ +#endif /* HDsocket */ #ifndef HDsprintf #define HDsprintf sprintf /*varargs*/ -#endif /* HDsprintf */ +#endif /* HDsprintf */ #ifndef HDsqrt #define HDsqrt(X) sqrt(X) #endif /* HDsqrt */ @@ -1644,7 +1644,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); * define these in terms of macros. */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); +extern char *strdup(const char *s); #endif #ifndef HDstrdup @@ -1928,7 +1928,7 @@ extern char H5libhdf5_settings[]; /* embedded library information */ #define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) /*void*/ #define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) /*void*/ #define H5TRACE_RETURN(V) /*void*/ -#endif /* H5_DEBUG_API */ +#endif /* H5_DEBUG_API */ H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...); @@ -2058,10 +2058,10 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ #define H5_PUSH_FUNC H5CS_push(FUNC); #define H5_POP_FUNC H5CS_pop(); -#else /* H5_HAVE_CODESTACK */ +#else /* H5_HAVE_CODESTACK */ #define H5_PUSH_FUNC /* void */ #define H5_POP_FUNC /* void */ -#endif /* H5_HAVE_CODESTACK */ +#endif /* H5_HAVE_CODESTACK */ #ifdef H5_HAVE_MPE extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ @@ -2114,7 +2114,7 @@ H5_DLL herr_t H5CX_pop(void); func_check = TRUE; \ } /* end if */ \ } /* end scope */ -#else /* NDEBUG */ +#else /* NDEBUG */ #define FUNC_ENTER_CHECK_NAME(asrt) #endif /* NDEBUG */ diff --git a/src/H5public.h b/src/H5public.h index 3d07181d23a..728346b6d02 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -92,11 +92,11 @@ extern "C" { #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 10 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 8 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "1" /* For pre-releases like snap0 */ - /* Empty string for real releases. */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MINOR 10 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 8 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_SUBRELEASE "1" /* For pre-releases like snap0 */ +/* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.10.8-1" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE) @@ -230,15 +230,15 @@ typedef unsigned long long haddr_t; */ #if H5_SIZEOF_UINT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short uint32_t; +typedef short uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef unsigned int uint32_t; +typedef unsigned int uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 -typedef unsigned long uint32_t; +typedef unsigned long uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG #else @@ -250,15 +250,15 @@ typedef unsigned long uint32_t; */ #if H5_SIZEOF_INT64_T >= 8 #elif H5_SIZEOF_INT >= 8 -typedef int int64_t; +typedef int int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef long int64_t; +typedef long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG >= 8 -typedef long long int64_t; +typedef long long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG #else @@ -270,11 +270,11 @@ typedef long long int64_t; */ #if H5_SIZEOF_UINT64_T >= 8 #elif H5_SIZEOF_INT >= 8 -typedef unsigned uint64_t; +typedef unsigned uint64_t; #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef unsigned long uint64_t; +typedef unsigned long uint64_t; #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG >= 8 diff --git a/src/H5system.c b/src/H5system.c index 1ebd47df0df..402fe16aab0 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -698,7 +698,7 @@ H5_make_time(struct tm *tm) * VS 2015 is removed, with _get_timezone replacing it. */ long timezone = 0; -#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ +#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ time_t ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5timer.c b/src/H5timer.c index 1df2d8de330..ea21b12fa43 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -163,7 +163,7 @@ H5_now(void) HDgettimeofday(&now_tv, NULL); now = now_tv.tv_sec; } -#else /* H5_HAVE_GETTIMEOFDAY */ +#else /* H5_HAVE_GETTIMEOFDAY */ now = HDtime(NULL); #endif /* H5_HAVE_GETTIMEOFDAY */ @@ -201,8 +201,8 @@ H5_now_usec(void) HDgettimeofday(&now_tv, NULL); now = (uint64_t)(now_tv.tv_sec * (1000 * 1000)) + (uint64_t)now_tv.tv_usec; } -#else /* H5_HAVE_GETTIMEOFDAY */ - now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); +#else /* H5_HAVE_GETTIMEOFDAY */ + now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); #endif /* H5_HAVE_GETTIMEOFDAY */ return (now); diff --git a/src/H5win32defs.h b/src/H5win32defs.h index ebffd7e2d1f..944fc8297ac 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -192,7 +192,7 @@ H5_DLL float Wroundf(float arg); #define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDflock(F, L) Wflock(F, L) #define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ +#define HDsnprintf c99_snprintf /*varargs*/ #define HDvsnprintf c99_vsnprintf /*varargs*/ /* Non-POSIX functions */ diff --git a/test/accum.c b/test/accum.c index 572f8552db5..176ee53d80b 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2091,8 +2091,8 @@ test_swmr_write_big(hbool_t newest_format) uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ #ifdef H5_HAVE_UNISTD_H - pid_t pid; /* Process ID */ -#endif /* H5_HAVE_UNISTD_H */ + pid_t pid; /* Process ID */ +#endif /* H5_HAVE_UNISTD_H */ int status; /* Status returned from child process */ char * new_argv[] = {NULL}; char * driver = NULL; /* VFD string (from env variable) */ diff --git a/test/btree2.c b/test/btree2.c index b7d9dc639ab..cc49b761b83 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -2690,7 +2690,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, record = 2862; /* Record to left of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 3137; /* Record to right of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR @@ -2871,7 +2871,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, cons record = 3049; /* Record to left of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 2822; /* Record to right of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR diff --git a/test/cache.c b/test/cache.c index fb01aab3e2f..71dff5fabaf 100644 --- a/test/cache.c +++ b/test/cache.c @@ -4449,7 +4449,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", @@ -4637,7 +4637,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This is useful debugging code. Leave it in for now. */ HDfprintf(stdout, "check_flush_cache__pe_multi_entry_test: test %d\n", @@ -33871,7 +33871,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr) pass = FALSE; failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test()."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ if (pass) reset_entries(); @@ -35232,7 +35232,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) /* protect and unprotect each entry once. Note @@ -35306,7 +35306,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) { /* protect and unprotect an entry that is not currently diff --git a/test/cache_common.h b/test/cache_common.h index 0b000339166..ee6feb46b23 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -391,7 +391,7 @@ typedef struct test_entry_t { unsigned flush_dep_npar; /* Number of flush dependency parents */ unsigned flush_dep_nchd; /* Number of flush dependency children */ unsigned - flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ + flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ hbool_t pinned_from_client; /* entry was pinned by client call */ hbool_t pinned_from_cache; /* entry was pinned by cache internally */ unsigned flush_order; /* Order that entry was flushed in */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 3235e598d4f..16782c28d9a 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -442,7 +442,7 @@ check_file_creation_tags(hid_t fcpl_id, int type) hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose test outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t sbe_tag = 0; @@ -538,9 +538,9 @@ check_file_open_tags(hid_t fcpl, int type) hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ - haddr_t root_tag; /* Root Group Tag */ - haddr_t sbe_tag; /* Sblock Extension Tag */ +#endif /* NDEBUG */ /* end debugging functions */ + haddr_t root_tag; /* Root Group Tag */ + haddr_t sbe_tag; /* Sblock Extension Tag */ /* Testing Macro */ TESTING("tag application during file open"); @@ -659,8 +659,8 @@ check_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */ haddr_t g_tag; /* Group Tag */ @@ -774,8 +774,8 @@ check_multi_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ char gname[16]; /* group name buffer */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access prop list */ @@ -924,8 +924,8 @@ check_link_iteration_tags(void) hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ int i = 0; /* iterator */ haddr_t root_tag = 0; /* Root Group Tag Value */ char dsetname[500]; /* Name of dataset */ @@ -1058,8 +1058,8 @@ check_dense_attribute_tags(void) hid_t did = -1; /* Group Identifier */ hid_t dcpl = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access property list */ haddr_t d_tag = 0; /* Dataset tag value */ @@ -1286,7 +1286,7 @@ check_group_open_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -1408,8 +1408,8 @@ check_attribute_creation_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; /* Root group tag */ haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ @@ -1567,7 +1567,7 @@ check_attribute_open_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ @@ -1726,7 +1726,7 @@ check_attribute_rename_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -1942,7 +1942,7 @@ check_attribute_delete_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -2121,8 +2121,8 @@ check_dataset_creation_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2273,8 +2273,8 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2431,8 +2431,8 @@ check_dataset_open_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2575,8 +2575,8 @@ check_dataset_write_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2735,7 +2735,7 @@ check_attribute_write_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -2912,8 +2912,8 @@ check_dataset_read_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3066,8 +3066,8 @@ check_dataset_size_retrieval(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3222,8 +3222,8 @@ check_dataset_extend_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3377,7 +3377,7 @@ check_object_info_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; H5O_info_t oinfo; /* Object info struct */ @@ -3501,7 +3501,7 @@ check_object_copy_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; haddr_t copy_tag; @@ -3642,8 +3642,8 @@ check_link_removal_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3823,8 +3823,8 @@ check_link_getname_tags(void) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3993,7 +3993,7 @@ check_external_link_creation_tags(void) hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; /* Testing Macro */ @@ -4112,7 +4112,7 @@ check_external_link_open_tags(void) hid_t xid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t root2_tag = 0; @@ -4269,7 +4269,7 @@ check_invalid_tag_application(void) haddr_t addr; H5HL_t *lheap = NULL; hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ -#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ +#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ /* Testing Macro */ TESTING("failure on invalid tag application"); diff --git a/test/cross_read.c b/test/cross_read.c index 22c6828c33d..74557527301 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -275,7 +275,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME16, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -283,7 +283,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME17, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -291,7 +291,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME18, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ @@ -299,7 +299,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME19, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ diff --git a/test/dsets.c b/test/dsets.c index 0094a0ff03b..e4edca0ef19 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -193,15 +193,15 @@ const char *FILENAME[] = {"dataset", /* 0 */ #define DATA_NOT_CORRUPTED 0 /* Parameters for the "set local" test */ -#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ +#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ #define BOGUS2_PARAM_1 13 /* (No particular meaning, just for checking value) */ #define BOGUS2_PARAM_2 35 /* (No particular meaning, just for checking value) */ -#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ +#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ /* Dimensionality for conversion buffer test */ -#define DIM1 100 /* Dim. Size of data member # 1 */ +#define DIM1 100 /* Dim. Size of data member # 1 */ #define DIM2 5000 /* Dim. Size of data member # 2 */ -#define DIM3 10 /* Dim. Size of data member # 3 */ +#define DIM3 10 /* Dim. Size of data member # 3 */ /* Parameters for internal filter test */ #define FILTER_CHUNK_DIM1 2 @@ -2412,7 +2412,7 @@ test_get_filter_info(void) if (((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_HAVE_FILTER_SZIP */ /* Verify that get_filter_info throws an error when given a bad filter */ @@ -2454,7 +2454,7 @@ test_filters(hid_t file, hid_t #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP hsize_t szip_size; /* Size of dataset with szip filter */ @@ -2466,7 +2466,7 @@ test_filters(hid_t file, hid_t #if defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) hsize_t combo_size; /* Size of dataset with multiple filters */ -#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ +#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ /* test the H5Zget_filter_info function */ if (test_get_filter_info() < 0) @@ -2569,7 +2569,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("deflate filter"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2611,7 +2611,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("szip filter"); SKIPPED(); HDputs(" Szip filter not enabled"); @@ -2686,7 +2686,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("shuffle+deflate+fletcher32 filters"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2764,7 +2764,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("shuffle+szip+fletcher32 filters"); SKIPPED(); HDputs(" szip filter not enabled"); @@ -2820,7 +2820,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Can't unregister deflate filter\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Verify deflate filter is not registered currently */ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) { @@ -3006,7 +3006,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Deflate filter not available\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Pop API context */ @@ -6251,7 +6251,7 @@ test_can_apply_szip(hid_t const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */ const hsize_t chunk_dims2[2] = {2, 1}; /* Chunk dimensions */ herr_t ret; /* Status value */ -#endif /* H5_HAVE_FILTER_SZIP */ +#endif /* H5_HAVE_FILTER_SZIP */ TESTING("dataset szip filter 'can apply' callback"); @@ -6403,7 +6403,7 @@ test_can_apply_szip(hid_t SKIPPED(); HDputs(" Szip encoding is not enabled."); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SKIPPED(); HDputs(" Szip filter is not enabled."); #endif /* H5_HAVE_FILTER_SZIP */ @@ -10662,7 +10662,7 @@ test_fixed_array(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ @@ -11081,7 +11081,7 @@ test_fixed_array(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ @@ -11173,7 +11173,7 @@ test_single_chunk(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ size_t n, i; /* local index variables */ herr_t ret; /* Generic return value */ @@ -11385,7 +11385,7 @@ test_single_chunk(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 466554c9a46..e5253268e4b 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5165,7 +5165,7 @@ run_int_fp_conv(const char *name) #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ @@ -5177,7 +5177,7 @@ run_int_fp_conv(const char *name) #endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ diff --git a/test/dtypes.c b/test/dtypes.c index 2023d454bd2..e9d76eb3fca 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6486,7 +6486,7 @@ test_int_float_except(void) hid_t dxpl; /* Dataset transfer property list */ except_info_t e; /* Exception information */ unsigned u; /* Local index variables */ -#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ TESTING("exceptions for int <-> float conversions"); @@ -6602,7 +6602,7 @@ test_int_float_except(void) TEST_ERROR PASSED(); -#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ SKIPPED(); HDputs(" Test skipped due to int or float not 4 bytes."); #endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ diff --git a/test/earray.c b/test/earray.c index 76ac80ce9df..ec5985d27bd 100644 --- a/test/earray.c +++ b/test/earray.c @@ -366,7 +366,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n", earray_stats.stored.data_blk_size, state->data_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ if (earray_stats.stored.nsuper_blks != state->nsuper_blks) { HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n", @@ -379,7 +379,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n", earray_stats.stored.super_blk_size, state->super_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ /* All tests passed */ @@ -745,7 +745,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); puts(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/error_test.c b/test/error_test.c index bcb2ec4b274..02380dfd5d1 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -132,7 +132,7 @@ test_error(hid_t file) #ifdef H5_USE_16_API if (old_func != (H5E_auto_t)H5Eprint) TEST_ERROR; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ if (old_func != (H5E_auto2_t)H5Eprint2) TEST_ERROR; #endif /* H5_USE_16_API */ diff --git a/test/farray.c b/test/farray.c index 896126c277a..e76ac0858b6 100644 --- a/test/farray.c +++ b/test/farray.c @@ -480,7 +480,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); puts(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/fheap.c b/test/fheap.c index 6bcfd14842e..e2d23304f99 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -9422,8 +9422,8 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9554,7 +9554,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9700,8 +9700,8 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9863,7 +9863,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10019,7 +10019,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10476,7 +10476,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10629,7 +10629,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10786,7 +10786,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10950,7 +10950,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11118,7 +11118,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11281,7 +11281,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11464,7 +11464,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11684,7 +11684,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11884,7 +11884,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -12415,7 +12415,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -13850,7 +13850,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam if (NULL == (fh = H5HF_open(f, fh_addr))) FAIL_STACK_ERROR #endif /* QAK */ - /* QAK */ + /* QAK */ /* Check up on heap... */ state.huge_size = obj_size; @@ -14947,8 +14947,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ size_t obj_size; /* Size of object */ size_t robj_size; /* Size of object read */ @@ -15120,8 +15120,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for object #1 */ unsigned char heap_id2[HEAP_ID_LEN]; /* Heap ID for object #2 */ size_t obj_size; /* Size of object */ diff --git a/test/filter_plugin.c b/test/filter_plugin.c index b807218b45d..6dbd922ab5a 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -463,7 +463,7 @@ test_dataset_write_with_filters(hid_t fid) /* Clean up objects used for this test */ if (H5Pclose(dcpl_id) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -649,7 +649,7 @@ test_dataset_read_with_filters(hid_t fid) if (H5Dclose(did) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c index ca635a1003e..641beac25b8 100644 --- a/test/gen_bad_ohdr.c +++ b/test/gen_bad_ohdr.c @@ -112,7 +112,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BAD_MESG_COUNT */ +#else /* H5O_ENABLE_BAD_MESG_COUNT */ HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!"); #endif /* H5O_ENABLE_BAD_MESG_COUNT */ return 1; diff --git a/test/gen_bogus.c b/test/gen_bogus.c index b21adeb4c7a..ad858983bd1 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -179,7 +179,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ HDputs("H5O_ENABLE_BOGUS compiler macro not defined!"); #endif /* H5O_ENABLE_BOGUS */ return 1; diff --git a/test/gen_cross.c b/test/gen_cross.c index 37c6dcf3410..d53970b5400 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -925,7 +925,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if (H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; puts(not_supported); @@ -1328,7 +1328,7 @@ main(void) /* Create a dataset of FLOAT with szip filter */ if (create_szip_dsets_float(file, filespace, memspace) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ HDputs("Szip filter is not enabled. Can't create the dataset."); #endif /* H5_HAVE_FILTER_SZIP */ diff --git a/test/links.c b/test/links.c index 96a84a022a5..146c59e8078 100644 --- a/test/links.c +++ b/test/links.c @@ -4830,8 +4830,8 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format) base_driver == H5FD_MPIO || base_driver == H5FD_CORE) ? H5P_DEFAULT : fapl; - op_data.fam_size = ELINK_CB_FAM_SIZE; - op_data.code = 0; + op_data.fam_size = ELINK_CB_FAM_SIZE; + op_data.code = 0; /* Create family fapl */ if ((fam_fapl = H5Pcopy(fapl)) < 0) @@ -7346,7 +7346,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) char * tmpname = NULL; char * cwdpath = NULL; hbool_t have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */ -#endif /* H5_HAVE_SYMLINK */ +#endif /* H5_HAVE_SYMLINK */ if (new_format) TESTING("external links w/symlink files (w/new group format)") @@ -7600,7 +7600,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) return FAIL; -#else /* H5_HAVE_SYMLINK */ +#else /* H5_HAVE_SYMLINK */ SKIPPED(); HDputs(" Current file system or operating system doesn't support symbolic links"); @@ -14146,8 +14146,8 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -14255,7 +14255,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ @@ -14630,8 +14630,8 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -14739,7 +14739,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ diff --git a/test/mount.c b/test/mount.c index cc8e5b125ba..74ea151c705 100644 --- a/test/mount.c +++ b/test/mount.c @@ -1167,7 +1167,7 @@ test_interlink(hid_t fapl) FAIL_STACK_ERROR if (H5Tclose(type) < 0) FAIL_STACK_ERROR -#else /* NOT_NOW */ +#else /* NOT_NOW */ SKIPPED(); HDputs(" Test skipped due file pointer sharing issue (Jira 7638)."); #endif /* NOT_NOW */ diff --git a/test/objcopy.c b/test/objcopy.c index b34b6dfd2e5..e104c5f244b 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -4456,7 +4456,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -4881,7 +4881,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -7228,7 +7228,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) { for (j = 0; j < DIM_SIZE_2; j++) { diff --git a/test/s3comms.c b/test/s3comms.c index 73d59a49bc8..47721b5a4da 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -1278,7 +1278,7 @@ test_HMAC_SHA256(void) HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest); TEST_ERROR; } -#else /* VERBOSE not defined */ +#else /* VERBOSE not defined */ /* simple pass/fail test */ JSVERIFY(0, strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL); diff --git a/test/set_extent.c b/test/set_extent.c index 5726076a8d9..82469559696 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -243,11 +243,11 @@ do_ranks(hid_t fapl, hbool_t new_format) #ifdef H5_HAVE_FILTER_DEFLATE if (H5Pset_deflate(dcpl, 9) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ if (H5Pclose(dcpl) < 0) TEST_ERROR continue; -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ } /* end if */ if (config & CONFIG_FILL) { diff --git a/test/stab.c b/test/stab.c index f0f8247e8f3..81939773dbd 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1271,7 +1271,7 @@ old_api(hid_t fapl) TEST_ERROR PASSED(); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ fapl = fapl; diff --git a/test/swmr.c b/test/swmr.c index 9398e6a86c8..2da8d30ed13 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -2350,7 +2350,7 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSE return 0; } /* test_start_swmr_write_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) @@ -6509,7 +6509,7 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSED new_for return 0; } /* test_refresh_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_refresh_concur(hid_t in_fapl, hbool_t new_format) diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 931da947ff7..9e7c0502e59 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -96,7 +96,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp #ifdef FILLVAL_WORKS symbol_t fillval; /* Dataset fill value */ #endif /* FILLVAL_WORKS */ - unsigned u, v; /* Local index variable */ + unsigned u, v; /* Local index variable */ HDassert(filename); HDassert(index_type); diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 9017793e4d4..1700ece3b72 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -122,7 +122,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor * not work with SWMR currently (see note in swmr_generator.c), we * simply initialize rec_id to 0. */ record->rec_id = (uint64_t)ULLONG_MAX - 1; -#else /* FILLVAL_WORKS */ +#else /* FILLVAL_WORKS */ record->rec_id = (uint64_t)0; #endif /* FILLVAL_WORKS */ if (H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0) diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 4706b7ae1b9..a253de53c2e 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -149,8 +149,8 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f symbol_t record; /* The record to add to the dataset */ unsigned long rec_to_flush; /* # of records left to write before flush */ #ifdef OUT - volatile int dummy; /* Dummy varialbe for busy sleep */ -#endif /* OUT */ + volatile int dummy; /* Dummy varialbe for busy sleep */ +#endif /* OUT */ hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ diff --git a/test/tattr.c b/test/tattr.c index 510ff815c4b..25e730b29de 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5425,10 +5425,10 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) #ifdef LATER h5_stat_size_t empty_size; /* Size of empty file */ h5_stat_size_t file_size; /* Size of file after operating on it */ -#endif /* LATER */ - unsigned curr_dset; /* Current dataset to work on */ - unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ +#endif /* LATER */ + unsigned curr_dset; /* Current dataset to work on */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n")); @@ -5591,7 +5591,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) CHECK(file_size, FAIL, "h5_get_file_size"); VERIFY(file_size, empty_size, "h5_get_file_size"); #endif /* LATER */ - } /* end for */ + } /* end for */ /* Close property list */ ret = H5Pclose(dcpl); @@ -6648,8 +6648,8 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx unsigned v; /* Local index variable */ hsize_t skip; /* # of attributes to skip on object */ #ifndef H5_NO_DEPRECATED_SYMBOLS - unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ int old_nerrs; /* Number of errors when entering this check */ herr_t ret; /* Generic return value */ @@ -6841,7 +6841,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx nvisit++; VERIFY(skip, (max_attrs / 2), "H5Aiterate1"); - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over attributes on object, stopping in the middle */ diff --git a/test/tfile.c b/test/tfile.c index e595dd7a711..dfbd3a5918a 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -7541,7 +7541,7 @@ test_file(void) test_min_dset_ohdr(); /* Test datset object header minimization */ #ifndef H5_NO_DEPRECATED_SYMBOLS test_deprec(); /* Test deprecated routines */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ ret = H5Pclose(fapl_id); CHECK(ret, FAIL, "H5Pclose"); diff --git a/test/th5s.c b/test/th5s.c index 1d5d5f83f81..71455f262c5 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -102,8 +102,8 @@ struct space4_struct { #define CONFIG_8 1 #define CONFIG_16 2 #define CONFIG_32 3 -#define POWER8 256 /* 2^8 */ -#define POWER16 65536 /* 2^16 */ +#define POWER8 256 /* 2^8 */ +#define POWER16 65536 /* 2^16 */ #define POWER32 4294967296 /* 2^32 */ /**************************************************************** diff --git a/test/thread_id.c b/test/thread_id.c index ce608936f43..2b87505d187 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -314,7 +314,7 @@ main(void) return failed ? EXIT_FAILURE : EXIT_SUCCESS; } -#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ +#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ int main(void) { diff --git a/test/tmisc.c b/test/tmisc.c index fdb49ec77a2..3eaa029a982 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1254,9 +1254,9 @@ test_misc8(void) int * wdata; /* Data to write */ int * tdata; /* Temporary pointer to data write */ #ifdef VERIFY_DATA - int *rdata; /* Data to read */ - int *tdata2; /* Temporary pointer to data to read */ -#endif /* VERIFY_DATA */ + int *rdata; /* Data to read */ + int *tdata2; /* Temporary pointer to data to read */ +#endif /* VERIFY_DATA */ unsigned u, v; /* Local index variables */ int mdc_nelmts; /* Metadata number of elements */ size_t rdcc_nelmts; /* Raw data number of elements */ @@ -1578,7 +1578,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1612,7 +1612,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1677,7 +1677,7 @@ test_misc8(void) if (storage_size >= (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -4995,7 +4995,7 @@ test_misc27(void) H5E_BEGIN_TRY { gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); } H5E_END_TRY; VERIFY(gid, FAIL, "H5Gopen2"); -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ /* Open group with incorrect # of object header messages */ gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); CHECK(gid, FAIL, "H5Gopen2"); @@ -5312,7 +5312,7 @@ test_misc31(void) hid_t group_id; /* Group id */ hid_t dtype_id; /* Datatype id */ herr_t ret; /* Generic return value */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being performed */ MESSAGE(5, ("Deprecated routines initialize after H5close()\n")); @@ -5387,7 +5387,7 @@ test_misc31(void) ret = H5Tclose(dtype_id); CHECK(ret, FAIL, "H5Tclose"); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being skipped */ MESSAGE(5, (" ...Skipped")); #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -5436,7 +5436,7 @@ test_misc32(void) CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ buffer = H5allocate_memory(0, TRUE); CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* RESIZE */ @@ -5455,7 +5455,7 @@ test_misc32(void) #ifdef NDEBUG resized = H5resize_memory(NULL, 0); CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end test_misc32() */ @@ -5613,7 +5613,7 @@ test_misc35(void) CHECK(arr_size_start, 0, "H5get_free_list_sizes"); CHECK(blk_size_start, 0, "H5get_free_list_sizes"); CHECK(fac_size_start, 0, "H5get_free_list_sizes"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(reg_size_start, 0, "H5get_free_list_sizes"); VERIFY(arr_size_start, 0, "H5get_free_list_sizes"); @@ -5652,7 +5652,7 @@ test_misc35(void) CHECK(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats"); VERIFY(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats"); @@ -5697,10 +5697,10 @@ test_misc(void) test_misc19(); /* Test incrementing & decrementing ref count on IDs */ test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */ #ifdef H5_HAVE_FILTER_SZIP - test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked - datasets w/a filters */ - test_misc22(); /* check szip bits per pixel */ -#endif /* H5_HAVE_FILTER_SZIP */ + test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked + datasets w/a filters */ + test_misc22(); /* check szip bits per pixel */ +#endif /* H5_HAVE_FILTER_SZIP */ test_misc23(); /* Test intermediate group creation */ test_misc24(); /* Test inappropriate API opens of objects */ test_misc25a(); /* Exercise null object header message merge bug */ diff --git a/test/tsohm.c b/test/tsohm.c index c484a7932f5..5bf9d34978a 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -819,7 +819,7 @@ test_sohm_size1(void) hsize_t oh_sizes[3]; unsigned oh_size_index = 0; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ hsize_t norm_oh_size; #endif /* Jira HDFFV-10646 */ hsize_t sohm_oh_size; @@ -922,7 +922,7 @@ test_sohm_size1(void) norm_empty_filesize = file_sizes[0]; norm_final_filesize = file_sizes[1]; norm_final_filesize2 = file_sizes[2]; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ norm_oh_size = oh_sizes[0]; #endif /* Jira HDFFV-10646 */ @@ -941,7 +941,7 @@ test_sohm_size1(void) */ VERIFY(sohm_btree_oh_size, sohm_oh_size, "H5Oget_info_by_name"); -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ /* Object headers in SOHM files should be smaller than normal object * headers. */ @@ -992,7 +992,7 @@ test_sohm_size1(void) * *--------------------------------------------------------------------------- */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ static void test_sohm_size_consistency_open_create(void) { @@ -3821,12 +3821,12 @@ test_sohm(void) { MESSAGE(5, ("Testing Shared Object Header Messages\n")); - test_sohm_fcpl(); /* Test SOHMs and file creation plists */ - test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ - test_sohm_size1(); /* Tests the sizes of files with one SOHM */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ + test_sohm_fcpl(); /* Test SOHMs and file creation plists */ + test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ + test_sohm_size1(); /* Tests the sizes of files with one SOHM */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ test_sohm_size_consistency_open_create(); -#endif /* Jira HDFFV-10645 */ +#endif /* Jira HDFFV-10645 */ test_sohm_attrs(); /* Tests shared messages in attributes */ test_sohm_size2(0); /* Tests the sizes of files with multiple SOHMs */ test_sohm_size2(1); /* Tests the sizes of files with multiple diff --git a/test/ttsafe.c b/test/ttsafe.c index d2085b9b4e8..a86081a8e4b 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -60,7 +60,7 @@ tts_is_threadsafe(void) #ifdef H5_HAVE_THREADSAFE is_ts = FALSE; should_be = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ is_ts = TRUE; should_be = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index 1f0e3d4202b..a12ea31ae0a 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -33,9 +33,9 @@ const char *progname_g = "use_disable_mdc_flushes"; /* program name */ /* these two definitions must match each other */ #define UC_DATATYPE H5T_NATIVE_SHORT /* use case HDF5 data type */ -#define UC_CTYPE short /* use case C data type */ -#define UC_RANK 3 /* use case dataset rank */ -#define Chunksize_DFT 256 /* chunksize default */ +#define UC_CTYPE short /* use case C data type */ +#define UC_RANK 3 /* use case dataset rank */ +#define Chunksize_DFT 256 /* chunksize default */ #define Hgoto_error(val) \ { \ ret_value = val; \ diff --git a/test/vds.c b/test/vds.c index 5bbb4fecd9e..83b86bb3d87 100644 --- a/test/vds.c +++ b/test/vds.c @@ -907,7 +907,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR ex_dcpl = -1; -#else /* VDS_POINT_SELECTIONS */ +#else /* VDS_POINT_SELECTIONS */ /* * Test 3: Verify point selections fail diff --git a/test/vfd.c b/test/vfd.c index 373a57ed1e0..a3bab1d2cec 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -617,7 +617,7 @@ test_direct(void) #ifndef H5_HAVE_DIRECT SKIPPED(); return 0; -#else /*H5_HAVE_DIRECT*/ +#else /*H5_HAVE_DIRECT*/ /* Set property list and file name for Direct driver. Set memory alignment boundary * and file block size to 512 which is the minimum for Linux 2.6. */ @@ -2185,7 +2185,7 @@ test_ros3(void) #ifndef H5_HAVE_ROS3_VFD SKIPPED(); return 0; -#else /* H5_HAVE_ROS3_VFD */ +#else /* H5_HAVE_ROS3_VFD */ /* Set property list and file name for ROS3 driver. */ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) diff --git a/testpar/t_cache.c b/testpar/t_cache.c index c967b956e52..a1f3aac5014 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -2460,7 +2460,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, FUNC); } -#if 0 /* This has been useful debugging code -- keep it for now. */ +#if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { HDfprintf(stdout, @@ -6874,7 +6874,7 @@ main(int argc, char **argv) H5open(); express_test = do_express_test(); -#if 0 /* JRM */ +#if 0 /* JRM */ express_test = 0; #endif /* JRM */ if (express_test) { diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 7ac0adfa94b..ee0db3480fb 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -24,7 +24,7 @@ static int mpi_size, mpi_rank; #define DSET_NAME "ExtendibleArray" #define CHUNK_SIZE 1000 /* #elements per chunk */ -#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ +#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ #define CLOSE 1 #define NO_CLOSE 0 diff --git a/testpar/t_dset.c b/testpar/t_dset.c index b89073227df..4d80759a14c 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -3984,9 +3984,9 @@ no_collective_cause_tests(void) test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT); test_no_collective_cause_mode(TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL); #ifdef LATER /* fletcher32 */ - /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and - * H5Dwrite is ready for mpio + filter feature. - */ + /* TODO: use this instead of below TEST_FILTERS_READ when H5Dcreate and + * H5Dwrite is ready for mpio + filter feature. + */ /* test_no_collective_cause_mode (TEST_FILTERS); */ test_no_collective_cause_mode_filter(TEST_FILTERS_READ); #endif /* LATER */ diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 706e90ce383..5f4b53f0827 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -344,7 +344,7 @@ test_filter_read(void) VRFY(hrc >= 0, "H5Pclose"); } #endif /* H5_HAVE_FILTER_SZIP */ - } /* end for */ + } /* end for */ /*---------------------------------------------------------- * STEP 4: Test shuffling by itself. diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index baaa152a4b6..f3cbed09012 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -162,9 +162,9 @@ test_mpio_overlap_writes(char *filename) return (nerrs); } -#define MB 1048576 /* 1024*1024 == 2**20 */ -#define GB 1073741824 /* 1024**3 == 2**30 */ -#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ +#define MB 1048576 /* 1024*1024 == 2**20 */ +#define GB 1073741824 /* 1024**3 == 2**30 */ +#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ #define FOUR_GB_LESS1 4294967295L /* 2**32 - 1 */ /* * Verify that MPI_Offset exceeding 2**31 can be computed correctly. diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 00dd9ac717b..be3393201cd 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -583,7 +583,7 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) { #if HS_DR_PIO_TEST__TAKEDOWN__DEBUG const char *fcnName = "hs_dr_pio_test__takedown()"; -#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ +#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ int mpi_rank; /* needed by the VRFY macro */ herr_t ret; /* Generic return value */ @@ -3694,7 +3694,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i { #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__run_test()"; -#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ +#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ int mpi_rank; /* needed by VRFY */ struct hs_dr_pio_test_vars_t test_vars = { /* int mpi_size = */ -1, diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index a821e6ffbb2..d1d0d9dbe50 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -37,10 +37,10 @@ enum H5TEST_COLL_CHUNK_API { #endif /* Constants definitions */ -#define DIM0 600 /* Default dataset sizes. */ +#define DIM0 600 /* Default dataset sizes. */ #define DIM1 1200 /* Values are from a monitor pixel sizes */ -#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ -#define COL_FACTOR 16 /* Nominal column factor for dataset size */ +#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ +#define COL_FACTOR 16 /* Nominal column factor for dataset size */ #define RANK 2 #define DATASETNAME1 "Data1" #define DATASETNAME2 "Data2" @@ -94,73 +94,73 @@ enum H5TEST_COLL_CHUNK_API { /*Constants for MPI derived data type generated from span tree */ -#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ +#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ -#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ #define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 -#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ #define FHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ -#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ -#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ -#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ -#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ +#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ +#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ +#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ +#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ -#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ -#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ -#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ +#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ #define SHBLOCK1 768 /* Block of the second dimension of the first hyperslab selection*/ -#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ -#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ +#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ #define MHCOUNT0 6912 /* Count of the first dimension of the first hyperslab selection*/ -#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ -#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ -#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ +#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ +#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ -#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ -#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ #define NPOINTS \ 4 /* Number of points that will be selected \ diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 09cea041916..6d3e19bf445 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -665,7 +665,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj1fullname, "/%s", objname1) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj1fullname = (char *)HDmalloc(HDstrlen(objname1) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -684,7 +684,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj2fullname, "/%s", objname2) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj2fullname = (char *)HDmalloc(HDstrlen(objname2) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1143,7 +1143,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj1_fullpath = (char *)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1161,7 +1161,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj2_fullpath = (char *)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1357,7 +1357,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end else */ } /* end if */ } /* end else */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (obj1_fullpath) HDfree(obj1_fullpath); if (obj2_fullpath) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 3fcff169efc..211c548d5bb 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1057,7 +1057,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co } nfound += diff_ldouble_element(mem1, mem2, elemtno, opts); } /*H5T_NATIVE_LDOUBLE*/ -#endif /* H5_SIZEOF_LONG_DOUBLE */ +#endif /* H5_SIZEOF_LONG_DOUBLE */ break; /* H5T_FLOAT class */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index b33015726dd..761a7046717 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -932,7 +932,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong); } } /* end if (sizeof(long long) == nsize) */ -#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ +#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ break; case H5T_COMPOUND: @@ -1197,7 +1197,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai for (x = 0; x < ctx->indent_level + 1; x++) h5tools_str_append(str, "%s", OPT(info->line_indent, "")); } /* end if */ -#endif /* LATER */ +#endif /* LATER */ ctx->indent_level++; diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index b4198ad7a50..9392ca33c49 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -83,7 +83,7 @@ typedef struct { dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0}; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 6ccd15951f1..56734cf8207 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -80,7 +80,7 @@ typedef struct { } dump_opt_t; extern dump_opt_t dump_opts; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX 8 * sizeof(long long) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ extern unsigned long long diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 09a89be6ba0..dddac79ec34 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -273,8 +273,8 @@ typedef struct s1_t { /* File 65 macros */ #define STRATEGY H5F_FSPACE_STRATEGY_NONE /* File space handling strategy */ -#define THRESHOLD10 10 /* Free-space section threshold */ -#define FSPACE_PAGE_SIZE 8192 /* File space page size */ +#define THRESHOLD10 10 /* Free-space section threshold */ +#define FSPACE_PAGE_SIZE 8192 /* File space page size */ /* "FILE66" macros and for FILE69, FILE87 */ #define F66_XDIM 8 diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 6d467e1ddf2..461b7fd34f1 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -464,7 +464,7 @@ parse_args(int argc, char **argv) * End: */ -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLEL is not configured in */ int main(int H5_ATTR_UNUSED argc, char H5_ATTR_UNUSED **argv) diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index 0e0ac262b25..9fb9800f5f9 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -224,14 +224,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -458,7 +458,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); +extern char *strdup(const char *s); #endif #define HDstrdup(S) strdup(S) diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index 02ec6c6b00f..03acf4074fd 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -239,14 +239,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -473,7 +473,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); +extern char *strdup(const char *s); #endif #define HDstrdup(S) strdup(S) From 55d35651d8ca43b8782602d5c971b1af39be538e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 28 Jan 2021 14:13:06 -0600 Subject: [PATCH 04/66] Undo version 11 clang format changes --- .clang-format | 31 ++++++- .github/workflows/clang-format-check.yml | 2 +- .github/workflows/main.yml | 86 ++++++++++++++++++- .github/workflows/pr-check.yml | 87 ++++++++++++++++++- c++/test/tfilter.cpp | 2 +- c++/test/th5s.cpp | 2 +- examples/ph5example.c | 2 +- fortran/src/H5Pf.c | 2 +- hl/tools/gif2h5/gifread.c | 2 +- hl/tools/gif2h5/hdfgifwr.c | 2 +- src/H5.c | 4 +- src/H5AC.c | 18 ++-- src/H5ACmpio.c | 8 +- src/H5ACproxy_entry.c | 8 +- src/H5Adense.c | 2 +- src/H5Aint.c | 2 +- src/H5Aprivate.h | 8 +- src/H5B2.c | 4 +- src/H5B2cache.c | 12 +-- src/H5C.c | 56 ++++++------- src/H5CX.c | 28 +++---- src/H5Cdbg.c | 6 +- src/H5Cimage.c | 16 ++-- src/H5Dchunk.c | 6 +- src/H5Defl.c | 6 +- src/H5Dint.c | 8 +- src/H5Dmpio.c | 4 +- src/H5Dpkg.h | 6 +- src/H5Dvirtual.c | 8 +- src/H5E.c | 14 ++-- src/H5EAcache.c | 20 ++--- src/H5EAtest.c | 4 +- src/H5Eint.c | 24 +++--- src/H5Epkg.h | 4 +- src/H5FAcache.c | 12 +-- src/H5FAtest.c | 6 +- src/H5FDcore.c | 14 ++-- src/H5FDdirect.c | 4 +- src/H5FDlog.c | 16 ++-- src/H5FDmirror.c | 4 +- src/H5FDmpio.c | 4 +- src/H5FDsec2.c | 8 +- src/H5FDspace.c | 2 +- src/H5FDsplitter.c | 2 +- src/H5FDstdio.c | 12 +-- src/H5FS.c | 4 +- src/H5FScache.c | 16 ++-- src/H5Fint.c | 14 ++-- src/H5Fprivate.h | 60 ++++++------- src/H5Fsuper.c | 2 +- src/H5Gent.c | 2 +- src/H5Gprivate.h | 6 +- src/H5Gpublic.h | 2 +- src/H5Groot.c | 4 +- src/H5HFcache.c | 8 +- src/H5HG.c | 2 +- src/H5MF.c | 10 +-- src/H5MFsection.c | 4 +- src/H5MM.c | 26 +++--- src/H5MMprivate.h | 4 +- src/H5Ocache.c | 6 +- src/H5Odtype.c | 2 +- src/H5Oint.c | 40 ++++----- src/H5Opkg.h | 4 +- src/H5Oprivate.h | 20 ++--- src/H5Oshared.h | 10 +-- src/H5PLpath.c | 2 +- src/H5Pdcpl.c | 2 +- src/H5Pfapl.c | 2 +- src/H5Ppkg.h | 2 +- src/H5SM.c | 4 +- src/H5Shyper.c | 6 +- src/H5Spkg.h | 12 +-- src/H5TS.c | 10 +-- src/H5Tpkg.h | 2 +- src/H5Tprivate.h | 2 +- src/H5VM.c | 2 +- src/H5Z.c | 14 ++-- src/H5Znbit.c | 12 +-- src/H5Zpublic.h | 18 ++-- src/H5Zscaleoffset.c | 18 ++-- src/H5Zshuffle.c | 12 +-- src/H5Ztrans.c | 2 +- src/H5detect.c | 2 +- src/H5make_libsettings.c | 2 +- src/H5private.h | 76 ++++++++--------- src/H5public.h | 22 ++--- src/H5system.c | 2 +- src/H5timer.c | 6 +- src/H5win32defs.h | 2 +- test/accum.c | 4 +- test/btree2.c | 4 +- test/cache.c | 10 +-- test/cache_common.h | 2 +- test/cache_tagging.c | 84 +++++++++---------- test/cross_read.c | 8 +- test/dsets.c | 38 ++++----- test/dt_arith.c | 4 +- test/dtypes.c | 4 +- test/earray.c | 6 +- test/error_test.c | 2 +- test/farray.c | 2 +- test/fheap.c | 42 +++++----- test/filter_plugin.c | 4 +- test/gen_bad_ohdr.c | 2 +- test/gen_bogus.c | 2 +- test/gen_cross.c | 4 +- test/links.c | 20 ++--- test/mount.c | 2 +- test/objcopy.c | 6 +- test/s3comms.c | 2 +- test/set_extent.c | 4 +- test/stab.c | 2 +- test/swmr.c | 4 +- test/swmr_generator.c | 2 +- test/swmr_remove_reader.c | 2 +- test/swmr_sparse_writer.c | 4 +- test/tattr.c | 16 ++-- test/tfile.c | 2 +- test/th5s.c | 4 +- test/thread_id.c | 2 +- test/tmisc.c | 34 ++++---- test/tsohm.c | 18 ++-- test/ttsafe.c | 2 +- test/use_disable_mdc_flushes.c | 6 +- test/vds.c | 2 +- test/vfd.c | 4 +- testpar/t_cache.c | 4 +- testpar/t_chunk_alloc.c | 2 +- testpar/t_filter_read.c | 2 +- testpar/t_mpi.c | 6 +- testpar/t_shapesame.c | 4 +- testpar/testphdf5.h | 102 +++++++++++------------ tools/lib/h5diff.c | 10 +-- tools/lib/h5diff_array.c | 2 +- tools/lib/h5tools_str.c | 4 +- tools/src/h5dump/h5dump.h | 2 +- tools/src/h5dump/h5dump_extern.h | 2 +- tools/test/h5dump/h5dumpgentest.c | 4 +- tools/test/perform/perf.c | 2 +- tools/test/perform/pio_standalone.h | 18 ++-- tools/test/perform/sio_standalone.h | 18 ++-- 142 files changed, 893 insertions(+), 707 deletions(-) diff --git a/.clang-format b/.clang-format index 4779a35a99b..34b75631571 100644 --- a/.clang-format +++ b/.clang-format @@ -1,14 +1,33 @@ --- Language: Cpp BasedOnStyle: LLVM -AlignConsecutiveMacros: true AlignConsecutiveAssignments: true +#llvm11: AlignConsecutiveBitFields: false AlignConsecutiveDeclarations: true +AlignConsecutiveMacros: true +#llvm10-11: AlignOperands: true - Align +#llvm11: AllowShortEnumsOnASingleLine: true AlwaysBreakAfterReturnType: AllDefinitions +# Can enable the following section when llvm 12.x is out +#AttributeMacros: +# - H5_ATTR_FORMAT +# - H5_ATTR_UNUSED +# - H5_ATTR_DEPRECATED_USED +# - H5_ATTR_NDEBUG_UNUSED +# - H5_ATTR_DEBUG_API_USED +# - H5_ATTR_PARALLEL_UNUSED +# - H5_ATTR_PARALLEL_USED +# - H5_ATTR_NORETURN +# - H5_ATTR_CONST +# - H5_ATTR_PURE +# - H5_ATTR_FALLTHROUGH BraceWrapping: AfterFunction: true + #llvm10-11: AfterControlStatement: false - Never BeforeCatch: true BeforeElse: true + #llvm11: BeforeLambdaBody: false + #llvm11: BeforeWhile: false BreakBeforeBraces: Stroustrup BreakAfterJavaFieldAnnotations: true BreakStringLiterals: true @@ -31,11 +50,15 @@ IncludeCategories: SortPriority: 0 IncludeIsMainRegex: '(public)?$' IndentCaseLabels: true +#llvm11: IndentCaseBlocks: false IndentGotoLabels: false +#llvm11: IndentExternBlock: AfterExternBlock IndentWidth: 4 +#llvm11: InsertTrailingCommas: None MacroBlockBegin: "^BEGIN_FUNC" MacroBlockEnd: "^END_FUNC" ObjCBlockIndentWidth: 4 +#llvm11: ObjCBreakBeforeNestedBlockParam: true ReflowComments: true SortIncludes: false StatementMacros: @@ -61,5 +84,11 @@ StatementMacros: - H5_GCC_DIAG_OFF - H5_GCC_DIAG_ON - CATCH +#llvm10: TypenameMacros: +#llvm10: - STACK_OF +#llvm10: - LIST +#llvm11: WhitespaceSensitiveMacros: +#llvm11: - STRINGIZE +#llvm11: - PP_STRINGIZE ... diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 6bf522ca2e0..230a34160d5 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run clang-format style check for C programs. - uses: DoozyX/clang-format-lint-action@v0.10 + uses: DoozyX/clang-format-lint-action@v0.11 with: source: '.' extensions: 'c,h,cpp,hpp' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c891bacb308..4d0d3bbdd4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,14 +17,19 @@ jobs: strategy: # fail-fast: false matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"] + name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] include: - name: "Windows Latest MSVC" artifact: "Windows-MSVC.tar.xz" os: windows-latest build_type: "Release" toolchain: "" + cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON + parallel: OFF generator: "-G \"Visual Studio 16 2019\" -A x64" - name: "Ubuntu Latest GCC" artifact: "Linux.tar.xz" @@ -32,6 +37,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" @@ -41,6 +49,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" @@ -50,15 +61,82 @@ jobs: build_type: "Debug" cpp: ON fortran: OFF + java: OFF + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" - artifact: "Linux.tar.xz" + artifact: "LinuxA.tar.xz" os: ubuntu-latest build_type: "Release" cpp: enable fortran: enable + java: enable + ts: disable + hl: enable + parallel: disable + toolchain: "" + generator: "autogen" +# Threadsafe runs + - name: "Windows TS MSVC" + artifact: "Windows-MSVCTS.tar.xz" + os: windows-latest + build_type: "Release" + toolchain: "" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + generator: "-G \"Visual Studio 16 2019\" -A x64" + - name: "Ubuntu TS GCC" + artifact: "LinuxTS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "macOS TS Clang" + artifact: "macOSTS.tar.xz" + os: macos-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/clang.cmake" + generator: "-G Ninja" + - name: "TS Debug GCC" + artifact: "LinuxTSDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "TS Autotools GCC" + artifact: "LinuxATS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: disable + fortran: disable + java: disable + ts: enable + hl: disable parallel: disable toolchain: "" generator: "autogen" @@ -109,7 +187,7 @@ jobs: sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java shell: bash - name: Configure @@ -117,7 +195,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE shell: bash - name: Autotools Build diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 47feb7ad7d1..8c3bb2c0bec 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -12,14 +12,19 @@ jobs: strategy: # fail-fast: false matrix: - name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"] + name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC", "Windows TS MSVC", "Ubuntu TS GCC", "TS Debug GCC", "macOS TS Clang", "TS Autotools GCC"] include: - name: "Windows Latest MSVC" artifact: "Windows-MSVC.tar.xz" os: windows-latest build_type: "Release" toolchain: "" + cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON + parallel: OFF generator: "-G \"Visual Studio 16 2019\" -A x64" - name: "Ubuntu Latest GCC" artifact: "Linux.tar.xz" @@ -27,6 +32,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" @@ -36,6 +44,9 @@ jobs: build_type: "Release" cpp: ON fortran: OFF + java: ON + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" @@ -45,15 +56,82 @@ jobs: build_type: "Debug" cpp: ON fortran: OFF + java: OFF + ts: OFF + hl: ON parallel: OFF toolchain: "config/toolchain/GCC.cmake" generator: "-G Ninja" - name: "Ubuntu Autotools GCC" - artifact: "Linux.tar.xz" + artifact: "LinuxA.tar.xz" os: ubuntu-latest build_type: "Release" cpp: enable fortran: enable + java: enable + ts: disable + hl: enable + parallel: disable + toolchain: "" + generator: "autogen" +# Threadsafe runs + - name: "Windows TS MSVC" + artifact: "Windows-MSVCTS.tar.xz" + os: windows-latest + build_type: "Release" + toolchain: "" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + generator: "-G \"Visual Studio 16 2019\" -A x64" + - name: "Ubuntu TS GCC" + artifact: "LinuxTS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "macOS TS Clang" + artifact: "macOSTS.tar.xz" + os: macos-latest + build_type: "Release" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/clang.cmake" + generator: "-G Ninja" + - name: "TS Debug GCC" + artifact: "LinuxTSDBG.tar.xz" + os: ubuntu-latest + build_type: "Debug" + cpp: OFF + fortran: OFF + java: OFF + ts: ON + hl: OFF + parallel: OFF + toolchain: "config/toolchain/GCC.cmake" + generator: "-G Ninja" + - name: "TS Autotools GCC" + artifact: "LinuxATS.tar.xz" + os: ubuntu-latest + build_type: "Release" + cpp: disable + fortran: disable + java: disable + ts: enable + hl: disable parallel: disable toolchain: "" generator: "autogen" @@ -70,6 +148,7 @@ jobs: name: ${{ matrix.name }} # The type of runner that the job will run on runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'skip-ci')" # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -103,7 +182,7 @@ jobs: sh ./bin/chkmanifest mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java + $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.ts }}-threadsafe --${{ matrix.hl }}-hl --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java shell: bash - name: Configure @@ -111,7 +190,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE + cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} -DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} $GITHUB_WORKSPACE shell: bash - name: Autotools Build diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp index e583c3bbeeb..e7788e53472 100644 --- a/c++/test/tfilter.cpp +++ b/c++/test/tfilter.cpp @@ -222,7 +222,7 @@ test_szip_filter(H5File &file1) SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SUBTEST("szip filter"); SKIPPED(); H5std_string fname = file1.getFileName(); diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 4cce6246092..8709c25f731 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -33,7 +33,7 @@ using namespace H5; #include "h5test.h" #include "h5cpputil.h" // C++ utilility header file -#include "H5srcdir.h" // srcdir querying header file +#include "H5srcdir.h" // srcdir querying header file const H5std_string TESTFILE("th5s.h5"); const H5std_string DATAFILE("th5s1.h5"); diff --git a/examples/ph5example.c b/examples/ph5example.c index da777a906a4..06c89191dbd 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -1087,7 +1087,7 @@ main(int argc, char **argv) return (nerrors); } -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLE is not configured in */ int main(void) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 8de694825fe..626aeb6c6cb 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -513,7 +513,7 @@ h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int *freelist = (int_f)c_freelist; *stab = (int_f)c_stab; *shhdr = (int_f)c_shhdr; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ] */ diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index a4210c3132a..705e6f3965f 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -354,7 +354,7 @@ ReadDataSubBlocks(GIFBYTE **MemGif2, /* GIF image file input FILE stream #ifdef COMMENTED_OUT *ptr1++ = dataSize; /* Write the data count */ #endif /* COMMENTED_OUT */ - while (dataSize--) /* Read/write the Plain Text data */ + while (dataSize--) /* Read/write the Plain Text data */ *ptr1++ = *(*MemGif2)++; /* Check if there is another data sub-block */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 63e92a5842a..7be68dcebd1 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -73,7 +73,7 @@ static unsigned long cur_accum = 0; static int cur_bits = 0; #define MAXCODE(n_bits) ((1 << (n_bits)) - 1) -#define XV_BITS 12 /* BITS was already defined on some systems */ +#define XV_BITS 12 /* BITS was already defined on some systems */ #define HSIZE 5003 /* 80% occupancy */ typedef unsigned char char_type; diff --git a/src/H5.c b/src/H5.c index 7820335c836..b96e7fd3c6e 100644 --- a/src/H5.c +++ b/src/H5.c @@ -360,7 +360,7 @@ H5_term_library(void) HDfprintf(stderr, " %s\n", loop); #ifndef NDEBUG HDabort(); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -1072,7 +1072,7 @@ H5is_library_threadsafe(hbool_t *is_ts) /* At this time, it is impossible for this to fail. */ #ifdef H5_HAVE_THREADSAFE *is_ts = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ *is_ts = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/src/H5AC.c b/src/H5AC.c index 1b002af80a9..a1ea6c1be39 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -374,7 +374,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co H5C_create(H5AC__DEFAULT_MAX_CACHE_SIZE, H5AC__DEFAULT_MIN_CLEAN_SIZE, (H5AC_NTYPES - 1), H5AC_class_s, H5AC__check_if_write_permitted, TRUE, NULL, NULL); #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ if (NULL == f->shared->cache) @@ -432,7 +432,7 @@ H5AC_create(const H5F_t *f, H5AC_cache_config_t *config_ptr, H5AC_cache_image_co aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ FUNC_LEAVE_NOAPI(ret_value) } /* H5AC_create() */ @@ -466,7 +466,7 @@ H5AC_dest(H5F_t *f) hbool_t curr_logging; /* TRUE if currently logging */ #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -585,7 +585,7 @@ H5AC_dest(H5F_t *f) aux_ptr->magic = 0; aux_ptr = H5FL_FREE(H5AC_aux_t, aux_ptr); - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1143,7 +1143,7 @@ H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t ne { #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1453,7 +1453,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *udata, unsi #ifdef H5_HAVE_PARALLEL HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG | H5C__FLUSH_COLLECTIVELY_FLAG)))); -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ HDassert(0 == (flags & (unsigned)(~(H5C__READ_ONLY_FLAG | H5C__FLUSH_LAST_FLAG)))); #endif /* H5_HAVE_PARALLEL */ @@ -1670,7 +1670,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un hbool_t deleted; #ifdef H5_HAVE_PARALLEL H5AC_aux_t *aux_ptr = NULL; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1713,7 +1713,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing, un if (deleted && aux_ptr->mpi_rank == 0) if (H5AC__log_deleted_entry((H5AC_info_t *)thing) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "H5AC__log_deleted_entry() failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ if (H5C_unprotect(f, addr, thing, flags) < 0) @@ -2176,7 +2176,7 @@ H5AC__check_if_write_permitted(const H5F_t write_permitted = aux_ptr->write_permitted; else write_permitted = FALSE; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ *write_permitted_ptr = write_permitted; diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 1d2444149b0..a806b351565 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -760,7 +760,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end if */ /* the entry is dirty. If it exists on the cleaned entries list, @@ -776,7 +776,7 @@ H5AC__log_dirtied_entry(const H5AC_info_t *entry_ptr) aux_ptr->unprotect_dirty_bytes += entry_ptr->size; aux_ptr->unprotect_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1090,7 +1090,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) #if H5AC_DEBUG_DIRTY_BYTES_CREATION aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; -#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ +#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ } /* end else */ /* insert / reinsert the entry in the dirty slist */ @@ -1104,7 +1104,7 @@ H5AC__log_moved_entry(const H5F_t *f, haddr_t old_addr, haddr_t new_addr) aux_ptr->move_dirty_bytes += entry_size; aux_ptr->move_dirty_bytes_updates += 1; #endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */ - } /* end else-if */ + } /* end else-if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5ACproxy_entry.c b/src/H5ACproxy_entry.c index 4426189ebec..76e885f09ac 100644 --- a/src/H5ACproxy_entry.c +++ b/src/H5ACproxy_entry.c @@ -521,7 +521,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -529,7 +529,7 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) case H5AC_NOTIFY_ACTION_AFTER_FLUSH: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Invalid action?!?"); #endif /* NDEBUG */ break; @@ -605,10 +605,10 @@ H5AC__proxy_entry_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "unknown notify action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Adense.c b/src/H5Adense.c index 4924b456068..81e97496697 100644 --- a/src/H5Adense.c +++ b/src/H5Adense.c @@ -1103,7 +1103,7 @@ H5A__dense_iterate_bt2_cb(const void *_record, void *_bt2_udata) HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Release the space allocated for the attribute */ diff --git a/src/H5Aint.c b/src/H5Aint.c index 572459bd6d0..0a3926b2747 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -1792,7 +1792,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l HDassert("unknown attribute op type" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_ATTR, H5E_UNSUPPORTED, FAIL, "unsupported attribute op type") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /* Increment the number of entries passed through */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index e637052e11f..4132f86b66e 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -43,8 +43,8 @@ typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data); /* Describe kind of callback to make for each attribute */ typedef enum H5A_attr_iter_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_ATTR_OP_APP, /* Application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_ATTR_OP_APP, /* Application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_ATTR_OP_APP2, /* Revised application callback */ H5A_ATTR_OP_LIB /* Library internal callback */ } H5A_attr_iter_op_type_t; @@ -53,8 +53,8 @@ typedef struct H5A_attr_iter_op_t { H5A_attr_iter_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_operator1_t app_op; /* Application callback for each attribute */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5A_operator1_t app_op; /* Application callback for each attribute */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5A_operator2_t app_op2; /* Revised application callback for each attribute */ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */ } u; diff --git a/src/H5B2.c b/src/H5B2.c index ecf95cbcd74..2b889dc32dd 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -1313,9 +1313,9 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data) */ #ifdef OLD_WAY HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, FAIL, "key not found in leaf node") -#else /* OLD_WAY */ +#else /* OLD_WAY */ HGOTO_DONE(FAIL) -#endif /* OLD_WAY */ +#endif /* OLD_WAY */ } /* end if */ else { /* Make callback for current record */ diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 106542e7aab..ce910850aa8 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -486,9 +486,9 @@ H5B2__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -904,9 +904,9 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -1283,9 +1283,9 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else diff --git a/src/H5C.c b/src/H5C.c index 509b8ebbd83..527374d8581 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -573,7 +573,7 @@ void H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, #ifndef NDEBUG int32_t version, -#else /* NDEBUG */ +#else /* NDEBUG */ int32_t H5_ATTR_UNUSED version, #endif /* NDEBUG */ double hit_rate, enum H5C_resize_status status, size_t old_max_cache_size, @@ -803,7 +803,7 @@ H5C_prep_for_file_close(H5F_t *f) */ if (H5C__serialize_cache(f) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "serialization of the cache failed") - } /* end if */ + } /* end if */ #endif /* H5_HAVE_PARALLEL */ done: @@ -1309,7 +1309,7 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t set_flush_marker; hbool_t write_permitted = TRUE; size_t empty_space; @@ -2090,7 +2090,7 @@ H5C_resize_entry(void *thing, size_t new_size) H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr->coll_list_len), (cache_ptr->coll_list_size), (entry_ptr->size), (new_size)) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* update statistics just before changing the entry size */ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size); @@ -2225,7 +2225,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign hbool_t flush_last; #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ hbool_t write_permitted; hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ size_t empty_space; @@ -2345,7 +2345,7 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign H5C__MOVE_TO_TOP_IN_COLL_LIST(cache_ptr, entry_ptr, NULL) } /* end else-if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ #if H5C_DO_TAGGING_SANITY_CHECKS { @@ -3356,7 +3356,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) if (!dirtied) clear_entry = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (!entry_ptr->is_protected) @@ -3535,7 +3535,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Can't clear entry") } /* end else if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) @@ -3896,7 +3896,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) for (u = 0; u < child_entry->flush_dep_nparents; u++) HDassert(child_entry->flush_dep_parent[u] != parent_entry); } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* More sanity checks */ if (child_entry == parent_entry) @@ -5809,7 +5809,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e HDassert(cache_ptr->slist_size == (size_t)((ssize_t)initial_slist_size + cache_ptr->slist_size_increase)); } /* end if */ -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ /* Since we are doing a destroy, we must make a pass through * the hash table and try to flush - destroy all entries that @@ -6308,7 +6308,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e HDassert(cache_ptr->slist_ring_size[ring] == 0); } /* end if */ -#endif /* H5C_DO_SANITY_CHECKS */ +#endif /* H5C_DO_SANITY_CHECKS */ done: @@ -6749,7 +6749,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e H5C__REMOVE_FROM_COLL_LIST(cache_ptr, entry_ptr, FAIL) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache_ptr, entry_ptr, FAIL) @@ -7116,8 +7116,8 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e int mpi_rank = 0; /* MPI process rank */ MPI_Comm comm = MPI_COMM_NULL; /* File MPI Communicator */ int mpi_code; /* MPI error code */ -#endif /* H5_HAVE_PARALLEL */ - void *ret_value = NULL; /* Return value */ +#endif /* H5_HAVE_PARALLEL */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -7164,7 +7164,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e if ((comm = H5F_mpi_get_comm(f)) == MPI_COMM_NULL) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "get_comm request failed") } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Get the on-disk entry image */ if (0 == (type->flags & H5C__CLASS_SKIP_READS)) { @@ -7193,7 +7193,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e image = (uint8_t *)new_image; #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); -#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ } /* end if */ #ifdef H5_HAVE_PARALLEL @@ -7214,7 +7214,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e if (MPI_SUCCESS != (mpi_code = MPI_Bcast(image, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* If the entry could be read speculatively and the length is still * changing, check for updating the actual size @@ -7262,9 +7262,9 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e (mpi_code = MPI_Bcast(image + len, buf_size, MPI_BYTE, 0, comm))) HMPI_GOTO_ERROR(NULL, "MPI_Bcast failed", mpi_code) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end if */ - } /* end if (actual_len != len) */ +#endif /* H5_HAVE_PARALLEL */ + } /* end if */ + } /* end if (actual_len != len) */ else { /* The length has stabilized */ len_changed = FALSE; @@ -8093,7 +8093,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e return (in_slist); - } /* H5C_entry_in_skip_list() */ + } /* H5C_entry_in_skip_list() */ #endif /* H5C_DO_SLIST_SANITY_CHECKS */ /*------------------------------------------------------------------------- @@ -8485,7 +8485,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry); FUNC_LEAVE_NOAPI_VOID - } /* H5C__assert_flush_dep_nocycle() */ + } /* H5C__assert_flush_dep_nocycle() */ #endif /* NDEBUG */ /*------------------------------------------------------------------------- @@ -8599,7 +8599,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* set cache_ptr->serialization_in_progress to TRUE, and back * to FALSE at the end of the function. Must maintain this flag @@ -8665,7 +8665,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e scan_ptr = scan_ptr->il_next; } /* end while */ } /* end block */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ done: cache_ptr->serialization_in_progress = FALSE; @@ -8841,7 +8841,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -8910,7 +8910,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #ifndef NDEBUG /* Increment serialization counter (to detect multiple serializations) */ entry_ptr->serialization_count++; -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ else { @@ -8974,7 +8974,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e #if H5C_DO_MEMORY_SANITY_CHECKS H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE); -#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ +#endif /* H5C_DO_MEMORY_SANITY_CHECKS */ } /* end if */ /* Generate image for entry */ @@ -9282,7 +9282,7 @@ H5C__pin_entry_from_client(H5C_t H5_ATTR_UNUSED *cache_ptr, H5C_cache_entry_t *e entry->coll_access = FALSE; H5C__REMOVE_FROM_COLL_LIST(cache, entry, FAIL) } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ H5C__UPDATE_RP_FOR_EVICTION(cache, entry, FAIL) diff --git a/src/H5CX.c b/src/H5CX.c index c7b7850e50a..0dce4cacb5f 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -213,7 +213,7 @@ typedef struct H5CX_t { MPI_Datatype ftype; /* MPI datatype for file, when using collective I/O */ hbool_t mpi_file_flushing; /* Whether an MPI-opened file is being flushed */ hbool_t rank0_bcast; /* Whether a dataset meets read-with-rank0-and-bcast requirements */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Cached DXPL properties */ size_t max_temp_buf; /* Maximum temporary buffer size */ @@ -241,8 +241,8 @@ typedef struct H5CX_t { hbool_t mpio_chunk_opt_num_valid; /* Whether collective chunk threshold is valid */ unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ hbool_t mpio_chunk_opt_ratio_valid; /* Whether collective chunk ratio is valid */ -#endif /* H5_HAVE_PARALLEL */ - H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ +#endif /* H5_HAVE_PARALLEL */ + H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ hbool_t err_detect_valid; /* Whether error detection info is valid */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ hbool_t filter_cb_valid; /* Whether filter callback function is valid */ @@ -298,8 +298,8 @@ typedef struct H5CX_t { (H5D_XFER_COLL_CHUNK_MULTI_RATIO_IND_NAME) */ hbool_t mpio_coll_rank0_bcast_set; /* Whether instrumented "collective chunk multi ratio ind" value is set */ -#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ +#endif /* H5_HAVE_PARALLEL */ /* Cached LCPL properties */ H5T_cset_t encoding; /* Link name character encoding */ @@ -364,10 +364,10 @@ typedef struct H5CX_dxpl_cache_t { uint32_t mpio_global_no_coll_cause; /* Global reason for breaking collective I/O (H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME) */ H5FD_mpio_chunk_opt_t - mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ - unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ - unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ -#endif /* H5_HAVE_PARALLEL */ + mpio_chunk_opt_mode; /* Collective chunk option (H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME) */ + unsigned mpio_chunk_opt_num; /* Collective chunk thrreshold (H5D_XFER_MPIO_CHUNK_OPT_NUM_NAME) */ + unsigned mpio_chunk_opt_ratio; /* Collective chunk ratio (H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME) */ +#endif /* H5_HAVE_PARALLEL */ H5Z_EDC_t err_detect; /* Error detection info (H5D_XFER_EDC_NAME) */ H5Z_cb_t filter_cb; /* Filter callback function (H5D_XFER_FILTER_CB_NAME) */ H5Z_data_xform_t * data_transform; /* Data transform info (H5D_XFER_XFORM_NAME) */ @@ -431,7 +431,7 @@ hbool_t H5_PKG_INIT_VAR = FALSE; #ifndef H5_HAVE_THREADSAFE static H5CX_node_t *H5CX_head_g = NULL; /* Pointer to head of context stack */ -#endif /* H5_HAVE_THREADSAFE */ +#endif /* H5_HAVE_THREADSAFE */ /* Define a "default" dataset transfer property list cache structure to use for default DXPLs */ static H5CX_dxpl_cache_t H5CX_def_dxpl_cache; @@ -1111,8 +1111,8 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, if (H5P_USER_TRUE == md_coll_read) is_collective = TRUE; } /* end if */ -#endif /* H5_HAVE_PARALLEL */ - } /* end else */ +#endif /* H5_HAVE_PARALLEL */ + } /* end else */ #ifdef H5_HAVE_PARALLEL /* Check for collective operation */ @@ -1138,7 +1138,7 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, MPI_Barrier(mpi_comm); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1199,7 +1199,7 @@ H5CX_set_loc(hid_t done: FUNC_LEAVE_NOAPI(ret_value) -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ FUNC_ENTER_NOAPI_NOINIT_NOERR FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 31d43953e95..64450056e6c 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -434,7 +434,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, double average_entries_skipped_per_calls_to_msic = 0.0f; double average_dirty_pf_entries_skipped_per_call_to_msic = 0.0f; double average_entries_scanned_per_calls_to_msic = 0.0f; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -489,7 +489,7 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, if (aggregate_max_pins < cache_ptr->max_pins[i]) aggregate_max_pins = cache_ptr->max_pins[i]; #endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ - } /* end for */ + } /* end for */ if ((total_hits > 0) || (total_misses > 0)) hit_rate = (double)100.0f * ((double)(total_hits)) / ((double)(total_hits + total_misses)); @@ -738,7 +738,7 @@ H5C_stats__reset(H5C_t *cache_ptr) #else /* NDEBUG */ #if H5C_COLLECT_CACHE_STATS H5C_stats__reset(H5C_t *cache_ptr) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr) #endif /* H5C_COLLECT_CACHE_STATS */ #endif /* NDEBUG */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index 3631a998bac..f6c23ae7a9d 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -361,7 +361,7 @@ H5C__construct_cache_image_buffer(H5F_t *f, H5C_t *cache_ptr) fake_cache_ptr->image_entries = (H5C_image_entry_t *)H5MM_xfree(fake_cache_ptr->image_entries); fake_cache_ptr = (H5C_t *)H5MM_xfree(fake_cache_ptr); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ done: @@ -955,7 +955,7 @@ H5C_get_cache_image_config(const H5C_t *cache_ptr, H5C_cache_image_ctl_t *config herr_t #if H5C_COLLECT_CACHE_STATS H5C_image_stats(H5C_t *cache_ptr, hbool_t print_header) -#else /* H5C_COLLECT_CACHE_STATS */ +#else /* H5C_COLLECT_CACHE_STATS */ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) #endif /* H5C_COLLECT_CACHE_STATS */ { @@ -965,7 +965,7 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header) int64_t total_misses = 0; double hit_rate; double prefetch_use_rate; -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1071,7 +1071,7 @@ H5C__read_cache_image(H5F_t *f, H5C_t *cache_ptr) HMPI_GOTO_ERROR(FAIL, "can't receive cache image MPI_Bcast", mpi_result) } /* end else-if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1654,7 +1654,7 @@ H5C_set_cache_image_config(const H5F_t *f, H5C_t *cache_ptr, H5C_cache_image_ctl HDassert(!(cache_ptr->image_ctl.generate_image)); } /* end else */ #ifdef H5_HAVE_PARALLEL - } /* end else */ + } /* end else */ #endif /* H5_HAVE_PARALLEL */ done: @@ -2135,7 +2135,7 @@ H5C__destroy_pf_entry_child_flush_deps(H5C_t *cache_ptr, H5C_cache_entry_t *pf_e u++; } /* end while */ HDassert(found); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ } /* end if */ @@ -3219,7 +3219,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr) * we add code to store and restore adaptive resize status. */ HDassert(lru_rank_holes <= H5C__MAX_EPOCH_MARKERS); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ /* Check to see if the cache is oversize, and evict entries as @@ -3527,7 +3527,7 @@ H5C__write_cache_image(H5F_t *f, const H5C_t *cache_ptr) #ifdef H5_HAVE_PARALLEL } /* end if */ } /* end block */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 7b84cafec4c..c59fef4c80b 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -2424,7 +2424,7 @@ H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr, hbool_t write_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -4421,7 +4421,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ /* Check for the chunk expanding too much to encode in a 32-bit value */ if (orig_chunk_size > ((size_t)0xffffffff)) HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "chunk too large for 32-bit length") -#endif /* H5_SIZEOF_SIZE_T > 4 */ +#endif /* H5_SIZEOF_SIZE_T > 4 */ } /* end if */ } /* end if */ @@ -4623,7 +4623,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_ #ifdef H5_HAVE_PARALLEL } /* end else */ #endif /* H5_HAVE_PARALLEL */ - } /* end if */ + } /* end if */ /* Insert the chunk record into the index */ if (need_insert && ops->insert) diff --git a/src/H5Defl.c b/src/H5Defl.c index 77ea0565c04..1ab677a9a39 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -272,8 +272,8 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size tempto_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t); to_read = (size_t)tempto_read; -#else /* NDEBUG */ - to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); +#else /* NDEBUG */ + to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); #endif /* NDEBUG */ if ((n = HDread(fd, buf, to_read)) < 0) HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file") @@ -364,7 +364,7 @@ H5D__efl_write(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t siz tempto_write = MIN(efl->slot[u].size - skip, (hsize_t)size); H5_CHECK_OVERFLOW(tempto_write, hsize_t, size_t); to_write = (size_t)tempto_write; -#else /* NDEBUG */ +#else /* NDEBUG */ to_write = MIN((size_t)(efl->slot[u].size - skip), size); #endif /* NDEBUG */ if ((size_t)HDwrite(fd, buf, to_write) != to_write) diff --git a/src/H5Dint.c b/src/H5Dint.c index bad6da73ff8..542ed77f9d1 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1962,7 +1962,7 @@ H5D_close(H5D_t *dataset) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2126,7 +2126,7 @@ H5D_mult_refresh_close(hid_t dset_id) HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Destroy any cached layout information for the dataset */ @@ -2359,7 +2359,7 @@ H5D__alloc_storage(const H5D_io_info_t *io_info, H5D_time_alloc_t time_alloc, hb HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ /* Check if we need to initialize the space */ @@ -2481,7 +2481,7 @@ H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_t HDassert("not implemented yet" && 0); #ifdef NDEBUG HGOTO_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, "unsupported storage layout") -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ /*lint !e788 All appropriate cases are covered */ done: diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 11b78d0f093..068ab5860ab 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -424,7 +424,7 @@ H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space, co #ifdef H5_HAVE_INSTRUMENTED_LIBRARY H5CX_test_set_mpio_coll_rank0_bcast(TRUE); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end if */ + } /* end if */ /* Set the return value, based on the global cause */ ret_value = global_cause[0] > 0 ? FALSE : TRUE; @@ -843,7 +843,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf else temp_not_link_io = TRUE; #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ - } /* end else */ + } /* end else */ #ifdef H5_HAVE_INSTRUMENTED_LIBRARY { diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index ffbd4c9829d..0c63fab2bff 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -212,9 +212,9 @@ typedef enum H5D_io_op_type_t { typedef struct H5D_io_info_t { const H5D_t *dset; /* Pointer to dataset being operated on */ #ifdef H5_HAVE_PARALLEL - MPI_Comm comm; /* MPI communicator for file */ - hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ -#endif /* H5_HAVE_PARALLEL */ + MPI_Comm comm; /* MPI communicator for file */ + hbool_t using_mpi_vfd; /* Whether the file is using an MPI-based VFD */ +#endif /* H5_HAVE_PARALLEL */ H5D_storage_t * store; /* Dataset storage info */ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */ H5D_io_ops_t io_ops; /* I/O operation function pointers */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index fb687221986..ac840c26f42 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -832,8 +832,8 @@ herr_t H5D__virtual_delete(H5F_t *f, H5O_storage_t *storage) { #ifdef NOT_YET - int heap_rc; /* Reference count of global heap object */ -#endif /* NOT_YET */ + int heap_rc; /* Reference count of global heap object */ +#endif /* NOT_YET */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2820,8 +2820,8 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz HDassert((tot_nelmts + (hsize_t)select_nelmts) >= nelmts); } /* end block */ #endif /* NDEBUG */ - } /* end if */ - } /* end if */ + } /* end if */ + } /* end if */ done: /* Cleanup I/O operation */ diff --git a/src/H5E.c b/src/H5E.c index 2b3647f6474..2d6ae61c5df 100644 --- a/src/H5E.c +++ b/src/H5E.c @@ -306,14 +306,14 @@ H5E__set_default_auto(H5E_t *stk) #ifndef H5_NO_DEPRECATED_SYMBOLS #ifdef H5_USE_16_API_DEFAULT stk->auto_op.vers = 1; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ stk->auto_op.vers = 2; #endif /* H5_USE_16_API_DEFAULT */ stk->auto_op.func1 = stk->auto_op.func1_default = (H5E_auto1_t)H5Eprint1; stk->auto_op.func2 = stk->auto_op.func2_default = (H5E_auto2_t)H5Eprint2; stk->auto_op.is_default = TRUE; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ stk->auto_op.func2 = (H5E_auto2_t)H5Eprint2; #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -1325,9 +1325,9 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid va_list ap; /* Varargs info */ H5E_t * estack; /* Pointer to error stack to modify */ #ifndef H5_HAVE_VASPRINTF - int tmp_len; /* Current size of description buffer */ - int desc_len; /* Actual length of description when formatted */ -#endif /* H5_HAVE_VASPRINTF */ + int tmp_len; /* Current size of description buffer */ + int desc_len; /* Actual length of description when formatted */ +#endif /* H5_HAVE_VASPRINTF */ char * tmp = NULL; /* Buffer to place formatted description in */ hbool_t va_started = FALSE; /* Whether the variable argument list is open */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1360,7 +1360,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ /* Allocate space for the formatted description buffer */ tmp_len = 128; if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) @@ -1395,7 +1395,7 @@ H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid */ if (tmp) HDfree(tmp); -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ if (tmp) H5MM_xfree(tmp); #endif /* H5_HAVE_VASPRINTF */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index a41c25c183c..6316ded6d01 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -555,9 +555,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -939,10 +939,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1346,10 +1346,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -1750,10 +1750,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH @@ -2125,10 +2125,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 9a7db423ecd..0a85729064e 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -263,8 +263,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5EA__test_ctx_t *ctx = (H5EA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5Eint.c b/src/H5Eint.c index 52ac57e6124..78b28de867e 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -440,10 +440,10 @@ H5E__print(const H5E_t *estack, FILE *stream, hbool_t bk_compatible) walk_op.u.func1 = H5E__walk1_cb; if (H5E__walk(estack, H5E_WALK_DOWNWARD, &walk_op, (void *)&eprint) < 0) HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack") -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack print without deprecated symbols!"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ else { walk_op.vers = 2; walk_op.u.func2 = H5E__walk2_cb; @@ -539,10 +539,10 @@ H5E__walk(const H5E_t *estack, H5E_direction_t direction, const H5E_walk_op_t *o if (ret_value < 0) HERROR(H5E_ERROR, H5E_CANTLIST, "can't walk error stack"); } /* end if */ -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ HDassert(0 && "version 1 error stack walk without deprecated symbols!"); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + } /* end if */ else { HDassert(op->vers == 2); if (op->u.func2) { @@ -652,9 +652,9 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin { va_list ap; /* Varargs info */ #ifndef H5_HAVE_VASPRINTF - int tmp_len; /* Current size of description buffer */ - int desc_len; /* Actual length of description when formatted */ -#endif /* H5_HAVE_VASPRINTF */ + int tmp_len; /* Current size of description buffer */ + int desc_len; /* Actual length of description when formatted */ +#endif /* H5_HAVE_VASPRINTF */ char * tmp = NULL; /* Buffer to place formatted description in */ hbool_t va_started = FALSE; /* Whether the variable argument list is open */ herr_t ret_value = SUCCEED; /* Return value */ @@ -687,7 +687,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) HGOTO_DONE(FAIL) -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ /* Allocate space for the formatted description buffer */ tmp_len = 128; if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) @@ -722,7 +722,7 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin */ if (tmp) HDfree(tmp); -#else /* H5_HAVE_VASPRINTF */ +#else /* H5_HAVE_VASPRINTF */ if (tmp) H5MM_xfree(tmp); #endif /* H5_HAVE_VASPRINTF */ @@ -970,7 +970,7 @@ H5E_dump_api_stack(hbool_t is_api) #ifdef H5_NO_DEPRECATED_SYMBOLS if (estack->auto_op.func2) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ if (estack->auto_op.vers == 1) { if (estack->auto_op.func1) (void)((estack->auto_op.func1)(estack->auto_data)); @@ -980,7 +980,7 @@ H5E_dump_api_stack(hbool_t is_api) (void)((estack->auto_op.func2)(H5E_DEFAULT, estack->auto_data)); } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Epkg.h b/src/H5Epkg.h index fe5e1277633..a1db8852ab5 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -73,7 +73,7 @@ typedef struct { H5E_auto1_t func1_default; /* The saved library's default function - old style. */ H5E_auto2_t func2_default; /* The saved library's default function - new style. */ } H5E_auto_op_t; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ typedef struct { H5E_auto2_t func2; /* Only the new style callback function is available. */ } H5E_auto_op_t; @@ -85,7 +85,7 @@ typedef struct { union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5E_walk1_t func1; /* Old-style callback, NO error stack param. */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5E_walk2_t func2; /* New-style callback, with error stack param. */ } u; } H5E_walk_op_t; diff --git a/src/H5FAcache.c b/src/H5FAcache.c index b9c2f9347f0..37723996af9 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -478,9 +478,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ else @@ -862,9 +862,9 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ @@ -1205,10 +1205,10 @@ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, default: #ifdef NDEBUG H5E_THROW(H5E_BADVALUE, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ CATCH diff --git a/src/H5FAtest.c b/src/H5FAtest.c index de9e6d7d07a..4da7d6fd5d7 100644 --- a/src/H5FAtest.c +++ b/src/H5FAtest.c @@ -200,7 +200,7 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */ /* Sanity checks */ HDassert(raw); @@ -242,8 +242,8 @@ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, #ifndef NDEBUG H5FA__test_ctx_t *ctx = (H5FA__test_ctx_t *)_ctx; /* Callback context to destroy */ #endif /* NDEBUG */ - uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ - const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ + uint64_t * elmt = (uint64_t *)_elmt; /* Convenience pointer to native elements */ + const uint8_t *raw = (const uint8_t *)_raw; /* Convenience pointer to raw elements */ /* Sanity checks */ HDassert(raw); diff --git a/src/H5FDcore.c b/src/H5FDcore.c index cb65ad876eb..96b1a42889f 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -87,7 +87,7 @@ typedef struct H5FD_core_t { DWORD dwVolumeSerialNumber; HANDLE hFile; /* Native windows file handle */ -#endif /* H5_HAVE_WIN32_API */ +#endif /* H5_HAVE_WIN32_API */ hbool_t dirty; /* changes not saved? */ H5FD_file_image_callbacks_t fi_callbacks; /* file image callbacks */ H5SL_t * dirty_list; /* dirty parts of the file */ @@ -726,11 +726,11 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ - } /* end if */ + } /* end if */ /* If an existing file is opened, load the whole file into memory. */ if (!(H5F_ACC_CREAT & flags)) { @@ -972,7 +972,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -989,7 +989,7 @@ H5FD__core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(1) #endif /*H5_HAVE_WIN32_API*/ - } /* end if */ + } /* end if */ else { if (NULL == f1->name && NULL == f2->name) { if (f1 < f2) @@ -1236,7 +1236,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU temp_nbytes = file->eof - addr; H5_CHECK_OVERFLOW(temp_nbytes, hsize_t, size_t); nbytes = MIN(size, (size_t)temp_nbytes); -#else /* NDEBUG */ +#else /* NDEBUG */ nbytes = MIN(size, (size_t)(file->eof - addr)); #endif /* NDEBUG */ @@ -1508,7 +1508,7 @@ H5FD__core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 9ac71d684f1..21cefef0678 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -660,7 +660,7 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1276,7 +1276,7 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT (void)SetFilePointer((HANDLE)filehandle, li.LowPart, &li.HighPart, FILE_BEGIN); if (SetEndOfFile((HANDLE)filehandle) == 0) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 60aefa1dc8b..91037f9885f 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -570,7 +570,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -856,7 +856,7 @@ H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1174,7 +1174,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1242,7 +1242,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for read operation */ if (file->fa.flags & H5FD_LOG_TIME_READ) { @@ -1272,7 +1272,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -1388,7 +1388,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ HDoff_t offset = (HDoff_t)addr; herr_t ret_value = SUCCEED; /* Return value */ @@ -1464,7 +1464,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha HDfprintf(file->logfp, "\n"); } /* end if */ } /* end if */ -#endif /* H5_HAVE_PREADWRITE */ +#endif /* H5_HAVE_PREADWRITE */ /* Start timer for write operation */ if (file->fa.flags & H5FD_LOG_TIME_WRITE) { @@ -1640,7 +1640,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ if (0 == SetEndOfFile(file->hFile)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") } -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Truncate/extend the file */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index 9530e59ec25..3895b42ee4f 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -126,7 +126,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_XMIT_BYTES(label, buf, len) /* no-op */ -#endif /* MIRROR_DEBUG_XMIT_BYTE */ +#endif /* MIRROR_DEBUG_XMIT_BYTE */ #if MIRROR_DEBUG_OP_CALLS #define LOG_OP_CALL(name) \ @@ -136,7 +136,7 @@ typedef struct H5FD_mirror_t { } while (0) #else #define LOG_OP_CALL(name) /* no-op */ -#endif /* MIRROR_DEBUG_OP_CALLS */ +#endif /* MIRROR_DEBUG_OP_CALLS */ /* Prototypes */ static herr_t H5FD__mirror_term(void); diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 86c5e772689..53e8c226f2a 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -203,7 +203,7 @@ H5FD_mpio_init(void) { #ifdef H5FDmpio_DEBUG static int H5FD_mpio_Debug_inited = 0; -#endif /* H5FDmpio_DEBUG */ +#endif /* H5FDmpio_DEBUG */ const char *s; /* String for environment variables */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -232,7 +232,7 @@ H5FD_mpio_init(void) } /* end while */ } /* end if */ H5FD_mpio_Debug_inited++; - } /* end if */ + } /* end if */ #endif /* H5FDmpio_DEBUG */ /* Set return value */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 02323c6190b..7789d393144 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -377,7 +377,7 @@ H5FD__sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; file->inode = sb.st_ino; #endif /* H5_HAVE_WIN32_API */ @@ -507,7 +507,7 @@ H5FD__sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2) HGOTO_DONE(-1) if (f1->device > f2->device) HGOTO_DONE(1) -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -742,7 +742,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); @@ -945,7 +945,7 @@ H5FD__sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR bError = SetEndOfFile(file->hFile); if (0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDspace.c b/src/H5FDspace.c index b74eb9a25d3..611b54ac1c4 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -333,7 +333,7 @@ H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) HDfprintf(stderr, "%s: LEAKED MEMORY!!! type = %u, addr = %a, size = %Hu\n", FUNC, (unsigned)type, addr, size); #endif /* H5FD_ALLOC_DEBUG */ - } /* end else */ + } /* end else */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index e3135e84957..5ba1a273889 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -94,7 +94,7 @@ typedef struct H5FD_splitter_t { } while (0) #else #define H5FD_SPLITTER_LOG_CALL(name) /* no-op */ -#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ +#endif /* H5FD_SPLITTER_DEBUG_OP_CALLS */ /* Private functions */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index c66765a214a..4650c39982b 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -115,7 +115,7 @@ typedef struct H5FD_stdio_t { DWORD nFileIndexHigh; DWORD dwVolumeSerialNumber; - HANDLE hFile; /* Native windows file handle */ + HANDLE hFile; /* Native windows file handle */ #endif /* H5_HAVE_WIN32_API */ } H5FD_stdio_t; @@ -338,7 +338,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr static const char *func = "H5FD_stdio_open"; /* Function Name for error reporting */ #ifdef H5_HAVE_WIN32_API struct _BY_HANDLE_FILE_INFORMATION fileinfo; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ struct stat sb; #endif /* H5_HAVE_WIN32_API */ @@ -431,7 +431,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Get the file descriptor (needed for truncate and some Windows information) */ #ifdef H5_HAVE_WIN32_API file->fd = _fileno(file->fp); -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ file->fd = fileno(file->fp); #endif /* H5_HAVE_WIN32_API */ if (file->fd < 0) { @@ -458,7 +458,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr file->nFileIndexHigh = fileinfo.nFileIndexHigh; file->nFileIndexLow = fileinfo.nFileIndexLow; file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ if (fstat(file->fd, &sb) < 0) { free(file); fclose(f); @@ -549,7 +549,7 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2) return -1; if (f1->device > f2->device) return 1; -#else /* H5_DEV_T_IS_SCALAR */ +#else /* H5_DEV_T_IS_SCALAR */ /* If dev_t isn't a scalar value on this system, just use memcmp to * determine if the values are the same or not. The actual return value * shouldn't really matter... @@ -1075,7 +1075,7 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ if (0 == bError) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "unable to truncate/extend file properly", -1) -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ /* Reset seek offset to beginning of file, so that file isn't re-extended later */ rewind(file->fp); diff --git a/src/H5FS.c b/src/H5FS.c index d75711cb8d3..4a050a63a07 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -362,7 +362,7 @@ H5FS_delete(H5F_t *f, haddr_t fs_addr) #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Done expunging free space section info from cache\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG @@ -513,7 +513,7 @@ H5FS_close(H5F_t *f, H5FS_t *fspace) */ #ifdef H5FS_DEBUG HDfprintf(stderr, "%s: Section info can't 'go away', header will own it\n", FUNC); -#endif /* H5FS_DEBUG */ +#endif /* H5FS_DEBUG */ } /* end if */ else { #ifdef H5FS_DEBUG diff --git a/src/H5FScache.c b/src/H5FScache.c index 2acaa7ef2ca..c75c20e7cd7 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -797,10 +797,10 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -981,10 +981,10 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_NDEBUG_UNUSED l if (fspace->serial_sect_count > 0) { hsize_t old_tot_sect_count; /* Total section count from header */ hsize_t H5_ATTR_NDEBUG_UNUSED - old_serial_sect_count; /* Total serializable section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ - hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ - unsigned sect_cnt_size; /* The size of the section size counts */ + old_serial_sect_count; /* Total serializable section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_ghost_sect_count; /* Total ghost section count from header */ + hsize_t H5_ATTR_NDEBUG_UNUSED old_tot_space; /* Total space managed from header */ + unsigned sect_cnt_size; /* The size of the section size counts */ /* Compute the size of the section counts */ sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count); @@ -1327,9 +1327,9 @@ H5FS__cache_sinfo_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end switch */ } /* end if */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 967a1a39322..404333a82cf 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1645,10 +1645,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags) -#else /* H5_USING_MEMCHECKER */ +#else /* H5_USING_MEMCHECKER */ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) -#endif /* H5_USING_MEMCHECKER */ +#endif /* H5_USING_MEMCHECKER */ } /* end if */ H5E_clear_stack(NULL); tent_flags = flags; @@ -1659,10 +1659,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: time = %s, name = '%s', tent_flags = %x", HDctime(&mytime), name, tent_flags) -#else /* H5_USING_MEMCHECKER */ +#else /* H5_USING_MEMCHECKER */ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) -#endif /* H5_USING_MEMCHECKER */ +#endif /* H5_USING_MEMCHECKER */ } /* end if */ } /* end if */ @@ -2465,8 +2465,8 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n hid_t new_fapl_id = H5I_INVALID_HID; /* ID for duplicated FAPL */ #ifdef H5_HAVE_SYMLINK /* This has to be declared here to avoid unfreed resources on errors */ - char *realname = NULL; /* Fully resolved path name of file */ -#endif /* H5_HAVE_SYMLINK */ + char *realname = NULL; /* Fully resolved path name of file */ +#endif /* H5_HAVE_SYMLINK */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -2547,7 +2547,7 @@ H5F__build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *n HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "can't duplicate real path") } /* end if */ } /* end if */ -#endif /* H5_HAVE_SYMLINK */ +#endif /* H5_HAVE_SYMLINK */ /* Check if we've resolved the file's name */ if (NULL == *actual_name) { diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 6917ba54a42..7165482df85 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -30,8 +30,8 @@ typedef struct H5F_t H5F_t; /* Private headers needed by this file */ #include "H5MMprivate.h" /* Memory management */ #ifdef H5_HAVE_PARALLEL -#include "H5Pprivate.h" /* Property lists */ -#endif /* H5_HAVE_PARALLEL */ +#include "H5Pprivate.h" /* Property lists */ +#endif /* H5_HAVE_PARALLEL */ #include "H5VMprivate.h" /* Vectors and arrays */ /**************************/ @@ -530,33 +530,33 @@ typedef struct H5F_t H5F_t; #define H5F_DEFAULT_CSET H5T_CSET_ASCII /* ========= File Creation properties ============ */ -#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ +#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */ #define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */ #define H5F_CRT_SYM_LEAF_DEF 4 -#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ +#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */ #define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */ -#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ +#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */ #define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */ /* Number of shared object header message indexes */ #define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" #define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */ /* Minimum size of messages in each index */ #define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" -#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ -#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ -#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ -#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ +#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */ +#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */ +#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */ +#define H5F_CRT_FREE_SPACE_PERSIST_NAME "free_space_persist" /* Free-space persisting status */ #define H5F_CRT_FREE_SPACE_THRESHOLD_NAME "free_space_threshold" /* Free space section threshold */ #define H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME "file_space_page_size" /* File space page size */ /* ========= File Access properties ============ */ #define H5F_ACS_META_CACHE_INIT_CONFIG_NAME \ - "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ + "mdc_initCacheCfg" /* Initial metadata cache resize configuration */ #define H5F_ACS_DATA_CACHE_NUM_SLOTS_NAME "rdcc_nslots" /* Size of raw data chunk cache(slots) */ #define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */ -#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ -#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ -#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ +#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */ +#define H5F_ACS_ALIGN_THRHD_NAME "threshold" /* Threshold for alignment */ +#define H5F_ACS_ALIGN_NAME "align" /* Alignment */ #define H5F_ACS_META_BLOCK_SIZE_NAME \ "meta_block_size" /* Minimum metadata allocation block size (when aggregating metadata allocations) */ #define H5F_ACS_SIEVE_BUF_SIZE_NAME \ @@ -564,24 +564,24 @@ typedef struct H5F_t H5F_t; #define H5F_ACS_SDATA_BLOCK_SIZE_NAME \ "sdata_block_size" /* Minimum "small data" allocation block size (when aggregating "small" raw data \ allocations) */ -#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ -#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ -#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ +#define H5F_ACS_GARBG_COLCT_REF_NAME "gc_ref" /* Garbage-collect references */ +#define H5F_ACS_FILE_DRV_NAME "vfd_info" /* File driver ID & info */ +#define H5F_ACS_CLOSE_DEGREE_NAME "close_degree" /* File close degree */ #define H5F_ACS_FAMILY_OFFSET_NAME "family_offset" /* Offset position in file for family file driver */ #define H5F_ACS_FAMILY_NEWSIZE_NAME \ "family_newsize" /* New member size of family driver. (private property only used by h5repart) */ #define H5F_ACS_FAMILY_TO_SINGLE_NAME \ "family_to_single" /* Whether to convert family to a single-file driver. (private property only used by \ h5repart) */ -#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ -#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ +#define H5F_ACS_MULTI_TYPE_NAME "multi_type" /* Data type in multi file driver */ +#define H5F_ACS_LIBVER_LOW_BOUND_NAME "libver_low_bound" /* 'low' bound of library format versions */ #define H5F_ACS_LIBVER_HIGH_BOUND_NAME "libver_high_bound" /* 'high' bound of library format versions */ #define H5F_ACS_WANT_POSIX_FD_NAME \ "want_posix_fd" /* Internal: query the file descriptor from the core VFD, instead of the memory address \ */ #define H5F_ACS_METADATA_READ_ATTEMPTS_NAME "metadata_read_attempts" /* # of metadata read attempts */ -#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ -#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ +#define H5F_ACS_OBJECT_FLUSH_CB_NAME "object_flush_cb" /* Object flush callback */ +#define H5F_ACS_EFC_SIZE_NAME "efc_size" /* Size of external file cache */ #define H5F_ACS_FILE_IMAGE_INFO_NAME \ "file_image_info" /* struct containing initial file image and callback info */ #define H5F_ACS_CLEAR_STATUS_FLAGS_NAME \ @@ -591,7 +591,7 @@ typedef struct H5F_t H5F_t; /* Private property used only by h5clear */ #define H5F_ACS_SKIP_EOF_CHECK_NAME "skip_eof_check" /* Skip EOF check */ /* Private property used only by h5clear */ -#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ +#define H5F_ACS_USE_MDC_LOGGING_NAME "use_mdc_logging" /* Whether to use metadata cache logging */ #define H5F_ACS_MDC_LOG_LOCATION_NAME "mdc_log_location" /* Name of metadata cache log location */ #define H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME \ "start_mdc_log_on_access" /* Whether logging starts on file create/open */ @@ -637,7 +637,7 @@ typedef struct H5F_t H5F_t; 3 /* With file locking and consistency flags (at least this version for SWMR support) */ #define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_3 /* The maximum super block format */ #define HDF5_SUPERBLOCK_VERSION_V18_LATEST \ - HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ + HDF5_SUPERBLOCK_VERSION_2 /* The latest superblock version for v18 */ #define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ #define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ #define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ @@ -646,12 +646,12 @@ typedef struct H5F_t H5F_t; /* B-tree internal 'K' values */ #define HDF5_BTREE_SNODE_IK_DEF 16 #define HDF5_BTREE_CHUNK_IK_DEF \ - 32 /* Note! this value is assumed \ - to be 32 for version 0 \ - of the superblock and \ - if it is changed, the code \ - must compensate. -QAK \ - */ + 32 /* Note! this value is assumed \ + to be 32 for version 0 \ + of the superblock and \ + if it is changed, the code \ + must compensate. -QAK \ + */ #define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */ /* See format specification on version 1 B-trees */ @@ -687,7 +687,7 @@ typedef struct H5F_t H5F_t; #define H5F_PAGED_AGGR(F) (F->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && F->shared->fs_page_size) /* Metadata read attempt values */ -#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ +#define H5F_METADATA_READ_ATTEMPTS 1 /* Default # of read attempts for non-SWMR access */ #define H5F_SWMR_METADATA_READ_ATTEMPTS 100 /* Default # of read attempts for SWMR access */ /* Macros to define signatures of all objects in the file */ @@ -803,7 +803,7 @@ typedef enum H5F_mem_page_t { } H5F_mem_page_t; /* Aliases for H5F_mem_page_t enum values */ -#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ +#define H5F_MEM_PAGE_META H5F_MEM_PAGE_SUPER /* Small-sized meta data */ #define H5F_MEM_PAGE_GENERIC H5F_MEM_PAGE_LARGE_SUPER /* Large-sized generic: meta and raw */ /* Type of prefix for opening prefixed files */ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 1292bcc28a6..7d2a27d9fd5 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -337,7 +337,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) hbool_t skip_eof_check = FALSE; /* Whether to skip checking the EOF value */ #ifdef H5_HAVE_PARALLEL int mpi_size = 1; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG) diff --git a/src/H5Gent.c b/src/H5Gent.c index 4fb70ce726e..10c94994161 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -424,7 +424,7 @@ H5G__ent_convert(H5F_t *f, H5HL_t *heap, const char *name, const H5O_link_t *lnk HDassert(!stab_exists); } /* end else */ #endif /* NDEBUG */ - } /* end if */ + } /* end if */ else if (obj_type == H5O_TYPE_UNKNOWN) { /* Try to retrieve symbol table information for caching */ H5O_loc_t targ_oloc; /* Location of link target */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 893a2588a51..2f5ba1529db 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -167,8 +167,8 @@ typedef herr_t (*H5G_traverse_t)(H5G_loc_t *grp_loc /*in*/, const char *name, typedef enum H5G_link_iterate_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_LINK_OP_OLD, /* "Old" application callback */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5G_LINK_OP_NEW /* "New" application callback */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + H5G_LINK_OP_NEW /* "New" application callback */ } H5G_link_iterate_op_type_t; typedef struct { @@ -176,7 +176,7 @@ typedef struct { union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_iterate_t op_old; /* "Old" application callback for each link */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5L_iterate_t op_new; /* "New" application callback for each link */ } op_func; } H5G_link_iterate_t; diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 6db23e0643a..fd0106b7baf 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -98,7 +98,7 @@ H5_DLL herr_t H5Grefresh(hid_t group_id); /* Macros for types of objects in a group (see H5G_obj_t definition) */ #define H5G_NTYPES 256 /* Max possible number of types */ -#define H5G_NLIBTYPES 8 /* Number of internal types */ +#define H5G_NLIBTYPES 8 /* Number of internal types */ #define H5G_NUSERTYPES (H5G_NTYPES - H5G_NLIBTYPES) #define H5G_USERTYPE(X) (8 + (X)) /* User defined types */ diff --git a/src/H5Groot.c b/src/H5Groot.c index 29cb46ee50c..d7fbb49ab53 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -246,8 +246,8 @@ H5G_mkroot(H5F_t *f, hbool_t create_root) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to verify symbol table") } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ - } /* end else */ + } /* end if */ + } /* end else */ /* Cache the root group's symbol table information in the root group symbol * table entry. It will have been allocated by now if it needs to be diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 84df876d679..06360ac8ccd 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1302,9 +1302,9 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG H5HF_indirect_t *iblock = (H5HF_indirect_t *)_thing; /* Indirect block info */ uint8_t * image = (uint8_t *)_image; /* Pointer into raw data buffer */ #ifndef NDEBUG - unsigned nchildren = 0; /* Track # of children */ - size_t max_child = 0; /* Track max. child entry used */ -#endif /* NDEBUG */ + unsigned nchildren = 0; /* Track # of children */ + size_t max_child = 0; /* Track max. child entry used */ +#endif /* NDEBUG */ uint32_t metadata_chksum; /* Computed metadata checksum value */ size_t u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1378,7 +1378,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_NDEBUG max_child = u; } /* end if */ #endif /* NDEBUG */ - } /* end for */ + } /* end for */ /* Compute checksum */ metadata_chksum = H5_checksum_metadata((uint8_t *)_image, (size_t)(image - (uint8_t *)_image), 0); diff --git a/src/H5HG.c b/src/H5HG.c index d206e750d69..100310d974a 100644 --- a/src/H5HG.c +++ b/src/H5HG.c @@ -548,7 +548,7 @@ H5HG_insert(H5F_t *f, size_t size, const void *obj, H5HG_t *hobj /*out*/) HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0, need - (H5HG_SIZEOF_OBJHDR(f) + size)); #endif /* OLD_WAY */ - } /* end if */ + } /* end if */ heap_flags |= H5AC__DIRTIED_FLAG; /* Return value */ diff --git a/src/H5MF.c b/src/H5MF.c index b8e215031f1..de22930d15e 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -1204,7 +1204,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ else { htri_t merged; /* Whether node was merged */ H5MF_sect_ud_t udata; /* User data for callback */ @@ -1377,7 +1377,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: H5MF__aggr_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* If no extension so far, try to extend into a free-space section */ @@ -1403,7 +1403,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi "error extending block in free space manager") #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to H5FS_sect_try_extend = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ /* For paged aggregation and a metadata block: try to extend into page end threshold */ @@ -1414,7 +1414,7 @@ H5MF_try_extend(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size, hsi ret_value = TRUE; #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: Try to extend into the page end threshold = %t\n", FUNC, ret_value); -#endif /* H5MF_ALLOC_DEBUG_MORE */ +#endif /* H5MF_ALLOC_DEBUG_MORE */ } /* end if */ } /* end if */ } /* allow_extend */ @@ -2971,7 +2971,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) HDassert(fs_stat.serial_sect_count > 0); HDassert(fs_stat.alloc_sect_size > 0); HDassert(fs_stat.alloc_sect_size == fs_stat.sect_size); -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end if */ else { HDassert(!H5F_addr_defined(fs_stat.addr)); diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 473c1dc5cd2..597da762dd9 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -648,7 +648,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) #ifdef H5MF_ALLOC_DEBUG_MORE HDfprintf(stderr, "%s: section is dropped\n", FUNC); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ /* Adjust the section if it is not at page end but its size + prem is at page end */ else if (prem <= H5F_PGEND_META_THRES(udata->f)) { (*sect)->sect_info.size += prem; @@ -656,7 +656,7 @@ H5MF__sect_small_add(H5FS_section_info_t **_sect, unsigned *flags, void *_udata) HDfprintf(stderr, "%s: section is adjusted {%a, %Hu}\n", FUNC, (*sect)->sect_info.addr, (*sect)->sect_info.size); #endif /* H5MF_ALLOC_DEBUG_MORE */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5MM.c b/src/H5MM.c index 1effd6a6fad..7b49c72cab0 100644 --- a/src/H5MM.c +++ b/src/H5MM.c @@ -53,7 +53,7 @@ struct H5MM_block_t; /* Forward declaration for typedef */ typedef struct H5MM_block_t { unsigned char - sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ + sig[H5MM_SIG_SIZE]; /* Signature for the block, to indicate it was allocated with H5MM* interface */ struct H5MM_block_t *next; /* Pointer to next block in the list of allocated blocks */ struct H5MM_block_t *prev; /* Pointer to previous block in the list of allocated blocks */ union { @@ -70,7 +70,7 @@ typedef struct H5MM_block_t { /********************/ /* Local Prototypes */ /********************/ -#if defined H5_MEMORY_ALLOC_SANITY_CHECK +#if defined H5_MEMORY_ALLOC_SANITY_CHECK static hbool_t H5MM__is_our_block(void *mem); static void H5MM__sanity_check_block(const H5MM_block_t *block); static void H5MM__sanity_check(void *mem); @@ -271,7 +271,7 @@ H5MM_malloc(size_t size) H5MM_block_head_s.u.info.in_use = TRUE; H5MM_init_s = TRUE; - } /* end if */ + } /* end if */ #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (size) { @@ -309,10 +309,10 @@ H5MM_malloc(size_t size) } /* end if */ else ret_value = NULL; -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDmalloc(size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -352,10 +352,10 @@ H5MM_calloc(size_t size) #if defined H5_MEMORY_ALLOC_SANITY_CHECK if (NULL != (ret_value = H5MM_malloc(size))) HDmemset(ret_value, 0, size); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDcalloc((size_t)1, size); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ else ret_value = NULL; @@ -417,14 +417,14 @@ H5MM_realloc(void *mem, size_t size) } else ret_value = H5MM_xfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ ret_value = HDrealloc(mem, size); /* Some platforms do not return NULL if size is zero. */ if (0 == size) ret_value = NULL; #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end else */ + } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5MM_realloc() */ @@ -542,10 +542,10 @@ H5MM_xfree(void *mem) } else HDfree(mem); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ HDfree(mem); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ - } /* end if */ + } /* end if */ FUNC_LEAVE_NOAPI(NULL) } /* end H5MM_xfree() */ @@ -642,8 +642,8 @@ H5MM_get_alloc_stats(H5_alloc_stats_t *stats) stats->total_alloc_blocks_count = H5MM_total_alloc_blocks_count_s; stats->curr_alloc_blocks_count = H5MM_curr_alloc_blocks_count_s; stats->peak_alloc_blocks_count = H5MM_peak_alloc_blocks_count_s; - } /* end if */ -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ + } /* end if */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ if (stats) HDmemset(stats, 0, sizeof(H5_alloc_stats_t)); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index b4a59bac76e..d957686da7d 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -49,8 +49,8 @@ H5_DLL void * H5MM_xfree_const(const void *mem); H5_DLL void * H5MM_memcpy(void *dest, const void *src, size_t n); H5_DLL herr_t H5MM_get_alloc_stats(H5_alloc_stats_t *stats); #if defined H5_MEMORY_ALLOC_SANITY_CHECK -H5_DLL void H5MM_sanity_check_all(void); -H5_DLL void H5MM_final_sanity_check(void); +H5_DLL void H5MM_sanity_check_all(void); +H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ #endif /* _H5MMprivate_H */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 9acbd91ef41..e2b4b873a8e 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -995,10 +995,10 @@ H5O__cache_chk_notify(H5AC_notify_action_t action, void *_thing) default: #ifdef NDEBUG HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "unknown action from metadata cache") -#else /* NDEBUG */ +#else /* NDEBUG */ HDassert(0 && "Unknown action?!?"); #endif /* NDEBUG */ - } /* end switch */ + } /* end switch */ done: FUNC_LEAVE_NOAPI(ret_value) @@ -1284,7 +1284,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image unsigned chunkno; /* Current chunk's index */ #ifndef NDEBUG unsigned nullcnt; /* Count of null messages (for sanity checking gaps in chunks) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ hbool_t mesgs_modified = FALSE; /* Whether any messages were modified when the object header was deserialized */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 2e92e6c0330..38a212cfa31 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -81,7 +81,7 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in if (H5T__upgrade_version((DT), (VERS)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \ *(IOF) |= H5O_DECODEIO_DIRTY; \ - } /* end if */ + } /* end if */ #endif /* H5_STRICT_FORMAT_CHECKS */ /* This message derives from H5O message class */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 7c86a113ba7..7d3f8e1a726 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -98,25 +98,25 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = { H5O_MSG_LAYOUT, /*0x0008 Data Layout */ #ifdef H5O_ENABLE_BOGUS H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ NULL, /*0x0009 "Bogus valid" (for testing) */ -#endif /* H5O_ENABLE_BOGUS */ - H5O_MSG_GINFO, /*0x000A Group information */ - H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ - H5O_MSG_ATTR, /*0x000C Attribute */ - H5O_MSG_NAME, /*0x000D Object name */ - H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ - H5O_MSG_CONT, /*0x0010 Object header continuation */ - H5O_MSG_STAB, /*0x0011 Symbol table */ - H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ - H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ - H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ - H5O_MSG_AINFO, /*0x0015 Attribute information */ - H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ - H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ - H5O_MSG_MDCI, /*0x0018 Metadata cache image */ - H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ +#endif /* H5O_ENABLE_BOGUS */ + H5O_MSG_GINFO, /*0x000A Group information */ + H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ + H5O_MSG_ATTR, /*0x000C Attribute */ + H5O_MSG_NAME, /*0x000D Object name */ + H5O_MSG_MTIME, /*0x000E Object modification date and time */ + H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ + H5O_MSG_CONT, /*0x0010 Object header continuation */ + H5O_MSG_STAB, /*0x0011 Symbol table */ + H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ + H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ + H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ + H5O_MSG_AINFO, /*0x0015 Attribute information */ + H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ + H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ + H5O_MSG_MDCI, /*0x0018 Metadata cache image */ + H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ }; /* Format version bounds for object header */ @@ -1065,7 +1065,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) H5O_chunk_proxy_t *chk_proxy; /* Proxy for chunk, to bring it into memory */ #ifndef NDEBUG size_t chkcnt = oh->nchunks; /* Count of chunks (for sanity checking) */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Bring the chunk into the cache */ /* (which adds to the object header) */ @@ -1113,7 +1113,7 @@ H5O_protect(const H5O_loc_t *loc, unsigned prot_flags, hbool_t pin_all_chunks) (oh->nmesgs + udata.common.merged_null_msgs) != udata.v1_pfx_nmesgs) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "corrupt object header - incorrect # of messages") #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ #ifdef H5O_DEBUG H5O_assert(oh); diff --git a/src/H5Opkg.h b/src/H5Opkg.h index bcc1c8fe6de..30f0b1c538c 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -277,10 +277,10 @@ struct H5O_t { /* (This is to simulate a bug in earlier * versions of the library) */ -#endif /* H5O_ENABLE_BAD_MESG_COUNT */ +#endif /* H5O_ENABLE_BAD_MESG_COUNT */ #ifndef NDEBUG size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* Chunk management information (not stored) */ size_t rc; /* Reference count of [continuation] chunks using this structure */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index c9c53c69fad..32d85e72aa0 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -37,13 +37,13 @@ typedef struct H5O_fill_t H5O_fill_t; #include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ -#include "H5Tprivate.h" /* Datatype functions */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Tprivate.h" /* Datatype functions */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; @@ -66,8 +66,8 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* Object header macros */ #define H5O_MESG_MAX_SIZE 65536 /*max obj header message size */ -#define H5O_ALL (-1) /* Operate on all messages of type */ -#define H5O_FIRST (-2) /* Operate on first message of type */ +#define H5O_ALL (-1) /* Operate on all messages of type */ +#define H5O_FIRST (-2) /* Operate on first message of type */ /* Flags needed when encoding messages */ #define H5O_MSG_NO_FLAGS_SET 0x00u @@ -95,10 +95,10 @@ typedef struct H5O_mesg_t H5O_mesg_t; /* #define H5O_ENABLE_BOGUS */ /* ========= Object Creation properties ============ */ -#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ -#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ +#define H5O_CRT_ATTR_MAX_COMPACT_NAME "max compact attr" /* Max. # of attributes to store compactly */ +#define H5O_CRT_ATTR_MIN_DENSE_NAME "min dense attr" /* Min. # of attributes to store densely */ #define H5O_CRT_OHDR_FLAGS_NAME "object header flags" /* Object header flags */ -#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ +#define H5O_CRT_PIPELINE_NAME "pline" /* Filter pipeline */ #define H5O_CRT_PIPELINE_DEF \ { \ {0, NULL, H5O_NULL_ID, {{0, HADDR_UNDEF}}}, H5O_PLINE_VERSION_1, 0, 0, NULL \ @@ -375,7 +375,7 @@ typedef struct H5O_link_t { * External File List Message * (Data structure in memory) */ -#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ +#define H5O_EFL_ALLOC 16 /*number of slots to alloc at once */ #define H5O_EFL_UNLIMITED H5F_UNLIMITED /*max possible file size */ typedef struct H5O_efl_entry_t { diff --git a/src/H5Oshared.h b/src/H5Oshared.h index a0704ecb2b1..840e5e16387 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -72,10 +72,10 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla #ifdef H5_STRICT_FORMAT_CHECKS if (*ioflags & H5O_DECODEIO_DIRTY) HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ *ioflags &= ~H5O_DECODEIO_DIRTY; #endif /* H5_STRICT_FORMAT_CHECKS */ - } /* end if */ + } /* end if */ else { /* Decode native message directly */ if (NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, open_oh, mesg_flags, ioflags, p_size, p))) @@ -237,7 +237,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Decrement the reference count on the native message directly */ if (H5O_SHARED_DELETE_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to decrement ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_DELETE_REAL */ done: @@ -288,7 +288,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg) /* Increment the reference count on the native message directly */ if (H5O_SHARED_LINK_REAL(f, open_oh, _mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "unable to increment ref count for native message") - } /* end else */ + } /* end else */ #endif /* H5O_SHARED_LINK_REAL */ done: @@ -333,7 +333,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_ if (NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message to another file") -#else /* H5O_SHARED_COPY_FILE_REAL */ +#else /* H5O_SHARED_COPY_FILE_REAL */ /* No copy file callback defined, just copy the message itself */ if (NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL))) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy native message") diff --git a/src/H5PLpath.c b/src/H5PLpath.c index ab708c189eb..1858cf8da3b 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -691,7 +691,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo FUNC_LEAVE_NOAPI(ret_value) } /* end H5PL__find_plugin_in_path() */ -#else /* H5_HAVE_WIN32_API */ +#else /* H5_HAVE_WIN32_API */ static herr_t H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *found, const char *dir, const void **plugin_info) diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 25efc551772..f1ebd99e3ab 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -313,7 +313,7 @@ static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ +#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index fe8d65c5b2e..0f271272b86 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -443,7 +443,7 @@ static const H5P_coll_md_read_flag_t H5F_def_coll_md_read_flag_g = H5F_ACS_COLL_MD_READ_FLAG_DEF; /* Default setting for the collective metedata read flag */ static const hbool_t H5F_def_coll_md_write_flag_g = H5F_ACS_COLL_MD_WRITE_FLAG_DEF; /* Default setting for the collective metedata write flag */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ static const H5AC_cache_image_config_t H5F_def_mdc_initCacheImageCfg_g = H5F_ACS_META_CACHE_INIT_IMAGE_CONFIG_DEF; /* Default metadata cache image settings */ static const size_t H5F_def_page_buf_size_g = H5F_ACS_PAGE_BUFFER_SIZE_DEF; /* Default page buffer size */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index 9dcfd43b6fd..239afd15ca0 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -87,7 +87,7 @@ struct H5P_genclass_t { H5P_plist_type_t type; /* Type of property */ size_t nprops; /* Number of properties in class */ unsigned - plists; /* Number of property lists that have been created since the last modification to the class */ + plists; /* Number of property lists that have been created since the last modification to the class */ unsigned classes; /* Number of classes that have been derived since the last modification to the class */ unsigned ref_count; /* Number of outstanding ID's open on this class object */ hbool_t deleted; /* Whether this class has been deleted and is waiting for dependent classes & proplists diff --git a/src/H5SM.c b/src/H5SM.c index 3d68503f0e8..90b1c5ddd5d 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -1050,7 +1050,7 @@ H5SM_try_share(H5F_t *f, H5O_t *open_oh, unsigned defer_flags, unsigned type_id, if (defer_flags & H5SM_WAS_DEFERRED) #ifndef NDEBUG deferred_type = ((H5O_shared_t *)mesg)->type; -#else /* NDEBUG */ +#else /* NDEBUG */ if ((((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_HERE) && (((H5O_shared_t *)mesg)->type != H5O_SHARE_TYPE_SOHM)) HGOTO_DONE(FALSE); @@ -1369,7 +1369,7 @@ H5SM__write_mesg(H5F_t *f, H5O_t *open_oh, H5SM_index_header_t *header, hbool_t if (defer) HDmemset(&shared.u, 0, sizeof(shared.u)); #endif /* H5_USING_MEMCHECKER */ - } /* end if */ + } /* end if */ else { htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 330392c77ad..6e20f8a5e8f 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -2124,7 +2124,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Decrement number of blocks */ fast_dim_count--; } /* end while */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -2160,7 +2160,7 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS /* Increment offset in destination buffer */ @@ -11561,7 +11561,7 @@ H5S__hyper_project_intersection(const H5S_t *src_space, const H5S_t *dst_space, for (u = 0; u < H5S_MAX_RANK; u++) HDassert(!udata.ps_span_info[u]); - } /* end block */ + } /* end block */ #endif /* NDEBUG */ FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index ccd672e2bb1..b6d642385d6 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -281,7 +281,7 @@ typedef struct { H5S_sel_release_func_t release; /* Method to release current selection */ H5S_sel_is_valid_func_t is_valid; /* Method to determine if current selection is valid for dataspace */ H5S_sel_serial_size_func_t - serial_size; /* Method to determine number of bytes required to store current selection */ + serial_size; /* Method to determine number of bytes required to store current selection */ H5S_sel_serialize_func_t serialize; /* Method to store current selection in "serialized" form (a byte sequence suitable for storing on disk) */ H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte @@ -289,7 +289,7 @@ typedef struct { H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */ H5S_sel_offset_func_t - offset; /* Method to determine linear offset of initial element in selection within dataspace */ + offset; /* Method to determine linear offset of initial element in selection within dataspace */ H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */ H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */ @@ -299,9 +299,9 @@ typedef struct { H5S_sel_shape_same_func_t shape_same; /* Method to determine if two dataspaces' selections are the same shape */ H5S_sel_intersect_block_func_t - intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ - H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ - H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ + intersect_block; /* Method to determine if a dataspaces' selection intersects a block */ + H5S_sel_adjust_u_func_t adjust_u; /* Method to adjust a selection by an offset */ + H5S_sel_adjust_s_func_t adjust_s; /* Method to adjust a selection by an offset (signed) */ H5S_sel_project_scalar project_scalar; /* Method to construct scalar dataspace projection */ H5S_sel_project_simple project_simple; /* Method to construct simple dataspace projection */ H5S_sel_iter_init_func_t iter_init; /* Method to initialize iterator for current selection */ @@ -365,7 +365,7 @@ typedef struct H5S_sel_iter_class_t { H5S_sel_iter_next_block_func_t iter_next_block; /* Method to move selection iterator to the next block in the selection */ H5S_sel_iter_get_seq_list_func_t - iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ + iter_get_seq_list; /* Method to retrieve a list of offset/length sequences for selection iterator */ H5S_sel_iter_release_func_t iter_release; /* Method to release iterator for current selection */ } H5S_sel_iter_class_t; diff --git a/src/H5TS.c b/src/H5TS.c index ebefd2a1178..bd1b748faf4 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -29,7 +29,7 @@ typedef struct H5TS_cancel_struct { /* Global variable definitions */ #ifdef H5_HAVE_WIN_THREADS H5TS_once_t H5TS_first_init_g; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_once_t H5TS_first_init_g = PTHREAD_ONCE_INIT; #endif /* H5_HAVE_WIN_THREADS */ H5TS_key_t H5TS_errstk_key_g; @@ -291,7 +291,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex) #ifdef H5_HAVE_WIN_THREADS EnterCriticalSection(&mutex->CriticalSection); return 0; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ herr_t ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) @@ -342,7 +342,7 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex) /* Releases ownership of the specified critical section object. */ LeaveCriticalSection(&mutex->CriticalSection); return 0; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ herr_t ret_value = pthread_mutex_lock(&mutex->atomic_lock); if (ret_value) @@ -394,7 +394,7 @@ H5TS_cancel_count_inc(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported; just return 0 */ return SUCCEED; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ H5TS_cancel_t *cancel_counter; herr_t ret_value = SUCCEED; @@ -456,7 +456,7 @@ H5TS_cancel_count_dec(void) #ifdef H5_HAVE_WIN_THREADS /* unsupported; will just return 0 */ return SUCCEED; -#else /* H5_HAVE_WIN_THREADS */ +#else /* H5_HAVE_WIN_THREADS */ register H5TS_cancel_t *cancel_counter; herr_t ret_value = SUCCEED; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index f3e1458c17c..ee29522cd3f 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -302,7 +302,7 @@ typedef struct H5T_shared_t { size_t size; /*total size of an instance of this type */ unsigned version; /* Version of object header message to encode this object with */ hbool_t - force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ + force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ struct H5T_t *parent; /*parent type for derived datatypes */ union { H5T_atomic_t atomic; /* an atomic datatype */ diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 85230d92f52..342914050fc 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -27,7 +27,7 @@ typedef struct H5T_t H5T_t; #include "H5MMpublic.h" /* Memory management */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ +#include "H5private.h" /* Generic Functions */ #include "H5Gprivate.h" /* Groups */ #include "H5Rprivate.h" /* References */ diff --git a/src/H5VM.c b/src/H5VM.c index 73eaf1d1e47..a5461e8a216 100644 --- a/src/H5VM.c +++ b/src/H5VM.c @@ -491,7 +491,7 @@ H5VM_hyper_copy(unsigned n, const hsize_t *_size, #ifdef NO_INLINED_CODE dst_start = H5VM_hyper_stride(n, size, dst_size, dst_offset, dst_stride); src_start = H5VM_hyper_stride(n, size, src_size, src_offset, src_stride); -#else /* NO_INLINED_CODE */ +#else /* NO_INLINED_CODE */ /* in-line version of two calls to H5VM_hyper_stride() */ { hsize_t dst_acc; /*accumulator */ diff --git a/src/H5Z.c b/src/H5Z.c index 6fb2e39ba22..0e14ba35b82 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -47,7 +47,7 @@ typedef struct H5Z_object_t { #ifdef H5_HAVE_PARALLEL hbool_t sanity_checked; /* Whether the sanity check for collectively calling H5Zunregister has been done */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ } H5Z_object_t; /* Enumerated type for dataset creation prelude callbacks */ @@ -172,7 +172,7 @@ H5Z_term_package(void) } /* end for */ } /* end for */ } /* end if */ -#endif /* H5Z_DEBUG */ +#endif /* H5Z_DEBUG */ /* Free the table of filters */ if (H5Z_table_g) { @@ -246,11 +246,11 @@ H5Zregister(const void *cls) /* Set cls_real to point to the translated structure */ cls_real = &cls_new; -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Deprecated symbols not allowed, throw an error */ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid H5Z_class_t version number"); #endif /* H5_NO_DEPRECATED_SYMBOLS */ - } /* end if */ + } /* end if */ if (cls_real->id < 0 || cls_real->id > H5Z_FILTER_MAX) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") @@ -318,7 +318,7 @@ H5Z_register(const H5Z_class2_t *cls) #ifdef H5Z_DEBUG HDmemset(H5Z_stat_table_g + i, 0, sizeof(H5Z_stats_t)); #endif /* H5Z_DEBUG */ - } /* end if */ + } /* end if */ /* Filter already registered */ else { /* Replace old contents */ @@ -578,7 +578,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key H5_ATTR H5F_t *f = (H5F_t *)obj_ptr; /* File object for operations */ #ifdef H5_HAVE_PARALLEL H5Z_object_t *object = (H5Z_object_t *)key; -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ int ret_value = FALSE; /* Return value */ FUNC_ENTER_STATIC @@ -623,7 +623,7 @@ H5Z__flush_file_cb(void *obj_ptr, hid_t H5_ATTR_UNUSED obj_id, void *key H5_ATTR if (H5P_USER_TRUE == coll_md_read) H5CX_set_coll_metadata_read(TRUE); } /* end if */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ /* Call the flush routine for mounted file hierarchies */ if (H5F_flush_mounts((H5F_t *)obj_ptr) < 0) diff --git a/src/H5Znbit.c b/src/H5Znbit.c index ca5f74a6149..d85ebfe5a37 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -95,13 +95,13 @@ H5Z_class2_t H5Z_NBIT[1] = {{ }}; /* Local macros */ -#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ -#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ -#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ -#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ +#define H5Z_NBIT_ATOMIC 1 /* Atomic datatype class: integer/floating-point */ +#define H5Z_NBIT_ARRAY 2 /* Array datatype class */ +#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */ +#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */ #define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */ -#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ -#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ +#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */ +#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */ /* Local variables */ diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index d01f9b58c29..8b1d042703e 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -32,19 +32,19 @@ typedef int H5Z_filter_t; /* Filter IDs */ #define H5Z_FILTER_ERROR (-1) /*no filter */ -#define H5Z_FILTER_NONE 0 /*reserved indefinitely */ -#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */ -#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */ -#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */ -#define H5Z_FILTER_SZIP 4 /*szip compression */ -#define H5Z_FILTER_NBIT 5 /*nbit compression */ -#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */ -#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */ +#define H5Z_FILTER_NONE 0 /*reserved indefinitely */ +#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */ +#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */ +#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */ +#define H5Z_FILTER_SZIP 4 /*szip compression */ +#define H5Z_FILTER_NBIT 5 /*nbit compression */ +#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */ +#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */ #define H5Z_FILTER_MAX 65535 /*maximum filter id */ /* General macros */ -#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */ +#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */ #define H5Z_MAX_NFILTERS 32 /* Maximum number of filters allowed in a pipeline */ /* (should probably be allowed to be an * unlimited amount, but currently each diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index d4a72a4ed18..96360eb7be5 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -103,14 +103,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{ /* Local macros */ #define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */ -#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ -#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ -#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ -#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ -#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ -#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ -#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ -#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ +#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */ +#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */ +#define H5Z_SCALEOFFSET_PARM_NELMTS 2 /* "Local" parameter for number of elements in the chunk */ +#define H5Z_SCALEOFFSET_PARM_CLASS 3 /* "Local" parameter for datatype class */ +#define H5Z_SCALEOFFSET_PARM_SIZE 4 /* "Local" parameter for datatype size */ +#define H5Z_SCALEOFFSET_PARM_SIGN 5 /* "Local" parameter for integer datatype sign */ +#define H5Z_SCALEOFFSET_PARM_ORDER 6 /* "Local" parameter for datatype byte order */ +#define H5Z_SCALEOFFSET_PARM_FILAVAIL 7 /* "Local" parameter for dataset fill value existence */ #define H5Z_SCALEOFFSET_PARM_FILVAL 8 /* "Local" parameter for start location to store dataset fill value */ #define H5Z_SCALEOFFSET_CLS_INTEGER 0 /* Integer (datatype class) */ @@ -1232,7 +1232,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu */ minval_size = sizeof(unsigned long long) <= ((unsigned char *)*buf)[4] ? sizeof(unsigned long long) : ((unsigned char *)*buf)[4]; - minval = 0; + minval = 0; for (i = 0; i < minval_size; i++) { minval_mask = ((unsigned char *)*buf)[5 + i]; minval_mask <<= i * 8; diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c index a5d33aa707d..bd28f84b03b 100644 --- a/src/H5Zshuffle.c +++ b/src/H5Zshuffle.c @@ -122,8 +122,8 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] size_t numofelements; /* Number of elements in buffer */ size_t i; /* Local index variables */ #ifdef NO_DUFFS_DEVICE - size_t j; /* Local index variable */ -#endif /* NO_DUFFS_DEVICE */ + size_t j; /* Local index variable */ +#endif /* NO_DUFFS_DEVICE */ size_t leftover; /* Extra bytes at end of buffer */ size_t ret_value = 0; /* Return value */ @@ -165,7 +165,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -201,7 +201,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ @@ -229,7 +229,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] j--; } /* end for */ -#else /* NO_DUFFS_DEVICE */ +#else /* NO_DUFFS_DEVICE */ { size_t duffs_index; /* Counting index for Duff's device */ @@ -265,7 +265,7 @@ H5Z__filter_shuffle(unsigned flags, size_t cd_nelmts, const unsigned cd_values[] } while (--duffs_index > 0); } /* end switch */ } -#endif /* NO_DUFFS_DEVICE */ +#endif /* NO_DUFFS_DEVICE */ #undef DUFF_GUTS } /* end for */ diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index cde186224cd..a61a52def37 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -1033,7 +1033,7 @@ H5Z_xform_eval(H5Z_data_xform_t *data_xform_prop, void *array, size_t array_size #if CHAR_MIN >= 0 else if (array_type == H5T_NATIVE_SCHAR) H5Z_XFORM_DO_OP5(signed char, array_size) -#else /* CHAR_MIN >= 0 */ +#else /* CHAR_MIN >= 0 */ else if (array_type == H5T_NATIVE_UCHAR) H5Z_XFORM_DO_OP5(unsigned char, array_size) #endif /* CHAR_MIN >= 0 */ diff --git a/src/H5detect.c b/src/H5detect.c index 6ea347f1989..e851d799d52 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -1142,7 +1142,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c index 2afa531c693..617d1f5da1b 100644 --- a/src/H5make_libsettings.c +++ b/src/H5make_libsettings.c @@ -144,7 +144,7 @@ print_header(void) #ifdef H5_HAVE_GETPWUID struct passwd *pwd = NULL; #else - int pwd = 1; + int pwd = 1; #endif static const char *month_name[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; diff --git a/src/H5private.h b/src/H5private.h index eba2a189c0b..3b290ee24ad 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -473,11 +473,11 @@ typedef unsigned char uint8_t; #if H5_SIZEOF_INT16_T >= 2 #elif H5_SIZEOF_SHORT >= 2 -typedef short int16_t; +typedef short int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 2 -typedef int int16_t; +typedef int int16_t; #undef H5_SIZEOF_INT16_T #define H5_SIZEOF_INT16_T H5_SIZEOF_INT #else @@ -499,11 +499,11 @@ typedef unsigned uint16_t; #if H5_SIZEOF_INT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short int32_t; +typedef short int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef int int32_t; +typedef int int32_t; #undef H5_SIZEOF_INT32_T #define H5_SIZEOF_INT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 @@ -675,7 +675,7 @@ typedef struct { #endif /* HDabs */ #ifndef HDaccept #define HDaccept(A, B, C) accept((A), (B), (C)) /* mirror VFD */ -#endif /* HDaccept */ +#endif /* HDaccept */ #ifndef HDaccess #define HDaccess(F, M) access(F, M) #endif /* HDaccess */ @@ -697,7 +697,7 @@ typedef struct { #endif /* HDasin */ #ifndef HDasprintf #define HDasprintf asprintf /*varargs*/ -#endif /* HDasprintf */ +#endif /* HDasprintf */ #ifndef HDassert #define HDassert(X) assert(X) #endif /* HDassert */ @@ -724,7 +724,7 @@ typedef struct { #endif /* HDatol */ #ifndef HDbind #define HDbind(A, B, C) bind((A), (B), (C)) /* mirror VFD */ -#endif /* HDbind */ +#endif /* HDbind */ #ifndef HDbsearch #define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F) #endif /* HDbsearch */ @@ -772,7 +772,7 @@ typedef struct { #endif /* HDclosedir */ #ifndef HDconnect #define HDconnect(A, B, C) connect((A), (B), (C)) /* mirror VFD */ -#endif /* HDconnect */ +#endif /* HDconnect */ #ifndef HDcos #define HDcos(X) cos(X) #endif /* HDcos */ @@ -1019,7 +1019,7 @@ typedef off_t h5_stat_size_t; #endif /* HDgetgroups */ #ifndef HDgethostbyaddr #define HDgethostbyaddr(A, B, C) gethostbyaddr((A), (B), (C)) /* mirror VFD */ -#endif /* HDgethostbyaddr */ +#endif /* HDgethostbyaddr */ #ifndef HDgethostname #define HDgethostname(N, L) gethostname(N, L) #endif /* HDgethostname */ @@ -1061,55 +1061,55 @@ typedef off_t h5_stat_size_t; #endif /* HDgmtime */ #ifndef HDhtonl #define HDhtonl(X) htonl((X)) /* mirror VFD */ -#endif /* HDhtonl */ +#endif /* HDhtonl */ #ifndef HDhtons #define HDhtons(X) htons((X)) /* mirror VFD */ -#endif /* HDhtons */ +#endif /* HDhtons */ #ifndef HDinet_addr #define HDinet_addr(C) inet_addr((C)) /* mirror VFD */ -#endif /* HDinet_addr */ +#endif /* HDinet_addr */ #ifndef HDinet_ntoa #define HDinet_ntoa(C) inet_ntoa((C)) /* mirror VFD */ -#endif /* HDinet_ntoa */ +#endif /* HDinet_ntoa */ #ifndef HDisalnum #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalnum */ +#endif /* HDisalnum */ #ifndef HDisalpha #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ -#endif /* HDisalpha */ +#endif /* HDisalpha */ #ifndef HDisatty #define HDisatty(F) isatty(F) #endif /* HDisatty */ #ifndef HDiscntrl #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#endif /* HDiscntrl */ +#endif /* HDiscntrl */ #ifndef HDisdigit #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisdigit */ +#endif /* HDisdigit */ #ifndef HDisgraph #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#endif /* HDisgraph */ +#endif /* HDisgraph */ #ifndef HDislower #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#endif /* HDislower */ +#endif /* HDislower */ #ifndef HDisnan #define HDisnan(X) isnan(X) #endif /* HDisnan */ #ifndef HDisprint #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#endif /* HDisprint */ +#endif /* HDisprint */ #ifndef HDispunct #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#endif /* HDispunct */ +#endif /* HDispunct */ #ifndef HDisspace #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#endif /* HDisspace */ +#endif /* HDisspace */ #ifndef HDisupper #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ -#endif /* HDisupper */ +#endif /* HDisupper */ #ifndef HDisxdigit #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ -#endif /* HDisxdigit */ +#endif /* HDisxdigit */ #ifndef HDkill #define HDkill(P, S) kill(P, S) #endif /* HDkill */ @@ -1127,7 +1127,7 @@ typedef off_t h5_stat_size_t; #endif /* HDlink */ #ifndef HDlisten #define HDlisten(A, B) listen((A), (B)) /* mirror VFD */ -#endif /* HDlisten */ +#endif /* HDlisten */ #ifndef HDllround #define HDllround(V) llround(V) #endif /* HDround */ @@ -1211,10 +1211,10 @@ typedef off_t h5_stat_size_t; #endif /* HDnanosleep */ #ifndef HDntohl #define HDntohl(A) ntohl((A)) /* mirror VFD */ -#endif /* HDntohl */ +#endif /* HDntohl */ #ifndef HDntohs #define HDntohs(A) ntohs((A)) /* mirror VFD */ -#endif /* HDntohs */ +#endif /* HDntohs */ #ifndef HDopen #define HDopen(F, ...) open(F, __VA_ARGS__) #endif /* HDopen */ @@ -1286,7 +1286,7 @@ H5_DLL void HDsrand(unsigned int seed); #ifndef HDsrandom #define HDsrandom(S) srandom(S) #endif /* HDsrandom */ -#else /* H5_HAVE_RANDOM */ +#else /* H5_HAVE_RANDOM */ #ifndef HDrand #define HDrand() rand() #endif /* HDrand */ @@ -1364,7 +1364,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetsid */ #ifndef HDsetsockopt #define HDsetsockopt(A, B, C, D, E) setsockopt((A), (B), (C), (D), (E)) /* mirror VFD */ -#endif /* HDsetsockopt */ +#endif /* HDsetsockopt */ #ifndef HDsetuid #define HDsetuid(U) setuid(U) #endif /* HDsetuid */ @@ -1373,7 +1373,7 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsetvbuf */ #ifndef HDshutdown #define HDshutdown(A, B) shutdown((A), (B)) /* mirror VFD */ -#endif /* HDshutdown */ +#endif /* HDshutdown */ #ifndef HDsigaction #define HDsigaction(S, A, O) sigaction((S), (A), (O)) #endif /* HDsigaction */ @@ -1421,13 +1421,13 @@ H5_DLL void HDsrand(unsigned int seed); #endif /* HDsleep */ #ifndef HDsnprintf #define HDsnprintf snprintf /*varargs*/ -#endif /* HDsnprintf */ +#endif /* HDsnprintf */ #ifndef HDsocket #define HDsocket(A, B, C) socket((A), (B), (C)) /* mirror VFD */ -#endif /* HDsocket */ +#endif /* HDsocket */ #ifndef HDsprintf #define HDsprintf sprintf /*varargs*/ -#endif /* HDsprintf */ +#endif /* HDsprintf */ #ifndef HDsqrt #define HDsqrt(X) sqrt(X) #endif /* HDsqrt */ @@ -1644,7 +1644,7 @@ H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base); * define these in terms of macros. */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #ifndef HDstrdup @@ -1928,7 +1928,7 @@ extern char H5libhdf5_settings[]; /* embedded library information */ #define H5TRACE11(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) /*void*/ #define H5TRACE12(R, T, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) /*void*/ #define H5TRACE_RETURN(V) /*void*/ -#endif /* H5_DEBUG_API */ +#endif /* H5_DEBUG_API */ H5_DLL double H5_trace(const double *calltime, const char *func, const char *type, ...); @@ -2058,10 +2058,10 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */ #define H5_PUSH_FUNC H5CS_push(FUNC); #define H5_POP_FUNC H5CS_pop(); -#else /* H5_HAVE_CODESTACK */ +#else /* H5_HAVE_CODESTACK */ #define H5_PUSH_FUNC /* void */ #define H5_POP_FUNC /* void */ -#endif /* H5_HAVE_CODESTACK */ +#endif /* H5_HAVE_CODESTACK */ #ifdef H5_HAVE_MPE extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */ @@ -2114,7 +2114,7 @@ H5_DLL herr_t H5CX_pop(void); func_check = TRUE; \ } /* end if */ \ } /* end scope */ -#else /* NDEBUG */ +#else /* NDEBUG */ #define FUNC_ENTER_CHECK_NAME(asrt) #endif /* NDEBUG */ diff --git a/src/H5public.h b/src/H5public.h index 728346b6d02..facec9ab294 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -92,9 +92,9 @@ extern "C" { #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 10 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 8 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_MAJOR 1 /* For major interface/format changes */ +#define H5_VERS_MINOR 10 /* For minor interface/format changes */ +#define H5_VERS_RELEASE 8 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "1" /* For pre-releases like snap0 */ /* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.10.8-1" /* Full version string */ @@ -230,15 +230,15 @@ typedef unsigned long long haddr_t; */ #if H5_SIZEOF_UINT32_T >= 4 #elif H5_SIZEOF_SHORT >= 4 -typedef short uint32_t; +typedef short uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT >= 4 -typedef unsigned int uint32_t; +typedef unsigned int uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 4 -typedef unsigned long uint32_t; +typedef unsigned long uint32_t; #undef H5_SIZEOF_UINT32_T #define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG #else @@ -250,15 +250,15 @@ typedef unsigned long uint32_t; */ #if H5_SIZEOF_INT64_T >= 8 #elif H5_SIZEOF_INT >= 8 -typedef int int64_t; +typedef int int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef long int64_t; +typedef long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG >= 8 -typedef long long int64_t; +typedef long long int64_t; #undef H5_SIZEOF_INT64_T #define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG #else @@ -270,11 +270,11 @@ typedef long long int64_t; */ #if H5_SIZEOF_UINT64_T >= 8 #elif H5_SIZEOF_INT >= 8 -typedef unsigned uint64_t; +typedef unsigned uint64_t; #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG >= 8 -typedef unsigned long uint64_t; +typedef unsigned long uint64_t; #undef H5_SIZEOF_UINT64_T #define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG >= 8 diff --git a/src/H5system.c b/src/H5system.c index 402fe16aab0..1ebd47df0df 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -698,7 +698,7 @@ H5_make_time(struct tm *tm) * VS 2015 is removed, with _get_timezone replacing it. */ long timezone = 0; -#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ +#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ time_t ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/src/H5timer.c b/src/H5timer.c index ea21b12fa43..1df2d8de330 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -163,7 +163,7 @@ H5_now(void) HDgettimeofday(&now_tv, NULL); now = now_tv.tv_sec; } -#else /* H5_HAVE_GETTIMEOFDAY */ +#else /* H5_HAVE_GETTIMEOFDAY */ now = HDtime(NULL); #endif /* H5_HAVE_GETTIMEOFDAY */ @@ -201,8 +201,8 @@ H5_now_usec(void) HDgettimeofday(&now_tv, NULL); now = (uint64_t)(now_tv.tv_sec * (1000 * 1000)) + (uint64_t)now_tv.tv_usec; } -#else /* H5_HAVE_GETTIMEOFDAY */ - now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); +#else /* H5_HAVE_GETTIMEOFDAY */ + now = (uint64_t)(HDtime(NULL) * (1000 * 1000)); #endif /* H5_HAVE_GETTIMEOFDAY */ return (now); diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 944fc8297ac..ebffd7e2d1f 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -192,7 +192,7 @@ H5_DLL float Wroundf(float arg); #define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDflock(F, L) Wflock(F, L) #define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ +#define HDsnprintf c99_snprintf /*varargs*/ #define HDvsnprintf c99_vsnprintf /*varargs*/ /* Non-POSIX functions */ diff --git a/test/accum.c b/test/accum.c index 176ee53d80b..572f8552db5 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2091,8 +2091,8 @@ test_swmr_write_big(hbool_t newest_format) uint8_t wbuf[1024]; /* Buffer for reading & writing */ unsigned u; /* Local index variable */ #ifdef H5_HAVE_UNISTD_H - pid_t pid; /* Process ID */ -#endif /* H5_HAVE_UNISTD_H */ + pid_t pid; /* Process ID */ +#endif /* H5_HAVE_UNISTD_H */ int status; /* Status returned from child process */ char * new_argv[] = {NULL}; char * driver = NULL; /* VFD string (from env variable) */ diff --git a/test/btree2.c b/test/btree2.c index cc49b761b83..b7d9dc639ab 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -2690,7 +2690,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, record = 2862; /* Record to left of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 3137; /* Record to right of insertion point in right internal node (now) */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR @@ -2871,7 +2871,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, cons record = 3049; /* Record to left of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR -#endif /* NONE */ +#endif /* NONE */ record = 2822; /* Record to right of insertion point in middle internal node */ if (check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR diff --git a/test/cache.c b/test/cache.c index 71dff5fabaf..fb01aab3e2f 100644 --- a/test/cache.c +++ b/test/cache.c @@ -4449,7 +4449,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", @@ -4637,7 +4637,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i test_entry_t *base_addr; test_entry_t *entry_ptr; -#if 0 /* JRM */ +#if 0 /* JRM */ /* This is useful debugging code. Leave it in for now. */ HDfprintf(stdout, "check_flush_cache__pe_multi_entry_test: test %d\n", @@ -33871,7 +33871,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr) pass = FALSE; failure_mssg = "unexpected scan restart stats in cedds__expunge_dirty_entry_in_flush_test()."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_STATS */ +#endif /* H5C_COLLECT_CACHE_STATS */ if (pass) reset_entries(); @@ -35232,7 +35232,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(1)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) /* protect and unprotect each entry once. Note @@ -35306,7 +35306,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) pass = FALSE; failure_mssg = "Unexpected monster entry level stats in check_stats__smoke_check_1(2)."; } /* end if */ -#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ +#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */ if (pass) { /* protect and unprotect an entry that is not currently diff --git a/test/cache_common.h b/test/cache_common.h index ee6feb46b23..0b000339166 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -391,7 +391,7 @@ typedef struct test_entry_t { unsigned flush_dep_npar; /* Number of flush dependency parents */ unsigned flush_dep_nchd; /* Number of flush dependency children */ unsigned - flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ + flush_dep_ndirty_chd; /* Number of dirty flush dependency children (including granchildren, etc.) */ hbool_t pinned_from_client; /* entry was pinned by client call */ hbool_t pinned_from_cache; /* entry was pinned by cache internally */ unsigned flush_order; /* Order that entry was flushed in */ diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 16782c28d9a..3235e598d4f 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -442,7 +442,7 @@ check_file_creation_tags(hid_t fcpl_id, int type) hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose test outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t sbe_tag = 0; @@ -538,9 +538,9 @@ check_file_open_tags(hid_t fcpl, int type) hid_t fid = -1; /* File Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ - haddr_t root_tag; /* Root Group Tag */ - haddr_t sbe_tag; /* Sblock Extension Tag */ +#endif /* NDEBUG */ /* end debugging functions */ + haddr_t root_tag; /* Root Group Tag */ + haddr_t sbe_tag; /* Sblock Extension Tag */ /* Testing Macro */ TESTING("tag application during file open"); @@ -659,8 +659,8 @@ check_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */ haddr_t g_tag; /* Group Tag */ @@ -774,8 +774,8 @@ check_multi_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ char gname[16]; /* group name buffer */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access prop list */ @@ -924,8 +924,8 @@ check_link_iteration_tags(void) hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ int i = 0; /* iterator */ haddr_t root_tag = 0; /* Root Group Tag Value */ char dsetname[500]; /* Name of dataset */ @@ -1058,8 +1058,8 @@ check_dense_attribute_tags(void) hid_t did = -1; /* Group Identifier */ hid_t dcpl = -1; /* Group Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access property list */ haddr_t d_tag = 0; /* Dataset tag value */ @@ -1286,7 +1286,7 @@ check_group_open_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -1408,8 +1408,8 @@ check_attribute_creation_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; /* Root group tag */ haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ @@ -1567,7 +1567,7 @@ check_attribute_open_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t g_tag = 0; hsize_t dims1[2] = {DIMS, DIMS}; /* dimensions */ @@ -1726,7 +1726,7 @@ check_attribute_rename_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -1942,7 +1942,7 @@ check_attribute_delete_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -2121,8 +2121,8 @@ check_dataset_creation_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2273,8 +2273,8 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2431,8 +2431,8 @@ check_dataset_open_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2575,8 +2575,8 @@ check_dataset_write_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -2735,7 +2735,7 @@ check_attribute_write_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataset Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ int * data = NULL; /* data buffer */ int i, j, k = 0; /* iterators */ haddr_t root_tag = 0; @@ -2912,8 +2912,8 @@ check_dataset_read_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3066,8 +3066,8 @@ check_dataset_size_retrieval(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3222,8 +3222,8 @@ check_dataset_extend_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3377,7 +3377,7 @@ check_object_info_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; H5O_info_t oinfo; /* Object info struct */ @@ -3501,7 +3501,7 @@ check_object_copy_tags(void) hid_t gid = -1; /* Group Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file output */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; haddr_t copy_tag; @@ -3642,8 +3642,8 @@ check_link_removal_tags(hid_t fcpl, int type) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3823,8 +3823,8 @@ check_link_getname_tags(void) hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG - int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ + int verbose = FALSE; /* verbose file outout */ +#endif /* NDEBUG */ /* end debugging functions */ hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1, 1}; /* chunk dimensions */ int fillval = 0; @@ -3993,7 +3993,7 @@ check_external_link_creation_tags(void) hid_t gid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; /* Testing Macro */ @@ -4112,7 +4112,7 @@ check_external_link_open_tags(void) hid_t xid = -1; /* Dataspace Identifier */ #ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ -#endif /* NDEBUG */ /* end debugging functions */ +#endif /* NDEBUG */ /* end debugging functions */ haddr_t root_tag = 0; haddr_t root2_tag = 0; @@ -4269,7 +4269,7 @@ check_invalid_tag_application(void) haddr_t addr; H5HL_t *lheap = NULL; hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ -#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ +#endif /* H5C_DO_TAGGING_SANITY_CHECKS */ /* Testing Macro */ TESTING("failure on invalid tag application"); diff --git a/test/cross_read.c b/test/cross_read.c index 74557527301..22c6828c33d 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -275,7 +275,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME16, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -283,7 +283,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Deflate filter"); #ifdef H5_HAVE_FILTER_DEFLATE nerrors += check_data_f(DATASETNAME17, fid); -#else /*H5_HAVE_FILTER_DEFLATE*/ +#else /*H5_HAVE_FILTER_DEFLATE*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_DEFLATE*/ @@ -291,7 +291,7 @@ check_file(char *filename) TESTING("dataset of LE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME18, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ @@ -299,7 +299,7 @@ check_file(char *filename) TESTING("dataset of BE FLOAT with Szip filter"); #ifdef H5_HAVE_FILTER_SZIP nerrors += check_data_f(DATASETNAME19, fid); -#else /*H5_HAVE_FILTER_SZIP*/ +#else /*H5_HAVE_FILTER_SZIP*/ SKIPPED(); HDputs(not_supported); #endif /*H5_HAVE_FILTER_SZIP*/ diff --git a/test/dsets.c b/test/dsets.c index e4edca0ef19..0094a0ff03b 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -193,15 +193,15 @@ const char *FILENAME[] = {"dataset", /* 0 */ #define DATA_NOT_CORRUPTED 0 /* Parameters for the "set local" test */ -#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ +#define BOGUS2_PERM_NPARMS 2 /* Number of "permanent" parameters */ #define BOGUS2_PARAM_1 13 /* (No particular meaning, just for checking value) */ #define BOGUS2_PARAM_2 35 /* (No particular meaning, just for checking value) */ -#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ +#define BOGUS2_ALL_NPARMS 4 /* Total number of parameter = permanent + "local" parameters */ /* Dimensionality for conversion buffer test */ -#define DIM1 100 /* Dim. Size of data member # 1 */ +#define DIM1 100 /* Dim. Size of data member # 1 */ #define DIM2 5000 /* Dim. Size of data member # 2 */ -#define DIM3 10 /* Dim. Size of data member # 3 */ +#define DIM3 10 /* Dim. Size of data member # 3 */ /* Parameters for internal filter test */ #define FILTER_CHUNK_DIM1 2 @@ -2412,7 +2412,7 @@ test_get_filter_info(void) if (((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) != 0) || ((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_HAVE_FILTER_SZIP */ /* Verify that get_filter_info throws an error when given a bad filter */ @@ -2454,7 +2454,7 @@ test_filters(hid_t file, hid_t #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ #ifdef H5_HAVE_FILTER_SZIP hsize_t szip_size; /* Size of dataset with szip filter */ @@ -2466,7 +2466,7 @@ test_filters(hid_t file, hid_t #if defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) hsize_t combo_size; /* Size of dataset with multiple filters */ -#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ +#endif /* defined(H5_HAVE_FILTER_DEFLATE) || defined(H5_HAVE_FILTER_SZIP) */ /* test the H5Zget_filter_info function */ if (test_get_filter_info() < 0) @@ -2569,7 +2569,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("deflate filter"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2611,7 +2611,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("szip filter"); SKIPPED(); HDputs(" Szip filter not enabled"); @@ -2686,7 +2686,7 @@ test_filters(hid_t file, hid_t /* Clean up objects used for this test */ if (H5Pclose(dc) < 0) goto error; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ TESTING("shuffle+deflate+fletcher32 filters"); SKIPPED(); HDputs(" Deflate filter not enabled"); @@ -2764,7 +2764,7 @@ test_filters(hid_t file, hid_t SKIPPED(); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ TESTING("shuffle+szip+fletcher32 filters"); SKIPPED(); HDputs(" szip filter not enabled"); @@ -2820,7 +2820,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Can't unregister deflate filter\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Verify deflate filter is not registered currently */ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != FALSE) { @@ -3006,7 +3006,7 @@ test_missing_filter(hid_t file) H5_FAILED(); HDprintf(" Line %d: Deflate filter not available\n", __LINE__); goto error; - } /* end if */ + } /* end if */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Pop API context */ @@ -6251,7 +6251,7 @@ test_can_apply_szip(hid_t const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */ const hsize_t chunk_dims2[2] = {2, 1}; /* Chunk dimensions */ herr_t ret; /* Status value */ -#endif /* H5_HAVE_FILTER_SZIP */ +#endif /* H5_HAVE_FILTER_SZIP */ TESTING("dataset szip filter 'can apply' callback"); @@ -6403,7 +6403,7 @@ test_can_apply_szip(hid_t SKIPPED(); HDputs(" Szip encoding is not enabled."); } -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ SKIPPED(); HDputs(" Szip filter is not enabled."); #endif /* H5_HAVE_FILTER_SZIP */ @@ -10662,7 +10662,7 @@ test_fixed_array(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ @@ -11081,7 +11081,7 @@ test_fixed_array(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ @@ -11173,7 +11173,7 @@ test_single_chunk(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE unsigned compress; /* Whether chunks should be compressed */ -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ size_t n, i; /* local index variables */ herr_t ret; /* Generic return value */ @@ -11385,7 +11385,7 @@ test_single_chunk(hid_t fapl) } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE - } /* end for */ + } /* end for */ #endif /* H5_HAVE_FILTER_DEFLATE */ /* Release buffers */ diff --git a/test/dt_arith.c b/test/dt_arith.c index e5253268e4b..466554c9a46 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5165,7 +5165,7 @@ run_int_fp_conv(const char *name) #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ @@ -5177,7 +5177,7 @@ run_int_fp_conv(const char *name) #endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); -#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ diff --git a/test/dtypes.c b/test/dtypes.c index e9d76eb3fca..2023d454bd2 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6486,7 +6486,7 @@ test_int_float_except(void) hid_t dxpl; /* Dataset transfer property list */ except_info_t e; /* Exception information */ unsigned u; /* Local index variables */ -#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ TESTING("exceptions for int <-> float conversions"); @@ -6602,7 +6602,7 @@ test_int_float_except(void) TEST_ERROR PASSED(); -#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ +#else /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ SKIPPED(); HDputs(" Test skipped due to int or float not 4 bytes."); #endif /* H5_SIZEOF_INT==4 && H5_SIZEOF_FLOAT==4 */ diff --git a/test/earray.c b/test/earray.c index ec5985d27bd..76ac80ce9df 100644 --- a/test/earray.c +++ b/test/earray.c @@ -366,7 +366,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n", earray_stats.stored.data_blk_size, state->data_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ if (earray_stats.stored.nsuper_blks != state->nsuper_blks) { HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n", @@ -379,7 +379,7 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n", earray_stats.stored.super_blk_size, state->super_blk_size); TEST_ERROR - } /* end if */ + } /* end if */ #endif /* NOT_YET */ /* All tests passed */ @@ -745,7 +745,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); puts(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/error_test.c b/test/error_test.c index 02380dfd5d1..bcb2ec4b274 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -132,7 +132,7 @@ test_error(hid_t file) #ifdef H5_USE_16_API if (old_func != (H5E_auto_t)H5Eprint) TEST_ERROR; -#else /* H5_USE_16_API */ +#else /* H5_USE_16_API */ if (old_func != (H5E_auto2_t)H5Eprint2) TEST_ERROR; #endif /* H5_USE_16_API */ diff --git a/test/farray.c b/test/farray.c index e76ac0858b6..896126c277a 100644 --- a/test/farray.c +++ b/test/farray.c @@ -480,7 +480,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE PASSED(); } -#else /* NDEBUG */ +#else /* NDEBUG */ SKIPPED(); puts(" Not tested when assertions are disabled"); #endif /* NDEBUG */ diff --git a/test/fheap.c b/test/fheap.c index e2d23304f99..f712f8e1ff2 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -9422,8 +9422,8 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9554,7 +9554,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9700,8 +9700,8 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + unsigned row; /* Current row in indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -9863,7 +9863,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10019,7 +10019,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ unsigned max_dblock_rows; /* Max. # of rows (of direct blocks) in the root indirect block */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ @@ -10476,7 +10476,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10629,7 +10629,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10786,7 +10786,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -10950,7 +10950,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11118,7 +11118,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11281,7 +11281,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11464,7 +11464,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11684,7 +11684,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -11884,7 +11884,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -12415,7 +12415,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ + num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ size_t obj_size; /* Size of object */ size_t fill_size; /* Size of objects for "bulk" filled blocks */ @@ -14947,8 +14947,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */ size_t obj_size; /* Size of object */ size_t robj_size; /* Size of object read */ @@ -15120,8 +15120,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ h5_stat_size_t empty_size; /* Size of a file with an empty heap */ #ifdef NOT_YET - h5_stat_size_t file_size; /* Size of file currently */ -#endif /* NOT_YET */ + h5_stat_size_t file_size; /* Size of file currently */ +#endif /* NOT_YET */ unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for object #1 */ unsigned char heap_id2[HEAP_ID_LEN]; /* Heap ID for object #2 */ size_t obj_size; /* Size of object */ diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 6dbd922ab5a..b807218b45d 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -463,7 +463,7 @@ test_dataset_write_with_filters(hid_t fid) /* Clean up objects used for this test */ if (H5Pclose(dcpl_id) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -649,7 +649,7 @@ test_dataset_read_with_filters(hid_t fid) if (H5Dclose(did) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ SKIPPED(); HDputs(" Deflate filter not enabled"); #endif /* H5_HAVE_FILTER_DEFLATE */ diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c index 641beac25b8..ca635a1003e 100644 --- a/test/gen_bad_ohdr.c +++ b/test/gen_bad_ohdr.c @@ -112,7 +112,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BAD_MESG_COUNT */ +#else /* H5O_ENABLE_BAD_MESG_COUNT */ HDputs("H5O_BAD_MESG_COUNT compiler macro not defined!"); #endif /* H5O_ENABLE_BAD_MESG_COUNT */ return 1; diff --git a/test/gen_bogus.c b/test/gen_bogus.c index ad858983bd1..b21adeb4c7a 100644 --- a/test/gen_bogus.c +++ b/test/gen_bogus.c @@ -179,7 +179,7 @@ main(void) H5Fclose(fid); } H5E_END_TRY; -#else /* H5O_ENABLE_BOGUS */ +#else /* H5O_ENABLE_BOGUS */ HDputs("H5O_ENABLE_BOGUS compiler macro not defined!"); #endif /* H5O_ENABLE_BOGUS */ return 1; diff --git a/test/gen_cross.c b/test/gen_cross.c index d53970b5400..37c6dcf3410 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -925,7 +925,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) if (H5Pclose(dcpl) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; puts(not_supported); @@ -1328,7 +1328,7 @@ main(void) /* Create a dataset of FLOAT with szip filter */ if (create_szip_dsets_float(file, filespace, memspace) < 0) TEST_ERROR; -#else /* H5_HAVE_FILTER_SZIP */ +#else /* H5_HAVE_FILTER_SZIP */ HDputs("Szip filter is not enabled. Can't create the dataset."); #endif /* H5_HAVE_FILTER_SZIP */ diff --git a/test/links.c b/test/links.c index 146c59e8078..96a84a022a5 100644 --- a/test/links.c +++ b/test/links.c @@ -4830,8 +4830,8 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format) base_driver == H5FD_MPIO || base_driver == H5FD_CORE) ? H5P_DEFAULT : fapl; - op_data.fam_size = ELINK_CB_FAM_SIZE; - op_data.code = 0; + op_data.fam_size = ELINK_CB_FAM_SIZE; + op_data.code = 0; /* Create family fapl */ if ((fam_fapl = H5Pcopy(fapl)) < 0) @@ -7346,7 +7346,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) char * tmpname = NULL; char * cwdpath = NULL; hbool_t have_posix_compat_vfd; /* Whether VFD used is compatible w/POSIX I/O calls */ -#endif /* H5_HAVE_SYMLINK */ +#endif /* H5_HAVE_SYMLINK */ if (new_format) TESTING("external links w/symlink files (w/new group format)") @@ -7600,7 +7600,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format) return FAIL; -#else /* H5_HAVE_SYMLINK */ +#else /* H5_HAVE_SYMLINK */ SKIPPED(); HDputs(" Current file system or operating system doesn't support symbolic links"); @@ -14146,8 +14146,8 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -14255,7 +14255,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ @@ -14630,8 +14630,8 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links unsigned v; /* Local index variable */ hsize_t skip; /* # of links to skip in group */ #ifndef H5_NO_DEPRECATED_SYMBOLS - int gskip; /* # of links to skip in group, with H5Giterate */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + int gskip; /* # of links to skip in group, with H5Giterate */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ herr_t ret; /* Generic return value */ /* Iterate over links in group */ @@ -14739,7 +14739,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links if (nvisit != (max_links / 2)) TEST_ERROR - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over links in group, stopping in the middle */ diff --git a/test/mount.c b/test/mount.c index 74ea151c705..cc8e5b125ba 100644 --- a/test/mount.c +++ b/test/mount.c @@ -1167,7 +1167,7 @@ test_interlink(hid_t fapl) FAIL_STACK_ERROR if (H5Tclose(type) < 0) FAIL_STACK_ERROR -#else /* NOT_NOW */ +#else /* NOT_NOW */ SKIPPED(); HDputs(" Test skipped due file pointer sharing issue (Jira 7638)."); #endif /* NOT_NOW */ diff --git a/test/objcopy.c b/test/objcopy.c index e104c5f244b..b34b6dfd2e5 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -4456,7 +4456,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -4881,7 +4881,7 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) for (j = 0; j < DIM_SIZE_2; j++) @@ -7228,7 +7228,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, #ifndef H5_HAVE_FILTER_DEFLATE SKIPPED(); puts(" Deflation filter not available"); -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ /* set initial data values */ for (i = 0; i < DIM_SIZE_1; i++) { for (j = 0; j < DIM_SIZE_2; j++) { diff --git a/test/s3comms.c b/test/s3comms.c index 47721b5a4da..73d59a49bc8 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -1278,7 +1278,7 @@ test_HMAC_SHA256(void) HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest); TEST_ERROR; } -#else /* VERBOSE not defined */ +#else /* VERBOSE not defined */ /* simple pass/fail test */ JSVERIFY(0, strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL); diff --git a/test/set_extent.c b/test/set_extent.c index 82469559696..5726076a8d9 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -243,11 +243,11 @@ do_ranks(hid_t fapl, hbool_t new_format) #ifdef H5_HAVE_FILTER_DEFLATE if (H5Pset_deflate(dcpl, 9) < 0) TEST_ERROR -#else /* H5_HAVE_FILTER_DEFLATE */ +#else /* H5_HAVE_FILTER_DEFLATE */ if (H5Pclose(dcpl) < 0) TEST_ERROR continue; -#endif /* H5_HAVE_FILTER_DEFLATE */ +#endif /* H5_HAVE_FILTER_DEFLATE */ } /* end if */ if (config & CONFIG_FILL) { diff --git a/test/stab.c b/test/stab.c index 81939773dbd..f0f8247e8f3 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1271,7 +1271,7 @@ old_api(hid_t fapl) TEST_ERROR PASSED(); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ fapl = fapl; diff --git a/test/swmr.c b/test/swmr.c index 2da8d30ed13..9398e6a86c8 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -2350,7 +2350,7 @@ test_start_swmr_write_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSE return 0; } /* test_start_swmr_write_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format) @@ -6509,7 +6509,7 @@ test_refresh_concur(hid_t H5_ATTR_UNUSED in_fapl, hbool_t H5_ATTR_UNUSED new_for return 0; } /* test_refresh_concur() */ -#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ +#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */ static int test_refresh_concur(hid_t in_fapl, hbool_t new_format) diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 9e7c0502e59..931da947ff7 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -96,7 +96,7 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp #ifdef FILLVAL_WORKS symbol_t fillval; /* Dataset fill value */ #endif /* FILLVAL_WORKS */ - unsigned u, v; /* Local index variable */ + unsigned u, v; /* Local index variable */ HDassert(filename); HDassert(index_type); diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 1700ece3b72..9017793e4d4 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -122,7 +122,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor * not work with SWMR currently (see note in swmr_generator.c), we * simply initialize rec_id to 0. */ record->rec_id = (uint64_t)ULLONG_MAX - 1; -#else /* FILLVAL_WORKS */ +#else /* FILLVAL_WORKS */ record->rec_id = (uint64_t)0; #endif /* FILLVAL_WORKS */ if (H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0) diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index a253de53c2e..4706b7ae1b9 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -149,8 +149,8 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f symbol_t record; /* The record to add to the dataset */ unsigned long rec_to_flush; /* # of records left to write before flush */ #ifdef OUT - volatile int dummy; /* Dummy varialbe for busy sleep */ -#endif /* OUT */ + volatile int dummy; /* Dummy varialbe for busy sleep */ +#endif /* OUT */ hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ diff --git a/test/tattr.c b/test/tattr.c index 25e730b29de..510ff815c4b 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -5425,10 +5425,10 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) #ifdef LATER h5_stat_size_t empty_size; /* Size of empty file */ h5_stat_size_t file_size; /* Size of file after operating on it */ -#endif /* LATER */ - unsigned curr_dset; /* Current dataset to work on */ - unsigned u; /* Local index variable */ - herr_t ret; /* Generic return value */ +#endif /* LATER */ + unsigned curr_dset; /* Current dataset to work on */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n")); @@ -5591,7 +5591,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) CHECK(file_size, FAIL, "h5_get_file_size"); VERIFY(file_size, empty_size, "h5_get_file_size"); #endif /* LATER */ - } /* end for */ + } /* end for */ /* Close property list */ ret = H5Pclose(dcpl); @@ -6648,8 +6648,8 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx unsigned v; /* Local index variable */ hsize_t skip; /* # of attributes to skip on object */ #ifndef H5_NO_DEPRECATED_SYMBOLS - unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ + unsigned oskip; /* # of attributes to skip on object, with H5Aiterate1 */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ int old_nerrs; /* Number of errors when entering this check */ herr_t ret; /* Generic return value */ @@ -6841,7 +6841,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx nvisit++; VERIFY(skip, (max_attrs / 2), "H5Aiterate1"); - } /* end else */ + } /* end else */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Iterate over attributes on object, stopping in the middle */ diff --git a/test/tfile.c b/test/tfile.c index dfbd3a5918a..e595dd7a711 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -7541,7 +7541,7 @@ test_file(void) test_min_dset_ohdr(); /* Test datset object header minimization */ #ifndef H5_NO_DEPRECATED_SYMBOLS test_deprec(); /* Test deprecated routines */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ ret = H5Pclose(fapl_id); CHECK(ret, FAIL, "H5Pclose"); diff --git a/test/th5s.c b/test/th5s.c index 71455f262c5..1d5d5f83f81 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -102,8 +102,8 @@ struct space4_struct { #define CONFIG_8 1 #define CONFIG_16 2 #define CONFIG_32 3 -#define POWER8 256 /* 2^8 */ -#define POWER16 65536 /* 2^16 */ +#define POWER8 256 /* 2^8 */ +#define POWER16 65536 /* 2^16 */ #define POWER32 4294967296 /* 2^32 */ /**************************************************************** diff --git a/test/thread_id.c b/test/thread_id.c index 2b87505d187..ce608936f43 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -314,7 +314,7 @@ main(void) return failed ? EXIT_FAILURE : EXIT_SUCCESS; } -#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ +#else /*H5_HAVE_THREADSAFE && !H5_HAVE_WIN_THREADS*/ int main(void) { diff --git a/test/tmisc.c b/test/tmisc.c index 3eaa029a982..fdb49ec77a2 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1254,9 +1254,9 @@ test_misc8(void) int * wdata; /* Data to write */ int * tdata; /* Temporary pointer to data write */ #ifdef VERIFY_DATA - int *rdata; /* Data to read */ - int *tdata2; /* Temporary pointer to data to read */ -#endif /* VERIFY_DATA */ + int *rdata; /* Data to read */ + int *tdata2; /* Temporary pointer to data to read */ +#endif /* VERIFY_DATA */ unsigned u, v; /* Local index variables */ int mdc_nelmts; /* Metadata number of elements */ size_t rdcc_nelmts; /* Raw data number of elements */ @@ -1578,7 +1578,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1612,7 +1612,7 @@ test_misc8(void) if (storage_size >= (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (MISC8_DIM0 * MISC8_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -1677,7 +1677,7 @@ test_misc8(void) if (storage_size >= (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: data wasn't compressed! storage_size=%u\n", __LINE__, (unsigned)storage_size); -#else /* Compression is not configured */ +#else /* Compression is not configured */ if (storage_size != (4 * MISC8_CHUNK_DIM0 * MISC8_CHUNK_DIM1 * H5Tget_size(H5T_NATIVE_INT))) TestErrPrintf("Error on line %d: wrong storage size! storage_size=%u\n", __LINE__, (unsigned)storage_size); @@ -4995,7 +4995,7 @@ test_misc27(void) H5E_BEGIN_TRY { gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); } H5E_END_TRY; VERIFY(gid, FAIL, "H5Gopen2"); -#else /* H5_STRICT_FORMAT_CHECKS */ +#else /* H5_STRICT_FORMAT_CHECKS */ /* Open group with incorrect # of object header messages */ gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT); CHECK(gid, FAIL, "H5Gopen2"); @@ -5312,7 +5312,7 @@ test_misc31(void) hid_t group_id; /* Group id */ hid_t dtype_id; /* Datatype id */ herr_t ret; /* Generic return value */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ +#endif /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being performed */ MESSAGE(5, ("Deprecated routines initialize after H5close()\n")); @@ -5387,7 +5387,7 @@ test_misc31(void) ret = H5Tclose(dtype_id); CHECK(ret, FAIL, "H5Tclose"); -#else /* H5_NO_DEPRECATED_SYMBOLS */ +#else /* H5_NO_DEPRECATED_SYMBOLS */ /* Output message about test being skipped */ MESSAGE(5, (" ...Skipped")); #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -5436,7 +5436,7 @@ test_misc32(void) CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ buffer = H5allocate_memory(0, TRUE); CHECK_PTR_NULL(buffer, "H5allocate_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ /* RESIZE */ @@ -5455,7 +5455,7 @@ test_misc32(void) #ifdef NDEBUG resized = H5resize_memory(NULL, 0); CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/ -#endif /* NDEBUG */ +#endif /* NDEBUG */ } /* end test_misc32() */ @@ -5613,7 +5613,7 @@ test_misc35(void) CHECK(arr_size_start, 0, "H5get_free_list_sizes"); CHECK(blk_size_start, 0, "H5get_free_list_sizes"); CHECK(fac_size_start, 0, "H5get_free_list_sizes"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(reg_size_start, 0, "H5get_free_list_sizes"); VERIFY(arr_size_start, 0, "H5get_free_list_sizes"); @@ -5652,7 +5652,7 @@ test_misc35(void) CHECK(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats"); CHECK(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats"); -#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ +#else /* H5_MEMORY_ALLOC_SANITY_CHECK */ /* All the values should be == 0 */ VERIFY(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats"); VERIFY(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats"); @@ -5697,10 +5697,10 @@ test_misc(void) test_misc19(); /* Test incrementing & decrementing ref count on IDs */ test_misc20(); /* Test problems with truncated dimensions in version 2 of storage layout message */ #ifdef H5_HAVE_FILTER_SZIP - test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked - datasets w/a filters */ - test_misc22(); /* check szip bits per pixel */ -#endif /* H5_HAVE_FILTER_SZIP */ + test_misc21(); /* Test that "late" allocation time is treated the same as "incremental", for chunked + datasets w/a filters */ + test_misc22(); /* check szip bits per pixel */ +#endif /* H5_HAVE_FILTER_SZIP */ test_misc23(); /* Test intermediate group creation */ test_misc24(); /* Test inappropriate API opens of objects */ test_misc25a(); /* Exercise null object header message merge bug */ diff --git a/test/tsohm.c b/test/tsohm.c index 5bf9d34978a..c484a7932f5 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -819,7 +819,7 @@ test_sohm_size1(void) hsize_t oh_sizes[3]; unsigned oh_size_index = 0; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ hsize_t norm_oh_size; #endif /* Jira HDFFV-10646 */ hsize_t sohm_oh_size; @@ -922,7 +922,7 @@ test_sohm_size1(void) norm_empty_filesize = file_sizes[0]; norm_final_filesize = file_sizes[1]; norm_final_filesize2 = file_sizes[2]; -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ norm_oh_size = oh_sizes[0]; #endif /* Jira HDFFV-10646 */ @@ -941,7 +941,7 @@ test_sohm_size1(void) */ VERIFY(sohm_btree_oh_size, sohm_oh_size, "H5Oget_info_by_name"); -#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ +#if 0 /* TBD: lying comment or bug. See Jira HDFFV-10646 */ /* Object headers in SOHM files should be smaller than normal object * headers. */ @@ -992,7 +992,7 @@ test_sohm_size1(void) * *--------------------------------------------------------------------------- */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ static void test_sohm_size_consistency_open_create(void) { @@ -3821,12 +3821,12 @@ test_sohm(void) { MESSAGE(5, ("Testing Shared Object Header Messages\n")); - test_sohm_fcpl(); /* Test SOHMs and file creation plists */ - test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ - test_sohm_size1(); /* Tests the sizes of files with one SOHM */ -#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ + test_sohm_fcpl(); /* Test SOHMs and file creation plists */ + test_sohm_fcpl_errors(); /* Bogus H5P* calls for SOHMs */ + test_sohm_size1(); /* Tests the sizes of files with one SOHM */ +#if 0 /* TODO: REVEALS BUG TO BE FIXED - SEE JIRA HDFFV-10645 */ test_sohm_size_consistency_open_create(); -#endif /* Jira HDFFV-10645 */ +#endif /* Jira HDFFV-10645 */ test_sohm_attrs(); /* Tests shared messages in attributes */ test_sohm_size2(0); /* Tests the sizes of files with multiple SOHMs */ test_sohm_size2(1); /* Tests the sizes of files with multiple diff --git a/test/ttsafe.c b/test/ttsafe.c index a86081a8e4b..d2085b9b4e8 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -60,7 +60,7 @@ tts_is_threadsafe(void) #ifdef H5_HAVE_THREADSAFE is_ts = FALSE; should_be = TRUE; -#else /* H5_HAVE_THREADSAFE */ +#else /* H5_HAVE_THREADSAFE */ is_ts = TRUE; should_be = FALSE; #endif /* H5_HAVE_THREADSAFE */ diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index a12ea31ae0a..1f0e3d4202b 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -33,9 +33,9 @@ const char *progname_g = "use_disable_mdc_flushes"; /* program name */ /* these two definitions must match each other */ #define UC_DATATYPE H5T_NATIVE_SHORT /* use case HDF5 data type */ -#define UC_CTYPE short /* use case C data type */ -#define UC_RANK 3 /* use case dataset rank */ -#define Chunksize_DFT 256 /* chunksize default */ +#define UC_CTYPE short /* use case C data type */ +#define UC_RANK 3 /* use case dataset rank */ +#define Chunksize_DFT 256 /* chunksize default */ #define Hgoto_error(val) \ { \ ret_value = val; \ diff --git a/test/vds.c b/test/vds.c index 83b86bb3d87..5bbb4fecd9e 100644 --- a/test/vds.c +++ b/test/vds.c @@ -907,7 +907,7 @@ test_api(test_api_config_t config, hid_t fapl) TEST_ERROR ex_dcpl = -1; -#else /* VDS_POINT_SELECTIONS */ +#else /* VDS_POINT_SELECTIONS */ /* * Test 3: Verify point selections fail diff --git a/test/vfd.c b/test/vfd.c index a3bab1d2cec..373a57ed1e0 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -617,7 +617,7 @@ test_direct(void) #ifndef H5_HAVE_DIRECT SKIPPED(); return 0; -#else /*H5_HAVE_DIRECT*/ +#else /*H5_HAVE_DIRECT*/ /* Set property list and file name for Direct driver. Set memory alignment boundary * and file block size to 512 which is the minimum for Linux 2.6. */ @@ -2185,7 +2185,7 @@ test_ros3(void) #ifndef H5_HAVE_ROS3_VFD SKIPPED(); return 0; -#else /* H5_HAVE_ROS3_VFD */ +#else /* H5_HAVE_ROS3_VFD */ /* Set property list and file name for ROS3 driver. */ if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) diff --git a/testpar/t_cache.c b/testpar/t_cache.c index a1f3aac5014..c967b956e52 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -2460,7 +2460,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, FUNC); } -#if 0 /* This has been useful debugging code -- keep it for now. */ +#if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { HDfprintf(stdout, @@ -6874,7 +6874,7 @@ main(int argc, char **argv) H5open(); express_test = do_express_test(); -#if 0 /* JRM */ +#if 0 /* JRM */ express_test = 0; #endif /* JRM */ if (express_test) { diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index ee0db3480fb..7ac0adfa94b 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -24,7 +24,7 @@ static int mpi_size, mpi_rank; #define DSET_NAME "ExtendibleArray" #define CHUNK_SIZE 1000 /* #elements per chunk */ -#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ +#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ #define CLOSE 1 #define NO_CLOSE 0 diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 5f4b53f0827..706e90ce383 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -344,7 +344,7 @@ test_filter_read(void) VRFY(hrc >= 0, "H5Pclose"); } #endif /* H5_HAVE_FILTER_SZIP */ - } /* end for */ + } /* end for */ /*---------------------------------------------------------- * STEP 4: Test shuffling by itself. diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index f3cbed09012..baaa152a4b6 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -162,9 +162,9 @@ test_mpio_overlap_writes(char *filename) return (nerrs); } -#define MB 1048576 /* 1024*1024 == 2**20 */ -#define GB 1073741824 /* 1024**3 == 2**30 */ -#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ +#define MB 1048576 /* 1024*1024 == 2**20 */ +#define GB 1073741824 /* 1024**3 == 2**30 */ +#define TWO_GB_LESS1 2147483647 /* 2**31 - 1 */ #define FOUR_GB_LESS1 4294967295L /* 2**32 - 1 */ /* * Verify that MPI_Offset exceeding 2**31 can be computed correctly. diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index be3393201cd..00dd9ac717b 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -583,7 +583,7 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) { #if HS_DR_PIO_TEST__TAKEDOWN__DEBUG const char *fcnName = "hs_dr_pio_test__takedown()"; -#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ +#endif /* HS_DR_PIO_TEST__TAKEDOWN__DEBUG */ int mpi_rank; /* needed by the VRFY macro */ herr_t ret; /* Generic return value */ @@ -3694,7 +3694,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i { #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__run_test()"; -#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ +#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ int mpi_rank; /* needed by VRFY */ struct hs_dr_pio_test_vars_t test_vars = { /* int mpi_size = */ -1, diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index d1d0d9dbe50..a821e6ffbb2 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -37,10 +37,10 @@ enum H5TEST_COLL_CHUNK_API { #endif /* Constants definitions */ -#define DIM0 600 /* Default dataset sizes. */ +#define DIM0 600 /* Default dataset sizes. */ #define DIM1 1200 /* Values are from a monitor pixel sizes */ -#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ -#define COL_FACTOR 16 /* Nominal column factor for dataset size */ +#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ +#define COL_FACTOR 16 /* Nominal column factor for dataset size */ #define RANK 2 #define DATASETNAME1 "Data1" #define DATASETNAME2 "Data2" @@ -94,73 +94,73 @@ enum H5TEST_COLL_CHUNK_API { /*Constants for MPI derived data type generated from span tree */ -#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ +#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */ #define MSPACE1_DIM 27000 /* Dataset size in memory */ -#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ -#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ +#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ +#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ #define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 -#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ #define FHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ -#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ -#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ -#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ -#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ +#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/ +#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/ +#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define FHBLOCK1 2 /* Block of the second dimension of the first hyperslab selection*/ +#define FHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define FHSTART1 1 /* start of the second dimension of the first hyperslab selection*/ -#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ -#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ -#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ +#define SHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/ +#define SHCOUNT1 1 /* Count of the second dimension of the first hyperslab selection*/ +#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/ #define SHBLOCK1 768 /* Block of the second dimension of the first hyperslab selection*/ -#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ -#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/ +#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ #define MHCOUNT0 6912 /* Count of the first dimension of the first hyperslab selection*/ -#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFFHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RFFHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ -#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RFSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ -#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ +#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RFSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RFSHSTART0 2 /* start of the first dimension of the first hyperslab selection*/ +#define RFSHSTART1 4 /* start of the second dimension of the first hyperslab selection*/ -#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/ -#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ -#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ +#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMFHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMFHSTART0 0 /* start of the first dimension of the first hyperslab selection*/ +#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/ -#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ +#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/ #define RMSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/ -#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ -#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ -#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ -#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ -#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ -#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ +#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/ +#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/ +#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/ +#define RMSHBLOCK1 1 /* Block of the second dimension of the first hyperslab selection*/ +#define RMSHSTART0 1 /* start of the first dimension of the first hyperslab selection*/ +#define RMSHSTART1 2 /* start of the second dimension of the first hyperslab selection*/ #define NPOINTS \ 4 /* Number of points that will be selected \ diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 6d3e19bf445..09cea041916 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -665,7 +665,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj1fullname, "/%s", objname1) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj1fullname = (char *)HDmalloc(HDstrlen(objname1) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -684,7 +684,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char /* Use the asprintf() routine, since it does what we're trying to do below */ if (HDasprintf(&obj2fullname, "/%s", objname2) < 0) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ /* (malloc 2 more for "/" and end-of-line) */ if ((obj2fullname = (char *)HDmalloc(HDstrlen(objname2) + 2)) == NULL) H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1143,7 +1143,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj1_fullpath, "%s%s", grp1_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj1_fullpath = (char *)HDmalloc(HDstrlen(grp1_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1161,7 +1161,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, if (HDasprintf(&obj2_fullpath, "%s%s", grp2_path, table->objs[i].name) < 0) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); } -#else /* H5_HAVE_ASPRINTF */ +#else /* H5_HAVE_ASPRINTF */ if ((obj2_fullpath = (char *)HDmalloc(HDstrlen(grp2_path) + HDstrlen(table->objs[i].name) + 1)) == NULL) { H5TOOLS_ERROR(H5DIFF_ERR, "name buffer allocation failed"); @@ -1357,7 +1357,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id, } /* end else */ } /* end if */ } /* end else */ -#endif /* H5_HAVE_PARALLEL */ +#endif /* H5_HAVE_PARALLEL */ if (obj1_fullpath) HDfree(obj1_fullpath); if (obj2_fullpath) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 211c548d5bb..3fcff169efc 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1057,7 +1057,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co } nfound += diff_ldouble_element(mem1, mem2, elemtno, opts); } /*H5T_NATIVE_LDOUBLE*/ -#endif /* H5_SIZEOF_LONG_DOUBLE */ +#endif /* H5_SIZEOF_LONG_DOUBLE */ break; /* H5T_FLOAT class */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 761a7046717..b33015726dd 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -932,7 +932,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong); } } /* end if (sizeof(long long) == nsize) */ -#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ +#endif /* H5_SIZEOF_LONG != H5_SIZEOF_LONG_LONG */ break; case H5T_COMPOUND: @@ -1197,7 +1197,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai for (x = 0; x < ctx->indent_level + 1; x++) h5tools_str_append(str, "%s", OPT(info->line_indent, "")); } /* end if */ -#endif /* LATER */ +#endif /* LATER */ ctx->indent_level++; diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 9392ca33c49..b4198ad7a50 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -83,7 +83,7 @@ typedef struct { dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0}; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 56734cf8207..6ccd15951f1 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -80,7 +80,7 @@ typedef struct { } dump_opt_t; extern dump_opt_t dump_opts; -#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ +#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */ #define PACKED_BITS_SIZE_MAX 8 * sizeof(long long) /* Maximum bits size of integer types of packed-bits */ /* mask list for packed bits */ extern unsigned long long diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index dddac79ec34..09a89be6ba0 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -273,8 +273,8 @@ typedef struct s1_t { /* File 65 macros */ #define STRATEGY H5F_FSPACE_STRATEGY_NONE /* File space handling strategy */ -#define THRESHOLD10 10 /* Free-space section threshold */ -#define FSPACE_PAGE_SIZE 8192 /* File space page size */ +#define THRESHOLD10 10 /* Free-space section threshold */ +#define FSPACE_PAGE_SIZE 8192 /* File space page size */ /* "FILE66" macros and for FILE69, FILE87 */ #define F66_XDIM 8 diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 461b7fd34f1..6d467e1ddf2 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -464,7 +464,7 @@ parse_args(int argc, char **argv) * End: */ -#else /* H5_HAVE_PARALLEL */ +#else /* H5_HAVE_PARALLEL */ /* dummy program since H5_HAVE_PARALLEL is not configured in */ int main(int H5_ATTR_UNUSED argc, char H5_ATTR_UNUSED **argv) diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index 9fb9800f5f9..0e0ac262b25 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -224,14 +224,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -458,7 +458,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #define HDstrdup(S) strdup(S) diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index 03acf4074fd..02ec6c6b00f 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -239,14 +239,14 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ #define HDisatty(F) isatty(F) -#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ -#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ -#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ -#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ -#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ -#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ -#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ -#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ +#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ +#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ +#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ +#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ +#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ +#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ +#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ +#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ #define HDkill(P, S) kill(P, S) #define HDlabs(X) labs(X) @@ -473,7 +473,7 @@ H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) #else /* H5_HAVE_WIN32_API */ #if !defined strdup && !defined H5_HAVE_STRDUP -extern char *strdup(const char *s); +extern char * strdup(const char *s); #endif #define HDstrdup(S) strdup(S) From 51e53781c9ab3e372643259629e7da7a2dfe9877 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 1 Feb 2021 07:06:55 -0600 Subject: [PATCH 05/66] Merge CMake changes from develop --- CMakeFilters.cmake | 28 +++- CMakeLists.txt | 74 +++++++--- CTestConfig.cmake | 2 +- MANIFEST | 2 +- c++/src/CMakeLists.txt | 2 +- config/cmake/ConfigureChecks.cmake | 25 ++-- config/cmake/HDF5PluginMacros.cmake | 10 +- config/cmake/HDF5UseFortran.cmake | 44 ++++-- config/cmake/HDFCXXCompilerFlags.cmake | 8 +- config/cmake/HDFCompilerFlags.cmake | 9 +- config/cmake/HDFFortranCompilerFlags.cmake | 8 +- config/cmake/fileCompareTest.cmake | 27 ++-- config/cmake_ext_mod/ConfigureChecks.cmake | 60 ++++++-- config/cmake_ext_mod/FindSZIP.cmake | 4 +- config/cmake_ext_mod/HDFMacros.cmake | 14 +- config/cmake_ext_mod/HDFUseCXX.cmake | 12 +- config/cmake_ext_mod/HDFUseFortran.cmake | 16 ++- config/cmake_ext_mod/grepTest.cmake | 10 +- config/{cmake => }/libhdf5.pc.in | 0 fortran/src/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- java/CMakeLists.txt | 10 +- m4/ax_jni_include_dir.m4 | 18 ++- release_docs/RELEASE.txt | 52 +++++-- src/CMakeLists.txt | 8 +- test/flushrefreshTest.cmake | 2 +- tools/lib/h5tools_utils.c | 48 ++++--- tools/src/h5diff/h5diff_common.c | 30 ++-- tools/src/h5dump/h5dump.c | 132 +++++++++--------- tools/src/h5repack/h5repack.c | 2 +- tools/src/h5repack/h5repack_main.c | 1 + .../test/h5repack/testfiles/h5repack-help.txt | 1 + 34 files changed, 422 insertions(+), 245 deletions(-) rename config/{cmake => }/libhdf5.pc.in (100%) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 9a0719f1dc9..26900a08511 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -32,7 +32,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME}) if (NOT EXISTS "${ZLIB_URL}") set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter ZLIB file ${ZLIB_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found") + endif () endif () set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME}) if (USE_LIBAEC) @@ -40,7 +42,9 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT endif () if (NOT EXISTS "${SZIP_URL}") set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE) - message (STATUS "Filter SZIP file ${SZIP_URL} not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP file ${SZIP_URL} not found") + endif () endif () else () set (ZLIB_USE_EXTERNAL 0) @@ -76,7 +80,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) set (H5_HAVE_FILTER_DEFLATE 1) set (H5_HAVE_ZLIB_H 1) set (H5_HAVE_LIBZ 1) - message (STATUS "Filter ZLIB is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is built") + endif () else () message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") endif () @@ -92,7 +98,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) - message (STATUS "Filter ZLIB is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter ZLIB is ON") + endif () endif () #----------------------------------------------------------------------------- @@ -122,9 +130,13 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set (H5_HAVE_FILTER_SZIP 1) set (H5_HAVE_SZLIB_H 1) set (H5_HAVE_LIBSZ 1) - message (STATUS "Filter SZIP is built") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is built") + endif () if (USE_LIBAEC) - message (STATUS "... with library AEC") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "... with library AEC") + endif () set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME}) else () set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME}) @@ -135,7 +147,9 @@ if (HDF5_ENABLE_SZIP_SUPPORT) endif () set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY}) INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS}) - message (STATUS "Filter SZIP is ON") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Filter SZIP is ON") + endif () if (H5_HAVE_FILTER_SZIP) set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE") endif () diff --git a/CMakeLists.txt b/CMakeLists.txt index 10812cb75cb..5665f98b9b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,8 @@ set (CMAKE_IGNORE_EOL "--ignore-eol") if (CMAKE_VERSION VERSION_LESS "3.14.0") set (CMAKE_IGNORE_EOL "") if (WIN32) - message (FATAL_ERROR "Windows builds requires a minimum of CMake 3.14") + message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14") endif() -else () endif () #----------------------------------------------------------------------------- @@ -204,6 +203,7 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") #----------------------------------------------------------------------------- # Define some CMake variables for use later in the project #----------------------------------------------------------------------------- +set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config) set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake) set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod) set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src) @@ -239,7 +239,9 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" "\\1" H5_VERS_RELEASE ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) -#message (STATUS "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") +endif () #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO @@ -252,7 +254,9 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE}) -message (STATUS "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}") +endif () string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" @@ -262,7 +266,9 @@ if (H5_TOOLS_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE}) - message (STATUS "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_CXX_SOVERS_EXISTS) @@ -273,7 +279,9 @@ if (H5_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_F_SOVERS_EXISTS) @@ -284,7 +292,9 @@ if (H5_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_SOVERS_EXISTS) @@ -295,7 +305,9 @@ if (H5_HL_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_CXX_SOVERS_EXISTS) @@ -306,7 +318,9 @@ if (H5_HL_CXX_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents}) if (H5_HL_F_SOVERS_EXISTS) @@ -317,7 +331,9 @@ if (H5_HL_F_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE}) - message (STATUS "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}") + endif () endif () string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents}) if(H5_JAVA_SOVERS_EXISTS) @@ -328,7 +344,9 @@ if(H5_JAVA_SOVERS_EXISTS) string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents}) math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE}) - message (STATUS "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}") + endif () endif () #----------------------------------------------------------------------------- @@ -777,39 +795,51 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF) if (HDF5_ENABLE_THREADSAFE) # check for unsupported options if (WIN32) - message (STATUS " **** thread-safety option not supported with static library **** ") - message (STATUS " **** thread-safety option will not be used building static library **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** thread-safety option not supported with static library **** ") + message (VERBOSE " **** thread-safety option will not be used building static library **** ") + endif () endif () if (HDF5_ENABLE_PARALLEL) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_FORTRAN) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_CPP_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ") + endif () endif () endif () if (HDF5_BUILD_HL_LIB) if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported HL and thread-safety options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ") + endif () endif () endif () if (H5_HAVE_IOEO) - message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ") + endif () set (H5_HAVE_WIN_THREADS 1) else () if (NOT H5_HAVE_PTHREAD_H) @@ -983,7 +1013,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for if (HDF5_BUILD_FORTRAN) include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + endif () include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake) include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) set (LINK_Fortran_LIBS ${LINK_LIBS}) @@ -1032,7 +1064,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (NOT ALLOW_UNSUPPORTED) message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ") else () - message (STATUS " **** Allowing unsupported Parallel and C++ options **** ") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ") + endif () endif () endif () diff --git a/CTestConfig.cmake b/CTestConfig.cmake index fbc073eff1f..75281dd7bdb 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -18,7 +18,7 @@ set (CTEST_PROJECT_NAME "HDF5") set (CTEST_NIGHTLY_START_TIME "18:00:00 CST") -set (CTEST_DROP_METHOD "http") +set (CTEST_DROP_METHOD "https") if (CTEST_DROP_SITE_INIT) set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}") else () diff --git a/MANIFEST b/MANIFEST index 88ac94c0cd7..3faf82ce920 100644 --- a/MANIFEST +++ b/MANIFEST @@ -139,6 +139,7 @@ ./config/ibm-flags ./config/intel-fflags ./config/intel-flags +./config/libhdf5.pc.in ./config/linux-gnu ./config/linux-gnuaout ./config/linux-gnueabihf @@ -3391,7 +3392,6 @@ ./config/cmake/HDF5UseFortran.cmake ./config/cmake/jrunTest.cmake ./config/cmake/libh5cc.in -./config/cmake/libhdf5.pc.in ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/mccacheinit.cmake ./config/cmake/patch.xml diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 13eb7953694..8608c678062 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -198,7 +198,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index ab121e9c581..abdde7026f1 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -165,14 +165,18 @@ if (NOT WINDOWS) add_definitions ("-D_GNU_SOURCE") else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () else () set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) @@ -192,7 +196,7 @@ option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF) list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) else () - message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") + message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") endif () endif () @@ -209,7 +213,7 @@ if (H5FD_ENABLE_MIRROR_VFD) ${HDF_PREFIX}_HAVE_FORK) set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1) else() - message(STATUS "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") + message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.") endif() endif() @@ -235,7 +239,6 @@ endif () #----------------------------------------------------------------------------- macro (H5ConversionTests TEST msg) if (NOT DEFINED ${TEST}) - # message (STATUS "===> ${TEST}") TRY_RUN (${TEST}_RUN ${TEST}_COMPILE ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_DIR}/ConversionTests.c @@ -245,17 +248,23 @@ macro (H5ConversionTests TEST msg) if (${TEST}_COMPILE) if (${TEST}_RUN MATCHES 0) set (${TEST} 1 CACHE INTERNAL ${msg}) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif () else () set (${TEST} "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" ) diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake index a858353f37f..4e05399becb 100644 --- a/config/cmake/HDF5PluginMacros.cmake +++ b/config/cmake/HDF5PluginMacros.cmake @@ -14,7 +14,9 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) ) endif () FetchContent_GetProperties(PLUGIN) - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () if(NOT PLUGIN_POPULATED) FetchContent_Populate(PLUGIN) include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake) @@ -65,8 +67,10 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type) add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET}) target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}") endif () - endif() - message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}") + endif () set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}") set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}") set (PLUGIN_LIBRARY "PLUGIN") diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 4350b7afa2d..8579b7385d2 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -41,7 +41,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR) - message (STATUS "Detecting Fortran ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}") + endif () file (WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 "${SOURCE_CODE}" @@ -55,18 +57,24 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 if (${COMPILE_RESULT_VAR}) set(${RETURN_VAR} ${RUN_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 0) - message (STATUS "Testing Fortran ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION_NAME} exists passed\n" ) else () - message (STATUS "Testing Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n" ) endif () else () - message (STATUS "Compiling Fortran ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n" ) @@ -281,7 +289,9 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}") set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}") -message (STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}") +endif () # ********** # REALS # ********** @@ -442,7 +452,9 @@ else () # so this one is used. #----------------------------------------------------------------------------- macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) - message (STATUS "Detecting C ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting C ${FUNCTION_NAME}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -462,22 +474,28 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) set (${RETURN_VAR} ${OUTPUT_VAR}) - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") - #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #endif () if (${COMPILE_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 1) set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") - message (STATUS "Testing C ${FUNCTION_NAME} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n" "${OUTPUT_VAR}\n\n" ) else () - message (STATUS "Testing C ${FUNCTION_NAME} - Fail") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail") + endif () set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n" diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 7bbebbc9160..48da0c66269 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -14,7 +14,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -96,7 +98,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 31af2f8c4b2..b8139245c6f 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -15,7 +15,9 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE) set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") -message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") +endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- @@ -107,7 +109,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") endif () - message (STATUS "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}") + endif () endif () #----------------------------------------------------------------------------- @@ -132,7 +136,6 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 2bbb35d8d82..c7f085ceab2 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -10,7 +10,9 @@ # help@hdfgroup.org. # -message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}") +endif () #----------------------------------------------------------------------------- # Option to allow the user to disable compiler warnings @@ -64,7 +66,9 @@ if (NOT MSVC AND NOT MINGW) elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03") endif () - message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}") + endif () if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake index d913da02973..2f968fac02d 100644 --- a/config/cmake/fileCompareTest.cmake +++ b/config/cmake/fileCompareTest.cmake @@ -24,9 +24,6 @@ endif () if (NOT TEST_FUNCTION) message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () set (TEST_ONE_SIZE 0) set (TEST_TWO_SIZE 0) @@ -53,7 +50,9 @@ if (TEST_STRINGS STREQUAL "YES") RESULT_VARIABLE TEST_RESULT ) - message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}") + endif () # if the return value is !=${TEST_EXPECT} bail out if (NOT TEST_RESULT EQUAL TEST_EXPECT) message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}") @@ -66,31 +65,41 @@ else () file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE) if (TEST_FUNCTION MATCHES "LT") if (TEST_ONE_SIZE LESS TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "LTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "EQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GTEQ") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}") endif () elseif (TEST_FUNCTION MATCHES "GT") if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE) - message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}") + endif () else () message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}") endif () diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 7988772d70c..5fa6ca12acd 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -224,7 +224,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () try_compile (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFTests.c @@ -234,9 +236,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST}) set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}") - message (STATUS "Performing Other Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing Other Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed") + endif () set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}") file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing Other Test ${OTHER_TEST} failed with the following output:\n" @@ -297,17 +303,23 @@ if (MINGW OR NOT WINDOWS) set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg}) set (LARGEFILE 1) set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) - message (STATUS "${msg}... yes") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... yes") + endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n" ) endif () else () set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) - message (STATUS "${msg}... no") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${msg}... no") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Test TEST_LFS_WORKS Compile failed\n" ) @@ -340,11 +352,15 @@ endif () macro (HDF_CHECK_TYPE_SIZE type var) set (aType ${type}) set (aVar ${var}) -# message (STATUS "Checking size of ${aType} and storing into ${aVar}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Checking size of ${aType} and storing into ${aVar}") + endif () CHECK_TYPE_SIZE (${aType} ${aVar}) if (NOT ${aVar}) set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}") -# message (STATUS "Size of ${aType} was NOT Found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Size of ${aType} was NOT Found") + endif () endif () endmacro () @@ -574,7 +590,9 @@ endif () #----------------------------------------------------------------------------- if (WINDOWS) if (NOT HDF_NO_IOEO_TEST) - message (STATUS "Checking for InitOnceExecuteOnce:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for InitOnceExecuteOnce:") + endif () if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO) if (LARGEFILE) set (CMAKE_REQUIRED_DEFINITIONS @@ -603,7 +621,9 @@ if (WINDOWS) # if the return value was 0 then it worked if ("${HAVE_IOEO_EXITCODE}" EQUAL 0) set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce") - message (STATUS "Performing Test InitOnceExecuteOnce - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Success") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n" "${OUTPUT}\n" @@ -615,7 +635,9 @@ if (WINDOWS) set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce") endif () - message (STATUS "Performing Test InitOnceExecuteOnce - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing InitOnceExecuteOnce Test failed with the following output:\n" "${OUTPUT}\n" @@ -638,7 +660,9 @@ endforeach () #----------------------------------------------------------------------------- if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown") set (PRINT_LL_FOUND 0) - message (STATUS "Checking for appropriate format for 64 bit long:") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long:") + endif () set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH") if (${HDF_PREFIX}_SIZEOF_LONG_LONG) set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG") @@ -655,7 +679,9 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll") set (PRINT_LL_FOUND 1) else () - message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + endif () endif () else () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log @@ -664,9 +690,13 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES " endif () if (PRINT_LL_FOUND) - message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}") + endif () else () - message (STATUS "Checking for appropriate format for 64 bit long: not found") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Checking for appropriate format for 64 bit long: not found") + endif () set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll" ) diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 8f882b4a5fa..6ac20994c7a 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -118,7 +118,9 @@ if (NOT SZIP_FOUND) "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." ) if (NOT SZIP_FIND_QUIETLY) - message (STATUS "${SZIP_DIR_MESSAGE}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "${SZIP_DIR_MESSAGE}") + endif () else () if (SZIP_FIND_REQUIRED) message (FATAL_ERROR "SZip was NOT found and is Required by this project") diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 952b766d1b5..15b51177f4c 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -28,7 +28,9 @@ macro (SET_HDF_BUILD_TYPE) endif() endif() if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.") + endif() set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" @@ -126,10 +128,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) - #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME) - #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG) - #get_property (target_name_rwdi TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO) - #message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}") if (${libtype} MATCHES "STATIC") if (WIN32) @@ -458,19 +456,19 @@ endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) file (STRINGS ${infile} TEST_FLAG_STREAM) - #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") + #message (TRACE "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}") list (LENGTH TEST_FLAG_STREAM len_flag) if (len_flag GREATER 0) math (EXPR _FP_LEN "${len_flag} - 1") foreach (line RANGE 0 ${_FP_LEN}) list (GET TEST_FLAG_STREAM ${line} str_flag) string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}") - #message (STATUS "str_flag=${str_flag}") + #message (TRACE "str_flag=${str_flag}") if (str_flag) list (APPEND ${h5_flag_var} "${str_flag}") endif () endforeach () endif () - #message (STATUS "h5_flag_var=${${h5_flag_var}}") + #message (TRACE "h5_flag_var=${${h5_flag_var}}") endmacro () diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 8d981479912..efce42f0d9c 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -70,7 +70,9 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) endif () - #message (STATUS "Performing ${OTHER_TEST}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "Performing ${OTHER_TEST}") + endif () TRY_COMPILE (${OTHER_TEST} ${CMAKE_BINARY_DIR} ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp @@ -80,9 +82,13 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) ) if (${OTHER_TEST} EQUAL 0) set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}") - message (STATUS "Performing CXX Test ${OTHER_TEST} - Success") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success") + endif () else () - message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed") + endif () set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}") file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing CXX Test ${OTHER_TEST} failed with the following output:\n" diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 0a6a0926ddb..2da7148dc36 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -135,7 +135,9 @@ else () # so this one is used for a sizeof test. #----------------------------------------------------------------------------- macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) - message (STATUS "Testing Fortran ${FUNCTION}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION}") + endif () if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") @@ -153,13 +155,17 @@ else () OUTPUT_VARIABLE OUTPUT ) - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - # message (STATUS "Test result ${OUTPUT}") - # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (TRACE "Test result ${OUTPUT}") + # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # endif () if (${RESULT_VAR}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - message (STATUS "Testing Fortran ${FUNCTION} - OK") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing Fortran ${FUNCTION} - OK") + endif () file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n" diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 758b62b177c..cf7071d5249 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -16,18 +16,12 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () -#if (NOT TEST_ARGS) -# message (STATUS "Require TEST_ARGS to be defined") -#endif () if (NOT TEST_FOLDER) message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") endif () -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif () if (NOT TEST_FILTER) message (STATUS "Optional TEST_FILTER to be defined") endif () @@ -55,7 +49,9 @@ endif () if (TEST_ENV_VAR) set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") - #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") + endif () endif () # run the test program, capture the stdout/stderr and the result var diff --git a/config/cmake/libhdf5.pc.in b/config/libhdf5.pc.in similarity index 100% rename from config/cmake/libhdf5.pc.in rename to config/libhdf5.pc.in diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 808a2814c87..459ac5a319c 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -536,7 +536,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 0c9b04b6d63..1eac9fe9228 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -109,7 +109,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index d35ca3b639c..0b7795b45de 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -342,7 +342,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 91953b00804..785bdcfc784 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -141,7 +141,7 @@ set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}") configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 416e495707e..5c79bd3b700 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -9,10 +9,14 @@ find_package (Java) #----------------------------------------------------------------------------- include (${HDF_RESOURCES_DIR}/UseJava.cmake) -message (STATUS "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JAVA: JAVA_HOME=$ENV{JAVA_HOME} JAVA_ROOT=$ENV{JAVA_ROOT}") +endif () find_package (JNI) -message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}") -message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "JNI_LIBRARIES=${JNI_LIBRARIES}") + message (VERBOSE "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") +endif () if (WIN32) diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4 index ae7a5f042be..cd720987b74 100644 --- a/m4/ax_jni_include_dir.m4 +++ b/m4/ax_jni_include_dir.m4 @@ -73,13 +73,19 @@ fi case "$host_os" in darwin*) # Apple Java headers are inside the Xcode bundle. - macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') - if @<:@ "$macos_version" -gt "7" @:>@; then - _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" + major_macos_version=$(sw_vers -productVersion | sed -n -e 's/^\(@<:@0-9@:>@*\).@<:@0-9@:>@*.@<:@0-9@:>@*/\1/p') + if @<:@ "$major_macos_version" -gt "10" @:>@; then + _JTOPDIR="$(/usr/libexec/java_home)" + _JINC="$_JTOPDIR/include" else - _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" - _JINC="$_JTOPDIR/Headers" + macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') + if @<:@ "$macos_version" -gt "7" @:>@; then + _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" + _JINC="$_JTOPDIR/Headers" + else + _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" + _JINC="$_JTOPDIR/Headers" + fi fi ;; *) _JINC="$_JTOPDIR/include";; diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 3497f59c377..942022ceba7 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -147,7 +147,14 @@ New Features Tools: ------ - - + - h5repack added help text for user-defined filters. + + Added help text line that states the valid values of the filter flag + for user-defined filters; + filter_flag: 1 is OPTIONAL or 0 is MANDATORY + + (ADB - 2021/01/14, HDFFV-11099) + High-Level APIs: --------------- @@ -188,8 +195,21 @@ Bug Fixes since HDF5-1.10.7 release (PGT,ADB - 2020/12/29, HDFFV-10865) + Configuration ------------- + - Reclassify CMake messages, to allow new modes and --log-level option + + CMake message commands have a mode argument. By default, STATUS mode + was chosen for any non-error message. CMake version 3.15 added additional + modes, NOTICE, VERBOSE, DEBUG and TRACE. All message commands with a mode + of STATUS were reviewed and most were reclassified as VERBOSE. The new + mode was protected by a check for a CMake version of at least 3.15. If CMake + version 3.17 or above is used, the user can use the command line option + of "--log-level" to further restrict which message commands are displayed. + + (ADB - 2021/01/11, HDFFV-11144) + - Fixes Autotools determination of the stat struct having an st_blocks field A missing parenthesis in an autoconf macro prevented building the test @@ -199,40 +219,46 @@ Bug Fixes since HDF5-1.10.7 release CMake. This #define is only used in the tests and does not affect the HDF5 C library. - (DER - 2021/07/01, HDFFV-11201) - - Performance - ------------- - - + (DER - 2021/01/07, HDFFV-11201) - Fortran - -------- - - Tools ----- - - + - Fixed tools argument parsing. - High-Level APIs: - ------ + Tools parsing used the length of the option from the long array to match + the option from the command line. This incorrectly matched a shorter long + name option that was happened to be a subset of another long option. + Changed to match whole names. + + (ADB - 2021/01/19, HDFFV-11106) + + + Fortran API + ----------- - - Fortran High-Level APIs: + + High-Level Library ------ - + Documentation ------------- - + F90 APIs -------- - + C++ APIs -------- - + Testing ------- - diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cbf3e66c195..329a2dcdc96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -420,6 +420,7 @@ set (H5MP_HDRS ) IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" ) + set (H5O_SOURCES ${HDF5_SRC_DIR}/H5O.c ${HDF5_SRC_DIR}/H5Oainfo.c @@ -938,7 +939,7 @@ if (HDF5_GENERATE_HEADERS) ) message(STATUS ${SCRIPT_OUTPUT}) else () - message (STATUS "Cannot generate headers - perl not found") + message (WARNING "Cannot generate headers - perl not found") endif () endif () @@ -1056,7 +1057,8 @@ else () ) if (BUILD_SHARED_LIBS) add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 + OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" COMMAND ${CMAKE_COMMAND} @@ -1269,7 +1271,7 @@ set (_PKG_CONFIG_REQUIRES) set (_PKG_CONFIG_REQUIRES_PRIVATE) configure_file ( - ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF_CONFIG_DIR}/libhdf5.pc.in ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc @ONLY ) diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake index 6faf37b8d0f..e280b8bb51a 100644 --- a/test/flushrefreshTest.cmake +++ b/test/flushrefreshTest.cmake @@ -41,7 +41,7 @@ endif () message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_LIBRARY_DIRECTORY) - if (WIN32 OR MINGW) + if (WIN32) set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 8f8d3726301..c8442e2c62f 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -194,44 +194,50 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') { /* long command line option */ - const char *arg = &argv[opt_ind][2]; - int i; + int i; + const char ch = '='; + char * arg = &argv[opt_ind][2]; + size_t arg_len = 0; + + opt_arg = strchr(&argv[opt_ind][2], ch); + arg_len = HDstrlen(&argv[opt_ind][2]); + if (opt_arg) { + arg_len -= HDstrlen(opt_arg); + opt_arg++; /* skip the equal sign */ + } + arg[arg_len] = 0; for (i = 0; l_opts && l_opts[i].name; i++) { size_t len = HDstrlen(l_opts[i].name); - if (HDstrncmp(arg, l_opts[i].name, len) == 0) { + if (HDstrcmp(arg, l_opts[i].name) == 0) { /* we've found a matching long command line flag */ opt_opt = l_opts[i].shortval; if (l_opts[i].has_arg != no_arg) { - if (arg[len] == '=') { - opt_arg = &arg[len + 1]; - } - else if (l_opts[i].has_arg != optional_arg) { - if (opt_ind < (argc - 1)) - if (argv[opt_ind + 1][0] != '-') - opt_arg = argv[++opt_ind]; - } - else if (l_opts[i].has_arg == require_arg) { - if (opt_err) - HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], - arg); - - opt_opt = '?'; + if (opt_arg == NULL) { + if (l_opts[i].has_arg != optional_arg) { + if (opt_ind < (argc - 1)) + if (argv[opt_ind + 1][0] != '-') + opt_arg = argv[++opt_ind]; + } + else if (l_opts[i].has_arg == require_arg) { + if (opt_err) + HDfprintf(rawerrorstream, "%s: option required for \"--%s\" flag\n", argv[0], + arg); + + opt_opt = '?'; + } } - else - opt_arg = NULL; } else { - if (arg[len] == '=') { + if (opt_arg) { if (opt_err) HDfprintf(rawerrorstream, "%s: no option required for \"%s\" flag\n", argv[0], arg); opt_opt = '?'; } - opt_arg = NULL; } break; } diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 49ba14c8784..008c035837a 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -25,7 +25,7 @@ static int check_d_input(const char *); * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVrv:qn:d:p:NcelxE:A:S"; +static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -247,33 +247,27 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char case 'v': opts->mode_verbose = 1; - /* This for loop is for handling style like - * -v, -v1, --verbose, --verbose=1. - */ for (i = 1; i < argc; i++) { /* - * short opt + * special check for short opt */ - if (!strcmp(argv[i], "-v")) { /* no arg */ - opt_ind--; + if (!strcmp(argv[i], "-v")) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = 0; break; } else if (!strncmp(argv[i], "-v", (size_t)2)) { + if (opt_arg != NULL) + opt_ind--; opts->mode_verbose_level = atoi(&argv[i][2]); break; } - - /* - * long opt - */ - if (!strcmp(argv[i], "--verbose")) { /* no arg */ - opts->mode_verbose_level = 0; - break; - } - else if (!strncmp(argv[i], "--verbose", (size_t)9) && argv[i][9] == '=') { - opts->mode_verbose_level = atoi(&argv[i][10]); - break; + else { + if (opt_arg != NULL) + opts->mode_verbose_level = HDatoi(opt_arg); + else + opts->mode_verbose_level = 0; } } break; diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 93284907330..f8d929e4d0b 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -77,39 +77,8 @@ struct handler_t { */ /* The following initialization makes use of C language concatenating */ /* "xxx" "yyy" into "xxxyyy". */ -static const char * s_opts = "hn*peyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o*b*F:s:S:A*q:z:m:RE*CM:O*N:vG:"; -static struct long_options l_opts[] = {{"help", no_arg, 'h'}, - {"hel", no_arg, 'h'}, - {"contents", optional_arg, 'n'}, - {"properties", no_arg, 'p'}, - {"superblock", no_arg, 'B'}, - {"boot-block", no_arg, 'B'}, - {"boot-bloc", no_arg, 'B'}, - {"boot-blo", no_arg, 'B'}, - {"boot-bl", no_arg, 'B'}, - {"boot-b", no_arg, 'B'}, - {"boot", no_arg, 'B'}, - {"boo", no_arg, 'B'}, - {"bo", no_arg, 'B'}, - {"header", no_arg, 'H'}, - {"heade", no_arg, 'H'}, - {"head", no_arg, 'H'}, - {"hea", no_arg, 'H'}, - {"object-ids", no_arg, 'i'}, - {"object-id", no_arg, 'i'}, - {"object-i", no_arg, 'i'}, - {"object", no_arg, 'i'}, - {"objec", no_arg, 'i'}, - {"obje", no_arg, 'i'}, - {"obj", no_arg, 'i'}, - {"ob", no_arg, 'i'}, - {"version", no_arg, 'V'}, - {"versio", no_arg, 'V'}, - {"versi", no_arg, 'V'}, - {"vers", no_arg, 'V'}, - {"ver", no_arg, 'V'}, - {"ve", no_arg, 'V'}, - {"attribute", require_arg, 'a'}, +static const char * s_opts = "a:b*c:d:ef:g:hik:l:m:n*o*pq:rs:t:uvw:xyz:A*BCD:E*F:G:HM:N:O*RS:VX:"; +static struct long_options l_opts[] = {{"attribute", require_arg, 'a'}, {"attribut", require_arg, 'a'}, {"attribu", require_arg, 'a'}, {"attrib", require_arg, 'a'}, @@ -117,10 +86,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"attr", require_arg, 'a'}, {"att", require_arg, 'a'}, {"at", require_arg, 'a'}, - {"block", require_arg, 'k'}, - {"bloc", require_arg, 'k'}, - {"blo", require_arg, 'k'}, - {"bl", require_arg, 'k'}, + {"binary", optional_arg, 'b'}, {"count", require_arg, 'c'}, {"coun", require_arg, 'c'}, {"cou", require_arg, 'c'}, @@ -128,10 +94,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"dataset", require_arg, 'd'}, {"datase", require_arg, 'd'}, {"datas", require_arg, 'd'}, - {"datatype", require_arg, 't'}, - {"datatyp", require_arg, 't'}, - {"dataty", require_arg, 't'}, - {"datat", require_arg, 't'}, + {"escape", no_arg, 'e'}, {"filedriver", require_arg, 'f'}, {"filedrive", require_arg, 'f'}, {"filedriv", require_arg, 'f'}, @@ -145,24 +108,44 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"grou", require_arg, 'g'}, {"gro", require_arg, 'g'}, {"gr", require_arg, 'g'}, - {"output", optional_arg, 'o'}, - {"outpu", optional_arg, 'o'}, - {"outp", optional_arg, 'o'}, - {"out", optional_arg, 'o'}, - {"ou", optional_arg, 'o'}, + {"help", no_arg, 'h'}, + {"hel", no_arg, 'h'}, + {"object-ids", no_arg, 'i'}, + {"object-id", no_arg, 'i'}, + {"object-i", no_arg, 'i'}, + {"object", no_arg, 'i'}, + {"objec", no_arg, 'i'}, + {"obje", no_arg, 'i'}, + {"obj", no_arg, 'i'}, + {"ob", no_arg, 'i'}, + {"block", require_arg, 'k'}, + {"bloc", require_arg, 'k'}, + {"blo", require_arg, 'k'}, + {"bl", require_arg, 'k'}, {"soft-link", require_arg, 'l'}, {"soft-lin", require_arg, 'l'}, {"soft-li", require_arg, 'l'}, {"soft-l", require_arg, 'l'}, {"soft", require_arg, 'l'}, {"sof", require_arg, 'l'}, + {"format", require_arg, 'm'}, + {"contents", optional_arg, 'n'}, + {"output", optional_arg, 'o'}, + {"outpu", optional_arg, 'o'}, + {"outp", optional_arg, 'o'}, + {"out", optional_arg, 'o'}, + {"ou", optional_arg, 'o'}, + {"properties", no_arg, 'p'}, + {"sort_by", require_arg, 'q'}, + {"string", no_arg, 'r'}, + {"strin", no_arg, 'r'}, {"start", require_arg, 's'}, {"star", require_arg, 's'}, {"sta", require_arg, 's'}, - {"stride", require_arg, 'S'}, - {"strid", require_arg, 'S'}, - {"string", no_arg, 'r'}, - {"strin", no_arg, 'r'}, + {"datatype", require_arg, 't'}, + {"datatyp", require_arg, 't'}, + {"dataty", require_arg, 't'}, + {"datat", require_arg, 't'}, {"use-dtd", no_arg, 'u'}, {"use-dt", no_arg, 'u'}, {"use-d", no_arg, 'u'}, @@ -170,33 +153,50 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"use", no_arg, 'u'}, {"us", no_arg, 'u'}, {"u", no_arg, 'u'}, + {"vds-view-first-missing", no_arg, 'v'}, {"width", require_arg, 'w'}, {"widt", require_arg, 'w'}, {"wid", require_arg, 'w'}, {"wi", require_arg, 'w'}, - {"xml-dtd", require_arg, 'D'}, - {"xml-dt", require_arg, 'D'}, - {"xml-d", require_arg, 'D'}, - {"xml-ns", require_arg, 'X'}, - {"xml-n", require_arg, 'X'}, {"xml", no_arg, 'x'}, {"xm", no_arg, 'x'}, - {"onlyattr", optional_arg, 'A'}, - {"escape", no_arg, 'e'}, {"noindex", no_arg, 'y'}, - {"binary", optional_arg, 'b'}, - {"form", require_arg, 'F'}, - {"sort_by", require_arg, 'q'}, {"sort_order", require_arg, 'z'}, - {"format", require_arg, 'm'}, - {"region", no_arg, 'R'}, + {"onlyattr", optional_arg, 'A'}, + {"superblock", no_arg, 'B'}, + {"boot-block", no_arg, 'B'}, + {"boot-bloc", no_arg, 'B'}, + {"boot-blo", no_arg, 'B'}, + {"boot-bl", no_arg, 'B'}, + {"boot-b", no_arg, 'B'}, + {"boot", no_arg, 'B'}, + {"boo", no_arg, 'B'}, + {"bo", no_arg, 'B'}, + {"no-compact-subset", no_arg, 'C'}, + {"xml-dtd", require_arg, 'D'}, + {"xml-dt", require_arg, 'D'}, + {"xml-d", require_arg, 'D'}, {"enable-error-stack", optional_arg, 'E'}, + {"form", require_arg, 'F'}, + {"vds-gap-size", require_arg, 'G'}, + {"header", no_arg, 'H'}, + {"heade", no_arg, 'H'}, + {"head", no_arg, 'H'}, + {"hea", no_arg, 'H'}, {"packed-bits", require_arg, 'M'}, - {"no-compact-subset", no_arg, 'C'}, - {"ddl", optional_arg, 'O'}, {"any_path", require_arg, 'N'}, - {"vds-view-first-missing", no_arg, 'v'}, - {"vds-gap-size", require_arg, 'G'}, + {"ddl", optional_arg, 'O'}, + {"region", no_arg, 'R'}, + {"stride", require_arg, 'S'}, + {"strid", require_arg, 'S'}, + {"version", no_arg, 'V'}, + {"versio", no_arg, 'V'}, + {"versi", no_arg, 'V'}, + {"vers", no_arg, 'V'}, + {"ver", no_arg, 'V'}, + {"ve", no_arg, 'V'}, + {"xml-ns", require_arg, 'X'}, + {"xml-n", require_arg, 'X'}, {"s3-cred", require_arg, '$'}, {"hdfs-attrs", require_arg, '#'}, {NULL, 0, '\0'}}; diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c index 82b56013cfb..422b265e9f9 100644 --- a/tools/src/h5repack/h5repack.c +++ b/tools/src/h5repack/h5repack.c @@ -708,7 +708,7 @@ check_options(pack_opt_t *options) } if (options->ublock_filename == NULL && options->ublock_size != 0) - H5TOOLS_GOTO_ERROR((-1), "file name missing for user block", options->ublock_filename); + H5TOOLS_GOTO_ERROR((-1), "file name missing for user block"); /*------------------------------------------------------------------------ * Verify alignment options; threshold is zero default but alignment not diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 3a82963316b..1c0a3e1e0c1 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -236,6 +236,7 @@ usage(const char *prog) PRINTVALSTREAM(rawoutstream, " Required values: filter_number, filter_flag, cd_value_count, value1\n"); PRINTVALSTREAM(rawoutstream, " Optional values: value2 to valueN\n"); + PRINTVALSTREAM(rawoutstream, " filter_flag: 1 is OPTIONAL or 0 is MANDATORY\n"); PRINTVALSTREAM(rawoutstream, " NONE (no parameter)\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " LAYT - is a string with the format:\n"); diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index a184ae825b4..ddd8c42ca03 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -122,6 +122,7 @@ usage: h5repack [OPTIONS] file1 file2 UD= Required values: filter_number, filter_flag, cd_value_count, value1 Optional values: value2 to valueN + filter_flag: 1 is OPTIONAL or 0 is MANDATORY NONE (no parameter) LAYT - is a string with the format: From bbc9609176c16018d5808f1d4c7ecba3c57de92d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 1 Feb 2021 14:19:56 -0600 Subject: [PATCH 06/66] test testing script merge from develop --- test/testerror.sh.in | 6 ++++++ test/testexternal_env.sh.in | 8 ++++---- test/testflushrefresh.sh.in | 16 ++++++++++++++-- test/testlinks_env.sh.in | 4 ++-- test/testvds_env.sh.in | 4 ++-- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/test/testerror.sh.in b/test/testerror.sh.in index ff17530deef..11e753f6fec 100644 --- a/test/testerror.sh.in +++ b/test/testerror.sh.in @@ -62,6 +62,12 @@ TEST() { # Skip the plugin for testing missing filter. $ENVCMD $RUNSERIAL $TEST_ERR_BIN ) >$actual 2>$actual_err + + # Check for core dump + if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` + fi + # 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)/' \ diff --git a/test/testexternal_env.sh.in b/test/testexternal_env.sh.in index 3cc140d49e8..1327c7d6832 100644 --- a/test/testexternal_env.sh.in +++ b/test/testexternal_env.sh.in @@ -34,9 +34,9 @@ ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & valu $ENVCMD $RUNSERIAL $TEST_BIN exitcode=$? if [ $exitcode -eq 0 ]; then - echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED" - else - nerrors="`expr $nerrors + 1`" - echo "***Error encountered for HDF5_EXTFILE_PREFIX test***" + echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED" +else + nerrors="`expr $nerrors + 1`" + echo "***Error encountered for HDF5_EXTFILE_PREFIX test***" fi exit $nerrors diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in index 3cdf10fc749..be44a13ed31 100644 --- a/test/testflushrefresh.sh.in +++ b/test/testflushrefresh.sh.in @@ -82,7 +82,7 @@ fi # different, occasionally the wrong file is deleted, interrupting the flow of # the test. Running each of these tests in its own directory should eliminate # the problem. -mkdir flushrefresh_test +mkdir -p flushrefresh_test cp flushrefresh flushrefresh_test # With the --disable-shared option, flushrefresh is built in the test directory, @@ -90,7 +90,7 @@ cp flushrefresh flushrefresh_test # the test directory. test/flushrefresh should always be copied, # .libs/flushrefresh should be copied only if it exists. if [ -f .libs/flushrefresh ]; then - mkdir flushrefresh_test/.libs + mkdir -p flushrefresh_test/.libs for FILE in .libs/flushrefresh*; do case "$FILE" in *.o) continue ;; ## don't copy the .o files @@ -156,6 +156,12 @@ until [ $verification_done -eq 1 ]; do echo "all flush verification complete" > $endsignal else ./flushrefresh $param1 $param2 + + # Check for core dump + if [ $? -gt 0 ]; then + nerrors=`expr $nerrors + 1` + fi + echo "verification flush process done" > $endsignal fi @@ -195,6 +201,12 @@ if [ $timedout -eq 0 ]; then echo "all refresh verification complete" > $endsignal else ./flushrefresh $param1 + + # Check for core dump + if [ $? -gt 0 ]; then + nerrors=`expr $nerrors + 1` + fi + echo "refresh verifiction process done" > $endsignal fi diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in index 3d6b3ce81f1..e61e0575d82 100644 --- a/test/testlinks_env.sh.in +++ b/test/testlinks_env.sh.in @@ -34,8 +34,8 @@ echo "$ENVCMD $RUNSERIAL $TEST_BIN" $ENVCMD $RUNSERIAL $TEST_BIN exitcode=$? if [ $exitcode -eq 0 ]; then - echo "Test for HDF5_EXT_PREFIX PASSED" - else + echo "Test for HDF5_EXT_PREFIX PASSED" +else nerrors="`expr $nerrors + 1`" echo "***Error encountered for HDF5_EXT_PREFIX test***" fi diff --git a/test/testvds_env.sh.in b/test/testvds_env.sh.in index e9a27da9c67..9577d7d3902 100644 --- a/test/testvds_env.sh.in +++ b/test/testvds_env.sh.in @@ -35,8 +35,8 @@ UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable $ENVCMD $RUNSERIAL $TEST_BIN exitcode=$? if [ $exitcode -eq 0 ]; then - echo "Test prefix for HDF5_VDS_PREFIX PASSED" - else + echo "Test prefix for HDF5_VDS_PREFIX PASSED" +else nerrors="`expr $nerrors + 1`" echo "***Error encountered for HDF5_VDS_PREFIX test***" fi From a8ae83d52860fda3e601826c8679298a2efc865b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Feb 2021 08:41:09 -0600 Subject: [PATCH 07/66] Update supported platforms --- release_docs/RELEASE.txt | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 942022ceba7..2c65384192d 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -127,11 +127,11 @@ New Features Fortran Library: ---------------- - - + - C++ Library: ------------ - - + - Java Library: ---------------- @@ -158,7 +158,7 @@ New Features High-Level APIs: --------------- - - + - C Packet Table API ------------------ @@ -396,17 +396,23 @@ The following platforms are not supported but have been tested for this release. # 1SMP x86_64 GNU/Linux gcc/7.2.0, 8.2.0 (mutrino) intel/17.0.4, 18.0.2, 19.0.4 - Fedora32 5.8.18-200.fc32.x86_64 - #1 SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) - GNU Fortran (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6) - clang version 10.0.1 (Fedora 10.0.1-3.fc32) + Fedora33 5.10.10-200.fc33.x86_64 + #1 SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) + GNU Fortran (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) + clang version 11.0.0 (Fedora 11.0.0-2.fc33) (cmake and autotools) - Ubuntu20.10 -5.8.0-29-generic-x86_64 - #31-Ubuntu SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.0-13ubuntu1 + Ubuntu20.10 5.8.0-41-generic-x86_64 + #46-Ubuntu SMP x86_64 GNU/Linux GNU gcc (GCC) 10.2.0-13ubuntu1 GNU Fortran (GCC) 10.2.0-13ubuntu1 (cmake and autotools) + SUSE15sp2 5.3.18-22-default + #1 SMP x86_64 GNU/Linux GNU gcc (SUSE Linux) 7.5.0 + GNU Fortran (SUSE Linux) 7.5.0 + clang version 7.0.1 (tags/RELEASE_701/final 349238) + (cmake and autotools) + Mac OS X El Capitan 10.11.6 Apple clang version 7.3.0 from Xcode 7.3 64-bit gfortran GNU Fortran (GCC) 5.2.0 (osx1011test) Intel icc/icpc/ifort version 16.0.2 From 39d6885765c786a252b9c0a6e5b7e65d347244c9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Feb 2021 13:25:19 -0600 Subject: [PATCH 08/66] PR#3 merge from develop --- c++/test/tvlstr.cpp | 2 +- hl/c++/examples/ptExampleFL.cpp | 2 +- hl/test/test_file_image.c | 2 ++ hl/test/test_table.c | 2 +- test/trefer.c | 18 +++++++++--------- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp index 8f0c0ab8c2a..77bf37846be 100644 --- a/c++/test/tvlstr.cpp +++ b/c++/test/tvlstr.cpp @@ -187,7 +187,7 @@ test_vlstring_dataset() // Test scalar type dataset with 1 value. dset1 = root.createDataSet("test_scalar_small", vlst, ds_space); - dynstring_ds_write = (char *)HDcalloc(1, sizeof(char)); + dynstring_ds_write = (char *)HDcalloc(2, sizeof(char)); HDmemset(dynstring_ds_write, 'A', 1); // Write data to the dataset, then read it back. diff --git a/hl/c++/examples/ptExampleFL.cpp b/hl/c++/examples/ptExampleFL.cpp index d0b62dae153..3b1c655f089 100644 --- a/hl/c++/examples/ptExampleFL.cpp +++ b/hl/c++/examples/ptExampleFL.cpp @@ -73,7 +73,7 @@ main(void) if (err < 0) fprintf(stderr, "Error getting packet count."); - printf("Number of packets in packet table after five appends: %d\n", count); + printf("Number of packets in packet table after five appends: %llu\n", count); /* Initialize packet table's "current record" */ ptable.ResetIndex(); diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index 712107e76c7..e1ee02d5852 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -506,6 +506,8 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) } /* end for */ /* release temporary working buffers */ + for (i = 0; i < open_images; i++) + HDfree(filename[i]); HDfree(filename); HDfree(file_id); HDfree(dset_id); diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 2f98f4a119a..d7f68e496b0 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -1272,7 +1272,7 @@ test_table(hid_t fid, int do_write) /* write the new longitude and latitude information to all the records */ nfields = 2; start = 0; - nrecords = NRECORDS; + nrecords = NRECORDS_ADD; if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords, sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0) goto out; diff --git a/test/trefer.c b/test/trefer.c index 198ec78afb4..2fa24731ed9 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -532,7 +532,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) hssize_t hssize_ret; /* hssize_t return value */ htri_t tri_ret; /* htri_t return value */ herr_t ret; /* Generic return value */ - haddr_t addr = HADDR_UNDEF; /* test for undefined reference */ + haddr_t addr[2] = {HADDR_UNDEF, 0}; /* test for undefined reference */ hid_t dset_NA; /* Dataset id for undefined reference */ hid_t space_NA; /* Dataspace id for undefined reference */ hsize_t dims_NA[1] = {1}; /* Dims array for undefined reference */ @@ -1297,14 +1297,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high) static void test_reference_obj_deleted(void) { - hid_t fid1; /* HDF5 File IDs */ - hid_t dataset, /* Dataset ID */ - dset2; /* Dereferenced dataset ID */ - hid_t sid1; /* Dataspace ID */ - hobj_ref_t oref; /* Object Reference to test */ - H5O_type_t obj_type; /* Object type */ - haddr_t addr = HADDR_UNDEF; /* test for undefined reference */ - herr_t ret; /* Generic return value */ + hid_t fid1; /* HDF5 File IDs */ + hid_t dataset, /* Dataset ID */ + dset2; /* Dereferenced dataset ID */ + hid_t sid1; /* Dataspace ID */ + hobj_ref_t oref; /* Object Reference to test */ + H5O_type_t obj_type; /* Object type */ + haddr_t addr[2] = {HADDR_UNDEF, 0}; /* test for undefined reference */ + herr_t ret; /* Generic return value */ /* Create file */ fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); From 28e5eb4331f84527cd1aa0ab771d237ea6c1e348 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sun, 7 Feb 2021 19:57:10 -0600 Subject: [PATCH 09/66] Merge gcc 10 diagnostics option from develop --- config/cmake/HDFCXXCompilerFlags.cmake | 8 ++++ config/cmake/HDFCompilerFlags.cmake | 14 +++++++ config/cmake/HDFFortranCompilerFlags.cmake | 8 ++++ config/gnu-cxxflags | 9 +++++ config/gnu-fflags | 9 +++++ config/gnu-flags | 9 +++++ configure.ac | 45 ++++++++++++++++++++++ release_docs/RELEASE.txt | 19 +++++++++ 8 files changed, 121 insertions(+) diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 4f2eabec2e0..ebda39f74f2 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -30,6 +30,14 @@ if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt") endif () + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () + endif () endif () endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index fb527d5411c..3d3cc6aadbf 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -31,6 +31,20 @@ if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt") endif () + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) + #----------------------------------------------------------------------------- + # Option to allow the user to enable build extended diagnostics + # + # This should NOT be on by default as it can cause process issues. + #----------------------------------------------------------------------------- + option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () + endif () endif () endif () diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index c7f085ceab2..5521f6d20ec 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -45,6 +45,14 @@ endif () #----------------------------------------------------------------------------- # HDF5 library compile options #----------------------------------------------------------------------------- +if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_BUILD_DIAGS) + message (STATUS "... default color and URL extended diagnostic messages enabled") + else () + message (STATUS "... disable color and URL extended diagnostic messages") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color") + endif () +endif () #----------------------------------------------------------------------------- # CDash is configured to only allow 3000 warnings, so diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 0b48bdf4fbe..6189db6dc46 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -144,6 +144,15 @@ if test "X-g++" = "X-$cxx_vendor"; then DEBUG_CXXFLAGS="-ftrapv -fno-common" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_CXXFLAGS= + ########### # Symbols # ########### diff --git a/config/gnu-fflags b/config/gnu-fflags index 105a990cb17..32e5a283dd9 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -105,6 +105,15 @@ if test "X-gfortran" = "X-$f9x_vendor"; then DEBUG_FCFLAGS="-fbounds-check" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_FCFLAGS= + ########### # Symbols # ########### diff --git a/config/gnu-flags b/config/gnu-flags index 538fd533db6..6f7aea6af9f 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -158,6 +158,15 @@ if test "X-gcc" = "X-$cc_vendor"; then DEBUG_CFLAGS="-ftrapv -fno-common" fi + ######################## + # Enhanced Diagnostics # + ######################## + + if test $cc_vers_major -ge 10; then + NO_DIAGS_CFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" + fi + DIAGS_CFLAGS= + ########### # Symbols # ########### diff --git a/configure.ac b/configure.ac index 929608088ca..093cedfca38 100644 --- a/configure.ac +++ b/configure.ac @@ -2130,6 +2130,51 @@ AC_ARG_ENABLE([production], [AC_MSG_ERROR([--enable-production is no longer supported, use --enable-build-mode=production instead.])]) +## ---------------------------------------------------------------------- +## Check if the compiler should include build diagnostics +## +AC_MSG_CHECKING([enable build diagnostics]) +AC_ARG_ENABLE([diags], + [AS_HELP_STRING([--enable-diags=(yes|no|)], + [Allow default enhanced diagnostics to the build. + This is independent of the build mode and optimization + level. + [default=no] + ])], + [DIAGS=$enableval]) + +## Set default +if test "X-$DIAGS" = X- ; then + DIAGS=no +fi + +## Allow this variable to be substituted in +## other files (src/libhdf5.settings.in, etc.) +AC_SUBST([DIAGS]) + +case "X-$DIAGS" in + X-yes) + H5_CFLAGS="$H5_CFLAGS $DIAGS_CFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $DIAGS_FCFLAGS" + AC_MSG_RESULT([yes]) + ;; + X-no) + H5_CFLAGS="$H5_CFLAGS $NO_DIAGS_CFLAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $NO_DIAGS_CXXFLAGS" + H5_FCFLAGS="$H5_FCFLAGS $NO_DIAGS_FCFLAGS" + AC_MSG_RESULT([no]) + ;; + *) + H5_CFLAGS="$H5_CFLAGS $DIAGS" + H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS" + H5_FCFLAGS="$H5_FCFLAGS $DIAGS" + DIAGS="custom ($DIAGS)" + AC_MSG_RESULT([$DIAGS]) + ;; +esac + + ## ---------------------------------------------------------------------- ## Check if the compiler should include symbols ## diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d2d6914b7c0..1555ffdd2b9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -48,6 +48,25 @@ New Features Configuration: ------------- + - Added a configure-time option to control certain compiler warnings + diagnostics + + A new configure-time option was added that allows some compiler warnings + diagnostics to have the default operation. This is mainly intended for + library developers and currently only works for gcc 10 and above. The + diagnostics flags apply to C, C++ and Fortran compilers and will appear + in "H5 C Flags", H5 C++ Flags" and H5 Fortran Flags, respectively. They + will NOT be exported to h5cc, etc. + + The default is OFF, which will disable the warnings URL and color attributes + for the warnings output. ON will not add the flags and allow default behavior. + + Autotools: --enable-diags + + CMake: HDF5_ENABLE_BUILD_DIAGS + + (ADB - 2021/02/05, HDFFV-11213) + - CMake option to build the HDF filter plugins project as an external project The HDF filter plugins project is a collection of registered compression From 55368fa29a5957be12f034d1c87ab29cb2b18b9f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Feb 2021 08:05:59 -0600 Subject: [PATCH 10/66] Merge #318 OSX changes from develop --- config/cmake/H5pubconf.h.in | 3 --- config/cmake_ext_mod/ConfigureChecks.cmake | 15 --------------- release_docs/RELEASE.txt | 7 +++++++ 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 79566ff3996..5c2177a7cb8 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -26,9 +26,6 @@ /* Define if using a Windows compiler (i.e. Visual Studio) */ #cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@ -/* Define if building universal (internal helper macro) */ -#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ - /* Define if C++ compiler recognizes offsetof */ #cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 5fa6ca12acd..3722a0c75f1 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -22,21 +22,6 @@ include (CheckVariableExists) include (TestBigEndian) include (CheckStructHasMember) -#----------------------------------------------------------------------------- -# APPLE/Darwin setup -#----------------------------------------------------------------------------- -if (APPLE) - list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH) - if (ARCH_LENGTH GREATER 1) - set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE) - message (FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is" - "due to technical reasons. The best approach would be build each architecture in separate directories" - "and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'" - "variable has been set to a blank value which will build the default architecture for this system.") - endif () - set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0) -endif () - # Check for Darwin (not just Apple - we also want to catch OpenDarwin) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set (${HDF_PREFIX}_HAVE_DARWIN 1) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1555ffdd2b9..7ced618d977 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -48,6 +48,13 @@ New Features Configuration: ------------- + - On macOS, Universal Binaries can now be built, allowing native execution on + both Intel and Apple Silicon (ARM) based Macs. + + To do so, set CMAKE_OSX_ARCHITECTURES="x86_64;arm64" + + (SAM - 2021/02/07, https://github.com/HDFGroup/hdf5/issues/311) + - Added a configure-time option to control certain compiler warnings diagnostics From d8011e284c32650f26652a7c159a05266cd358c5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 16 Feb 2021 08:13:16 -0600 Subject: [PATCH 11/66] Merge small changes from develop --- CMakeLists.txt | 2 +- bin/genparser | 7 ++++++- config/cmake/H5pubconf.h.in | 23 +++++++++++++++++++---- hl/examples/ex_ds1.c | 4 +++- hl/fortran/examples/ex_ds1.f90 | 3 ++- hl/src/H5LTanalyze.c | 4 +++- hl/src/H5LTparse.c | 4 +++- tools/lib/h5tools_dump.c | 2 +- 8 files changed, 38 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5665f98b9b7..0cd8c6ea366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,7 +237,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$" "\\1" H5_VERS_MINOR ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$" "\\1" H5_VERS_RELEASE ${_h5public_h_contents}) -string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._\-]*)\".*$" +string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$" "\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents}) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") diff --git a/bin/genparser b/bin/genparser index ab407756011..183b3c9b623 100755 --- a/bin/genparser +++ b/bin/genparser @@ -219,13 +219,15 @@ perl -0777 -pi -e 's/int H5LTyyparse/hid_t H5LTyyparse/igs' ${path_to_hl_src}/H5 # # Note that the GCC pragmas did not exist until gcc 4.2. Earlier versions # will simply ignore them, but we want to avoid those warnings. +# +# Note also that although clang defines __GNUC__, it doesn't support every +# warning that GCC does. for f in ${path_to_hl_src}/H5LTparse.c ${path_to_hl_src}/H5LTanalyze.c do echo '#if defined (__GNUC__) ' >> tmp.out echo '#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wconversion" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wimplicit-function-declaration" ' >> tmp.out - echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wmissing-prototypes" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wnested-externs" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wold-style-definition" ' >> tmp.out @@ -234,8 +236,11 @@ do echo '#pragma GCC diagnostic ignored "-Wsign-conversion" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wstrict-overflow" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wstrict-prototypes" ' >> tmp.out + echo '#if !defined (__clang__) ' >> tmp.out + echo '#pragma GCC diagnostic ignored "-Wlarger-than=" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" ' >> tmp.out + echo '#endif ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wswitch-default" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wunused-function" ' >> tmp.out echo '#pragma GCC diagnostic ignored "-Wunused-macros" ' >> tmp.out diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 5c2177a7cb8..6e797df496e 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -602,6 +602,7 @@ #cmakedefine H5_SIZEOF_INT_LEAST8_T @H5_SIZEOF_INT_LEAST8_T@ #if !defined(__APPLE__) + /* The size of `size_t', as computed by sizeof. */ #cmakedefine H5_SIZEOF_SIZE_T @H5_SIZEOF_SIZE_T@ @@ -611,8 +612,17 @@ /* The size of `long', as computed by sizeof. */ #cmakedefine H5_SIZEOF_LONG @H5_SIZEOF_LONG@ +/* The size of `long double', as computed by sizeof. */ +#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + #else - # if defined(__LP64__) && __LP64__ + + /* On Apple, to support Universal Binaries (where multiple CPU + architectures exist in one library/executable), we can't assume + the machine doing the compiling has the same endianness or type + sizes as all the various architectures (PowerPC, Intel, ARM). */ + + # if defined(__LP64__) && __LP64__ #define H5_SIZEOF_LONG 8 #define H5_SIZEOF_SIZE_T 8 #define H5_SIZEOF_SSIZE_T 8 @@ -622,10 +632,15 @@ #define H5_SIZEOF_SSIZE_T 4 # endif -#endif + # if defined(__i386__) || defined(__x86_64__) + #define H5_SIZEOF_LONG_DOUBLE 16 + # elif defined(__aarch64__) + #define H5_SIZEOF_LONG_DOUBLE 8 + # else + #cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + # endif -/* The size of `long double', as computed by sizeof. */ -#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ +#endif /* Define size of long long and/or __int64 bit integer type only if the type exists. */ diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c index af8b58155c3..09f398bd98a 100644 --- a/hl/examples/ex_ds1.c +++ b/hl/examples/ex_ds1.c @@ -91,9 +91,11 @@ main(void) if (H5DSattach_scale(did, dsid, DIM1) < 0) goto out; - /* close DS id */ + /* close DS ids */ if (H5Dclose(dsid) < 0) goto out; + if (H5Dclose(did) < 0) + goto out; /* close file */ H5Fclose(fid); diff --git a/hl/fortran/examples/ex_ds1.f90 b/hl/fortran/examples/ex_ds1.f90 index b31ac8eba52..3e0048ad555 100644 --- a/hl/fortran/examples/ex_ds1.f90 +++ b/hl/fortran/examples/ex_ds1.f90 @@ -180,8 +180,9 @@ PROGRAM example_ds WRITE(*,'(/,5X,A,I0,2A,/)') 'Dimension Scale Label for dimension ', DIM2, ' is ... ', label(1:label_len) - ! close DS id + ! close DS ids CALL H5Dclose_f(dsid, err) + CALL H5Dclose_f(did, err) ! close file CALL H5Fclose_f(fid, err) diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c index 4adf3d3a407..3c6983a347f 100644 --- a/hl/src/H5LTanalyze.c +++ b/hl/src/H5LTanalyze.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c index 80de0a2fb76..2ef133f5a45 100644 --- a/hl/src/H5LTparse.c +++ b/hl/src/H5LTparse.c @@ -2,7 +2,6 @@ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402 #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" -#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wmissing-prototypes" #pragma GCC diagnostic ignored "-Wnested-externs" #pragma GCC diagnostic ignored "-Wold-style-definition" @@ -11,8 +10,11 @@ #pragma GCC diagnostic ignored "-Wsign-conversion" #pragma GCC diagnostic ignored "-Wstrict-overflow" #pragma GCC diagnostic ignored "-Wstrict-prototypes" +#if !defined (__clang__) +#pragma GCC diagnostic ignored "-Wlarger-than=" #pragma GCC diagnostic ignored "-Wsuggest-attribute=const" #pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif #pragma GCC diagnostic ignored "-Wswitch-default" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-macros" diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 98d783535d9..d60207bbb3e 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -329,7 +329,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont * Purpose: Print some values from an attribute referenced by object reference. * * Description: - * This is a special case subfunction to dump aa attribute references. + * This is a special case subfunction to dump an attribute reference. * * Return: * The function returns False if the last dimension has been reached, otherwise True From a6de013d86d30a60353d2015deef65e0b0a5e180 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 18 Feb 2021 11:50:42 -0600 Subject: [PATCH 12/66] Minor non-space formatting changes --- release_docs/RELEASE.txt | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7ced618d977..6b22c36e72e 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -3,6 +3,7 @@ HDF5 version 1.10.8-1 currently under development INTRODUCTION +============ This document describes the differences between this release and the previous HDF5 release. It contains information on the platforms tested and known @@ -209,7 +210,7 @@ New Features - Java Library: - ---------------- + ------------- - Added new H5S functions. H5Sselect_copy, H5Sselect_shape_same, H5Sselect_adjust, @@ -232,33 +233,33 @@ New Features High-Level APIs: - --------------- + ---------------- - - C Packet Table API - ------------------ + C Packet Table API: + ------------------- - - Internal header file - -------------------- + Internal header file: + --------------------- - - Documentation - ------------- + Documentation: + -------------- - -Support for new platforms, languages and compilers. -======================================= +Support for new platforms, languages and compilers +================================================== - Bug Fixes since HDF5-1.10.7 release -================================== +=================================== Library ------- - - Java Library: - ---------------- + Java Library + ------------ - The H5FArray.java class, in which virtually the entire execution time is spent using the HDFNativeData method that converts from an array of bytes to an array of the destination Java type. @@ -315,7 +316,7 @@ Bug Fixes since HDF5-1.10.7 release High-Level Library - ------ + ------------------ - From 1e21839756b107cfc7131e4ec2c2906d1fb4481b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 26 Feb 2021 09:06:59 -0600 Subject: [PATCH 13/66] #386 copyright corrections for java folder --- java/COPYING | 2 +- java/Makefile.am | 3 +-- java/examples/Makefile.am | 3 +-- java/examples/datasets/H5Ex_D_Alloc.java | 3 +-- java/examples/datasets/H5Ex_D_Checksum.java | 3 +-- java/examples/datasets/H5Ex_D_Chunk.java | 3 +-- java/examples/datasets/H5Ex_D_Compact.java | 3 +-- java/examples/datasets/H5Ex_D_External.java | 3 +-- java/examples/datasets/H5Ex_D_FillValue.java | 3 +-- java/examples/datasets/H5Ex_D_Gzip.java | 3 +-- java/examples/datasets/H5Ex_D_Hyperslab.java | 3 +-- java/examples/datasets/H5Ex_D_Nbit.java | 3 +-- java/examples/datasets/H5Ex_D_ReadWrite.java | 3 +-- java/examples/datasets/H5Ex_D_Shuffle.java | 3 +-- java/examples/datasets/H5Ex_D_Sofloat.java | 3 +-- java/examples/datasets/H5Ex_D_Soint.java | 3 +-- java/examples/datasets/H5Ex_D_Szip.java | 3 +-- java/examples/datasets/H5Ex_D_Transform.java | 3 +-- java/examples/datasets/H5Ex_D_UnlimitedAdd.java | 3 +-- java/examples/datasets/H5Ex_D_UnlimitedGzip.java | 3 +-- java/examples/datasets/H5Ex_D_UnlimitedMod.java | 3 +-- java/examples/datasets/JavaDatasetExample.sh.in | 3 +-- java/examples/datasets/Makefile.am | 3 +-- java/examples/datatypes/H5Ex_T_Array.java | 3 +-- java/examples/datatypes/H5Ex_T_ArrayAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_Bit.java | 3 +-- java/examples/datatypes/H5Ex_T_BitAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_Commit.java | 3 +-- java/examples/datatypes/H5Ex_T_Compound.java | 3 +-- java/examples/datatypes/H5Ex_T_CompoundAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_Float.java | 3 +-- java/examples/datatypes/H5Ex_T_FloatAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_Integer.java | 3 +-- java/examples/datatypes/H5Ex_T_IntegerAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_ObjectReference.java | 3 +-- .../datatypes/H5Ex_T_ObjectReferenceAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_Opaque.java | 3 +-- java/examples/datatypes/H5Ex_T_OpaqueAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_String.java | 3 +-- java/examples/datatypes/H5Ex_T_StringAttribute.java | 3 +-- java/examples/datatypes/H5Ex_T_VLString.java | 3 +-- java/examples/datatypes/JavaDatatypeExample.sh.in | 3 +-- java/examples/datatypes/Makefile.am | 3 +-- java/examples/groups/H5Ex_G_Compact.java | 3 +-- java/examples/groups/H5Ex_G_Corder.java | 3 +-- java/examples/groups/H5Ex_G_Create.java | 3 +-- java/examples/groups/H5Ex_G_Intermediate.java | 3 +-- java/examples/groups/H5Ex_G_Iterate.java | 3 +-- java/examples/groups/H5Ex_G_Phase.java | 3 +-- java/examples/groups/H5Ex_G_Traverse.java | 3 +-- java/examples/groups/H5Ex_G_Visit.java | 3 +-- java/examples/groups/JavaGroupExample.sh.in | 3 +-- java/examples/groups/Makefile.am | 3 +-- java/examples/intro/H5_CreateAttribute.java | 3 +-- java/examples/intro/H5_CreateDataset.java | 3 +-- java/examples/intro/H5_CreateFile.java | 3 +-- java/examples/intro/H5_CreateGroup.java | 3 +-- java/examples/intro/H5_CreateGroupAbsoluteRelative.java | 3 +-- java/examples/intro/H5_CreateGroupDataset.java | 3 +-- java/examples/intro/H5_ReadWrite.java | 3 +-- java/examples/intro/JavaIntroExample.sh.in | 3 +-- java/examples/intro/Makefile.am | 3 +-- java/src/Makefile.am | 3 +-- java/src/hdf/hdf5lib/H5.java | 2 +- java/src/hdf/hdf5lib/HDF5Constants.java | 2 +- java/src/hdf/hdf5lib/HDF5GroupInfo.java | 2 +- java/src/hdf/hdf5lib/HDFArray.java | 3 +-- java/src/hdf/hdf5lib/HDFNativeData.java | 2 +- java/src/hdf/hdf5lib/callbacks/Callbacks.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5D_append_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java | 3 +-- .../src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java | 3 +-- .../hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java | 3 +-- .../src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java | 3 +-- .../src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java | 3 +-- java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java | 3 +-- java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5AttributeException.java | 2 +- java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5DataFiltersException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5DataStorageException.java | 2 +- .../hdf5lib/exceptions/HDF5DatasetInterfaceException.java | 2 +- .../exceptions/HDF5DataspaceInterfaceException.java | 2 +- .../exceptions/HDF5DatatypeInterfaceException.java | 2 +- java/src/hdf/hdf5lib/exceptions/HDF5Exception.java | 2 +- .../hdf5lib/exceptions/HDF5ExternalFileListException.java | 2 +- .../hdf5lib/exceptions/HDF5FileInterfaceException.java | 2 +- .../hdf5lib/exceptions/HDF5FunctionArgumentException.java | 2 +- .../exceptions/HDF5FunctionEntryExitException.java | 2 +- java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java | 2 +- .../hdf5lib/exceptions/HDF5InternalErrorException.java | 2 +- java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java | 2 +- java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java | 2 +- .../hdf5lib/exceptions/HDF5MetaDataCacheException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java | 2 +- .../exceptions/HDF5PropertyListInterfaceException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5ReferenceException.java | 2 +- .../exceptions/HDF5ResourceUnavailableException.java | 2 +- .../hdf/hdf5lib/exceptions/HDF5SymbolTableException.java | 2 +- java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5A_info_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5E_error2_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5F_info2_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5G_info_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5L_info_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5O_info_t.java | 3 +-- java/src/hdf/hdf5lib/structs/H5_ih_info_t.java | 3 +-- java/src/jni/Makefile.am | 3 +-- java/src/jni/exceptionImp.c | 2 +- java/src/jni/exceptionImp.h | 3 +-- java/src/jni/h5Constants.c | 2 +- java/src/jni/h5Imp.c | 2 +- java/src/jni/h5Imp.h | 3 +-- java/src/jni/h5aImp.c | 2 +- java/src/jni/h5aImp.h | 3 +-- java/src/jni/h5dImp.c | 2 +- java/src/jni/h5dImp.h | 3 +-- java/src/jni/h5eImp.c | 3 +-- java/src/jni/h5eImp.h | 3 +-- java/src/jni/h5fImp.c | 2 +- java/src/jni/h5fImp.h | 3 +-- java/src/jni/h5gImp.c | 2 +- java/src/jni/h5gImp.h | 3 +-- java/src/jni/h5iImp.c | 2 +- java/src/jni/h5iImp.h | 3 +-- java/src/jni/h5jni.h | 3 +-- java/src/jni/h5lImp.c | 3 +-- java/src/jni/h5lImp.h | 3 +-- java/src/jni/h5oImp.c | 3 +-- java/src/jni/h5oImp.h | 3 +-- java/src/jni/h5pACPLImp.c | 3 +-- java/src/jni/h5pACPLImp.h | 3 +-- java/src/jni/h5pDAPLImp.c | 3 +-- java/src/jni/h5pDAPLImp.h | 3 +-- java/src/jni/h5pDCPLImp.c | 3 +-- java/src/jni/h5pDCPLImp.h | 3 +-- java/src/jni/h5pDXPLImp.c | 3 +-- java/src/jni/h5pDXPLImp.h | 3 +-- java/src/jni/h5pFAPLImp.c | 3 +-- java/src/jni/h5pFAPLImp.h | 3 +-- java/src/jni/h5pFCPLImp.c | 3 +-- java/src/jni/h5pFCPLImp.h | 3 +-- java/src/jni/h5pGAPLImp.c | 3 +-- java/src/jni/h5pGAPLImp.h | 1 - java/src/jni/h5pGCPLImp.c | 3 +-- java/src/jni/h5pGCPLImp.h | 3 +-- java/src/jni/h5pImp.c | 2 +- java/src/jni/h5pImp.h | 3 +-- java/src/jni/h5pLAPLImp.c | 3 +-- java/src/jni/h5pLAPLImp.h | 3 +-- java/src/jni/h5pLCPLImp.c | 3 +-- java/src/jni/h5pLCPLImp.h | 3 +-- java/src/jni/h5pOCPLImp.c | 3 +-- java/src/jni/h5pOCPLImp.h | 3 +-- java/src/jni/h5pOCpyPLImp.c | 3 +-- java/src/jni/h5pOCpyPLImp.h | 3 +-- java/src/jni/h5pStrCPLImp.c | 3 +-- java/src/jni/h5pStrCPLImp.h | 3 +-- java/src/jni/h5plImp.c | 3 +-- java/src/jni/h5plImp.h | 3 +-- java/src/jni/h5rImp.c | 2 +- java/src/jni/h5rImp.h | 3 +-- java/src/jni/h5sImp.c | 2 +- java/src/jni/h5sImp.h | 3 +-- java/src/jni/h5tImp.c | 2 +- java/src/jni/h5tImp.h | 3 +-- java/src/jni/h5util.c | 2 +- java/src/jni/h5util.h | 2 +- java/src/jni/h5zImp.c | 2 +- java/src/jni/h5zImp.h | 3 +-- java/src/jni/nativeData.c | 2 +- java/src/jni/nativeData.h | 3 +-- java/test/Makefile.am | 3 +-- java/test/TestAll.java | 3 +-- java/test/TestH5.java | 3 +-- java/test/TestH5A.java | 3 +-- java/test/TestH5D.java | 3 +-- java/test/TestH5Dparams.java | 3 +-- java/test/TestH5Dplist.java | 3 +-- java/test/TestH5E.java | 3 +-- java/test/TestH5Edefault.java | 3 +-- java/test/TestH5Eparams.java | 3 +-- java/test/TestH5Eregister.java | 3 +-- java/test/TestH5F.java | 3 +-- java/test/TestH5Fbasic.java | 1 - java/test/TestH5Fparams.java | 3 +-- java/test/TestH5Fswmr.java | 3 +-- java/test/TestH5G.java | 3 +-- java/test/TestH5Gbasic.java | 3 +-- java/test/TestH5Giterate.java | 3 +-- java/test/TestH5Lbasic.java | 3 +-- java/test/TestH5Lcreate.java | 3 +-- java/test/TestH5Lparams.java | 3 +-- java/test/TestH5Obasic.java | 3 +-- java/test/TestH5Ocopy.java | 3 +-- java/test/TestH5Ocreate.java | 3 +-- java/test/TestH5Oparams.java | 3 +-- java/test/TestH5P.java | 1 - java/test/TestH5PData.java | 3 +-- java/test/TestH5PL.java | 3 +-- java/test/TestH5Pfapl.java | 3 +-- java/test/TestH5Pfaplhdfs.java | 3 +-- java/test/TestH5Pfapls3.java | 3 +-- java/test/TestH5Plist.java | 3 +-- java/test/TestH5Pvirtual.java | 3 +-- java/test/TestH5R.java | 3 +-- java/test/TestH5S.java | 3 +-- java/test/TestH5Sbasic.java | 3 +-- java/test/TestH5T.java | 3 +-- java/test/TestH5Tbasic.java | 3 +-- java/test/TestH5Tparams.java | 3 +-- java/test/TestH5Z.java | 3 +-- java/test/junit.sh.in | 3 +-- tools/src/h5repack/h5repack_copy.c | 8 ++++---- tools/src/h5repack/h5repack_verify.c | 6 ++++-- 237 files changed, 240 insertions(+), 428 deletions(-) diff --git a/java/COPYING b/java/COPYING index 6497ace3da0..97969da5497 100644 --- a/java/COPYING +++ b/java/COPYING @@ -7,7 +7,7 @@ The full HDF5 copyright notice, including terms governing use, modification, and redistribution, is contained in the COPYING file which can be found at the root of the source code distribution tree - or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do + or in https://www.hdfgroup.org/licenses. If you do not have access to either file, you may request a copy from help@hdfgroup.org. diff --git a/java/Makefile.am b/java/Makefile.am index 7063d13299c..bb8b4262930 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/Makefile.am b/java/examples/Makefile.am index 054407ca520..eb7b7f5862d 100644 --- a/java/examples/Makefile.am +++ b/java/examples/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java index e40c0427132..d0e8f816604 100644 --- a/java/examples/datasets/H5Ex_D_Alloc.java +++ b/java/examples/datasets/H5Ex_D_Alloc.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java index 9de09be6796..e0a1638d331 100644 --- a/java/examples/datasets/H5Ex_D_Checksum.java +++ b/java/examples/datasets/H5Ex_D_Checksum.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java index 3d61e26efb7..74e7530abd5 100644 --- a/java/examples/datasets/H5Ex_D_Chunk.java +++ b/java/examples/datasets/H5Ex_D_Chunk.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java index 17c09f55b34..7751db93f7e 100644 --- a/java/examples/datasets/H5Ex_D_Compact.java +++ b/java/examples/datasets/H5Ex_D_Compact.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java index bf413ba1349..1797ec8efd8 100644 --- a/java/examples/datasets/H5Ex_D_External.java +++ b/java/examples/datasets/H5Ex_D_External.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java index 29cf4e12341..4577249baca 100644 --- a/java/examples/datasets/H5Ex_D_FillValue.java +++ b/java/examples/datasets/H5Ex_D_FillValue.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java index 50f8835e949..2529b47cafc 100644 --- a/java/examples/datasets/H5Ex_D_Gzip.java +++ b/java/examples/datasets/H5Ex_D_Gzip.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java index 88aa36edac4..e77493f693b 100644 --- a/java/examples/datasets/H5Ex_D_Hyperslab.java +++ b/java/examples/datasets/H5Ex_D_Hyperslab.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java index 026365925dc..fbb504b7081 100644 --- a/java/examples/datasets/H5Ex_D_Nbit.java +++ b/java/examples/datasets/H5Ex_D_Nbit.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java index 49bc2e58735..da9d0b4b98d 100644 --- a/java/examples/datasets/H5Ex_D_ReadWrite.java +++ b/java/examples/datasets/H5Ex_D_ReadWrite.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java index c7b7c538f8c..85192bb54f1 100644 --- a/java/examples/datasets/H5Ex_D_Shuffle.java +++ b/java/examples/datasets/H5Ex_D_Shuffle.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index f0a437dccc7..c1365f71c46 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java index fa4b4166cf2..2192cb9382a 100644 --- a/java/examples/datasets/H5Ex_D_Soint.java +++ b/java/examples/datasets/H5Ex_D_Soint.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java index 81065573506..ad04692b350 100644 --- a/java/examples/datasets/H5Ex_D_Szip.java +++ b/java/examples/datasets/H5Ex_D_Szip.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java index ada488a76c8..0c63afd3549 100644 --- a/java/examples/datasets/H5Ex_D_Transform.java +++ b/java/examples/datasets/H5Ex_D_Transform.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java index 7e8ffaa3dd0..2e18b99c933 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java index 42a6efdb823..b65162164d7 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java index b38b233a935..68aecc4f504 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in index 7c47002e838..f29739ac5e5 100644 --- a/java/examples/datasets/JavaDatasetExample.sh.in +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -1,13 +1,12 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/datasets/Makefile.am b/java/examples/datasets/Makefile.am index c5b8a5d7cb8..41a914b612e 100644 --- a/java/examples/datasets/Makefile.am +++ b/java/examples/datasets/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java index f7f58d2e775..162ac898063 100644 --- a/java/examples/datatypes/H5Ex_T_Array.java +++ b/java/examples/datatypes/H5Ex_T_Array.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java index b571f0c06a0..14ae9a4fc1e 100644 --- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java index e46f3b2fa3c..95968d018e1 100644 --- a/java/examples/datatypes/H5Ex_T_Bit.java +++ b/java/examples/datatypes/H5Ex_T_Bit.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java index 43de4ea5fa3..e093453e88c 100644 --- a/java/examples/datatypes/H5Ex_T_BitAttribute.java +++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java index 4108979e775..204b6321db5 100644 --- a/java/examples/datatypes/H5Ex_T_Commit.java +++ b/java/examples/datatypes/H5Ex_T_Commit.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java index c021c18abb5..f0fe715791a 100644 --- a/java/examples/datatypes/H5Ex_T_Compound.java +++ b/java/examples/datatypes/H5Ex_T_Compound.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java index 971939af68c..d8fd4a1aade 100644 --- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java +++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java index f15f774294d..f907b1ffa4c 100644 --- a/java/examples/datatypes/H5Ex_T_Float.java +++ b/java/examples/datatypes/H5Ex_T_Float.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java index 12831bc4b41..32b5a94c302 100644 --- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java +++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java index 56da623f7ab..ddcc156cc12 100644 --- a/java/examples/datatypes/H5Ex_T_Integer.java +++ b/java/examples/datatypes/H5Ex_T_Integer.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java index 9de517c2697..9024c9e83df 100644 --- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java +++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java index 8ce4f7beaf0..f561aa153b9 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReference.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java index 4dc36775e31..8d044547fb4 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java index 6b0dc63c970..c4ee39f0d8c 100644 --- a/java/examples/datatypes/H5Ex_T_Opaque.java +++ b/java/examples/datatypes/H5Ex_T_Opaque.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java index 6b8d1f8cdec..4407451e5ac 100644 --- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java +++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java index 7c190b76b33..7b63c3535a7 100644 --- a/java/examples/datatypes/H5Ex_T_String.java +++ b/java/examples/datatypes/H5Ex_T_String.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java index f9ec155236e..0c9d40ceeca 100644 --- a/java/examples/datatypes/H5Ex_T_StringAttribute.java +++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java index 39be3e5f4de..933b0b4e703 100644 --- a/java/examples/datatypes/H5Ex_T_VLString.java +++ b/java/examples/datatypes/H5Ex_T_VLString.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in index 6a4581a8edb..e26d8c0af57 100644 --- a/java/examples/datatypes/JavaDatatypeExample.sh.in +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -1,13 +1,12 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/datatypes/Makefile.am b/java/examples/datatypes/Makefile.am index f6955280be4..90790f79406 100644 --- a/java/examples/datatypes/Makefile.am +++ b/java/examples/datatypes/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java index 7e20c2a8c8d..0ae98c98105 100644 --- a/java/examples/groups/H5Ex_G_Compact.java +++ b/java/examples/groups/H5Ex_G_Compact.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java index 53d001191c8..61b5b7f63b1 100644 --- a/java/examples/groups/H5Ex_G_Corder.java +++ b/java/examples/groups/H5Ex_G_Corder.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java index 0e729d59982..16b202855b5 100644 --- a/java/examples/groups/H5Ex_G_Create.java +++ b/java/examples/groups/H5Ex_G_Create.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java index f7d5a50e718..130ec09013d 100644 --- a/java/examples/groups/H5Ex_G_Intermediate.java +++ b/java/examples/groups/H5Ex_G_Intermediate.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java index 3c9ca82ec48..47f55fed1f7 100644 --- a/java/examples/groups/H5Ex_G_Iterate.java +++ b/java/examples/groups/H5Ex_G_Iterate.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java index bfb775b28fa..b1c2afc0599 100644 --- a/java/examples/groups/H5Ex_G_Phase.java +++ b/java/examples/groups/H5Ex_G_Phase.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java index 2a2cba3beb7..3410c632380 100644 --- a/java/examples/groups/H5Ex_G_Traverse.java +++ b/java/examples/groups/H5Ex_G_Traverse.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java index f91c7079a73..0e935deb387 100644 --- a/java/examples/groups/H5Ex_G_Visit.java +++ b/java/examples/groups/H5Ex_G_Visit.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index f32947a9253..3b0e9d137a9 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -1,13 +1,12 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/groups/Makefile.am b/java/examples/groups/Makefile.am index d5824e8b859..bfde9aeb6e8 100644 --- a/java/examples/groups/Makefile.am +++ b/java/examples/groups/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java index 68749b187be..12a09a6b24f 100644 --- a/java/examples/intro/H5_CreateAttribute.java +++ b/java/examples/intro/H5_CreateAttribute.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java index 3572a31e702..f26e6b3ecfc 100644 --- a/java/examples/intro/H5_CreateDataset.java +++ b/java/examples/intro/H5_CreateDataset.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java index a8c87ea96ea..078d1d7256d 100644 --- a/java/examples/intro/H5_CreateFile.java +++ b/java/examples/intro/H5_CreateFile.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java index 9359605ee59..640e5f6b39a 100644 --- a/java/examples/intro/H5_CreateGroup.java +++ b/java/examples/intro/H5_CreateGroup.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java index ddc069fa16b..a4456041894 100644 --- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java +++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java index bdb054627fc..22874a8b723 100644 --- a/java/examples/intro/H5_CreateGroupDataset.java +++ b/java/examples/intro/H5_CreateGroupDataset.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java index 5a7dabc2d24..6ba3bc27a0f 100644 --- a/java/examples/intro/H5_ReadWrite.java +++ b/java/examples/intro/H5_ReadWrite.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index 7f7dabf6e08..db741e55b99 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -1,13 +1,12 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am index 8c3716a3e2c..7d1aeabc3bc 100644 --- a/java/examples/intro/Makefile.am +++ b/java/examples/intro/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/src/Makefile.am b/java/src/Makefile.am index 78dbc9a5b01..096b6b34311 100644 --- a/java/src/Makefile.am +++ b/java/src/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 58c1e14387a..2d0ad76cdfd 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 42b103d495d..5f72aee2f52 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java index a45cb7cc76e..44b41bb9934 100644 --- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java +++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 63e17e85bc3..96291b33ff3 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -6,12 +6,11 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - package hdf.hdf5lib; import hdf.hdf5lib.exceptions.HDF5Exception; diff --git a/java/src/hdf/hdf5lib/HDFNativeData.java b/java/src/hdf/hdf5lib/HDFNativeData.java index 9637f623c11..5b29050310c 100644 --- a/java/src/hdf/hdf5lib/HDFNativeData.java +++ b/java/src/hdf/hdf5lib/HDFNativeData.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/Callbacks.java b/java/src/hdf/hdf5lib/callbacks/Callbacks.java index 9fc961a75c3..11fa4652d1c 100644 --- a/java/src/hdf/hdf5lib/callbacks/Callbacks.java +++ b/java/src/hdf/hdf5lib/callbacks/Callbacks.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java index 69c970988f2..6c68f364d17 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java index bdc96faf6bf..d612db3a2e4 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5A_iterate_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java index 8ad336f97ea..cf7ada6b4a0 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java index 795ed1e19fb..7fdb454c038 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_append_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java index ca10342bbe1..54c12e300ba 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java index 43fc159bdc2..305cf98d6d1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5D_iterate_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java index e5914c1435a..57221954fdf 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java index 3ff09ec79c6..5bf0c8b356e 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5E_walk_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java index c472a3e112b..663d761aa36 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java index 916632d29c6..67cc7ed5a36 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5L_iterate_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java index ef90dae5995..054230fa4c5 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java index 2c3984ce7c0..bb9091d54cd 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5O_iterate_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java index 78a87ad7a5d..0a09a943d33 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java index 709ee494bb2..11e3a99f15f 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_close_func_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java index 878bbd38839..53f86bea3b8 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java index b3e7f094ef0..78e52822452 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_copy_func_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java index 88d0aa682ea..8f4e78202e3 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java index 8e259cc7c2e..d919d97e587 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_cls_create_func_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java index 60e1884b62d..db98a672373 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java index 4c5d2226be8..0035619fdf1 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_iterate_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java index 40569bc0aeb..1aa7ce4395d 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_close_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java index cc466a61e3d..49cef7dc2f5 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_compare_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java index 59e4bb8cc6a..f4924ee6160 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_copy_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java index 5c6df7a9e84..bce024b27de 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_create_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java index 5206d4fc565..8c5dcccfba9 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_delete_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java index 8f44497351a..0f3457f695c 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_get_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java index 2a2d3a15ac2..a55ca3af6aa 100644 --- a/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java +++ b/java/src/hdf/hdf5lib/callbacks/H5P_prp_set_func_cb.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java b/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java index 850044c89a2..ee1b21f6613 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5AtomException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java index 87b075bab36..86dad88a1f2 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5AttributeException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java index 51182546da0..97585d3cf8a 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5BtreeException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java index 14ae43f6cf5..b02d815d942 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataFiltersException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java index 721d3efb347..416b06a4e06 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataStorageException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java index 3c55a6b9f33..7bb22fa7446 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatasetInterfaceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java index c0182eec21f..9a85ff06e6f 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DataspaceInterfaceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java index 4da074bf53d..45b0c552efd 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5DatatypeInterfaceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java index 70fdd119cdd..0c23af188db 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5Exception.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java index 28f5437cbe2..73bf0695ede 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ExternalFileListException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java index c8dbcea1e84..ac82258c70d 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FileInterfaceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java index e7f20e0d665..c4fcf301696 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionArgumentException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java index 26e836ffb31..ee34b59a3ca 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5FunctionEntryExitException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java index a32e2a15ea9..1bb32512623 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5HeapException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java index 25ac572d349..810c1261c54 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5InternalErrorException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java index 7c611949c17..35720da75dd 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5JavaException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index 17a81e95b0f..b1052bc104b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java index 6d792c38e8d..d61f4e9f833 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LowLevelIOException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java index 02f2d33d3b9..3b64b159b3b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5MetaDataCacheException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java index 2bb686161a5..b9f40f818e5 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ObjectHeaderException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java index b1baaad29ff..d2a20e07074 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5PropertyListInterfaceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java index fea5b6ded14..0701244413b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ReferenceException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java index fc925783496..ad052b5472b 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5ResourceUnavailableException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java index b90ce640e9d..ba9150f33f4 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5SymbolTableException.java @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java index a118d05fe46..9f04211a0b0 100644 --- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java +++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java index cd7a397cbb3..4bc1b0d6faa 100644 --- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java index 083537f64d5..e0741565094 100644 --- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java index 836b683d3a4..bb87201dd1d 100644 --- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java index 9a5c72efb41..6d4f405aa53 100644 --- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java index a595708c6dd..9da237b0733 100644 --- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java index df766385bf2..9a1749dc14d 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java index 8dedeca5acb..02bdcbd5cdb 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java index 1c3ab804a3d..0551469f3c5 100644 --- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/Makefile.am b/java/src/jni/Makefile.am index 1bded3d5bc1..30496cb97d0 100644 --- a/java/src/jni/Makefile.am +++ b/java/src/jni/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index c5e7d85aeac..e62caeea7ba 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index 1a7ad92fbec..72edf4c5908 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index c0dcbb8c2c5..590f51a85db 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5Imp.c b/java/src/jni/h5Imp.c index 5773fff0ce0..691c98cac1e 100644 --- a/java/src/jni/h5Imp.c +++ b/java/src/jni/h5Imp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5Imp.h b/java/src/jni/h5Imp.h index 696d7d23588..776f295a06b 100644 --- a/java/src/jni/h5Imp.h +++ b/java/src/jni/h5Imp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index fe8c066a303..f0727328164 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5aImp.h b/java/src/jni/h5aImp.h index d3a4246a43b..3d9a230c992 100644 --- a/java/src/jni/h5aImp.h +++ b/java/src/jni/h5aImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 6a587b517a9..0fd57ff3e29 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5dImp.h b/java/src/jni/h5dImp.h index b9ad1bbe91f..61dfeaa2414 100644 --- a/java/src/jni/h5dImp.h +++ b/java/src/jni/h5dImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5eImp.c b/java/src/jni/h5eImp.c index 13826dc3966..5bdeae80016 100644 --- a/java/src/jni/h5eImp.c +++ b/java/src/jni/h5eImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5eImp.h b/java/src/jni/h5eImp.h index 4754965baa3..3133ca90715 100644 --- a/java/src/jni/h5eImp.h +++ b/java/src/jni/h5eImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 529e503dabf..17e26d650c8 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index ea6b436c479..d1f466b4772 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5gImp.c b/java/src/jni/h5gImp.c index 43a61222dc5..a0011d82a60 100644 --- a/java/src/jni/h5gImp.c +++ b/java/src/jni/h5gImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5gImp.h b/java/src/jni/h5gImp.h index 3de21b7d84b..4b0cb4d0e59 100644 --- a/java/src/jni/h5gImp.h +++ b/java/src/jni/h5gImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5iImp.c b/java/src/jni/h5iImp.c index 78cc1385707..1e7821a3847 100644 --- a/java/src/jni/h5iImp.c +++ b/java/src/jni/h5iImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5iImp.h b/java/src/jni/h5iImp.h index ff407d90abd..ed543035b00 100644 --- a/java/src/jni/h5iImp.h +++ b/java/src/jni/h5iImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index 5706df2586e..78fc92abd6f 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index 6a4e7992073..4832094ddad 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5lImp.h b/java/src/jni/h5lImp.h index 7a93c712d7d..134ed1762f4 100644 --- a/java/src/jni/h5lImp.h +++ b/java/src/jni/h5lImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c index 5987addcbbb..42a4f1b820e 100644 --- a/java/src/jni/h5oImp.c +++ b/java/src/jni/h5oImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5oImp.h b/java/src/jni/h5oImp.h index c045fbb6eb3..2ddf7a2ebac 100644 --- a/java/src/jni/h5oImp.h +++ b/java/src/jni/h5oImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pACPLImp.c b/java/src/jni/h5pACPLImp.c index f6c14e1ae1b..6290e0ea155 100644 --- a/java/src/jni/h5pACPLImp.c +++ b/java/src/jni/h5pACPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pACPLImp.h b/java/src/jni/h5pACPLImp.h index 194afc04b45..8d9bf7d29ab 100644 --- a/java/src/jni/h5pACPLImp.h +++ b/java/src/jni/h5pACPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDAPLImp.c b/java/src/jni/h5pDAPLImp.c index 4654aa31646..82802b91531 100644 --- a/java/src/jni/h5pDAPLImp.c +++ b/java/src/jni/h5pDAPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDAPLImp.h b/java/src/jni/h5pDAPLImp.h index 85238e1184e..353f652426a 100644 --- a/java/src/jni/h5pDAPLImp.h +++ b/java/src/jni/h5pDAPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDCPLImp.c b/java/src/jni/h5pDCPLImp.c index df9c4ebb9a6..760a5a8ab7e 100644 --- a/java/src/jni/h5pDCPLImp.c +++ b/java/src/jni/h5pDCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDCPLImp.h b/java/src/jni/h5pDCPLImp.h index 3a6a0885d39..302019f2845 100644 --- a/java/src/jni/h5pDCPLImp.h +++ b/java/src/jni/h5pDCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDXPLImp.c b/java/src/jni/h5pDXPLImp.c index f7f9f9657e5..c555d539850 100644 --- a/java/src/jni/h5pDXPLImp.c +++ b/java/src/jni/h5pDXPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pDXPLImp.h b/java/src/jni/h5pDXPLImp.h index 9793ce7471d..250c3f898de 100644 --- a/java/src/jni/h5pDXPLImp.h +++ b/java/src/jni/h5pDXPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index 0077df4e28a..ad85aaef88d 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pFAPLImp.h b/java/src/jni/h5pFAPLImp.h index 780ebc4e45a..4bb48e2e390 100644 --- a/java/src/jni/h5pFAPLImp.h +++ b/java/src/jni/h5pFAPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pFCPLImp.c b/java/src/jni/h5pFCPLImp.c index eb5481a7641..860aee15022 100644 --- a/java/src/jni/h5pFCPLImp.c +++ b/java/src/jni/h5pFCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pFCPLImp.h b/java/src/jni/h5pFCPLImp.h index 17aab2222cb..eb827b9a963 100644 --- a/java/src/jni/h5pFCPLImp.h +++ b/java/src/jni/h5pFCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pGAPLImp.c b/java/src/jni/h5pGAPLImp.c index 954038775f7..b92e1809d15 100644 --- a/java/src/jni/h5pGAPLImp.c +++ b/java/src/jni/h5pGAPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pGAPLImp.h b/java/src/jni/h5pGAPLImp.h index 73ad4a8c8a0..341c6707c75 100644 --- a/java/src/jni/h5pGAPLImp.h +++ b/java/src/jni/h5pGAPLImp.h @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/jni/h5pGCPLImp.c b/java/src/jni/h5pGCPLImp.c index 67af902cae5..2ba140d838b 100644 --- a/java/src/jni/h5pGCPLImp.c +++ b/java/src/jni/h5pGCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pGCPLImp.h b/java/src/jni/h5pGCPLImp.h index 920e7997127..6a40908190a 100644 --- a/java/src/jni/h5pGCPLImp.h +++ b/java/src/jni/h5pGCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c index 4ab359a3cf5..175794d7433 100644 --- a/java/src/jni/h5pImp.c +++ b/java/src/jni/h5pImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index b35bf942ec7..b80ce468e92 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pLAPLImp.c b/java/src/jni/h5pLAPLImp.c index 01b2bb153b7..1db495ce565 100644 --- a/java/src/jni/h5pLAPLImp.c +++ b/java/src/jni/h5pLAPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pLAPLImp.h b/java/src/jni/h5pLAPLImp.h index c08e0c91b02..46adc0c70ac 100644 --- a/java/src/jni/h5pLAPLImp.h +++ b/java/src/jni/h5pLAPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pLCPLImp.c b/java/src/jni/h5pLCPLImp.c index 7c79796f2a7..b5eebd18e96 100644 --- a/java/src/jni/h5pLCPLImp.c +++ b/java/src/jni/h5pLCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pLCPLImp.h b/java/src/jni/h5pLCPLImp.h index 009d1b4109e..7601adb6c55 100644 --- a/java/src/jni/h5pLCPLImp.h +++ b/java/src/jni/h5pLCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pOCPLImp.c b/java/src/jni/h5pOCPLImp.c index 68fe4716f93..bdcba46c32f 100644 --- a/java/src/jni/h5pOCPLImp.c +++ b/java/src/jni/h5pOCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pOCPLImp.h b/java/src/jni/h5pOCPLImp.h index ad45ab9125b..c16f1be0991 100644 --- a/java/src/jni/h5pOCPLImp.h +++ b/java/src/jni/h5pOCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pOCpyPLImp.c b/java/src/jni/h5pOCpyPLImp.c index 81664ce2b7c..b525b680787 100644 --- a/java/src/jni/h5pOCpyPLImp.c +++ b/java/src/jni/h5pOCpyPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pOCpyPLImp.h b/java/src/jni/h5pOCpyPLImp.h index 662fba176f3..d8682cbad6d 100644 --- a/java/src/jni/h5pOCpyPLImp.h +++ b/java/src/jni/h5pOCpyPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pStrCPLImp.c b/java/src/jni/h5pStrCPLImp.c index aceeb0b6d0d..a056e3a7599 100644 --- a/java/src/jni/h5pStrCPLImp.c +++ b/java/src/jni/h5pStrCPLImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5pStrCPLImp.h b/java/src/jni/h5pStrCPLImp.h index 1e893142acb..8a564943af4 100644 --- a/java/src/jni/h5pStrCPLImp.h +++ b/java/src/jni/h5pStrCPLImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 4d2743a254b..91930286cd0 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index 82b069922c3..b809efa2cd6 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c index a96e4b65e4a..97f6624eb38 100644 --- a/java/src/jni/h5rImp.c +++ b/java/src/jni/h5rImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5rImp.h b/java/src/jni/h5rImp.h index bb47f81e97b..3fe56b8f18f 100644 --- a/java/src/jni/h5rImp.h +++ b/java/src/jni/h5rImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 3a9aa87e802..acdd8981362 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index 83255c1dca3..1ceaf3f9710 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index 284f8a3f974..1e2d36631b3 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5tImp.h b/java/src/jni/h5tImp.h index bac8a39fefd..4e14482ad06 100644 --- a/java/src/jni/h5tImp.h +++ b/java/src/jni/h5tImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 5ab21c837c8..8174b78319a 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index f16a3ecb962..6bee2230faa 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5zImp.c b/java/src/jni/h5zImp.c index 5d9f44248a2..d750ee8d552 100644 --- a/java/src/jni/h5zImp.c +++ b/java/src/jni/h5zImp.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/h5zImp.h b/java/src/jni/h5zImp.h index 58b088b8080..4e8982e033a 100644 --- a/java/src/jni/h5zImp.h +++ b/java/src/jni/h5zImp.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/nativeData.c b/java/src/jni/nativeData.c index d2f00ec6553..9e63f4f9899 100644 --- a/java/src/jni/nativeData.c +++ b/java/src/jni/nativeData.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/src/jni/nativeData.h b/java/src/jni/nativeData.h index 012f73e67f6..0150c75809d 100644 --- a/java/src/jni/nativeData.h +++ b/java/src/jni/nativeData.h @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/Makefile.am b/java/test/Makefile.am index 1abe5dc3371..7a7fa8a463e 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -1,12 +1,11 @@ # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. ## diff --git a/java/test/TestAll.java b/java/test/TestAll.java index c7c206cee6e..92cbb784902 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 2d089958dc3..ae8e039191f 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index 536364c9e2f..58e5ca602bd 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 5d0e4053eb2..74040eec982 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Dparams.java b/java/test/TestH5Dparams.java index a3618f2db65..e102344a45f 100644 --- a/java/test/TestH5Dparams.java +++ b/java/test/TestH5Dparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index 1b5acfa2239..6d516a4b9a9 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index ec46095ee49..696e4589411 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java index 076d313b03f..c6c982548fb 100644 --- a/java/test/TestH5Edefault.java +++ b/java/test/TestH5Edefault.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java index 0c55577b17e..e55f1fc702f 100644 --- a/java/test/TestH5Eparams.java +++ b/java/test/TestH5Eparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Eregister.java b/java/test/TestH5Eregister.java index 1b8769952e6..99e8e5f004b 100644 --- a/java/test/TestH5Eregister.java +++ b/java/test/TestH5Eregister.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index dddfd26ceb7..e3ea16620be 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index e72431b8e87..1a103d15016 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index c9dbc0cf662..ac54e2cc953 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java index 5ca1a97f18d..20578866e2b 100644 --- a/java/test/TestH5Fswmr.java +++ b/java/test/TestH5Fswmr.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index 6c301870317..2f0d1b7134f 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index 202f6ff89d6..db6fd5e6a0e 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java index 06c59e7b8a5..da687c11806 100644 --- a/java/test/TestH5Giterate.java +++ b/java/test/TestH5Giterate.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index 0a836c135b5..ecdd6c486a9 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index 06c4ac147c0..e40b7ce3631 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Lparams.java b/java/test/TestH5Lparams.java index c8d5f5daf06..30ee242fc70 100644 --- a/java/test/TestH5Lparams.java +++ b/java/test/TestH5Lparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index 8c6689f1f65..bd951c3d0a6 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java index e730b9f457f..5a52f12c94f 100644 --- a/java/test/TestH5Ocopy.java +++ b/java/test/TestH5Ocopy.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index de17d8b72cd..8b644db936f 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Oparams.java b/java/test/TestH5Oparams.java index cac3dcd4c66..e9a74359871 100644 --- a/java/test/TestH5Oparams.java +++ b/java/test/TestH5Oparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index b1c29b2166b..73e4d1d5fcc 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index dfd8e87d905..18d8b928fe8 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index 8ce708bc907..ac8c08330dc 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 4233580463b..7e704a9a987 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java index b0d42d8f289..d358ed32d4a 100644 --- a/java/test/TestH5Pfaplhdfs.java +++ b/java/test/TestH5Pfaplhdfs.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java index ba10524915b..1c7b3ca0407 100644 --- a/java/test/TestH5Pfapls3.java +++ b/java/test/TestH5Pfapls3.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index e318cc9a884..57785658b2e 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java index ff2e4dc3c4d..abc0f3d18a6 100644 --- a/java/test/TestH5Pvirtual.java +++ b/java/test/TestH5Pvirtual.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index 5349855d27f..eae795cc24b 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java index 97c0b68ecb0..9e890c0cb04 100644 --- a/java/test/TestH5S.java +++ b/java/test/TestH5S.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index 9874584facb..be05bdeeaaf 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index 1a7e58bff05..cca68caaf4a 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java index 3c2500b1a40..bb71bc8064b 100644 --- a/java/test/TestH5Tbasic.java +++ b/java/test/TestH5Tbasic.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java index 53d3a37f18f..9813727c690 100644 --- a/java/test/TestH5Tparams.java +++ b/java/test/TestH5Tparams.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/TestH5Z.java b/java/test/TestH5Z.java index 27bda6fd290..fde8f1a2d95 100644 --- a/java/test/TestH5Z.java +++ b/java/test/TestH5Z.java @@ -1,12 +1,11 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index a074e30ba71..a3a52af6079 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -1,13 +1,12 @@ #! /bin/sh # # Copyright by The HDF Group. -# Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# distribution tree, or in https://www.hdfgroup.org/licenses. # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index a71f65823ba..9b27f444b72 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -357,14 +357,14 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options) done: H5E_BEGIN_TRY { - H5Pclose(fcpl_in); - H5Pclose(gcpl_in); H5Pclose(fcpl); + H5Pclose(options->fout_fapl); + options->fout_fapl = H5P_DEFAULT; + H5Pclose(gcpl_in); H5Gclose(grp_in); - H5Fclose(fidin); + H5Pclose(fcpl_in); H5Fclose(fidout); H5Fclose(fidin); - H5Fclose(fidout); } H5E_END_TRY; if (travt) diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c index 159a96a805b..cbdc76e6c02 100644 --- a/tools/src/h5repack/h5repack_verify.c +++ b/tools/src/h5repack/h5repack_verify.c @@ -378,9 +378,11 @@ h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t *------------------------------------------------------------------------- */ /* Open the files */ - if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, TRUE, NULL, 0)) < 0) + if ((fid1 = h5tools_fopen(fname1, H5F_ACC_RDONLY, fname1_fapl, + (fname1_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname1, H5FOPENERROR); - if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, TRUE, NULL, 0)) < 0) + if ((fid2 = h5tools_fopen(fname2, H5F_ACC_RDONLY, fname2_fapl, + (fname2_fapl == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0)) < 0) H5TOOLS_GOTO_ERROR((-1), "h5tools_fopen failed <%s>: %s", fname2, H5FOPENERROR); /*------------------------------------------------------------------------- From 4d7a1501151714c14a3b68948eeca44931440349 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 2 Mar 2021 15:06:23 -0600 Subject: [PATCH 14/66] Merges from develop #358 patches from vtk #361 fix header guard spelling --- .github/CODEOWNERS | 8 +++---- bin/make_err | 4 ++-- bin/make_overflow | 4 ++-- bin/make_vers | 4 ++-- c++/src/H5ArrayType.h | 6 +++--- c++/src/H5AtomType.h | 6 +++--- c++/src/H5Attribute.cpp | 2 +- c++/src/H5Attribute.h | 6 +++--- c++/src/H5Classes.h | 6 +++--- c++/src/H5CompType.h | 6 +++--- c++/src/H5Cpp.h | 6 +++--- c++/src/H5CppDoc.h | 6 +++--- c++/src/H5DaccProp.h | 6 +++--- c++/src/H5DataSet.h | 6 +++--- c++/src/H5DataSpace.h | 6 +++--- c++/src/H5DataType.h | 6 +++--- c++/src/H5DcreatProp.h | 6 +++--- c++/src/H5DxferProp.h | 6 +++--- c++/src/H5EnumType.h | 6 +++--- c++/src/H5Exception.h | 6 +++--- c++/src/H5FaccProp.h | 6 +++--- c++/src/H5FcreatProp.h | 6 +++--- c++/src/H5File.h | 6 +++--- c++/src/H5FloatType.h | 6 +++--- c++/src/H5IntType.h | 6 +++--- c++/src/H5LaccProp.h | 6 +++--- c++/src/H5LcreatProp.h | 6 +++--- c++/src/H5Library.h | 6 +++--- c++/src/H5Location.h | 6 +++--- c++/src/H5Object.cpp | 16 +++++++++----- c++/src/H5Object.h | 6 +++--- c++/src/H5OcreatProp.h | 6 +++--- c++/src/H5PredType.cpp | 3 ++- c++/src/H5PredType.h | 6 +++--- c++/src/H5PropList.h | 6 +++--- c++/src/H5StrType.cpp | 3 ++- c++/src/H5StrType.h | 6 +++--- c++/src/H5VarLenType.h | 6 +++--- c++/test/h5cpputil.h | 4 ++-- config/cmake/HDF5PluginCache.cmake | 2 +- fortran/src/H5_f.c | 19 +++++++---------- fortran/src/H5f90.h | 6 +++--- fortran/src/H5f90i.h | 6 +++--- fortran/src/H5f90proto.h | 6 +++--- hl/c++/src/H5PacketTable.h | 2 +- hl/fortran/src/H5IMcc.h | 4 ++-- hl/fortran/src/H5LTf90proto.h | 6 +++--- hl/src/H5DOpublic.h | 4 ++-- hl/src/H5DSprivate.h | 4 ++-- hl/src/H5DSpublic.h | 4 ++-- hl/src/H5HLprivate2.h | 6 +++--- hl/src/H5IM.c | 8 ++----- hl/src/H5IMprivate.h | 4 ++-- hl/src/H5IMpublic.h | 4 ++-- hl/src/H5LDprivate.h | 6 +++--- hl/src/H5LDpublic.h | 6 +++--- hl/src/H5LT.c | 14 ++++-------- hl/src/H5LTprivate.h | 4 ++-- hl/src/H5LTpublic.h | 4 ++-- hl/src/H5PTprivate.h | 4 ++-- hl/src/H5PTpublic.h | 4 ++-- hl/src/H5TBprivate.h | 4 ++-- hl/src/H5TBpublic.h | 4 ++-- hl/test/h5hltest.h | 6 +++--- hl/tools/gif2h5/hdfgifwr.c | 12 +++++------ src/H5ACmodule.h | 6 +++--- src/H5ACpkg.h | 6 +++--- src/H5ACprivate.h | 6 +++--- src/H5ACpublic.h | 4 ++-- src/H5Amodule.h | 6 +++--- src/H5Apkg.h | 6 +++--- src/H5Aprivate.h | 6 +++--- src/H5Apublic.h | 6 +++--- src/H5B2module.h | 6 +++--- src/H5B2pkg.h | 6 +++--- src/H5B2private.h | 6 +++--- src/H5Bmodule.h | 6 +++--- src/H5Bpkg.h | 34 +++++++++++++++--------------- src/H5Bprivate.h | 6 +++--- src/H5CSprivate.h | 6 +++--- src/H5CXmodule.h | 6 +++--- src/H5CXprivate.h | 10 ++++----- src/H5Clog.h | 6 +++--- src/H5Cmodule.h | 6 +++--- src/H5Cpkg.h | 6 +++--- src/H5Cprivate.h | 16 +++++++------- src/H5Cpublic.h | 6 ++---- src/H5Dmodule.h | 6 +++--- src/H5Dpkg.h | 6 +++--- src/H5Dprivate.h | 6 +++--- src/H5Dpublic.h | 6 +++--- src/H5EAmodule.h | 6 +++--- src/H5EApkg.h | 6 +++--- src/H5EAprivate.h | 6 +++--- src/H5Emodule.h | 6 +++--- src/H5Epkg.h | 6 +++--- src/H5Eprivate.h | 12 ++++++++--- src/H5Epublic.h | 6 +++--- src/H5FAmodule.h | 6 +++--- src/H5FApkg.h | 6 +++--- src/H5FAprivate.h | 6 +++--- src/H5FDdirect.h | 2 +- src/H5FDdrvr_module.h | 6 +++--- src/H5FDhdfs.h | 2 +- src/H5FDmodule.h | 6 +++--- src/H5FDmpio.h | 2 +- src/H5FDpkg.h | 6 +++--- src/H5FDprivate.h | 6 +++--- src/H5FDpublic.h | 4 ++-- src/H5FLmodule.h | 6 +++--- src/H5FLprivate.h | 4 ++-- src/H5FOprivate.h | 6 +++--- src/H5FSmodule.h | 6 +++--- src/H5FSpkg.h | 6 +++--- src/H5FSprivate.h | 6 +++--- src/H5Fmodule.h | 6 +++--- src/H5Fpkg.h | 6 +++--- src/H5Fprivate.h | 16 +++++++------- src/H5Fpublic.h | 18 ++++++++-------- src/H5Gmodule.h | 6 +++--- src/H5Gpkg.h | 6 +++--- src/H5Gprivate.h | 6 +++--- src/H5Gpublic.h | 6 +++--- src/H5HFmodule.h | 6 +++--- src/H5HFpkg.h | 6 +++--- src/H5HFprivate.h | 6 +++--- src/H5HGmodule.h | 6 +++--- src/H5HGpkg.h | 6 +++--- src/H5HGprivate.h | 6 +++--- src/H5HLmodule.h | 6 +++--- src/H5HLpkg.h | 6 +++--- src/H5HLprivate.h | 4 ++-- src/H5HPprivate.h | 6 +++--- src/H5Imodule.h | 18 ++++++++-------- src/H5Ipkg.h | 6 +++--- src/H5Iprivate.h | 6 +++--- src/H5Ipublic.h | 6 +++--- src/H5Lmodule.h | 6 +++--- src/H5Lpkg.h | 6 +++--- src/H5Lprivate.h | 6 +++--- src/H5Lpublic.h | 6 +++--- src/H5MFmodule.h | 6 +++--- src/H5MFpkg.h | 6 +++--- src/H5MFprivate.h | 6 +++--- src/H5MMprivate.h | 6 +++--- src/H5MMpublic.h | 6 +++--- src/H5MPmodule.h | 6 +++--- src/H5MPpkg.h | 6 +++--- src/H5MPprivate.h | 6 +++--- src/H5Omodule.h | 6 +++--- src/H5Opkg.h | 6 +++--- src/H5Oprivate.h | 6 +++--- src/H5Opublic.h | 12 +++++------ src/H5PBmodule.h | 6 +++--- src/H5PBpkg.h | 6 +++--- src/H5PBprivate.h | 6 +++--- src/H5PLextern.h | 6 +++--- src/H5PLmodule.h | 6 +++--- src/H5PLpkg.h | 6 +++--- src/H5PLprivate.h | 6 +++--- src/H5PLpublic.h | 6 +++--- src/H5Pmodule.h | 6 +++--- src/H5Ppkg.h | 6 +++--- src/H5Pprivate.h | 6 +++--- src/H5Ppublic.h | 6 +++--- src/H5RSprivate.h | 6 +++--- src/H5Rmodule.h | 6 +++--- src/H5Rpkg.h | 6 +++--- src/H5Rprivate.h | 6 +++--- src/H5Rpublic.h | 6 +++--- src/H5SLmodule.h | 6 +++--- src/H5SLprivate.h | 6 +++--- src/H5SMmodule.h | 6 +++--- src/H5SMpkg.h | 6 +++--- src/H5SMprivate.h | 6 +++--- src/H5STprivate.h | 6 +++--- src/H5Smodule.h | 6 +++--- src/H5Spkg.h | 6 +++--- src/H5Sprivate.h | 6 +++--- src/H5Spublic.h | 6 +++--- src/H5TSprivate.h | 12 ++++++++--- src/H5Tmodule.h | 6 +++--- src/H5Tpkg.h | 6 +++--- src/H5Tprivate.h | 6 +++--- src/H5Tpublic.h | 6 +++--- src/H5UCprivate.h | 6 +++--- src/H5VMprivate.h | 2 +- src/H5WBprivate.h | 6 +++--- src/H5Zmodule.h | 6 +++--- src/H5Zpkg.h | 6 +++--- src/H5Zprivate.h | 4 ++-- src/H5Zpublic.h | 4 ++-- src/H5private.h | 24 ++++++--------------- src/H5public.h | 10 ++++----- src/H5win32defs.h | 7 ++++++ src/hdf5.h | 4 ++-- test/H5srcdir.h | 6 +++--- test/h5test.h | 4 ++-- tools/lib/h5diff_array.c | 4 +--- tools/lib/h5tools_dump.c | 3 +++ 200 files changed, 637 insertions(+), 634 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6061711a29f..a80d51cc265 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,7 +13,7 @@ CMakeTests.* @byrnHDF @derobins /bin/ @lrknox @derobins -/c++/ @bmribler @byrnHDF +/c++/ @bmribler @byrnHDF @derobins /config/ @lrknox @derobins @byrnHDF @@ -23,7 +23,7 @@ CMakeTests.* @byrnHDF @derobins /fortran/ @brtnfld @epourmal -/hl/ @bmribler @byrnHDF +/hl/ @bmribler @byrnHDF @derobins /java/ @jhendersonHDF @byrnHDF @@ -37,6 +37,6 @@ CMakeTests.* @byrnHDF @derobins /testpar/ @jhendersonHDF @rawarren @jrmainzer -/tools/ @byrnHDF @bmribler +/tools/ @byrnHDF @bmribler @derobins -/utils/ @lrknox @byrnHDF +/utils/ @lrknox @byrnHDF @derobins diff --git a/bin/make_err b/bin/make_err index 68a32f4e720..f2b044a163c 100755 --- a/bin/make_err +++ b/bin/make_err @@ -64,8 +64,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/bin/make_overflow b/bin/make_overflow index d1d16ee84c0..37d6dedfe73 100755 --- a/bin/make_overflow +++ b/bin/make_overflow @@ -93,8 +93,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/bin/make_vers b/bin/make_vers index 344bcbcd607..5236e01f805 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -78,8 +78,8 @@ sub print_startprotect ($$) { $file =~ s/(\w*)\.h/$1/; # Print the ifdef info - print $fh "\n#ifndef _${file}_H\n"; - print $fh "#define _${file}_H\n"; + print $fh "\n#ifndef ${file}_H\n"; + print $fh "#define ${file}_H\n"; } ############################################################################## diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index c2a64934c84..4302352c851 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5ArrayType_H -#define __H5ArrayType_H +#ifndef H5ArrayType_H +#define H5ArrayType_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP ArrayType : public DataType { }; // end of ArrayType } // namespace H5 -#endif // __H5ArrayType_H +#endif // H5ArrayType_H diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index f5664b84574..84da5e98ff0 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5AtomType_H -#define __H5AtomType_H +#ifndef H5AtomType_H +#define H5AtomType_H namespace H5 { @@ -83,4 +83,4 @@ class H5_DLLCPP AtomType : public DataType { }; // end of AtomType } // namespace H5 -#endif // __H5AtomType_H +#endif // H5AtomType_H diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp index 08367c5fbb0..81e656f74b5 100644 --- a/c++/src/H5Attribute.cpp +++ b/c++/src/H5Attribute.cpp @@ -41,7 +41,7 @@ namespace H5 { using std::cerr; using std::endl; -class H5_DLLCPP H5Object; // forward declaration for UserData4Aiterate +class H5Object; // forward declaration for UserData4Aiterate //-------------------------------------------------------------------------- // Function: Attribute default constructor diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 5a13c2ebf86..41e5a313a3f 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Attribute_H -#define __H5Attribute_H +#ifndef H5Attribute_H +#define H5Attribute_H namespace H5 { @@ -104,4 +104,4 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location { }; // end of Attribute } // namespace H5 -#endif // __H5Attribute_H +#endif // H5Attribute_H diff --git a/c++/src/H5Classes.h b/c++/src/H5Classes.h index 42e3d6961f6..7820ce2564e 100644 --- a/c++/src/H5Classes.h +++ b/c++/src/H5Classes.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Classes_H -#define __H5Classes_H +#ifndef H5Classes_H +#define H5Classes_H namespace H5 { class Exception; @@ -43,4 +43,4 @@ class H5File; class Attribute; class H5Library; } // namespace H5 -#endif // __H5Classes_H +#endif // H5Classes_H diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 6d2ce7e871b..6a4c093decc 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5CompType_H -#define __H5CompType_H +#ifndef H5CompType_H +#define H5CompType_H namespace H5 { @@ -124,4 +124,4 @@ class H5_DLLCPP CompType : public DataType { }; // end of CompType } // namespace H5 -#endif // __H5CompType_H +#endif // H5CompType_H diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h index 8fea1f9fc32..9272bdb1f5a 100644 --- a/c++/src/H5Cpp.h +++ b/c++/src/H5Cpp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Cpp_H -#define __H5Cpp_H +#ifndef H5Cpp_H +#define H5Cpp_H #include "H5Include.h" #include "H5Exception.h" @@ -58,4 +58,4 @@ #define HOFFSET(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) #endif -#endif // __H5Cpp_H +#endif // H5Cpp_H diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h index 29f3afcd940..4337a6fe911 100644 --- a/c++/src/H5CppDoc.h +++ b/c++/src/H5CppDoc.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5CppDoc_H -#define __H5CppDoc_H +#ifndef H5CppDoc_H +#define H5CppDoc_H //------------------------------------------------------------------------- // The following section will be used to generate the 'Mainpage' @@ -92,4 +92,4 @@ /// This example shows how to work with groups. ///\example h5group.cpp -#endif // __H5CppDoc_H +#endif // H5CppDoc_H diff --git a/c++/src/H5DaccProp.h b/c++/src/H5DaccProp.h index 627c4a4ffd8..7d6b25051c1 100644 --- a/c++/src/H5DaccProp.h +++ b/c++/src/H5DaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSetAccPropList_H -#define __H5DSetAccPropList_H +#ifndef H5DSetAccPropList_H +#define H5DSetAccPropList_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList { }; // end of DSetAccPropList } // namespace H5 -#endif // __H5DSetAccPropList_H +#endif // H5DSetAccPropList_H diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index c07aad5aa0d..c7454709cfd 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataSet_H -#define __H5DataSet_H +#ifndef H5DataSet_H +#define H5DataSet_H namespace H5 { @@ -153,4 +153,4 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs { }; // end of DataSet } // namespace H5 -#endif // __H5DataSet_H +#endif // H5DataSet_H diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 14d030f4547..f16acfcf4f0 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataSpace_H -#define __H5DataSpace_H +#ifndef H5DataSpace_H +#define H5DataSpace_H namespace H5 { @@ -155,4 +155,4 @@ class H5_DLLCPP DataSpace : public IdComponent { }; // end of DataSpace } // namespace H5 -#endif // __H5DataSpace_H +#endif // H5DataSpace_H diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index f97f80663de..49f534859fa 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DataType_H -#define __H5DataType_H +#ifndef H5DataType_H +#define H5DataType_H namespace H5 { @@ -183,4 +183,4 @@ class H5_DLLCPP DataType : public H5Object { }; // end of DataType } // namespace H5 -#endif // __H5DataType_H +#endif // H5DataType_H diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 74c4be00e59..3c032ee5c6d 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSCreatPropList_H -#define __H5DSCreatPropList_H +#ifndef H5DSCreatPropList_H +#define H5DSCreatPropList_H namespace H5 { @@ -159,4 +159,4 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { }; // end of DSetCreatPropList } // namespace H5 -#endif // __H5DSCreatPropList_H +#endif // H5DSCreatPropList_H diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index cb4c2c3e5d8..11bad657090 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5DSetMemXferPropList_H -#define __H5DSetMemXferPropList_H +#ifndef H5DSetMemXferPropList_H +#define H5DSetMemXferPropList_H namespace H5 { @@ -131,4 +131,4 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { }; // end of DSetMemXferPropList } // namespace H5 -#endif // __H5DSetMemXferPropList_H +#endif // H5DSetMemXferPropList_H diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index b228d31b805..484405a0b76 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5EnumType_H -#define __H5EnumType_H +#ifndef H5EnumType_H +#define H5EnumType_H namespace H5 { @@ -87,4 +87,4 @@ class H5_DLLCPP EnumType : public DataType { }; // end of EnumType } // namespace H5 -#endif // __H5EnumType_H +#endif // H5EnumType_H diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index c7b117bb805..566c818eaba 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Exception_H -#define __H5Exception_H +#ifndef H5Exception_H +#define H5Exception_H #include @@ -176,4 +176,4 @@ class H5_DLLCPP IdComponentException : public Exception { }; // end of IdComponentException } // namespace H5 -#endif // __H5Exception_H +#endif // H5Exception_H diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index a02e2509cf8..998f870bea1 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FileAccPropList_H -#define __H5FileAccPropList_H +#ifndef H5FileAccPropList_H +#define H5FileAccPropList_H namespace H5 { @@ -168,4 +168,4 @@ class H5_DLLCPP FileAccPropList : public PropList { }; // end of FileAccPropList } // namespace H5 -#endif // __H5FileAccPropList_H +#endif // H5FileAccPropList_H diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 2b3f46fd2a8..00ae0b1500b 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FileCreatPropList_H -#define __H5FileCreatPropList_H +#ifndef H5FileCreatPropList_H +#define H5FileCreatPropList_H namespace H5 { @@ -109,4 +109,4 @@ class H5_DLLCPP FileCreatPropList : public PropList { }; // end of FileCreatPropList } // namespace H5 -#endif // __H5FileCreatPropList_H +#endif // H5FileCreatPropList_H diff --git a/c++/src/H5File.h b/c++/src/H5File.h index a350b47b3e3..b107f67782f 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5File_H -#define __H5File_H +#ifndef H5File_H +#define H5File_H namespace H5 { @@ -127,4 +127,4 @@ class H5_DLLCPP H5File : public Group { }; // end of H5File } // namespace H5 -#endif // __H5File_H +#endif // H5File_H diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index e254646ead2..c76be955a68 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5FloatType_H -#define __H5FloatType_H +#ifndef H5FloatType_H +#define H5FloatType_H namespace H5 { @@ -84,4 +84,4 @@ class H5_DLLCPP FloatType : public AtomType { }; // end of FloatType } // namespace H5 -#endif // __H5FloatType_H +#endif // H5FloatType_H diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 78415180a41..185c8f0da50 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5IntType_H -#define __H5IntType_H +#ifndef H5IntType_H +#define H5IntType_H namespace H5 { @@ -66,4 +66,4 @@ class H5_DLLCPP IntType : public AtomType { }; // end of IntType } // namespace H5 -#endif // __H5IntType_H +#endif // H5IntType_H diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h index e6cf888e386..4fa516ca60a 100644 --- a/c++/src/H5LaccProp.h +++ b/c++/src/H5LaccProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5LinkAccPropList_H -#define __H5LinkAccPropList_H +#ifndef H5LinkAccPropList_H +#define H5LinkAccPropList_H namespace H5 { @@ -70,4 +70,4 @@ class H5_DLLCPP LinkAccPropList : public PropList { }; // end of LinkAccPropList } // namespace H5 -#endif // __H5LinkAccPropList_H +#endif // H5LinkAccPropList_H diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h index e5a9d7a2dd2..aea38e76b88 100644 --- a/c++/src/H5LcreatProp.h +++ b/c++/src/H5LcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5LinkCreatPropList_H -#define __H5LinkCreatPropList_H +#ifndef H5LinkCreatPropList_H +#define H5LinkCreatPropList_H namespace H5 { @@ -77,4 +77,4 @@ class H5_DLLCPP LinkCreatPropList : public PropList { }; // end of LinkCreatPropList } // namespace H5 -#endif // __H5LinkCreatPropList_H +#endif // H5LinkCreatPropList_H diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 9a73eeee724..3df8d56d9b3 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Library_H -#define __H5Library_H +#ifndef H5Library_H +#define H5Library_H namespace H5 { @@ -69,4 +69,4 @@ class H5_DLLCPP H5Library { }; // end of H5Library } // namespace H5 -#endif // __H5Library_H +#endif // H5Library_H diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index a749cddc660..7d40fb01722 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Location_H -#define __H5Location_H +#ifndef H5Location_H +#define H5Location_H #include "H5Classes.h" // constains forward class declarations @@ -321,4 +321,4 @@ class H5_DLLCPP H5Location : public IdComponent { }; // end of H5Location } // namespace H5 -#endif // __H5Location_H +#endif // H5Location_H diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 7bd5479888f..1cba980f26b 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -42,8 +42,11 @@ namespace H5 { #ifndef DOXYGEN_SHOULD_SKIP_THIS // userAttrOpWrpr interfaces between the user's function and the // C library function H5Aiterate2 -extern "C" herr_t -userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) +extern "C" { + +static herr_t +userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); UserData4Aiterate *myData = reinterpret_cast(op_data); @@ -52,9 +55,10 @@ userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, voi } // userVisitOpWrpr interfaces between the user's function and the -// C library function H5Ovisit2 -extern "C" herr_t -userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info_t *obj_info, void *op_data) +// C library function H5Ovisit3 +static herr_t +userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, + void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); UserData4Visit *myData = reinterpret_cast(op_data); @@ -62,6 +66,8 @@ userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info_t *obj_info, return status; } +} // extern "C" + //-------------------------------------------------------------------------- // Function: H5Object default constructor (protected) // Programmer Binh-Minh Ribler - 2000 diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index b11c8955d06..baf38f1fb84 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5Object_H -#define __H5Object_H +#ifndef H5Object_H +#define H5Object_H namespace H5 { @@ -132,4 +132,4 @@ class H5_DLLCPP H5Object : public H5Location { }; // end of H5Object } // namespace H5 -#endif // __H5Object_H +#endif // H5Object_H diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h index ec6e9c8b629..7f6d411064e 100644 --- a/c++/src/H5OcreatProp.h +++ b/c++/src/H5OcreatProp.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5ObjCreatPropList_H -#define __H5ObjCreatPropList_H +#ifndef H5ObjCreatPropList_H +#define H5ObjCreatPropList_H namespace H5 { @@ -75,4 +75,4 @@ class H5_DLLCPP ObjCreatPropList : public PropList { }; // end of ObjCreatPropList } // namespace H5 -#endif // __H5ObjCreatPropList_H +#endif // H5ObjCreatPropList_H diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index dd703532745..b58569f68d8 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -27,6 +27,7 @@ #include "H5DataType.h" #include "H5AtomType.h" #include "H5PredType.h" +#include "H5private.h" namespace H5 { @@ -82,7 +83,7 @@ PredType::operator=(const PredType &rhs) // These dummy functions do not inherit from DataType - they'll // throw an DataTypeIException if invoked. void -PredType::commit(H5Location &loc, const char *name) +PredType::commit(H5_ATTR_UNUSED H5Location &loc, H5_ATTR_UNUSED const char *name) { throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!"); diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index c3ba6a20fc5..b40d2b3782d 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5PredType_H -#define __H5PredType_H +#ifndef H5PredType_H +#define H5PredType_H namespace H5 { @@ -442,4 +442,4 @@ class H5_DLLCPP PredType : public AtomType { }; // end of PredType } // namespace H5 -#endif // __H5PredType_H +#endif // H5PredType_H diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index cdd9619f21b..12c8b4b058c 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5PropList_H -#define __H5PropList_H +#ifndef H5PropList_H +#define H5PropList_H namespace H5 { @@ -144,4 +144,4 @@ class H5_DLLCPP PropList : public IdComponent { }; // end of PropList } // namespace H5 -#endif // __H5PropList_H +#endif // H5PropList_H diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 7bbe3ab07fd..473cab307fa 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -32,6 +32,7 @@ #include "H5StrType.h" #include "H5DataSet.h" #include "H5PredType.h" +#include "H5private.h" namespace H5 { @@ -102,7 +103,7 @@ StrType::StrType(const PredType &pred_type, const size_t &size) : AtomType() // This constructor replaced the previous one. // Programmer Binh-Minh Ribler - Nov 28, 2005 //-------------------------------------------------------------------------- -StrType::StrType(const int dummy, const size_t &size) : AtomType() +StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType() { // use DataType::copy to make a copy of the string predefined type // then set its length diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index b24cbefdc84..d272c535bcf 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5StrType_H -#define __H5StrType_H +#ifndef H5StrType_H +#define H5StrType_H namespace H5 { @@ -78,4 +78,4 @@ class H5_DLLCPP StrType : public AtomType { }; // end of StrType } // namespace H5 -#endif // __H5StrType_H +#endif // H5StrType_H diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 674b49d3f78..f767e0ebd2f 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __H5VarLenType_H -#define __H5VarLenType_H +#ifndef H5VarLenType_H +#define H5VarLenType_H namespace H5 { @@ -61,4 +61,4 @@ class H5_DLLCPP VarLenType : public DataType { }; // end of VarLenType } // namespace H5 -#endif // __H5VarLenType_H +#endif // H5VarLenType_H diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 6a9187a48cf..4439ae3f661 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -19,8 +19,8 @@ ***************************************************************************/ -#ifndef _h5cpputil_h -#define _h5cpputil_h +#ifndef H5cpputil_H +#define H5cpputil_H #include "h5test.h" diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 2b9e48c26f7..3b085ddf54b 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -20,7 +20,7 @@ set (HDF5_REPACK_EXECUTABLE $ CACHE STRING "hdf5 h5 set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) -set (H5PL_GIT_URL "https://git@bitbucket.hdfgroup.org/scm/test/h5plugin.git" CACHE STRING "Use plugins from HDF repository" FORCE) +set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF repository" FORCE) set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE) set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE) diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 430c87695d0..e443b09da82 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -53,10 +53,9 @@ int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes) /******/ { - int ret_value = -1; - hid_t c_type_id; - size_t tmp_val; - int i; + int ret_value = -1; + hid_t c_type_id; + int i; /* Fortran INTEGER may not be the same as C; do all checking to find an appropriate size @@ -148,8 +147,7 @@ h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes) if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value; - tmp_val = 1; - if (H5Tset_size(c_type_id, tmp_val) < 0) + if (H5Tset_size(c_type_id, 1) < 0) return ret_value; if (H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0) return ret_value; @@ -386,6 +384,7 @@ h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f * ret_value = 0; return ret_value; } + /****if* H5_f/h5init_flags_c * NAME * h5init_flags_c @@ -440,7 +439,6 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, haddr_t_f *h5_haddr_generic_flags) /******/ { - int ret_value = -1; /* * H5D flags */ @@ -676,14 +674,12 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid /* * H5R flags */ - h5r_flags[0] = (int_f)H5R_OBJECT; h5r_flags[1] = (int_f)H5R_DATASET_REGION; /* * H5S flags */ - h5s_hid_flags[0] = (hid_t_f)H5S_ALL; h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED; @@ -709,6 +705,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5s_flags[15] = (int_f)H5S_SEL_POINTS; h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS; h5s_flags[17] = (int_f)H5S_SEL_ALL; + /* * H5T flags */ @@ -747,6 +744,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5t_flags[32] = (int_f)H5T_ARRAY; h5t_flags[33] = (int_f)H5T_DIR_ASCEND; h5t_flags[34] = (int_f)H5T_DIR_DESCEND; + /* * H5Z flags */ @@ -792,8 +790,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */ - ret_value = 0; - return ret_value; + return 0; } int_f diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h index e8655e4e28b..3cc617f9d40 100644 --- a/fortran/src/H5f90.h +++ b/fortran/src/H5f90.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90_H -#define _H5f90_H +#ifndef H5f90_H +#define H5f90_H #include "hdf5.h" #include "H5private.h" @@ -27,4 +27,4 @@ #define H5_MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif /* _H5f90_H */ +#endif /* H5f90_H */ diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h index 37e563b4b87..dbb6a161082 100644 --- a/fortran/src/H5f90i.h +++ b/fortran/src/H5f90i.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90i_H -#define _H5f90i_H +#ifndef H5f90i_H +#define H5f90i_H /* * Include generated header. This header defines integer types, @@ -36,4 +36,4 @@ typedef char *_fcd; #endif -#endif /* _H5f90i_H */ +#endif /* H5f90i_H */ diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index ccd32b3ee9f..1480ca8ca4b 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5f90proto_H -#define _H5f90proto_H +#ifndef H5f90proto_H +#define H5f90proto_H #include "H5public.h" #include "H5f90.h" @@ -637,4 +637,4 @@ H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namele int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data, hid_t_f *lapl_id); -#endif /* _H5f90proto_H */ +#endif /* H5f90proto_H */ diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index 735901f9a2f..825caf79bd6 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -163,7 +163,7 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable { /* Destructor * Cleans up the packet table */ - virtual ~FL_PacketTable(){}; + virtual ~FL_PacketTable() {} /* AppendPacket * Adds a single packet to the packet table. Takes a pointer diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h index 0527a39d7fb..7473c001771 100644 --- a/hl/fortran/src/H5IMcc.h +++ b/hl/fortran/src/H5IMcc.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMCC_H -#define _H5IMCC_H +#ifndef H5IMCC_H +#define H5IMCC_H #include "H5LTprivate.h" #include "H5IMprivate.h" diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index a912d0b50cc..8847c01948f 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTf90proto_H -#define _H5LTf90proto_H +#ifndef H5LTf90proto_H +#define H5LTf90proto_H #include "H5public.h" #include "H5f90i.h" @@ -206,4 +206,4 @@ int_f h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_ size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size, size_t_f *namelen2, size_t_f *lenmax, _fcd field_names, size_t_f *maxlen_out); -#endif /* _H5LTf90proto_H */ +#endif /* H5LTf90proto_H */ diff --git a/hl/src/H5DOpublic.h b/hl/src/H5DOpublic.h index 50d58f50023..88616a3738e 100644 --- a/hl/src/H5DOpublic.h +++ b/hl/src/H5DOpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DOpublic_H -#define _H5DOpublic_H +#ifndef H5DOpublic_H +#define H5DOpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5DSprivate.h b/hl/src/H5DSprivate.h index 42dd6bf92ae..0403a4cbe30 100644 --- a/hl/src/H5DSprivate.h +++ b/hl/src/H5DSprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DSprivate_H -#define _H5DSprivate_H +#ifndef H5DSprivate_H +#define H5DSprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5DSpublic.h b/hl/src/H5DSpublic.h index ca7ad3b51c4..7306cbc85ea 100644 --- a/hl/src/H5DSpublic.h +++ b/hl/src/H5DSpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5DSpublic_H -#define _H5DSpublic_H +#ifndef H5DSpublic_H +#define H5DSpublic_H #define DIMENSION_SCALE_CLASS "DIMENSION_SCALE" #define DIMENSION_LIST "DIMENSION_LIST" diff --git a/hl/src/H5HLprivate2.h b/hl/src/H5HLprivate2.h index 1202f00b631..c696b773260 100644 --- a/hl/src/H5HLprivate2.h +++ b/hl/src/H5HLprivate2.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5HLprivate2_H -#define _H5HLprivate2_H +#ifndef H5HLprivate2_H +#define H5HLprivate2_H /* Public HDF5 header */ #include "hdf5.h" @@ -23,4 +23,4 @@ /* HDF5 private functions */ #include "H5private.h" -#endif /* _H5HLprivate2_H */ +#endif /* H5HLprivate2_H */ diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c index 64cb5355282..310d665ed64 100644 --- a/hl/src/H5IM.c +++ b/hl/src/H5IM.c @@ -160,7 +160,8 @@ H5IMmake_image_24bit(hid_t loc_id, const char *dset_name, hsize_t width, hsize_t *------------------------------------------------------------------------- */ static herr_t -find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_palette(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + H5_ATTR_UNUSED void *op_data) { int ret = H5_ITER_CONT; @@ -168,11 +169,6 @@ find_palette(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_d if (name == NULL) return -1; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - op_data = op_data; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/src/H5IMprivate.h b/hl/src/H5IMprivate.h index 8803a4c86a1..3570ea3352e 100644 --- a/hl/src/H5IMprivate.h +++ b/hl/src/H5IMprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMprivate_H -#define _H5IMprivate_H +#ifndef H5IMprivate_H +#define H5IMprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5IMpublic.h b/hl/src/H5IMpublic.h index fae49021213..2843942e13d 100644 --- a/hl/src/H5IMpublic.h +++ b/hl/src/H5IMpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5IMpublic_H -#define _H5IMpublic_H +#ifndef H5IMpublic_H +#define H5IMpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5LDprivate.h b/hl/src/H5LDprivate.h index 2728f8beb38..862e5b7d98c 100644 --- a/hl/src/H5LDprivate.h +++ b/hl/src/H5LDprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LDprivate_H -#define _H5LDprivate_H +#ifndef H5LDprivate_H +#define H5LDprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" @@ -50,4 +50,4 @@ H5_HLDLL int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t pa } #endif -#endif /* end _H5LDprivate_H */ +#endif /* end H5LDprivate_H */ diff --git a/hl/src/H5LDpublic.h b/hl/src/H5LDpublic.h index a19f8d07260..011b208e4cb 100644 --- a/hl/src/H5LDpublic.h +++ b/hl/src/H5LDpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LDpublic_H -#define _H5LDpublic_H +#ifndef H5LDpublic_H +#define H5LDpublic_H #ifdef __cplusplus extern "C" { @@ -27,4 +27,4 @@ H5_HLDLL herr_t H5LDget_dset_elmts(hid_t did, const hsize_t *prev_dims, const hs } #endif -#endif /* _H5LDpublic_H */ +#endif /* H5LDpublic_H */ diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 56c9af180e3..e4d04300be5 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1297,7 +1297,8 @@ H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_cla */ static herr_t -find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_data) +find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5L_info2_t *linfo, + void *op_data) { /* Define a default zero value for return. This will cause the iterator to continue if * the dataset is not found yet. @@ -1308,10 +1309,6 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d if (name == NULL) return ret; - /* Shut the compiler up */ - loc_id = loc_id; - linfo = linfo; - /* Define a positive value for return value if the dataset was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success @@ -1841,7 +1838,8 @@ H5LTset_attribute_double(hid_t loc_id, const char *obj_name, const char *attr_na *------------------------------------------------------------------------- */ static herr_t -find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data) +find_attr(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5A_info_t *ainfo, + void *op_data) { int ret = H5_ITER_CONT; @@ -1849,10 +1847,6 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *op_data if (name == NULL) return H5_ITER_CONT; - /* Shut compiler up */ - loc_id = loc_id; - ainfo = ainfo; - /* Define a positive value for return value if the attribute was found. This will * cause the iterator to immediately return that positive value, * indicating short-circuit success diff --git a/hl/src/H5LTprivate.h b/hl/src/H5LTprivate.h index ddcbbbfcda4..5a97d9c22f6 100644 --- a/hl/src/H5LTprivate.h +++ b/hl/src/H5LTprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTprivate_H -#define _H5LTprivate_H +#ifndef H5LTprivate_H +#define H5LTprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h index 417fce84d38..2af9b07a0ff 100644 --- a/hl/src/H5LTpublic.h +++ b/hl/src/H5LTpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5LTpublic_H -#define _H5LTpublic_H +#ifndef H5LTpublic_H +#define H5LTpublic_H /* Flag definitions for H5LTopen_file_image() */ #define H5LT_FILE_IMAGE_OPEN_RW 0x0001 /* Open image for read-write */ diff --git a/hl/src/H5PTprivate.h b/hl/src/H5PTprivate.h index 7277dd285b9..9ca7676852a 100644 --- a/hl/src/H5PTprivate.h +++ b/hl/src/H5PTprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5PTprivate_H -#define _H5PTprivate_H +#ifndef H5PTprivate_H +#define H5PTprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5PTpublic.h b/hl/src/H5PTpublic.h index ec744f88270..d74baa513ed 100644 --- a/hl/src/H5PTpublic.h +++ b/hl/src/H5PTpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5PTpublic_H -#define _H5PTpublic_H +#ifndef H5PTpublic_H +#define H5PTpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/src/H5TBprivate.h b/hl/src/H5TBprivate.h index abe43c43f87..95b58e6e8ee 100644 --- a/hl/src/H5TBprivate.h +++ b/hl/src/H5TBprivate.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5TBprivate_H -#define _H5TBprivate_H +#ifndef H5TBprivate_H +#define H5TBprivate_H /* High-level library internal header file */ #include "H5HLprivate2.h" diff --git a/hl/src/H5TBpublic.h b/hl/src/H5TBpublic.h index 1324fbd017e..1750490791f 100644 --- a/hl/src/H5TBpublic.h +++ b/hl/src/H5TBpublic.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _H5TBpublic_H -#define _H5TBpublic_H +#ifndef H5TBpublic_H +#define H5TBpublic_H #ifdef __cplusplus extern "C" { diff --git a/hl/test/h5hltest.h b/hl/test/h5hltest.h index 7d9c5d1cf2d..14f3e141f25 100644 --- a/hl/test/h5hltest.h +++ b/hl/test/h5hltest.h @@ -18,8 +18,8 @@ * Purpose: Test support stuff. */ -#ifndef _H5HLTEST_H -#define _H5HLTEST_H +#ifndef H5HLTEST_H +#define H5HLTEST_H /* Get the HDF5 test header */ #include "h5test.h" @@ -48,4 +48,4 @@ int test_packet_table_with_varlen(void); -#endif /* _H5HLTEST_H */ +#endif /* H5HLTEST_H */ diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c index 333c80804a7..8068829fed7 100644 --- a/hl/tools/gif2h5/hdfgifwr.c +++ b/hl/tools/gif2h5/hdfgifwr.c @@ -152,12 +152,12 @@ hdfWriteGIF(FILE *fp, byte *pic, int ptype, int w, int h, byte *rmap, byte *gmap } /* Shut compiler up... */ - ptype = ptype; - rmap = rmap; - gmap = gmap; - bmap = bmap; - numcols = numcols; - colorstyle = colorstyle; + (void)ptype; + (void)rmap; + (void)gmap; + (void)bmap; + (void)numcols; + (void)colorstyle; for (i = 0; i < 256; i++) { pc2nc[i] = pc2ncmap[i]; diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h index 87bababbde4..d1f969757f5 100644 --- a/src/H5ACmodule.h +++ b/src/H5ACmodule.h @@ -18,8 +18,8 @@ * H5AC package. Including this header means that the source file * is part of the H5AC package. */ -#ifndef _H5ACmodule_H -#define _H5ACmodule_H +#ifndef H5ACmodule_H +#define H5ACmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CACHE #define H5_MY_PKG_INIT YES -#endif /* _H5ACmodule_H */ +#endif /* H5ACmodule_H */ diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index ce4306f7600..7da46a05448 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -30,8 +30,8 @@ #error "Do not include this file outside the H5AC package!" #endif -#ifndef _H5ACpkg_H -#define _H5ACpkg_H +#ifndef H5ACpkg_H +#define H5ACpkg_H /* Get package's private header */ #include "H5ACprivate.h" /* Metadata cache */ @@ -423,4 +423,4 @@ H5_DLL herr_t H5AC__set_sync_point_done_callback(H5C_t *cache_ptr, H5_DLL herr_t H5AC__set_write_done_callback(H5C_t *cache_ptr, void (*write_done)(void)); #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5ACpkg_H */ +#endif /* H5ACpkg_H */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 81a192fb82d..4f4601fad1c 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -23,8 +23,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5ACprivate_H -#define _H5ACprivate_H +#ifndef H5ACprivate_H +#define H5ACprivate_H #include "H5ACpublic.h" /*public prototypes */ @@ -457,4 +457,4 @@ H5_DLL hbool_t H5AC_get_serialization_in_progress(H5F_t *f); H5_DLL hbool_t H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring); #endif /* NDEBUG */ /* end debugging functions */ -#endif /* !_H5ACprivate_H */ +#endif /* H5ACprivate_H */ diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index 51244b408c8..e6cebffe6ed 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5ACpublic_H -#define _H5ACpublic_H +#ifndef H5ACpublic_H +#define H5ACpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5Amodule.h b/src/H5Amodule.h index 383b5fdb9fc..eb3a1338d34 100644 --- a/src/H5Amodule.h +++ b/src/H5Amodule.h @@ -18,8 +18,8 @@ * H5A package. Including this header means that the source file * is part of the H5A package. */ -#ifndef _H5Amodule_H -#define _H5Amodule_H +#ifndef H5Amodule_H +#define H5Amodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_ATTR #define H5_MY_PKG_INIT YES -#endif /* _H5Amodule_H */ +#endif /* H5Amodule_H */ diff --git a/src/H5Apkg.h b/src/H5Apkg.h index dd999393fd1..a4935262979 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5A package!" #endif -#ifndef _H5Apkg_H -#define _H5Apkg_H +#ifndef H5Apkg_H +#define H5Apkg_H /* * Define this to enable debugging. @@ -267,4 +267,4 @@ H5_DLL htri_t H5A__is_shared_test(hid_t aid); H5_DLL herr_t H5A__get_shared_rc_test(hid_t attr_id, hsize_t *ref_count); #endif /* H5A_TESTING */ -#endif /* _H5Apkg_H */ +#endif /* H5Apkg_H */ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index a13e6622283..30f3582bc61 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5D module */ -#ifndef _H5Aprivate_H -#define _H5Aprivate_H +#ifndef H5Aprivate_H +#define H5Aprivate_H /* Include package's public header */ #include "H5Apublic.h" @@ -77,4 +77,4 @@ H5_DLL herr_t H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, H5_index H5_iter_order_t order, hsize_t skip, hsize_t *last_attr, const H5A_attr_iter_op_t *attr_op, void *op_data); -#endif /* _H5Aprivate_H */ +#endif /* H5Aprivate_H */ diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 4e2f0d17316..28a0e85d5a7 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5A module. */ -#ifndef _H5Apublic_H -#define _H5Apublic_H +#ifndef H5Apublic_H +#define H5Apublic_H /* Public headers needed by this file */ #include "H5Ipublic.h" /* IDs */ @@ -112,4 +112,4 @@ H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, } #endif -#endif /* _H5Apublic_H */ +#endif /* H5Apublic_H */ diff --git a/src/H5B2module.h b/src/H5B2module.h index 05fc8e1b3d2..aa0e163b857 100644 --- a/src/H5B2module.h +++ b/src/H5B2module.h @@ -18,8 +18,8 @@ * H5B2 package. Including this header means that the source file * is part of the H5B2 package. */ -#ifndef _H5B2module_H -#define _H5B2module_H +#ifndef H5B2module_H +#define H5B2module_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_BTREE #define H5_MY_PKG_INIT NO -#endif /* _H5B2module_H */ +#endif /* H5B2module_H */ diff --git a/src/H5B2pkg.h b/src/H5B2pkg.h index 9efac2f03d7..8d620cc890d 100644 --- a/src/H5B2pkg.h +++ b/src/H5B2pkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5B2 package!" #endif -#ifndef _H5B2pkg_H -#define _H5B2pkg_H +#ifndef H5B2pkg_H +#define H5B2pkg_H /* Get package's private header */ #include "H5B2private.h" @@ -453,4 +453,4 @@ H5_DLL int H5B2__get_node_depth_test(H5B2_t *bt2, void *udata); H5_DLL herr_t H5B2__get_node_info_test(H5B2_t *bt2, void *udata, H5B2_node_info_test_t *ninfo); #endif /* H5B2_TESTING */ -#endif /* _H5B2pkg_H */ +#endif /* H5B2pkg_H */ diff --git a/src/H5B2private.h b/src/H5B2private.h index ced3992a8f2..21ea8236fa2 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5B2private_H -#define _H5B2private_H +#ifndef H5B2private_H +#define H5B2private_H /* Private headers needed by this file */ #include "H5ACprivate.h" /* Metadata cache */ @@ -149,4 +149,4 @@ H5_DLL herr_t H5B2_patch_file(H5B2_t *fa, H5F_t *f); /* Statistics routines */ H5_DLL herr_t H5B2_stat_info(H5B2_t *bt2, H5B2_stat_t *info); -#endif /* _H5B2private_H */ +#endif /* H5B2private_H */ diff --git a/src/H5Bmodule.h b/src/H5Bmodule.h index 9a1bc13ba7c..cfd3d534c36 100644 --- a/src/H5Bmodule.h +++ b/src/H5Bmodule.h @@ -18,8 +18,8 @@ * H5B package. Including this header means that the source file * is part of the H5B package. */ -#ifndef _H5Bmodule_H -#define _H5Bmodule_H +#ifndef H5Bmodule_H +#define H5Bmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_BTREE #define H5_MY_PKG_INIT NO -#endif /* _H5Bmodule_H */ +#endif /* H5Bmodule_H */ diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index a226f6bec76..0a796283da3 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -12,25 +12,25 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Thursday, May 15, 2003 + * Programmer: Quincey Koziol + * Thursday, May 15, 2003 * - * Purpose: This file contains declarations which are visible only within - * the H5B package. Source files outside the H5B package should - * include H5Bprivate.h instead. + * Purpose: This file contains declarations which are visible only within + * the H5B package. Source files outside the H5B package should + * include H5Bprivate.h instead. */ #if !(defined H5B_FRIEND || defined H5B_MODULE) #error "Do not include this file outside the H5B package!" #endif -#ifndef _H5Bpkg_H -#define _H5Bpkg_H +#ifndef H5Bpkg_H +#define H5Bpkg_H /* Get package's private header */ #include "H5Bprivate.h" /* Other private headers needed by this file */ -#include "H5ACprivate.h" /* Metadata cache */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5FLprivate.h" /* Free Lists */ /**************************/ @@ -49,20 +49,20 @@ typedef struct H5B_t { H5AC_info_t cache_info; /* Information for H5AC cache functions */ /* _must_ be first field in structure */ - H5UC_t * rc_shared; /*ref-counted shared info */ - unsigned level; /*node level */ - unsigned nchildren; /*number of child pointers */ - haddr_t left; /*address of left sibling */ - haddr_t right; /*address of right sibling */ + H5UC_t * rc_shared; /*ref-counted shared info */ + unsigned level; /*node level */ + unsigned nchildren; /*number of child pointers */ + haddr_t left; /*address of left sibling */ + haddr_t right; /*address of right sibling */ uint8_t *native; /*array of keys in native format */ - haddr_t *child; /*2k child pointers */ + haddr_t *child; /*2k child pointers */ } H5B_t; /* Callback info for loading a B-tree node into the cache */ typedef struct H5B_cache_ud_t { H5F_t * f; /* File that B-tree node is within */ - const struct H5B_class_t *type; /* Type of tree */ - H5UC_t * rc_shared; /* Ref-counted shared info */ + const struct H5B_class_t *type; /* Type of tree */ + H5UC_t * rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; /*****************************/ @@ -86,4 +86,4 @@ H5_DLL herr_t H5B__node_dest(H5B_t *bt); herr_t H5B__assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata); #endif -#endif /*_H5Bpkg_H*/ +#endif /*H5Bpkg_H*/ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 1fb25ef7dc2..265b6c67f5b 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5Bprivate_H -#define _H5Bprivate_H +#ifndef H5Bprivate_H +#define H5Bprivate_H /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ @@ -157,4 +157,4 @@ H5_DLL herr_t H5B_shared_free(void *_shared); H5_DLL herr_t H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5B_class_t *type, void *udata); H5_DLL htri_t H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr); -#endif /* _H5Bprivate_H */ +#endif /* H5Bprivate_H */ diff --git a/src/H5CSprivate.h b/src/H5CSprivate.h index 5fe2a569abb..a238ec7ad1f 100644 --- a/src/H5CSprivate.h +++ b/src/H5CSprivate.h @@ -14,8 +14,8 @@ /* * Header file for function stacks, etc. */ -#ifndef _H5CSprivate_H -#define _H5CSprivate_H +#ifndef H5CSprivate_H +#define H5CSprivate_H #ifdef NOT_YET #include "H5CSpublic.h" @@ -32,4 +32,4 @@ H5_DLL herr_t H5CS_print_stack(const struct H5CS_t *stack, FILE *stream) H5_DLL struct H5CS_t *H5CS_copy_stack(void); H5_DLL herr_t H5CS_close_stack(struct H5CS_t *stack); -#endif /* _H5CSprivate_H */ +#endif /* H5CSprivate_H */ diff --git a/src/H5CXmodule.h b/src/H5CXmodule.h index 7d51b46f8a4..9fbaab42bd5 100644 --- a/src/H5CXmodule.h +++ b/src/H5CXmodule.h @@ -18,8 +18,8 @@ * H5CX package. Including this header means that the source file * is part of the H5CX package. */ -#ifndef _H5CXmodule_H -#define _H5CXmodule_H +#ifndef H5CXmodule_H +#define H5CXmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CONTEXT #define H5_MY_PKG_INIT YES -#endif /* _H5CXmodule_H */ +#endif /* H5CXmodule_H */ diff --git a/src/H5CXprivate.h b/src/H5CXprivate.h index f633a91f1db..1766b5fb47c 100644 --- a/src/H5CXprivate.h +++ b/src/H5CXprivate.h @@ -13,8 +13,8 @@ /* * Header file for API contexts, etc. */ -#ifndef _H5CXprivate_H -#define _H5CXprivate_H +#ifndef H5CXprivate_H +#define H5CXprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -46,10 +46,10 @@ /***************************************/ /* Library private routines */ -#ifndef _H5private_H +#ifndef H5private_H H5_DLL herr_t H5CX_push(void); H5_DLL herr_t H5CX_pop(void); -#endif /* _H5private_H */ +#endif /* H5private_H */ H5_DLL void H5CX_push_special(void); H5_DLL hbool_t H5CX_is_def_dxpl(void); @@ -153,4 +153,4 @@ H5_DLL herr_t H5CX_test_set_mpio_coll_rank0_bcast(hbool_t rank0_bcast); #endif /* H5_HAVE_INSTRUMENTED_LIBRARY */ #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5CXprivate_H */ +#endif /* H5CXprivate_H */ diff --git a/src/H5Clog.h b/src/H5Clog.h index 1703b53f946..bd5c413bbd8 100644 --- a/src/H5Clog.h +++ b/src/H5Clog.h @@ -15,8 +15,8 @@ * Purpose: Cache logging header file */ -#ifndef _H5Clog_H -#define _H5Clog_H +#ifndef H5Clog_H +#define H5Clog_H /* Get package's private header */ #include "H5Cprivate.h" /* Cache */ @@ -136,4 +136,4 @@ H5_DLL herr_t H5C_log_write_remove_entry_msg(H5C_t *cache, const H5C_cache_entry H5_DLL herr_t H5C_log_json_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi_rank); H5_DLL herr_t H5C_log_trace_set_up(H5C_log_info_t *log_info, const char log_location[], int mpi_rank); -#endif /* _H5Clog_H */ +#endif /* H5Clog_H */ diff --git a/src/H5Cmodule.h b/src/H5Cmodule.h index b1951ff6bf0..26216ec1316 100644 --- a/src/H5Cmodule.h +++ b/src/H5Cmodule.h @@ -18,8 +18,8 @@ * H5C package. Including this header means that the source file * is part of the H5C package. */ -#ifndef _H5Cmodule_H -#define _H5Cmodule_H +#ifndef H5Cmodule_H +#define H5Cmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CACHE #define H5_MY_PKG_INIT NO -#endif /* _H5Cmodule_H */ +#endif /* H5Cmodule_H */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 006bc6106bb..98ae523b48f 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -33,8 +33,8 @@ #error "Do not include this file outside the H5C package!" #endif -#ifndef _H5Cpkg_H -#define _H5Cpkg_H +#ifndef H5Cpkg_H +#define H5Cpkg_H /* Get package's private header */ #include "H5Cprivate.h" @@ -5092,5 +5092,5 @@ H5_DLL herr_t H5C__untag_entry(H5C_t *cache, H5C_cache_entry_t *entry); H5_DLL herr_t H5C__verify_cork_tag_test(hid_t fid, haddr_t tag, hbool_t status); #endif /* H5C_TESTING */ -#endif /* _H5Cpkg_H */ +#endif /* H5Cpkg_H */ /* clang-format on */ diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index b2f2ac2cc1f..6863763ce6d 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -13,24 +13,24 @@ /*------------------------------------------------------------------------- * - * Created: H5Cprivate.h + * Created: H5Cprivate.h * 6/3/04 * John Mainzer * - * Purpose: Constants and typedefs available to the rest of the - * library. + * Purpose: Constants and typedefs available to the rest of the + * library. * *------------------------------------------------------------------------- */ -#ifndef _H5Cprivate_H -#define _H5Cprivate_H +#ifndef H5Cprivate_H +#define H5Cprivate_H -#include "H5Cpublic.h" /* public prototypes */ +#include "H5Cpublic.h" /* public prototypes */ /* Private headers needed by this header */ #include "H5private.h" /* Generic Functions */ -#include "H5Fprivate.h" /* File access */ +#include "H5Fprivate.h" /* File access */ /**************************/ /* Library Private Macros */ @@ -2321,4 +2321,4 @@ H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_c H5_DLL herr_t H5C_validate_index_list(H5C_t *cache_ptr); #endif /* NDEBUG */ -#endif /* !_H5Cprivate_H */ +#endif /* H5Cprivate_H */ diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h index 56bfdb20709..0e6fb846460 100644 --- a/src/H5Cpublic.h +++ b/src/H5Cpublic.h @@ -19,12 +19,10 @@ * * Purpose: Public include file for cache functions. * - * Modifications: - * *------------------------------------------------------------------------- */ -#ifndef _H5Cpublic_H -#define _H5Cpublic_H +#ifndef H5Cpublic_H +#define H5Cpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5Dmodule.h b/src/H5Dmodule.h index 44044d880cc..1f4d7c11757 100644 --- a/src/H5Dmodule.h +++ b/src/H5Dmodule.h @@ -18,8 +18,8 @@ * H5D package. Including this header means that the source file * is part of the H5D package. */ -#ifndef _H5Dmodule_H -#define _H5Dmodule_H +#ifndef H5Dmodule_H +#define H5Dmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_DATASET #define H5_MY_PKG_INIT YES -#endif /* _H5Dmodule_H */ +#endif /* H5Dmodule_H */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index f7c81271457..e5252c606ea 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5D package!" #endif -#ifndef _H5Dpkg_H -#define _H5Dpkg_H +#ifndef H5Dpkg_H +#define H5Dpkg_H /* Get package's private header */ #include "H5Dprivate.h" @@ -745,4 +745,4 @@ H5_DLL herr_t H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type); H5_DLL herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused); #endif /* H5D_TESTING */ -#endif /*_H5Dpkg_H*/ +#endif /*H5Dpkg_H*/ diff --git a/src/H5Dprivate.h b/src/H5Dprivate.h index 1e6cc761d69..4ca35b4fde1 100644 --- a/src/H5Dprivate.h +++ b/src/H5Dprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5D module */ -#ifndef _H5Dprivate_H -#define _H5Dprivate_H +#ifndef H5Dprivate_H +#define H5Dprivate_H /* Include package's public header */ #include "H5Dpublic.h" @@ -190,4 +190,4 @@ H5_DLL herr_t H5D_virtual_free_parsed_name(H5O_storage_virtual_name_seg_t *name_ H5_DLL herr_t H5D_btree_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, unsigned ndims, const uint32_t *dim); -#endif /* _H5Dprivate_H */ +#endif /* H5Dprivate_H */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index ec979e173f0..a7e231bbc8e 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5D module. */ -#ifndef _H5Dpublic_H -#define _H5Dpublic_H +#ifndef H5Dpublic_H +#define H5Dpublic_H /* System headers needed by this file */ @@ -204,4 +204,4 @@ H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]); #ifdef __cplusplus } #endif -#endif /* _H5Dpublic_H */ +#endif /* H5Dpublic_H */ diff --git a/src/H5EAmodule.h b/src/H5EAmodule.h index 90670286bf2..1833e406013 100644 --- a/src/H5EAmodule.h +++ b/src/H5EAmodule.h @@ -18,8 +18,8 @@ * H5EA package. Including this header means that the source file * is part of the H5EA package. */ -#ifndef _H5EAmodule_H -#define _H5EAmodule_H +#ifndef H5EAmodule_H +#define H5EAmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_EARRAY #define H5_MY_PKG_INIT NO -#endif /* _H5EAmodule_H */ +#endif /* H5EAmodule_H */ diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 4a3966a7ab5..bfa85885dc5 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5EA package!" #endif -#ifndef _H5EApkg_H -#define _H5EApkg_H +#ifndef H5EApkg_H +#define H5EApkg_H /* Get package's private header */ #include "H5EAprivate.h" @@ -461,4 +461,4 @@ H5_DLL herr_t H5EA__get_cparam_test(const H5EA_t *ea, H5EA_create_t *cparam); H5_DLL int H5EA__cmp_cparam_test(const H5EA_create_t *cparam1, const H5EA_create_t *cparam2); #endif /* H5EA_TESTING */ -#endif /* _H5EApkg_H */ +#endif /* H5EApkg_H */ diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h index 3b1d7b8ea31..19dabd9ecfd 100644 --- a/src/H5EAprivate.h +++ b/src/H5EAprivate.h @@ -23,8 +23,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5EAprivate_H -#define _H5EAprivate_H +#ifndef H5EAprivate_H +#define H5EAprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -155,4 +155,4 @@ H5_DLL herr_t H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats); #ifdef H5EA_DEBUGGING #endif /* H5EA_DEBUGGING */ -#endif /* _H5EAprivate_H */ +#endif /* H5EAprivate_H */ diff --git a/src/H5Emodule.h b/src/H5Emodule.h index fe5fdcc5ada..1670c03af68 100644 --- a/src/H5Emodule.h +++ b/src/H5Emodule.h @@ -18,8 +18,8 @@ * H5E package. Including this header means that the source file * is part of the H5E package. */ -#ifndef _H5Emodule_H -#define _H5Emodule_H +#ifndef H5Emodule_H +#define H5Emodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_ERROR #define H5_MY_PKG_INIT YES -#endif /* _H5Emodule_H */ +#endif /* H5Emodule_H */ diff --git a/src/H5Epkg.h b/src/H5Epkg.h index 19cdda0bd3e..30ff084eaeb 100644 --- a/src/H5Epkg.h +++ b/src/H5Epkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5E package!" #endif -#ifndef _H5Epkg_H -#define _H5Epkg_H +#ifndef H5Epkg_H +#define H5Epkg_H /* Get package's private header */ #include "H5Eprivate.h" @@ -140,4 +140,4 @@ H5_DLL herr_t H5E__get_auto(const H5E_t *estack, H5E_auto_op_t *op, void **clie H5_DLL herr_t H5E__set_auto(H5E_t *estack, const H5E_auto_op_t *op, void *client_data); H5_DLL herr_t H5E__pop(H5E_t *err_stack, size_t count); -#endif /* _H5Epkg_H */ +#endif /* H5Epkg_H */ diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h index 14a73bab31f..58010a34fb4 100644 --- a/src/H5Eprivate.h +++ b/src/H5Eprivate.h @@ -14,8 +14,8 @@ /* * Header file for error values, etc. */ -#ifndef _H5Eprivate_H -#define _H5Eprivate_H +#ifndef H5Eprivate_H +#define H5Eprivate_H #include "H5Epublic.h" @@ -114,12 +114,18 @@ typedef struct H5E_t H5E_t; #define HSYS_DONE_ERROR(majorcode, minorcode, retcode, str) \ { \ int myerrno = errno; \ + /* Other projects may rely on the description format to get the errno and any changes should be \ + * considered as an API change \ + */ \ HDONE_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \ HDstrerror(myerrno)); \ } #define HSYS_GOTO_ERROR(majorcode, minorcode, retcode, str) \ { \ int myerrno = errno; \ + /* Other projects may rely on the description format to get the errno and any changes should be \ + * considered as an API change \ + */ \ HGOTO_ERROR(majorcode, minorcode, retcode, "%s, errno = %d, error message = '%s'", str, myerrno, \ HDstrerror(myerrno)); \ } @@ -203,4 +209,4 @@ H5_DLL herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func H5_DLL herr_t H5E_clear_stack(H5E_t *estack); H5_DLL herr_t H5E_dump_api_stack(hbool_t is_api); -#endif /* _H5Eprivate_H */ +#endif /* H5Eprivate_H */ diff --git a/src/H5Epublic.h b/src/H5Epublic.h index 403bee7d1fa..cb7d7006ddb 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5E module. */ -#ifndef _H5Epublic_H -#define _H5Epublic_H +#ifndef H5Epublic_H +#define H5Epublic_H #include /*FILE arg of H5Eprint() */ @@ -218,4 +218,4 @@ H5_DLL char * H5Eget_minor(H5E_minor_t min); } #endif -#endif /* end _H5Epublic_H */ +#endif /* end H5Epublic_H */ diff --git a/src/H5FAmodule.h b/src/H5FAmodule.h index fce8265258f..ef814aeb19c 100644 --- a/src/H5FAmodule.h +++ b/src/H5FAmodule.h @@ -18,8 +18,8 @@ * H5FA package. Including this header means that the source file * is part of the H5FA package. */ -#ifndef _H5FAmodule_H -#define _H5FAmodule_H +#ifndef H5FAmodule_H +#define H5FAmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_FARRAY #define H5_MY_PKG_INIT NO -#endif /* _H5FAmodule_H */ +#endif /* H5FAmodule_H */ diff --git a/src/H5FApkg.h b/src/H5FApkg.h index e66be59e292..c4bf93485fb 100644 --- a/src/H5FApkg.h +++ b/src/H5FApkg.h @@ -22,8 +22,8 @@ #error "Do not include this file outside the H5FA package!" #endif -#ifndef _H5FApkg_H -#define _H5FApkg_H +#ifndef H5FApkg_H +#define H5FApkg_H /* Get package's private header */ #include "H5FAprivate.h" @@ -299,4 +299,4 @@ H5_DLL herr_t H5FA__get_cparam_test(const H5FA_t *ea, H5FA_create_t *cparam); H5_DLL int H5FA__cmp_cparam_test(const H5FA_create_t *cparam1, const H5FA_create_t *cparam2); #endif /* H5FA_TESTING */ -#endif /* _H5FApkg_H */ +#endif /* H5FApkg_H */ diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index f94527390b7..26057bf4e15 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -21,8 +21,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5FAprivate_H -#define _H5FAprivate_H +#ifndef H5FAprivate_H +#define H5FAprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -137,4 +137,4 @@ H5_DLL herr_t H5FA_get_stats(const H5FA_t *ea, H5FA_stat_t *stats); #ifdef H5FA_DEBUGGING #endif /* H5FA_DEBUGGING */ -#endif /* _H5FAprivate_H */ +#endif /* H5FAprivate_H */ diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h index 17e9cf85160..eec10dea3c0 100644 --- a/src/H5FDdirect.h +++ b/src/H5FDdirect.h @@ -23,7 +23,7 @@ #ifdef H5_HAVE_DIRECT #define H5FD_DIRECT (H5FD_direct_init()) #else -#define H5FD_DIRECT (-1) +#define H5FD_DIRECT (H5I_INVALID_HID) #endif /* H5_HAVE_DIRECT */ #ifdef H5_HAVE_DIRECT diff --git a/src/H5FDdrvr_module.h b/src/H5FDdrvr_module.h index cf7d7654104..1d20fce6609 100644 --- a/src/H5FDdrvr_module.h +++ b/src/H5FDdrvr_module.h @@ -18,8 +18,8 @@ * H5FD driver package. Including this header means that the source file * is part of the H5FD driver package. */ -#ifndef _H5FDdrvr_module_H -#define _H5FDdrvr_module_H +#ifndef H5FDdrvr_module_H +#define H5FDdrvr_module_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_INIT YES #define H5_PKG_SINGLE_SOURCE -#endif /* _H5FDdrvr_module_H */ +#endif /* H5FDdrvr_module_H */ diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h index 5fbc54b9411..9e46954103b 100644 --- a/src/H5FDhdfs.h +++ b/src/H5FDhdfs.h @@ -25,7 +25,7 @@ #ifdef H5_HAVE_LIBHDFS #define H5FD_HDFS (H5FD_hdfs_init()) #else /* H5_HAVE_LIBHDFS */ -#define H5FD_HDFS (-1) +#define H5FD_HDFS (H5I_INVALID_HID) #endif /* H5_HAVE_LIBHDFS */ /**************************************************************************** diff --git a/src/H5FDmodule.h b/src/H5FDmodule.h index f603f8221c9..0b92b27da01 100644 --- a/src/H5FDmodule.h +++ b/src/H5FDmodule.h @@ -18,8 +18,8 @@ * H5FD package. Including this header means that the source file * is part of the H5FD package. */ -#ifndef _H5FDmodule_H -#define _H5FDmodule_H +#ifndef H5FDmodule_H +#define H5FDmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_VFL #define H5_MY_PKG_INIT YES -#endif /* _H5FDmodule_H */ +#endif /* H5FDmodule_H */ diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h index b32b80b6d15..79b52c7a7b2 100644 --- a/src/H5FDmpio.h +++ b/src/H5FDmpio.h @@ -25,7 +25,7 @@ #ifdef H5_HAVE_PARALLEL #define H5FD_MPIO (H5FD_mpio_init()) #else -#define H5FD_MPIO (-1) +#define H5FD_MPIO (H5I_INVALID_HID) #endif /* H5_HAVE_PARALLEL */ #ifdef H5_HAVE_PARALLEL diff --git a/src/H5FDpkg.h b/src/H5FDpkg.h index d9f2946bf0c..acbaf88777b 100644 --- a/src/H5FDpkg.h +++ b/src/H5FDpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5FD package!" #endif -#ifndef _H5FDpkg_H -#define _H5FDpkg_H +#ifndef H5FDpkg_H +#define H5FDpkg_H /* Get package's private header */ #include "H5FDprivate.h" /* File drivers */ @@ -55,4 +55,4 @@ H5_DLL herr_t H5FD__free_real(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsiz H5_DLL hbool_t H5FD__supports_swmr_test(const char *vfd_name); #endif /* H5FD_TESTING */ -#endif /* _H5FDpkg_H */ +#endif /* H5FDpkg_H */ diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index df9bd31c7f9..bba78a1b771 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Monday, July 26, 1999 */ -#ifndef _H5FDprivate_H -#define _H5FDprivate_H +#ifndef H5FDprivate_H +#define H5FDprivate_H /* Include package's public header */ #include "H5FDpublic.h" @@ -169,4 +169,4 @@ H5_DLL int H5FD_mpi_get_size(const H5FD_t *file); H5_DLL MPI_Comm H5FD_mpi_get_comm(const H5FD_t *_file); #endif /* H5_HAVE_PARALLEL */ -#endif /* !_H5FDprivate_H */ +#endif /* H5FDprivate_H */ diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index caefd8084dc..edcea527dee 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Monday, July 26, 1999 */ -#ifndef _H5FDpublic_H -#define _H5FDpublic_H +#ifndef H5FDpublic_H +#define H5FDpublic_H #include "H5public.h" #include "H5Fpublic.h" /*for H5F_close_degree_t */ diff --git a/src/H5FLmodule.h b/src/H5FLmodule.h index dc7f4cc1623..95c0b49aade 100644 --- a/src/H5FLmodule.h +++ b/src/H5FLmodule.h @@ -18,8 +18,8 @@ * H5FL package. Including this header means that the source file * is part of the H5FL package. */ -#ifndef _H5FLmodule_H -#define _H5FLmodule_H +#ifndef H5FLmodule_H +#define H5FLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5FLmodule_H */ +#endif /* H5FLmodule_H */ diff --git a/src/H5FLprivate.h b/src/H5FLprivate.h index 55613dd7a42..42581acb7cc 100644 --- a/src/H5FLprivate.h +++ b/src/H5FLprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5FLprivate_H -#define _H5FLprivate_H +#ifndef H5FLprivate_H +#define H5FLprivate_H /* Public headers needed by this file */ #ifdef LATER diff --git a/src/H5FOprivate.h b/src/H5FOprivate.h index b4b18aaf73d..7b512668169 100644 --- a/src/H5FOprivate.h +++ b/src/H5FOprivate.h @@ -14,8 +14,8 @@ /* * This file contains library private information about the H5FO module */ -#ifndef _H5FOprivate_H -#define _H5FOprivate_H +#ifndef H5FOprivate_H +#define H5FOprivate_H #ifdef LATER #include "H5FOpublic.h" @@ -47,4 +47,4 @@ H5_DLL herr_t H5FO_top_decr(const H5F_t *f, haddr_t addr); H5_DLL hsize_t H5FO_top_count(const H5F_t *f, haddr_t addr); H5_DLL herr_t H5FO_top_dest(H5F_t *f); -#endif /* _H5FOprivate_H */ +#endif /* H5FOprivate_H */ diff --git a/src/H5FSmodule.h b/src/H5FSmodule.h index 360eb7d31b1..a40c1034d16 100644 --- a/src/H5FSmodule.h +++ b/src/H5FSmodule.h @@ -18,8 +18,8 @@ * H5FS package. Including this header means that the source file * is part of the H5FS package. */ -#ifndef _H5FSmodule_H -#define _H5FSmodule_H +#ifndef H5FSmodule_H +#define H5FSmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_FSPACE #define H5_MY_PKG_INIT NO -#endif /* _H5FSmodule_H */ +#endif /* H5FSmodule_H */ diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index 46ebdaf2d4b..ba2cf03cdb1 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5FS package!" #endif -#ifndef _H5FSpkg_H -#define _H5FSpkg_H +#ifndef H5FSpkg_H +#define H5FSpkg_H /* Uncomment this macro to enable debugging output for free space manager */ /* #define H5FS_DEBUG */ @@ -240,4 +240,4 @@ H5_DLL herr_t H5FS__get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam); H5_DLL int H5FS__cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2); #endif /* H5FS_TESTING */ -#endif /* _H5FSpkg_H */ +#endif /* H5FSpkg_H */ diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index 05a466acd7d..fdc5c912bc9 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5FSprivate_H -#define _H5FSprivate_H +#ifndef H5FSprivate_H +#define H5FSprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -230,4 +230,4 @@ H5_DLL herr_t H5FS_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, H5_DLL herr_t H5FS_sect_debug(const H5FS_t *fspace, const H5FS_section_info_t *sect, FILE *stream, int indent, int fwidth); -#endif /* _H5FSprivate_H */ +#endif /* H5FSprivate_H */ diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h index 24477b44407..a4bd67c9666 100644 --- a/src/H5Fmodule.h +++ b/src/H5Fmodule.h @@ -18,8 +18,8 @@ * H5F package. Including this header means that the source file * is part of the H5F package. */ -#ifndef _H5Fmodule_H -#define _H5Fmodule_H +#ifndef H5Fmodule_H +#define H5Fmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_FILE #define H5_MY_PKG_INIT YES -#endif /* _H5Fmodule_H */ +#endif /* H5Fmodule_H */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index f5424ec96ad..63c22a1fbb9 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5F package!" #endif -#ifndef _H5Fpkg_H -#define _H5Fpkg_H +#ifndef H5Fpkg_H +#define H5Fpkg_H /* Get package's private header */ #include "H5Fprivate.h" @@ -476,4 +476,4 @@ H5_DLL herr_t H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr); H5_DLL herr_t H5F__reparse_file_lock_variable_test(void); #endif /* H5F_TESTING */ -#endif /* _H5Fpkg_H */ +#endif /* H5Fpkg_H */ diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index 728b736415e..6498cc3a577 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -15,8 +15,8 @@ * This file contains macros & information for file access */ -#ifndef _H5Fprivate_H -#define _H5Fprivate_H +#ifndef H5Fprivate_H +#define H5Fprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5F_t H5F_t; @@ -647,11 +647,11 @@ typedef struct H5F_t H5F_t; #define HDF5_BTREE_SNODE_IK_DEF 16 #define HDF5_BTREE_CHUNK_IK_DEF \ 32 /* Note! this value is assumed \ - to be 32 for version 0 \ - of the superblock and \ - if it is changed, the code \ - must compensate. -QAK \ - */ + to be 32 for version 0 \ + of the superblock and \ + if it is changed, the code \ + must compensate. -QAK \ + */ #define HDF5_BTREE_IK_MAX_ENTRIES 65536 /* 2^16 - 2 bytes for storing entries (children) */ /* See format specification on version 1 B-trees */ @@ -970,4 +970,4 @@ H5_DLL herr_t H5F_cwfs_remove_heap(H5F_shared_t *shared, struct H5HG_heap_t *hea /* Debugging functions */ H5_DLL herr_t H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth); -#endif /* _H5Fprivate_H */ +#endif /* H5Fprivate_H */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index fc86c6a8d57..73b6225f42c 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5F module. */ -#ifndef _H5Fpublic_H -#define _H5Fpublic_H +#ifndef H5Fpublic_H +#define H5Fpublic_H /* Public header files needed by this file */ #include "H5public.h" @@ -24,19 +24,19 @@ /* When this header is included from a private header, don't make calls to H5check() */ #undef H5CHECK -#ifndef _H5private_H +#ifndef H5private_H #define H5CHECK H5check(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5CHECK -#endif /* _H5private_H */ +#endif /* H5private_H */ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * These are the bits that can be passed to the `flags' argument of @@ -309,4 +309,4 @@ H5_DLL herr_t H5Fset_latest_format(hid_t file_id, hbool_t latest_format); #ifdef __cplusplus } #endif -#endif /* _H5Fpublic_H */ +#endif /* H5Fpublic_H */ diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h index a344379f96d..5a8791732ae 100644 --- a/src/H5Gmodule.h +++ b/src/H5Gmodule.h @@ -18,8 +18,8 @@ * H5G package. Including this header means that the source file * is part of the H5G package. */ -#ifndef _H5Gmodule_H -#define _H5Gmodule_H +#ifndef H5Gmodule_H +#define H5Gmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SYM #define H5_MY_PKG_INIT YES -#endif /* _H5Gmodule_H */ +#endif /* H5Gmodule_H */ diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index e6aee146576..484715eb682 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5G package!" #endif -#ifndef _H5Gpkg_H -#define _H5Gpkg_H +#ifndef H5Gpkg_H +#define H5Gpkg_H /* Get package's private header */ #include "H5Gprivate.h" @@ -486,4 +486,4 @@ H5_DLL herr_t H5G__verify_cached_stab_test(H5O_loc_t *grp_oloc, H5G_entry_t *ent H5_DLL herr_t H5G__verify_cached_stabs_test(hid_t gid); #endif /* H5G_TESTING */ -#endif /* _H5Gpkg_H */ +#endif /* H5Gpkg_H */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 3cb2466f4a3..1616e71a3a7 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5Gprivate_H -#define _H5Gprivate_H +#ifndef H5Gprivate_H +#define H5Gprivate_H /* Include package's public header */ #include "H5Gpublic.h" @@ -286,4 +286,4 @@ H5_DLL herr_t H5G_root_loc(H5F_t *f, H5G_loc_t *loc); H5_DLL herr_t H5G_root_free(H5G_t *grp); H5_DLL H5G_t *H5G_rootof(H5F_t *f); -#endif /* _H5Gprivate_H */ +#endif /* H5Gprivate_H */ diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index f94a791c794..99134f830a2 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Gpublic_H -#define _H5Gpublic_H +#ifndef H5Gpublic_H +#define H5Gpublic_H /* System headers needed by this file */ #include @@ -161,4 +161,4 @@ H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx); #ifdef __cplusplus } #endif -#endif /* _H5Gpublic_H */ +#endif /* H5Gpublic_H */ diff --git a/src/H5HFmodule.h b/src/H5HFmodule.h index 2b2c1c2a5cb..7fab61185f3 100644 --- a/src/H5HFmodule.h +++ b/src/H5HFmodule.h @@ -18,8 +18,8 @@ * H5HF package. Including this header means that the source file * is part of the H5HF package. */ -#ifndef _H5HFmodule_H -#define _H5HFmodule_H +#ifndef H5HFmodule_H +#define H5HFmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HFmodule_H */ +#endif /* H5HFmodule_H */ diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 31ccfe71a28..a18d10163e5 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HF package!" #endif -#ifndef _H5HFpkg_H -#define _H5HFpkg_H +#ifndef H5HFpkg_H +#define H5HFpkg_H /* Get package's private header */ #include "H5HFprivate.h" @@ -794,4 +794,4 @@ H5_DLL herr_t H5HF_get_tiny_info_test(const H5HF_t *fh, size_t *max_len, hbool H5_DLL herr_t H5HF_get_huge_info_test(const H5HF_t *fh, hsize_t *next_id, hbool_t *ids_direct); #endif /* H5HF_TESTING */ -#endif /* _H5HFpkg_H */ +#endif /* H5HFpkg_H */ diff --git a/src/H5HFprivate.h b/src/H5HFprivate.h index 791672ec6a7..ed7cdddafa5 100644 --- a/src/H5HFprivate.h +++ b/src/H5HFprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5HFprivate_H -#define _H5HFprivate_H +#ifndef H5HFprivate_H +#define H5HFprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -125,4 +125,4 @@ H5_DLL herr_t H5HF_id_print(H5HF_t *fh, const void *id, FILE *stream, int indent H5_DLL herr_t H5HF_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth); #endif /* H5HF_DEBUGGING */ -#endif /* _H5HFprivate_H */ +#endif /* H5HFprivate_H */ diff --git a/src/H5HGmodule.h b/src/H5HGmodule.h index 5184236ffb6..a75dea5a411 100644 --- a/src/H5HGmodule.h +++ b/src/H5HGmodule.h @@ -18,8 +18,8 @@ * H5HG package. Including this header means that the source file * is part of the H5HG package. */ -#ifndef _H5HGmodule_H -#define _H5HGmodule_H +#ifndef H5HGmodule_H +#define H5HGmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HGmodule_H */ +#endif /* H5HGmodule_H */ diff --git a/src/H5HGpkg.h b/src/H5HGpkg.h index 0ceb0d93a5b..5c0fbe8686b 100644 --- a/src/H5HGpkg.h +++ b/src/H5HGpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HG package!" #endif -#ifndef _H5HGpkg_H -#define _H5HGpkg_H +#ifndef H5HGpkg_H +#define H5HGpkg_H /* Get package's private header */ #include "H5HGprivate.h" @@ -136,4 +136,4 @@ struct H5HG_heap_t { H5_DLL herr_t H5HG__free(H5HG_heap_t *heap); H5_DLL H5HG_heap_t *H5HG__protect(H5F_t *f, haddr_t addr, unsigned flags); -#endif /* _H5HGpkg_H */ +#endif /* H5HGpkg_H */ diff --git a/src/H5HGprivate.h b/src/H5HGprivate.h index b1b4625ee5c..4db1ce31173 100644 --- a/src/H5HGprivate.h +++ b/src/H5HGprivate.h @@ -15,8 +15,8 @@ * Programmer: Robb Matzke * Friday, March 27, 1998 */ -#ifndef _H5HGprivate_H -#define _H5HGprivate_H +#ifndef H5HGprivate_H +#define H5HGprivate_H /* Private headers needed by this file. */ #include "H5Fprivate.h" /* File access */ @@ -66,4 +66,4 @@ H5_DLL size_t H5HG_get_free_size(const H5HG_heap_t *h); /* Debugging functions */ H5_DLL herr_t H5HG_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth); -#endif /* _H5HGprivate_H */ +#endif /* H5HGprivate_H */ diff --git a/src/H5HLmodule.h b/src/H5HLmodule.h index afc609a063c..3004809e3bb 100644 --- a/src/H5HLmodule.h +++ b/src/H5HLmodule.h @@ -18,8 +18,8 @@ * H5HL package. Including this header means that the source file * is part of the H5HL package. */ -#ifndef _H5HLmodule_H -#define _H5HLmodule_H +#ifndef H5HLmodule_H +#define H5HLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_HEAP #define H5_MY_PKG_INIT NO -#endif /* _H5HLmodule_H */ +#endif /* H5HLmodule_H */ diff --git a/src/H5HLpkg.h b/src/H5HLpkg.h index 42e8649144e..dbac1b9f3fd 100644 --- a/src/H5HLpkg.h +++ b/src/H5HLpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5HL package!" #endif -#ifndef _H5HLpkg_H -#define _H5HLpkg_H +#ifndef H5HLpkg_H +#define H5HLpkg_H /* Get package's private header */ #include "H5HLprivate.h" @@ -145,4 +145,4 @@ H5_DLL H5HL_dblk_t *H5HL__dblk_new(H5HL_t *heap); H5_DLL herr_t H5HL__dblk_dest(H5HL_dblk_t *dblk); H5_DLL herr_t H5HL__dblk_realloc(H5F_t *f, H5HL_t *heap, size_t new_heap_size); -#endif /* _H5HLpkg_H */ +#endif /* H5HLpkg_H */ diff --git a/src/H5HLprivate.h b/src/H5HLprivate.h index 74f3c49e309..739e7619272 100644 --- a/src/H5HLprivate.h +++ b/src/H5HLprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5HLprivate_H -#define _H5HLprivate_H +#ifndef H5HLprivate_H +#define H5HLprivate_H /* Private headers needed by this file. */ #include "H5private.h" /* Generic Functions */ diff --git a/src/H5HPprivate.h b/src/H5HPprivate.h index 3b68400cbdf..50020bc0d6d 100644 --- a/src/H5HPprivate.h +++ b/src/H5HPprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5HP module */ -#ifndef _H5HPprivate_H -#define _H5HPprivate_H +#ifndef H5HPprivate_H +#define H5HPprivate_H /**************************************/ /* Public headers needed by this file */ @@ -65,4 +65,4 @@ H5_DLL herr_t H5HP_incr(H5HP_t *heap, unsigned amt, void *obj); H5_DLL herr_t H5HP_decr(H5HP_t *heap, unsigned amt, void *obj); H5_DLL herr_t H5HP_close(H5HP_t *heap); -#endif /* _H5HPprivate_H */ +#endif /* H5HPprivate_H */ diff --git a/src/H5Imodule.h b/src/H5Imodule.h index b83d8a4dc7b..1ba8f11048c 100644 --- a/src/H5Imodule.h +++ b/src/H5Imodule.h @@ -11,22 +11,22 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Saturday, September 12, 2015 + * Programmer: Quincey Koziol + * Saturday, September 12, 2015 * - * Purpose: This file contains declarations which define macros for the - * H5I package. Including this header means that the source file - * is part of the H5I package. + * Purpose: This file contains declarations which define macros for the + * H5I package. Including this header means that the source file + * is part of the H5I package. */ -#ifndef _H5Imodule_H -#define _H5Imodule_H +#ifndef H5Imodule_H +#define H5Imodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error - * reporting macros. + * reporting macros. */ #define H5I_MODULE #define H5_MY_PKG H5I #define H5_MY_PKG_ERR H5E_ATOM #define H5_MY_PKG_INIT NO -#endif /* _H5Imodule_H */ +#endif /* H5Imodule_H */ diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h index 27fe271efcb..425308f773e 100644 --- a/src/H5Ipkg.h +++ b/src/H5Ipkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5I package!" #endif -#ifndef _H5Ipkg_H -#define _H5Ipkg_H +#ifndef H5Ipkg_H +#define H5Ipkg_H /* Get package's private header */ #include "H5Iprivate.h" @@ -69,4 +69,4 @@ H5_DLL ssize_t H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached); #endif /* H5I_TESTING */ -#endif /*_H5Ipkg_H*/ +#endif /*H5Ipkg_H*/ diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index c38014270bd..6e8bacd8eb9 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -17,8 +17,8 @@ *---------------------------------------------------------------------------*/ /* avoid re-inclusion */ -#ifndef _H5Iprivate_H -#define _H5Iprivate_H +#ifndef H5Iprivate_H +#define H5Iprivate_H /* Include package's public header */ #include "H5Ipublic.h" @@ -87,4 +87,4 @@ H5_DLL herr_t H5I_register_using_existing_id(H5I_type_t type, void *object, hboo /* Debugging functions */ H5_DLL herr_t H5I_dump_ids_for_type(H5I_type_t type); -#endif /* _H5Iprivate_H */ +#endif /* H5Iprivate_H */ diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index df30840319f..3b9f1f5155b 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -15,8 +15,8 @@ * This file contains function prototypes for each exported function in * the H5I module. */ -#ifndef _H5Ipublic_H -#define _H5Ipublic_H +#ifndef H5Ipublic_H +#define H5Ipublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -100,4 +100,4 @@ H5_DLL htri_t H5Iis_valid(hid_t id); #ifdef __cplusplus } #endif -#endif /* _H5Ipublic_H */ +#endif /* H5Ipublic_H */ diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h index 7dc746f8529..fad9c1f3f37 100644 --- a/src/H5Lmodule.h +++ b/src/H5Lmodule.h @@ -18,8 +18,8 @@ * H5L package. Including this header means that the source file * is part of the H5L package. */ -#ifndef _H5Lmodule_H -#define _H5Lmodule_H +#ifndef H5Lmodule_H +#define H5Lmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_LINK #define H5_MY_PKG_INIT YES -#endif /* _H5Lmodule_H */ +#endif /* H5Lmodule_H */ diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h index 1d915a09d16..c97bbf3216d 100644 --- a/src/H5Lpkg.h +++ b/src/H5Lpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5L package!" #endif -#ifndef _H5Lpkg_H -#define _H5Lpkg_H +#ifndef H5Lpkg_H +#define H5Lpkg_H /* Get package's private header */ #include "H5Lprivate.h" @@ -52,4 +52,4 @@ H5_DLL herr_t H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, c H5_DLL herr_t H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t *src_oloc, H5O_link_t *dst_lnk, H5O_copy_t *cpy_info); -#endif /* _H5Lpkg_H */ +#endif /* H5Lpkg_H */ diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index 14c53f041df..fe7ee686a01 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -15,8 +15,8 @@ * This file contains private information about the H5L module * for dealing with links in an HDF5 file. */ -#ifndef _H5Lprivate_H -#define _H5Lprivate_H +#ifndef H5Lprivate_H +#define H5Lprivate_H /* Include package's public header */ #include "H5Lpublic.h" @@ -131,4 +131,4 @@ H5_DLL herr_t H5L_register(const H5L_class_t *cls); H5_DLL herr_t H5L_unregister(H5L_type_t id); H5_DLL const H5L_class_t *H5L_find_class(H5L_type_t id); -#endif /* _H5Lprivate_H */ +#endif /* H5Lprivate_H */ diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 5bf529b7092..0cf198c78bc 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Lpublic_H -#define _H5Lpublic_H +#ifndef H5Lpublic_H +#define H5Lpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -206,4 +206,4 @@ H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name, hi #ifdef __cplusplus } #endif -#endif /* _H5Lpublic_H */ +#endif /* H5Lpublic_H */ diff --git a/src/H5MFmodule.h b/src/H5MFmodule.h index 9c4004275c9..9726cec6559 100644 --- a/src/H5MFmodule.h +++ b/src/H5MFmodule.h @@ -18,8 +18,8 @@ * H5MF package. Including this header means that the source file * is part of the H5MF package. */ -#ifndef _H5MFmodule_H -#define _H5MFmodule_H +#ifndef H5MFmodule_H +#define H5MFmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5MFmodule_H */ +#endif /* H5MFmodule_H */ diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h index 811d817cb3b..54ae1bcc893 100644 --- a/src/H5MFpkg.h +++ b/src/H5MFpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5MF package!" #endif -#ifndef _H5MFpkg_H -#define _H5MFpkg_H +#ifndef H5MFpkg_H +#define H5MFpkg_H /* Get package's private header */ #include "H5MFprivate.h" @@ -201,4 +201,4 @@ H5_DLL herr_t H5MF__aggr_query(const H5F_t *f, const H5F_blk_aggr_t *aggr, haddr #ifdef H5MF_TESTING #endif /* H5MF_TESTING */ -#endif /* _H5MFpkg_H */ +#endif /* H5MFpkg_H */ diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h index ddbcb4d13b2..5f2c670a250 100644 --- a/src/H5MFprivate.h +++ b/src/H5MFprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MFprivate_H -#define _H5MFprivate_H +#ifndef H5MFprivate_H +#define H5MFprivate_H /* Private headers needed by this file */ #include "H5Fprivate.h" /* File access */ @@ -82,4 +82,4 @@ H5_DLL herr_t H5MF_tidy_self_referential_fsm_hack(H5F_t *f); H5_DLL herr_t H5MF_sects_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth); #endif /* H5MF_DEBUGGING */ -#endif /* end _H5MFprivate_H */ +#endif /* end H5MFprivate_H */ diff --git a/src/H5MMprivate.h b/src/H5MMprivate.h index c10128505e3..bb846f408a8 100644 --- a/src/H5MMprivate.h +++ b/src/H5MMprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MMprivate_H -#define _H5MMprivate_H +#ifndef H5MMprivate_H +#define H5MMprivate_H #include "H5MMpublic.h" @@ -53,4 +53,4 @@ H5_DLL void H5MM_sanity_check_all(void); H5_DLL void H5MM_final_sanity_check(void); #endif /* H5_MEMORY_ALLOC_SANITY_CHECK */ -#endif /* _H5MMprivate_H */ +#endif /* H5MMprivate_H */ diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h index 9ddd377cfcf..ebfb3772111 100644 --- a/src/H5MMpublic.h +++ b/src/H5MMpublic.h @@ -22,8 +22,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5MMpublic_H -#define _H5MMpublic_H +#ifndef H5MMpublic_H +#define H5MMpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -39,4 +39,4 @@ extern "C" { #ifdef __cplusplus } #endif -#endif /* _H5MMpublic_H */ +#endif /* H5MMpublic_H */ diff --git a/src/H5MPmodule.h b/src/H5MPmodule.h index 7f9d7b42197..8e34598a20d 100644 --- a/src/H5MPmodule.h +++ b/src/H5MPmodule.h @@ -18,8 +18,8 @@ * H5MP package. Including this header means that the source file * is part of the H5MP package. */ -#ifndef _H5MPmodule_H -#define _H5MPmodule_H +#ifndef H5MPmodule_H +#define H5MPmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5MPmodule_H */ +#endif /* H5MPmodule_H */ diff --git a/src/H5MPpkg.h b/src/H5MPpkg.h index 8ab5c7900d2..64c5293ff03 100644 --- a/src/H5MPpkg.h +++ b/src/H5MPpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5MP package!" #endif -#ifndef _H5MPpkg_H -#define _H5MPpkg_H +#ifndef H5MPpkg_H +#define H5MPpkg_H /* Get package's private header */ #include "H5MPprivate.h" /* Memory Pools */ @@ -96,4 +96,4 @@ H5_DLL herr_t H5MP_get_page_free_size(const H5MP_page_t *mp, size_t *page); H5_DLL herr_t H5MP_get_page_next_page(const H5MP_page_t *page, H5MP_page_t **next_page); #endif /* H5MP_TESTING */ -#endif /* _H5MPpkg_H */ +#endif /* H5MPpkg_H */ diff --git a/src/H5MPprivate.h b/src/H5MPprivate.h index 87d1f1b4c06..2b066502018 100644 --- a/src/H5MPprivate.h +++ b/src/H5MPprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5MPprivate_H -#define _H5MPprivate_H +#ifndef H5MPprivate_H +#define H5MPprivate_H /* Include package's public header (not yet) */ /* #include "H5MPpublic.h" */ @@ -54,4 +54,4 @@ H5_DLL void * H5MP_malloc(H5MP_pool_t *mp, size_t request); H5_DLL void * H5MP_free(H5MP_pool_t *mp, void *spc); H5_DLL herr_t H5MP_close(H5MP_pool_t *mp); -#endif /* _H5MPprivate_H */ +#endif /* H5MPprivate_H */ diff --git a/src/H5Omodule.h b/src/H5Omodule.h index 8edec066109..9ba6c61c90e 100644 --- a/src/H5Omodule.h +++ b/src/H5Omodule.h @@ -18,8 +18,8 @@ * H5O package. Including this header means that the source file * is part of the H5O package. */ -#ifndef _H5Omodule_H -#define _H5Omodule_H +#ifndef H5Omodule_H +#define H5Omodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_OHDR #define H5_MY_PKG_INIT YES -#endif /* _H5Omodule_H */ +#endif /* H5Omodule_H */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 4a8cb9fef06..4972825c686 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5O package!" #endif -#ifndef _H5Opkg_H -#define _H5Opkg_H +#ifndef H5Opkg_H +#define H5Opkg_H /* Get package's private header */ #include "H5Oprivate.h" /* Object headers */ @@ -647,4 +647,4 @@ H5_DLL herr_t H5O_assert(const H5O_t *oh); #endif /* H5O_DEBUG */ H5_DLL herr_t H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth); -#endif /* _H5Opkg_H */ +#endif /* H5Opkg_H */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index d38cdd7a3e4..a0b77635280 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -21,8 +21,8 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Oprivate_H -#define _H5Oprivate_H +#ifndef H5Oprivate_H +#define H5Oprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5O_t H5O_t; @@ -1016,4 +1016,4 @@ H5_DLL herr_t H5O_pline_set_version(H5F_t *f, H5O_pline_t *pline); /* Shared message operators */ H5_DLL herr_t H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src); -#endif /* _H5Oprivate_H */ +#endif /* H5Oprivate_H */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 5c3d99ab0b2..249479b7ab7 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -22,13 +22,13 @@ * *------------------------------------------------------------------------- */ -#ifndef _H5Opublic_H -#define _H5Opublic_H +#ifndef H5Opublic_H +#define H5Opublic_H /* Public headers needed by this file */ -#include "H5public.h" /* Generic Functions */ -#include "H5Ipublic.h" /* IDs */ -#include "H5Lpublic.h" /* Links */ +#include "H5public.h" /* Generic Functions */ +#include "H5Ipublic.h" /* IDs */ +#include "H5Lpublic.h" /* Links */ /*****************/ /* Public Macros */ @@ -245,4 +245,4 @@ typedef struct H5O_stat_t { #ifdef __cplusplus } #endif -#endif /* _H5Opublic_H */ +#endif /* H5Opublic_H */ diff --git a/src/H5PBmodule.h b/src/H5PBmodule.h index 9c07a0ca0d0..21294c876b0 100644 --- a/src/H5PBmodule.h +++ b/src/H5PBmodule.h @@ -18,8 +18,8 @@ * H5PB package. Including this header means that the source file * is part of the H5PB package. */ -#ifndef _H5PBmodule_H -#define _H5PBmodule_H +#ifndef H5PBmodule_H +#define H5PBmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_RESOURCE #define H5_MY_PKG_INIT NO -#endif /* _H5PBmodule_H */ +#endif /* H5PBmodule_H */ diff --git a/src/H5PBpkg.h b/src/H5PBpkg.h index b54bcdc28c7..2656588f32a 100644 --- a/src/H5PBpkg.h +++ b/src/H5PBpkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5PB package!" #endif -#ifndef _H5PBpkg_H -#define _H5PBpkg_H +#ifndef H5PBpkg_H +#define H5PBpkg_H /* Get package's private header */ #include "H5PBprivate.h" @@ -50,4 +50,4 @@ typedef struct H5PB_entry_t { /* Package Private Prototypes */ /******************************/ -#endif /* _H5PBpkg_H */ +#endif /* H5PBpkg_H */ diff --git a/src/H5PBprivate.h b/src/H5PBprivate.h index d1e9c1c689e..e0197bfed27 100644 --- a/src/H5PBprivate.h +++ b/src/H5PBprivate.h @@ -20,8 +20,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5PBprivate_H -#define _H5PBprivate_H +#ifndef H5PBprivate_H +#define H5PBprivate_H /* Include package's public header */ #ifdef NOT_YET @@ -98,4 +98,4 @@ H5_DLL herr_t H5PB_get_stats(const H5PB_t *page_buf, unsigned accesses[2], unsig unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); H5_DLL herr_t H5PB_print_stats(const H5PB_t *page_buf); -#endif /* !_H5PBprivate_H */ +#endif /* H5PBprivate_H */ diff --git a/src/H5PLextern.h b/src/H5PLextern.h index dbf10586240..7f3df5e2f92 100644 --- a/src/H5PLextern.h +++ b/src/H5PLextern.h @@ -14,8 +14,8 @@ * Purpose: Header file for writing external HDF5 plugins. */ -#ifndef _H5PLextern_H -#define _H5PLextern_H +#ifndef H5PLextern_H +#define H5PLextern_H /* Include HDF5 header */ #include "hdf5.h" @@ -40,4 +40,4 @@ H5PLUGIN_DLL const void *H5PLget_plugin_info(void); } #endif -#endif /* _H5PLextern_H */ +#endif /* H5PLextern_H */ diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h index 6ee1468179c..0a08cca9e6c 100644 --- a/src/H5PLmodule.h +++ b/src/H5PLmodule.h @@ -16,8 +16,8 @@ * is part of the H5PL package. */ -#ifndef _H5PLmodule_H -#define _H5PLmodule_H +#ifndef H5PLmodule_H +#define H5PLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -27,4 +27,4 @@ #define H5_MY_PKG_ERR H5E_PLUGIN #define H5_MY_PKG_INIT YES -#endif /* _H5PLmodule_H */ +#endif /* H5PLmodule_H */ diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h index c7e4bbf3f0c..cb5ee5e140e 100644 --- a/src/H5PLpkg.h +++ b/src/H5PLpkg.h @@ -21,8 +21,8 @@ #error "Do not include this file outside the H5PL package!" #endif -#ifndef _H5PLpkg_H -#define _H5PLpkg_H +#ifndef H5PLpkg_H +#define H5PLpkg_H /* Include private header file */ #include "H5PLprivate.h" /* Filter functions */ @@ -154,4 +154,4 @@ H5_DLL const char *H5PL__get_path(unsigned int index); H5_DLL herr_t H5PL__find_plugin_in_path_table(const H5PL_search_params_t *search_params, hbool_t *found /*out*/, const void **plugin_info /*out*/); -#endif /* _H5PLpkg_H */ +#endif /* H5PLpkg_H */ diff --git a/src/H5PLprivate.h b/src/H5PLprivate.h index 2dd9c13c72b..5406ad72b90 100644 --- a/src/H5PLprivate.h +++ b/src/H5PLprivate.h @@ -14,8 +14,8 @@ * This file contains private information about the H5PL module */ -#ifndef _H5PLprivate_H -#define _H5PLprivate_H +#ifndef H5PLprivate_H +#define H5PLprivate_H /* Include package's public header */ #include "H5PLpublic.h" @@ -47,4 +47,4 @@ typedef union H5PL_key_t { /* Internal API routines */ H5_DLL const void *H5PL_load(H5PL_type_t plugin_type, H5PL_key_t key); -#endif /* _H5PLprivate_H */ +#endif /* H5PLprivate_H */ diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 2805b8564f6..ded2dc541dd 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -14,8 +14,8 @@ * This file contains public declarations for the H5PL module. */ -#ifndef _H5PLpublic_H -#define _H5PLpublic_H +#ifndef H5PLpublic_H +#define H5PLpublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ @@ -58,4 +58,4 @@ H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/); } #endif -#endif /* _H5PLpublic_H */ +#endif /* H5PLpublic_H */ diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h index 5a249b14b20..73f60095dfc 100644 --- a/src/H5Pmodule.h +++ b/src/H5Pmodule.h @@ -18,8 +18,8 @@ * H5P package. Including this header means that the source file * is part of the H5P package. */ -#ifndef _H5Pmodule_H -#define _H5Pmodule_H +#ifndef H5Pmodule_H +#define H5Pmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_PLIST #define H5_MY_PKG_INIT YES -#endif /* _H5Pmodule_H */ +#endif /* H5Pmodule_H */ diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h index f23b193c1f9..5818fecb8ba 100644 --- a/src/H5Ppkg.h +++ b/src/H5Ppkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5P package!" #endif -#ifndef _H5Ppkg_H -#define _H5Ppkg_H +#ifndef H5Ppkg_H +#define H5Ppkg_H /* Get package's private header */ #include "H5Pprivate.h" @@ -196,4 +196,4 @@ H5_DLL char *H5P__get_class_path_test(hid_t pclass_id); H5_DLL hid_t H5P__open_class_path_test(const char *path); #endif /* H5P_TESTING */ -#endif /* _H5Ppkg_H */ +#endif /* H5Ppkg_H */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 84b7cc36d44..300eb7cd4d2 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5P module */ -#ifndef _H5Pprivate_H -#define _H5Pprivate_H +#ifndef H5Pprivate_H +#define H5Pprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5P_genplist_t H5P_genplist_t; @@ -203,4 +203,4 @@ H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id); H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status); H5_DLL herr_t H5P_get_fill_value(H5P_genplist_t *plist, const struct H5T_t *type, void *value); -#endif /* _H5Pprivate_H */ +#endif /* H5Pprivate_H */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 118a0238db6..58cc362bed9 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -15,8 +15,8 @@ * This file contains function prototypes for each exported function in the * H5P module. */ -#ifndef _H5Ppublic_H -#define _H5Ppublic_H +#ifndef H5Ppublic_H +#define H5Ppublic_H /* System headers needed by this file */ @@ -510,4 +510,4 @@ H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *str #ifdef __cplusplus } #endif -#endif /* _H5Ppublic_H */ +#endif /* H5Ppublic_H */ diff --git a/src/H5RSprivate.h b/src/H5RSprivate.h index c1f044a15d0..32e1dc66c23 100644 --- a/src/H5RSprivate.h +++ b/src/H5RSprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5RS module */ -#ifndef _H5RSprivate_H -#define _H5RSprivate_H +#ifndef H5RSprivate_H +#define H5RSprivate_H /**************************************/ /* Public headers needed by this file */ @@ -55,4 +55,4 @@ H5_DLL ssize_t H5RS_len(const H5RS_str_t *rs); H5_DLL char * H5RS_get_str(const H5RS_str_t *rs); H5_DLL unsigned H5RS_get_count(const H5RS_str_t *rs); -#endif /* _H5RSprivate_H */ +#endif /* H5RSprivate_H */ diff --git a/src/H5Rmodule.h b/src/H5Rmodule.h index 0f09b308b6f..9a3bf33e17c 100644 --- a/src/H5Rmodule.h +++ b/src/H5Rmodule.h @@ -14,8 +14,8 @@ * H5R package. Including this header means that the source file * is part of the H5R package. */ -#ifndef _H5Rmodule_H -#define _H5Rmodule_H +#ifndef H5Rmodule_H +#define H5Rmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -25,4 +25,4 @@ #define H5_MY_PKG_ERR H5E_REFERENCE #define H5_MY_PKG_INIT YES -#endif /* _H5Rmodule_H */ +#endif /* H5Rmodule_H */ diff --git a/src/H5Rpkg.h b/src/H5Rpkg.h index 39402770276..3fa2cb527e0 100644 --- a/src/H5Rpkg.h +++ b/src/H5Rpkg.h @@ -19,8 +19,8 @@ #error "Do not include this file outside the H5R package!" #endif -#ifndef _H5Rpkg_H -#define _H5Rpkg_H +#ifndef H5Rpkg_H +#define H5Rpkg_H /* Get package's private header */ #include "H5Rprivate.h" @@ -53,4 +53,4 @@ H5_DLL herr_t H5R__get_obj_type(H5F_t *file, H5R_type_t ref_type, const void *_ H5_DLL ssize_t H5R__get_name(H5F_t *file, hid_t id, H5R_type_t ref_type, const void *_ref, char *name, size_t size); -#endif /* _H5Rpkg_H */ +#endif /* H5Rpkg_H */ diff --git a/src/H5Rprivate.h b/src/H5Rprivate.h index d4edd03d729..720061c7418 100644 --- a/src/H5Rprivate.h +++ b/src/H5Rprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5R module */ -#ifndef _H5Rprivate_H -#define _H5Rprivate_H +#ifndef H5Rprivate_H +#define H5Rprivate_H #include "H5Rpublic.h" @@ -41,4 +41,4 @@ /* Library Private Prototypes */ /******************************/ -#endif /* _H5Rprivate_H */ +#endif /* H5Rprivate_H */ diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index 3a305ce0bf5..1fc41ec08dd 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5R module. */ -#ifndef _H5Rpublic_H -#define _H5Rpublic_H +#ifndef H5Rpublic_H +#define H5Rpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -98,4 +98,4 @@ H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void * } #endif -#endif /* _H5Rpublic_H */ +#endif /* H5Rpublic_H */ diff --git a/src/H5SLmodule.h b/src/H5SLmodule.h index 3ce2fcd8b82..2614f92eb11 100644 --- a/src/H5SLmodule.h +++ b/src/H5SLmodule.h @@ -18,8 +18,8 @@ * H5SL package. Including this header means that the source file * is part of the H5SL package. */ -#ifndef _H5SLmodule_H -#define _H5SLmodule_H +#ifndef H5SLmodule_H +#define H5SLmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SLIST #define H5_MY_PKG_INIT YES -#endif /* _H5SLmodule_H */ +#endif /* H5SLmodule_H */ diff --git a/src/H5SLprivate.h b/src/H5SLprivate.h index ba235077e52..c9e11471cd2 100644 --- a/src/H5SLprivate.h +++ b/src/H5SLprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5SL module */ -#ifndef _H5SLprivate_H -#define _H5SLprivate_H +#ifndef H5SLprivate_H +#define H5SLprivate_H /**************************************/ /* Public headers needed by this file */ @@ -91,4 +91,4 @@ H5_DLL herr_t H5SL_close(H5SL_t *slist); H5_DLL herr_t H5SL_destroy(H5SL_t *slist, H5SL_operator_t op, void *op_data); H5_DLL int H5SL_term_interface(void); -#endif /* _H5SLprivate_H */ +#endif /* H5SLprivate_H */ diff --git a/src/H5SMmodule.h b/src/H5SMmodule.h index 57945ce18ec..6d2abf17831 100644 --- a/src/H5SMmodule.h +++ b/src/H5SMmodule.h @@ -18,8 +18,8 @@ * H5SM package. Including this header means that the source file * is part of the H5SM package. */ -#ifndef _H5SMmodule_H -#define _H5SMmodule_H +#ifndef H5SMmodule_H +#define H5SMmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_SOHM #define H5_MY_PKG_INIT NO -#endif /* _H5SMmodule_H */ +#endif /* H5SMmodule_H */ diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h index 3c7e2f2105e..abf9a70835b 100644 --- a/src/H5SMpkg.h +++ b/src/H5SMpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5SM package!" #endif -#ifndef _H5SMpkg_H -#define _H5SMpkg_H +#ifndef H5SMpkg_H +#define H5SMpkg_H /* Get package's private header */ #include "H5SMprivate.h" /* Shared Object Header Messages */ @@ -277,4 +277,4 @@ herr_t H5SM_list_free(H5SM_list_t *list); H5_DLL herr_t H5SM__get_mesg_count_test(H5F_t *f, unsigned type_id, size_t *mesg_count); #endif /* H5SM_TESTING */ -#endif /* _H5SMpkg_H */ +#endif /* H5SMpkg_H */ diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h index fb47e465078..efe9355516a 100644 --- a/src/H5SMprivate.h +++ b/src/H5SMprivate.h @@ -18,8 +18,8 @@ * Purpose: This file contains private declarations for the H5SM * shared object header messages module. */ -#ifndef _H5SMprivate_H -#define _H5SMprivate_H +#ifndef H5SMprivate_H +#define H5SMprivate_H #include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ @@ -66,4 +66,4 @@ H5_DLL herr_t H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int i H5_DLL herr_t H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidth, haddr_t table_addr); -#endif /*_H5SMprivate_H*/ +#endif /*H5SMprivate_H*/ diff --git a/src/H5STprivate.h b/src/H5STprivate.h index c9d643ef82d..2d009fa7bc0 100644 --- a/src/H5STprivate.h +++ b/src/H5STprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5ST module */ -#ifndef _H5STprivate_H -#define _H5STprivate_H +#ifndef H5STprivate_H +#define H5STprivate_H #ifdef LATER #include "H5STpublic.h" @@ -60,4 +60,4 @@ H5_DLL herr_t H5ST_delete(H5ST_tree_t *root, H5ST_ptr_t p); H5_DLL herr_t H5ST_dump(H5ST_tree_t *tree); #endif /* H5ST_DEBUG */ -#endif /* _H5STprivate_H */ +#endif /* H5STprivate_H */ diff --git a/src/H5Smodule.h b/src/H5Smodule.h index 9d5e0ef7b06..a7b035e2766 100644 --- a/src/H5Smodule.h +++ b/src/H5Smodule.h @@ -18,8 +18,8 @@ * H5S package. Including this header means that the source file * is part of the H5S package. */ -#ifndef _H5Smodule_H -#define _H5Smodule_H +#ifndef H5Smodule_H +#define H5Smodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_DATASPACE #define H5_MY_PKG_INIT YES -#endif /* _H5Smodule_H */ +#endif /* H5Smodule_H */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e9186fb33ea..059455722b3 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5S package!" #endif -#ifndef _H5Spkg_H -#define _H5Spkg_H +#ifndef H5Spkg_H +#define H5Spkg_H /* Get package's private header */ #include "H5Sprivate.h" @@ -412,4 +412,4 @@ H5_DLL herr_t H5S__get_diminfo_status_test(hid_t space_id, H5S_diminfo_valid_t * H5_DLL htri_t H5S__internal_consistency_test(hid_t space_id); #endif /* H5S_TESTING */ -#endif /*_H5Spkg_H*/ +#endif /*H5Spkg_H*/ diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 73a03bcdbed..af76f8b2eb9 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5S module */ -#ifndef _H5Sprivate_H -#define _H5Sprivate_H +#ifndef H5Sprivate_H +#define H5Sprivate_H /* Include package's public header */ #include "H5Spublic.h" @@ -337,4 +337,4 @@ H5_DLL herr_t H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, hbool_t do_permute, hsize_t **permute_map, hbool_t *is_permuted); #endif /* H5_HAVE_PARALLEL */ -#endif /* _H5Sprivate_H */ +#endif /* H5Sprivate_H */ diff --git a/src/H5Spublic.h b/src/H5Spublic.h index c1b431b74d7..8a7f1a38526 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5S module. */ -#ifndef _H5Spublic_H -#define _H5Spublic_H +#ifndef H5Spublic_H +#define H5Spublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -140,4 +140,4 @@ H5_DLL hid_t H5Sselect_project_intersection(hid_t src_space_id, hid_t dst_spa #ifdef __cplusplus } #endif -#endif /* _H5Spublic_H */ +#endif /* H5Spublic_H */ diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index a0cb353be6f..3c81f26d6d4 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -27,7 +27,7 @@ #ifdef H5_HAVE_THREADSAFE /* Public headers needed by this file */ #ifdef LATER -#include "H5TSpublic.h" /*Public API prototypes */ +#include "H5TSpublic.h" /* Public API prototypes */ #endif /* LATER */ #ifdef H5_HAVE_WIN_THREADS @@ -38,6 +38,8 @@ typedef struct H5TS_mutex_struct { CRITICAL_SECTION CriticalSection; } H5TS_mutex_t; + +/* Portability wrappers around Windows Threads types */ typedef CRITICAL_SECTION H5TS_mutex_simple_t; typedef HANDLE H5TS_thread_t; typedef HANDLE H5TS_attr_t; @@ -50,7 +52,7 @@ typedef INIT_ONCE H5TS_once_t; #define H5TS_SCOPE_PROCESS 0 #define H5TS_CALL_CONV WINAPI -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) TlsGetValue(key) #define H5TS_set_thread_local_value(key, value) TlsSetValue(key, value) #define H5TS_attr_init(attr_ptr) 0 @@ -80,6 +82,8 @@ typedef struct H5TS_mutex_struct { pthread_cond_t cond_var; /* condition variable */ unsigned int lock_count; } H5TS_mutex_t; + +/* Portability wrappers around pthread types */ typedef pthread_t H5TS_thread_t; typedef pthread_attr_t H5TS_attr_t; typedef pthread_mutex_t H5TS_mutex_simple_t; @@ -91,7 +95,7 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS #define H5TS_CALL_CONV /* unused - Windows only */ -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) pthread_getspecific(key) #define H5TS_set_thread_local_value(key, value) pthread_setspecific(key, value) #define H5TS_attr_init(attr_ptr) pthread_attr_init((attr_ptr)) @@ -101,6 +105,8 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_mutex_init(mutex) pthread_mutex_init(mutex, NULL) #define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex) #define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex) + +/* Pthread-only routines */ H5_DLL uint64_t H5TS_thread_id(void); #endif /* H5_HAVE_WIN_THREADS */ diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h index ba38be2b66a..9d585d89c6a 100644 --- a/src/H5Tmodule.h +++ b/src/H5Tmodule.h @@ -18,8 +18,8 @@ * H5T package. Including this header means that the source file * is part of the H5T package. */ -#ifndef _H5Tmodule_H -#define _H5Tmodule_H +#ifndef H5Tmodule_H +#define H5Tmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_DATATYPE #define H5_MY_PKG_INIT YES -#endif /* _H5Tmodule_H */ +#endif /* H5Tmodule_H */ diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index f725bff882b..0dd078bd41a 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -23,8 +23,8 @@ #error "Do not include this file outside the H5T package!" #endif -#ifndef _H5Tpkg_H -#define _H5Tpkg_H +#ifndef H5Tpkg_H +#define H5Tpkg_H /* * Define this to enable debugging. @@ -841,4 +841,4 @@ H5_DLL herr_t H5T__sort_name(const H5T_t *dt, int *map); /* Debugging functions */ H5_DLL herr_t H5T__print_stats(H5T_path_t *path, int *nprint /*in,out*/); -#endif /* _H5Tpkg_H */ +#endif /* H5Tpkg_H */ diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 8217a465599..858abcd1f90 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -14,8 +14,8 @@ /* * This file contains private information about the H5T module */ -#ifndef _H5Tprivate_H -#define _H5Tprivate_H +#ifndef H5Tprivate_H +#define H5Tprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5T_t H5T_t; @@ -160,4 +160,4 @@ H5_DLL int H5T_get_offset(const H5T_t *dt); /* Fixed-point functions */ H5_DLL H5T_sign_t H5T_get_sign(H5T_t const *dt); -#endif /* _H5Tprivate_H */ +#endif /* H5Tprivate_H */ diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 3a4c19253dc..822c26f90df 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -14,8 +14,8 @@ /* * This file contains public declarations for the H5T module. */ -#ifndef _H5Tpublic_H -#define _H5Tpublic_H +#ifndef H5Tpublic_H +#define H5Tpublic_H /* Public headers needed by this file */ #include "H5public.h" @@ -606,4 +606,4 @@ H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); #ifdef __cplusplus } #endif -#endif /* _H5Tpublic_H */ +#endif /* H5Tpublic_H */ diff --git a/src/H5UCprivate.h b/src/H5UCprivate.h index a46db5d83fd..9f4f15a1e46 100644 --- a/src/H5UCprivate.h +++ b/src/H5UCprivate.h @@ -17,8 +17,8 @@ * conflicting requirement for the use of H5RC. */ -#ifndef _H5UCprivate_H -#define _H5UCprivate_H +#ifndef H5UCprivate_H +#define H5UCprivate_H /**************************************/ /* Public headers needed by this file */ @@ -59,4 +59,4 @@ typedef struct H5UC_t { H5_DLL H5UC_t *H5UC_create(void *s, H5UC_free_func_t free_func); H5_DLL herr_t H5UC_decr(H5UC_t *rc); -#endif /* _H5RSprivate_H */ +#endif /* H5UCprivate_H */ diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index 224d03ac5bf..e24ce836588 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -298,7 +298,7 @@ H5VM_vector_cmp_u(unsigned n, const hsize_t *v1, const hsize_t *v2) * * Failure: 0 if N is zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 8, 1998 * *------------------------------------------------------------------------- diff --git a/src/H5WBprivate.h b/src/H5WBprivate.h index 416e125ad9e..109236560a7 100644 --- a/src/H5WBprivate.h +++ b/src/H5WBprivate.h @@ -22,8 +22,8 @@ *------------------------------------------------------------------------- */ -#ifndef _H5WBprivate_H -#define _H5WBprivate_H +#ifndef H5WBprivate_H +#define H5WBprivate_H /* Include package's public header */ /* #include "H5WBpublic.h" */ @@ -55,4 +55,4 @@ H5_DLL void * H5WB_actual(H5WB_t *wb, size_t need); H5_DLL void * H5WB_actual_clear(H5WB_t *wb, size_t need); H5_DLL herr_t H5WB_unwrap(H5WB_t *wb); -#endif /* _H5WBprivate_H */ +#endif /* H5WBprivate_H */ diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h index ba93bdb7fb1..7dc687a73b9 100644 --- a/src/H5Zmodule.h +++ b/src/H5Zmodule.h @@ -18,8 +18,8 @@ * H5Z package. Including this header means that the source file * is part of the H5Z package. */ -#ifndef _H5Zmodule_H -#define _H5Zmodule_H +#ifndef H5Zmodule_H +#define H5Zmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_PLINE #define H5_MY_PKG_INIT YES -#endif /* _H5Zmodule_H */ +#endif /* H5Zmodule_H */ diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h index 41c7ba1f222..726478a0880 100644 --- a/src/H5Zpkg.h +++ b/src/H5Zpkg.h @@ -15,8 +15,8 @@ #error "Do not include this file outside the H5Z package!" #endif -#ifndef _H5Zpkg_H -#define _H5Zpkg_H +#ifndef H5Zpkg_H +#define H5Zpkg_H /* Include private header file */ #include "H5Zprivate.h" /* Filter functions */ @@ -54,4 +54,4 @@ H5_DLLVAR H5Z_class2_t H5Z_SZIP[1]; /* Package internal routines */ H5_DLL herr_t H5Z__unregister(H5Z_filter_t filter_id); -#endif /* _H5Zpkg_H */ +#endif /* H5Zpkg_H */ diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index dc374c99fd4..5ec12e1a77e 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -15,8 +15,8 @@ * Thursday, April 16, 1998 */ -#ifndef _H5Zprivate_H -#define _H5Zprivate_H +#ifndef H5Zprivate_H +#define H5Zprivate_H /* Early typedefs to avoid circular dependencies */ typedef struct H5Z_filter_info_t H5Z_filter_info_t; diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index fb6a13f9a2f..66099f01a77 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -15,8 +15,8 @@ * Thursday, April 16, 1998 */ -#ifndef _H5Zpublic_H -#define _H5Zpublic_H +#ifndef H5Zpublic_H +#define H5Zpublic_H /* Public headers needed by this file */ #include "H5public.h" diff --git a/src/H5private.h b/src/H5private.h index 27741ceefe8..93f150d15f5 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -21,8 +21,8 @@ * */ -#ifndef _H5private_H -#define _H5private_H +#ifndef H5private_H +#define H5private_H #include "H5public.h" /* Include Public Definitions */ @@ -295,23 +295,14 @@ * Note that Solaris Studio supports attribute, but does not support the * attributes we use. * + * When using H5_ATTR_FALLTHROUGH, you should also include a comment that + * says FALLTHROUGH to reduce warnings on compilers that don't use + * attributes but do respect fall-through comments. + * * H5_ATTR_CONST is redefined in tools/h5repack/dynlib_rpk.c to quiet * gcc warnings (it has to use the public API and can't include this * file). Be sure to update that file if the #ifdefs change here. */ -#ifdef __cplusplus -#define H5_ATTR_FORMAT(X, Y, Z) /*void*/ -#define H5_ATTR_UNUSED /*void*/ -#define H5_ATTR_DEPRECATED_USED /*void*/ -#define H5_ATTR_NDEBUG_UNUSED /*void*/ -#define H5_ATTR_DEBUG_API_USED /*void*/ -#define H5_ATTR_PARALLEL_UNUSED /*void*/ -#define H5_ATTR_PARALLEL_USED /*void*/ -#define H5_ATTR_NORETURN /*void*/ -#define H5_ATTR_CONST /*void*/ -#define H5_ATTR_PURE /*void*/ -#define H5_ATTR_FALLTHROUGH /*void*/ -#else /* __cplusplus */ #if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) #define H5_ATTR_FORMAT(X, Y, Z) __attribute__((format(X, Y, Z))) #define H5_ATTR_UNUSED __attribute__((unused)) @@ -358,7 +349,6 @@ #define H5_ATTR_PURE /*void*/ #define H5_ATTR_FALLTHROUGH /*void*/ #endif -#endif /* __cplusplus */ /* * Networking headers used by the mirror VFD and related tests and utilities. @@ -2830,4 +2820,4 @@ H5_DLL herr_t H5_mpio_create_large_type(hsize_t num_elements, MPI_Aint stride_b H5_DLL herr_t H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *marker, size_t buf_offset, size_t buf_size); -#endif /* _H5private_H */ +#endif /* H5private_H */ diff --git a/src/H5public.h b/src/H5public.h index de4862764ee..6271be0e0a5 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -14,16 +14,16 @@ /* * This file contains public declarations for the HDF5 module. */ -#ifndef _H5public_H -#define _H5public_H +#ifndef H5public_H +#define H5public_H /* Include files for public use... */ /* * Since H5pubconf.h is a generated header file, it is messy to try - * to put a #ifndef _H5pubconf_H ... #endif guard in it. + * to put a #ifndef H5pubconf_H ... #endif guard in it. * HDF5 has set an internal rule that it is being included here. * Source files should NOT include H5pubconf.h directly but include - * it via H5public.h. The #ifndef _H5public_H guard above would + * it via H5public.h. The #ifndef H5public_H guard above would * prevent repeated include. */ #include "H5pubconf.h" /* From configure */ @@ -354,4 +354,4 @@ H5_DLL void * H5resize_memory(void *mem, size_t size); #ifdef __cplusplus } #endif -#endif /* _H5public_H */ +#endif /* H5public_H */ diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 7c088aa6f75..b4b253f0729 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -31,33 +31,40 @@ #define PRIoPTR "llo" #define PRIuPTR "llu" #define PRIxPTR "llx" +#define PRIXPTR "llX" #else /* _WIN64 */ #define PRIdPTR "ld" #define PRIoPTR "lo" #define PRIuPTR "lu" #define PRIxPTR "lx" +#define PRIXPTR "lX" #endif /* _WIN64 */ #define PRId8 "d" #define PRIo8 "o" #define PRIu8 "u" #define PRIx8 "x" +#define PRIX8 "X" #define PRId16 "d" #define PRIo16 "o" #define PRIu16 "u" #define PRIx16 "x" +#define PRIX16 "X" #define PRId32 "d" #define PRIo32 "o" #define PRIu32 "u" #define PRIx32 "x" +#define PRIX32 "X" #define PRId64 "lld" #define PRIo64 "llo" #define PRIu64 "llu" #define PRIx64 "llx" +#define PRIX64 "llX" #define PRIdMAX "lld" #define PRIoMAX "llo" #define PRIuMAX "llu" #define PRIxMAX "llx" +#define PRIXMAX "llX" #endif /* diff --git a/src/hdf5.h b/src/hdf5.h index 43140505237..919d50619df 100644 --- a/src/hdf5.h +++ b/src/hdf5.h @@ -16,8 +16,8 @@ * a particular header file and include that here, don't fill this file with * lots of gunk... */ -#ifndef _HDF5_H -#define _HDF5_H +#ifndef HDF5_H +#define HDF5_H #include "H5public.h" #include "H5Apublic.h" /* Attributes */ diff --git a/test/H5srcdir.h b/test/H5srcdir.h index b2fd341f9d7..8cc91d14bc2 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -17,8 +17,8 @@ * * Purpose: srcdir querying support. */ -#ifndef _H5SRCDIR_H -#define _H5SRCDIR_H +#ifndef H5SRCDIR_H +#define H5SRCDIR_H #ifdef __cplusplus extern "C" { @@ -33,4 +33,4 @@ H5TEST_DLL const char *H5_get_srcdir_filename(const char *filename); } #endif -#endif /* _H5SRCDIR_H */ +#endif /* H5SRCDIR_H */ diff --git a/test/h5test.h b/test/h5test.h index 5b0ab343d7b..73dd1b5964f 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -17,8 +17,8 @@ * * Purpose: Test support stuff. */ -#ifndef _H5TEST_H -#define _H5TEST_H +#ifndef H5TEST_H +#define H5TEST_H /* * Include required headers. This file tests internal library functions, diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 719dff3beff..9db045f7005 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -472,9 +472,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co size_t size = 0; hbool_t iszero1; hbool_t iszero2; - hsize_t nfound = 0; /* differences found */ - double per; - hbool_t both_zero; + hsize_t nfound = 0; /* differences found */ diff_err_t ret_value = opts->err_stat; H5TOOLS_START_DEBUG("ph:%d elemtno:%d - errstat:%d", opts->print_header, elemtno, opts->err_stat); diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index b2edbc09de4..9b647b25725 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -448,6 +448,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format if (H5Tclose(atype) < 0) H5TOOLS_ERROR(dimension_break, "H5Tclose failed"); + if (H5Sclose(region_space) < 0) + H5TOOLS_ERROR(dimension_break, "H5Sclose failed"); + ctx->indent_level--; ctx->need_prefix = TRUE; From e8df4b9918405d292669e741f1e56656789f22e2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Mar 2021 08:09:10 -0600 Subject: [PATCH 15/66] Merge updates #358 patches from vtk #361 fix header guard spelling --- c++/src/H5Object.cpp | 2 +- hl/src/H5LT.c | 2 +- hl/src/hdf5_hl.h | 7 ++++--- src/H5FDmulti.c | 2 +- src/H5FDstdio.c | 32 ++++++++++++++++---------------- src/H5Fdeprec.c | 22 +++++++++------------- src/H5Fpublic.h | 2 +- src/H5Spkg.h | 10 +++++----- test/stab.c | 2 +- test/tattr.c | 4 ++-- tools/lib/h5tools_utils.c | 2 -- 11 files changed, 41 insertions(+), 46 deletions(-) diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 1cba980f26b..9b82a65b0f6 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -57,7 +57,7 @@ userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSE // userVisitOpWrpr interfaces between the user's function and the // C library function H5Ovisit3 static herr_t -userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, +userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info_t *obj_info, void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index e4d04300be5..18af730626d 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1297,7 +1297,7 @@ H5LTget_dataset_info(hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_cla */ static herr_t -find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5L_info2_t *linfo, +find_dataset(H5_ATTR_UNUSED hid_t loc_id, const char *name, H5_ATTR_UNUSED const H5L_info_t *linfo, void *op_data) { /* Define a default zero value for return. This will cause the iterator to continue if diff --git a/hl/src/hdf5_hl.h b/hl/src/hdf5_hl.h index 580c09a839d..9960b97607d 100644 --- a/hl/src/hdf5_hl.h +++ b/hl/src/hdf5_hl.h @@ -17,8 +17,9 @@ * fill this file with lots of gunk... */ -#ifndef _HDF5_HL_H -#define _HDF5_HL_H +#ifndef HDF5_HL_H +#define HDF5_HL_H + #include "hdf5.h" /* hdf5 main library */ #include "H5DOpublic.h" /* dataset optimization */ #include "H5DSpublic.h" /* dimension scales */ @@ -28,4 +29,4 @@ #include "H5PTpublic.h" /* packet table */ #include "H5LDpublic.h" /* lite dataset */ -#endif /*H5_INCLUDE_HL*/ +#endif /*HDF5_HL_H*/ diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index cc9f51dee48..c96b5956605 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1195,7 +1195,7 @@ static herr_t H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */) { /* Shut compiler up */ - _f = _f; + (void)_f; /* Set the VFL feature flags that this driver supports */ if (flags) { diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index b9d018ab993..efc18022cb3 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -346,7 +346,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr assert(sizeof(file_offset_t) >= sizeof(size_t)); /* Quiet compiler */ - fapl_id = fapl_id; + (void)fapl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -587,7 +587,7 @@ static herr_t H5FD_stdio_query(const H5FD_t *_f, unsigned long /*OUT*/ *flags) { /* Quiet the compiler */ - _f = _f; + (void)_f; /* Set the VFL feature flags that this driver supports. * @@ -632,8 +632,8 @@ H5FD_stdio_alloc(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp haddr_t addr; /* Quiet compiler */ - type = type; - dxpl_id = dxpl_id; + (void)type; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -671,7 +671,7 @@ H5FD_stdio_get_eoa(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type) H5Eclear2(H5E_DEFAULT); /* Quiet compiler */ - type = type; + (void)type; return file->eoa; } /* end H5FD_stdio_get_eoa() */ @@ -701,7 +701,7 @@ H5FD_stdio_set_eoa(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, haddr_t addr) H5Eclear2(H5E_DEFAULT); /* Quiet the compiler */ - type = type; + (void)type; file->eoa = addr; @@ -732,13 +732,13 @@ H5FD_stdio_get_eof(const H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type) const H5FD_stdio_t *file = (const H5FD_stdio_t *)_file; /* Quiet the compiler */ - type = type; + (void)type; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); /* Quiet the compiler */ - type = type; + (void)type; return (file->eof); } /* end H5FD_stdio_get_eof() */ @@ -762,7 +762,7 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t /*UNUSED*/ fapl, void **file_handle) static const char *func = "H5FD_stdio_get_handle"; /* Function Name for error reporting */ /* Quiet the compiler */ - fapl = fapl; + (void)fapl; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -800,8 +800,8 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl static const char *func = "H5FD_stdio_read"; /* Function Name for error reporting */ /* Quiet the compiler */ - type = type; - dxpl_id = dxpl_id; + (void)type; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -902,8 +902,8 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp static const char *func = "H5FD_stdio_write"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; - type = type; + (void)dxpl_id; + (void)type; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -990,7 +990,7 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t closing) static const char *func = "H5FD_stdio_flush"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; + (void)dxpl_id; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -1034,8 +1034,8 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ static const char *func = "H5FD_stdio_truncate"; /* Function Name for error reporting */ /* Quiet the compiler */ - dxpl_id = dxpl_id; - closing = closing; + (void)dxpl_id; + (void)closing; /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index 7e6c4a5c397..c505f2cda28 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -34,12 +34,12 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ -#include "H5Iprivate.h" /* IDs */ -#include "H5SMprivate.h" /* Shared object header messages */ +#include "H5private.h" /* Generic Functions */ +#include "H5CXprivate.h" /* API Contexts */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5Iprivate.h" /* IDs */ +#include "H5SMprivate.h" /* Shared object header messages */ /****************/ /* Local Macros */ @@ -75,16 +75,12 @@ * Function: H5Fget_info1 * * Purpose: Gets general information about the file, including: - * 1. Get storage size for superblock extension if there is one. + * 1. Get storage size for superblock extension if there is one. * 2. Get the amount of btree and heap storage for entries * in the SOHM table if there is one. - * 3. The amount of free space tracked in the file. + * 3. The amount of free space tracked in the file. * - * Return: Success: non-negative on success - * Failure: Negative - * - * Programmer: Vailin Choi - * July 11, 2007 + * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 73b6225f42c..28ba17de74d 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -75,7 +75,7 @@ /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the * parent file. */ -#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */ +#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /* ignore setting on lapl */ /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */ #define H5F_OBJ_FILE (0x0001u) /* File objects */ diff --git a/src/H5Spkg.h b/src/H5Spkg.h index 059455722b3..dfb0c1ef8b0 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -12,12 +12,12 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Thursday, September 28, 2000 + * Programmer: Quincey Koziol + * Thursday, September 28, 2000 * - * Purpose: This file contains declarations which are visible only within - * the H5S package. Source files outside the H5S package should - * include H5Sprivate.h instead. + * Purpose: This file contains declarations which are visible only within + * the H5S package. Source files outside the H5S package should + * include H5Sprivate.h instead. */ #if !(defined H5S_FRIEND || defined H5S_MODULE) #error "Do not include this file outside the H5S package!" diff --git a/test/stab.c b/test/stab.c index 86725465b07..7c94a561f6b 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1273,7 +1273,7 @@ old_api(hid_t fapl) PASSED(); #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ - fapl = fapl; + (void)fapl; SKIPPED(); HDputs(" Deprecated API symbols not enabled"); diff --git a/test/tattr.c b/test/tattr.c index a9d059b23f2..bc8fae11e3c 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -4195,8 +4195,8 @@ test_attr_deprec(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); #else /* H5_NO_DEPRECATED_SYMBOLS */ /* Shut compiler up */ - fcpl = fcpl; - fapl = fapl; + (void)fcpl; + (void)fapl; /* Output message about test being skipped */ MESSAGE(5, ("Skipping Test On Deprecated Attribute Routines\n")); diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 25e0033a6c4..3a68abe0621 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -208,8 +208,6 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti arg[arg_len] = 0; for (i = 0; l_opts && l_opts[i].name; i++) { - size_t len = HDstrlen(l_opts[i].name); - if (HDstrcmp(arg, l_opts[i].name) == 0) { /* we've found a matching long command line flag */ opt_opt = l_opts[i].shortval; From 86563f0885e92adb13fd3436a04fa5d721e276d6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Mar 2021 08:18:48 -0600 Subject: [PATCH 16/66] format fix --- c++/src/H5Object.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 9b82a65b0f6..7e3d14d123e 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -57,8 +57,7 @@ userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSE // userVisitOpWrpr interfaces between the user's function and the // C library function H5Ovisit3 static herr_t -userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info_t *obj_info, - void *op_data) +userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info_t *obj_info, void *op_data) { H5std_string s_attr_name = H5std_string(attr_name); UserData4Visit *myData = reinterpret_cast(op_data); From 7fa5973debbcb7775a936f84128ea161e8d5bc64 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 3 Mar 2021 10:12:15 -0600 Subject: [PATCH 17/66] Fix missing underscore and make H5public.h closer to dev --- src/H5Ppublic.h | 6 +-- src/H5public.h | 131 +++++++++++++++++++++++++++--------------------- 2 files changed, 78 insertions(+), 59 deletions(-) diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 58cc362bed9..3ece6c3bbdf 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -39,11 +39,11 @@ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * The library's property list classes diff --git a/src/H5public.h b/src/H5public.h index 6271be0e0a5..4661ee8ab00 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -171,59 +171,118 @@ typedef long long ssize_t; #endif #endif +/* int64_t type is used for creation order field for links. It may be + * defined in Posix.1g, otherwise it is defined here. + */ +#if H5_SIZEOF_INT64_T >= 8 +#elif H5_SIZEOF_INT >= 8 +typedef int int64_t; +#undef H5_SIZEOF_INT64_T +#define H5_SIZEOF_INT64_T H5_SIZEOF_INT +#elif H5_SIZEOF_LONG >= 8 +typedef long int64_t; +#undef H5_SIZEOF_INT64_T +#define H5_SIZEOF_INT64_T H5_SIZEOF_LONG +#elif H5_SIZEOF_LONG_LONG >= 8 +typedef long long int64_t; +#undef H5_SIZEOF_INT64_T +#define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG +#else +#error "nothing appropriate for int64_t" +#endif + +/* uint64_t type is used for fields for H5O_info_t. It may be + * defined in Posix.1g, otherwise it is defined here. + */ +#if H5_SIZEOF_UINT64_T >= 8 +#ifndef UINT64_MAX +#define UINT64_MAX ((uint64_t)-1) +#endif +#elif H5_SIZEOF_INT >= 8 +typedef unsigned uint64_t; +#define UINT64_MAX UINT_MAX +#undef H5_SIZEOF_UINT64_T +#define H5_SIZEOF_UINT64_T H5_SIZEOF_INT +#elif H5_SIZEOF_LONG >= 8 +typedef unsigned long uint64_t; +#define UINT64_MAX ULONG_MAX +#undef H5_SIZEOF_UINT64_T +#define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG +#elif H5_SIZEOF_LONG_LONG >= 8 +typedef unsigned long long uint64_t; +#define UINT64_MAX ULLONG_MAX +#undef H5_SIZEOF_UINT64_T +#define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG +#else +#error "nothing appropriate for uint64_t" +#endif + /* - * The sizes of file objects have their own types defined here, use a 64-bit - * type. + * The sizes of file objects have their own types defined here, use a minimum + * 64-bit type. */ #if H5_SIZEOF_LONG_LONG >= 8 H5_GCC_DIAG_OFF("long-long") typedef unsigned long long hsize_t; typedef signed long long hssize_t; H5_GCC_DIAG_ON("long-long") +#define PRIdHSIZE H5_PRINTF_LL_WIDTH "d" +#define PRIiHSIZE H5_PRINTF_LL_WIDTH "i" +#define PRIoHSIZE H5_PRINTF_LL_WIDTH "o" +#define PRIuHSIZE H5_PRINTF_LL_WIDTH "u" +#define PRIxHSIZE H5_PRINTF_LL_WIDTH "x" +#define PRIXHSIZE H5_PRINTF_LL_WIDTH "X" #define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG #define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG +#define HSIZE_UNDEF ULLONG_MAX #else #error "nothing appropriate for hsize_t" #endif -#define HSIZE_UNDEF ((hsize_t)(hssize_t)(-1)) /* * File addresses have their own types. */ #if H5_SIZEOF_INT >= 8 typedef unsigned haddr_t; -#define HADDR_UNDEF ((haddr_t)(-1)) +#define HADDR_UNDEF UINT_MAX #define H5_SIZEOF_HADDR_T H5_SIZEOF_INT #ifdef H5_HAVE_PARALLEL #define HADDR_AS_MPI_TYPE MPI_UNSIGNED #endif /* H5_HAVE_PARALLEL */ +#define PRIdHADDR "d" +#define PRIoHADDR "o" +#define PRIuHADDR "u" +#define PRIxHADDR "x" +#define PRIXHADDR "X" #elif H5_SIZEOF_LONG >= 8 typedef unsigned long haddr_t; -#define HADDR_UNDEF ((haddr_t)(long)(-1)) +#define HADDR_UNDEF ULONG_MAX #define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG #ifdef H5_HAVE_PARALLEL #define HADDR_AS_MPI_TYPE MPI_UNSIGNED_LONG #endif /* H5_HAVE_PARALLEL */ +#define PRIdHADDR "ld" +#define PRIoHADDR "lo" +#define PRIuHADDR "lu" +#define PRIxHADDR "lx" +#define PRIXHADDR "lX" #elif H5_SIZEOF_LONG_LONG >= 8 typedef unsigned long long haddr_t; -#define HADDR_UNDEF ((haddr_t)(long long)(-1)) +#define HADDR_UNDEF ULLONG_MAX #define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG_LONG #ifdef H5_HAVE_PARALLEL #define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT #endif /* H5_HAVE_PARALLEL */ +#define PRIdHADDR H5_PRINTF_LL_WIDTH "d" +#define PRIoHADDR H5_PRINTF_LL_WIDTH "o" +#define PRIuHADDR H5_PRINTF_LL_WIDTH "u" +#define PRIxHADDR H5_PRINTF_LL_WIDTH "x" +#define PRIXHADDR H5_PRINTF_LL_WIDTH "X" #else #error "nothing appropriate for haddr_t" #endif -#if H5_SIZEOF_HADDR_T == H5_SIZEOF_INT -#define H5_PRINTF_HADDR_FMT "%u" -#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG -#define H5_PRINTF_HADDR_FMT "%lu" -#elif H5_SIZEOF_HADDR_T == H5_SIZEOF_LONG_LONG -#define H5_PRINTF_HADDR_FMT "%" H5_PRINTF_LL_WIDTH "u" -#else -#error "nothing appropriate for H5_PRINTF_HADDR_FMT" -#endif -#define HADDR_MAX (HADDR_UNDEF - 1) +#define H5_PRINTF_HADDR_FMT "%" PRIuHADDR +#define HADDR_MAX (HADDR_UNDEF - 1) /* uint32_t type is used for creation order field for messages. It may be * defined in Posix.1g, otherwise it is defined here. @@ -245,46 +304,6 @@ typedef unsigned long uint32_t; #error "nothing appropriate for uint32_t" #endif -/* int64_t type is used for creation order field for links. It may be - * defined in Posix.1g, otherwise it is defined here. - */ -#if H5_SIZEOF_INT64_T >= 8 -#elif H5_SIZEOF_INT >= 8 -typedef int int64_t; -#undef H5_SIZEOF_INT64_T -#define H5_SIZEOF_INT64_T H5_SIZEOF_INT -#elif H5_SIZEOF_LONG >= 8 -typedef long int64_t; -#undef H5_SIZEOF_INT64_T -#define H5_SIZEOF_INT64_T H5_SIZEOF_LONG -#elif H5_SIZEOF_LONG_LONG >= 8 -typedef long long int64_t; -#undef H5_SIZEOF_INT64_T -#define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG -#else -#error "nothing appropriate for int64_t" -#endif - -/* uint64_t type is used for fields for H5O_info_t. It may be - * defined in Posix.1g, otherwise it is defined here. - */ -#if H5_SIZEOF_UINT64_T >= 8 -#elif H5_SIZEOF_INT >= 8 -typedef unsigned uint64_t; -#undef H5_SIZEOF_UINT64_T -#define H5_SIZEOF_UINT64_T H5_SIZEOF_INT -#elif H5_SIZEOF_LONG >= 8 -typedef unsigned long uint64_t; -#undef H5_SIZEOF_UINT64_T -#define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG -#elif H5_SIZEOF_LONG_LONG >= 8 -typedef unsigned long long uint64_t; -#undef H5_SIZEOF_UINT64_T -#define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG -#else -#error "nothing appropriate for uint64_t" -#endif - /* Common iteration orders */ typedef enum { H5_ITER_UNKNOWN = -1, /* Unknown order */ From 35e1e6877244157dfabd9d7b10cc09656637a71b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Mar 2021 12:00:21 -0600 Subject: [PATCH 18/66] Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup --- MANIFEST | 2 + c++/src/H5AbstractDs.h | 6 +- c++/src/H5CommonFG.h | 6 +- c++/src/H5Group.h | 6 +- c++/src/H5IdComponent.h | 6 +- config/gnu-cxxflags | 2 +- config/gnu-fflags | 2 +- fortran/src/H5match_types.c | 4 +- java/src/jni/exceptionImp.c | 33 +- java/src/jni/exceptionImp.h | 6 +- java/src/jni/h5Imp.h | 6 +- java/src/jni/h5aImp.c | 4 +- java/src/jni/h5aImp.h | 6 +- java/src/jni/h5dImp.c | 4 +- java/src/jni/h5dImp.h | 6 +- java/src/jni/h5eImp.h | 6 +- java/src/jni/h5fImp.h | 6 +- java/src/jni/h5gImp.h | 6 +- java/src/jni/h5iImp.h | 6 +- java/src/jni/h5jni.h | 27 +- java/src/jni/h5lImp.h | 6 +- java/src/jni/h5oImp.h | 6 +- java/src/jni/h5pACPLImp.h | 6 +- java/src/jni/h5pDAPLImp.h | 6 +- java/src/jni/h5pDCPLImp.h | 6 +- java/src/jni/h5pDXPLImp.h | 6 +- java/src/jni/h5pFAPLImp.h | 6 +- java/src/jni/h5pFCPLImp.h | 6 +- java/src/jni/h5pGAPLImp.h | 6 +- java/src/jni/h5pGCPLImp.h | 6 +- java/src/jni/h5pImp.h | 6 +- java/src/jni/h5pLAPLImp.h | 6 +- java/src/jni/h5pLCPLImp.h | 6 +- java/src/jni/h5pOCPLImp.h | 6 +- java/src/jni/h5pOCpyPLImp.h | 6 +- java/src/jni/h5pStrCPLImp.h | 6 +- java/src/jni/h5plImp.h | 6 +- java/src/jni/h5rImp.h | 6 +- java/src/jni/h5sImp.h | 6 +- java/src/jni/h5tImp.h | 6 +- java/src/jni/h5util.c | 482 ++++++++------------- java/src/jni/h5util.h | 4 +- java/src/jni/h5zImp.h | 6 +- java/src/jni/nativeData.h | 6 +- release_docs/RELEASE.txt | 9 +- src/H5B2int.c | 108 ++--- src/H5B2leaf.c | 10 +- src/H5C.c | 6 +- src/H5Clog_json.c | 2 +- src/H5Clog_trace.c | 2 +- src/H5Dchunk.c | 6 +- src/H5Dvirtual.c | 8 +- src/H5EA.c | 3 +- src/H5FDlog.c | 34 +- src/H5FDmulti.c | 6 +- src/H5FDs3comms.c | 6 +- src/H5FDsplitter.c | 2 +- src/H5FDstdio.c | 2 +- src/H5FSsection.c | 4 +- src/H5HFdbg.c | 8 +- src/H5HFman.c | 10 +- src/H5HFsection.c | 2 +- src/H5HL.c | 4 +- src/H5MF.c | 32 +- src/H5Oalloc.c | 4 +- src/H5Obtreek.c | 2 +- src/H5Oprivate.h | 14 +- src/H5Opublic.h | 2 +- src/H5PB.c | 8 +- src/H5Pdapl.c | 8 +- src/H5Pdcpl.c | 2 +- src/H5Pfapl.c | 6 +- src/H5SL.c | 20 +- src/H5Shyper.c | 16 +- src/H5system.c | 6 +- src/H5timer.c | 8 +- src/H5trace.c | 2 +- test/cache_common.h | 6 +- test/external_common.h | 6 +- test/external_fname.h | 6 +- test/swmr_common.h | 6 +- tools/lib/h5diff.h | 6 +- tools/lib/h5diff_array.c | 92 ++-- tools/lib/h5tools.c | 2 +- tools/lib/h5tools.h | 6 +- tools/lib/h5tools_dump.h | 6 +- tools/lib/h5tools_error.h | 6 +- tools/lib/h5tools_ref.h | 4 +- tools/lib/h5tools_str.c | 2 +- tools/lib/h5tools_str.h | 6 +- tools/lib/h5tools_utils.c | 12 +- tools/lib/h5tools_utils.h | 6 +- tools/lib/h5trav.h | 6 +- tools/lib/io_timer.h | 6 +- tools/lib/ph5diff.h | 6 +- tools/src/h5diff/h5diff_common.c | 36 +- tools/src/h5diff/h5diff_common.h | 6 +- tools/src/h5dump/h5dump.h | 6 +- tools/src/h5dump/h5dump_ddl.h | 6 +- tools/src/h5dump/h5dump_defines.h | 6 +- tools/src/h5dump/h5dump_extern.h | 6 +- tools/src/h5dump/h5dump_xml.h | 6 +- tools/src/h5import/h5import.c | 4 +- tools/src/h5import/h5import.h | 6 +- tools/src/h5ls/h5ls.c | 2 +- tools/src/h5repack/h5repack.h | 6 +- tools/src/misc/h5debug.c | 4 +- tools/src/misc/h5repart.c | 2 +- tools/test/h5diff/CMakeTests.cmake | 8 + tools/test/h5diff/testfiles/h5diff_10.txt | 12 + tools/test/h5diff/testfiles/h5diff_600.txt | 12 + tools/test/h5diff/testfiles/h5diff_603.txt | 12 + tools/test/h5diff/testfiles/h5diff_606.txt | 12 + tools/test/h5diff/testfiles/h5diff_612.txt | 12 + tools/test/h5diff/testfiles/h5diff_615.txt | 12 + tools/test/h5diff/testfiles/h5diff_621.txt | 12 + tools/test/h5diff/testfiles/h5diff_622.txt | 12 + tools/test/h5diff/testfiles/h5diff_623.txt | 12 + tools/test/h5diff/testfiles/h5diff_624.txt | 12 + tools/test/h5diff/testfiles/h5diff_830.txt | 30 ++ tools/test/h5diff/testh5diff.sh.in | 6 + tools/test/h5dump/CMakeTests.cmake | 8 +- tools/test/h5dump/h5dumpgentest.c | 52 +++ tools/test/h5dump/testh5dump.sh.in | 6 +- tools/test/h5jam/getub.c | 5 +- tools/test/perform/chunk_cache.c | 16 +- tools/test/perform/pio_perf.h | 6 +- tools/test/perform/pio_standalone.h | 4 +- tools/test/perform/sio_engine.c | 2 +- tools/test/perform/sio_perf.c | 4 +- tools/test/perform/sio_perf.h | 6 +- tools/test/perform/sio_standalone.h | 4 +- 132 files changed, 929 insertions(+), 764 deletions(-) create mode 100644 tools/test/h5diff/testfiles/h5diff_830.txt diff --git a/MANIFEST b/MANIFEST index 0f2c29ec6f5..105be0258e0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1943,6 +1943,7 @@ ./tools/testfiles/tintsnodata.h5 ./tools/testfiles/tlarge_objname.ddl ./tools/testfiles/tlarge_objname.h5 +./tools/testfiles/tldouble.ddl ./tools/testfiles/tldouble.h5 ./tools/testfiles/tlonglinks.ddl ./tools/testfiles/tlonglinks.h5 @@ -2452,6 +2453,7 @@ ./tools/test/h5diff/testfiles/h5diff_80.txt ./tools/test/h5diff/testfiles/h5diff_800.txt ./tools/test/h5diff/testfiles/h5diff_801.txt +./tools/test/h5diff/testfiles/h5diff_830.txt ./tools/test/h5diff/testfiles/h5diff_90.txt ./tools/test/h5diff/testfiles/h5diff_100.txt ./tools/test/h5diff/testfiles/h5diff_101.txt diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index fe6e033c3af..cb43c73a39f 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __AbstractDs_H -#define __AbstractDs_H +#ifndef AbstractDs_H +#define AbstractDs_H namespace H5 { @@ -81,4 +81,4 @@ class H5_DLLCPP AbstractDs { }; // end of AbstractDs } // namespace H5 -#endif // __AbstractDs_H +#endif // AbstractDs_H diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index 2e5ccf3b4d5..368883bc9be 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __CommonFG_H -#define __CommonFG_H +#ifndef CommonFG_H +#define CommonFG_H namespace H5 { @@ -83,7 +83,7 @@ class H5_DLLCPP CommonFG { }; // end of CommonFG } // namespace H5 -#endif // __CommonFG_H +#endif // CommonFG_H /*************************************************************************** Design Note diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index ae5bb4aec3d..2a0f18e98a4 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __Group_H -#define __Group_H +#ifndef Group_H +#define Group_H namespace H5 { @@ -83,4 +83,4 @@ class H5_DLLCPP Group : public H5Object, public CommonFG { }; // end of Group } // namespace H5 -#endif // __Group_H +#endif // Group_H diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index b756a3d087e..4f7584915a8 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -12,8 +12,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef __IdComponent_H -#define __IdComponent_H +#ifndef IdComponent_H +#define IdComponent_H namespace H5 { @@ -113,4 +113,4 @@ class H5_DLLCPP IdComponent { }; // end class IdComponent } // namespace H5 -#endif // __IdComponent_H +#endif // IdComponent_H diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 3fe13d82ef4..cba8298293e 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -148,7 +148,7 @@ if test "X-g++" = "X-$cxx_vendor"; then # Enhanced Diagnostics # ######################## - if test $cc_vers_major -ge 10; then + if test $cxx_vers_major -ge 10; then NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" fi DIAGS_CXXFLAGS= diff --git a/config/gnu-fflags b/config/gnu-fflags index d4f876dc92a..ec4fcabdea6 100644 --- a/config/gnu-fflags +++ b/config/gnu-fflags @@ -109,7 +109,7 @@ if test "X-gfortran" = "X-$f9x_vendor"; then # Enhanced Diagnostics # ######################## - if test $cc_vers_major -ge 10; then + if test $f9x_vers_major -ge 10; then NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color" fi DIAGS_FCFLAGS= diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 2eb19814bea..f5c0fd5d2aa 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -70,8 +70,8 @@ initCfile(void) * help@hdfgroup.org. *\n\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\n\ \n\n\ -#ifndef _H5f90i_gen_H\n\ -#define _H5f90i_gen_H\n\ +#ifndef H5f90i_gen_H\n\ +#define H5f90i_gen_H\n\ \n\ /* This file is automatically generated by H5match_types.c at build time. */\n\ \n\ diff --git a/java/src/jni/exceptionImp.c b/java/src/jni/exceptionImp.c index e62caeea7ba..12ef0a1a0ad 100644 --- a/java/src/jni/exceptionImp.c +++ b/java/src/jni/exceptionImp.c @@ -262,11 +262,24 @@ H5JNIErrorClass(JNIEnv *env, const char *message, const char *className) * exception. */ jboolean -h5outOfMemory(JNIEnv *env, const char *functName) +h5outOfMemory(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/OutOfMemoryError"); + return H5JNIErrorClass(env, message, "java/lang/OutOfMemoryError"); } /* end h5outOfMemory() */ +/* + * Create and throw an 'AssertionError' + * + * Note: This routine never returns from the 'throw', + * and the Java native method immediately raises the + * exception. + */ +jboolean +h5assertion(JNIEnv *env, const char *message) +{ + return H5JNIErrorClass(env, message, "java/lang/AssertionError"); +} /* end h5assertion() */ + /* * A fatal error in a JNI call * Create and throw an 'InternalError' @@ -276,9 +289,9 @@ h5outOfMemory(JNIEnv *env, const char *functName) * exception. */ jboolean -h5JNIFatalError(JNIEnv *env, const char *functName) +h5JNIFatalError(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/InternalError"); + return H5JNIErrorClass(env, message, "java/lang/InternalError"); } /* end h5JNIFatalError() */ /* @@ -290,9 +303,9 @@ h5JNIFatalError(JNIEnv *env, const char *functName) * exception. */ jboolean -h5nullArgument(JNIEnv *env, const char *functName) +h5nullArgument(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/NullPointerException"); + return H5JNIErrorClass(env, message, "java/lang/NullPointerException"); } /* end h5nullArgument() */ /* @@ -304,9 +317,9 @@ h5nullArgument(JNIEnv *env, const char *functName) * exception. */ jboolean -h5badArgument(JNIEnv *env, const char *functName) +h5badArgument(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/IllegalArgumentException"); + return H5JNIErrorClass(env, message, "java/lang/IllegalArgumentException"); } /* end h5badArgument() */ /* @@ -318,9 +331,9 @@ h5badArgument(JNIEnv *env, const char *functName) * exception. */ jboolean -h5unimplemented(JNIEnv *env, const char *functName) +h5unimplemented(JNIEnv *env, const char *message) { - return H5JNIErrorClass(env, functName, "java/lang/UnsupportedOperationException"); + return H5JNIErrorClass(env, message, "java/lang/UnsupportedOperationException"); } /* end h5unimplemented() */ /* h5raiseException(). This routine is called to generate diff --git a/java/src/jni/exceptionImp.h b/java/src/jni/exceptionImp.h index 72edf4c5908..38469dfd7b4 100644 --- a/java/src/jni/exceptionImp.h +++ b/java/src/jni/exceptionImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_exception */ -#ifndef _Included_hdf_hdf5lib_H5_exception -#define _Included_hdf_hdf5lib_H5_exception +#ifndef Included_hdf_hdf5lib_H5_exception +#define Included_hdf_hdf5lib_H5_exception #ifdef __cplusplus extern "C" { @@ -67,4 +67,4 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_exceptions_HDF5LibraryException__1getMi } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_exception */ +#endif /* Included_hdf_hdf5lib_H5_exception */ diff --git a/java/src/jni/h5Imp.h b/java/src/jni/h5Imp.h index 776f295a06b..8ab766215a4 100644 --- a/java/src/jni/h5Imp.h +++ b/java/src/jni/h5Imp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5 */ -#ifndef _Included_hdf_hdf5lib_H5_H5 -#define _Included_hdf_hdf5lib_H5_H5 +#ifndef Included_hdf_hdf5lib_H5_H5 +#define Included_hdf_hdf5lib_H5_H5 #ifdef __cplusplus extern "C" { @@ -82,4 +82,4 @@ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5is_1library_1threadsafe(JNIEnv } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5 */ +#endif /* Included_hdf_hdf5lib_H5_H5 */ diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c index f0727328164..f06075c7d5f 100644 --- a/java/src/jni/h5aImp.c +++ b/java/src/jni/h5aImp.c @@ -1133,7 +1133,7 @@ H5AreadVL_asstr(JNIEnv *env, hid_t aid, hid_t tid, jobjectArray buf) for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, aid, tid, &(((char *)readBuf)[i * typeSize]), typeSize, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, aid, tid, &(((char *)readBuf)[i * typeSize]), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) @@ -1425,7 +1425,7 @@ Java_hdf_hdf5lib_H5_H5Aread_1reg_1ref(JNIEnv *env, jclass clss, jlong attr_id, j for (i = 0; i < n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)attr_id, (hid_t)mem_type_id, ref_data[i], 0, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)attr_id, (hid_t)mem_type_id, ref_data[i], 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5aImp.h b/java/src/jni/h5aImp.h index 3d9a230c992..aee0e40fc75 100644 --- a/java/src/jni/h5aImp.h +++ b/java/src/jni/h5aImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5A */ -#ifndef _Included_hdf_hdf5lib_H5_H5A -#define _Included_hdf_hdf5lib_H5_H5A +#ifndef Included_hdf_hdf5lib_H5_H5A +#define Included_hdf_hdf5lib_H5_H5A #ifdef __cplusplus extern "C" { @@ -375,4 +375,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Aiterate_1by_1name(JNIEnv *, jclass } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5A */ +#endif /* Included_hdf_hdf5lib_H5_H5A */ diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 0fd57ff3e29..24d07147a1a 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1278,7 +1278,7 @@ H5DreadVL_asstr(JNIEnv *env, hid_t did, hid_t tid, hid_t mem_sid, hid_t file_sid for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, did, tid, &(((char *)readBuf)[i * typeSize]), typeSize, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, did, tid, &(((char *)readBuf)[i * typeSize]), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) @@ -1657,7 +1657,7 @@ Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref(JNIEnv *env, jclass clss, jlong dataset_id for (i = 0; i < n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, &ref_data[i], 0, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, &ref_data[i], 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5dImp.h b/java/src/jni/h5dImp.h index 61dfeaa2414..e339dadd000 100644 --- a/java/src/jni/h5dImp.h +++ b/java/src/jni/h5dImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5D */ -#ifndef _Included_hdf_hdf5lib_H5_H5D -#define _Included_hdf_hdf5lib_H5_H5D +#ifndef Included_hdf_hdf5lib_H5_H5D +#define Included_hdf_hdf5lib_H5_H5D #ifdef __cplusplus extern "C" { @@ -322,4 +322,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Drefresh(JNIEnv *, jclass, jlong); } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5D */ +#endif /* Included_hdf_hdf5lib_H5_H5D */ diff --git a/java/src/jni/h5eImp.h b/java/src/jni/h5eImp.h index 3133ca90715..95e43fa6d20 100644 --- a/java/src/jni/h5eImp.h +++ b/java/src/jni/h5eImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5E */ -#ifndef _Included_hdf_hdf5lib_H5_H5E -#define _Included_hdf_hdf5lib_H5_H5E +#ifndef Included_hdf_hdf5lib_H5_H5E +#define Included_hdf_hdf5lib_H5_H5E #ifdef __cplusplus extern "C" { @@ -144,4 +144,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Ewalk2(JNIEnv *, jclass, jlong, jlo } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5E */ +#endif /* Included_hdf_hdf5lib_H5_H5E */ diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index d1f466b4772..f9790b6e0ec 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5F */ -#ifndef _Included_hdf_hdf5lib_H5_H5F -#define _Included_hdf_hdf5lib_H5_H5F +#ifndef Included_hdf_hdf5lib_H5_H5F +#define Included_hdf_hdf5lib_H5_H5F #ifdef __cplusplus extern "C" { @@ -222,4 +222,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Fset_1libver_1bounds(JNIEnv *, jcla } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5F */ +#endif /* Included_hdf_hdf5lib_H5_H5F */ diff --git a/java/src/jni/h5gImp.h b/java/src/jni/h5gImp.h index 4b0cb4d0e59..b7130ed13a5 100644 --- a/java/src/jni/h5gImp.h +++ b/java/src/jni/h5gImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5G */ -#ifndef _Included_hdf_hdf5lib_H5_H5G -#define _Included_hdf_hdf5lib_H5_H5G +#ifndef Included_hdf_hdf5lib_H5_H5G +#define Included_hdf_hdf5lib_H5_H5G #ifdef __cplusplus extern "C" { @@ -96,4 +96,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Grefresh(JNIEnv *, jclass, jlong); } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5G */ +#endif /* Included_hdf_hdf5lib_H5_H5G */ diff --git a/java/src/jni/h5iImp.h b/java/src/jni/h5iImp.h index ed543035b00..08d5fa1c9ff 100644 --- a/java/src/jni/h5iImp.h +++ b/java/src/jni/h5iImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5I */ -#ifndef _Included_hdf_hdf5lib_H5_H5I -#define _Included_hdf_hdf5lib_H5_H5I +#ifndef Included_hdf_hdf5lib_H5_H5I +#define Included_hdf_hdf5lib_H5_H5I #ifdef __cplusplus extern "C" { @@ -130,4 +130,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Idestroy_1type(JNIEnv *, jclass, ji } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5I */ +#endif /* Included_hdf_hdf5lib_H5_H5I */ diff --git a/java/src/jni/h5jni.h b/java/src/jni/h5jni.h index 78fc92abd6f..3750f8be585 100644 --- a/java/src/jni/h5jni.h +++ b/java/src/jni/h5jni.h @@ -21,8 +21,8 @@ #include #include "H5private.h" -#ifndef _Included_h5jni -#define _Included_h5jni +#ifndef Included_h5jni +#define Included_h5jni #ifdef __cplusplus #define ENVPTR (env) @@ -266,9 +266,10 @@ extern jboolean h5JNIFatalError(JNIEnv *env, const char *); extern jboolean h5nullArgument(JNIEnv *env, const char *); extern jboolean h5badArgument(JNIEnv *env, const char *); extern jboolean h5outOfMemory(JNIEnv *env, const char *); +extern jboolean h5assertion(JNIEnv *env, const char *); +extern jboolean h5unimplemented(JNIEnv *env, const char *); extern jboolean h5libraryError(JNIEnv *env); extern jboolean h5raiseException(JNIEnv *env, const char *, const char *); -extern jboolean h5unimplemented(JNIEnv *env, const char *functName); /* * The following macros are to facilitate immediate cleanup+return @@ -304,21 +305,27 @@ extern jboolean h5unimplemented(JNIEnv *env, const char *functName); goto done; \ } while (0) -#define H5_LIBRARY_ERROR(env) \ +#define H5_ASSERTION_ERROR(env, message) \ do { \ - h5libraryError(env); \ + h5assertion(env, message); \ goto done; \ } while (0) -#define H5_RAISE_EXCEPTION(env, message, exception) \ +#define H5_UNIMPLEMENTED(env, message) \ do { \ - h5raiseException(env, message, exception); \ + h5unimplemented(env, message); \ goto done; \ } while (0) -#define H5_UNIMPLEMENTED(env, message) \ +#define H5_LIBRARY_ERROR(env) \ do { \ - h5unimplemented(env, message); \ + h5libraryError(env); \ + goto done; \ + } while (0) + +#define H5_RAISE_EXCEPTION(env, message, exception) \ + do { \ + h5raiseException(env, message, exception); \ goto done; \ } while (0) @@ -334,4 +341,4 @@ extern jobject create_H5G_info_t(JNIEnv *env, H5G_info_t group_info); } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_h5jni */ +#endif /* Included_h5jni */ diff --git a/java/src/jni/h5lImp.h b/java/src/jni/h5lImp.h index 134ed1762f4..85aff038f24 100644 --- a/java/src/jni/h5lImp.h +++ b/java/src/jni/h5lImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5_H5L */ -#ifndef _Included_hdf_hdf5lib_H5_H5L -#define _Included_hdf_hdf5lib_H5_H5L +#ifndef Included_hdf_hdf5lib_H5_H5L +#define Included_hdf_hdf5lib_H5_H5L #ifdef __cplusplus extern "C" { @@ -170,4 +170,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Lunregister(JNIEnv *, jclass, jint) } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5L */ +#endif /* Included_hdf_hdf5lib_H5_H5L */ diff --git a/java/src/jni/h5oImp.h b/java/src/jni/h5oImp.h index 2ddf7a2ebac..26a16c4ef5c 100644 --- a/java/src/jni/h5oImp.h +++ b/java/src/jni/h5oImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5_H5O */ -#ifndef _Included_hdf_hdf5lib_H5_H5O -#define _Included_hdf_hdf5lib_H5_H5O +#ifndef Included_hdf_hdf5lib_H5_H5O +#define Included_hdf_hdf5lib_H5_H5O #ifdef __cplusplus extern "C" { @@ -193,4 +193,4 @@ JNIEXPORT jboolean JNICALL Java_hdf_hdf5lib_H5_H5Oare_1mdc_1flushes_1disabled(JN } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5O */ +#endif /* Included_hdf_hdf5lib_H5_H5O */ diff --git a/java/src/jni/h5pACPLImp.h b/java/src/jni/h5pACPLImp.h index 8d9bf7d29ab..15fcf33b949 100644 --- a/java/src/jni/h5pACPLImp.h +++ b/java/src/jni/h5pACPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PACPL -#define _Included_hdf_hdf5lib_H5_H5PACPL +#ifndef Included_hdf_hdf5lib_H5_H5PACPL +#define Included_hdf_hdf5lib_H5_H5PACPL #include @@ -23,4 +23,4 @@ extern "C" { } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PACPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PACPL */ diff --git a/java/src/jni/h5pDAPLImp.h b/java/src/jni/h5pDAPLImp.h index 353f652426a..bf11fef9bcf 100644 --- a/java/src/jni/h5pDAPLImp.h +++ b/java/src/jni/h5pDAPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PDAPL -#define _Included_hdf_hdf5lib_H5_H5PDAPL +#ifndef Included_hdf_hdf5lib_H5_H5PDAPL +#define Included_hdf_hdf5lib_H5_H5PDAPL #include @@ -93,4 +93,4 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Pget_1virtual_1printf_1gap(JNIEnv } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PDAPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PDAPL */ diff --git a/java/src/jni/h5pDCPLImp.h b/java/src/jni/h5pDCPLImp.h index 302019f2845..46d1cc3d763 100644 --- a/java/src/jni/h5pDCPLImp.h +++ b/java/src/jni/h5pDCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PDCPL -#define _Included_hdf_hdf5lib_H5_H5PDCPL +#ifndef Included_hdf_hdf5lib_H5_H5PDCPL +#define Included_hdf_hdf5lib_H5_H5PDCPL #include @@ -320,4 +320,4 @@ JNIEXPORT jstring JNICALL Java_hdf_hdf5lib_H5_H5Pget_1virtual_1prefix(JNIEnv *, } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PDCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PDCPL */ diff --git a/java/src/jni/h5pDXPLImp.h b/java/src/jni/h5pDXPLImp.h index 250c3f898de..21c40c4ea74 100644 --- a/java/src/jni/h5pDXPLImp.h +++ b/java/src/jni/h5pDXPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PDXPL -#define _Included_hdf_hdf5lib_H5_H5PDXPL +#ifndef Included_hdf_hdf5lib_H5_H5PDXPL +#define Included_hdf_hdf5lib_H5_H5PDXPL #include @@ -181,4 +181,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1btree_1ratios(JNIEnv *, jclas } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PDXPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PDXPL */ diff --git a/java/src/jni/h5pFAPLImp.h b/java/src/jni/h5pFAPLImp.h index 4bb48e2e390..3c5988f56a9 100644 --- a/java/src/jni/h5pFAPLImp.h +++ b/java/src/jni/h5pFAPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PFAPL -#define _Included_hdf_hdf5lib_H5_H5PFAPL +#ifndef Included_hdf_hdf5lib_H5_H5PFAPL +#define Included_hdf_hdf5lib_H5_H5PFAPL #include @@ -476,4 +476,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1libver_1bounds(JNIEnv *, jcla } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PFAPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PFAPL */ diff --git a/java/src/jni/h5pFCPLImp.h b/java/src/jni/h5pFCPLImp.h index eb827b9a963..78e98ae94b5 100644 --- a/java/src/jni/h5pFCPLImp.h +++ b/java/src/jni/h5pFCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PFCPL -#define _Included_hdf_hdf5lib_H5_H5PFCPL +#ifndef Included_hdf_hdf5lib_H5_H5PFCPL +#define Included_hdf_hdf5lib_H5_H5PFCPL #include @@ -177,4 +177,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1shared_1mesg_1phase_1change(J } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PFCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PFCPL */ diff --git a/java/src/jni/h5pGAPLImp.h b/java/src/jni/h5pGAPLImp.h index 478402a9868..9091ff8ab63 100644 --- a/java/src/jni/h5pGAPLImp.h +++ b/java/src/jni/h5pGAPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PGAPL -#define _Included_hdf_hdf5lib_H5_H5PGAPL +#ifndef Included_hdf_hdf5lib_H5_H5PGAPL +#define Included_hdf_hdf5lib_H5_H5PGAPL #include @@ -23,4 +23,4 @@ extern "C" { } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PGAPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PGAPL */ diff --git a/java/src/jni/h5pGCPLImp.h b/java/src/jni/h5pGCPLImp.h index 6a40908190a..5090c3a2088 100644 --- a/java/src/jni/h5pGCPLImp.h +++ b/java/src/jni/h5pGCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PGCPL -#define _Included_hdf_hdf5lib_H5_H5PGCPL +#ifndef Included_hdf_hdf5lib_H5_H5PGCPL +#define Included_hdf_hdf5lib_H5_H5PGCPL #include @@ -79,4 +79,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1link_1phase_1change(JNIEnv *, } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PGCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PGCPL */ diff --git a/java/src/jni/h5pImp.h b/java/src/jni/h5pImp.h index b80ce468e92..189e9d7b892 100644 --- a/java/src/jni/h5pImp.h +++ b/java/src/jni/h5pImp.h @@ -12,8 +12,8 @@ /* Header for class hdf_hdf5lib_H5_H5_H5P */ -#ifndef _Included_hdf_hdf5lib_H5_H5P -#define _Included_hdf_hdf5lib_H5_H5P +#ifndef Included_hdf_hdf5lib_H5_H5P +#define Included_hdf_hdf5lib_H5_H5P #include @@ -210,4 +210,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5__1H5Pclose_1class(JNIEnv *, jclass, j } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5P */ +#endif /* Included_hdf_hdf5lib_H5_H5P */ diff --git a/java/src/jni/h5pLAPLImp.h b/java/src/jni/h5pLAPLImp.h index 46adc0c70ac..8ddc8d26449 100644 --- a/java/src/jni/h5pLAPLImp.h +++ b/java/src/jni/h5pLAPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PLAPL -#define _Included_hdf_hdf5lib_H5_H5PLAPL +#ifndef Included_hdf_hdf5lib_H5_H5PLAPL +#define Included_hdf_hdf5lib_H5_H5PLAPL #include @@ -87,4 +87,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1elink_1acc_1flags(JNIEnv *, j } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PLAPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PLAPL */ diff --git a/java/src/jni/h5pLCPLImp.h b/java/src/jni/h5pLCPLImp.h index 7601adb6c55..4cdf6cd6c6f 100644 --- a/java/src/jni/h5pLCPLImp.h +++ b/java/src/jni/h5pLCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PLCPL -#define _Included_hdf_hdf5lib_H5_H5PLCPL +#ifndef Included_hdf_hdf5lib_H5_H5PLCPL +#define Included_hdf_hdf5lib_H5_H5PLCPL #include @@ -23,4 +23,4 @@ extern "C" { } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PLCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PLCPL */ diff --git a/java/src/jni/h5pOCPLImp.h b/java/src/jni/h5pOCPLImp.h index c16f1be0991..94d397bab5b 100644 --- a/java/src/jni/h5pOCPLImp.h +++ b/java/src/jni/h5pOCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5POCPL -#define _Included_hdf_hdf5lib_H5_H5POCPL +#ifndef Included_hdf_hdf5lib_H5_H5POCPL +#define Included_hdf_hdf5lib_H5_H5POCPL #include @@ -80,4 +80,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1attr_1creation_1order(JNIEnv } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5POCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5POCPL */ diff --git a/java/src/jni/h5pOCpyPLImp.h b/java/src/jni/h5pOCpyPLImp.h index d8682cbad6d..50ee972990c 100644 --- a/java/src/jni/h5pOCpyPLImp.h +++ b/java/src/jni/h5pOCpyPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5POCpyPL -#define _Included_hdf_hdf5lib_H5_H5POCpyPL +#ifndef Included_hdf_hdf5lib_H5_H5POCpyPL +#define Included_hdf_hdf5lib_H5_H5POCpyPL #include @@ -53,4 +53,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1copy_1object(JNIEnv *, jclass } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5POCpyPL */ +#endif /* Included_hdf_hdf5lib_H5_H5POCpyPL */ diff --git a/java/src/jni/h5pStrCPLImp.h b/java/src/jni/h5pStrCPLImp.h index 8a564943af4..c0a7ec25351 100644 --- a/java/src/jni/h5pStrCPLImp.h +++ b/java/src/jni/h5pStrCPLImp.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _Included_hdf_hdf5lib_H5_H5PStrCPL -#define _Included_hdf_hdf5lib_H5_H5PStrCPL +#ifndef Included_hdf_hdf5lib_H5_H5PStrCPL +#define Included_hdf_hdf5lib_H5_H5PStrCPL #include @@ -37,4 +37,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Pget_1char_1encoding(JNIEnv *, jcla } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PStrCPL */ +#endif /* Included_hdf_hdf5lib_H5_H5PStrCPL */ diff --git a/java/src/jni/h5plImp.h b/java/src/jni/h5plImp.h index b809efa2cd6..410a34fca15 100644 --- a/java/src/jni/h5plImp.h +++ b/java/src/jni/h5plImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5PL */ -#ifndef _Included_hdf_hdf5lib_H5_H5PL -#define _Included_hdf_hdf5lib_H5_H5PL +#ifndef Included_hdf_hdf5lib_H5_H5PL +#define Included_hdf_hdf5lib_H5_H5PL #ifdef __cplusplus extern "C" { @@ -87,4 +87,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLsize(JNIEnv *, jclass); } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5PL */ +#endif /* Included_hdf_hdf5lib_H5_H5PL */ diff --git a/java/src/jni/h5rImp.h b/java/src/jni/h5rImp.h index 3fe56b8f18f..62703239646 100644 --- a/java/src/jni/h5rImp.h +++ b/java/src/jni/h5rImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5R */ -#ifndef _Included_hdf_hdf5lib_H5_H5R -#define _Included_hdf_hdf5lib_H5_H5R +#ifndef Included_hdf_hdf5lib_H5_H5R +#define Included_hdf_hdf5lib_H5_H5R #ifdef __cplusplus extern "C" { @@ -70,4 +70,4 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Rget_1name(JNIEnv *, jclass, jlong } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5R */ +#endif /* Included_hdf_hdf5lib_H5_H5R */ diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index 1ceaf3f9710..a758d5af434 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5S */ -#ifndef _Included_hdf_hdf5lib_H5_H5S -#define _Included_hdf_hdf5lib_H5_H5S +#ifndef Included_hdf_hdf5lib_H5_H5S +#define Included_hdf_hdf5lib_H5_H5S #ifdef __cplusplus extern "C" { @@ -321,4 +321,4 @@ JNIEXPORT jlong JNICALL Java_hdf_hdf5lib_H5_H5Scombine_1select(JNIEnv *, jclass, } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5S */ +#endif /* Included_hdf_hdf5lib_H5_H5S */ diff --git a/java/src/jni/h5tImp.h b/java/src/jni/h5tImp.h index 4e14482ad06..b6355fbde49 100644 --- a/java/src/jni/h5tImp.h +++ b/java/src/jni/h5tImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5T */ -#ifndef _Included_hdf_hdf5lib_H5_H5T -#define _Included_hdf_hdf5lib_H5_H5T +#ifndef Included_hdf_hdf5lib_H5_H5T +#define Included_hdf_hdf5lib_H5_H5T #ifdef __cplusplus extern "C" { @@ -498,4 +498,4 @@ JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5Trefresh(JNIEnv *, jclass, jlong); } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5T */ +#endif /* Included_hdf_hdf5lib_H5_H5T */ diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 8174b78319a..c4021ec356e 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -52,16 +52,18 @@ void * edata; /* Local Prototypes */ /********************/ -static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); -static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); +static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, + int expand_data); +static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, + int expand_data); static int h5str_is_zero(const void *_mem, size_t size); static hid_t h5str_get_native_type(hid_t type); static hid_t h5str_get_little_endian_type(hid_t type); static hid_t h5str_get_big_endian_type(hid_t type); static htri_t h5str_detect_vlen(hid_t tid); static htri_t h5str_detect_vlen_str(hid_t tid); -static int h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, - hsize_t nelmts); +static int h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, + hsize_t nelmts); static int h5str_render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t block_nelmts); static int render_bin_output_region_data_blocks(FILE *stream, hid_t region_id, hid_t container, int ndims, @@ -181,13 +183,14 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ H5T_class_t tclass = H5T_NO_CLASS; const char delimiter[] = " ," H5_COMPOUND_BEGIN_INDICATOR H5_COMPOUND_END_INDICATOR H5_ARRAY_BEGIN_INDICATOR H5_ARRAY_END_INDICATOR H5_VLEN_BEGIN_INDICATOR H5_VLEN_END_INDICATOR; - size_t typeSize = 0; - hid_t mtid = H5I_INVALID_HID; - char * this_str = NULL; - char * token; - char * cptr = NULL; - int n; - size_t retVal = 0; + + size_t retVal = 0; + size_t typeSize = 0; + hid_t mtid = H5I_INVALID_HID; + char * this_str = NULL; + char * cptr = NULL; + char * token; + int n; if (!in_str) H5_NULL_ARGUMENT_ERROR(ENVONLY, "h5str_convert: in_str is NULL"); @@ -235,7 +238,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ case sizeof(long double): { long double tmp_ldouble = 0.0; - sscanf(token, "%Lf", &tmp_ldouble); + sscanf(token, "%Lg", &tmp_ldouble); HDmemcpy(cptr, &tmp_ldouble, sizeof(long double)); break; } @@ -635,6 +638,53 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ return retVal; } /* end h5str_convert */ +int +h5str_region_dataset(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_buf, int expand_data) +{ + H5S_sel_type region_type = H5S_SEL_ERROR; + hid_t region_obj = H5I_INVALID_HID; + hid_t region_sid = H5I_INVALID_HID; + char ref_name[1024]; + + int ret_value = FAIL; + + if ((region_obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, ref_buf)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if ((region_sid = H5Rget_region(container, H5R_DATASET_REGION, ref_buf)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (expand_data) { + if (H5Rget_name(region_obj, H5R_DATASET_REGION, ref_buf, (char *)ref_name, 1024) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (!h5str_append(out_str, ref_name)) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); + } + + if ((region_type = H5Sget_select_type(region_sid)) > H5S_SEL_ERROR) { + if (H5S_SEL_POINTS == region_type) { + if (h5str_dump_region_points(ENVONLY, out_str, region_sid, region_obj, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + else if (H5S_SEL_HYPERSLABS == region_type) { + if (h5str_dump_region_blocks(ENVONLY, out_str, region_sid, region_obj, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + } + + ret_value = SUCCEED; +done: + if (region_sid >= 0) + if (H5Sclose(region_sid) < 0) + H5_LIBRARY_ERROR(ENVONLY); + if (region_obj >= 0) + if (H5Dclose(region_obj) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + return ret_value; +} + /* * Prints the value of a data point into a string. * @@ -643,8 +693,7 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ * FAILURE: 0 */ size_t -h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, size_t in_buf_len, - int expand_data) +h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, int expand_data) { unsigned char *ucptr = (unsigned char *)in_buf; static char fmt_llong[8], fmt_ullong[8]; @@ -666,8 +715,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!(typeSize = H5Tget_size(tid))) H5_LIBRARY_ERROR(ENVONLY); - if (!(nsign = H5Tget_sign(tid))) - H5_LIBRARY_ERROR(ENVONLY); /* Build default formats for long long types */ if (!fmt_llong[0]) { @@ -676,7 +723,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); } /* end if */ - switch (tclass) { case H5T_FLOAT: { switch (typeSize) { @@ -937,7 +983,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_COMPOUND_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < (unsigned)n; i++) { offset = H5Tget_member_offset(tid, i); @@ -945,12 +991,12 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if ((mtid = H5Tget_member_type(tid, i)) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &cptr[offset], in_buf_len, expand_data)) + if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &cptr[offset], expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < (unsigned)n) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -958,7 +1004,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i } if (!h5str_append(out_str, H5_COMPOUND_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); break; } @@ -968,7 +1014,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (H5Tenum_nameof(tid, cptr, enum_name, sizeof enum_name) >= 0) { if (!h5str_append(out_str, enum_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } else { size_t i; @@ -993,74 +1039,13 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i case H5T_REFERENCE: { if (h5str_is_zero(cptr, typeSize)) { if (!h5str_append(out_str, "NULL")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); break; } if (H5R_DSET_REG_REF_BUF_SIZE == typeSize) { - H5S_sel_type region_type = H5S_SEL_ERROR; - hid_t region_obj = H5I_INVALID_HID; - hid_t region = H5I_INVALID_HID; - char ref_name[1024]; - - /* - * Dataset region reference -- - * show the type and the referenced object - */ - - /* Get name of the dataset the region reference points to using H5Rget_name */ - if ((region_obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, cptr)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((region = H5Rget_region(container, H5R_DATASET_REGION, cptr)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if (expand_data) { - if (H5S_SEL_ERROR == (region_type = H5Sget_select_type(region))) - H5_LIBRARY_ERROR(ENVONLY); - - if (H5S_SEL_POINTS == region_type) { - if (h5str_dump_region_points_data(ENVONLY, out_str, region, region_obj) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } - else { - if (h5str_dump_region_blocks_data(ENVONLY, out_str, region, region_obj) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } - } - else { - if (H5Rget_name(region_obj, H5R_DATASET_REGION, cptr, (char *)ref_name, 1024) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if (!h5str_append(out_str, ref_name)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - if (H5S_SEL_ERROR == (region_type = H5Sget_select_type(region))) - H5_LIBRARY_ERROR(ENVONLY); - - if (H5S_SEL_POINTS == region_type) { - if (!h5str_append(out_str, " REGION_TYPE POINT")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - if (h5str_dump_region_points(ENVONLY, out_str, region, region_obj) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } - else { - if (!h5str_append(out_str, " REGION_TYPE BLOCK")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - - if (h5str_dump_region_blocks(ENVONLY, out_str, region, region_obj) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } - } - - if (H5Sclose(region) < 0) - H5_LIBRARY_ERROR(ENVONLY); - region = H5I_INVALID_HID; - - if (H5Dclose(region_obj) < 0) - H5_LIBRARY_ERROR(ENVONLY); - region_obj = H5I_INVALID_HID; + if (h5str_region_dataset(ENVONLY, out_str, container, cptr, expand_data) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); } else if (H5R_OBJ_REF_BUF_SIZE == typeSize) { H5O_info_t oi; @@ -1098,7 +1083,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i int rank = 0; if (!h5str_append(out_str, H5_ARRAY_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if ((mtid = H5Tget_super(tid)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1116,17 +1101,16 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i total_elmts *= dims[i]; for (i = 0; i < total_elmts; i++) { - if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(cptr[i * baseSize]), in_buf_len, - expand_data)) + if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(cptr[i * baseSize]), expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < total_elmts) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(out_str, H5_ARRAY_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1147,20 +1131,20 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); if (!h5str_append(out_str, H5_VLEN_BEGIN_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < (unsigned)vl_buf->len; i++) { if (!h5str_sprintf(ENVONLY, out_str, container, mtid, &(((char *)vl_buf->p)[i * baseSize]), - vl_buf->len, expand_data)) + expand_data)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if ((i + 1) < (unsigned)vl_buf->len) if (!h5str_append(out_str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(out_str, H5_VLEN_END_INDICATOR)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (H5Tclose(mtid) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1202,7 +1186,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (this_str) { if (!h5str_append(out_str, this_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); HDfree(this_str); this_str = NULL; @@ -1303,12 +1287,12 @@ h5str_print_region_data_blocks(JNIEnv *env, hid_t region_id, h5str_t *str, int n for (numindex = 0; numindex < numelem; numindex++) { if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + numindex * type_size), - 0, 1)) + 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (numindex + 1 < numelem) if (!h5str_append(str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (jndx = 0; jndx < numelem; jndx++, region_elmtno++, ctx.cur_elmt++) */ } /* end for (blkndx = 0; blkndx < nblocks; blkndx++) */ @@ -1332,7 +1316,7 @@ h5str_print_region_data_blocks(JNIEnv *env, hid_t region_id, h5str_t *str, int n } /* end h5str_print_region_data_blocks */ int -h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) +h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t region_id, int expand_data) { hssize_t nblocks; hsize_t alloc_size; @@ -1341,29 +1325,31 @@ h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t reg hid_t type_id = H5I_INVALID_HID; int ndims = -1; int ret_value = FAIL; + int i; + char tmp_str[256]; /* * This function fails if the region does not have blocks. */ - H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region); } + H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region_space); } H5E_END_TRY; - if (nblocks < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) + if (nblocks <= 0) { + ret_value = SUCCEED; + goto done; + } + if ((ndims = H5Sget_simple_extent_ndims(region_space)) < 0) H5_LIBRARY_ERROR(ENVONLY); /* Print block information */ alloc_size = (hsize_t)nblocks * (hsize_t)ndims * 2 * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_blocks_data: failed to allocate region block buffer"); + if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_region_blocks: failed to allocate region block buffer"); - if (H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) + H5_LIBRARY_ERROR(ENVONLY); + if (expand_data) { if ((dtype = H5Dget_type(region_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); @@ -1372,65 +1358,19 @@ h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t reg if (h5str_print_region_data_blocks(ENVONLY, region_id, str, ndims, type_id, nblocks, ptdata) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* if (alloc_size == (hsize_t)((size_t)alloc_size)) */ - - ret_value = SUCCEED; - -done: - if (type_id >= 0) - H5Tclose(type_id); - if (dtype >= 0) - H5Tclose(dtype); - if (ptdata) - HDfree(ptdata); - - return ret_value; -} /* end h5str_dump_region_blocks_data */ - -static int -h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) -{ - hssize_t nblocks; - hsize_t alloc_size; - hsize_t *ptdata = NULL; - char tmp_str[256]; - int ndims = -1; - int ret_value = FAIL; - - UNUSED(region_id); - - /* - * This function fails if the region does not have blocks. - */ - H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region); } - H5E_END_TRY; - - if (nblocks < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - /* Print block information */ - alloc_size = (hsize_t)nblocks * (hsize_t)ndims * 2 * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - int i; - - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_blocks: failed to allocate region block buffer"); - - if (H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); + } + else { + if (!h5str_append(str, " REGION_TYPE BLOCK")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); if (!h5str_append(str, " {")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); for (i = 0; i < nblocks; i++) { int j; if (!h5str_append(str, " ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); /* Start coordinates and opposite corner */ for (j = 0; j < ndims; j++) { @@ -1440,7 +1380,7 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_i H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } for (j = 0; j < ndims; j++) { @@ -1451,22 +1391,25 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_i H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_blocks: HDsprintf failure"); if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } if (!h5str_append(str, ") ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); tmp_str[0] = '\0'; } if (!h5str_append(str, " }")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* if (alloc_size == (hsize_t)((size_t)alloc_size)) */ - + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); + } ret_value = SUCCEED; done: + if (type_id >= 0) + H5Tclose(type_id); + if (dtype >= 0) + H5Tclose(dtype); if (ptdata) HDfree(ptdata); @@ -1524,12 +1467,12 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, if (H5Sget_simple_extent_dims(mem_space, total_size, NULL) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 0, 1)) + if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (jndx + 1 < (size_t)npoints) if (!h5str_append(str, ", ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); } /* end for (jndx = 0; jndx < npoints; jndx++, elmtno++) */ ret_value = SUCCEED; @@ -1546,133 +1489,88 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, } /* end h5str_print_region_data_points */ int -h5str_dump_region_points_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) +h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t region_id, int expand_data) { - hssize_t npoints; hsize_t alloc_size; + hssize_t npoints = -1; hsize_t *ptdata = NULL; hid_t dtype = H5I_INVALID_HID; hid_t type_id = H5I_INVALID_HID; int ndims = -1; int ret_value = FAIL; + int i; + char tmp_str[256]; /* * This function fails if the region does not have points. */ - H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region); } + H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region_space); } H5E_END_TRY; - if (npoints < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) + if (npoints <= 0) { + ret_value = SUCCEED; + goto done; + } + if ((ndims = H5Sget_simple_extent_ndims(region_space)) < 0) H5_LIBRARY_ERROR(ENVONLY); /* Print point information */ - if (npoints > 0) { - alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR( - ENVONLY, "h5str_dump_region_points_data: failed to allocate region point data buffer"); - - if (H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((dtype = H5Dget_type(region_id)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if (h5str_print_region_data_points(ENVONLY, region, region_id, str, ndims, type_id, npoints, - ptdata) < 0) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } - } - - ret_value = SUCCEED; - -done: - if (type_id >= 0) - H5Tclose(type_id); - if (dtype >= 0) - H5Tclose(dtype); - if (ptdata) - HDfree(ptdata); - - return ret_value; -} /* end h5str_dump_region_points_data */ - -static int -h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_id) -{ - hssize_t npoints; - hsize_t alloc_size; - hsize_t *ptdata = NULL; - char tmp_str[256]; - int ndims = -1; - int ret_value = FAIL; - - UNUSED(region_id); - - /* - * This function fails if the region does not have points. - */ - H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region); } - H5E_END_TRY; - - if (npoints < 0) - H5_LIBRARY_ERROR(ENVONLY); + alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); + if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, + "h5str_dump_region_points: failed to allocate region point data buffer"); - if ((ndims = H5Sget_simple_extent_ndims(region)) < 0) + if (H5Sget_select_elem_pointlist(region_space, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) H5_LIBRARY_ERROR(ENVONLY); - /* Print point information */ - if (npoints > 0) { - int i; - - alloc_size = (hsize_t)npoints * (hsize_t)ndims * (hsize_t)sizeof(ptdata[0]); - if (alloc_size == (hsize_t)((size_t)alloc_size)) { - if (NULL == (ptdata = (hsize_t *)HDmalloc((size_t)alloc_size))) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, - "h5str_dump_region_points: failed to allocate region point buffer"); + if (expand_data) { + if ((dtype = H5Dget_type(region_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); - if (H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata) < 0) - H5_LIBRARY_ERROR(ENVONLY); + if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0) + H5_LIBRARY_ERROR(ENVONLY); - if (!h5str_append(str, " {")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + if (h5str_print_region_data_points(ENVONLY, region_space, region_id, str, ndims, type_id, npoints, + ptdata) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + else { + if (!h5str_append(str, " REGION_TYPE POINT")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); - for (i = 0; i < npoints; i++) { - int j; + if (!h5str_append(str, " {")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); - if (!h5str_append(str, " ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + for (i = 0; i < npoints; i++) { + int j; - for (j = 0; j < ndims; j++) { - tmp_str[0] = '\0'; + if (!h5str_append(str, " ")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); - if (HDsprintf(tmp_str, "%s%lu", j ? "," : "(", (unsigned long)(ptdata[i * ndims + j])) < - 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_points: HDsprintf failure"); + for (j = 0; j < ndims; j++) { + tmp_str[0] = '\0'; - if (!h5str_append(str, tmp_str)) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end for (j = 0; j < ndims; j++) */ + if (HDsprintf(tmp_str, "%s%lu", j ? "," : "(", (unsigned long)(ptdata[i * ndims + j])) < 0) + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_region_points: HDsprintf failure"); - if (!h5str_append(str, ") ")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end for (i = 0; i < npoints; i++) */ + if (!h5str_append(str, tmp_str)) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); + } /* end for (j = 0; j < ndims; j++) */ - if (!h5str_append(str, " }")) - CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } /* end if (alloc_size == (hsize_t)((size_t) alloc_size)) */ - } /* end if (npoints > 0) */ + if (!h5str_append(str, ") ")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); + } /* end for (i = 0; i < npoints; i++) */ + if (!h5str_append(str, " }")) + H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); + } ret_value = SUCCEED; done: + if (type_id >= 0) + H5Tclose(type_id); + if (dtype >= 0) + H5Tclose(dtype); if (ptdata) HDfree(ptdata); @@ -2195,8 +2093,9 @@ h5str_render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hs case H5T_REFERENCE: { if (H5Tequal(tid, H5T_STD_REF_DSETREG)) { + hid_t region_id = H5I_INVALID_HID; + hid_t region_space = H5I_INVALID_HID; H5S_sel_type region_type; - hid_t region_id, region_space; /* Region data */ for (block_index = 0; block_index < block_nelmts; block_index++) { @@ -2204,26 +2103,17 @@ h5str_render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hs if ((region_id = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, mem)) < 0) continue; + if ((region_space = H5Rget_region(container, H5R_DATASET_REGION, mem)) >= 0) { + region_type = H5Sget_select_type(region_space); + if (region_type == H5S_SEL_POINTS) + ret_value = + render_bin_output_region_points(stream, region_space, region_id, container); + else if (region_type == H5S_SEL_HYPERSLABS) + ret_value = + render_bin_output_region_blocks(stream, region_space, region_id, container); - if ((region_space = H5Rget_region(container, H5R_DATASET_REGION, mem)) < 0) { - H5Dclose(region_id); - continue; - } - - if ((region_type = H5Sget_select_type(region_space)) < 0) { H5Sclose(region_space); - H5Dclose(region_id); - continue; - } - - if (region_type == H5S_SEL_POINTS) - ret_value = - render_bin_output_region_points(stream, region_space, region_id, container); - else - ret_value = - render_bin_output_region_blocks(stream, region_space, region_id, container); - - H5Sclose(region_space); + } /* end if (region_space >= 0) */ H5Dclose(region_id); if (ret_value < 0) @@ -2756,7 +2646,7 @@ h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order) H5_LIBRARY_ERROR(ENVONLY); if (binary_order == 99) { - if (h5tools_dump_simple_data(ENVONLY, stream, dset, p_type, sm_buf, hs_nelmts) < 0) + if (h5str_dump_simple_data(ENVONLY, stream, dset, p_type, sm_buf, hs_nelmts) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); } else { @@ -2827,7 +2717,7 @@ H5Tdetect_variable_str(hid_t tid) } /* end H5Tdetect_variable_str */ static int -h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, hsize_t nelmts) +h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, void *_mem, hsize_t nelmts) { unsigned char *mem = (unsigned char *)_mem; h5str_t buffer; /* string into which to render */ @@ -2847,38 +2737,38 @@ h5tools_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, h5str_new(&buffer, 32 * size); if (!buffer.s) - H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5tools_dump_simple_data: failed to allocate buffer"); + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_simple_data: failed to allocate buffer"); - if (!(bytes_in = h5str_sprintf(ENVONLY, &buffer, container, type, memref, 0, 1))) + if (!(bytes_in = h5str_sprintf(ENVONLY, &buffer, container, type, memref, 1))) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - if (i > 0) { + if ((i > 0) && (bytes_in > 0)) { if (HDfprintf(stream, ", ") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); if (line_count >= H5TOOLS_TEXT_BLOCK) { line_count = 0; if (HDfprintf(stream, "\n") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); } } if (HDfprintf(stream, "%s", buffer.s) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); h5str_free(&buffer); } /* end for (i = 0; i < nelmts... */ if (HDfprintf(stream, "\n") < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5tools_dump_simple_data: HDfprintf failure"); + H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); done: if (buffer.s) h5str_free(&buffer); return ret_value; -} /* end h5tools_dump_simple_data */ +} /* end h5str_dump_simple_data */ /* * Utility Java APIs @@ -2932,7 +2822,7 @@ Java_hdf_hdf5lib_H5_H5AreadComplex(JNIEnv *env, jclass clss, jlong attr_id, jlon for (i = 0; i < (size_t)n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, attr_id, mem_type_id, readBuf + (i * size), 0, 0)) + if (!h5str_sprintf(ENVONLY, &h5str, attr_id, mem_type_id, readBuf + (i * size), 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) @@ -3476,7 +3366,7 @@ Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_exp H5_JNI_FATAL_ERROR(ENVONLY, "HDfopen failed"); if ((ret_val = h5str_dump_simple_dset(ENVONLY, stream, dataset_id, binary_order)) < 0) - H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_dset failed"); + H5_ASSERTION_ERROR(ENVONLY, "h5str_dump_simple_dset failed"); if (stream) { HDfclose(stream); diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 6bee2230faa..19415b4731a 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -42,11 +42,9 @@ extern char * h5str_append(h5str_t *str, const char *cstr); extern size_t h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_buf, size_t out_buf_offset); extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *in_buf, - size_t in_buf_len, int expand_data); + int expand_data); extern void h5str_array_free(char **strs, size_t len); extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order); -extern int h5str_dump_region_blocks_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); -extern int h5str_dump_region_points_data(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj); extern htri_t H5Tdetect_variable_str(hid_t tid); diff --git a/java/src/jni/h5zImp.h b/java/src/jni/h5zImp.h index 4e8982e033a..3092ae678ad 100644 --- a/java/src/jni/h5zImp.h +++ b/java/src/jni/h5zImp.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_H5_H5Z */ -#ifndef _Included_hdf_hdf5lib_H5_H5Z -#define _Included_hdf_hdf5lib_H5_H5Z +#ifndef Included_hdf_hdf5lib_H5_H5Z +#define Included_hdf_hdf5lib_H5_H5Z #ifdef __cplusplus extern "C" { @@ -46,4 +46,4 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Zget_1filter_1info(JNIEnv *, jclass } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_H5_H5Z */ +#endif /* Included_hdf_hdf5lib_H5_H5Z */ diff --git a/java/src/jni/nativeData.h b/java/src/jni/nativeData.h index 0150c75809d..9bf313fc300 100644 --- a/java/src/jni/nativeData.h +++ b/java/src/jni/nativeData.h @@ -13,8 +13,8 @@ #include /* Header for class hdf_hdf5lib_HDFNativeData */ -#ifndef _Included_hdf_hdf5lib_HDFNativeData -#define _Included_hdf_hdf5lib_HDFNativeData +#ifndef Included_hdf_hdf5lib_HDFNativeData +#define Included_hdf_hdf5lib_HDFNativeData #ifdef __cplusplus extern "C" { @@ -97,4 +97,4 @@ JNIEXPORT jbyteArray JNICALL Java_hdf_hdf5lib_HDFNativeData_byteToByte__B(JNIEnv } /* end extern "C" */ #endif /* __cplusplus */ -#endif /* _Included_hdf_hdf5lib_HDFNativeData */ +#endif /* Included_hdf_hdf5lib_HDFNativeData */ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 6b22c36e72e..4543ca49a86 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -256,7 +256,14 @@ Bug Fixes since HDF5-1.10.7 release =================================== Library ------- - - + - Remove underscores on header file guards + + Header file guards used a variety of underscores at the beginning the define. + + Removed all leading (some trailing) underscores from header file guards. + + (ADB - 2021/03/03, #361) + Java Library ------------ diff --git a/src/H5B2int.c b/src/H5B2int.c index ef90bbfd4ed..610da6c5f05 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -138,15 +138,15 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - uint16_t mid_record; /* Index of "middle" record in current node */ - uint16_t old_node_nrec; /* Number of records in internal node split */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + uint16_t mid_record; /* Index of "middle" record in current node */ + uint16_t old_node_nrec; /* Number of records in internal node split */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ herr_t ret_value = SUCCEED; /* Return value */ @@ -423,13 +423,13 @@ H5B2__split_root(H5B2_hdr_t *hdr) herr_t H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal redistrib */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ @@ -696,20 +696,20 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned idx) { H5B2_node_ptr_t *left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - H5B2_node_ptr_t * middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - haddr_t middle_addr; /* Address of middle child node */ - void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ - void * middle_child = NULL; /* Pointers to middle child node */ - uint16_t * left_nrec, *right_nrec; /* Pointers to child # of records */ - uint16_t * middle_nrec; /* Pointers to middle child # of records */ - uint8_t * left_native, *right_native; /* Pointers to childs' native records */ - uint8_t * middle_native; /* Pointers to middle child's native records */ - hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal split */ - hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */ - unsigned left_child_flags = H5AC__NO_FLAGS_SET, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + H5B2_node_ptr_t * middle_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + haddr_t middle_addr = HADDR_UNDEF; /* Address of middle child node */ + void * left_child = NULL, *right_child = NULL; /* Pointers to child nodes */ + void * middle_child = NULL; /* Pointers to middle child node */ + uint16_t *left_nrec, *right_nrec; /* Pointers to child # of records */ + uint16_t *middle_nrec; /* Pointers to middle child # of records */ + uint8_t * left_native, *right_native; /* Pointers to childs' native records */ + uint8_t * middle_native; /* Pointers to middle child's native records */ + hssize_t left_moved_nrec = 0, right_moved_nrec = 0; /* Number of records moved, for internal split */ + hssize_t middle_moved_nrec = 0; /* Number of records moved, for internal split */ + unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1122,16 +1122,16 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ - uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */ - uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - unsigned left_child_flags = H5AC__NO_FLAGS_SET, - right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ + uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */ + uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + unsigned left_child_flags = H5AC__NO_FLAGS_SET, + right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1297,19 +1297,19 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr, unsigned *parent_cache_info_flags_ptr, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t left_addr, right_addr; /* Addresses of left & right child nodes */ - haddr_t middle_addr; /* Address of middle child node */ - void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ - void * middle_child = NULL; /* Pointer to middle child node */ - uint16_t * left_nrec, *right_nrec; /* Pointers to left & right child # of records */ - uint16_t * middle_nrec; /* Pointer to middle child # of records */ - uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ - uint8_t * middle_native; /* Pointer to middle child's native records */ - H5B2_node_ptr_t * left_node_ptrs = NULL, - *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ - H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointer to child's node pointer info */ - hsize_t middle_moved_nrec; /* Number of records moved, for internal split */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t left_addr = HADDR_UNDEF, right_addr = HADDR_UNDEF; /* Addresses of left & right child nodes */ + haddr_t middle_addr = HADDR_UNDEF; /* Address of middle child node */ + void * left_child = NULL, *right_child = NULL; /* Pointers to left & right child nodes */ + void * middle_child = NULL; /* Pointer to middle child node */ + uint16_t *left_nrec, *right_nrec; /* Pointers to left & right child # of records */ + uint16_t *middle_nrec; /* Pointer to middle child # of records */ + uint8_t * left_native, *right_native; /* Pointers to left & right children's native records */ + uint8_t * middle_native; /* Pointer to middle child's native records */ + H5B2_node_ptr_t *left_node_ptrs = NULL, + *right_node_ptrs = NULL; /* Pointers to childs' node pointer info */ + H5B2_node_ptr_t *middle_node_ptrs = NULL; /* Pointer to child's node pointer info */ + hsize_t middle_moved_nrec; /* Number of records moved, for internal split */ unsigned left_child_flags = H5AC__NO_FLAGS_SET, right_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ unsigned middle_child_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting child nodes */ @@ -1933,7 +1933,7 @@ H5B2__update_flush_depend(H5B2_hdr_t *hdr, unsigned depth, const H5B2_node_ptr_t /* If the node is in the cache, check for retargeting its parent */ if (node_status & H5AC_ES__IN_CACHE) { - void ** parent_ptr; /* Pointer to child node's parent */ + void ** parent_ptr = NULL; /* Pointer to child node's parent */ hbool_t update_deps = FALSE; /* Whether to update flush dependencies */ /* Get child node pointer */ diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index 199e011304e..20ace84051b 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -607,11 +607,11 @@ herr_t H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal, unsigned *internal_flags_ptr, unsigned idx, void *swap_loc) { - const H5AC_class_t *child_class; /* Pointer to child node's class info */ - haddr_t child_addr; /* Address of child node */ - void * child = NULL; /* Pointer to child node */ - uint8_t * child_native; /* Pointer to child's native records */ - herr_t ret_value = SUCCEED; /* Return value */ + const H5AC_class_t *child_class; /* Pointer to child node's class info */ + haddr_t child_addr = HADDR_UNDEF; /* Address of child node */ + void * child = NULL; /* Pointer to child node */ + uint8_t * child_native; /* Pointer to child's native records */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE diff --git a/src/H5C.c b/src/H5C.c index f3f7840b6e8..4240e6ab3b4 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -2140,7 +2140,7 @@ H5C_resize_entry(void *thing, size_t new_size) * Function: H5C_pin_protected_entry() * * Purpose: Pin a protected cache entry. The entry must be protected - * at the time of call, and must be unpinned. + * at the time of call, and must be unpinned. * * Return: Non-negative on success/Negative on failure * @@ -2226,8 +2226,8 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign #ifdef H5_HAVE_PARALLEL hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */ #endif /* H5_HAVE_PARALLEL */ - hbool_t write_permitted; - hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ + hbool_t write_permitted = FALSE; + hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */ size_t empty_space; void * thing; H5C_cache_entry_t *entry_ptr; diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c index 6d048f16368..731d741d650 100644 --- a/src/H5Clog_json.c +++ b/src/H5Clog_json.c @@ -173,7 +173,7 @@ H5C__json_write_log_message(H5C_log_json_udata_t *json_udata) /* Write the log message and flush */ n_chars = HDstrlen(json_udata->message); - if ((int)n_chars != HDfprintf(json_udata->outfile, json_udata->message)) + if ((int)n_chars != HDfprintf(json_udata->outfile, "%s", json_udata->message)) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message") HDmemset((void *)(json_udata->message), 0, (size_t)(n_chars * sizeof(char))); diff --git a/src/H5Clog_trace.c b/src/H5Clog_trace.c index 8c79d7b1022..c30f79e3e6a 100644 --- a/src/H5Clog_trace.c +++ b/src/H5Clog_trace.c @@ -168,7 +168,7 @@ H5C__trace_write_log_message(H5C_log_trace_udata_t *trace_udata) /* Write the log message and flush */ n_chars = HDstrlen(trace_udata->message); - if ((int)n_chars != HDfprintf(trace_udata->outfile, trace_udata->message)) + if ((int)n_chars != HDfprintf(trace_udata->outfile, "%s", trace_udata->message)) HGOTO_ERROR(H5E_CACHE, H5E_LOGGING, FAIL, "error writing log message") HDmemset((void *)(trace_udata->message), 0, (size_t)(n_chars * sizeof(char))); diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 24cbbc0651e..c9dad0b945b 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -3146,9 +3146,9 @@ H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled) herr_t H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udata) { - H5D_rdcc_ent_t * ent = NULL; /* Cache entry */ - H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk); - unsigned idx; /* Index of chunk in cache, if present */ + H5D_rdcc_ent_t * ent = NULL; /* Cache entry */ + H5O_storage_chunk_t *sc = &(dset->shared->layout.storage.u.chunk); + unsigned idx = 0; /* Index of chunk in cache, if present */ hbool_t found = FALSE; /* In cache? */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index c824edf97c5..4519dd78e7b 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -394,8 +394,8 @@ H5D_virtual_check_min_dims(const H5D_t *dset) * Purpose: Store virtual dataset layout information, for new dataset * * Note: We assume here that the contents of the heap block cannot - * change! If this ever stops being the case we must change - * this code to allow overwrites of the heap block. -NAF + * change! If this ever stops being the case we must change + * this code to allow overwrites of the heap block. -NAF * * Return: Success: SUCCEED * Failure: FAIL @@ -2298,7 +2298,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id) hbool_t H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage) { - hbool_t ret_value; /* Return value */ + hbool_t ret_value = FALSE; /* Return value */ FUNC_ENTER_PACKAGE_NOERR @@ -2382,7 +2382,7 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info, H5O_storage_virtual_t *storage, cons hssize_t select_nelmts; /* Number of elements in selection */ hsize_t bounds_start[H5S_MAX_RANK]; /* Selection bounds start */ hsize_t bounds_end[H5S_MAX_RANK]; /* Selection bounds end */ - int rank; + int rank = 0; hbool_t bounds_init = FALSE; /* Whether bounds_start, bounds_end, and rank are valid */ size_t i, j, k; /* Local index variables */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5EA.c b/src/H5EA.c index 2c479256e2a..4d6b7c1167f 100644 --- a/src/H5EA.c +++ b/src/H5EA.c @@ -722,7 +722,8 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, H5EA_get(const H5EA_t *ea, hsize_t /* Local variables */ H5EA_hdr_t *hdr = ea->hdr; /* Header for EA */ void *thing = NULL; /* Pointer to the array metadata containing the array index we are interested in */ - H5EA__unprotect_func_t thing_unprot_func; /* Function pointer for unprotecting the array metadata */ + H5EA__unprotect_func_t thing_unprot_func = + NULL; /* Function pointer for unprotecting the array metadata */ /* * Check arguments. diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 07bd7948474..4032d3b2232 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -484,8 +484,8 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) #ifdef H5_HAVE_WIN32_API struct _BY_HANDLE_FILE_INFORMATION fileinfo; #endif - H5_timer_t open_timer; /* Timer for open() call */ - H5_timer_t stat_timer; /* Timer for stat() call */ + H5_timer_t open_timer = {{0}, {0}, {0}, FALSE}; /* Timer for open() call */ + H5_timer_t stat_timer = {{0}, {0}, {0}, FALSE}; /* Timer for stat() call */ h5_stat_t sb; H5FD_t * ret_value = NULL; /* Return value */ @@ -677,9 +677,9 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) static herr_t H5FD__log_close(H5FD_t *_file) { - H5FD_log_t *file = (H5FD_log_t *)_file; - H5_timer_t close_timer; /* Timer for close() call */ - herr_t ret_value = SUCCEED; /* Return value */ + H5FD_log_t *file = (H5FD_log_t *)_file; + H5_timer_t close_timer = {{0}, {0}, {0}, FALSE}; /* Timer for close() call */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1166,11 +1166,11 @@ static herr_t H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, void *buf /*out*/) { - H5FD_log_t * file = (H5FD_log_t *)_file; - size_t orig_size = size; /* Save the original size for later */ - haddr_t orig_addr = addr; - H5_timer_t read_timer; /* Timer for read operation */ - H5_timevals_t read_times; /* Elapsed time for read operation */ + H5FD_log_t * file = (H5FD_log_t *)_file; + size_t orig_size = size; /* Save the original size for later */ + haddr_t orig_addr = addr; + H5_timer_t read_timer = {{0}, {0}, {0}, FALSE}; /* Timer for read operation */ + H5_timevals_t read_times; /* Elapsed time for read operation */ #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ @@ -1380,11 +1380,11 @@ static herr_t H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, size_t size, const void *buf) { - H5FD_log_t * file = (H5FD_log_t *)_file; - size_t orig_size = size; /* Save the original size for later */ - haddr_t orig_addr = addr; - H5_timer_t write_timer; /* Timer for write operation */ - H5_timevals_t write_times; /* Elapsed time for write operation */ + H5FD_log_t * file = (H5FD_log_t *)_file; + size_t orig_size = size; /* Save the original size for later */ + haddr_t orig_addr = addr; + H5_timer_t write_timer = {{0}, {0}, {0}, FALSE}; /* Timer for write operation */ + H5_timevals_t write_times; /* Elapsed time for write operation */ #ifndef H5_HAVE_PREADWRITE H5_timer_t seek_timer; /* Timer for seek operation */ H5_timevals_t seek_times; /* Elapsed time for seek operation */ @@ -1604,8 +1604,8 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ /* Extend the file to make sure it's large enough */ if (!H5F_addr_eq(file->eoa, file->eof)) { - H5_timer_t trunc_timer; /* Timer for truncate operation */ - H5_timevals_t trunc_times; /* Elapsed time for truncate operation */ + H5_timer_t trunc_timer = {{0}, {0}, {0}, FALSE}; /* Timer for truncate operation */ + H5_timevals_t trunc_times; /* Elapsed time for truncate operation */ /* Start timer for truncate operation */ if (file->fa.flags & H5FD_LOG_TIME_TRUNCATE) { diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index c96b5956605..68440d0f793 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1822,8 +1822,8 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) { H5FD_multi_t * file = (H5FD_multi_t *)_file; int nerrors = 0; - H5FD_mem_t out_mt; - static const char *func = "H5FD_multi_unlock"; /* Function Name for error reporting */ + H5FD_mem_t out_mt = H5FD_MEM_DEFAULT; + static const char *func = "H5FD_multi_unlock"; /* Function Name for error reporting */ /* Clear the error stack */ H5Eclear2(H5E_DEFAULT); @@ -2002,7 +2002,7 @@ open_members(H5FD_multi_t *file) } H5_GCC_DIAG_ON("format-nonliteral") -#ifdef _H5private_H +#ifdef H5private_H /* * This is not related to the functionality of the driver code. * It is added here to trigger warning if HDF5 private definitions are included diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 1f23a685aa1..4b393650136 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -1964,7 +1964,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha buffer[buffer_i] = 0; /* collect a line from file */ - line_buffer = fgets(line_buffer, 128, file); + line_buffer = HDfgets(line_buffer, 128, file); if (line_buffer == NULL) goto done; /* end of file */ @@ -2063,9 +2063,9 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char * #endif #ifdef H5_HAVE_WIN32_API - ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("USERPROFILE")); + ret = HDsnprintf(awspath, 117, "%s/.aws/", HDgetenv("USERPROFILE")); #else - ret = HDsnprintf(awspath, 117, "%s/.aws/", getenv("HOME")); + ret = HDsnprintf(awspath, 117, "%s/.aws/", HDgetenv("HOME")); #endif if (ret < 0 || (size_t)ret >= 117) HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path") diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index f093262e9c8..84edc13a0ba 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -210,7 +210,7 @@ H5FD_splitter_init(void) { hid_t ret_value = H5I_INVALID_HID; - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(H5I_INVALID_HID) H5FD_SPLITTER_LOG_CALL(FUNC); diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index efc18022cb3..b3951278985 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -1201,7 +1201,7 @@ H5FD_stdio_unlock(H5FD_t *_file) return 0; } /* end H5FD_stdio_unlock() */ -#ifdef _H5private_H +#ifdef H5private_H /* * This is not related to the functionality of the driver code. * It is added here to trigger warning if HDF5 private definitions are included diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 2af0baa5056..f18f0f9f8b6 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -1115,8 +1115,8 @@ H5FS__sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Loop until no more merging */ if (fspace->sinfo->merge_list) { do { - H5SL_node_t * less_sect_node; /* Skip list node for section less than new section */ - H5SL_node_t * greater_sect_node; /* Skip list node for section greater than new section */ + H5SL_node_t *less_sect_node; /* Skip list node for section less than new section */ + H5SL_node_t *greater_sect_node = NULL; /* Skip list node for section greater than new section */ H5FS_section_info_t * tmp_sect; /* Temporary free space section */ H5FS_section_class_t *tmp_sect_cls; /* Temporary section's class */ hbool_t greater_sect_node_valid = FALSE; /* Indicate if 'greater than' section node is valid */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index f7fde6fe817..60fff22edd8 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -684,10 +684,10 @@ herr_t H5HF_iblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, haddr_t hdr_addr, unsigned nrows) { - H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */ - H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */ - hbool_t did_protect; /* Whether we protected the indirect block or not */ - herr_t ret_value = SUCCEED; /* Return value */ + H5HF_hdr_t * hdr = NULL; /* Fractal heap header info */ + H5HF_indirect_t *iblock = NULL; /* Fractal heap direct block info */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5HFman.c b/src/H5HFman.c index f978d7cebfa..d26c145f8de 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -297,9 +297,9 @@ H5HF__man_op_real(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void * * H5AC__NO_FLAGS_SET or * H5AC__READ_ONLY_FLAG */ - haddr_t dblock_addr; /* Direct block address */ + haddr_t dblock_addr = HADDR_UNDEF; /* Direct block address */ size_t dblock_size; /* Direct block size */ - unsigned dblock_cache_flags; /* Flags for unprotecting direct block */ + unsigned dblock_cache_flags = 0; /* Flags for unprotecting direct block */ hsize_t obj_off; /* Object's offset in heap */ size_t obj_len; /* Object's length in heap */ size_t blk_off; /* Offset of object in block */ @@ -545,9 +545,9 @@ H5HF__man_op(H5HF_hdr_t *hdr, const uint8_t *id, H5HF_operator_t op, void *op_da herr_t H5HF__man_remove(H5HF_hdr_t *hdr, const uint8_t *id) { - H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ - H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ - hbool_t did_protect; /* Whether we protected the indirect block or not */ + H5HF_free_section_t *sec_node = NULL; /* Pointer to free space section for block */ + H5HF_indirect_t * iblock = NULL; /* Pointer to indirect block */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ hsize_t obj_off; /* Object's offset in heap */ size_t obj_len; /* Object's length in heap */ size_t dblock_size; /* Direct block size */ diff --git a/src/H5HFsection.c b/src/H5HFsection.c index c33f09f002d..ffd3a18917b 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -2474,7 +2474,7 @@ H5HF__sect_indirect_init_rows(H5HF_hdr_t *hdr, H5HF_free_section_t *sect, hbool_ /* Add an indirect section for each indirect block in the row */ for (v = 0; v < row_entries; v++) { - hbool_t did_protect; /* Whether we protected the indirect block or not */ + hbool_t did_protect = FALSE; /* Whether we protected the indirect block or not */ /* Try to get the child section's indirect block, if it's available */ if (sect->sect_info.state == H5FS_SECT_LIVE) { diff --git a/src/H5HL.c b/src/H5HL.c index e2777790182..50d24c3deb2 100644 --- a/src/H5HL.c +++ b/src/H5HL.c @@ -930,7 +930,7 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, H5HL_get_size(H5F_t *f, haddr_t add H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ - H5HL_t * heap; /* Heap data structure */ + H5HL_t * heap = NULL; /* Heap data structure */ /* check arguments */ HDassert(f); @@ -977,7 +977,7 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, H5HL_heapsize(H5F_t *f, haddr_t add H5HL_cache_prfx_ud_t prfx_udata; /* User data for protecting local heap prefix */ H5HL_prfx_t * prfx = NULL; /* Local heap prefix */ - H5HL_t * heap; /* Heap data structure */ + H5HL_t * heap = NULL; /* Heap data structure */ /* check arguments */ HDassert(f); diff --git a/src/H5MF.c b/src/H5MF.c index f3f6c92f806..7602284487c 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -3026,7 +3026,7 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * On entry to this function, the raw data settle routine * (H5MF_settle_raw_data_fsm()) should have: * - * 1) Freed the aggregators. + * 1) Freed the aggregators. * * 2) Freed all file space allocated to the free space managers. * @@ -3062,12 +3062,12 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * 1) Verify that the free space manager(s) involved in file * space allocation for free space managers are still floating. * - * 2) Free the aggregators. + * 2) Free the aggregators. * - * 3) Reduce the EOA to the extent possible, and make note + * 3) Reduce the EOA to the extent possible, and make note * of the resulting value. This value will be stored * in the fsinfo superblock extension message and be used - * in the subsequent file open. + * in the subsequent file open. * * 4) Re-allocate space for any free space manager(s) that: * @@ -3101,8 +3101,8 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) * severe time pressure at the moment, the above brute * force solution is attractive. * - * 5) Make note of the EOA -- used for sanity checking on - * FSM shutdown. + * 5) Make note of the EOA -- used for sanity checking on + * FSM shutdown. * * Return: SUCCEED/FAIL * @@ -3114,16 +3114,16 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) herr_t H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) { - H5F_mem_page_t sm_fshdr_fs_type; /* small fs hdr fsm */ - H5F_mem_page_t sm_fssinfo_fs_type; /* small fs sinfo fsm */ - H5F_mem_page_t lg_fshdr_fs_type; /* large fs hdr fsm */ - H5F_mem_page_t lg_fssinfo_fs_type; /* large fs sinfo fsm */ - H5FS_t * sm_hdr_fspace = NULL; /* ptr to sm FSM hdr alloc FSM */ - H5FS_t * sm_sinfo_fspace = NULL; /* ptr to sm FSM sinfo alloc FSM */ - H5FS_t * lg_hdr_fspace = NULL; /* ptr to lg FSM hdr alloc FSM */ - H5FS_t * lg_sinfo_fspace = NULL; /* ptr to lg FSM sinfo alloc FSM */ - haddr_t eoa_pre_fsm_fsalloc; /* eoa pre file space allocation */ - /* for self referential FSMs */ + H5F_mem_page_t sm_fshdr_fs_type; /* small fs hdr fsm */ + H5F_mem_page_t sm_fssinfo_fs_type; /* small fs sinfo fsm */ + H5F_mem_page_t lg_fshdr_fs_type = H5F_MEM_PAGE_DEFAULT; /* large fs hdr fsm */ + H5F_mem_page_t lg_fssinfo_fs_type = H5F_MEM_PAGE_DEFAULT; /* large fs sinfo fsm */ + H5FS_t * sm_hdr_fspace = NULL; /* ptr to sm FSM hdr alloc FSM */ + H5FS_t * sm_sinfo_fspace = NULL; /* ptr to sm FSM sinfo alloc FSM */ + H5FS_t * lg_hdr_fspace = NULL; /* ptr to lg FSM hdr alloc FSM */ + H5FS_t * lg_sinfo_fspace = NULL; /* ptr to lg FSM sinfo alloc FSM */ + haddr_t eoa_pre_fsm_fsalloc; /* eoa pre file space allocation */ + /* for self referential FSMs */ haddr_t eoa_post_fsm_fsalloc; /* eoa post file space allocation */ /* for self referential FSMs */ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index a93506aec2e..f7da32af0ad 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -2005,8 +2005,8 @@ H5O_merge_null(H5F_t *f, H5O_t *oh) for (v = 0, curr_msg2 = &oh->mesg[0]; v < oh->nmesgs; v++, curr_msg2++) { if (u != v && H5O_NULL_ID == curr_msg2->type->id && curr_msg->chunkno == curr_msg2->chunkno) { - ssize_t adj_raw; /* Amount to adjust raw message pointer */ - size_t adj_raw_size; /* Amount to adjust raw message size */ + ssize_t adj_raw = 0; /* Amount to adjust raw message pointer */ + size_t adj_raw_size = 0; /* Amount to adjust raw message size */ /* Check for second message after first message */ if ((curr_msg->raw + curr_msg->raw_size) == diff --git a/src/H5Obtreek.c b/src/H5Obtreek.c index c8e036522f4..4eee3225023 100644 --- a/src/H5Obtreek.c +++ b/src/H5Obtreek.c @@ -198,7 +198,7 @@ static size_t H5O_btreek_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, const void H5_ATTR_UNUSED *_mesg) { - size_t ret_value; + size_t ret_value = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index a0b77635280..33672319d25 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -29,21 +29,21 @@ typedef struct H5O_t H5O_t; typedef struct H5O_fill_t H5O_fill_t; /* Include the public header file for this API */ -#include "H5Opublic.h" /* Object header functions */ +#include "H5Opublic.h" /* Object header functions */ /* Public headers needed by this file */ -#include "H5Dpublic.h" /* Dataset functions */ -#include "H5Lpublic.h" /* Link functions */ +#include "H5Dpublic.h" /* Dataset functions */ +#include "H5Lpublic.h" /* Link functions */ #include "H5Spublic.h" /* Dataspace functions */ /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ +#include "H5private.h" /* Generic Functions */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Fprivate.h" /* File access */ -#include "H5HGprivate.h" /* Global Heaps */ +#include "H5HGprivate.h" /* Global Heaps */ #include "H5SLprivate.h" /* Skip lists */ #include "H5Tprivate.h" /* Datatype functions */ -#include "H5Zprivate.h" /* I/O pipeline filters */ +#include "H5Zprivate.h" /* I/O pipeline filters */ /* Forward references of package typedefs */ typedef struct H5O_msg_class_t H5O_msg_class_t; diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 249479b7ab7..b8cd9400621 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -95,7 +95,7 @@ /* Types of objects in file */ typedef enum H5O_type_t { H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ - H5O_TYPE_GROUP, /* Object is a group */ + H5O_TYPE_GROUP, /* Object is a group */ H5O_TYPE_DATASET, /* Object is a dataset */ H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ diff --git a/src/H5PB.c b/src/H5PB.c index 5ea45d93d42..efaf1f9806b 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -682,8 +682,8 @@ H5PB_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void * haddr_t offset; haddr_t search_addr; /* Address of current page */ hsize_t num_touched_pages; /* Number of pages accessed */ - size_t access_size; - hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */ + size_t access_size = 0; + hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */ hsize_t i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -983,8 +983,8 @@ H5PB_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const haddr_t offset; haddr_t search_addr; /* Address of current page */ hsize_t num_touched_pages; /* Number of pages accessed */ - size_t access_size; - hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */ + size_t access_size = 0; + hbool_t bypass_pb = FALSE; /* Whether to bypass page buffering */ hsize_t i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index 7333ddf5dcc..0ef15193c30 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -865,8 +865,8 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, doub static herr_t H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size) { - uint64_t enc_value; /* Property value to encode */ - uint8_t **pp = (uint8_t **)_pp; + uint64_t enc_value = 0; /* Property value to encode */ + uint8_t **pp = (uint8_t **)_pp; unsigned enc_size; /* Size of encoded property */ FUNC_ENTER_STATIC_NOERR @@ -965,8 +965,8 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value) static herr_t H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size) { - uint64_t enc_value; /* Property value to encode */ - uint8_t **pp = (uint8_t **)_pp; + uint64_t enc_value = 0; /* Property value to encode */ + uint8_t **pp = (uint8_t **)_pp; unsigned enc_size; /* Size of encoded property */ FUNC_ENTER_STATIC_NOERR diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 51a311c61c0..e07d6e7bbe6 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -2215,7 +2215,7 @@ herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const char *src_dset_name, hid_t src_space_id) { - H5P_genplist_t * plist; /* Property list pointer */ + H5P_genplist_t * plist = NULL; /* Property list pointer */ H5O_layout_t virtual_layout; /* Layout information for setting virtual info */ H5S_t * vspace; /* Virtual dataset space selection */ H5S_t * src_space; /* Source dataset space selection */ diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 72686476396..1a69c1021cb 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4304,9 +4304,9 @@ herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, size_t *location_size, hbool_t *start_on_access) { - H5P_genplist_t *plist; /* Property list pointer */ - char * location_ptr; /* Pointer to location string */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* Property list pointer */ + char * location_ptr = NULL; /* Pointer to location string */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "i*b*s*z*b", plist_id, is_enabled, location, location_size, start_on_access); diff --git a/src/H5SL.c b/src/H5SL.c index 1502007a1e6..4d4c45864a7 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -746,10 +746,10 @@ H5SL_new_node(void *item, const void *key, uint32_t hashval) static H5SL_node_t * H5SL_insert_common(H5SL_t *slist, void *item, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - H5SL_node_t *prev; /* Node before the new node */ - uint32_t hashval = 0; /* Hash value for key */ - H5SL_node_t *ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + H5SL_node_t *prev; /* Node before the new node */ + uint32_t hashval = 0; /* Hash value for key */ + H5SL_node_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1378,9 +1378,9 @@ H5SL_remove_first(H5SL_t *slist) void * H5SL_search(H5SL_t *slist, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - uint32_t hashval = 0; /* Hash value for key */ - void * ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + uint32_t hashval = 0; /* Hash value for key */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -1676,9 +1676,9 @@ H5SL_greater(H5SL_t *slist, const void *key) H5SL_node_t * H5SL_find(H5SL_t *slist, const void *key) { - H5SL_node_t *x; /* Current node to examine */ - uint32_t hashval = 0; /* Hash value for key */ - H5SL_node_t *ret_value; /* Return value */ + H5SL_node_t *x; /* Current node to examine */ + uint32_t hashval = 0; /* Hash value for key */ + H5SL_node_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 5450408f857..d9afff734ba 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -1102,10 +1102,10 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) } /* end if */ /* Must be an irregular hyperslab selection */ else { - H5S_hyper_span_t * curr_span; /* Current hyperslab span node */ - H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ - hsize_t * abs_arr; /* Absolute hyperslab span position */ - int curr_dim; /* Temporary rank holder */ + H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */ + H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ + hsize_t * abs_arr; /* Absolute hyperslab span position */ + int curr_dim; /* Temporary rank holder */ /* Set the rank of the fastest changing dimension */ ndims = iter->rank; @@ -1294,10 +1294,10 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter) } /* end if */ /* Must be an irregular hyperslab selection */ else { - H5S_hyper_span_t * curr_span; /* Current hyperslab span node */ - H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ - hsize_t * abs_arr; /* Absolute hyperslab span position */ - int curr_dim; /* Temporary rank holder */ + H5S_hyper_span_t * curr_span = NULL; /* Current hyperslab span node */ + H5S_hyper_span_t **ispan; /* Iterator's hyperslab span nodes */ + hsize_t * abs_arr; /* Absolute hyperslab span position */ + int curr_dim; /* Temporary rank holder */ /* Set the rank of the fastest changing dimension */ ndims = iter->rank; diff --git a/src/H5system.c b/src/H5system.c index 9780428bf5e..38a69305cc4 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -698,8 +698,8 @@ H5_make_time(struct tm *tm) * VS 2015 is removed, with _get_timezone replacing it. */ long timezone = 0; -#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ - time_t ret_value; /* Return value */ +#endif /* defined(H5_HAVE_VISUAL_STUDIO) && (_MSC_VER >= 1900) */ + time_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1337,7 +1337,7 @@ H5_build_extpath(const char *name, char **extpath /*out*/) herr_t H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/) { - size_t path1_len; /* length of path1 */ + size_t path1_len = 0; /* length of path1 */ size_t path2_len; /* length of path2 */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5timer.c b/src/H5timer.c index 08e4404067d..ac3a01e174c 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -582,10 +582,10 @@ H5_timer_get_time_string(double seconds) char *s; /* output string */ /* Used when the time is greater than 59 seconds */ - double days; - double hours; - double minutes; - double remainder_sec; + double days = 0.0; + double hours = 0.0; + double minutes = 0.0; + double remainder_sec = 0.0; /* Extract larger time units from count of seconds */ if (seconds > (double)60.0F) { diff --git a/src/H5trace.c b/src/H5trace.c index bfc1b5228b5..83455d9d1c9 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -117,7 +117,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) void * vp = NULL; FILE * out = H5_debug_g.trace; static hbool_t is_first_invocation = TRUE; - H5_timer_t function_timer; + H5_timer_t function_timer = {{0}, {0}, {0}, FALSE}; H5_timevals_t function_times; static H5_timer_t running_timer; H5_timevals_t running_times; diff --git a/test/cache_common.h b/test/cache_common.h index 2976fc8a26a..f184ebf4ebb 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -17,8 +17,8 @@ * This file contains common #defines, type definitions, and * externs for tests of the cache implemented in H5C.c */ -#ifndef _CACHE_COMMON_H -#define _CACHE_COMMON_H +#ifndef CACHE_COMMON_H +#define CACHE_COMMON_H #define H5C_FRIEND /*suppress error about including H5Cpkg */ #define H5F_FRIEND /*suppress error about including H5Fpkg */ @@ -692,4 +692,4 @@ H5TEST_DLL void dump_LRU(H5F_t * file_ptr); } #endif -#endif /* _CACHE_COMMON_H */ +#endif /* CACHE_COMMON_H */ diff --git a/test/external_common.h b/test/external_common.h index d338a704d1b..6215be9b70e 100644 --- a/test/external_common.h +++ b/test/external_common.h @@ -17,8 +17,8 @@ * * Purpose: Private function for external.c and external_env.c */ -#ifndef _EXTERNAL_COMMON_H -#define _EXTERNAL_COMMON_H +#ifndef EXTERNAL_COMMON_H +#define EXTERNAL_COMMON_H /* Include test header files */ #include "h5test.h" @@ -41,4 +41,4 @@ H5TEST_DLL herr_t reset_raw_data_files(hbool_t is_env); } #endif -#endif /* _EXTERNAL_COMMON_H */ +#endif /* EXTERNAL_COMMON_H */ diff --git a/test/external_fname.h b/test/external_fname.h index 25455473b6e..c2cd059837c 100644 --- a/test/external_fname.h +++ b/test/external_fname.h @@ -17,8 +17,8 @@ * * Purpose: Private declaration for external.c and external_env.c */ -#ifndef _EXTERNAL_FNAME_H -#define _EXTERNAL_FNAME_H +#ifndef EXTERNAL_FNAME_H +#define EXTERNAL_FNAME_H /* Include test header files */ #include "h5test.h" @@ -26,4 +26,4 @@ static const char *EXT_FNAME[] = {"extern_1", "extern_2", "extern_3", "extern_4", "extern_dir/file_1", "extern_5", NULL}; -#endif /* _EXTERNAL_FNAME_H */ +#endif /* EXTERNAL_FNAME_H */ diff --git a/test/swmr_common.h b/test/swmr_common.h index e342580d016..d0d829d3589 100644 --- a/test/swmr_common.h +++ b/test/swmr_common.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _SWMR_COMMON_H -#define _SWMR_COMMON_H +#ifndef SWMR_COMMON_H +#define SWMR_COMMON_H /***********/ /* Headers */ @@ -75,4 +75,4 @@ H5TEST_DLL int print_metadata_retries_info(hid_t fid); } #endif -#endif /* _SWMR_COMMON_H */ +#endif /* SWMR_COMMON_H */ diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index d518675e63c..f14bcdab110 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DIFF_H__ -#define H5DIFF_H__ +#ifndef H5DIFF_H +#define H5DIFF_H #include "hdf5.h" #include "h5tools.h" @@ -159,4 +159,4 @@ int print_objname(diff_opt_t *opts, hsize_t nfound); void do_print_objname(const char *OBJ, const char *path1, const char *path2, diff_opt_t *opts); void do_print_attrname(const char *attr, const char *path1, const char *path2); -#endif /* H5DIFF_H__ */ +#endif /* H5DIFF_H */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 9db045f7005..bd4470b3c76 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3133,48 +3133,66 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) hsize_t curr_pos = idx; parallel_print("[ "); - H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", i, opts->hs_nelmts, opts->err_stat); + H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", idx, opts->hs_nelmts, + opts->err_stat); if (opts->sset[0] != NULL) { /* Subsetting is used - calculate total position */ - hsize_t elmnt_cnt = 1; - hsize_t dim_cnt = 0; /* previous dim size */ - hsize_t str_cnt = 0; /* previous dim stride */ - hsize_t curr_idx = idx; /* calculated running position */ - hsize_t str_idx = 0; - hsize_t blk_idx = 0; - hsize_t cnt_idx = 0; - hsize_t hs_idx = 0; - j = opts->rank - 1; + hsize_t prev_dim_size = 0; /* previous dim size */ + hsize_t prev_str = 0; /* previouw stride idx*/ + hsize_t str_cnt = 0; /* stride multiplier*/ + hsize_t curr_idx = 0; /* calculated running position */ + hsize_t str_idx = 0; + hsize_t blk_idx = 0; + hsize_t cnt_idx = 0; + hsize_t dim_size = 0; /* current dim size */ + hsize_t elmnt_cnt = 1; + hsize_t next_idx = idx; + hsize_t data_idx = 0; + j = opts->rank - 1; + H5TOOLS_DEBUG("...begin:%ld=> opts->rank:%ld (idx:%ld)", j, opts->rank, idx); do { - cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - count:%ld", j, - curr_pos, curr_idx, cnt_idx); - blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - block:%ld", j, - curr_pos, curr_idx, blk_idx); - hs_idx = cnt_idx * blk_idx; /* hyperslab area value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - hs:%ld", j, curr_pos, - curr_idx, hs_idx); - str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - stride:%ld", j, - curr_pos, curr_idx, str_idx); - elmnt_cnt *= opts->dims[j]; /* Total number of elements in dimension */ - H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld", j, elmnt_cnt); - if (str_idx > blk_idx) - curr_idx += dim_cnt * (str_idx - blk_idx); /* */ - else if (curr_idx >= hs_idx) - curr_idx += dim_cnt * str_cnt; - H5TOOLS_DEBUG("... sset loop:%d with idx:%ld (curr_idx:%ld) - stride:%ld", j, idx, - curr_idx, str_idx); - dim_cnt = elmnt_cnt; /* */ - if (str_idx > blk_idx) - str_cnt = str_idx - blk_idx; /* */ - else - str_cnt = str_idx; /* */ - H5TOOLS_DEBUG("... sset loop:%d with dim_cnt:%ld - str_cnt:%ld", j, dim_cnt, str_cnt); + curr_idx = next_idx; /* New current data position */ + cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ + blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ + str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j, + curr_pos, curr_idx, cnt_idx, blk_idx, str_idx); + dim_size = opts->dims[j]; /* Current dimension size */ + // elmnt_cnt *= dim_size; /* Total number of elements in dimension */ + H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) " + "- str_cnt:%ld", + j, elmnt_cnt, prev_dim_size, dim_size, str_cnt); + data_idx = elmnt_cnt * dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (data_idx:%ld)", j, curr_pos, data_idx); + for (i = 0; i < cnt_idx; i++) { + H5TOOLS_DEBUG("... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld (curr_idx:%ld - " + "data_idx:%ld)", + i, cnt_idx, str_cnt, curr_idx, data_idx); + if (curr_idx >= data_idx) { + /* get to next block */ + data_idx += str_idx * dim_size; + /* get next block */ + str_cnt++; + H5TOOLS_DEBUG( + "... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld - data_idx:%ld", i, + cnt_idx, str_cnt, data_idx); + } + H5TOOLS_DEBUG("... ... end data loop:%d with dim_cnt:%ld - str_cnt:%ld - " + "(curr_idx:%ld - data_idx:%ld)", + i, dim_size, str_cnt, curr_idx, data_idx); + } + next_idx += dim_size * str_cnt; // + prev_dim_size; + H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx); + str_cnt = 0; + prev_str = str_idx; + prev_dim_size = dim_size; + H5TOOLS_DEBUG("... end sset loop:%d with prev_dim_size:%ld (curr_idx:%ld - data_idx:%ld) " + "- str_cnt:%ld", + j, prev_dim_size, curr_idx, data_idx, str_cnt); + elmnt_cnt *= dim_size; /* Total number of elements in dimension */ j--; - } while (curr_idx >= elmnt_cnt && j >= 0); + } while (next_idx >= elmnt_cnt && j >= 0); curr_pos = curr_idx; /* New current position */ H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos); } /* if (opts->sset[0] != NULL) */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 90c6de528b4..baaf6659371 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1599,7 +1599,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } break; case H5T_ARRAY: { int k, ndims; - hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts; + hsize_t dims[H5S_MAX_RANK], temp_nelmts, nelmts = 0; hid_t memb = H5I_INVALID_HID; H5TOOLS_DEBUG("H5T_ARRAY"); diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 99a75009671..53f16cf19ca 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -17,8 +17,8 @@ * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_H__ -#define H5TOOLS_H__ +#ifndef H5TOOLS_H +#define H5TOOLS_H #include "hdf5.h" #include "h5tools_error.h" @@ -684,4 +684,4 @@ H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_for } #endif -#endif /* H5TOOLS_H__ */ +#endif /* H5TOOLS_H */ diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index 9cebdc35fcc..9b477893d39 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -14,8 +14,8 @@ /* * Purpose: Support h5dump functions for the various tools. */ -#ifndef H5TOOLS_DUMP_H__ -#define H5TOOLS_DUMP_H__ +#ifndef H5TOOLS_DUMP_H +#define H5TOOLS_DUMP_H #include "h5tools_utils.h" @@ -94,4 +94,4 @@ H5TOOLS_DLL void h5tools_print_packed_bits(h5tools_str_t *buffer /*in,out*/, hid } #endif -#endif /* H5TOOLS_DUMP_H__ */ +#endif /* H5TOOLS_DUMP_H */ diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index b8e5339763f..8fd33bb2340 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -14,8 +14,8 @@ /* * Header file for error values, etc. */ -#ifndef H5TOOLS_ERROR_H_ -#define H5TOOLS_ERROR_H_ +#ifndef H5TOOLS_ERROR_H +#define H5TOOLS_ERROR_H #include "H5Epublic.h" #include "H5Eprivate.h" /* Error handling */ @@ -250,4 +250,4 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; H5_LEAVE(ret_val) \ } while (0) -#endif /* H5TOOLS_ERROR_H_ */ +#endif /* H5TOOLS_ERROR_H */ diff --git a/tools/lib/h5tools_ref.h b/tools/lib/h5tools_ref.h index 2720620f2f2..e3d55c6532b 100644 --- a/tools/lib/h5tools_ref.h +++ b/tools/lib/h5tools_ref.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TOOLS_REF_H__ -#define H5TOOLS_REF_H__ +#ifndef H5TOOLS_REF_H +#define H5TOOLS_REF_H #include "hdf5.h" diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 7995d222dac..41a12d7f4d5 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -705,7 +705,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai long double templdouble; HDmemcpy(&templdouble, vp, sizeof(long double)); - h5tools_str_append(str, OPT(info->fmt_double, "%Lf"), templdouble); + h5tools_str_append(str, "%Lg", templdouble); #endif } break; diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index 1c3301a2d1c..3bbf6b18096 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -15,8 +15,8 @@ * Programmer: Bill Wendling * Monday, 19. February 2001 */ -#ifndef H5TOOLS_STR_H__ -#define H5TOOLS_STR_H__ +#ifndef H5TOOLS_STR_H +#define H5TOOLS_STR_H typedef struct h5tools_str_t { char * s; /*allocate string */ @@ -46,4 +46,4 @@ H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t * hid_t type, void *vp, h5tools_context_t *ctx); H5TOOLS_DLL char *h5tools_str_replace(const char *string, const char *substr, const char *replacement); -#endif /* H5TOOLS_STR_H__ */ +#endif /* H5TOOLS_STR_H */ diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 3a68abe0621..108cd4f4421 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -196,7 +196,7 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti /* long command line option */ int i; const char ch = '='; - char * arg = &argv[opt_ind][2]; + char * arg = HDstrdup(&argv[opt_ind][2]); size_t arg_len = 0; opt_arg = strchr(&argv[opt_ind][2], ch); @@ -251,6 +251,8 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti opt_ind++; sp = 1; + + HDfree(arg); } else { register char *cp; /* pointer into current token */ @@ -1077,12 +1079,14 @@ h5tools_parse_ros3_fapl_tuple(const char *tuple_str, int delim, H5FD_ros3_fapl_t ccred[1] = (const char *)s3cred[1]; ccred[2] = (const char *)s3cred[2]; - if (h5tools_populate_ros3_fapl(fapl_config_out, ccred) < 0) + if (0 == h5tools_populate_ros3_fapl(fapl_config_out, ccred)) H5TOOLS_GOTO_ERROR(FAIL, "failed to populate S3 VFD FAPL config"); done: - HDfree(s3cred); - HDfree(s3cred_src); + if (s3cred) + HDfree(s3cred); + if (s3cred_src) + HDfree(s3cred_src); return ret_value; } diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index d38abce6c95..34ac89b2797 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -17,8 +17,8 @@ * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_UTILS_H__ -#define H5TOOLS_UTILS_H__ +#ifndef H5TOOLS_UTILS_H +#define H5TOOLS_UTILS_H #include "hdf5.h" @@ -190,4 +190,4 @@ H5TOOLS_DLL herr_t h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int deli } #endif -#endif /* H5TOOLS_UTILS_H__ */ +#endif /* H5TOOLS_UTILS_H */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 32cd2703532..cda27a281c9 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TRAV_H__ -#define H5TRAV_H__ +#ifndef H5TRAV_H +#define H5TRAV_H #include "hdf5.h" @@ -188,4 +188,4 @@ H5TOOLS_DLL void trav_table_free(trav_table_t *table); H5TOOLS_DLL void trav_table_addflags(unsigned *flags, char *objname, h5trav_type_t type, trav_table_t *table); -#endif /* H5TRAV_H__ */ +#endif /* H5TRAV_H */ diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h index 96ea05eefce..0269b937c85 100644 --- a/tools/lib/io_timer.h +++ b/tools/lib/io_timer.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef IO_TIMER__ -#define IO_TIMER__ +#ifndef IO_TIMER +#define IO_TIMER #include "hdf5.h" @@ -88,4 +88,4 @@ H5TOOLS_DLL double io_time_get(io_time_t *pt, timer_type t); } #endif /* __cplusplus */ -#endif /* IO_TIMER__ */ +#endif /* IO_TIMER */ diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 8e884dd4c9f..7dce495a93c 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _PH5DIFF_H__ -#define _PH5DIFF_H__ +#ifndef PH5DIFF_H +#define PH5DIFF_H /* Send from manager to workers */ #define MPI_TAG_ARGS 1 @@ -40,4 +40,4 @@ struct diffs_found { int not_cmp; }; -#endif /* _PH5DIFF_H__ */ +#endif /* PH5DIFF_H */ diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 471400f03ba..64023840469 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -70,7 +70,6 @@ check_options(diff_opt_t *opts) } } -#if TRILABS_227 /*------------------------------------------------------------------------- * Function: parse_hsize_list * @@ -186,7 +185,6 @@ parse_subset_params(const char *dset) return s; } -#endif /*------------------------------------------------------------------------- * Function: parse_command_line @@ -442,11 +440,9 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char * TRILABS_227 is complete except for an issue with printing indices * the following calls will enable subsetting */ -#if TRILABS_227 opts->sset[0] = parse_subset_params(*objname1); opts->sset[1] = parse_subset_params(*objname2); -#endif H5TOOLS_ENDDEBUG(""); } @@ -766,19 +762,27 @@ usage(void) /* * TRILABS_227 is complete except for an issue with printing indices * the following will be needed for subsetting + */ PRINTVALSTREAM(rawoutstream, " Subsetting options:\n"); - PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the fcompact form of subsetting, as - follows:\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); - PRINTVALSTREAM(rawoutstream, " It is not required to use all parameters, but until the last parameter - value used,\n"); PRINTVALSTREAM(rawoutstream, " all of the semicolons (;) are required, even when a - parameter value is not specified. Example:\n"); PRINTVALSTREAM(rawoutstream, " obj1 - /foo/mydataset[START;;COUNT;BLOCK]\n"); PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); - PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 - in\n"); PRINTVALSTREAM(rawoutstream, " each dimension. START is optional and will default to 0 in each - dimension.\n"); PRINTVALSTREAM(rawoutstream, " Each of START, STRIDE, COUNT, and BLOCK must be a - comma-separated list of integers with\n"); PRINTVALSTREAM(rawoutstream, " one integer for each dimension - of the dataset.\n"); PRINTVALSTREAM(rawoutstream, "\n"); - */ + PRINTVALSTREAM(rawoutstream, + " Subsetting is available by using the fcompact form of subsetting, as follows:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, + " It is not required to use all parameters, but until the last parameter value used,\n"); + PRINTVALSTREAM( + rawoutstream, + " all of the semicolons (;) are required, even when a parameter value is not specified. Example:\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START;;COUNT;BLOCK]\n"); + PRINTVALSTREAM(rawoutstream, " obj1 /foo/mydataset[START]\n"); + PRINTVALSTREAM(rawoutstream, + " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n"); + PRINTVALSTREAM(rawoutstream, + " each dimension. START is optional and will default to 0 in each dimension.\n"); + PRINTVALSTREAM( + rawoutstream, + " Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with\n"); + PRINTVALSTREAM(rawoutstream, " one integer for each dimension of the dataset.\n"); + PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Exit code:\n"); PRINTVALSTREAM(rawoutstream, " 0 if no differences, 1 if differences found, 2 if error\n"); PRINTVALSTREAM(rawoutstream, "\n"); diff --git a/tools/src/h5diff/h5diff_common.h b/tools/src/h5diff/h5diff_common.h index 6594478c1d8..83f4255dfb8 100644 --- a/tools/src/h5diff/h5diff_common.h +++ b/tools/src/h5diff/h5diff_common.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DIFFCOMMON_H__ -#define H5DIFFCOMMON_H__ +#ifndef H5DIFFCOMMON_H +#define H5DIFFCOMMON_H #include "h5tools.h" /* Name of tool */ @@ -32,4 +32,4 @@ void print_info(diff_opt_t *opts); } #endif -#endif /* H5DIFFCOMMON_H__ */ +#endif /* H5DIFFCOMMON_H */ diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 60422ad0d79..a53d1baf3ea 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_H__ -#define H5DUMP_H__ +#ifndef H5DUMP_H +#define H5DUMP_H #include "hdf5.h" #include "H5private.h" @@ -112,4 +112,4 @@ const dump_functions *dump_function_table; } #endif -#endif /* !H5DUMP_H__ */ +#endif /* H5DUMP_H */ diff --git a/tools/src/h5dump/h5dump_ddl.h b/tools/src/h5dump/h5dump_ddl.h index 6d65796ab80..8487270dc74 100644 --- a/tools/src/h5dump/h5dump_ddl.h +++ b/tools/src/h5dump/h5dump_ddl.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_DDL_H__ -#define H5DUMP_DDL_H__ +#ifndef H5DUMP_DDL_H +#define H5DUMP_DDL_H #ifdef __cplusplus extern "C" { @@ -50,4 +50,4 @@ void handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, in } #endif -#endif /* !H5DUMP_DDL_H__ */ +#endif /* H5DUMP_DDL_H */ diff --git a/tools/src/h5dump/h5dump_defines.h b/tools/src/h5dump/h5dump_defines.h index 0fb8def7bbc..21a31dd03ca 100644 --- a/tools/src/h5dump/h5dump_defines.h +++ b/tools/src/h5dump/h5dump_defines.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_DEFINES_H__ -#define H5DUMP_DEFINES_H__ +#ifndef H5DUMP_DEFINES_H +#define H5DUMP_DEFINES_H #define H5DUMP_MAX_RANK H5S_MAX_RANK @@ -50,4 +50,4 @@ #define H5_SZIP_MSB_OPTION_MASK 16 #define H5_SZIP_RAW_OPTION_MASK 128 -#endif /* !H5DUMP_DEFINES_H__ */ +#endif /* H5DUMP_DEFINES_H */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 8fbb5af0a86..308f6022d11 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_EXTERN_H__ -#define H5DUMP_EXTERN_H__ +#ifndef H5DUMP_EXTERN_H +#define H5DUMP_EXTERN_H #include "hdf5.h" #include "H5private.h" @@ -109,4 +109,4 @@ ssize_t table_list_visited(unsigned long file_no); } #endif -#endif /* !H5DUMP_EXTERN_H__ */ +#endif /* H5DUMP_EXTERN_H */ diff --git a/tools/src/h5dump/h5dump_xml.h b/tools/src/h5dump/h5dump_xml.h index 9ff22ed74b0..d69f6d54ea8 100644 --- a/tools/src/h5dump/h5dump_xml.h +++ b/tools/src/h5dump/h5dump_xml.h @@ -10,8 +10,8 @@ * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DUMP_XML_H__ -#define H5DUMP_XML_H__ +#ifndef H5DUMP_XML_H +#define H5DUMP_XML_H extern const char *xmlnsprefix; @@ -34,4 +34,4 @@ void xml_dump_data(hid_t, int, struct subset_t *, int); } #endif -#endif /* !H5DUMP_XML_H__ */ +#endif /* H5DUMP_XML_H */ diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index e3f438462d3..471af51a452 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp) token = HDstrtok(temp, delimiter); if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); @@ -2546,7 +2546,7 @@ parsePathInfo(struct path_info *path, char *temp) if (token == NULL) break; if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) { - (void)HDfprintf(stderr, err1); + (void)HDfprintf(stderr, "%s", err1); return (-1); } HDstrcpy(path->group[i++], token); diff --git a/tools/src/h5import/h5import.h b/tools/src/h5import/h5import.h index 2192f4a2e21..efd40e1a70c 100644 --- a/tools/src/h5import/h5import.h +++ b/tools/src/h5import/h5import.h @@ -17,8 +17,8 @@ * */ -#ifndef H5IMPORT_H__ -#define H5IMPORT_H__ +#ifndef H5IMPORT_H +#define H5IMPORT_H /* * state table tokens @@ -189,4 +189,4 @@ void help(char *); hid_t createOutputDataType(struct Input *in); hid_t createInputDataType(struct Input *in); -#endif /* H5IMPORT_H__ */ +#endif /* H5IMPORT_H */ diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 23cde213a4d..1f9c6811ae7 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -2622,7 +2622,7 @@ int main(int argc, const char *argv[]) { hid_t file_id = H5I_INVALID_HID; - char * fname = NULL, *oname = NULL, *x; + char * fname = NULL, *oname = NULL, *x = NULL; const char *s = NULL; char * rest; int argno; diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h index f022934e1b9..ca1269b302e 100644 --- a/tools/src/h5repack/h5repack.h +++ b/tools/src/h5repack/h5repack.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5REPACK_H__ -#define H5REPACK_H__ +#ifndef H5REPACK_H +#define H5REPACK_H #include "H5private.h" #include "hdf5.h" @@ -224,4 +224,4 @@ obj_list_t *parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, obj_list_t *parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about object */ pack_opt_t *options); -#endif /* H5REPACK_H__ */ +#endif /* H5REPACK_H */ diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index e8e7f296cd7..88a3462f40c 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -245,8 +245,8 @@ main(int argc, char *argv[]) haddr_t extra[10]; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; - H5E_auto2_t func; - void * edata; + H5E_auto2_t func = NULL; + void * edata = NULL; hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ herr_t status = SUCCEED; int exit_value = 0; diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index 77b40a1a2ba..a75f6d824c0 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -97,7 +97,7 @@ static off_t get_size(const char *progname, int *argno, int argc, char *argv[]) { off_t retval = -1; - char *suffix; + char *suffix = NULL; if (isdigit((int)(argv[*argno][2]))) { retval = HDstrtol(argv[*argno] + 2, &suffix, 10); diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index be8047a7bac..6e9a65d7402 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -282,6 +282,7 @@ ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_800.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_801.txt + ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_830.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8625.txt ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/testfiles/h5diff_8639.txt @@ -907,6 +908,8 @@ h5diff_800.out.err h5diff_801.out h5diff_801.out.err + h5diff_830.out + h5diff_830.out.err h5diff_8625.out h5diff_8625.out.err h5diff_8639.out @@ -1529,6 +1532,11 @@ ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/ ADD_H5_TEST (h5diff_800 1 -v ${FILE7} ${FILE8} /g1/array /g1/array) ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array) +# ############################################################################## +# # dataset subsets +# ############################################################################## +#TRILABS_227 ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]) + # ############################################################################## # # VDS tests # ############################################################################## diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt index 06187057ab1..5804ac3dec1 100644 --- a/tools/test/h5diff/testfiles/h5diff_10.txt +++ b/tools/test/h5diff/testfiles/h5diff_10.txt @@ -131,6 +131,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt index 98c80be83c9..fa7447b8326 100644 --- a/tools/test/h5diff/testfiles/h5diff_600.txt +++ b/tools/test/h5diff/testfiles/h5diff_600.txt @@ -131,6 +131,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt index a5bb80528fd..9e1dc893bbf 100644 --- a/tools/test/h5diff/testfiles/h5diff_603.txt +++ b/tools/test/h5diff/testfiles/h5diff_603.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt index 4782e178e8d..146b9445034 100644 --- a/tools/test/h5diff/testfiles/h5diff_606.txt +++ b/tools/test/h5diff/testfiles/h5diff_606.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt index ee4071373b1..511e69328f0 100644 --- a/tools/test/h5diff/testfiles/h5diff_612.txt +++ b/tools/test/h5diff/testfiles/h5diff_612.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt index 550481266cf..c4b41f9b6e4 100644 --- a/tools/test/h5diff/testfiles/h5diff_615.txt +++ b/tools/test/h5diff/testfiles/h5diff_615.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt index e4dba56c317..9dd312d8af0 100644 --- a/tools/test/h5diff/testfiles/h5diff_621.txt +++ b/tools/test/h5diff/testfiles/h5diff_621.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt index 0e7ffa3369a..0f7c4afc278 100644 --- a/tools/test/h5diff/testfiles/h5diff_622.txt +++ b/tools/test/h5diff/testfiles/h5diff_622.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt index bb70458ef97..3e1b5f360a9 100644 --- a/tools/test/h5diff/testfiles/h5diff_623.txt +++ b/tools/test/h5diff/testfiles/h5diff_623.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt index cb3002338bd..06459616ff4 100644 --- a/tools/test/h5diff/testfiles/h5diff_624.txt +++ b/tools/test/h5diff/testfiles/h5diff_624.txt @@ -132,6 +132,18 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]] (The option --follow-symlinks overrides the default behavior when symbolic links are compared.). + Subsetting options: + Subsetting is available by using the fcompact form of subsetting, as follows: + obj1 /foo/mydataset[START;STRIDE;COUNT;BLOCK] + It is not required to use all parameters, but until the last parameter value used, + all of the semicolons (;) are required, even when a parameter value is not specified. Example: + obj1 /foo/mydataset[START;;COUNT;BLOCK] + obj1 /foo/mydataset[START] + The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in + each dimension. START is optional and will default to 0 in each dimension. + Each of START, STRIDE, COUNT, and BLOCK must be a comma-separated list of integers with + one integer for each dimension of the dataset. + Exit code: 0 if no differences, 1 if differences found, 2 if error diff --git a/tools/test/h5diff/testfiles/h5diff_830.txt b/tools/test/h5diff/testfiles/h5diff_830.txt new file mode 100644 index 00000000000..8f00d8bbbfe --- /dev/null +++ b/tools/test/h5diff/testfiles/h5diff_830.txt @@ -0,0 +1,30 @@ +dataset: and +size: [4x3x2] [4x3x2] +position array3D array3D difference +------------------------------------------------------------ +[ 0 0 0 ] 1 0 1 +[ 0 0 0 ] 2 0 2 +[ 0 0 0 ] 3 0 3 +[ 0 0 1 ] 4 0 4 +[ 0 0 1 ] 5 0 5 +[ 0 0 1 ] 6 0 6 +[ 0 2 0 ] 13 0 13 +[ 0 2 0 ] 14 0 14 +[ 0 2 0 ] 15 0 15 +[ 0 2 1 ] 16 0 16 +[ 0 2 1 ] 17 0 17 +[ 0 2 1 ] 18 0 18 +[ 2 0 0 ] 37 0 37 +[ 2 0 0 ] 38 0 38 +[ 2 0 0 ] 39 0 39 +[ 2 0 1 ] 40 0 40 +[ 2 0 1 ] 41 0 41 +[ 2 0 1 ] 42 0 42 +[ 2 2 0 ] 49 0 49 +[ 2 2 0 ] 50 0 50 +[ 2 2 0 ] 51 0 51 +[ 2 2 1 ] 52 0 52 +[ 2 2 1 ] 53 0 53 +[ 2 2 1 ] 54 0 54 +24 differences found +EXIT CODE: 1 diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index 4a8550e4124..24e9e23e356 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -341,6 +341,7 @@ $SRC_H5DIFF_TESTFILES/h5diff_710.txt $SRC_H5DIFF_TESTFILES/h5diff_80.txt $SRC_H5DIFF_TESTFILES/h5diff_800.txt $SRC_H5DIFF_TESTFILES/h5diff_801.txt +$SRC_H5DIFF_TESTFILES/h5diff_830.txt $SRC_H5DIFF_TESTFILES/h5diff_90.txt $SRC_H5DIFF_TESTFILES/h5diff_8625.txt $SRC_H5DIFF_TESTFILES/h5diff_8639.txt @@ -1185,6 +1186,11 @@ TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_ TOOLTEST h5diff_800.txt -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array /g1/array TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array +# ############################################################################## +# # dataset subsets +# ############################################################################## +#TRILABS_227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;] + # ############################################################################## # VDS tests # ############################################################################## diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index dbc58446c85..54439b886eb 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -126,7 +126,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl - #${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl @@ -281,7 +281,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5 ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5 ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5 - #${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 + ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5 ${HDF5_TOOLS_DIR}/testfiles/tloop.h5 ${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5 @@ -1058,7 +1058,7 @@ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) # test for long double (some systems do not have long double) - #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) +# ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) # test for vms ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) @@ -1129,7 +1129,7 @@ ADD_H5_TEST (non_existing 1 --enable-error-stack tgroup.h5 non_existing.h5) # test to verify HDFFV-9407: long double full precision - ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lf t128bit_float.h5) +# ADD_H5_GREP_TEST (t128bit_float 1 "1.123456789012345" -m %.35Lg t128bit_float.h5) ############################################################################## ### P L U G I N T E S T S diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index c1058fbf831..9d14f4b881b 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -114,6 +114,7 @@ #define FILE84 "tudfilter.h5" #define FILE85 "tgrpnullspace.h5" #define FILE87 "tintsnodata.h5" +#define FILE88 "tldouble_scalar.h5" /*------------------------------------------------------------------------- * prototypes @@ -6295,6 +6296,57 @@ gent_ldouble(void) return -1; } +/*------------------------------------------------------------------------- + * Function: gent_ldouble_scalar + * + * Purpose: make file with a long double scalar dataset + * + *------------------------------------------------------------------------- + */ +static int +gent_ldouble_scalar(void) +{ + hid_t fid; + hid_t did; + hid_t tid; + hid_t sid; + hsize_t dims[1] = {6}; + long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0}; + + if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) + goto error; + + if ((sid = H5Screate(H5S_SCALAR)) < 0) + goto error; + + if ((tid = H5Tarray_create2(H5T_NATIVE_LDOUBLE, 1, dims)) < 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 (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; + + return 0; + +error: + HDprintf("error !\n"); + return -1; +} + /*------------------------------------------------------------------------- * Function: gent_binary * diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index d62218f03a9..2104e1c7e38 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -140,7 +140,7 @@ $SRC_H5DUMP_TESTFILES/thyperslab.h5 $SRC_H5DUMP_TESTFILES/tintsattrs.h5 $SRC_H5DUMP_TESTFILES/tints4dims.h5 $SRC_H5DUMP_TESTFILES/tlarge_objname.h5 -#$SRC_H5DUMP_TESTFILES/tldouble.h5 +$SRC_H5DUMP_TESTFILES/tldouble.h5 $SRC_H5DUMP_TESTFILES/tlonglinks.h5 $SRC_H5DUMP_TESTFILES/tloop.h5 $SRC_H5DUMP_TESTFILES/tmulti-b.h5 @@ -284,7 +284,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsCountEq.ddl $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl $SRC_H5DUMP_TESTFILES/tintsattrs.ddl $SRC_H5DUMP_TESTFILES/tlarge_objname.ddl -#$SRC_H5DUMP_TESTFILES/tldouble.ddl +$SRC_H5DUMP_TESTFILES/tldouble.ddl $SRC_H5DUMP_TESTFILES/tlonglinks.ddl $SRC_H5DUMP_TESTFILES/tloop-1.ddl $SRC_H5DUMP_TESTFILES/tmulti.ddl @@ -1433,7 +1433,7 @@ TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5 # test to verify HDFFV-9407: long double full precision -GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 +#GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c index a21c2af29f1..a9b44373ad7 100644 --- a/tools/test/h5jam/getub.c +++ b/tools/test/h5jam/getub.c @@ -138,14 +138,15 @@ main(int argc, const char *argv[]) } /* end if */ /* close things and exit */ + HDfree(filename); HDfree(buf); HDclose(fd); return EXIT_SUCCESS; error: - if (buf) - HDfree(buf); + HDfree(filename); + HDfree(buf); if (fd >= 0) HDclose(fd); return EXIT_FAILURE; diff --git a/tools/test/perform/chunk_cache.c b/tools/test/perform/chunk_cache.c index c4bdb4b5317..fcaa33736f0 100644 --- a/tools/test/perform/chunk_cache.c +++ b/tools/test/perform/chunk_cache.c @@ -98,7 +98,7 @@ create_dset1(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET1_DIM1, DSET1_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK1_DIM1, CHUNK1_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -134,6 +134,7 @@ create_dset1(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; error: @@ -144,6 +145,7 @@ create_dset1(hid_t file) H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } @@ -160,7 +162,7 @@ create_dset2(hid_t file) hid_t dcpl = H5I_INVALID_HID; hsize_t dims[RANK] = {DSET2_DIM1, DSET2_DIM2}; hsize_t chunk_dims[RANK] = {CHUNK2_DIM1, CHUNK2_DIM2}; - int ** data; /* data for writing */ + int ** data = NULL; /* data for writing */ /* Create the data space. */ if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0) @@ -195,6 +197,7 @@ create_dset2(hid_t file) H5Dclose(dataset); H5Pclose(dcpl); H5Sclose(dataspace); + HDfree(data); return 0; @@ -206,6 +209,7 @@ create_dset2(hid_t file) H5Sclose(dataspace); } H5E_END_TRY; + HDfree(data); return 1; } @@ -259,11 +263,11 @@ check_partial_chunks_perf(hid_t file) end_t = H5_get_time(); if ((end_t - start_t) > (double)0.0f) - printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %lu\n", + printf("1. Partial chunks: total read time is %lf; number of bytes being read from file is %zu\n", (end_t - start_t), nbytes_global); else printf("1. Partial chunks: no total read time because timer is not available; number of bytes being " - "read from file is %lu\n", + "read from file is %zu\n", nbytes_global); H5Dclose(dataset); @@ -337,11 +341,11 @@ check_hash_value_perf(hid_t file) end_t = H5_get_time(); if ((end_t - start_t) > (double)0.0f) - printf("2. Hash value: total read time is %lf; number of bytes being read from file is %lu\n", + printf("2. Hash value: total read time is %lf; number of bytes being read from file is %zu\n", (end_t - start_t), nbytes_global); else printf("2. Hash value: no total read time because timer is not available; number of bytes being read " - "from file is %lu\n", + "from file is %zu\n", nbytes_global); H5Dclose(dataset); diff --git a/tools/test/perform/pio_perf.h b/tools/test/perform/pio_perf.h index 027b5534c81..24621da5747 100644 --- a/tools/test/perform/pio_perf.h +++ b/tools/test/perform/pio_perf.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef PIO_PERF_H__ -#define PIO_PERF_H__ +#ifndef PIO_PERF_H +#define PIO_PERF_H #ifndef STANDALONE #include "io_timer.h" @@ -97,4 +97,4 @@ extern results do_pio(parameters param); } #endif /* __cplusplus */ -#endif /* PIO_PERF_H__ */ +#endif /* PIO_PERF_H */ diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index 5a3f16d6e34..3da26605cb3 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef PIO_STANDALONE_H__ -#define PIO_PERF_H__ +#ifndef PIO_STANDALONE_H +#define PIO_STANDALONE_H /* Header file for building h5perf by standalone mode. * Created: Christian Chilan, 2005/5/18. diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index ff0e4eb6afb..f8061d42682 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -783,7 +783,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer) /* Allocate data verification buffer */ if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) { - HDfprintf(stderr, "malloc for data verification buffer size (%Zu) failed\n", linear_buf_size); + HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size); GOTOERROR(FAIL); } /* end if */ diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c index f24e97a1b03..8463ffa8287 100644 --- a/tools/test/perform/sio_perf.c +++ b/tools/test/perform/sio_perf.c @@ -872,9 +872,9 @@ report_parameters(struct options *opts) HDfprintf(output, "\n"); if (opts->page_size) { - HDfprintf(output, "Page Aggregation Enabled. Page size = %ld\n", opts->page_size); + HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size); if (opts->page_buffer_size) - HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %ld\n", opts->page_buffer_size); + HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size); else HDfprintf(output, "Page Buffering Disabled\n"); } diff --git a/tools/test/perform/sio_perf.h b/tools/test/perform/sio_perf.h index acdb8015e88..6242782c656 100644 --- a/tools/test/perform/sio_perf.h +++ b/tools/test/perform/sio_perf.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef SIO_PERF_H__ -#define SIO_PERF_H__ +#ifndef SIO_PERF_H +#define SIO_PERF_H #ifndef STANDALONE #include "io_timer.h" @@ -101,4 +101,4 @@ extern void do_sio(parameters param, results *res); } #endif /* __cplusplus */ -#endif /* PIO_PERF_H__ */ +#endif /* SIO_PERF_H */ diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index 924cbfd618f..eebce68aedb 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -10,8 +10,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef SIO_STANDALONE_H__ -#define SIO_PERF_H__ +#ifndef SIO_STANDALONE_H +#define SIO_STANDALONE_H /* Header file for building h5perf by standalone mode. * Created: Christian Chilan, 2005/5/18. From 061da5f3984255a745b52b2882b462d78ffbc4db Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Mar 2021 12:05:41 -0600 Subject: [PATCH 19/66] format alignment --- src/H5MF.c | 384 ++++++++++++++++++++++++++--------------------------- 1 file changed, 192 insertions(+), 192 deletions(-) diff --git a/src/H5MF.c b/src/H5MF.c index 7602284487c..339bbc9243b 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -26,20 +26,20 @@ /* Module Setup */ /****************/ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ -#define H5FS_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5FS_FRIEND /*suppress error about including H5Fpkg */ #include "H5MFmodule.h" /* This source code file is part of the H5MF module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ #include "H5FSpkg.h" /* File free space */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFpkg.h" /* File memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFpkg.h" /* File memory management */ +#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ @@ -122,7 +122,7 @@ hbool_t H5_PKG_INIT_VAR = FALSE; * Purpose: Initialize the free space section+aggregator merge flags * for the file. * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * Friday, February 1, 2008 @@ -274,17 +274,17 @@ H5MF__alloc_to_fs_type(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5F_mem_pa } /* end H5MF__alloc_to_fs_type() */ /*------------------------------------------------------------------------- - * Function: H5MF__open_fstype + * Function: H5MF__open_fstype * - * Purpose: Open an existing free space manager of TYPE for file by + * Purpose: Open an existing free space manager of TYPE for file by * creating a free-space structure. * Note that TYPE can be H5F_mem_page_t or H5FD_mem_t enum types. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol - * Jan 8 2008 + * Programmer: Quincey Koziol + * Jan 8 2008 * *------------------------------------------------------------------------- */ @@ -351,17 +351,17 @@ H5MF__open_fstype(H5F_t *f, H5F_mem_page_t type) } /* end H5MF__open_fstype() */ /*------------------------------------------------------------------------- - * Function: H5MF__create_fstype + * Function: H5MF__create_fstype * - * Purpose: Create free space manager of TYPE for the file by creating + * Purpose: Create free space manager of TYPE for the file by creating * a free-space structure * Note that TYPE can be H5F_mem_page_t or H5FD_mem_t enum types. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol - * Jan 8 2008 + * Programmer: Quincey Koziol + * Jan 8 2008 * *------------------------------------------------------------------------- */ @@ -435,16 +435,16 @@ H5MF__create_fstype(H5F_t *f, H5F_mem_page_t type) } /* end H5MF__create_fstype() */ /*------------------------------------------------------------------------- - * Function: H5MF__start_fstype + * Function: H5MF__start_fstype * - * Purpose: Open or create a free space manager of a given TYPE. + * Purpose: Open or create a free space manager of a given TYPE. * Note that TYPE can be H5F_mem_page_t or H5FD_mem_t enum types. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol - * Jan 8 2008 + * Programmer: Quincey Koziol + * Jan 8 2008 * *------------------------------------------------------------------------- */ @@ -492,7 +492,7 @@ H5MF__start_fstype(H5F_t *f, H5F_mem_page_t type) * Return: Success: non-negative * Failure: negative * - * Programmer: Vailin Choi; April 2013 + * Programmer: Vailin Choi; April 2013 * *------------------------------------------------------------------------- */ @@ -603,7 +603,7 @@ H5MF__close_fstype(H5F_t *f, H5F_mem_page_t type) /*------------------------------------------------------------------------- * Function: H5MF__add_sect * - * Purpose: To add a section to the specified free-space manager. + * Purpose: To add a section to the specified free-space manager. * * Return: Success: non-negative * Failure: negative @@ -661,11 +661,11 @@ H5MF__add_sect(H5F_t *f, H5FD_mem_t alloc_type, H5FS_t *fspace, H5MF_free_sectio /*------------------------------------------------------------------------- * Function: H5MF__find_sect * - * Purpose: To find a section from the specified free-space manager to fulfill the request. - * If found, re-add the left-over space back to the manager. + * Purpose: To find a section from the specified free-space manager to fulfill the request. + * If found, re-add the left-over space back to the manager. * - * Return: TRUE if a section is found to fulfill the request - * FALSE if not + * Return: TRUE if a section is found to fulfill the request + * FALSE if not * * Programmer: Vailin Choi; April 2013 * @@ -745,9 +745,9 @@ H5MF__find_sect(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size, H5FS_t *fspace, h * Function: H5MF_alloc * * Purpose: Allocate SIZE bytes of file memory and return the relative - * address where that contiguous chunk of file memory exists. - * The TYPE argument describes the purpose for which the storage - * is being requested. + * address where that contiguous chunk of file memory exists. + * The TYPE argument describes the purpose for which the storage + * is being requested. * * Return: Success: The file address of new chunk. * Failure: HADDR_UNDEF @@ -1002,15 +1002,15 @@ H5MF__alloc_pagefs(H5F_t *f, H5FD_mem_t alloc_type, hsize_t size) * * Purpose: Allocate temporary space in the file * - * Note: The address returned is non-overlapping with any other address - * in the file and suitable for insertion into the metadata - * cache. + * Note: The address returned is non-overlapping with any other address + * in the file and suitable for insertion into the metadata + * cache. * - * The address is _not_ suitable for actual file I/O and will - * cause an error if it is so used. + * The address is _not_ suitable for actual file I/O and will + * cause an error if it is so used. * - * The space allocated with this routine should _not_ be freed, - * it should just be abandoned. Calling H5MF_xfree() with space + * The space allocated with this routine should _not_ be freed, + * it should just be abandoned. Calling H5MF_xfree() with space * from this routine will cause an error. * * Return: Success: Temporary file address @@ -1244,9 +1244,9 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) } /* end H5MF_xfree() */ /*------------------------------------------------------------------------- - * Function: H5MF_try_extend + * Function: H5MF_try_extend * - * Purpose: Extend a block in the file if possible. + * Purpose: Extend a block in the file if possible. * For non-paged aggregation: * --try to extend at EOA * --try to extend into the aggregators @@ -1256,11 +1256,11 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) * --try to extend into a free-space section if adjoined * --try to extend into the page end threshold if a metadata block * - * Return: Success: TRUE(1) - Block was extended + * Return: Success: TRUE(1) - Block was extended * FALSE(0) - Block could not be extended - * Failure: FAIL + * Failure: FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, June 11, 2004 * *------------------------------------------------------------------------- @@ -1528,7 +1528,7 @@ H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, haddr_t addr, hsize_t size) * Purpose: Close the free space tracker(s) for a file: * paged or non-paged aggregation * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * * Programmer: Vailin Choi; Dec 2012 * @@ -1571,9 +1571,9 @@ H5MF_close(H5F_t *f) * of TYPE for file. * Note that TYPE can be H5F_mem_page_t or H5FD_mem_t enum types. * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Jan 2016 * *------------------------------------------------------------------------- @@ -1630,9 +1630,9 @@ H5MF__close_delete_fstype(H5F_t *f, H5F_mem_page_t type) * free-space managers when downgrading persistent free-space * to non-persistent. * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * - * Programmer: Vailin Choi + * Programmer: Vailin Choi * Jan 2016 * *------------------------------------------------------------------------- @@ -2087,7 +2087,7 @@ H5MF__close_pagefs(H5F_t *f) * * Purpose: Shrink the EOA while closing * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * Saturday, July 7, 2012 @@ -2338,7 +2338,7 @@ H5MF_get_freespace(H5F_t *f, hsize_t *tot_space, hsize_t *meta_size) /*------------------------------------------------------------------------- * Function: H5MF_get_free_sections() * - * Purpose: To retrieve free-space section information for + * Purpose: To retrieve free-space section information for * paged or non-paged aggregation * * Return: Success: Number of free sections @@ -2468,10 +2468,10 @@ H5MF_get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t /*------------------------------------------------------------------------- * Function: H5MF__sects_cb() * - * Purpose: Iterator callback for each free-space section + * Purpose: Iterator callback for each free-space section * Retrieve address and size into user data * - * Return: Always succeed + * Return: Always succeed * * Programmer: Vailin Choi * July 1st, 2009 @@ -2498,7 +2498,7 @@ H5MF__sects_cb(H5FS_section_info_t *_sect, void *_udata) /*------------------------------------------------------------------------- * Function: H5MF__get_free_sects * - * Purpose: Retrieve section information for the specified free-space manager. + * Purpose: Retrieve section information for the specified free-space manager. * * Return: Success: non-negative * Failure: negative @@ -2539,10 +2539,10 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, /*------------------------------------------------------------------------- * Function: H5MF_settle_raw_data_fsm() * - * Purpose: Handle any tasks required before the metadata cache - * can serialize or flush the raw data free space manager - * and any metadata free space managers that reside in the - * raw data free space manager ring. + * Purpose: Handle any tasks required before the metadata cache + * can serialize or flush the raw data free space manager + * and any metadata free space managers that reside in the + * raw data free space manager ring. * * Specifically, this means any metadata managers that DON'T * handle space allocation for free space manager header or @@ -2550,25 +2550,25 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, * ring. * * In the absence of page allocation, there is at most one - * free space manager per memory type defined in H5F_mem_t. - * Of these, the one that allocates H5FD_MEM_DRAW will - * always reside in the raw data free space manager ring. - * If there is more than one metadata free space manager, - * all that don't handle H5FD_MEM_FSPACE_HDR or + * free space manager per memory type defined in H5F_mem_t. + * Of these, the one that allocates H5FD_MEM_DRAW will + * always reside in the raw data free space manager ring. + * If there is more than one metadata free space manager, + * all that don't handle H5FD_MEM_FSPACE_HDR or * H5FD_MEM_FSPACE_SINFO (which map to H5FD_MEM_OHDR and * H5FD_MEM_LHEAP respectively) will reside in the raw - * data free space manager ring as well + * data free space manager ring as well * - * With page allocation, the situation is conceptually - * identical, but more complex in practice. + * With page allocation, the situation is conceptually + * identical, but more complex in practice. * * In the worst case (multi file driver) page allocation - * can result in two free space managers for each memory - * type -- one for small (less than on equal to one page) + * can result in two free space managers for each memory + * type -- one for small (less than on equal to one page) * allocations, and one for large (greater than one page) * allocations. * - * In the more common one file case, page allocation will + * In the more common one file case, page allocation will * result in a total of three free space managers -- one for * small (<= one page) raw data allocations, one for small * metadata allocations (i.e, all memory types other than @@ -2576,64 +2576,64 @@ H5MF__get_free_sects(H5F_t *f, H5FS_t *fspace, H5MF_sect_iter_ud_t *sect_udata, * allocations. * * Despite these complications, the solution is the same in - * the page allocation case -- free space managers (be they + * the page allocation case -- free space managers (be they * small data or large) are assigned to the raw data free * space manager ring if they don't allocate file space for * free space managers. Note that in the one file case, the - * large free space manager must be assigned to the metadata - * free space manager ring, as it both allocates pages for - * the metadata free space manager, and allocates space for - * large (> 1 page) metadata cache entries. + * large free space manager must be assigned to the metadata + * free space manager ring, as it both allocates pages for + * the metadata free space manager, and allocates space for + * large (> 1 page) metadata cache entries. * * At present, the task list for this routine is: * - * 1) Reduce the EOA to the extent possible. To do this: + * 1) Reduce the EOA to the extent possible. To do this: * - * a) Free both aggregators. Space not at EOA will be - * added to the appropriate free space manager. + * a) Free both aggregators. Space not at EOA will be + * added to the appropriate free space manager. * - * The raw data aggregator should not be restarted - * after this point. It is possible that the metadata - * aggregator will be. + * The raw data aggregator should not be restarted + * after this point. It is possible that the metadata + * aggregator will be. * - * b) Free all file space currently allocated to free - * space managers. + * b) Free all file space currently allocated to free + * space managers. * - * c) Delete the free space manager superblock - * extension message if allocated. + * c) Delete the free space manager superblock + * extension message if allocated. * - * This done, reduce the EOA by moving it to just before - * the last piece of free memory in the file. + * This done, reduce the EOA by moving it to just before + * the last piece of free memory in the file. * - * 2) Ensure that space is allocated for the free space + * 2) Ensure that space is allocated for the free space * manager superblock extension message. Must do this * now, before reallocating file space for free space - * managers, as it is possible that this allocation may - * grab the last section in a FSM -- making it unnecessary - * to re-allocate file space for it. - * - * 3) Scan all free space managers not involved in allocating - * space for free space managers. For each such free space - * manager, test to see if it contains free space. If - * it does, allocate file space for its header and section - * data. If it contains no free space, leave it without - * allocated file space as there is no need to save it to - * file. - * - * Note that all free space managers in this class should - * see no further space allocations / deallocations as - * at this point, all raw data allocations should be - * finalized, as should all metadata allocations not - * involving free space managers. - * - * We will allocate space for free space managers involved - * in the allocation of file space for free space managers - * in H5MF_settle_meta_data_fsm() - * - * Return: SUCCEED/FAIL + * managers, as it is possible that this allocation may + * grab the last section in a FSM -- making it unnecessary + * to re-allocate file space for it. + * + * 3) Scan all free space managers not involved in allocating + * space for free space managers. For each such free space + * manager, test to see if it contains free space. If + * it does, allocate file space for its header and section + * data. If it contains no free space, leave it without + * allocated file space as there is no need to save it to + * file. + * + * Note that all free space managers in this class should + * see no further space allocations / deallocations as + * at this point, all raw data allocations should be + * finalized, as should all metadata allocations not + * involving free space managers. + * + * We will allocate space for free space managers involved + * in the allocation of file space for free space managers + * in H5MF_settle_meta_data_fsm() + * + * Return: SUCCEED/FAIL * * Programmer: John Mainzer - * 5/25/16 + * 5/25/16 * *------------------------------------------------------------------------- */ @@ -3012,102 +3012,102 @@ H5MF_settle_raw_data_fsm(H5F_t *f, hbool_t *fsm_settled) /*------------------------------------------------------------------------- * Function: H5MF_settle_meta_data_fsm() * - * Purpose: If the free space manager is persistent, handle any tasks - * required before the metadata cache can serialize or flush - * the metadata free space manager(s) that handle file space - * allocation for free space managers. + * Purpose: If the free space manager is persistent, handle any tasks + * required before the metadata cache can serialize or flush + * the metadata free space manager(s) that handle file space + * allocation for free space managers. * - * In most cases, there will be only one manager assigned - * to this role. However, since for reasons unknown, - * free space manager headers and section info blocks are - * different classes of memory, it is possible that two free - * space managers will be involved. + * In most cases, there will be only one manager assigned + * to this role. However, since for reasons unknown, + * free space manager headers and section info blocks are + * different classes of memory, it is possible that two free + * space managers will be involved. * - * On entry to this function, the raw data settle routine - * (H5MF_settle_raw_data_fsm()) should have: + * On entry to this function, the raw data settle routine + * (H5MF_settle_raw_data_fsm()) should have: * * 1) Freed the aggregators. * - * 2) Freed all file space allocated to the free space managers. + * 2) Freed all file space allocated to the free space managers. * - * 3) Deleted the free space manager superblock extension message + * 3) Deleted the free space manager superblock extension message * - * 4) Reduced the EOA to the extent possible. + * 4) Reduced the EOA to the extent possible. * - * 5) Re-created the free space manager superblock extension - * message. + * 5) Re-created the free space manager superblock extension + * message. * - * 6) Reallocated file space for all non-empty free space - * managers NOT involved in allocation of space for free - * space managers. + * 6) Reallocated file space for all non-empty free space + * managers NOT involved in allocation of space for free + * space managers. * - * Note that these free space managers (if not empty) should - * have been written to file by this point, and that no - * further space allocations involving them should take - * place during file close. + * Note that these free space managers (if not empty) should + * have been written to file by this point, and that no + * further space allocations involving them should take + * place during file close. * - * On entry to this routine, the free space manager(s) involved - * in allocation of file space for free space managers should - * still be floating. (i.e. should not have any file space - * allocated to them.) + * On entry to this routine, the free space manager(s) involved + * in allocation of file space for free space managers should + * still be floating. (i.e. should not have any file space + * allocated to them.) * - * Similarly, the raw data aggregator should not have been - * restarted. Note that it is probable that reallocation of - * space in 5) and 6) above will have re-started the metadata - * aggregator. + * Similarly, the raw data aggregator should not have been + * restarted. Note that it is probable that reallocation of + * space in 5) and 6) above will have re-started the metadata + * aggregator. * * - * In this routine, we proceed as follows: + * In this routine, we proceed as follows: * - * 1) Verify that the free space manager(s) involved in file - * space allocation for free space managers are still floating. + * 1) Verify that the free space manager(s) involved in file + * space allocation for free space managers are still floating. * * 2) Free the aggregators. * * 3) Reduce the EOA to the extent possible, and make note - * of the resulting value. This value will be stored - * in the fsinfo superblock extension message and be used + * of the resulting value. This value will be stored + * in the fsinfo superblock extension message and be used * in the subsequent file open. * - * 4) Re-allocate space for any free space manager(s) that: + * 4) Re-allocate space for any free space manager(s) that: * - * a) are involved in allocation of space for free space - * managers, and + * a) are involved in allocation of space for free space + * managers, and * - * b) contain free space. + * b) contain free space. * - * It is possible that we could allocate space for one - * of these free space manager(s) only to have the allocation - * result in the free space manager being empty and thus - * obliging us to free the space again. Thus there is the - * potential for an infinite loop if we want to avoid saving - * empty free space managers. + * It is possible that we could allocate space for one + * of these free space manager(s) only to have the allocation + * result in the free space manager being empty and thus + * obliging us to free the space again. Thus there is the + * potential for an infinite loop if we want to avoid saving + * empty free space managers. * - * Similarly, it is possible that we could allocate space - * for a section info block, only to discover that this - * allocation has changed the size of the section info -- - * forcing us to deallocate and start the loop over again. + * Similarly, it is possible that we could allocate space + * for a section info block, only to discover that this + * allocation has changed the size of the section info -- + * forcing us to deallocate and start the loop over again. * - * To avoid this, simply allocate file space for these - * FSM(s) directly from the VFD layer if allocation is - * indicated. This avoids the issue by bypassing the FSMs - * in this case. + * To avoid this, simply allocate file space for these + * FSM(s) directly from the VFD layer if allocation is + * indicated. This avoids the issue by bypassing the FSMs + * in this case. * - * Note that this may increase the size of the file needlessly. - * A better solution would be to modify the FSM code to - * save empty FSMs to file, and to allow section info blocks - * to be oversized. However, given that the FSM code is - * also used by the fractal heaps, and that we are under - * severe time pressure at the moment, the above brute - * force solution is attractive. + * Note that this may increase the size of the file needlessly. + * A better solution would be to modify the FSM code to + * save empty FSMs to file, and to allow section info blocks + * to be oversized. However, given that the FSM code is + * also used by the fractal heaps, and that we are under + * severe time pressure at the moment, the above brute + * force solution is attractive. * * 5) Make note of the EOA -- used for sanity checking on * FSM shutdown. * - * Return: SUCCEED/FAIL + * Return: SUCCEED/FAIL * * Programmer: John Mainzer - * 5/25/16 + * 5/25/16 * *------------------------------------------------------------------------- */ @@ -3124,10 +3124,10 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) H5FS_t * lg_sinfo_fspace = NULL; /* ptr to lg FSM sinfo alloc FSM */ haddr_t eoa_pre_fsm_fsalloc; /* eoa pre file space allocation */ /* for self referential FSMs */ - haddr_t eoa_post_fsm_fsalloc; /* eoa post file space allocation */ - /* for self referential FSMs */ - H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ - herr_t ret_value = SUCCEED; /* Return value */ + haddr_t eoa_post_fsm_fsalloc; /* eoa post file space allocation */ + /* for self referential FSMs */ + H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL) @@ -3393,7 +3393,7 @@ H5MF_settle_meta_data_fsm(H5F_t *f, hbool_t *fsm_settled) * Function: H5MF__fsm_type_is_self_referential() * * Purpose: Return TRUE if the indicated free space manager allocates - * file space for free space managers. Return FALSE otherwise. + * file space for free space managers. Return FALSE otherwise. * * Return: TRUE/FALSE * @@ -3449,7 +3449,7 @@ H5MF__fsm_type_is_self_referential(H5F_t *f, H5F_mem_page_t fsm_type) * Function: H5MF__fsm_is_self_referential() * * Purpose: Return TRUE if the indicated free space manager allocates - * file space for free space managers. Return FALSE otherwise. + * file space for free space managers. Return FALSE otherwise. * * Return: TRUE/FALSE * @@ -3496,15 +3496,15 @@ H5MF__fsm_is_self_referential(H5F_t *f, H5FS_t *fspace) * Function: H5MF_tidy_self_referential_fsm_hack * * Purpose: As discussed in the comments of the settle routines above, - * the existence of self referential free space managers - * as currently implemented creates the possibility of - * infinite loops at file close. + * the existence of self referential free space managers + * as currently implemented creates the possibility of + * infinite loops at file close. * - * As a hack to avoid this, we have added code to settle - * self referential free space managers, and then allocate - * space for them directly from the file driver. + * As a hack to avoid this, we have added code to settle + * self referential free space managers, and then allocate + * space for them directly from the file driver. * - * To avoid dropping ever increasing amounts of file space + * To avoid dropping ever increasing amounts of file space * on the floor with each subsequent file close/open cycle, * we need to clean this up on file open. To avoid this, * this function is called on the first file space allocation @@ -3541,7 +3541,7 @@ H5MF__fsm_is_self_referential(H5F_t *f, H5FS_t *fspace) * and then set f->shared->eoa_pre_fsm_fsalloc to * HADDR_UNDEF. * - * If page buffering, verify that the new EOA is + * If page buffering, verify that the new EOA is * on a page boundary, and expunge any pages in the * page buffer after the new EOA. * From 4f5536c2ff3569af7e575defe63bc6a1148d9ec1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 4 Mar 2021 12:12:47 -0600 Subject: [PATCH 20/66] Add missing test ref file --- tools/testfiles/tldouble.ddl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/testfiles/tldouble.ddl diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl new file mode 100644 index 00000000000..c032ef31a21 --- /dev/null +++ b/tools/testfiles/tldouble.ddl @@ -0,0 +1,11 @@ +HDF5 "tldouble.h5" { +GROUP "/" { + DATASET "dset" { + DATATYPE H5T_NATIVE_LDOUBLE + DATASPACE SIMPLE { ( 3 ) / ( 3 ) } + DATA { + (0): 1, 2, 3 + } + } +} +} From a60c646f96e59e565c13ea51201daa039076df84 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 5 Mar 2021 10:18:01 -0600 Subject: [PATCH 21/66] Merge #380 from develop --- release_docs/RELEASE.txt | 10 ++ src/H5Epublic.h | 20 ++-- src/H5FDmulti.c | 214 +++++++++++++++++++++------------------ src/H5FDstdio.c | 141 +++++++++++++------------- 4 files changed, 203 insertions(+), 182 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 4543ca49a86..f1e267a57a8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -192,6 +192,16 @@ New Features Library: -------- + - H5Epush_ret() now requires a trailing semi-colon + + H5Epush_ret() is a function-like macro that has been changed to + contain a `do {} while(0)` loop. Consequently, a trailing semi-colon + is now required to end the `while` statement. Previously, a trailing + semi would work, but was not mandatory. This change was made to allow + clang-format to correctly format the source code. + + (SAM - 2021/03/03) + - Improved performance of H5Sget_select_elem_pointlist Modified library to cache the point after the last block of points diff --git a/src/H5Epublic.h b/src/H5Epublic.h index cb7d7006ddb..9e53f54f6e1 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -32,8 +32,8 @@ typedef enum H5E_type_t { H5E_MAJOR, H5E_MINOR } H5E_type_t; /* Information about an error; element of error stack */ typedef struct H5E_error2_t { hid_t cls_id; /*class ID */ - hid_t maj_num; /*major error ID */ - hid_t min_num; /*minor error number */ + hid_t maj_num; /*major error ID */ + hid_t min_num; /*minor error number */ unsigned line; /*line in file where error occurs */ const char *func_name; /*function in which error occurred */ const char *file_name; /*file in which error occurred */ @@ -42,11 +42,11 @@ typedef struct H5E_error2_t { /* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* HDF5 error class */ #define H5E_ERR_CLS (H5OPEN H5E_ERR_CLS_g) @@ -61,12 +61,12 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g; * trying something that's likely or expected to fail. The code to try can * be nested between calls to H5Eget_auto() and H5Eset_auto(), but it's * easier just to use this macro like: - * H5E_BEGIN_TRY { - * ...stuff here that's likely to fail... + * H5E_BEGIN_TRY { + * ...stuff here that's likely to fail... * } H5E_END_TRY; * * Warning: don't break, return, or longjmp() from the body of the loop or - * the error reporting won't be properly restored! + * the error reporting won't be properly restored! * * These two macros still use the old API functions for backward compatibility * purpose. @@ -124,10 +124,10 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g; /* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in */ /* And return after pushing error onto stack */ #define H5Epush_ret(func, cls, maj, min, str, ret) \ - { \ + do { \ H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \ return (ret); \ - } + } while (0) /* Use the Standard C __FILE__ & __LINE__ macros instead of typing them in * And goto a label after pushing error onto stack. diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 68440d0f793..a024ace646e 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -436,12 +436,12 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Check arguments and supply default values */ if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1) if (!memb_map) - { - for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) - _memb_map[mt] = H5FD_MEM_DEFAULT; - memb_map = _memb_map; - } + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1); + if (!memb_map) { + for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) + _memb_map[mt] = H5FD_MEM_DEFAULT; + memb_map = _memb_map; + } if (!memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS); @@ -465,19 +465,20 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map, const hid_t *memb_f /* Map usage type */ mmt = memb_map[mt]; if (mmt < 0 || mmt >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", - -1) if (H5FD_MEM_DEFAULT == mmt) mmt = mt; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1); + if (H5FD_MEM_DEFAULT == mmt) + mmt = mt; /* * All members of MEMB_FAPL must be either defaults or actual file * access property lists. */ if (H5P_DEFAULT != memb_fapl[mmt] && TRUE != H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1); - /* All names must be defined */ - if (!memb_name[mmt] || !memb_name[mmt][0]) H5Epush_ret( - func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1) + /* All names must be defined */ + if (!memb_name[mmt] || !memb_name[mmt][0]) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1); } /* @@ -529,13 +530,14 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl H5Eclear2(H5E_DEFAULT); if (H5I_GENPROP_LST != H5Iget_type(fapl_id) || TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", - -1) if (H5FD_MULTI != H5Pget_driver(fapl_id)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", - -1) if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1) - - if (memb_map) memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not an access list", -1); + if (H5FD_MULTI != H5Pget_driver(fapl_id)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1); + if (NULL == (fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1); + + if (memb_map) + memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES * sizeof(H5FD_mem_t)); if (memb_fapl) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) { if (fa->memb_fapl[mt] >= 0) @@ -672,10 +674,10 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out } END_MEMBERS; if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); - /* Encode all name templates */ - p = buf + 8 + nseen * 2 * 8; + /* Encode all name templates */ + p = buf + 8 + nseen * 2 * 8; UNIQUE_MEMBERS(file->fa.memb_map, mt) { size_t n = strlen(file->fa.memb_name[mt]) + 1; @@ -730,15 +732,15 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Make sure the name/version number is correct */ if (strcmp(name, "NCSAmult")) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid multi superblock", -1); - /* Set default values */ - ALL_MEMBERS(mt) - { - memb_addr[mt] = HADDR_UNDEF; - memb_eoa[mt] = HADDR_UNDEF; - memb_name[mt] = NULL; - } + /* Set default values */ + ALL_MEMBERS(mt) + { + memb_addr[mt] = HADDR_UNDEF; + memb_eoa[mt] = HADDR_UNDEF; + memb_name[mt] = NULL; + } END_MEMBERS; /* @@ -761,9 +763,9 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) memcpy(x, buf, (nseen * 2 * 8)); buf += nseen * 2 * 8; if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen * 2, x, NULL, H5P_DEFAULT) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) - ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - - 2019/07/05, QAK */ + H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1); + ap = (haddr_t *)((void *)x); /* Extra (void *) cast to quiet "cast to create alignment" warning - + 2019/07/05, QAK */ UNIQUE_MEMBERS(map, mt) { memb_addr[_unmapped] = *ap++; @@ -818,23 +820,23 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } END_MEMBERS; if (compute_next(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1); - /* Open all necessary files */ - if (open_members(file) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1) + /* Open all necessary files */ + if (open_members(file) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", -1); - /* Set the EOA marker for all open files */ - UNIQUE_MEMBERS(file->fa.memb_map, mt) - { - if (file->memb[mt]) - if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1) + /* Set the EOA marker for all open files */ + UNIQUE_MEMBERS(file->fa.memb_map, mt) + { + if (file->memb[mt]) + if (H5FDset_eoa(file->memb[mt], mt, memb_eoa[mt]) < 0) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1); - /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) - */ - file->memb_eoa[mt] = memb_eoa[mt]; - } + /* Save the individual EOAs in one place for later comparison (in H5FD_multi_set_eoa) + */ + file->memb_eoa[mt] = memb_eoa[mt]; + } END_MEMBERS; return 0; @@ -925,7 +927,7 @@ H5FD_multi_fapl_copy(const void *_old_fa) } END_MEMBERS; free(new_fa); - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL); } return new_fa; } @@ -957,8 +959,9 @@ H5FD_multi_fapl_free(void *_fa) { if (fa->memb_fapl[mt] >= 0) if (H5Idec_ref(fa->memb_fapl[mt]) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", - -1) if (fa->memb_name[mt]) free(fa->memb_name[mt]); + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1); + if (fa->memb_name[mt]) + free(fa->memb_name[mt]); } END_MEMBERS; free(fa); @@ -996,24 +999,23 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", - NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL); + if (0 == maxaddr || HADDR_UNDEF == maxaddr) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL); - /* - * Initialize the file from the file access properties, using default - * values if necessary. Make sure to use CALLOC here because the code - * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa - * in H5FD_multi_t. - */ - if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) H5Epush_ret( - func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", - NULL) if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) - { - close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); - if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) - H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) - } + /* + * Initialize the file from the file access properties, using default + * values if necessary. Make sure to use CALLOC here because the code + * in H5FD_multi_set_eoa depends on the proper initialization of memb_eoa + * in H5FD_multi_t. + */ + if (NULL == (file = (H5FD_multi_t *)calloc((size_t)1, sizeof(H5FD_multi_t)))) + H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); + if (H5P_FILE_ACCESS_DEFAULT == fapl_id || H5FD_MULTI != H5Pget_driver(fapl_id)) { + close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS); + if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0) + H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error) + } fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id); assert(fa); ALL_MEMBERS(mt) @@ -1110,16 +1112,16 @@ H5FD_multi_close(H5FD_t *_file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1); - /* Clean up other stuff */ - ALL_MEMBERS(mt) - { - if (file->fa.memb_fapl[mt] >= 0) - (void)H5Idec_ref(file->fa.memb_fapl[mt]); - if (file->fa.memb_name[mt]) - free(file->fa.memb_name[mt]); - } + /* Clean up other stuff */ + ALL_MEMBERS(mt) + { + if (file->fa.memb_fapl[mt] >= 0) + (void)H5Idec_ref(file->fa.memb_fapl[mt]); + if (file->fa.memb_name[mt]) + free(file->fa.memb_name[mt]); + } END_MEMBERS; free(file->name); @@ -1277,7 +1279,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == memb_eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (memb_eoa > 0) memb_eoa += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (memb_eoa > 0) + memb_eoa += file->fa.memb_addr[mt]; } else if (file->fa.relax) { /* @@ -1288,7 +1292,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != memb_eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } if (memb_eoa > eoa) @@ -1308,7 +1312,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == eoa) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", - HADDR_UNDEF) if (eoa > 0) eoa += file->fa.memb_addr[mmt]; + HADDR_UNDEF); + if (eoa > 0) + eoa += file->fa.memb_addr[mmt]; } else if (file->fa.relax) { /* @@ -1319,7 +1325,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != eoa); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF); } } @@ -1382,9 +1388,9 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa) H5E_BEGIN_TRY { status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt])); } H5E_END_TRY; if (status < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1); - return 0; + return 0; } /* end H5FD_multi_set_eoa() */ /*------------------------------------------------------------------------- @@ -1426,7 +1432,9 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == tmp_eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", - HADDR_UNDEF) if (tmp_eof > 0) tmp_eof += file->fa.memb_addr[mt]; + HADDR_UNDEF); + if (tmp_eof > 0) + tmp_eof += file->fa.memb_addr[mt]; } else if (file->fa.relax) { /* @@ -1437,7 +1445,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != tmp_eof); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF); } if (tmp_eof > eof) eof = tmp_eof; @@ -1457,7 +1465,9 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) if (HADDR_UNDEF == eof) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", - HADDR_UNDEF) if (eof > 0) eof += file->fa.memb_addr[mmt]; + HADDR_UNDEF); + if (eof > 0) + eof += file->fa.memb_addr[mmt]; } else if (file->fa.relax) { /* @@ -1468,7 +1478,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type) assert(HADDR_UNDEF != eof); } else { - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF); } } return eof; @@ -1496,9 +1506,10 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle) /* Get data type for multi driver */ if (H5Pget_multi_type(fapl, &type) < 0) H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't get data type for multi driver", - -1) if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1) mmt = - file->fa.memb_map[type]; + -1); + if (type < H5FD_MEM_DEFAULT || type >= H5FD_MEM_NTYPES) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "data type is out of range", -1); + mmt = file->fa.memb_map[type]; if (H5FD_MEM_DEFAULT == mmt) mmt = type; @@ -1542,8 +1553,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) } if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size))) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF) - addr += file->fa.memb_addr[mmt]; + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file can't alloc", HADDR_UNDEF); + addr += file->fa.memb_addr[mmt]; /*#ifdef TMP if ( addr + size > file->eoa ) { @@ -1551,7 +1562,7 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) { H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \ - "can't set eoa", HADDR_UNDEF) + "can't set eoa", HADDR_UNDEF); } } #else @@ -1756,9 +1767,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1); - return 0; + return 0; } /*------------------------------------------------------------------------- @@ -1797,9 +1808,9 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing) } } if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1); - return 0; + return 0; } /* end H5FD_multi_truncate() */ /*------------------------------------------------------------------------- @@ -1860,7 +1871,8 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw) } /* end if */ if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "error locking member files", -1) return 0; + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "error locking member files", -1); + return 0; } /* H5FD_multi_lock() */ @@ -1897,9 +1909,9 @@ H5FD_multi_unlock(H5FD_t *_file) END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1); - return 0; + return 0; } /* H5FD_multi_unlock() */ /*------------------------------------------------------------------------- @@ -1996,9 +2008,9 @@ open_members(H5FD_multi_t *file) } END_MEMBERS; if (nerrors) - H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1); - return 0; + return 0; } H5_GCC_DIAG_ON("format-nonliteral") diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index b3951278985..3d0332fcc54 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -300,9 +300,9 @@ H5Pset_fapl_stdio(hid_t fapl_id) H5Eclear2(H5E_DEFAULT); if (0 == H5Pisa_class(fapl_id, H5P_FILE_ACCESS)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADTYPE, "not a file access property list", -1); - return H5Pset_driver(fapl_id, H5FD_STDIO, NULL); + return H5Pset_driver(fapl_id, H5FD_STDIO, NULL); } /* end H5Pset_fapl_stdio() */ /*------------------------------------------------------------------------- @@ -353,14 +353,15 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr /* Check arguments */ if (!name || !*name) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", - NULL) if (0 == maxaddr || HADDR_UNDEF == maxaddr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", - NULL) if (ADDR_OVERFLOW(maxaddr)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL) - - /* Tentatively open file in read-only mode, to check for existence */ - if (flags & H5F_ACC_RDWR) f = fopen(name, "rb+"); + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADVALUE, "invalid file name", NULL); + if (0 == maxaddr || HADDR_UNDEF == maxaddr) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_BADRANGE, "bogus maxaddr", NULL); + if (ADDR_OVERFLOW(maxaddr)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_ARGS, H5E_OVERFLOW, "maxaddr too large", NULL); + + /* Tentatively open file in read-only mode, to check for existence */ + if (flags & H5F_ACC_RDWR) + f = fopen(name, "rb+"); else f = fopen(name, "rb"); @@ -373,14 +374,14 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr } else H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, - "file doesn't exist and CREAT wasn't specified", NULL) + "file doesn't exist and CREAT wasn't specified", NULL); } else if (flags & H5F_ACC_EXCL) { /* File exists, but EXCL is passed. Fail. */ assert(flags & H5F_ACC_CREAT); fclose(f); H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_FILEEXISTS, - "file exists but CREAT and EXCL were specified", NULL) + "file exists but CREAT and EXCL were specified", NULL); } else if (flags & H5F_ACC_RDWR) { if (flags & H5F_ACC_TRUNC) @@ -391,14 +392,13 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr * as the tentative open will work */ if (!f) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CANTOPENFILE, "fopen failed", NULL); - /* Build the return value */ - if (NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t)))) - { - fclose(f); - H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL) - } /* end if */ + /* Build the return value */ + if (NULL == (file = (H5FD_stdio_t *)calloc((size_t)1, sizeof(H5FD_stdio_t)))) { + fclose(f); + H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); + } /* end if */ file->fp = f; file->op = H5FD_STDIO_OP_SEEK; file->pos = HADDR_UNDEF; @@ -462,7 +462,7 @@ H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr if (fstat(file->fd, &sb) < 0) { free(file); fclose(f); - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL); } /* end if */ file->device = sb.st_dev; file->inode = sb.st_ino; @@ -496,9 +496,9 @@ H5FD_stdio_close(H5FD_t *_file) H5Eclear2(H5E_DEFAULT); if (fclose(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_CLOSEERROR, "fclose failed", -1); - free(file); + free(file); return 0; } /* end H5FD_stdio_close() */ @@ -769,9 +769,9 @@ H5FD_stdio_get_handle(H5FD_t *_file, hid_t /*UNUSED*/ fapl, void **file_handle) *file_handle = &(file->fp); if (*file_handle == NULL) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "get handle failed", -1); - return 0; + return 0; } /* end H5FD_stdio_get_handle() */ /*------------------------------------------------------------------------- @@ -808,12 +808,13 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl /* Check for overflow */ if (HADDR_UNDEF == addr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", - -1) if (REGION_OVERFLOW(addr, size)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + if (REGION_OVERFLOW(addr, size)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); - /* Check easy cases */ - if (0 == size) return 0; + /* Check easy cases */ + if (0 == size) + return 0; if ((haddr_t)addr >= file->eof) { memset(buf, 0, size); return 0; @@ -824,7 +825,7 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1); } file->pos = addr; } @@ -856,7 +857,7 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxpl if (0 == bytes_read && ferror(file->fp)) { /* error */ file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_READERROR, "fread failed", -1); } /* end if */ if (0 == bytes_read && feof(file->fp)) { @@ -910,20 +911,19 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp /* Check for overflow conditions */ if (HADDR_UNDEF == addr) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", - -1) if (REGION_OVERFLOW(addr, size)) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) - - /* Seek to the correct file position. */ - if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr) - { - if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { - file->op = H5FD_STDIO_OP_UNKNOWN; - file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1) - } - file->pos = addr; + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + if (REGION_OVERFLOW(addr, size)) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1); + + /* Seek to the correct file position. */ + if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || file->pos != addr) { + if (file_fseek(file->fp, (file_offset_t)addr, SEEK_SET) < 0) { + file->op = H5FD_STDIO_OP_UNKNOWN; + file->pos = HADDR_UNDEF; + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, "fseek failed", -1); } + file->pos = addr; + } /* Write the buffer. On successful return, the file position will be * advanced by the number of bytes read. On failure, the file position is @@ -945,7 +945,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t /*UNUSED*/ type, hid_t /*UNUSED*/ dxp if (bytes_wrote != bytes_in || (0 == bytes_wrote && ferror(file->fp))) { /* error */ file->op = H5FD_STDIO_OP_UNKNOWN; file->pos = HADDR_UNDEF; - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fwrite failed", -1); } /* end if */ assert(bytes_wrote > 0); @@ -999,11 +999,11 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t closing) if (file->write_access) { if (!closing) { if (fflush(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1); - /* Reset last file I/O information */ - file->pos = HADDR_UNDEF; - file->op = H5FD_STDIO_OP_UNKNOWN; + /* Reset last file I/O information */ + file->pos = HADDR_UNDEF; + file->op = H5FD_STDIO_OP_UNKNOWN; } /* end if */ } /* end if */ @@ -1068,13 +1068,13 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ if (INVALID_SET_FILE_POINTER == dwPtrLow) { dwError = GetLastError(); if (dwError != NO_ERROR) - H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_FILEOPEN, "unable to set file pointer", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_FILEOPEN, "unable to set file pointer", -1); } bError = SetEndOfFile(file->hFile); if (0 == bError) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, - "unable to truncate/extend file properly", -1) + "unable to truncate/extend file properly", -1); #else /* H5_HAVE_WIN32_API */ /* Reset seek offset to beginning of file, so that file isn't re-extended later */ rewind(file->fp); @@ -1082,11 +1082,11 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ /* Truncate file to proper length */ if (-1 == file_ftruncate(file->fd, (file_offset_t)file->eoa)) H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_SEEKERROR, - "unable to truncate/extend file properly", -1) + "unable to truncate/extend file properly", -1); #endif /* H5_HAVE_WIN32_API */ - /* Update the eof value */ - file->eof = file->eoa; + /* Update the eof value */ + file->eof = file->eoa; /* Reset last file I/O information */ file->pos = HADDR_UNDEF; @@ -1096,7 +1096,7 @@ H5FD_stdio_truncate(H5FD_t *_file, hid_t /*UNUSED*/ dxpl_id, hbool_t /*UNUSED*/ else { /* Double-check for problems */ if (file->eoa > file->eof) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_TRUNCATED, "eoa > eof!", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_TRUNCATED, "eoa > eof!", -1); } /* end else */ return 0; @@ -1141,16 +1141,16 @@ H5FD_stdio_lock(H5FD_t *_file, hbool_t rw) */ errno = 0; else - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "file lock failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTLOCKFILE, "file lock failed", -1); } /* end if */ /* Flush the stream */ if (fflush(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1) + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1); #endif /* H5_HAVE_FLOCK */ - return 0; + return 0; } /* end H5FD_stdio_lock() */ /*------------------------------------------------------------------------- @@ -1182,19 +1182,18 @@ H5FD_stdio_unlock(H5FD_t *_file) /* Flush the stream */ if (fflush(file->fp) < 0) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1) - - /* Place a non-blocking lock on the file */ - if (flock(file->fd, LOCK_UN) < 0) - { - if (file->ignore_disabled_file_locks && ENOSYS == errno) - /* When errno is set to ENOSYS, the file system does not support - * locking, so ignore it. - */ - errno = 0; - else - H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "file unlock failed", -1) - } /* end if */ + H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_WRITEERROR, "fflush failed", -1); + + /* Place a non-blocking lock on the file */ + if (flock(file->fd, LOCK_UN) < 0) { + if (file->ignore_disabled_file_locks && ENOSYS == errno) + /* When errno is set to ENOSYS, the file system does not support + * locking, so ignore it. + */ + errno = 0; + else + H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "file unlock failed", -1); + } /* end if */ #endif /* H5_HAVE_FLOCK */ From b0ee8ed7688551ea2894bc9854592eca8adf22b9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 8 Mar 2021 16:37:31 -0600 Subject: [PATCH 22/66] Finish java merges from develop --- .github/workflows/clang-format-check.yml | 6 + java/examples/datasets/H5Ex_D_Alloc.java | 10 +- java/examples/datasets/H5Ex_D_Checksum.java | 14 +- java/examples/datasets/H5Ex_D_Chunk.java | 16 +- java/examples/datasets/H5Ex_D_Compact.java | 16 +- java/examples/datasets/H5Ex_D_External.java | 14 +- java/examples/datasets/H5Ex_D_FillValue.java | 8 +- java/examples/datasets/H5Ex_D_Gzip.java | 14 +- java/examples/datasets/H5Ex_D_Hyperslab.java | 14 +- java/examples/datasets/H5Ex_D_Nbit.java | 16 +- java/examples/datasets/H5Ex_D_ReadWrite.java | 10 +- java/examples/datasets/H5Ex_D_Shuffle.java | 14 +- java/examples/datasets/H5Ex_D_Sofloat.java | 14 +- java/examples/datasets/H5Ex_D_Soint.java | 14 +- java/examples/datasets/H5Ex_D_Szip.java | 14 +- java/examples/datasets/H5Ex_D_Transform.java | 14 +- .../datasets/H5Ex_D_UnlimitedAdd.java | 20 +- .../datasets/H5Ex_D_UnlimitedGzip.java | 22 +- .../datasets/H5Ex_D_UnlimitedMod.java | 20 +- java/examples/datatypes/H5Ex_T_Array.java | 18 +- .../datatypes/H5Ex_T_ArrayAttribute.java | 24 +- java/examples/datatypes/H5Ex_T_Bit.java | 12 +- .../datatypes/H5Ex_T_BitAttribute.java | 18 +- java/examples/datatypes/H5Ex_T_Commit.java | 12 +- java/examples/datatypes/H5Ex_T_Compound.java | 22 +- .../datatypes/H5Ex_T_CompoundAttribute.java | 28 +- java/examples/datatypes/H5Ex_T_Float.java | 12 +- .../datatypes/H5Ex_T_FloatAttribute.java | 18 +- java/examples/datatypes/H5Ex_T_Integer.java | 12 +- .../datatypes/H5Ex_T_IntegerAttribute.java | 18 +- .../datatypes/H5Ex_T_ObjectReference.java | 24 +- .../H5Ex_T_ObjectReferenceAttribute.java | 28 +- java/examples/datatypes/H5Ex_T_Opaque.java | 18 +- .../datatypes/H5Ex_T_OpaqueAttribute.java | 22 +- java/examples/datatypes/H5Ex_T_String.java | 20 +- .../datatypes/H5Ex_T_StringAttribute.java | 26 +- java/examples/datatypes/H5Ex_T_VLString.java | 14 +- java/examples/groups/H5Ex_G_Compact.java | 6 +- java/examples/groups/H5Ex_G_Corder.java | 8 +- java/examples/groups/H5Ex_G_Create.java | 4 +- java/examples/groups/H5Ex_G_Intermediate.java | 6 +- java/examples/groups/H5Ex_G_Iterate.java | 2 +- java/examples/groups/H5Ex_G_Phase.java | 10 +- java/examples/groups/H5Ex_G_Traverse.java | 2 +- java/examples/groups/H5Ex_G_Visit.java | 2 +- java/examples/intro/H5_CreateAttribute.java | 8 +- java/examples/intro/H5_CreateDataset.java | 6 +- java/examples/intro/H5_CreateFile.java | 2 +- java/examples/intro/H5_CreateGroup.java | 4 +- .../intro/H5_CreateGroupAbsoluteRelative.java | 8 +- .../examples/intro/H5_CreateGroupDataset.java | 16 +- java/examples/intro/H5_ReadWrite.java | 6 +- java/src/hdf/hdf5lib/H5.java | 27 +- java/src/hdf/hdf5lib/HDF5Constants.java | 5 + java/src/hdf/hdf5lib/HDF5GroupInfo.java | 9 +- java/src/hdf/hdf5lib/HDFArray.java | 502 +++++++----------- java/src/hdf/hdf5lib/structs/H5A_info_t.java | 12 +- java/src/jni/h5Constants.c | 8 +- java/src/jni/h5dImp.c | 2 +- java/src/jni/h5util.c | 208 +++++++- java/src/jni/h5util.h | 13 +- java/test/CMakeLists.txt | 2 + java/test/TestH5.java | 162 +++++- java/test/TestH5A.java | 124 ++--- java/test/TestH5D.java | 40 +- java/test/TestH5Dplist.java | 8 +- java/test/TestH5E.java | 1 - java/test/TestH5F.java | 12 +- java/test/TestH5Fbasic.java | 16 +- java/test/TestH5Fparams.java | 12 +- java/test/TestH5Fswmr.java | 12 +- java/test/TestH5G.java | 22 +- java/test/TestH5Gbasic.java | 16 +- java/test/TestH5Giterate.java | 6 +- java/test/TestH5Lbasic.java | 2 +- java/test/TestH5Lcreate.java | 18 +- java/test/TestH5Obasic.java | 18 +- java/test/TestH5Ocopy.java | 40 +- java/test/TestH5Ocreate.java | 26 +- java/test/TestH5P.java | 30 +- java/test/TestH5PData.java | 10 +- java/test/TestH5PL.java | 10 +- java/test/TestH5Pfapl.java | 28 +- java/test/TestH5Pfaplhdfs.java | 10 +- java/test/TestH5Pfapls3.java | 10 +- java/test/TestH5Plist.java | 32 +- java/test/TestH5Pvirtual.java | 26 +- java/test/TestH5R.java | 72 ++- java/test/TestH5S.java | 20 +- java/test/TestH5Sbasic.java | 24 +- java/test/TestH5T.java | 22 +- java/test/TestH5Tbasic.java | 12 +- java/test/junit.sh.in | 4 +- java/test/testfiles/JUnit-TestH5.txt | 4 +- src/H5Spkg.h | 1 + 95 files changed, 1306 insertions(+), 1038 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 230a34160d5..220a15e4afa 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -13,5 +13,11 @@ jobs: source: '.' extensions: 'c,h,cpp,hpp' clangFormatVersion: 10 + inplace: True style: file exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' + - uses: EndBug/add-and-commit@v7 + with: + author_name: github-actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: 'Committing clang-format changes' diff --git a/java/examples/datasets/H5Ex_D_Alloc.java b/java/examples/datasets/H5Ex_D_Alloc.java index d0e8f816604..4e10c23b530 100644 --- a/java/examples/datasets/H5Ex_D_Alloc.java +++ b/java/examples/datasets/H5Ex_D_Alloc.java @@ -64,11 +64,11 @@ public static H5D_space_status get(int code) { } private static void allocation() { - long file_id = -1; - long filespace_id = -1; - long dataset_id1 = -1; - long dataset_id2 = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id1 = HDF5Constants.H5I_INVALID_HID; + long dataset_id2 = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; int space_status = 0; diff --git a/java/examples/datasets/H5Ex_D_Checksum.java b/java/examples/datasets/H5Ex_D_Checksum.java index e0a1638d331..781dd686cb3 100644 --- a/java/examples/datasets/H5Ex_D_Checksum.java +++ b/java/examples/datasets/H5Ex_D_Checksum.java @@ -92,10 +92,10 @@ private static boolean checkFletcher32Filter() { } private static void writeChecksum() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -192,9 +192,9 @@ private static void writeChecksum() { } private static void readChecksum() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Chunk.java b/java/examples/datasets/H5Ex_D_Chunk.java index 74e7530abd5..2ddf2935624 100644 --- a/java/examples/datasets/H5Ex_D_Chunk.java +++ b/java/examples/datasets/H5Ex_D_Chunk.java @@ -65,10 +65,10 @@ public static H5D_layout get(int code) { } private static void writeChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -200,10 +200,10 @@ private static void writeChunk() { } private static void readChunk() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Compact.java b/java/examples/datasets/H5Ex_D_Compact.java index 7751db93f7e..0abf8da2474 100644 --- a/java/examples/datasets/H5Ex_D_Compact.java +++ b/java/examples/datasets/H5Ex_D_Compact.java @@ -59,10 +59,10 @@ public static H5D_layout get(int code) { } private static void writeCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -162,10 +162,10 @@ private static void writeCompact() { } private static void readCompact() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file and dataset using the default properties. diff --git a/java/examples/datasets/H5Ex_D_External.java b/java/examples/datasets/H5Ex_D_External.java index 1797ec8efd8..9c3787f213a 100644 --- a/java/examples/datasets/H5Ex_D_External.java +++ b/java/examples/datasets/H5Ex_D_External.java @@ -33,10 +33,10 @@ public class H5Ex_D_External { private static final int NAME_BUF_SIZE = 32; private static void writeExternal() { - long file_id = -1; - long dcpl_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -137,9 +137,9 @@ private static void writeExternal() { } private static void readExternal() { - long file_id = -1; - long dcpl_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; String[] Xname = new String[1]; diff --git a/java/examples/datasets/H5Ex_D_FillValue.java b/java/examples/datasets/H5Ex_D_FillValue.java index 4577249baca..3526993e7fd 100644 --- a/java/examples/datasets/H5Ex_D_FillValue.java +++ b/java/examples/datasets/H5Ex_D_FillValue.java @@ -39,10 +39,10 @@ public class H5Ex_D_FillValue { private static final int FILLVAL = 99; private static void fillValue() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; diff --git a/java/examples/datasets/H5Ex_D_Gzip.java b/java/examples/datasets/H5Ex_D_Gzip.java index 2529b47cafc..404ff051915 100644 --- a/java/examples/datasets/H5Ex_D_Gzip.java +++ b/java/examples/datasets/H5Ex_D_Gzip.java @@ -94,10 +94,10 @@ private static boolean checkGzipFilter() { } private static void writeGzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -195,9 +195,9 @@ private static void writeGzip() { } private static void readGzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Hyperslab.java b/java/examples/datasets/H5Ex_D_Hyperslab.java index e77493f693b..fa3473f3366 100644 --- a/java/examples/datasets/H5Ex_D_Hyperslab.java +++ b/java/examples/datasets/H5Ex_D_Hyperslab.java @@ -33,9 +33,9 @@ public class H5Ex_D_Hyperslab { private static final int RANK = 2; private static void writeHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -141,10 +141,10 @@ private static void writeHyperslab() { } private static void readHyperslab() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Nbit.java b/java/examples/datasets/H5Ex_D_Nbit.java index fbb504b7081..35d23a989cc 100644 --- a/java/examples/datasets/H5Ex_D_Nbit.java +++ b/java/examples/datasets/H5Ex_D_Nbit.java @@ -95,11 +95,11 @@ private static boolean checkNbitFilter() { } private static void writeData() throws Exception { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dtype_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dtype_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -156,9 +156,9 @@ private static void writeData() throws Exception { } private static void readData() throws Exception { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_ReadWrite.java b/java/examples/datasets/H5Ex_D_ReadWrite.java index da9d0b4b98d..db930d39352 100644 --- a/java/examples/datasets/H5Ex_D_ReadWrite.java +++ b/java/examples/datasets/H5Ex_D_ReadWrite.java @@ -31,9 +31,9 @@ public class H5Ex_D_ReadWrite { private static final int RANK = 2; private static void WriteDataset() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -108,8 +108,8 @@ private static void WriteDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Shuffle.java b/java/examples/datasets/H5Ex_D_Shuffle.java index 85192bb54f1..1dd7c6a6423 100644 --- a/java/examples/datasets/H5Ex_D_Shuffle.java +++ b/java/examples/datasets/H5Ex_D_Shuffle.java @@ -121,10 +121,10 @@ private static boolean checkShuffleFilter() { } private static void writeShuffle() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -228,9 +228,9 @@ private static void writeShuffle() { } private static void readShuffle() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Sofloat.java b/java/examples/datasets/H5Ex_D_Sofloat.java index c1365f71c46..a42aba40f5f 100644 --- a/java/examples/datasets/H5Ex_D_Sofloat.java +++ b/java/examples/datasets/H5Ex_D_Sofloat.java @@ -95,10 +95,10 @@ private static boolean checkScaleoffsetFilter() { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; double[][] dset_data = new double[DIM_X][DIM_Y]; @@ -212,9 +212,9 @@ private static void writeData() { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; double[][] dset_data = new double[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Soint.java b/java/examples/datasets/H5Ex_D_Soint.java index 2192cb9382a..dd7664fcbab 100644 --- a/java/examples/datasets/H5Ex_D_Soint.java +++ b/java/examples/datasets/H5Ex_D_Soint.java @@ -95,10 +95,10 @@ private static boolean checkScaleoffsetFilter() { } private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -194,9 +194,9 @@ private static void writeData() { } private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_Szip.java b/java/examples/datasets/H5Ex_D_Szip.java index ad04692b350..3fdc71252b3 100644 --- a/java/examples/datasets/H5Ex_D_Szip.java +++ b/java/examples/datasets/H5Ex_D_Szip.java @@ -94,10 +94,10 @@ private static boolean checkSzipFilter() { } private static void writeSzip() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -195,9 +195,9 @@ private static void writeSzip() { } private static void readSzip() { - long file_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file. diff --git a/java/examples/datasets/H5Ex_D_Transform.java b/java/examples/datasets/H5Ex_D_Transform.java index 0c63afd3549..069e80be94c 100644 --- a/java/examples/datasets/H5Ex_D_Transform.java +++ b/java/examples/datasets/H5Ex_D_Transform.java @@ -35,10 +35,10 @@ public class H5Ex_D_Transform { private static String RTRANSFORM = "x-1"; private static void writeData() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; @@ -143,9 +143,9 @@ private static void writeData() { private static void readData() { - long file_id = -1; - long dataset_id = -1; - long dxpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dxpl_id = HDF5Constants.H5I_INVALID_HID; int[][] dset_data = new int[DIM_X][DIM_Y]; // Open an existing file using the default properties. diff --git a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java index 2e18b99c933..c82b2d62319 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedAdd.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedAdd.java @@ -38,10 +38,10 @@ public class H5Ex_D_UnlimitedAdd { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -142,9 +142,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -292,9 +292,9 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java index b65162164d7..675b1ba7a43 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedGzip.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedGzip.java @@ -98,10 +98,10 @@ private static boolean checkGzipFilter() { } private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -199,9 +199,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; long[] start = { 0, 0 }; @@ -349,10 +349,10 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datasets/H5Ex_D_UnlimitedMod.java b/java/examples/datasets/H5Ex_D_UnlimitedMod.java index 68aecc4f504..273ac3e141d 100644 --- a/java/examples/datasets/H5Ex_D_UnlimitedMod.java +++ b/java/examples/datasets/H5Ex_D_UnlimitedMod.java @@ -38,10 +38,10 @@ public class H5Ex_D_UnlimitedMod { private static final int NDIMS = 2; private static void writeUnlimited() { - long file_id = -1; - long dcpl_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] chunk_dims = { CHUNK_X, CHUNK_Y }; long[] maxdims = { HDF5Constants.H5S_UNLIMITED, HDF5Constants.H5S_UNLIMITED }; @@ -142,9 +142,9 @@ private static void writeUnlimited() { } private static void extendUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; long[] extdims = { EDIM_X, EDIM_Y }; int[][] dset_data; @@ -278,9 +278,9 @@ private static void extendUnlimited() { } private static void readUnlimited() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Array.java b/java/examples/datatypes/H5Ex_T_Array.java index 162ac898063..3939b384795 100644 --- a/java/examples/datatypes/H5Ex_T_Array.java +++ b/java/examples/datatypes/H5Ex_T_Array.java @@ -33,11 +33,11 @@ public class H5Ex_T_Array { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -151,10 +151,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java index 14ae9a4fc1e..c4c4bc482f1 100644 --- a/java/examples/datatypes/H5Ex_T_ArrayAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ArrayAttribute.java @@ -34,12 +34,12 @@ public class H5Ex_T_ArrayAttribute { private static final int NDIMS = 2; private static void CreateDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data = new int[DIM0][ADIM0][ADIM1]; @@ -83,7 +83,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -174,11 +174,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; long[] adims = { ADIM0, ADIM1 }; int[][][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Bit.java b/java/examples/datatypes/H5Ex_T_Bit.java index 95968d018e1..45d4e8a15c9 100644 --- a/java/examples/datatypes/H5Ex_T_Bit.java +++ b/java/examples/datatypes/H5Ex_T_Bit.java @@ -31,9 +31,9 @@ public class H5Ex_T_Bit { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -115,9 +115,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_BitAttribute.java b/java/examples/datatypes/H5Ex_T_BitAttribute.java index e093453e88c..9b33ca58668 100644 --- a/java/examples/datatypes/H5Ex_T_BitAttribute.java +++ b/java/examples/datatypes/H5Ex_T_BitAttribute.java @@ -32,10 +32,10 @@ public class H5Ex_T_BitAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -65,7 +65,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -138,10 +138,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Commit.java b/java/examples/datatypes/H5Ex_T_Commit.java index 204b6321db5..62db5ea0db4 100644 --- a/java/examples/datatypes/H5Ex_T_Commit.java +++ b/java/examples/datatypes/H5Ex_T_Commit.java @@ -100,9 +100,9 @@ static int getOffset(int memberItem) { } private static void CreateDataType() { - long file_id = -1; - long strtype_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; Sensor_Datatype datatypes = new Sensor_Datatype(); // Create a new file using default properties. try { @@ -182,9 +182,9 @@ private static void CreateDataType() { } private static void ReadDataType() { - long file_id = -1; - long typeclass_id = -1; - long filetype_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long typeclass_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; // Open an existing file. try { diff --git a/java/examples/datatypes/H5Ex_T_Compound.java b/java/examples/datatypes/H5Ex_T_Compound.java index f0fe715791a..8c83ebbb775 100644 --- a/java/examples/datatypes/H5Ex_T_Compound.java +++ b/java/examples/datatypes/H5Ex_T_Compound.java @@ -121,12 +121,12 @@ public String toString() { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -285,11 +285,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java index d8fd4a1aade..58d2fb79e6f 100644 --- a/java/examples/datatypes/H5Ex_T_CompoundAttribute.java +++ b/java/examples/datatypes/H5Ex_T_CompoundAttribute.java @@ -124,13 +124,13 @@ public String toString() { } private static void CreateDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data = new Sensor[DIM0]; byte[] dset_data = null; @@ -204,7 +204,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -309,12 +309,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long strtype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long strtype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; Sensor[] object_data2; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java index f907b1ffa4c..e8da7f65982 100644 --- a/java/examples/datatypes/H5Ex_T_Float.java +++ b/java/examples/datatypes/H5Ex_T_Float.java @@ -35,9 +35,9 @@ public class H5Ex_T_Float { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -119,9 +119,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java index 32b5a94c302..eb8e1f83136 100644 --- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java +++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java @@ -36,10 +36,10 @@ public class H5Ex_T_FloatAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data = new double[DIM0][DIM1]; @@ -65,7 +65,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -138,10 +138,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; double[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Integer.java b/java/examples/datatypes/H5Ex_T_Integer.java index ddcc156cc12..bb8e0cb99e3 100644 --- a/java/examples/datatypes/H5Ex_T_Integer.java +++ b/java/examples/datatypes/H5Ex_T_Integer.java @@ -33,9 +33,9 @@ public class H5Ex_T_Integer { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -116,9 +116,9 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java index 9024c9e83df..b0df5e46f8a 100644 --- a/java/examples/datatypes/H5Ex_T_IntegerAttribute.java +++ b/java/examples/datatypes/H5Ex_T_IntegerAttribute.java @@ -34,10 +34,10 @@ public class H5Ex_T_IntegerAttribute { private static final int RANK = 2; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data = new int[DIM0][DIM1]; @@ -63,7 +63,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -136,10 +136,10 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0, DIM1 }; int[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReference.java b/java/examples/datatypes/H5Ex_T_ObjectReference.java index f561aa153b9..38536b858c7 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReference.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReference.java @@ -64,11 +64,11 @@ public static H5G_obj get(int code) { } private static void writeObjRef() { - long file_id = -1; - long dataspace_id = -1; - long filespace_id = -1; - long group_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -89,9 +89,9 @@ private static void writeObjRef() { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -105,7 +105,7 @@ private static void writeObjRef() { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -186,11 +186,11 @@ private static void writeObjRef() { } private static void readObjRef() { - long file_id = -1; - long dataset_id = -1; - long dataspace_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java index 8d044547fb4..b38b0a09f0a 100644 --- a/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java +++ b/java/examples/datatypes/H5Ex_T_ObjectReferenceAttribute.java @@ -66,11 +66,11 @@ public static H5G_obj get(int code) { } private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long group_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][8]; @@ -91,9 +91,9 @@ private static void CreateDataset() { HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -107,7 +107,7 @@ private static void CreateDataset() { HDF5Constants.H5P_DEFAULT); if (group_id >= 0) H5.H5Gclose(group_id); - group_id = -1; + group_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -138,7 +138,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -211,12 +211,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; int object_type = -1; - long object_id = -1; + long object_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_Opaque.java b/java/examples/datatypes/H5Ex_T_Opaque.java index c4ee39f0d8c..e851fb256e1 100644 --- a/java/examples/datatypes/H5Ex_T_Opaque.java +++ b/java/examples/datatypes/H5Ex_T_Opaque.java @@ -31,10 +31,10 @@ public class H5Ex_T_Opaque { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -137,11 +137,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long type_len = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long type_len = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data; String tag_name = null; diff --git a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java index 4407451e5ac..3e16ab49b82 100644 --- a/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java +++ b/java/examples/datatypes/H5Ex_T_OpaqueAttribute.java @@ -32,11 +32,11 @@ public class H5Ex_T_OpaqueAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long datatype_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[] dset_data = new byte[DIM0 * LEN]; byte[] str_data = { 'O', 'P', 'A', 'Q', 'U', 'E' }; @@ -64,7 +64,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -157,11 +157,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long datatype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long datatype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long type_len = -1; long[] dims = { DIM0 }; byte[] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_String.java b/java/examples/datatypes/H5Ex_T_String.java index 7b63c3535a7..e497bd8fc0a 100644 --- a/java/examples/datatypes/H5Ex_T_String.java +++ b/java/examples/datatypes/H5Ex_T_String.java @@ -31,11 +31,11 @@ public class H5Ex_T_String { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -155,11 +155,11 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_StringAttribute.java b/java/examples/datatypes/H5Ex_T_StringAttribute.java index 0c9d40ceeca..700f6a90d57 100644 --- a/java/examples/datatypes/H5Ex_T_StringAttribute.java +++ b/java/examples/datatypes/H5Ex_T_StringAttribute.java @@ -32,12 +32,12 @@ public class H5Ex_T_StringAttribute { private static final int RANK = 1; private static void CreateDataset() { - long file_id = -1; - long memtype_id = -1; - long filetype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM0 }; byte[][] dset_data = new byte[DIM0][SDIM]; StringBuffer[] str_data = { new StringBuffer("Parting"), new StringBuffer("is such"), @@ -79,7 +79,7 @@ private static void CreateDataset() { dataset_id = H5.H5Dcreate(file_id, DATASETNAME, HDF5Constants.H5T_STD_I32LE, dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } } catch (Exception e) { @@ -178,12 +178,12 @@ private static void CreateDataset() { } private static void ReadDataset() { - long file_id = -1; - long filetype_id = -1; - long memtype_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filetype_id = HDF5Constants.H5I_INVALID_HID; + long memtype_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long sdim = 0; long[] dims = { DIM0 }; byte[][] dset_data; diff --git a/java/examples/datatypes/H5Ex_T_VLString.java b/java/examples/datatypes/H5Ex_T_VLString.java index 933b0b4e703..8a29e60f2ff 100644 --- a/java/examples/datatypes/H5Ex_T_VLString.java +++ b/java/examples/datatypes/H5Ex_T_VLString.java @@ -25,10 +25,10 @@ public class H5Ex_T_VLString private static String DATASETNAME = "DS1"; private static void createDataset() { - long file_id = -1; - long type_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; int rank = 1; String[] str_data = { "Parting", "is such", "sweet", "sorrow." }; long[] dims = { str_data.length }; @@ -92,9 +92,9 @@ private static void createDataset() { } private static void readDataset() { - long file_id = -1; - long type_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long type_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; String[] str_data = { "", "", "", "" }; try { diff --git a/java/examples/groups/H5Ex_G_Compact.java b/java/examples/groups/H5Ex_G_Compact.java index 0ae98c98105..313c9c7e468 100644 --- a/java/examples/groups/H5Ex_G_Compact.java +++ b/java/examples/groups/H5Ex_G_Compact.java @@ -59,9 +59,9 @@ public static H5G_storage get(int code) { } public static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long fapl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; long size; diff --git a/java/examples/groups/H5Ex_G_Corder.java b/java/examples/groups/H5Ex_G_Corder.java index 61b5b7f63b1..5df850ec6f1 100644 --- a/java/examples/groups/H5Ex_G_Corder.java +++ b/java/examples/groups/H5Ex_G_Corder.java @@ -24,10 +24,10 @@ public class H5Ex_G_Corder { private static String FILE = "H5Ex_G_Corder.h5"; private static void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; int status; H5G_info_t ginfo; int i; diff --git a/java/examples/groups/H5Ex_G_Create.java b/java/examples/groups/H5Ex_G_Create.java index 16b202855b5..93045383be8 100644 --- a/java/examples/groups/H5Ex_G_Create.java +++ b/java/examples/groups/H5Ex_G_Create.java @@ -24,8 +24,8 @@ public class H5Ex_G_Create { private static String GROUPNAME = "G1"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Intermediate.java b/java/examples/groups/H5Ex_G_Intermediate.java index 130ec09013d..9f0eedda353 100644 --- a/java/examples/groups/H5Ex_G_Intermediate.java +++ b/java/examples/groups/H5Ex_G_Intermediate.java @@ -30,9 +30,9 @@ public class H5Ex_G_Intermediate { private void CreateGroup() throws Exception { - long file_id = -1; - long group_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; try { // Create a new file_id using the default properties. diff --git a/java/examples/groups/H5Ex_G_Iterate.java b/java/examples/groups/H5Ex_G_Iterate.java index 47f55fed1f7..af46712fcb9 100644 --- a/java/examples/groups/H5Ex_G_Iterate.java +++ b/java/examples/groups/H5Ex_G_Iterate.java @@ -56,7 +56,7 @@ public static H5O_type get(int code) { } private static void do_iterate() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Open a file using default properties. try { diff --git a/java/examples/groups/H5Ex_G_Phase.java b/java/examples/groups/H5Ex_G_Phase.java index b1c2afc0599..67a2f53d1e5 100644 --- a/java/examples/groups/H5Ex_G_Phase.java +++ b/java/examples/groups/H5Ex_G_Phase.java @@ -59,11 +59,11 @@ public static H5G_storage get(int code) { } private static void CreateGroup() { - long file_id = -1; - long group_id = -1; - long subgroup_id = -1; - long fapl_id = -1; - long gcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long subgroup_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; H5G_info_t ginfo; String name = "G0"; // Name of subgroup_id int i; diff --git a/java/examples/groups/H5Ex_G_Traverse.java b/java/examples/groups/H5Ex_G_Traverse.java index 3410c632380..5378778aeba 100644 --- a/java/examples/groups/H5Ex_G_Traverse.java +++ b/java/examples/groups/H5Ex_G_Traverse.java @@ -42,7 +42,7 @@ public class H5Ex_G_Traverse { public static H5L_iterate_cb iter_cb = new H5L_iter_callbackT(); private static void OpenGroup() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; H5O_info_t infobuf; opdata od = new opdata(); diff --git a/java/examples/groups/H5Ex_G_Visit.java b/java/examples/groups/H5Ex_G_Visit.java index 0e935deb387..9cc8ecdab50 100644 --- a/java/examples/groups/H5Ex_G_Visit.java +++ b/java/examples/groups/H5Ex_G_Visit.java @@ -46,7 +46,7 @@ public static void main(String[] args) { private void VisitGroup() throws Exception { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; try { // Open file diff --git a/java/examples/intro/H5_CreateAttribute.java b/java/examples/intro/H5_CreateAttribute.java index 12a09a6b24f..949a7701a05 100644 --- a/java/examples/intro/H5_CreateAttribute.java +++ b/java/examples/intro/H5_CreateAttribute.java @@ -27,10 +27,10 @@ public class H5_CreateAttribute { private static String DATASETATTRIBUTE = "Units"; private static void CreateDatasetAttribute() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long attribute_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; long[] dims1 = { DIM_X, DIM_Y }; long[] dims = { 2 }; int[] attr_data = { 100, 200 }; diff --git a/java/examples/intro/H5_CreateDataset.java b/java/examples/intro/H5_CreateDataset.java index f26e6b3ecfc..f938be20d63 100644 --- a/java/examples/intro/H5_CreateDataset.java +++ b/java/examples/intro/H5_CreateDataset.java @@ -26,9 +26,9 @@ public class H5_CreateDataset { private static final int DIM_Y = 6; private static void CreateDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; // Create a new file using default properties. diff --git a/java/examples/intro/H5_CreateFile.java b/java/examples/intro/H5_CreateFile.java index 078d1d7256d..d48ba6ccce7 100644 --- a/java/examples/intro/H5_CreateFile.java +++ b/java/examples/intro/H5_CreateFile.java @@ -23,7 +23,7 @@ public class H5_CreateFile { static final String FILENAME = "H5_CreateFile.h5"; private static void CreateFile() { - long file_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroup.java b/java/examples/intro/H5_CreateGroup.java index 640e5f6b39a..c0bb954a984 100644 --- a/java/examples/intro/H5_CreateGroup.java +++ b/java/examples/intro/H5_CreateGroup.java @@ -24,8 +24,8 @@ public class H5_CreateGroup { private static String GROUPNAME = "MyGroup"; private static void CreateGroup() { - long file_id = -1; - long group_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java index a4456041894..f2c6168df10 100644 --- a/java/examples/intro/H5_CreateGroupAbsoluteRelative.java +++ b/java/examples/intro/H5_CreateGroupAbsoluteRelative.java @@ -26,10 +26,10 @@ public class H5_CreateGroupAbsoluteRelative { private static String GROUPNAME_B = "GroupB"; private static void CreateGroupAbsoluteAndRelative() { - long file_id = -1; - long group1_id = -1; - long group2_id = -1; - long group3_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; + long group3_id = HDF5Constants.H5I_INVALID_HID; // Create a new file using default properties. try { diff --git a/java/examples/intro/H5_CreateGroupDataset.java b/java/examples/intro/H5_CreateGroupDataset.java index 22874a8b723..f1d1cbaef95 100644 --- a/java/examples/intro/H5_CreateGroupDataset.java +++ b/java/examples/intro/H5_CreateGroupDataset.java @@ -31,12 +31,12 @@ public class H5_CreateGroupDataset { private static final int DIM2_Y = 10; private static void h5_crtgrpd() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; - long group_id = -1; - long group1_id = -1; - long group2_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; + long group1_id = HDF5Constants.H5I_INVALID_HID; + long group2_id = HDF5Constants.H5I_INVALID_HID; int[][] dset1_data = new int[DIM1_X][DIM1_Y]; int[][] dset2_data = new int[DIM2_X][DIM2_Y]; long[] dims1 = { DIM1_X, DIM1_Y }; @@ -107,7 +107,7 @@ private static void h5_crtgrpd() { try { if (dataspace_id >= 0) H5.H5Sclose(dataspace_id); - dataspace_id = -1; + dataspace_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); @@ -117,7 +117,7 @@ private static void h5_crtgrpd() { try { if (dataset_id >= 0) H5.H5Dclose(dataset_id); - dataset_id = -1; + dataset_id = HDF5Constants.H5I_INVALID_HID; } catch (Exception e) { e.printStackTrace(); diff --git a/java/examples/intro/H5_ReadWrite.java b/java/examples/intro/H5_ReadWrite.java index 6ba3bc27a0f..67e1ac54394 100644 --- a/java/examples/intro/H5_ReadWrite.java +++ b/java/examples/intro/H5_ReadWrite.java @@ -26,9 +26,9 @@ public class H5_ReadWrite { private static final int DIM_Y = 6; private static void ReadWriteDataset() { - long file_id = -1; - long dataspace_id = -1; - long dataset_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; long[] dims = { DIM_X, DIM_Y }; int[][] dset_data = new int[DIM_X][DIM_Y]; diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 2d0ad76cdfd..db9350e4de3 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -510,8 +510,8 @@ public synchronized static native int H5set_free_list_limits(int reg_global_lim, * * @param file_export_name * The file name to export data into. - * @param file_name - * The name of the HDF5 file containing the dataset. + * @param file_id + * The identifier of the HDF5 file containing the dataset. * @param object_path * The full path of the dataset to be exported. * @param binary_order @@ -523,7 +523,28 @@ public synchronized static native int H5set_free_list_limits(int reg_global_lim, * @exception HDF5LibraryException * - Error from the HDF-5 Library. **/ - public synchronized static native void H5export_dataset(String file_export_name, String file_name, + public synchronized static native void H5export_dataset(String file_export_name, long file_id, + String object_path, int binary_order) throws HDF5LibraryException; + + /** + * H5export_attribute is a utility function to save data in a file. + * + * @param file_export_name + * The file name to export data into. + * @param dataset_id + * The identifier of the dataset containing the attribute. + * @param object_path + * The attribute to be exported. + * @param binary_order + * 99 - export data as text. + * 1 - export data as binary Native Order. + * 2 - export data as binary Little Endian. + * 3 - export data as binary Big Endian. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + **/ + public synchronized static native void H5export_attribute(String file_export_name, long dataset_id, String object_path, int binary_order) throws HDF5LibraryException; /** diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index 5f72aee2f52..e21829f4deb 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -45,10 +45,15 @@ public class HDF5Constants { public static final int H5_SZIP_ALLOW_K13_OPTION_MASK = H5_SZIP_ALLOW_K13_OPTION_MASK(); /** Special parameters for szip compression */ public static final int H5_SZIP_CHIP_OPTION_MASK = H5_SZIP_CHIP_OPTION_MASK(); + /** indices on links, unknown index type */ public static final int H5_INDEX_UNKNOWN = H5_INDEX_UNKNOWN(); + /** indices on links, index on names */ public static final int H5_INDEX_NAME = H5_INDEX_NAME(); + /** indices on links, index on creation order */ public static final int H5_INDEX_CRT_ORDER = H5_INDEX_CRT_ORDER(); + /** indices on links, number of indices defined */ public static final int H5_INDEX_N = H5_INDEX_N(); + /** */ public static final int H5_ITER_UNKNOWN = H5_ITER_UNKNOWN(); public static final int H5_ITER_INC = H5_ITER_INC(); public static final int H5_ITER_DEC = H5_ITER_DEC(); diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java index 44b41bb9934..e08f9919666 100644 --- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java +++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java @@ -41,6 +41,8 @@ public class HDF5GroupInfo { long mtime; int linklen; + /** Container for the information reported about an HDF5 Object + * from the H5Gget_obj_info() method */ public HDF5GroupInfo() { fileno = new long[2]; objno = new long[2]; @@ -88,27 +90,32 @@ public void reset() { linklen = 0; } - /* accessors */ + /** fileno accessors */ public long[] getFileno() { return fileno; } + /** accessors */ public long[] getObjno() { return objno; } + /** accessors */ public int getType() { return type; } + /** accessors */ public int getNlink() { return nlink; } + /** accessors */ public long getMtime() { return mtime; } + /** accessors */ public int getLinklen() { return linklen; } diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 96291b33ff3..bb9357e6381 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -20,19 +20,16 @@ /** * This is a class for handling multidimensional arrays for HDF. *

- * The purpose is to allow the storage and retrieval of arbitrary array types - * containing scientific data. + * The purpose is to allow the storage and retrieval of arbitrary array types containing scientific data. *

- * The methods support the conversion of an array to and from Java to a - * one-dimensional array of bytes suitable for I/O by the C library. + * The methods support the conversion of an array to and from Java to a one-dimensional array of bytes suitable for I/O + * by the C library. *

- * This class heavily uses the HDFNativeData class to - * convert between Java and C representations. + * This class heavily uses the HDFNativeData class to convert between + * Java and C representations. */ public class HDFArray { - private Object _theArray = null; private ArrayDescriptor _desc = null; private byte[] _barray = null; @@ -40,31 +37,27 @@ public class HDFArray { // public HDFArray() {} /** - * The input must be a Java Array (possibly multidimensional) of primitive - * numbers or sub-classes of Number. + * The input must be a Java Array (possibly multidimensional) of primitive numbers or sub-classes of Number. *

- * The input is analysed to determine the number of dimensions and size of - * each dimension, as well as the type of the elements. + * The input is analysed to determine the number of dimensions and size of each dimension, as well as the type of + * the elements. *

* The description is saved in private variables, and used to convert data. * * @param anArray - * The array object. - * + * The array object. * @exception hdf.hdf5lib.exceptions.HDF5Exception - * object is not an array. + * object is not an array. */ - public HDFArray(Object anArray) throws HDF5Exception { - + public HDFArray(Object anArray) throws HDF5Exception + { if (anArray == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: array is null?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: array is null?: "); } Class tc = anArray.getClass(); if (tc.isArray() == false) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: not an array?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: not an array?: "); throw (ex); } _theArray = anArray; @@ -72,8 +65,7 @@ public HDFArray(Object anArray) throws HDF5Exception { /* extra error checking -- probably not needed */ if (_desc == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: internal error: array description failed?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: internal error: array description failed?: "); throw (ex); } } @@ -81,49 +73,48 @@ public HDFArray(Object anArray) throws HDF5Exception { /** * Allocate a one-dimensional array of bytes sufficient to store the array. * - * @return A one-D array of bytes, filled with zeroes. The bytes are - * sufficient to hold the data of the Array passed to the - * constructor. + * @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the Array passed + * to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * Allocation failed. + * Allocation failed. */ - public byte[] emptyBytes() throws HDF5JavaException { + public byte[] emptyBytes() + throws HDF5JavaException + { byte[] b = null; - if ((ArrayDescriptor.dims == 1) && (ArrayDescriptor.NT == 'B')) { + if ((ArrayDescriptor.dims == 1) + && (ArrayDescriptor.NT == 'B')) { b = (byte[]) _theArray; } else { b = new byte[ArrayDescriptor.totalSize]; } if (b == null) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: emptyBytes: allocation failed"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: emptyBytes: allocation failed"); throw (ex); } return (b); } /** - * Given a Java array of numbers, convert it to a one-dimensional array of - * bytes in correct native order. + * Given a Java array of numbers, convert it to a one-dimensional array of bytes in correct native order. * - * @return A one-D array of bytes, constructed from the Array passed to the - * constructor. + * @return A one-D array of bytes, constructed from the Array passed to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * the object not an array or other internal error. + * the object not an array or other internal error. */ - public byte[] byteify() throws HDF5JavaException { - + public byte[] byteify() + throws HDF5JavaException + { if (_barray != null) { return _barray; } if (_theArray == null) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify not an array?: "); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify not an array?: "); throw (ex); } @@ -140,73 +131,53 @@ public byte[] byteify() throws HDF5JavaException { byte[] therow; if (ArrayDescriptor.NT == 'I') { - therow = HDFNativeData.intToByte(0, - ArrayDescriptor.dimlen[1], (int[]) _theArray); + therow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[1], (int[]) _theArray); } else if (ArrayDescriptor.NT == 'S') { - therow = HDFNativeData.shortToByte(0, - ArrayDescriptor.dimlen[1], (short[]) _theArray); + therow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[1], (short[]) _theArray); } else if (ArrayDescriptor.NT == 'F') { - therow = HDFNativeData.floatToByte(0, - ArrayDescriptor.dimlen[1], (float[]) _theArray); + therow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[1], (float[]) _theArray); } else if (ArrayDescriptor.NT == 'J') { - therow = HDFNativeData.longToByte(0, - ArrayDescriptor.dimlen[1], (long[]) _theArray); + therow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[1], (long[]) _theArray); } else if (ArrayDescriptor.NT == 'D') { - therow = HDFNativeData - .doubleToByte(0, ArrayDescriptor.dimlen[1], - (double[]) _theArray); + therow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[1], (double[]) _theArray); } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { therow = ByteObjToByte((Byte[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { therow = IntegerToByte((Integer[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { therow = ShortToByte((Short[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { therow = FloatObjToByte((Float[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { therow = DoubleObjToByte((Double[]) _theArray); } - else if (ArrayDescriptor.className - .equals("java.lang.Long")) { + else if (ArrayDescriptor.className.equals("java.lang.Long")) { therow = LongObjToByte((Long[]) _theArray); } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown type of Object?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of Object?"); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown type of data?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown type of data?"); throw (ex); } - System - .arraycopy( - therow, - 0, - _barray, - 0, - (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize)); + System.arraycopy(therow, 0, _barray, 0, (ArrayDescriptor.dimlen[1] * ArrayDescriptor.NTsize)); return _barray; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } } @@ -216,8 +187,7 @@ else if (ArrayDescriptor.className _barray = new byte[ArrayDescriptor.totalSize]; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } @@ -240,8 +210,7 @@ else if (ArrayDescriptor.className else { /* check range of index */ if (index > (ArrayDescriptor.dimlen[i] - 1)) { - throw new java.lang.IndexOutOfBoundsException( - "HDFArray: byteify index OOB?"); + throw new java.lang.IndexOutOfBoundsException("HDFArray: byteify index OOB?"); } oo = java.lang.reflect.Array.get(oo, index); ArrayDescriptor.currentindex[i] = index; @@ -253,144 +222,107 @@ else if (ArrayDescriptor.className byte arow[]; try { if (ArrayDescriptor.NT == 'J') { - arow = HDFNativeData - .longToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); - arow = HDFNativeData - .longToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'I') { - arow = HDFNativeData - .intToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (int[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (int[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'S') { - arow = HDFNativeData - .shortToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.shortToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'B') { arow = (byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]; } else if (ArrayDescriptor.NT == 'F') { /* 32 bit float */ - arow = HDFNativeData - .floatToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.floatToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'D') { /* 64 bit float */ - arow = HDFNativeData - .doubleToByte( - 0, - ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); + arow = HDFNativeData.doubleToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], + (double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { arow = ByteObjToByte((Byte[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { arow = IntegerToByte((Integer[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { arow = ShortToByte((Short[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { arow = FloatObjToByte((Float[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { arow = DoubleObjToByte((Double[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.className.equals("java.lang.Long")) { arow = LongObjToByte((Long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify Object type not implemented?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify Object type not implemented?"); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify unknown type not implemented?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify unknown type not implemented?"); throw (ex); } - System - .arraycopy( - arow, - 0, - _barray, - n, - (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize)); + System.arraycopy(arow, 0, _barray, n, + (ArrayDescriptor.dimlen[ArrayDescriptor.dims] * ArrayDescriptor.NTsize)); n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: byteify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: byteify array too big?"); throw (ex); } } /* assert: the whole array is completed--currentindex should == len - 1 */ - /* error checks */ - if (n < ArrayDescriptor.totalSize) { - throw new java.lang.InternalError(new String( - "HDFArray::byteify: Panic didn't complete all input data: n= " - + n + " size = " + ArrayDescriptor.totalSize)); + throw new java.lang.InternalError(new String("HDFArray::byteify: Panic didn't complete all input data: n= " + + n + " size = " + ArrayDescriptor.totalSize)); } for (i = 0; i < ArrayDescriptor.dims; i++) { if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) { throw new java.lang.InternalError(new String( - "Panic didn't complete all data: currentindex[" + i - + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " - + (ArrayDescriptor.dimlen[i] - 1) + " ?)")); + "Panic didn't complete all data: currentindex[" + i + "] = " + ArrayDescriptor.currentindex[i] + + " (should be " + (ArrayDescriptor.dimlen[i] - 1) + " ?)")); } } return _barray; } /** - * Given a one-dimensional array of bytes representing numbers, convert it - * to a java array of the shape and size passed to the constructor. + * Given a one-dimensional array of bytes representing numbers, convert it to a java array of the shape and size + * passed to the constructor. * * @param bytes - * The bytes to construct the Array. - * @return An Array (possibly multidimensional) of primitive or number - * objects. - * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * the object not an array or other internal error. + * The bytes to construct the Array. + * @return + * An Array (possibly multidimensional) of primitive or number objects. + * @exception + * hdf.hdf5lib.exceptions.HDF5JavaException the object not an array or other internal error. */ - public Object arrayify(byte[] bytes) throws HDF5JavaException { - + public Object arrayify(byte[] bytes) throws HDF5JavaException + { if (_theArray == null) { /* exception: not an array */ - HDF5JavaException ex = new HDF5JavaException( - "arrayify: not an array?: "); + HDF5JavaException ex = new HDF5JavaException("arrayify: not an array?: "); throw (ex); } if (java.lang.reflect.Array.getLength(bytes) != ArrayDescriptor.totalSize) { /* exception: array not right size */ - HDF5JavaException ex = new HDF5JavaException( - "arrayify: array is wrong size?: "); + HDF5JavaException ex = new HDF5JavaException("arrayify: array is wrong size?: "); throw (ex); } _barray = bytes; /* hope that the bytes are correct.... */ @@ -401,95 +333,76 @@ public Object arrayify(byte[] bytes) throws HDF5JavaException { try { if (ArrayDescriptor.NT == 'I') { int[] x = HDFNativeData.byteToInt(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'S') { short[] x = HDFNativeData.byteToShort(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'F') { float x[] = HDFNativeData.byteToFloat(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'J') { long x[] = HDFNativeData.byteToLong(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'D') { double x[] = HDFNativeData.byteToDouble(_barray); - System.arraycopy(x, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(x, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'B') { - System.arraycopy(_barray, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(_barray, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.NT == 'L') { if (ArrayDescriptor.className.equals("java.lang.Byte")) { Byte I[] = ByteToByteObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Integer")) { + else if (ArrayDescriptor.className.equals("java.lang.Integer")) { Integer I[] = ByteToInteger(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Short")) { + else if (ArrayDescriptor.className.equals("java.lang.Short")) { Short I[] = ByteToShort(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Float")) { + else if (ArrayDescriptor.className.equals("java.lang.Float")) { Float I[] = ByteToFloatObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } - else if (ArrayDescriptor.className - .equals("java.lang.Double")) { + else if (ArrayDescriptor.className.equals("java.lang.Double")) { Double I[] = ByteToDoubleObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else if (ArrayDescriptor.className.equals("java.lang.Long")) { Long I[] = ByteToLongObj(_barray); - System.arraycopy(I, 0, _theArray, 0, - ArrayDescriptor.dimlen[1]); + System.arraycopy(I, 0, _theArray, 0, ArrayDescriptor.dimlen[1]); return _theArray; } else { - HDF5JavaException ex = new HDF5JavaException( - "arrayify: Object type not implemented yet..."); + HDF5JavaException ex = new HDF5JavaException("arrayify: Object type not implemented yet..."); throw (ex); } } else { - HDF5JavaException ex = new HDF5JavaException( - "arrayify: unknown type not implemented yet..."); + HDF5JavaException ex = new HDF5JavaException("arrayify: unknown type not implemented yet..."); throw (ex); } } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: arrayify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?"); throw (ex); } } @@ -501,6 +414,7 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { int index = 0; int i; Object flattenedArray = null; + switch (ArrayDescriptor.NT) { case 'J': flattenedArray = (Object) HDFNativeData.byteToLong(_barray); @@ -521,36 +435,27 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { flattenedArray = (Object) _barray; break; case 'L': - switch (ArrayDescriptor.className) { - case "java.lang.Byte": - flattenedArray = (Object) ByteToByteObj(_barray); - break; - case "java.lang.Short": - flattenedArray = (Object) ByteToShort(_barray); - break; - case "java.lang.Integer": - flattenedArray = (Object) ByteToInteger(_barray); - break; - case "java.lang.Long": - flattenedArray = (Object) ByteToLongObj(_barray); - break; - case "java.lang.Float": - flattenedArray = (Object) ByteToFloatObj(_barray); - break; - case "java.lang.Double": - flattenedArray = (Object) ByteToDoubleObj(_barray); - break; - default: - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unsupported Object type: " - + ArrayDescriptor.NT); - throw (ex); - } // end of switch statement for arrays of boxed objects - default: - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: unknown or unsupported type: " - + ArrayDescriptor.NT); - throw (ex); + { + if (ArrayDescriptor.className.equals("java.lang.Byte")) + flattenedArray = (Object) ByteToByteObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Short")) + flattenedArray = (Object) ByteToShort(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Integer")) + flattenedArray = (Object) ByteToInteger(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Long")) + flattenedArray = (Object) ByteToLongObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Float")) + flattenedArray = (Object) ByteToFloatObj(_barray); + else if (ArrayDescriptor.className.equals("java.lang.Double")) + flattenedArray = (Object) ByteToDoubleObj(_barray); + else { + HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); + throw (ex); + } + } // end of statement for arrays of boxed objects + default: + HDF5JavaException ex = new HDF5JavaException("HDFArray: unknown or unsupported type: " + ArrayDescriptor.NT); + throw (ex); } // end of switch statement for arrays of primitives while (n < ArrayDescriptor.totalSize) { @@ -579,7 +484,6 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { /* array-ify */ try { - Object arow = null; int mm = m + ArrayDescriptor.dimlen[ArrayDescriptor.dims]; switch (ArrayDescriptor.NT) { @@ -602,75 +506,64 @@ else if (ArrayDescriptor.className.equals("java.lang.Long")) { arow = (Object) Arrays.copyOfRange((double[]) flattenedArray, m, mm); break; case 'L': - switch (ArrayDescriptor.className) { - case "java.lang.Byte": - arow = (Object) Arrays.copyOfRange((Byte[])flattenedArray, m, mm); - break; - case "java.lang.Short": - arow = (Object) Arrays.copyOfRange((Short[])flattenedArray, m, mm); - break; - case "java.lang.Integer": - arow = (Object) Arrays.copyOfRange((Integer[])flattenedArray, m, mm); - break; - case "java.lang.Long": - arow = (Object) Arrays.copyOfRange((Long[])flattenedArray, m, mm); - break; - case "java.lang.Float": - arow = (Object) Arrays.copyOfRange((Float[])flattenedArray, m, mm); - break; - case "java.lang.Double": - arow = (Object) Arrays.copyOfRange((Double[])flattenedArray, m, mm); - break; - } // end of switch statement for arrays of boxed numerics + { + if (ArrayDescriptor.className.equals("java.lang.Byte")) + arow = (Object) Arrays.copyOfRange((Byte[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Short")) + arow = (Object) Arrays.copyOfRange((Short[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Integer")) + arow = (Object) Arrays.copyOfRange((Integer[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Long")) + arow = (Object) Arrays.copyOfRange((Long[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Float")) + arow = (Object) Arrays.copyOfRange((Float[]) flattenedArray, m, mm); + else if (ArrayDescriptor.className.equals("java.lang.Double")) + arow = (Object) Arrays.copyOfRange((Double[]) flattenedArray, m, mm); + else { + HDF5JavaException ex = new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); + throw (ex); + } + } // end of statement for arrays of boxed numerics } // end of switch statement for arrays of primitives - java.lang.reflect.Array.set( - ArrayDescriptor.objs[ArrayDescriptor.dims - 2], - (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), - arow); + java.lang.reflect.Array.set(ArrayDescriptor.objs[ArrayDescriptor.dims - 2], + (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]), arow); n += ArrayDescriptor.bytetoindex[ArrayDescriptor.dims - 1]; ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1]++; m = mm; } catch (OutOfMemoryError err) { - HDF5JavaException ex = new HDF5JavaException( - "HDFArray: arrayify array too big?"); + HDF5JavaException ex = new HDF5JavaException("HDFArray: arrayify array too big?"); throw (ex); } - } /* assert: the whole array is completed--currentindex should == len - 1 */ - /* error checks */ - if (n < ArrayDescriptor.totalSize) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all input data: n= " - + n + " size = " + ArrayDescriptor.totalSize)); + throw new java.lang.InternalError(new String("HDFArray::arrayify Panic didn't complete all input data: n= " + + n + " size = " + ArrayDescriptor.totalSize)); } for (i = 0; i <= ArrayDescriptor.dims - 2; i++) { if (ArrayDescriptor.currentindex[i] != ArrayDescriptor.dimlen[i] - 1) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " - + (ArrayDescriptor.dimlen[i] - 1) + "?")); + throw new java.lang.InternalError( + new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " + + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i] - 1) + + "?")); } } - if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) { - throw new java.lang.InternalError(new String( - "HDFArray::arrayify Panic didn't complete all data: currentindex[" - + i + "] = " + ArrayDescriptor.currentindex[i] - + " (should be " + (ArrayDescriptor.dimlen[i]) - + "?")); + if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims + - 1]) { + throw new java.lang.InternalError( + new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " + + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?")); } - return _theArray; } - private byte[] IntegerToByte(Integer in[]) { + private byte[] IntegerToByte(Integer in[]) + { int nelems = java.lang.reflect.Array.getLength(in); int[] out = new int[nelems]; @@ -680,7 +573,8 @@ private byte[] IntegerToByte(Integer in[]) { return HDFNativeData.intToByte(0, nelems, out); } - private Integer[] ByteToInteger(byte[] bin) { + private Integer[] ByteToInteger(byte[] bin) + { int in[] = HDFNativeData.byteToInt(bin); int nelems = java.lang.reflect.Array.getLength(in); Integer[] out = new Integer[nelems]; @@ -691,7 +585,8 @@ private Integer[] ByteToInteger(byte[] bin) { return out; } - private Integer[] ByteToInteger(int start, int len, byte[] bin) { + private Integer[] ByteToInteger(int start, int len, byte[] bin) + { int in[] = HDFNativeData.byteToInt(start, len, bin); int nelems = java.lang.reflect.Array.getLength(in); Integer[] out = new Integer[nelems]; @@ -702,7 +597,8 @@ private Integer[] ByteToInteger(int start, int len, byte[] bin) { return out; } - private byte[] ShortToByte(Short in[]) { + private byte[] ShortToByte(Short in[]) + { int nelems = java.lang.reflect.Array.getLength(in); short[] out = new short[nelems]; @@ -712,7 +608,8 @@ private byte[] ShortToByte(Short in[]) { return HDFNativeData.shortToByte(0, nelems, out); } - private Short[] ByteToShort(byte[] bin) { + private Short[] ByteToShort(byte[] bin) + { short in[] = HDFNativeData.byteToShort(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Short[] out = new Short[nelems]; @@ -723,7 +620,8 @@ private Short[] ByteToShort(byte[] bin) { return out; } - private Short[] ByteToShort(int start, int len, byte[] bin) { + private Short[] ByteToShort(int start, int len, byte[] bin) + { short in[] = (short[]) HDFNativeData.byteToShort(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Short[] out = new Short[nelems]; @@ -734,7 +632,8 @@ private Short[] ByteToShort(int start, int len, byte[] bin) { return out; } - private byte[] ByteObjToByte(Byte in[]) { + private byte[] ByteObjToByte(Byte in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); byte[] out = new byte[nelems]; @@ -744,7 +643,8 @@ private byte[] ByteObjToByte(Byte in[]) { return out; } - private Byte[] ByteToByteObj(byte[] bin) { + private Byte[] ByteToByteObj(byte[] bin) + { int nelems = java.lang.reflect.Array.getLength((Object) bin); Byte[] out = new Byte[nelems]; @@ -754,7 +654,8 @@ private Byte[] ByteToByteObj(byte[] bin) { return out; } - private Byte[] ByteToByteObj(int start, int len, byte[] bin) { + private Byte[] ByteToByteObj(int start, int len, byte[] bin) + { Byte[] out = new Byte[len]; for (int i = 0; i < len; i++) { @@ -763,7 +664,8 @@ private Byte[] ByteToByteObj(int start, int len, byte[] bin) { return out; } - private byte[] FloatObjToByte(Float in[]) { + private byte[] FloatObjToByte(Float in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); float[] out = new float[nelems]; @@ -773,7 +675,8 @@ private byte[] FloatObjToByte(Float in[]) { return HDFNativeData.floatToByte(0, nelems, out); } - private Float[] ByteToFloatObj(byte[] bin) { + private Float[] ByteToFloatObj(byte[] bin) + { float in[] = (float[]) HDFNativeData.byteToFloat(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Float[] out = new Float[nelems]; @@ -784,7 +687,8 @@ private Float[] ByteToFloatObj(byte[] bin) { return out; } - private Float[] ByteToFloatObj(int start, int len, byte[] bin) { + private Float[] ByteToFloatObj(int start, int len, byte[] bin) + { float in[] = (float[]) HDFNativeData.byteToFloat(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Float[] out = new Float[nelems]; @@ -795,7 +699,8 @@ private Float[] ByteToFloatObj(int start, int len, byte[] bin) { return out; } - private byte[] DoubleObjToByte(Double in[]) { + private byte[] DoubleObjToByte(Double in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); double[] out = new double[nelems]; @@ -805,7 +710,8 @@ private byte[] DoubleObjToByte(Double in[]) { return HDFNativeData.doubleToByte(0, nelems, out); } - private Double[] ByteToDoubleObj(byte[] bin) { + private Double[] ByteToDoubleObj(byte[] bin) + { double in[] = (double[]) HDFNativeData.byteToDouble(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Double[] out = new Double[nelems]; @@ -816,7 +722,8 @@ private Double[] ByteToDoubleObj(byte[] bin) { return out; } - private Double[] ByteToDoubleObj(int start, int len, byte[] bin) { + private Double[] ByteToDoubleObj(int start, int len, byte[] bin) + { double in[] = (double[]) HDFNativeData.byteToDouble(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Double[] out = new Double[nelems]; @@ -827,7 +734,8 @@ private Double[] ByteToDoubleObj(int start, int len, byte[] bin) { return out; } - private byte[] LongObjToByte(Long in[]) { + private byte[] LongObjToByte(Long in[]) + { int nelems = java.lang.reflect.Array.getLength((Object) in); long[] out = new long[nelems]; @@ -837,7 +745,8 @@ private byte[] LongObjToByte(Long in[]) { return HDFNativeData.longToByte(0, nelems, out); } - private Long[] ByteToLongObj(byte[] bin) { + private Long[] ByteToLongObj(byte[] bin) + { long in[] = (long[]) HDFNativeData.byteToLong(bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Long[] out = new Long[nelems]; @@ -848,7 +757,8 @@ private Long[] ByteToLongObj(byte[] bin) { return out; } - private Long[] ByteToLongObj(int start, int len, byte[] bin) { + private Long[] ByteToLongObj(int start, int len, byte[] bin) + { long in[] = (long[]) HDFNativeData.byteToLong(start, len, bin); int nelems = java.lang.reflect.Array.getLength((Object) in); Long[] out = new Long[nelems]; @@ -861,13 +771,11 @@ private Long[] ByteToLongObj(int start, int len, byte[] bin) { } /** - * This private class is used by HDFArray to discover the shape and type of an - * arbitrary array. + * This private class is used by HDFArray to discover the shape and type of an arbitrary array. *

* We use java.lang.reflection here. */ class ArrayDescriptor { - static String theType = ""; static Class theClass = null; static int[] dimlen = null; @@ -882,13 +790,12 @@ class ArrayDescriptor { static int dims = 0; static String className; - public ArrayDescriptor(Object anArray) throws HDF5Exception { - + public ArrayDescriptor(Object anArray) throws HDF5Exception + { Class tc = anArray.getClass(); if (tc.isArray() == false) { /* exception: not an array */ - HDF5Exception ex = new HDF5JavaException( - "ArrayDescriptor: not an array?: "); + HDF5Exception ex = new HDF5JavaException("ArrayDescriptor: not an array?: "); throw (ex); } @@ -960,16 +867,14 @@ else if (css.startsWith("Ljava.lang.String")) { NT = 'L'; className = "java.lang.String"; NTsize = 1; - throw new HDF5JavaException(new String( - "ArrayDesciptor: Warning: String array not fully supported yet")); + throw new HDF5JavaException(new String("ArrayDesciptor: Warning: String array not fully supported yet")); } else { /* * exception: not a numeric type */ - throw new HDF5JavaException(new String( - "ArrayDesciptor: Error: array is not numeric (type is " - + css + ") ?")); + throw new HDF5JavaException( + new String("ArrayDesciptor: Error: array is not numeric (type is " + css + ") ?")); } /* fill in the table */ @@ -1013,7 +918,8 @@ else if (css.startsWith("Ljava.lang.String")) { /** * Debug dump */ - public void dumpInfo() { + public void dumpInfo() + { System.out.println("Type: " + theType); System.out.println("Class: " + theClass); System.out.println("NT: " + NT + " NTsize: " + NTsize); @@ -1023,10 +929,8 @@ public void dumpInfo() { for (i = 0; i <= dims; i++) { Class tc = objs[i].getClass(); String ss = tc.toString(); - System.out.println(i + ": start " + dimstart[i] + ": len " - + dimlen[i] + " current " + currentindex[i] - + " bytetoindex " + bytetoindex[i] + " object " + objs[i] - + " otype " + ss); + System.out.println(i + ": start " + dimstart[i] + ": len " + dimlen[i] + " current " + currentindex[i] + + " bytetoindex " + bytetoindex[i] + " object " + objs[i] + " otype " + ss); } } } diff --git a/java/src/hdf/hdf5lib/structs/H5A_info_t.java b/java/src/hdf/hdf5lib/structs/H5A_info_t.java index 4bc1b0d6faa..f2c10f038c9 100644 --- a/java/src/hdf/hdf5lib/structs/H5A_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5A_info_t.java @@ -20,10 +20,14 @@ */ public class H5A_info_t implements Serializable{ private static final long serialVersionUID = 2791443594041667613L; - public boolean corder_valid; // Indicate if creation order is valid - public long corder; // Creation order of attribute - public int cset; // Character set of attribute name - public long data_size; // Size of raw data + /** Indicate if creation order is valid */ + public boolean corder_valid; + /** Creation order of attribute */ + public long corder; + /** Character set of attribute name */ + public int cset; + /** Size of raw data */ + public long data_size; H5A_info_t(boolean corder_valid, long corder, int cset, long data_size) { this.corder_valid = corder_valid; diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index 590f51a85db..c3307a892cf 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -1362,7 +1362,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1DIRECT(JNIEnv *env, jclass cls) #ifdef H5_HAVE_DIRECT return H5FD_DIRECT; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1376,7 +1376,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1HDFS(JNIEnv *env, jclass cls) #ifdef H5_HAVE_LIBHDFS return H5FD_HDFS; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1405,7 +1405,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1ROS3(JNIEnv *env, jclass cls) #ifdef H5_HAVE_ROS3_VFD return H5FD_ROS3; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jlong JNICALL @@ -1419,7 +1419,7 @@ Java_hdf_hdf5lib_HDF5Constants_H5FD_1WINDOWS(JNIEnv *env, jclass cls) #ifdef H5_HAVE_WINDOWS return H5FD_DIRECT; #else - return -1; + return H5I_INVALID_HID; #endif } JNIEXPORT jint JNICALL diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 24d07147a1a..24263a5913c 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1657,7 +1657,7 @@ Java_hdf_hdf5lib_H5_H5Dread_1reg_1ref(JNIEnv *env, jclass clss, jlong dataset_id for (i = 0; i < n; i++) { h5str.s[0] = '\0'; - if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, &ref_data[i], 0)) + if (!h5str_sprintf(ENVONLY, &h5str, (hid_t)dataset_id, (hid_t)mem_type_id, (void *)&ref_data[i], 0)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); if (NULL == (jstr = ENVPTR->NewStringUTF(ENVONLY, h5str.s))) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index c4021ec356e..79290f9b6e1 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -52,6 +52,8 @@ void * edata; /* Local Prototypes */ /********************/ +int h5str_region_dataset(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_buf, int expand_data); + static int h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, int expand_data); static int h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region, hid_t region_obj, @@ -644,7 +646,6 @@ h5str_region_dataset(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_b H5S_sel_type region_type = H5S_SEL_ERROR; hid_t region_obj = H5I_INVALID_HID; hid_t region_sid = H5I_INVALID_HID; - char ref_name[1024]; int ret_value = FAIL; @@ -654,14 +655,6 @@ h5str_region_dataset(JNIEnv *env, h5str_t *out_str, hid_t container, void *ref_b if ((region_sid = H5Rget_region(container, H5R_DATASET_REGION, ref_buf)) < 0) H5_LIBRARY_ERROR(ENVONLY); - if (expand_data) { - if (H5Rget_name(region_obj, H5R_DATASET_REGION, ref_buf, (char *)ref_name, 1024) < 0) - H5_LIBRARY_ERROR(ENVONLY); - - if (!h5str_append(out_str, ref_name)) - H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); - } - if ((region_type = H5Sget_select_type(region_sid)) > H5S_SEL_ERROR) { if (H5S_SEL_POINTS == region_type) { if (h5str_dump_region_points(ENVONLY, out_str, region_sid, region_obj, expand_data) < 0) @@ -1046,6 +1039,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (H5R_DSET_REG_REF_BUF_SIZE == typeSize) { if (h5str_region_dataset(ENVONLY, out_str, container, cptr, expand_data) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } else if (H5R_OBJ_REF_BUF_SIZE == typeSize) { H5O_info_t oi; @@ -1470,6 +1464,7 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + if (jndx + 1 < (size_t)npoints) if (!h5str_append(str, ", ")) H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); @@ -2691,6 +2686,128 @@ h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order) return ret_value; } /* end h5str_dump_simple_dset */ +int +h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr_id, int binary_order) +{ + hid_t f_space = H5I_INVALID_HID; /* file data space */ + hsize_t alloc_size; + int ndims; /* rank of dataspace */ + unsigned i; /* counters */ + hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/ + hsize_t p_nelmts; /* total selected elmts */ + + unsigned char *sm_buf = NULL; /* buffer for raw data */ + hsize_t sm_size[H5S_MAX_RANK]; /* stripmine size */ + hsize_t hs_nelmts; /* elements in request */ + + int ret_value = 0; + + /* VL data special information */ + unsigned int vl_data = 0; /* contains VL datatypes */ + hid_t p_type = H5I_INVALID_HID; + hid_t f_type = H5I_INVALID_HID; + + if (attr_id < 0) + H5_BAD_ARGUMENT_ERROR(ENVONLY, "h5str_dump_simple_mem: attr ID < 0"); + + if ((f_type = H5Aget_type(attr_id)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + switch (binary_order) { + case 1: { + if ((p_type = h5str_get_native_type(f_type)) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + + break; + } + + case 2: { + if ((p_type = h5str_get_little_endian_type(f_type)) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + + break; + } + + case 3: { + if ((p_type = h5str_get_big_endian_type(f_type)) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + + break; + } + + default: { + if ((p_type = H5Tcopy(f_type)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + break; + } + } + + if (H5I_INVALID_HID == (f_space = H5Aget_space(attr_id))) + H5_LIBRARY_ERROR(ENVONLY); + + if ((ndims = H5Sget_simple_extent_ndims(f_space)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if ((size_t)ndims <= (sizeof(sm_size) / sizeof(sm_size[0]))) { + if (H5Sget_simple_extent_dims(f_space, total_size, NULL) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + /* Calculate the number of elements we're going to print */ + p_nelmts = 1; + + if (ndims > 0) { + for (i = 0; i < (size_t)ndims; i++) + p_nelmts *= total_size[i]; + } /* end if */ + + if (p_nelmts > 0) { + /* Check if we have VL data in the dataset's datatype */ + if (h5str_detect_vlen(p_type) != 0) + vl_data = 1; + + alloc_size = p_nelmts * H5Tget_size(p_type); + if (NULL == (sm_buf = (unsigned char *)HDmalloc((size_t)alloc_size))) + H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_simple_mem: failed to allocate sm_buf"); + + hs_nelmts = 1; + + /* Read the data */ + if (H5Aread(attr_id, p_type, sm_buf) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + if (binary_order == 99) { + if (h5str_dump_simple_data(ENVONLY, stream, attr_id, p_type, sm_buf, p_nelmts) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + else { + if (h5str_render_bin_output(stream, attr_id, p_type, sm_buf, p_nelmts) < 0) + CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); + } + + /* Reclaim any VL memory, if necessary */ + if (vl_data) { + if (H5Dvlen_reclaim(p_type, f_space, H5P_DEFAULT, sm_buf) < 0) + H5_LIBRARY_ERROR(ENVONLY); + } + } + } + + ret_value = SUCCEED; + +done: + if (sm_buf) + HDfree(sm_buf); + if (f_space >= 0) + H5Sclose(f_space); + if (p_type >= 0) + H5Tclose(p_type); + if (f_type >= 0) + H5Tclose(f_type); + + return ret_value; +} + htri_t H5Tdetect_variable_str(hid_t tid) { @@ -2757,6 +2874,7 @@ h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, v if (HDfprintf(stream, "%s", buffer.s) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); + h5str_free(&buffer); } /* end for (i = 0; i < nelmts... */ @@ -3323,18 +3441,16 @@ obj_info_max(hid_t loc_id, const char *name, const H5L_info_t *info, void *op_da /* * Class: hdf_hdf5lib_H5 * Method: H5export_dataset - * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V + * Signature: (Ljava/lang/String;JLjava/lang/String;I)V */ JNIEXPORT void JNICALL -Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_export_name, jstring file_name, +Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_export_name, jlong file_id, jstring object_path, jint binary_order) { const char *file_export = NULL; const char *object_name = NULL; - const char *fileName = NULL; jboolean isCopy; herr_t ret_val = FAIL; - hid_t file_id = H5I_INVALID_HID; hid_t dataset_id = H5I_INVALID_HID; FILE * stream = NULL; @@ -3343,17 +3459,9 @@ Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_exp if (NULL == file_export_name) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: file_export_name is NULL"); - if (NULL == file_name) - H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: file_name is NULL"); - if (NULL == object_path) H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: object_path is NULL"); - PIN_JAVA_STRING(ENVONLY, file_name, fileName, NULL, "H5export_dataset: file name not pinned"); - - if ((file_id = H5Fopen(fileName, (unsigned)H5F_ACC_RDWR, (hid_t)H5P_DEFAULT)) < 0) - H5_LIBRARY_ERROR(ENVONLY); - PIN_JAVA_STRING(ENVONLY, object_path, object_name, &isCopy, "H5export_dataset: object_path not pinned"); if ((dataset_id = H5Dopen2(file_id, object_name, H5P_DEFAULT)) < 0) @@ -3380,14 +3488,64 @@ Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *env, jclass clss, jstring file_exp UNPIN_JAVA_STRING(ENVONLY, file_export_name, file_export); if (object_name) UNPIN_JAVA_STRING(ENVONLY, object_path, object_name); - if (fileName) - UNPIN_JAVA_STRING(ENVONLY, file_name, fileName); if (dataset_id >= 0) H5Dclose(dataset_id); - if (file_id >= 0) - H5Fclose(file_id); } /* end Java_hdf_hdf5lib_H5_H5export_1dataset */ +/* + * Class: hdf_hdf5lib_H5 + * Method: H5export_attribute + * Signature: (Ljava/lang/String;JLjava/lang/String;I)V + */ +JNIEXPORT void JNICALL +Java_hdf_hdf5lib_H5_H5export_1attribute(JNIEnv *env, jclass clss, jstring file_export_name, jlong dset_id, + jstring object_path, jint binary_order) +{ + const char *file_export = NULL; + const char *object_name = NULL; + jboolean isCopy; + herr_t ret_val = FAIL; + hid_t attr_id = H5I_INVALID_HID; + FILE * stream = NULL; + + UNUSED(clss); + + if (NULL == file_export_name) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: file_export_name is NULL"); + + if (NULL == object_path) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5export_dataset: object_path is NULL"); + + PIN_JAVA_STRING(ENVONLY, object_path, object_name, &isCopy, "H5export_dataset: object_path not pinned"); + + if ((attr_id = H5Aopen(dset_id, object_name, H5P_DEFAULT)) < 0) + H5_LIBRARY_ERROR(ENVONLY); + + PIN_JAVA_STRING(ENVONLY, file_export_name, file_export, NULL, + "H5export_dataset: file_export name not pinned"); + + if (NULL == (stream = HDfopen(file_export, "w+"))) + H5_JNI_FATAL_ERROR(ENVONLY, "HDfopen failed"); + + if ((ret_val = h5str_dump_simple_mem(ENVONLY, stream, attr_id, binary_order)) < 0) + H5_ASSERTION_ERROR(ENVONLY, "h5str_dump_simple_dset failed"); + + if (stream) { + HDfclose(stream); + stream = NULL; + } + +done: + if (stream) + HDfclose(stream); + if (file_export) + UNPIN_JAVA_STRING(ENVONLY, file_export_name, file_export); + if (object_name) + UNPIN_JAVA_STRING(ENVONLY, object_path, object_name); + if (attr_id >= 0) + H5Aclose(attr_id); +} /* end Java_hdf_hdf5lib_H5_H5export_1attribute */ + #ifdef __cplusplus } #endif diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 19415b4731a..1360c6709fb 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -45,6 +45,7 @@ extern size_t h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_ int expand_data); extern void h5str_array_free(char **strs, size_t len); extern int h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order); +extern int h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr, int binary_order); extern htri_t H5Tdetect_variable_str(hid_t tid); @@ -103,9 +104,17 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1max(JNIEnv *, jcla /* * Class: hdf_hdf5lib_H5 * Method: H5export_dataset - * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V + * Signature: (Ljava/lang/String;JLjava/lang/String;I)V */ -JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *, jclass, jstring, jstring, jstring, +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *, jclass, jstring, jlong, jstring, jint); +/* + * Class: hdf_hdf5lib_H5 + * Method: H5export_attribute + * Signature: (Ljava/lang/String;JLjava/lang/String;I)V + */ +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1attribute(JNIEnv *, jclass, jstring, jlong, jstring, + jint); + #endif /* H5UTIL_H__ */ diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index d6d5da6b238..ff905cecff6 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -92,6 +92,8 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateL2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list}) diff --git a/java/test/TestH5.java b/java/test/TestH5.java index ae8e039191f..dedefd40b6f 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -31,6 +31,7 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; import org.junit.After; @@ -46,22 +47,21 @@ */ public class TestH5 { @Rule public TestName testname = new TestName(); - @Before - public void showTestName() { - System.out.print(testname.getMethodName()); - } - @After - public void nextTestName() { - System.out.println(); - } private static final String H5_FILE = "testData.h5"; private static final String EXPORT_FILE = "testExport.txt"; + private static final String H5_DREG_FILE = "trefer_reg.h5"; + private static final String EXPORT_DREG_FILE = "testExportReg.txt"; + private static final String H5_AREG_FILE = "trefer_attr.h5"; + private static final String EXPORT_AREG_FILE = "testExportAReg.txt"; private static final int DIM_X = 4; private static final int DIM_Y = 6; + private static final int DIM_BLKS = 36; + private static final int DIM_PNTS = 10; + private static final int DIM_ATTR = 12; private static final int RANK = 2; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -77,7 +77,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32LE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -114,22 +114,64 @@ private final void _createH5File() { } } - public final void _closeH5File() throws HDF5LibraryException { + private final void _closeH5File() { if (H5did >= 0) try {H5.H5Dclose(H5did);} catch (Exception ex) {} if (H5dsid > 0) try {H5.H5Sclose(H5dsid);} catch (Exception ex) {} if (H5fid > 0) try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; - H5dsid = -1; - H5did = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; + H5dsid = HDF5Constants.H5I_INVALID_HID; + H5did = HDF5Constants.H5I_INVALID_HID; + } + + public void _openH5File(String filename, String dsetname) { + try { + H5fid = H5.H5Fopen(filename, + HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Fopen: ", H5fid >= 0); + try { + H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Dopen: ", H5did >= 0); + try { + H5dsid = H5.H5Dget_space(H5did); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5._openH5file: " + err); + } + assertTrue("TestH5._openH5file: H5.H5Screate_simple: ",H5dsid > 0); } public final void _deleteH5file() { + _closeH5File(); _deleteFile(H5_FILE); } + @After + public void closeH5File() throws HDF5LibraryException { + _closeH5File(); + System.out.println(); + } + + @Before + public void verifyCount() + throws NullPointerException, HDF5Exception { + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + } + /** * Test method for {@link hdf.hdf5lib.H5#J2C(int)}. * NOTE: @@ -373,8 +415,10 @@ public void testH5export_dataset() { _closeH5File(); + _openH5File(H5_FILE, "/dset"); + try { - H5.H5export_dataset(EXPORT_FILE, H5_FILE, "/dset", 99); + H5.H5export_dataset(EXPORT_FILE, H5fid, "/dset", 99); } catch (HDF5LibraryException err) { err.printStackTrace(); @@ -410,4 +454,88 @@ public void testH5export_dataset() { } _deleteH5file(); } + + @Test + public void testH5export_regdataset() { + int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, + 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171, + 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231, + 207, 66, 252, 48, 84, 96, 12, 14, 213, 99}; + int[] dset_indata = new int[DIM_BLKS+DIM_PNTS]; + String objName = "/Dataset1"; + + _openH5File(H5_DREG_FILE, objName); + + try { + H5.H5export_dataset(EXPORT_DREG_FILE, H5fid, objName, 99); + } + catch (HDF5LibraryException err) { + err.printStackTrace(); + fail("H5export_dataset failed: " + err); + } + + File file = new File(EXPORT_DREG_FILE); + + try { + Reader reader = new FileReader(EXPORT_DREG_FILE); + StreamTokenizer streamTokenizer = new StreamTokenizer(reader); + int indx = 0; + while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){ + if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) { + dset_indata[indx] = (int)streamTokenizer.nval; + indx++; + } + } + reader.close(); + } + catch (IOException err) { + err.printStackTrace(); + fail("read file failed: " + err); + } + for(int row = 0; row < DIM_X; row++) + assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + } + + @Test + public void testH5export_attrdataset() { + int[] dset_data_expect = {66, 69, 72, 75, 78, 81, 96, 99, 102, 105, 108, + 111, 126, 129, 132, 135, 138, 141, 156, 159, 162, 165, 168, 171, + 186, 189, 192, 195, 198, 201, 216, 219, 222, 225, 228, 231, + 207, 66, 252, 48, 84, 96, 12, 14, 213, 99}; + int[] dset_indata = new int[DIM_BLKS+DIM_PNTS]; + String dsetName = "/Dataset1"; + String objName = "Attribute1"; + + _openH5File(H5_AREG_FILE, dsetName); + + try { + H5.H5export_attribute(EXPORT_AREG_FILE, H5did, objName, 99); + } + catch (HDF5LibraryException err) { + err.printStackTrace(); + fail("H5export_dataset failed: " + err); + } + + File file = new File(EXPORT_AREG_FILE); + + try { + Reader reader = new FileReader(EXPORT_AREG_FILE); + StreamTokenizer streamTokenizer = new StreamTokenizer(reader); + int indx = 0; + int jndx = 0; + while(streamTokenizer.nextToken() != StreamTokenizer.TT_EOF){ + if(streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) { + dset_indata[indx] = (int)streamTokenizer.nval; + indx++; + } + } + reader.close(); + } + catch (IOException err) { + err.printStackTrace(); + fail("read file failed: " + err); + } + for(int row = 0; row < DIM_X; row++) + assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + } } diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index 58e5ca602bd..b7ce792081c 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -42,13 +42,14 @@ public class TestH5A { private static final String H5_FILE = "testA.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; - long type_id = -1; - long space_id = -1; - long lapl_id = -1; + long type_id = HDF5Constants.H5I_INVALID_HID; + long space_id = HDF5Constants.H5I_INVALID_HID; + long lapl_id = HDF5Constants.H5I_INVALID_HID; + long aapl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -59,7 +60,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -126,7 +127,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Acreate2() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); assertTrue("testH5Acreate2", attr_id >= 0); @@ -154,8 +155,8 @@ public void testH5Acreate2_nullname() throws Throwable { @Test public void testH5Aopen() { String attr_name = "dset"; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, attr_name, type_id, space_id, @@ -191,9 +192,8 @@ public void testH5Aopen_by_idx() { int idx_type = HDF5Constants.H5_INDEX_CRT_ORDER; int order = HDF5Constants.H5_ITER_INC; long n = 0; - long attr_id = -1; - long attribute_id = -1; - long aapl_id = HDF5Constants.H5P_DEFAULT; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "file", type_id, space_id, @@ -202,7 +202,7 @@ public void testH5Aopen_by_idx() { // Opening the existing attribute, obj_name(Created by H5ACreate2) // by index, attached to an object identifier. attribute_id = H5.H5Aopen_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, - 0, HDF5Constants.H5P_DEFAULT, lapl_id); + 0, aapl_id, lapl_id); assertTrue("testH5Aopen_by_idx: H5Aopen_by_idx", attribute_id >= 0); @@ -251,13 +251,13 @@ public void testH5Aopen_by_idx() { public void testH5Acreate_by_name() { String obj_name = "."; String attr_name = "DATASET"; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; boolean bool_val = false; try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, - HDF5Constants.H5P_DEFAULT, lapl_id); + aapl_id, lapl_id); assertTrue("testH5Acreate_by_name: H5Acreate_by_name", attribute_id >= 0); @@ -283,12 +283,12 @@ public void testH5Arename() throws Throwable, HDF5LibraryException, NullPointerE long loc_id = H5fid; String old_attr_name = "old"; String new_attr_name = "new"; - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; try { - attr_id = H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, lapl_id); + attr_id = H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id); ret_val = H5.H5Arename(loc_id, old_attr_name, new_attr_name); @@ -321,13 +321,13 @@ public void testH5Arename_by_name() { String obj_name = "."; String old_attr_name = "old"; String new_attr_name = "new"; - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; try { attr_id = H5.H5Acreate_by_name(loc_id, obj_name, old_attr_name, - type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id); + type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id); ret_val = H5.H5Arename_by_name(loc_id, obj_name, old_attr_name, new_attr_name, lapl_id); @@ -363,12 +363,12 @@ public void testH5Aget_name() { String obj_name = "."; String attr_name = "DATASET1"; String ret_name = null; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, - HDF5Constants.H5P_DEFAULT, lapl_id); + aapl_id, lapl_id); assertTrue("testH5Aget_name: H5Acreate_by_name ", attribute_id > 0); ret_name = H5.H5Aget_name(attribute_id); assertEquals(ret_name, attr_name); @@ -393,8 +393,8 @@ public void testH5Aget_name_by_idx() { int idx_type = HDF5Constants.H5_INDEX_NAME; int order = HDF5Constants.H5_ITER_INC; int n = 0; - long attr1_id = -1; - long attr2_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(loc_id, obj_name, attr_name, @@ -430,8 +430,8 @@ public void testH5Aget_name_by_idx() { @Test public void testH5Aget_storage_size() { - long attr_id = -1; - long attr_size = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attr_size = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, @@ -453,8 +453,8 @@ public void testH5Aget_storage_size() { @Test public void testH5Aget_info() { H5A_info_t attr_info = null; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; try { attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, @@ -485,8 +485,8 @@ public void testH5Aget_info() { @Test public void testH5Aget_info1() { H5A_info_t attr_info = null; - long attribute_id = -1; - long attr_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long attr_id = HDF5Constants.H5I_INVALID_HID; int order = HDF5Constants.H5_ITER_INC; try { @@ -521,8 +521,8 @@ public void testH5Aget_info1() { @Test public void testH5Aget_info_by_idx() { - long attr_id = -1; - long attr2_id = -1;; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID;; H5A_info_t attr_info = null; try { @@ -577,7 +577,7 @@ public void testH5Aget_info_by_idx() { @Test public void testH5Aget_info_by_name() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; H5A_info_t attr_info = null; String obj_name = "."; String attr_name = "DATASET"; @@ -602,7 +602,7 @@ public void testH5Aget_info_by_name() { @Test public void testH5Adelete_by_name() { - long attr_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; int ret_val = -1; boolean bool_val = false; boolean exists = false; @@ -645,8 +645,8 @@ public void testH5Adelete_by_name() { @Test public void testH5Aexists() { boolean exists = false; - long attr_id = -1; - long attribute_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { exists = H5.H5Aexists(H5fid, "None"); @@ -684,10 +684,10 @@ public void testH5Aexists() { @Test public void testH5Adelete_by_idx_order() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -726,9 +726,9 @@ public void testH5Adelete_by_idx_order() { @Test public void testH5Adelete_by_idx_name1() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -761,10 +761,10 @@ public void testH5Adelete_by_idx_name1() { @Test public void testH5Adelete_by_idx_name2() { boolean exists = false; - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; try { attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1", @@ -816,8 +816,8 @@ public void testH5Adelete_by_idx_invalidobject() throws Throwable { public void testH5Aopen_by_name() { String obj_name = "."; String attr_name = "DATASET"; - long attribute_id = -1; - long aid = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; + long aid = HDF5Constants.H5I_INVALID_HID; try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, @@ -851,9 +851,9 @@ public void testH5Aopen_by_name() { @Test public void testH5Awrite_readVL() { String attr_name = "VLdata"; - long attr_id = -1; - long atype_id = -1; - long aspace_id = -1; + long attr_id = HDF5Constants.H5I_INVALID_HID; + long atype_id = HDF5Constants.H5I_INVALID_HID; + long aspace_id = HDF5Constants.H5I_INVALID_HID; String[] str_data = { "Parting", "is such", "sweet", "sorrow." }; long[] dims = { str_data.length }; long lsize = 1; @@ -918,8 +918,8 @@ public void testH5Awrite_readVL() { public void testH5Aget_create_plist() { String attr_name = "DATASET1"; int char_encoding = 0; - long plist_id = -1; - long attribute_id = -1; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { plist_id = H5.H5Pcreate(HDF5Constants.H5P_ATTRIBUTE_CREATE); @@ -979,10 +979,10 @@ public void testH5Aget_create_plist() { @Test public void testH5Aiterate() { - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; class idata { public String attr_name = null; @@ -1047,10 +1047,10 @@ public int callback(long group, String name, H5A_info_t info, H5A_iterate_t op_d @Test public void testH5Aiterate_by_name() { - long attr1_id = -1; - long attr2_id = -1; - long attr3_id = -1; - long attr4_id = -1; + long attr1_id = HDF5Constants.H5I_INVALID_HID; + long attr2_id = HDF5Constants.H5I_INVALID_HID; + long attr3_id = HDF5Constants.H5I_INVALID_HID; + long attr4_id = HDF5Constants.H5I_INVALID_HID; class idata { public String attr_name = null; diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 74040eec982..863ce791624 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -38,13 +38,13 @@ public class TestH5D { private static final int DIM_X = 4; private static final int DIM_Y = 6; private static final int RANK = 2; - long H5fid = -1; - long H5faplid = -1; - long H5dsid = -1; - long H5dtid = -1; - long H5did = -1; - long H5did0 = -1; - long H5dcpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5faplid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5dtid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5did0 = HDF5Constants.H5I_INVALID_HID; + long H5dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; // Values for the status of space allocation @@ -194,9 +194,9 @@ private final void _closeH5file() throws HDF5LibraryException { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} } - private final void _openH5file(String name, long dapl) { + private final void _openH5file(String filename, String dsetname, long dapl) { try { - H5fid = H5.H5Fopen(H5_FILE, + H5fid = H5.H5Fopen(filename, HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { @@ -205,7 +205,7 @@ private final void _openH5file(String name, long dapl) { } assertTrue("TestH5D._openH5file: H5.H5Fopen: ",H5fid >= 0); try { - H5did = H5.H5Dopen(H5fid, name, dapl); + H5did = H5.H5Dopen(H5fid, dsetname, dapl); } catch (Throwable err) { err.printStackTrace(); @@ -267,7 +267,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Dcreate() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -291,7 +291,7 @@ public void testH5Dcreate() { @Test public void testH5Dcreate_anon() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate_anon(H5fid, HDF5Constants.H5T_STD_I32BE, H5dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -314,12 +314,12 @@ public void testH5Dcreate_anon() { @Test public void testH5Dopen() { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { H5.H5Dclose(H5did); - H5did = -1; + H5did = HDF5Constants.H5I_INVALID_HID; dataset_id = H5.H5Dopen(H5fid, "dset", HDF5Constants.H5P_DEFAULT); } catch (Exception err) { @@ -387,8 +387,8 @@ public void testH5Dget_storage_size() { @Test public void testH5Dget_access_plist() { - long dapl_id = -1; - long test_dapl_id = -1; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long test_dapl_id = HDF5Constants.H5I_INVALID_HID; int[] mdc_nelmts1 = {0}; int[] mdc_nelmts2 = {0}; long[] rdcc_nelmts1 = {0}; @@ -499,7 +499,7 @@ public void testH5Dget_space_status() { @Test(expected = HDF5LibraryException.class) public void testH5Dget_space_closed() throws Throwable { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -517,7 +517,7 @@ public void testH5Dget_space_closed() throws Throwable { @Test public void testH5Dget_space() { - long dataspace_id = -1; + long dataspace_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { @@ -541,7 +541,7 @@ public void testH5Dget_space() { @Test(expected = HDF5LibraryException.class) public void testH5Dget_type_closed() throws Throwable { - long dataset_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; try { dataset_id = H5.H5Dcreate(H5fid, "dset", HDF5Constants.H5T_STD_I32BE, H5dsid, @@ -559,7 +559,7 @@ public void testH5Dget_type_closed() throws Throwable { @Test public void testH5Dget_type() { - long datatype_id = -1; + long datatype_id = HDF5Constants.H5I_INVALID_HID; _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); try { diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java index 6d516a4b9a9..774b9dd7f78 100644 --- a/java/test/TestH5Dplist.java +++ b/java/test/TestH5Dplist.java @@ -41,10 +41,10 @@ public class TestH5Dplist { private static final int NDIMS = 2; private static final int FILLVAL = 99; private static final int RANK = 2; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5dcpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5dcpl_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; long[] H5extdims = { EDIM_X, EDIM_Y }; long[] H5chunk_dims = { CHUNK_X, CHUNK_Y }; diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 696e4589411..6ef8dc11078 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -76,7 +76,6 @@ public void H5Erestore_stack_class() { @Test public void testH5Eget_msg_major() { - try { H5.H5Fopen("test", 0, 1); } diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index e3ea16620be..f8712b3678a 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -46,7 +46,7 @@ public class TestH5F { HDF5Constants.H5F_OBJ_DATASET, HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE, HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL }; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -71,7 +71,7 @@ public void createH5file() public void deleteH5file() throws HDF5LibraryException { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } _deleteFile(H5_FILE); System.out.println(); @@ -79,7 +79,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Fget_create_plist() { - long plist = -1; + long plist = HDF5Constants.H5I_INVALID_HID; try { plist = H5.H5Fget_create_plist(H5fid); @@ -103,7 +103,7 @@ public void testH5Fget_create_plist_closed() throws Throwable { @Test public void testH5Fget_access_plist() { - long plist = -1; + long plist = HDF5Constants.H5I_INVALID_HID; try { plist = H5.H5Fget_access_plist(H5fid); @@ -131,7 +131,7 @@ public void testH5Fget_intent_rdwr() { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } try { @@ -156,7 +156,7 @@ public void testH5Fget_intent_rdonly() { if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } try { diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index d0b4425b4d3..366eefc6070 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -34,7 +34,7 @@ public class TestH5Fbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testFb.h5"; private static final String TXT_FILE = "testFb.txt"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -89,7 +89,7 @@ public void testH5Fcreate_EXCL() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Fopen_read_only() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -124,8 +124,8 @@ public void testH5Fopen_read_only() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Freopen_closed() throws Throwable { - long fid = -1; - long fid2 = -1; + long fid = HDF5Constants.H5I_INVALID_HID; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -147,8 +147,8 @@ public void testH5Freopen_closed() throws Throwable { @Test public void testH5Freopen() { - long fid = -1; - long fid2 = -1; + long fid = HDF5Constants.H5I_INVALID_HID; + long fid2 = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -181,7 +181,7 @@ public void testH5Freopen() { @Test public void testH5Fclose() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, @@ -201,7 +201,7 @@ public void testH5Fclose() { @Test(expected = HDF5LibraryException.class) public void testH5Fclose_twice() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fopen(H5_FILE, HDF5Constants.H5F_ACC_RDWR, diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index ac54e2cc953..77069db6eca 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -104,7 +104,7 @@ public void testH5Fclose_negative() throws Throwable { @Test public void testH5Fcreate() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; File file = null; try { @@ -131,7 +131,7 @@ public void testH5Fcreate() { @Test public void testH5Fflush_global() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, @@ -157,7 +157,7 @@ public void testH5Fflush_global() { @Test public void testH5Fflush_local() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC, @@ -183,7 +183,7 @@ public void testH5Fflush_local() { @Test public void testH5Fget_info() { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { @@ -214,7 +214,7 @@ public void testH5Fget_info() { @Ignore//(expected = HDF5FunctionArgumentException.class) public void testH5Fset_libver_bounds_invalidlow() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { @@ -233,7 +233,7 @@ public void testH5Fset_libver_bounds_invalidlow() throws Throwable { @Ignore//(expected = HDF5FunctionArgumentException.class) public void testH5Fset_libver_bounds_invalidhigh() throws Throwable { - long fid = -1; + long fid = HDF5Constants.H5I_INVALID_HID; try { try { diff --git a/java/test/TestH5Fswmr.java b/java/test/TestH5Fswmr.java index 20578866e2b..1ec78fe9974 100644 --- a/java/test/TestH5Fswmr.java +++ b/java/test/TestH5Fswmr.java @@ -32,9 +32,9 @@ public class TestH5Fswmr { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testswmr.h5"; - long H5fid = -1; - long H5fapl = -1; - long H5fcpl = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5fapl = HDF5Constants.H5I_INVALID_HID; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -62,15 +62,15 @@ public void createH5file() public void deleteH5file() throws HDF5LibraryException { if (H5fapl > 0) { try {H5.H5Pclose(H5fapl);} catch (Exception ex) {} - H5fapl = -1; + H5fapl = HDF5Constants.H5I_INVALID_HID; } if (H5fcpl > 0) { try {H5.H5Pclose(H5fcpl);} catch (Exception ex) {} - H5fcpl = -1; + H5fcpl = HDF5Constants.H5I_INVALID_HID; } if (H5fid > 0) { try {H5.H5Fclose(H5fid);} catch (Exception ex) {} - H5fid = -1; + H5fid = HDF5Constants.H5I_INVALID_HID; } _deleteFile(H5_FILE); System.out.println(); diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index 2f0d1b7134f..c31b5f12efd 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -37,11 +37,11 @@ public class TestH5G { private static final String[] GROUPS = { "/G1", "/G1/G11", "/G1/G12", "/G1/G11/G111", "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114" }; private static final String[] GROUPS2 = { "/G1", "/G1/G14", "/G1/G12", "/G1/G13", "/G1/G11"}; - long H5fid = -1; - long H5fid2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5fid2 = HDF5Constants.H5I_INVALID_HID; private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -56,8 +56,8 @@ private final long _createGroup(long fid, String name) { } private final long _createGroup2(long fid, String name) { - long gid = -1; - long gcpl = -1; + long gid = HDF5Constants.H5I_INVALID_HID; + long gcpl = HDF5Constants.H5I_INVALID_HID; try { gcpl = H5.H5Pcreate(HDF5Constants.H5P_GROUP_CREATE); //create gcpl } @@ -90,12 +90,12 @@ private final long _createGroup2(long fid, String name) { } private final long _openGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { - gid = -1; + gid = HDF5Constants.H5I_INVALID_HID; err.printStackTrace(); fail("H5.H5Gopen: " + err); } @@ -132,7 +132,7 @@ public void createH5file() assertTrue("TestH5G.createH5file: H5.H5Fcreate: ", H5fid > 0); assertTrue("TestH5G.createH5file: H5.H5Fcreate: ", H5fid2 > 0); - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { gid = _createGroup(H5fid, GROUPS[i]); @@ -163,7 +163,7 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Gopen() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { try { gid = H5.H5Gopen(H5fid, GROUPS[i], HDF5Constants.H5P_DEFAULT); @@ -183,8 +183,8 @@ public void testH5Gopen() { @Test public void testH5Gget_create_plist() { - long gid = -1; - long pid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; + long pid = HDF5Constants.H5I_INVALID_HID; for (int i = 0; i < GROUPS.length; i++) { try { diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java index db6fd5e6a0e..6e2e4505e6e 100644 --- a/java/test/TestH5Gbasic.java +++ b/java/test/TestH5Gbasic.java @@ -32,10 +32,10 @@ public class TestH5Gbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testGb.h5"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -84,7 +84,7 @@ public void testH5Gclose_invalid() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Gcreate_null() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; // it should fail because the group name is null gid = H5.H5Gcreate(H5fid, null, HDF5Constants.H5P_DEFAULT, @@ -101,7 +101,7 @@ public void testH5Gcreate_invalid() throws Throwable { @Test public void testH5Gcreate() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(H5fid, "/testH5Gcreate", HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, @@ -144,7 +144,7 @@ public void testH5Gcreate_exists() throws Throwable { @Test public void testH5Gcreate_anon() { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate_anon(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -160,7 +160,7 @@ public void testH5Gcreate_anon() { @Test(expected = NullPointerException.class) public void testH5Gopen_null() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; gid = H5.H5Gopen(H5fid, null, HDF5Constants.H5P_DEFAULT); @@ -174,7 +174,7 @@ public void testH5Gopen_invalid() throws Throwable { @Test(expected = HDF5LibraryException.class) public void testH5Gopen_not_exists() throws Throwable { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; gid = H5.H5Gopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT); @@ -208,7 +208,7 @@ public void testH5Gget_create_plist_invalid() throws Throwable { @Test public void testH5Gget_create_plist() { - long pid = -1; + long pid = HDF5Constants.H5I_INVALID_HID; long gid = _createGroup(H5fid, "/testH5Gcreate"); assertTrue(gid > 0); diff --git a/java/test/TestH5Giterate.java b/java/test/TestH5Giterate.java index da687c11806..3c137f5d1c6 100644 --- a/java/test/TestH5Giterate.java +++ b/java/test/TestH5Giterate.java @@ -29,15 +29,15 @@ public class TestH5Giterate { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "h5ex_g_iterate.hdf"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; private final long _openGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gopen(fid, name, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { - gid = -1; + gid = HDF5Constants.H5I_INVALID_HID; err.printStackTrace(); fail("H5.H5Gcreate: " + err); } diff --git a/java/test/TestH5Lbasic.java b/java/test/TestH5Lbasic.java index ecdd6c486a9..8866a6bc2b8 100644 --- a/java/test/TestH5Lbasic.java +++ b/java/test/TestH5Lbasic.java @@ -34,7 +34,7 @@ public class TestH5Lbasic { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "h5ex_g_iterateL1.hdf"; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; @Before public void openH5file() diff --git a/java/test/TestH5Lcreate.java b/java/test/TestH5Lcreate.java index e40b7ce3631..c35c7801ab0 100644 --- a/java/test/TestH5Lcreate.java +++ b/java/test/TestH5Lcreate.java @@ -40,13 +40,13 @@ public class TestH5Lcreate { private static final String H5_FILE = "testL.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fcpl = -1; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -63,7 +63,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -79,7 +79,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, diff --git a/java/test/TestH5Obasic.java b/java/test/TestH5Obasic.java index bd951c3d0a6..3ceade1cce8 100644 --- a/java/test/TestH5Obasic.java +++ b/java/test/TestH5Obasic.java @@ -38,7 +38,7 @@ public class TestH5Obasic { private static long H5la_l1 = -1; private static long H5la_dt1 = -1; private static long H5la_g1 = -1; - long H5fid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; @Before public void openH5file() @@ -66,7 +66,7 @@ public void closeH5file() throws HDF5LibraryException { @Test(expected = HDF5LibraryException.class) public void testH5Oopen_not_exists() throws Throwable { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; oid = H5.H5Oopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT); @@ -75,7 +75,7 @@ public void testH5Oopen_not_exists() throws Throwable { @Test public void testH5Oget_info_dataset() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { @@ -93,7 +93,7 @@ public void testH5Oget_info_dataset() { @Test public void testH5Oget_info_hardlink() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT); @@ -110,7 +110,7 @@ public void testH5Oget_info_hardlink() { @Test public void testH5Oget_info_group() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "G1", HDF5Constants.H5P_DEFAULT); @@ -127,7 +127,7 @@ public void testH5Oget_info_group() { @Test public void testH5Oget_info_datatype() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "DT1", HDF5Constants.H5P_DEFAULT); @@ -257,7 +257,7 @@ public void testH5Oget_info_by_idx_n0() { @Test public void testH5Oget_info_by_idx_n3() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { oid = H5.H5Oopen(H5fid, "L1", HDF5Constants.H5P_DEFAULT); @@ -409,7 +409,7 @@ public void testH5Oopen_by_addr() { @Test public void testH5Oopen_by_idx_n0() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { @@ -447,7 +447,7 @@ public void testH5Oopen_by_idx_n0() { @Test public void testH5Oopen_by_idx_n3() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java index 5a52f12c94f..b3b1acd9cdc 100644 --- a/java/test/TestH5Ocopy.java +++ b/java/test/TestH5Ocopy.java @@ -35,13 +35,13 @@ public class TestH5Ocopy { private static final String FILENAME = "testRefsattribute.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; - long H5dsid2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; + long H5dsid2 = HDF5Constants.H5I_INVALID_HID; long[] dims = { 2 }; private final void _deleteFile(String filename) { @@ -58,7 +58,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -74,7 +74,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, @@ -135,10 +135,10 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5OcopyRefsAttr() { - long ocp_plist_id = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; byte rbuf0[]=null , rbuf1[] = null; byte[] dset_data = new byte[16]; - long attribute_id = -1; + long attribute_id = HDF5Constants.H5I_INVALID_HID; try { @@ -183,9 +183,9 @@ public void testH5OcopyRefsAttr() { public void testH5OcopyRefsDatasettodiffFile() { byte rbuf1[] = null; byte[] dset_data = new byte[16]; - long ocp_plist_id = -1; - long dataset_id = -1; - long H5fid2 = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long H5fid2 = HDF5Constants.H5I_INVALID_HID; try { rbuf1 = H5.H5Rcreate(H5fid, "DS2", HDF5Constants.H5R_OBJECT, -1); @@ -243,9 +243,9 @@ public void testH5OcopyRefsDatasettodiffFile() { public void testH5OcopyRefsDatasettosameFile() { byte rbuf0[]=null , rbuf1[] = null; byte[] dset_data = new byte[16]; - long ocp_plist_id = -1; - long dataset_id = -1; - long did = -1; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long did = HDF5Constants.H5I_INVALID_HID; int obj_type = -1; byte[] read_data = new byte[16]; @@ -327,9 +327,9 @@ public void testH5OcopyRefsDatasettosameFile() { // @Test(expected = HDF5LibraryException.class) // public void testH5OcopyInvalidRef() throws Throwable { // final long _pid_ = HDF5Constants.H5P_DEFAULT; -// long sid = -1; -// long did = -1; -// long aid = -1; +// long sid = HDF5Constants.H5I_INVALID_HID; +// long did = HDF5Constants.H5I_INVALID_HID; +// long aid = HDF5Constants.H5I_INVALID_HID; // // try { // sid = H5.H5Screate_simple(1, new long[] {1}, null); diff --git a/java/test/TestH5Ocreate.java b/java/test/TestH5Ocreate.java index 8b644db936f..79849f68f67 100644 --- a/java/test/TestH5Ocreate.java +++ b/java/test/TestH5Ocreate.java @@ -40,13 +40,13 @@ public class TestH5Ocreate { private static final String H5_FILE = "testO.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fcpl = -1; - long H5fid = -1; - long H5dsid = -1; - long H5did1 = -1; - long H5did2 = -1; - long H5gcpl = -1; - long H5gid = -1; + long H5fcpl = HDF5Constants.H5I_INVALID_HID; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did1 = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; + long H5gcpl = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; private final void _deleteFile(String filename) { @@ -63,7 +63,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -79,7 +79,7 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { H5gcpl = HDF5Constants.H5P_DEFAULT; gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, @@ -292,7 +292,7 @@ public void testH5Oget_info_externallink() { @Test public void testH5Olink() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; H5O_info_t dst_obj_info = null; try { @@ -379,7 +379,7 @@ public int callback(long group, String name, H5O_info_t info, H5O_iterate_t op_d @Test public void testH5Ocomment() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; String obj_comment = null; try { oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); @@ -404,7 +404,7 @@ public void testH5Ocomment() { @Test public void testH5Ocomment_clear() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; String obj_comment = null; try { oid = H5.H5Oopen(H5fid, "DS1", HDF5Constants.H5P_DEFAULT); @@ -505,7 +505,7 @@ public void testH5Ocomment_by_name_clear() { @Test public void testH5Oinc_dec_count() { - long oid = -1; + long oid = HDF5Constants.H5I_INVALID_HID; H5O_info_t obj_info = null; try { try { diff --git a/java/test/TestH5P.java b/java/test/TestH5P.java index b61f3ad9e88..38791282000 100644 --- a/java/test/TestH5P.java +++ b/java/test/TestH5P.java @@ -40,20 +40,20 @@ public class TestH5P { private static final int DIM_X = 4; private static final int DIM_Y = 6; long[] H5dims = { DIM_X, DIM_Y }; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long lapl_id = -1; - long fapl_id = -1; - long fcpl_id = -1; - long ocpl_id = -1; - long ocp_plist_id = -1; - long lcpl_id = -1; - long plapl_id = -1; - long plist_id = -1; - long gapl_id = -1; - long gcpl_id = -1; - long acpl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long lapl_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long fcpl_id = HDF5Constants.H5I_INVALID_HID; + long ocpl_id = HDF5Constants.H5I_INVALID_HID; + long ocp_plist_id = HDF5Constants.H5I_INVALID_HID; + long lcpl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long gapl_id = HDF5Constants.H5I_INVALID_HID; + long gcpl_id = HDF5Constants.H5I_INVALID_HID; + long acpl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -64,7 +64,7 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); diff --git a/java/test/TestH5PData.java b/java/test/TestH5PData.java index 18d8b928fe8..8b04629e75b 100644 --- a/java/test/TestH5PData.java +++ b/java/test/TestH5PData.java @@ -36,10 +36,10 @@ public class TestH5PData { private static final String H5_FILE = "testPD.h5"; private static final int DIM_X = 12; private static final int DIM_Y = 18; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long plist_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; double windchillF[][] = {{36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0}, @@ -65,7 +65,7 @@ private final void _deleteFile(String filename) { } private final long _createFloatDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_NATIVE_FLOAT, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); diff --git a/java/test/TestH5PL.java b/java/test/TestH5PL.java index ac8c08330dc..d44cc0b878a 100644 --- a/java/test/TestH5PL.java +++ b/java/test/TestH5PL.java @@ -146,11 +146,11 @@ public void TestH5PLpaths() { @Ignore public void TestH5PLdlopen() { - long file_id = -1; - long filespace_id = -1; - long dataset_id = -1; - long fapl_id = -1; - long dcpl_id = -1; + long file_id = HDF5Constants.H5I_INVALID_HID; + long filespace_id = HDF5Constants.H5I_INVALID_HID; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long dcpl_id = HDF5Constants.H5I_INVALID_HID; try { int[] cd_values = {9, 0, 0, 0}; int[] libversion = {0, 0, 0}; diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 7e704a9a987..cc674e2cdd1 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -46,17 +46,17 @@ public class TestH5Pfapl { private static final int DIM_Y = 6; private static final int DIMF_X = 12; private static final int DIMF_Y = 18; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5Fdsid = -1; - long H5Fdid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5Fdsid = HDF5Constants.H5I_INVALID_HID; + long H5Fdid = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; long[] H5Fdims = { DIMF_X, DIMF_Y }; double windchillF[][] = {{36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0}, @@ -129,7 +129,7 @@ private final void _deleteMultiFile() { } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl); @@ -384,7 +384,7 @@ public void testH5Pset_elink_fapl() { @Test public void testH5Pget_elink_fapl() { - long ret_val_id = -1; + long ret_val_id = HDF5Constants.H5I_INVALID_HID; try { ret_val_id = H5.H5Pget_elink_fapl(plapl_id); assertTrue("H5Pget_elink_fapl", ret_val_id >= 0); @@ -402,7 +402,7 @@ public void testH5Pget_elink_fapl() { @Test public void testH5P_elink_fapl() { - long ret_val_id = -1; + long ret_val_id = HDF5Constants.H5I_INVALID_HID; try { H5.H5Pset_elink_fapl(plapl_id, fapl_id ); ret_val_id = H5.H5Pget_elink_fapl(plapl_id); @@ -420,7 +420,7 @@ public void testH5P_elink_fapl() { @Test public void testH5P_elink_file_cache_size() { - long elink_fapl_id = -1; + long elink_fapl_id = HDF5Constants.H5I_INVALID_HID; int efc_size = 0; try { H5.H5Pset_elink_fapl(plapl_id, fapl_id ); diff --git a/java/test/TestH5Pfaplhdfs.java b/java/test/TestH5Pfaplhdfs.java index d358ed32d4a..d9226662d69 100644 --- a/java/test/TestH5Pfaplhdfs.java +++ b/java/test/TestH5Pfaplhdfs.java @@ -33,11 +33,11 @@ public class TestH5Pfaplhdfs { @Rule public TestName testname = new TestName(); - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; @Before public void createFileAccess() throws NullPointerException, HDF5Exception diff --git a/java/test/TestH5Pfapls3.java b/java/test/TestH5Pfapls3.java index 1c7b3ca0407..dda27169880 100644 --- a/java/test/TestH5Pfapls3.java +++ b/java/test/TestH5Pfapls3.java @@ -33,11 +33,11 @@ public class TestH5Pfapls3 { @Rule public TestName testname = new TestName(); - long fapl_id = -1; - long plapl_id = -1; - long dapl_id = -1; - long plist_id = -1; - long btplist_id = -1; + long fapl_id = HDF5Constants.H5I_INVALID_HID; + long plapl_id = HDF5Constants.H5I_INVALID_HID; + long dapl_id = HDF5Constants.H5I_INVALID_HID; + long plist_id = HDF5Constants.H5I_INVALID_HID; + long btplist_id = HDF5Constants.H5I_INVALID_HID; @Before public void createFileAccess() throws NullPointerException, HDF5Exception diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index 57785658b2e..0d5307164b7 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -84,7 +84,7 @@ public class TestH5Plist { PROP3_NAME, PROP4_NAME}; - long plist_class_id = -1; + long plist_class_id = HDF5Constants.H5I_INVALID_HID; @Before public void createPropClass()throws NullPointerException, HDF5Exception @@ -113,9 +113,9 @@ public void deleteFileAccess() throws HDF5LibraryException { @Test public void testH5P_genprop_basic_class() { int status = -1; - long cid1 = -1; // Generic Property class ID - long cid2 = -1; // Generic Property class ID - long cid3 = -1; // Generic Property class ID + long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID + long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID + long cid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID String name = null; // Name of class try { @@ -161,7 +161,7 @@ public void testH5P_genprop_basic_class() { // Close parent class try { H5.H5Pclose_class(cid2); - cid2 = -1; + cid2 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -171,7 +171,7 @@ public void testH5P_genprop_basic_class() { // Close class try { H5.H5Pclose_class(plist_class_id); - plist_class_id = -1; + plist_class_id = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -241,7 +241,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid3); - cid3 = -1; + cid3 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -251,7 +251,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid2); - cid2 = -1; + cid2 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -261,7 +261,7 @@ public void testH5P_genprop_basic_class() { // Close parent class's parent try { H5.H5Pclose_class(cid1); - cid1 = -1; + cid1 = HDF5Constants.H5I_INVALID_HID; } catch (Throwable err) { err.printStackTrace(); @@ -633,7 +633,7 @@ public int callback(long list_id, String name, H5P_iterate_t op_data) { @Test public void testH5P_genprop_basic_list_prop() { boolean status = false; - long lid1 = -1; // Generic Property list ID + long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID long nprops = -1; // Number of properties in class try { @@ -759,7 +759,7 @@ public void testH5P_genprop_basic_list_prop() { // @Test // public void testH5P_genprop_class_callback() { // class cdata { -// public long cls_id = -1; +// public long cls_id = HDF5Constants.H5I_INVALID_HID; // public int cls_count = -1; // cdata(long id, int count) { // this.cls_id = id; @@ -812,11 +812,11 @@ public void testH5P_genprop_basic_list_prop() { // } // H5P_cls_close_func_cb cls_close_cb = new H5P_cls_close_callback(); // -// long cid1 = -1; // Generic Property class ID -// long cid2 = -1; // Generic Property class ID -// long lid1 = -1; // Generic Property list ID -// long lid2 = -1; // Generic Property list ID -// long lid3 = -1; // Generic Property list ID +// long cid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID +// long cid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property class ID +// long lid1 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID +// long lid2 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID +// long lid3 = HDF5Constants.H5I_INVALID_HID; // Generic Property list ID // long nprops = -1; // Number of properties in class // // try { diff --git a/java/test/TestH5Pvirtual.java b/java/test/TestH5Pvirtual.java index abc0f3d18a6..0478356cda6 100644 --- a/java/test/TestH5Pvirtual.java +++ b/java/test/TestH5Pvirtual.java @@ -51,13 +51,13 @@ public class TestH5Pvirtual { private static final int fill_value = -1; long[] H5dims = { DIM_Y }; long[] VDSH5dims = { VDSDIM_X, VDSDIM_Y }; - long H5fid = -1; - long H5dsid = -1; - long H5dssid = -1; - long H5dvsid = -1; - long H5did = -1; - long H5dcplid = -1; - long H5dapl_id = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5dssid = HDF5Constants.H5I_INVALID_HID; + long H5dvsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5dcplid = HDF5Constants.H5I_INVALID_HID; + long H5dapl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -68,8 +68,8 @@ private final void _deleteFile(String filename) { } private final long _createDataset(long fid, long dsid, String name, long dcpl, long dapl) { - long did = -1; - long space_id = -1; + long did = HDF5Constants.H5I_INVALID_HID; + long space_id = HDF5Constants.H5I_INVALID_HID; long[] start = {0, 0}; long[] stride = null; long[] count = {1, 1}; @@ -99,9 +99,9 @@ private final void _createH5File(long fcpl, long fapl) { int[] dset_data = new int[DIM_Y]; // Create source files and datasets for (int i=0; i < 3; i++) { - long space_id = -1; - long dset_id = -1; - long file_id = -1; + long space_id = HDF5Constants.H5I_INVALID_HID; + long dset_id = HDF5Constants.H5I_INVALID_HID; + long file_id = HDF5Constants.H5I_INVALID_HID; for (int j = 0; j < DIM_Y; j++) dset_data[j] = i+1; try { @@ -264,7 +264,7 @@ public void testH5Pget_source_datasetname() throws Throwable { @Test public void testH5Pget_selection_source_dataset() throws Throwable { - long src_space = -1; + long src_space = HDF5Constants.H5I_INVALID_HID; long src_selection = -1; H5did = _createDataset(H5fid, H5dsid, "VDS", H5dcplid, H5dapl_id); diff --git a/java/test/TestH5R.java b/java/test/TestH5R.java index eae795cc24b..dd0c072e608 100644 --- a/java/test/TestH5R.java +++ b/java/test/TestH5R.java @@ -13,6 +13,7 @@ package test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -23,9 +24,11 @@ import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; @@ -35,12 +38,14 @@ public class TestH5R { private static final String H5_FILE = "testH5R.h5"; private static final int DIM_X = 4; private static final int DIM_Y = 6; - long H5fid = -1; - long H5dsid = -1; - long H5did = -1; - long H5gid = -1; - long H5did2 = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5dsid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + long H5gid = HDF5Constants.H5I_INVALID_HID; + long H5did2 = HDF5Constants.H5I_INVALID_HID; long[] H5dims = { DIM_X, DIM_Y }; + int[][] dset_data = new int[DIM_X][DIM_Y]; + int FILLVAL = 99; private final void _deleteFile(String filename) { File file = null; @@ -50,12 +55,13 @@ private final void _deleteFile(String filename) { catch (Throwable err) {} if (file.exists()) { - try {file.delete();} catch (SecurityException e) {} + try {file.delete();} catch (SecurityException e) {e.printStackTrace();} } + assertFalse("TestH5R._deleteFile file still exists ", file.exists()); } private final long _createDataset(long fid, long dsid, String name, long dapl) { - long did = -1; + long did = HDF5Constants.H5I_INVALID_HID; try { did = H5.H5Dcreate(fid, name, HDF5Constants.H5T_STD_I32BE, dsid, @@ -65,13 +71,13 @@ private final long _createDataset(long fid, long dsid, String name, long dapl) { err.printStackTrace(); fail("H5.H5Dcreate: " + err); } - assertTrue("TestH5R._createDataset: ",did > 0); + assertTrue("TestH5R._createDataset: ", did > 0); return did; } private final long _createGroup(long fid, String name) { - long gid = -1; + long gid = HDF5Constants.H5I_INVALID_HID; try { gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); @@ -99,6 +105,21 @@ public void createH5file() H5did2 = _createDataset(H5gid, H5dsid, "dset2", HDF5Constants.H5P_DEFAULT); H5did = _createDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DEFAULT); + // Initialize the dataset. + for (int indx = 0; indx < DIM_X; indx++) + for (int jndx = 0; jndx < DIM_Y; jndx++) + dset_data[indx][jndx] = FILLVAL; + + try { + if (H5did >= 0) + H5.H5Dwrite(H5did, HDF5Constants.H5T_NATIVE_INT, + HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data[0]); + } + catch (Exception e) { + e.printStackTrace(); + } + } catch (Throwable err) { err.printStackTrace(); @@ -130,11 +151,11 @@ public void deleteH5file() throws HDF5LibraryException { @Test public void testH5Rget_name() { - long loc_id=H5fid; - int ref_type=HDF5Constants.H5R_OBJECT; - long ret_val=-1; - byte[] ref=null; - String[] name= {""}; + long loc_id = H5fid; + int ref_type = HDF5Constants.H5R_OBJECT; + long ret_val = -1; + byte[] ref = null; + String[] name = {""}; String objName = "/dset"; try { @@ -159,9 +180,8 @@ public void testH5Rget_name() { @Test public void testH5Rget_obj_type2() { - int ref_type=HDF5Constants.H5R_OBJECT; - byte[] ref=null; - + int ref_type = HDF5Constants.H5R_OBJECT; + byte[] ref = null; String objName = "/dset"; int obj_type = -1;; @@ -213,20 +233,20 @@ public void testH5Rcreate_regionrefobj() { public void testH5Rdereference() { byte[] ref1 = null; byte[] ref2 = null; - long dataset_id = -1; - long group_id = -1; + long dataset_id = HDF5Constants.H5I_INVALID_HID; + long group_id = HDF5Constants.H5I_INVALID_HID; try { //Create reference on dataset ref1 = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); - dataset_id= H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); + dataset_id = H5.H5Rdereference(H5fid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_DATASET_REGION, ref1); //Create reference on group ref2 = H5.H5Rcreate(H5gid, "/Group1", HDF5Constants.H5R_OBJECT, -1); - group_id= H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); + group_id = H5.H5Rdereference(H5gid, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5R_OBJECT, ref2); assertNotNull(ref1); assertNotNull(ref2); - assertTrue(dataset_id>=0); - assertTrue(group_id>=0); + assertTrue(dataset_id >= 0); + assertTrue(group_id >= 0); } catch (Throwable err) { err.printStackTrace(); @@ -241,12 +261,12 @@ public void testH5Rdereference() { @Test public void testH5Rget_region() { byte[] ref = null; - long dsid = -1; + long dsid = HDF5Constants.H5I_INVALID_HID; try { ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_DATASET_REGION, H5dsid); dsid = H5.H5Rget_region(H5fid, HDF5Constants.H5R_DATASET_REGION, ref); assertNotNull(ref); - assertTrue(dsid>=0); + assertTrue(dsid >= 0); } catch (Throwable err) { err.printStackTrace(); @@ -260,7 +280,7 @@ public void testH5Rget_region() { @Test(expected = IllegalArgumentException.class) public void testH5Rget_name_Invalidreftype() throws Throwable { byte[] ref = null; - String[] name= {""}; + String[] name = {""}; ref = H5.H5Rcreate(H5fid, "/dset", HDF5Constants.H5R_OBJECT, -1); H5.H5Rget_name(H5fid, HDF5Constants.H5R_DATASET_REGION, ref, name, 16); } diff --git a/java/test/TestH5S.java b/java/test/TestH5S.java index 9e890c0cb04..7eeed7a67b6 100644 --- a/java/test/TestH5S.java +++ b/java/test/TestH5S.java @@ -29,7 +29,7 @@ public class TestH5S { @Rule public TestName testname = new TestName(); - long H5sid = -1; + long H5sid = HDF5Constants.H5I_INVALID_HID; int H5rank = 2; long H5dims[] = {5, 5}; long H5maxdims[] = {10, 10}; @@ -180,7 +180,7 @@ public void testH5Sset_extent_none() { @Test public void testH5Scopy() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int read_rank = -1; try { @@ -200,7 +200,7 @@ public void testH5Scopy() { @Test public void testH5Sextent_copy() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { @@ -221,7 +221,7 @@ public void testH5Sextent_copy() { @Test public void testH5Sextent_equal() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; boolean result = false; try { @@ -251,8 +251,8 @@ public void testH5Sextent_equal() { @Test public void testH5Sencode_decode_null_dataspace() { - long sid = -1; - long decoded_sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; + long decoded_sid = HDF5Constants.H5I_INVALID_HID; byte[] null_sbuf = null; boolean result = false; @@ -298,8 +298,8 @@ public void testH5Sencode_decode_null_dataspace() { @Test public void testH5Sencode_decode_scalar_dataspace() { - long sid = -1; - long decoded_sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; + long decoded_sid = HDF5Constants.H5I_INVALID_HID; byte[] scalar_sbuf = null; boolean result = false; int iresult = -1; @@ -469,7 +469,7 @@ public void testH5Soffset_simple() { @Test public void testH5Sget_select_hyper() { - long space1 = -1; + long space1 = HDF5Constants.H5I_INVALID_HID; long start[] = {0,0}; long stride[] = {1,1}; long count[] = {1,1}; @@ -507,7 +507,7 @@ public void testH5Sget_select_hyper() { @Test public void testH5Sget_select_valid() { - long space1 = -1; + long space1 = HDF5Constants.H5I_INVALID_HID; long start[] = {1,0}; long stride[] = {1,1}; long count[] = {2,3}; diff --git a/java/test/TestH5Sbasic.java b/java/test/TestH5Sbasic.java index be05bdeeaaf..548ac956621 100644 --- a/java/test/TestH5Sbasic.java +++ b/java/test/TestH5Sbasic.java @@ -55,7 +55,7 @@ public void testH5Sget_simple_extent_type_invalid() throws Throwable { @Test public void testH5Screate_scalar() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { sid = H5.H5Screate(HDF5Constants.H5S_SCALAR); @@ -74,7 +74,7 @@ public void testH5Screate_scalar() { @Test public void testH5Screate_null() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; try { sid = H5.H5Screate(HDF5Constants.H5S_NULL); @@ -124,7 +124,7 @@ public void testH5Screate_simple_dims_exceed() throws Throwable { @Test public void testH5Screate_simple() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 2; long dims[] = {5, 5}; @@ -147,7 +147,7 @@ public void testH5Screate_simple() { @Test public void testH5Screate_simple_unlimted() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 2; long dims[] = {5, 5}; @@ -170,7 +170,7 @@ public void testH5Screate_simple_unlimted() { @Test public void testH5Screate_simple_unlimted_1d() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int class_type = -1; int rank = 1; long dims[] = {5}; @@ -193,7 +193,7 @@ public void testH5Screate_simple_unlimted_1d() { @Test public void testH5Screate_simple_max_default() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int rank = 2; long dims[] = {5, 5}; @@ -212,7 +212,7 @@ public void testH5Screate_simple_max_default() { @Test public void testH5Screate_simple_extent() { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; int rank = 2; long dims[] = {5, 5}; long maxdims[] = {10, 10}; @@ -269,7 +269,7 @@ public void testH5Sselect_adjust_invalid() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_adjust_rank_offset() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long offset[][] = {{0,1},{2,4},{5,6}}; try { @@ -291,7 +291,7 @@ public void testH5Sselect_intersect_block_invalid() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_intersect_block_rank_start() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = new long[2]; long end[] = null; @@ -307,7 +307,7 @@ public void testH5Sselect_intersect_block_rank_start() throws Throwable { @Test(expected = IllegalArgumentException.class) public void testH5Sselect_intersect_block_rank_end() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = null; long end[] = new long[2]; @@ -335,7 +335,7 @@ public void testH5Scombine_hyperslab_invalid() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Scombine_hyperslab_null_start() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = null; long stride[] = null; long count[] = new long[2]; @@ -353,7 +353,7 @@ public void testH5Scombine_hyperslab_null_start() throws Throwable { @Test(expected = NullPointerException.class) public void testH5Scombine_hyperslab_null_count() throws Throwable { - long sid = -1; + long sid = HDF5Constants.H5I_INVALID_HID; long start[] = new long[2]; long stride[] = null; long count[] = null; diff --git a/java/test/TestH5T.java b/java/test/TestH5T.java index cca68caaf4a..ed4e2a9333a 100644 --- a/java/test/TestH5T.java +++ b/java/test/TestH5T.java @@ -32,8 +32,8 @@ public class TestH5T { @Rule public TestName testname = new TestName(); private static final String H5_FILE = "testT.h5"; - long H5fid = -1; - long H5strdid = -1; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5strdid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = null; @@ -128,7 +128,7 @@ public void testH5Tset_size() { @Test public void testH5Tarray_create() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; long[] adims = { 3, 5 }; try { @@ -147,7 +147,7 @@ public void testH5Tarray_create() { @Test public void testH5Tget_array_ndims() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; int ndims = 0; long[] adims = { 3, 5 }; @@ -175,7 +175,7 @@ public void testH5Tget_array_ndims() { @Test public void testH5Tget_array_dims() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; int ndims = 0; long[] adims = { 3, 5 }; long[] rdims = new long[2]; @@ -206,7 +206,7 @@ public void testH5Tget_array_dims() { @Test public void testH5Tenum_functions() { - long filetype_id =-1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; String enum_type ="Enum_type"; byte[] enum_val = new byte[1]; String enum_name = null; @@ -274,7 +274,7 @@ public void testH5Tenum_functions() { @Test public void testH5Tenum_create_functions() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; byte[] enum_val = new byte[1]; // Create a enumerate datatype @@ -314,7 +314,7 @@ public void testH5Tenum_create_functions() { @Test public void testH5Topaque_functions() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; String opaque_name = null; // Create a opaque datatype @@ -344,7 +344,7 @@ public void testH5Topaque_functions() { @Test public void testH5Tvlen_create() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; try { filetype_id = H5.H5Tvlen_create(HDF5Constants.H5T_C_S1); @@ -367,7 +367,7 @@ public void testH5Tvlen_create() { @Test public void testH5Tis_variable_str() { - long filetype_id = -1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; try { filetype_id = H5.H5Tcopy(HDF5Constants.H5T_C_S1); @@ -398,7 +398,7 @@ public void testH5Tis_variable_str() { @Test public void testH5Tcompound_functions() { - long filetype_id =-1; + long filetype_id = HDF5Constants.H5I_INVALID_HID; // Create a compound datatype try { diff --git a/java/test/TestH5Tbasic.java b/java/test/TestH5Tbasic.java index bb71bc8064b..7aac2ab24eb 100644 --- a/java/test/TestH5Tbasic.java +++ b/java/test/TestH5Tbasic.java @@ -39,7 +39,7 @@ public void nextTestName() { @Test public void testH5Tcopy() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -56,7 +56,7 @@ public void testH5Tcopy() { @Test public void testH5Tequal() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -75,7 +75,7 @@ public void testH5Tequal() { @Test public void testH5Tequal_not() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { H5strdid = H5.H5Tcopy(HDF5Constants.H5T_STD_U64LE); assertTrue("H5.H5Tcopy",H5strdid > 0); @@ -97,8 +97,8 @@ public void testH5Tconvert() { String[] strs = {"a1234","b1234"}; int srcLen = 5; int dstLen = 10; - long srcId = -1; - long dstId = -1; + long srcId = HDF5Constants.H5I_INVALID_HID; + long dstId = HDF5Constants.H5I_INVALID_HID; int dimSize = strs.length; byte[] buf = new byte[dimSize*dstLen]; @@ -130,7 +130,7 @@ public void testH5Tconvert() { @Test public void testH5Torder_size() { - long H5strdid = -1; + long H5strdid = HDF5Constants.H5I_INVALID_HID; try { // Fixed length string H5strdid = H5.H5Tcopy(HDF5Constants.H5T_C_S1); diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index a3a52af6079..ec72eb4db88 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -144,7 +144,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [ "$IS_DARWIN" = "yes" ]; then (cd testlibs; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -246,6 +246,8 @@ COPY_DATAFILES_TO_BLDDIR() $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateL2.hdf $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO1.hdf $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf + $CP -f $TOOLS_TESTFILES/tdatareg.h5 $BLDDIR/trefer_reg.h5 + $CP -f $TOOLS_TESTFILES/tattrreg.h5 $BLDDIR/trefer_attr.h5 } CLEAN_DATAFILES_AND_BLDDIR() diff --git a/java/test/testfiles/JUnit-TestH5.txt b/java/test/testfiles/JUnit-TestH5.txt index 4bab633808a..59765d90b93 100644 --- a/java/test/testfiles/JUnit-TestH5.txt +++ b/java/test/testfiles/JUnit-TestH5.txt @@ -3,8 +3,10 @@ JUnit version 4.11 .testJ2C .testH5export_dataset .testIsSerializable +.testH5export_attrdataset .testH5garbage_collect .testH5error_off +.testH5export_regdataset .serializeToDisk .testH5open .testH5check_version @@ -13,5 +15,5 @@ JUnit version 4.11 Time: XXXX -OK (11 tests) +OK (13 tests) diff --git a/src/H5Spkg.h b/src/H5Spkg.h index dfb0c1ef8b0..e6c031d8a8c 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -62,6 +62,7 @@ #define H5S_SELECT_INFO_ENC_SIZE_8 0x08 /* 8 bytes: 64 bits */ #define H5S_SELECT_INFO_ENC_SIZE_BITS (H5S_SELECT_INFO_ENC_SIZE_4 | H5S_SELECT_INFO_ENC_SIZE_8) +#define H5S_UINT16_MAX 0x0000FFFF /* 2^16 - 1 = 65,535 */ #define H5S_UINT32_MAX 0xFFFFFFFF /* 2^32 - 1 = 4,294,967,295 */ #define H5S_UINT64_MAX ((hsize_t)(-1L)) /* 2^64 - 1 = 18,446,744,073,709,551,615 */ From 24df8de26c5e838af0c6b77f1968ed0d4ada3336 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 07:31:22 -0600 Subject: [PATCH 23/66] Fix java issues with tests and javadoc --- java/src/hdf/hdf5lib/HDF5GroupInfo.java | 24 ++++++++++++++++++------ java/src/jni/h5util.c | 2 -- java/test/CMakeLists.txt | 2 +- java/test/TestH5.java | 8 ++++---- java/test/junit.sh.in | 4 +++- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/java/src/hdf/hdf5lib/HDF5GroupInfo.java b/java/src/hdf/hdf5lib/HDF5GroupInfo.java index e08f9919666..4c31af72c57 100644 --- a/java/src/hdf/hdf5lib/HDF5GroupInfo.java +++ b/java/src/hdf/hdf5lib/HDF5GroupInfo.java @@ -90,32 +90,44 @@ public void reset() { linklen = 0; } - /** fileno accessors */ + /** fileno accessors + * @return the file number if successful + */ public long[] getFileno() { return fileno; } - /** accessors */ + /** accessors + * @return the object number if successful + */ public long[] getObjno() { return objno; } - /** accessors */ + /** accessors + * @return type of group if successful + */ public int getType() { return type; } - /** accessors */ + /** accessors + * @return the number of links in the group if successful + */ public int getNlink() { return nlink; } - /** accessors */ + /** accessors + * @return the modified time value if successful + */ public long getMtime() { return mtime; } - /** accessors */ + /** accessors + * @return a length of link name if successful + */ public int getLinklen() { return linklen; } diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 79290f9b6e1..10d1b8df78d 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -1464,7 +1464,6 @@ h5str_print_region_data_points(JNIEnv *env, hid_t region_space, hid_t region_id, if (!h5str_sprintf(ENVONLY, str, region_id, type_id, ((char *)region_buf + jndx * type_size), 1)) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - if (jndx + 1 < (size_t)npoints) if (!h5str_append(str, ", ")) H5_ASSERTION_ERROR(ENVONLY, "Unable to append string."); @@ -2874,7 +2873,6 @@ h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, v if (HDfprintf(stream, "%s", buffer.s) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); - h5str_free(&buffer); } /* end for (i = 0; i < nelmts... */ diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index ff905cecff6..8dd0b9ae508 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -93,7 +93,7 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO1.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") -HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/trefer_attr.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list}) diff --git a/java/test/TestH5.java b/java/test/TestH5.java index dedefd40b6f..0fe8fb800ab 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -51,7 +51,7 @@ public class TestH5 { private static final String EXPORT_FILE = "testExport.txt"; private static final String H5_DREG_FILE = "trefer_reg.h5"; private static final String EXPORT_DREG_FILE = "testExportReg.txt"; - private static final String H5_AREG_FILE = "trefer_attr.h5"; + private static final String H5_AREG_FILE = "tattrreg.h5"; private static final String EXPORT_AREG_FILE = "testExportAReg.txt"; private static final int DIM_X = 4; private static final int DIM_Y = 6; @@ -493,7 +493,7 @@ public void testH5export_regdataset() { fail("read file failed: " + err); } for(int row = 0; row < DIM_X; row++) - assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + assertTrue("testH5export_regdataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); } @Test @@ -513,7 +513,7 @@ public void testH5export_attrdataset() { } catch (HDF5LibraryException err) { err.printStackTrace(); - fail("H5export_dataset failed: " + err); + fail("H5export_attribute failed: " + err); } File file = new File(EXPORT_AREG_FILE); @@ -536,6 +536,6 @@ public void testH5export_attrdataset() { fail("read file failed: " + err); } for(int row = 0; row < DIM_X; row++) - assertTrue("H5export_dataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); + assertTrue("testH5export_attrdataset: <"+row+">"+dset_indata[row], dset_indata[row]==dset_data_expect[row]); } } diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index ec72eb4db88..9bb2ba8a750 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -45,6 +45,8 @@ HDFLIB_HOME="$top_srcdir/java/lib" BLDDIR="." BLDLIBDIR="$BLDDIR/testlibs" HDFTEST_HOME="$top_srcdir/java/test" +TOOLS_TESTFILES="$top_srcdir/tools/testfiles" + JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar TESTJARFILE=jar@PACKAGE_TARNAME@test.jar test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR @@ -247,7 +249,7 @@ COPY_DATAFILES_TO_BLDDIR() $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO1.hdf $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf $CP -f $TOOLS_TESTFILES/tdatareg.h5 $BLDDIR/trefer_reg.h5 - $CP -f $TOOLS_TESTFILES/tattrreg.h5 $BLDDIR/trefer_attr.h5 + $CP -f $TOOLS_TESTFILES/tattrreg.h5 $BLDDIR/tattrreg.h5 } CLEAN_DATAFILES_AND_BLDDIR() From 7be7ae3737a6c9925628a4d2630a7e23533890b2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 09:43:33 -0600 Subject: [PATCH 24/66] Correct use of attribute access plist --- java/test/TestH5A.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java index b7ce792081c..8d343ecb995 100644 --- a/java/test/TestH5A.java +++ b/java/test/TestH5A.java @@ -49,7 +49,6 @@ public class TestH5A { long type_id = HDF5Constants.H5I_INVALID_HID; long space_id = HDF5Constants.H5I_INVALID_HID; long lapl_id = HDF5Constants.H5I_INVALID_HID; - long aapl_id = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) { File file = new File(filename); @@ -202,7 +201,7 @@ public void testH5Aopen_by_idx() { // Opening the existing attribute, obj_name(Created by H5ACreate2) // by index, attached to an object identifier. attribute_id = H5.H5Aopen_by_idx(H5did, ".", HDF5Constants.H5_INDEX_CRT_ORDER, HDF5Constants.H5_ITER_INC, - 0, aapl_id, lapl_id); + 0, HDF5Constants.H5P_DEFAULT, lapl_id); assertTrue("testH5Aopen_by_idx: H5Aopen_by_idx", attribute_id >= 0); @@ -212,7 +211,7 @@ public void testH5Aopen_by_idx() { try { n = 5; H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n, - aapl_id, lapl_id); + HDF5Constants.H5P_DEFAULT, lapl_id); fail("Negative Test Failed:- Error not Thrown when n is invalid."); } catch (AssertionError err) { @@ -227,7 +226,7 @@ public void testH5Aopen_by_idx() { n = 0; obj_name = "file"; H5.H5Aopen_by_idx(loc_id, obj_name, idx_type, order, n, - aapl_id, lapl_id); + HDF5Constants.H5P_DEFAULT, lapl_id); fail("Negative Test Failed:- Error not Thrown when attribute name is invalid."); } catch (AssertionError err) { @@ -257,7 +256,7 @@ public void testH5Acreate_by_name() { try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, - aapl_id, lapl_id); + HDF5Constants.H5P_DEFAULT, lapl_id); assertTrue("testH5Acreate_by_name: H5Acreate_by_name", attribute_id >= 0); @@ -288,7 +287,7 @@ public void testH5Arename() throws Throwable, HDF5LibraryException, NullPointerE boolean bool_val = false; try { - attr_id = H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id); + attr_id = H5.H5Acreate(loc_id, old_attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT); ret_val = H5.H5Arename(loc_id, old_attr_name, new_attr_name); @@ -327,7 +326,7 @@ public void testH5Arename_by_name() { try { attr_id = H5.H5Acreate_by_name(loc_id, obj_name, old_attr_name, - type_id, space_id, HDF5Constants.H5P_DEFAULT, aapl_id, lapl_id); + type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, lapl_id); ret_val = H5.H5Arename_by_name(loc_id, obj_name, old_attr_name, new_attr_name, lapl_id); @@ -368,7 +367,7 @@ public void testH5Aget_name() { try { attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name, type_id, space_id, HDF5Constants.H5P_DEFAULT, - aapl_id, lapl_id); + HDF5Constants.H5P_DEFAULT, lapl_id); assertTrue("testH5Aget_name: H5Acreate_by_name ", attribute_id > 0); ret_name = H5.H5Aget_name(attribute_id); assertEquals(ret_name, attr_name); From 9c625d6746f9c92e6fed8440ef366d9c5df21d94 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 09:55:06 -0600 Subject: [PATCH 25/66] Remove debug code --- tools/lib/h5diff_array.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index bd4470b3c76..5d04202921c 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -3159,7 +3159,6 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j, curr_pos, curr_idx, cnt_idx, blk_idx, str_idx); dim_size = opts->dims[j]; /* Current dimension size */ - // elmnt_cnt *= dim_size; /* Total number of elements in dimension */ H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) " "- str_cnt:%ld", j, elmnt_cnt, prev_dim_size, dim_size, str_cnt); @@ -3182,7 +3181,7 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) "(curr_idx:%ld - data_idx:%ld)", i, dim_size, str_cnt, curr_idx, data_idx); } - next_idx += dim_size * str_cnt; // + prev_dim_size; + next_idx += dim_size * str_cnt; H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx); str_cnt = 0; prev_str = str_idx; From 754f639b6b9eaca819c493dcf1b1f103ec09ed7e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 10:56:15 -0600 Subject: [PATCH 26/66] Remove unused variable --- java/src/jni/h5util.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 10d1b8df78d..7b3abe5a2b9 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -2697,7 +2697,6 @@ h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr_id, int binary_order unsigned char *sm_buf = NULL; /* buffer for raw data */ hsize_t sm_size[H5S_MAX_RANK]; /* stripmine size */ - hsize_t hs_nelmts; /* elements in request */ int ret_value = 0; @@ -2769,8 +2768,6 @@ h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr_id, int binary_order if (NULL == (sm_buf = (unsigned char *)HDmalloc((size_t)alloc_size))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "h5str_dump_simple_mem: failed to allocate sm_buf"); - hs_nelmts = 1; - /* Read the data */ if (H5Aread(attr_id, p_type, sm_buf) < 0) H5_LIBRARY_ERROR(ENVONLY); From b48feaf07680757d83b7c06fb95b6ad8de7cc2c2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 11:46:46 -0600 Subject: [PATCH 27/66] Change file access to read only for java tests --- java/test/TestH5.java | 2 +- java/test/TestH5D.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 0fe8fb800ab..2916aacda51 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -129,7 +129,7 @@ private final void _closeH5File() { public void _openH5File(String filename, String dsetname) { try { H5fid = H5.H5Fopen(filename, - HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index 863ce791624..dac3a9c0adc 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -197,7 +197,7 @@ private final void _closeH5file() throws HDF5LibraryException { private final void _openH5file(String filename, String dsetname, long dapl) { try { H5fid = H5.H5Fopen(filename, - HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT); + HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT); } catch (Throwable err) { err.printStackTrace(); From 655a5b1044d86aa4167c8ab13886607cb9441e58 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 13:18:12 -0600 Subject: [PATCH 28/66] Split clang format operations. --- .github/workflows/clang-format-check.yml | 8 ++------ .github/workflows/clang-format-fix.yml | 25 ++++++++++++++++++++++++ MANIFEST | 1 + 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/clang-format-fix.yml diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 220a15e4afa..c7b01a582a9 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -1,5 +1,6 @@ name: clang-format Check -on: [workflow_dispatch, push, pull_request] +on: + pull_request: jobs: formatting-check: name: Formatting Check @@ -16,8 +17,3 @@ jobs: inplace: True style: file exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' - - uses: EndBug/add-and-commit@v7 - with: - author_name: github-actions - author_email: 41898282+github-actions[bot]@users.noreply.github.com - message: 'Committing clang-format changes' diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml new file mode 100644 index 00000000000..082d6170fa2 --- /dev/null +++ b/.github/workflows/clang-format-fix.yml @@ -0,0 +1,25 @@ +name: clang-format Check +on: + workflow_dispatch: + push: +jobs: + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip-ci')" + steps: + - uses: actions/checkout@v2 + - name: Run clang-format style check for C programs. + uses: DoozyX/clang-format-lint-action@v0.11 + with: + source: '.' + extensions: 'c,h,cpp,hpp' + clangFormatVersion: 10 + inplace: True + style: file + exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' + - uses: EndBug/add-and-commit@v7 + with: + author_name: github-actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: 'Committing clang-format changes' diff --git a/MANIFEST b/MANIFEST index 105be0258e0..0af879e2fb1 100644 --- a/MANIFEST +++ b/MANIFEST @@ -35,6 +35,7 @@ ./.clang-format ./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_ +./.github/workflows/clang-format-fix.yml _DO_NOT_DISTRIBUTE_ ./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_ ./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_ ./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_ From 01e9241ef75e940fd29649391a495530d531d242 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 9 Mar 2021 16:40:13 -0600 Subject: [PATCH 29/66] More javadoc comments --- java/src/hdf/hdf5lib/HDF5Constants.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index e21829f4deb..ad9ed70c577 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -53,11 +53,15 @@ public class HDF5Constants { public static final int H5_INDEX_CRT_ORDER = H5_INDEX_CRT_ORDER(); /** indices on links, number of indices defined */ public static final int H5_INDEX_N = H5_INDEX_N(); - /** */ + /** Common iteration orders, Unknown order */ public static final int H5_ITER_UNKNOWN = H5_ITER_UNKNOWN(); + /** Common iteration orders, Increasing order */ public static final int H5_ITER_INC = H5_ITER_INC(); + /** Common iteration orders, Decreasing order */ public static final int H5_ITER_DEC = H5_ITER_DEC(); + /** Common iteration orders, No particular order, whatever is fastest */ public static final int H5_ITER_NATIVE = H5_ITER_NATIVE(); + /** Common iteration orders, Number of iteration orders */ public static final int H5_ITER_N = H5_ITER_N(); public static final int H5AC_CURR_CACHE_CONFIG_VERSION = H5AC_CURR_CACHE_CONFIG_VERSION(); public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN(); From ea5b297949d90e7dc66fb6944c46adb076c12464 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Mar 2021 06:50:48 -0600 Subject: [PATCH 30/66] Remove pre-split setting --- .github/workflows/clang-format-check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index c7b01a582a9..4f696e7a85b 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -14,6 +14,5 @@ jobs: source: '.' extensions: 'c,h,cpp,hpp' clangFormatVersion: 10 - inplace: True style: file exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' From 0bd73444326f9dc63cda0100623fc5fa7c03770a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Mar 2021 06:57:02 -0600 Subject: [PATCH 31/66] format source --- java/src/jni/h5util.c | 15 +++++++-------- java/src/jni/h5util.h | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 7b3abe5a2b9..e21b1ad8c05 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -1039,7 +1039,6 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i if (H5R_DSET_REG_REF_BUF_SIZE == typeSize) { if (h5str_region_dataset(ENVONLY, out_str, container, cptr, expand_data) < 0) CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE); - } else if (H5R_OBJ_REF_BUF_SIZE == typeSize) { H5O_info_t oi; @@ -2688,17 +2687,17 @@ h5str_dump_simple_dset(JNIEnv *env, FILE *stream, hid_t dset, int binary_order) int h5str_dump_simple_mem(JNIEnv *env, FILE *stream, hid_t attr_id, int binary_order) { - hid_t f_space = H5I_INVALID_HID; /* file data space */ - hsize_t alloc_size; - int ndims; /* rank of dataspace */ - unsigned i; /* counters */ - hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/ - hsize_t p_nelmts; /* total selected elmts */ + hid_t f_space = H5I_INVALID_HID; /* file data space */ + hsize_t alloc_size; + int ndims; /* rank of dataspace */ + unsigned i; /* counters */ + hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/ + hsize_t p_nelmts; /* total selected elmts */ unsigned char *sm_buf = NULL; /* buffer for raw data */ hsize_t sm_size[H5S_MAX_RANK]; /* stripmine size */ - int ret_value = 0; + int ret_value = 0; /* VL data special information */ unsigned int vl_data = 0; /* contains VL datatypes */ diff --git a/java/src/jni/h5util.h b/java/src/jni/h5util.h index 1360c6709fb..64913a79d8c 100644 --- a/java/src/jni/h5util.h +++ b/java/src/jni/h5util.h @@ -106,8 +106,7 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Gget_1obj_1info_1max(JNIEnv *, jcla * Method: H5export_dataset * Signature: (Ljava/lang/String;JLjava/lang/String;I)V */ -JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *, jclass, jstring, jlong, jstring, - jint); +JNIEXPORT void JNICALL Java_hdf_hdf5lib_H5_H5export_1dataset(JNIEnv *, jclass, jstring, jlong, jstring, jint); /* * Class: hdf_hdf5lib_H5 From b6f634325e9c74d557a6289662cb157b0dcde3da Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 10 Mar 2021 13:25:56 -0600 Subject: [PATCH 32/66] Change windows TS to use older VS. --- .github/workflows/main.yml | 4 ++-- .github/workflows/pr-check.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d0d3bbdd4e..78e111535b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: # Threadsafe runs - name: "Windows TS MSVC" artifact: "Windows-MSVCTS.tar.xz" - os: windows-latest + os: windows-2016 build_type: "Release" toolchain: "" cpp: OFF @@ -91,7 +91,7 @@ jobs: ts: ON hl: OFF parallel: OFF - generator: "-G \"Visual Studio 16 2019\" -A x64" + generator: "-G \"Visual Studio 15 2017 Win64\"" - name: "Ubuntu TS GCC" artifact: "LinuxTS.tar.xz" os: ubuntu-latest diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 8c3bb2c0bec..b50bf59933a 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -77,7 +77,7 @@ jobs: # Threadsafe runs - name: "Windows TS MSVC" artifact: "Windows-MSVCTS.tar.xz" - os: windows-latest + os: windows-2016 build_type: "Release" toolchain: "" cpp: OFF @@ -86,7 +86,7 @@ jobs: ts: ON hl: OFF parallel: OFF - generator: "-G \"Visual Studio 16 2019\" -A x64" + generator: "-G \"Visual Studio 15 2017 Win64\"" - name: "Ubuntu TS GCC" artifact: "LinuxTS.tar.xz" os: ubuntu-latest From 5c353c387349b47b7c2acc489f4140a8212c1eb6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 24 Mar 2021 10:37:17 -0500 Subject: [PATCH 33/66] Mostly all javadoc fixes, one argument rename. --- java/src/hdf/hdf5lib/H5.java | 4 +- .../exceptions/HDF5LibraryException.java | 2 + .../hdf5lib/structs/H5AC_cache_config_t.java | 243 +++++++++++++++++- .../src/hdf/hdf5lib/structs/H5E_error2_t.java | 22 +- .../hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java | 18 +- .../hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java | 5 + java/src/hdf/hdf5lib/structs/H5F_info2_t.java | 39 ++- java/src/hdf/hdf5lib/structs/H5G_info_t.java | 12 +- java/src/hdf/hdf5lib/structs/H5L_info_t.java | 8 +- .../hdf/hdf5lib/structs/H5O_hdr_info_t.java | 30 ++- java/src/hdf/hdf5lib/structs/H5O_info_t.java | 56 +++- .../src/hdf/hdf5lib/structs/H5_ih_info_t.java | 4 +- java/src/jni/h5util.c | 11 +- java/test/TestH5.java | 1 + release_docs/INSTALL_CMake.txt | 2 + 15 files changed, 398 insertions(+), 59 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index db9350e4de3..0cb37a71883 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -533,7 +533,7 @@ public synchronized static native void H5export_dataset(String file_export_name, * The file name to export data into. * @param dataset_id * The identifier of the dataset containing the attribute. - * @param object_path + * @param attribute_name * The attribute to be exported. * @param binary_order * 99 - export data as text. @@ -545,7 +545,7 @@ public synchronized static native void H5export_dataset(String file_export_name, * - Error from the HDF-5 Library. **/ public synchronized static native void H5export_attribute(String file_export_name, long dataset_id, - String object_path, int binary_order) throws HDF5LibraryException; + String attribute_name, int binary_order) throws HDF5LibraryException; /** * H5is_library_threadsafe Checks to see if the library was built with thread-safety enabled. diff --git a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java index b1052bc104b..ee2ca386b64 100644 --- a/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java +++ b/java/src/hdf/hdf5lib/exceptions/HDF5LibraryException.java @@ -30,7 +30,9 @@ @SuppressWarnings("serial") public class HDF5LibraryException extends HDF5Exception { + /** major error number of the first error on the HDF5 library error stack. */ private final long majorErrorNumber; + /** minor error number of the first error on the HDF5 library error stack. */ private final long minorErrorNumber; /** diff --git a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java index 9f04211a0b0..cf84532a502 100644 --- a/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java +++ b/java/src/hdf/hdf5lib/structs/H5AC_cache_config_t.java @@ -20,41 +20,270 @@ */ public class H5AC_cache_config_t implements Serializable{ private static final long serialVersionUID = -6748085696476149972L; - // general configuration fields: + // general configuration fields + /** + * version: Integer field containing the version number of this version + * of the H5AC_cache_config_t structure. Any instance of + * H5AC_cache_config_t passed to the cache must have a known + * version number, or an error will be flagged. + */ public int version; + /** + * rpt_fcn_enabled: Boolean field used to enable and disable the default + * reporting function. This function is invoked every time the + * automatic cache resize code is run, and reports on its activities. + * + * This is a debugging function, and should normally be turned off. + */ public boolean rpt_fcn_enabled; + /** + * open_trace_file: Boolean field indicating whether the trace_file_name + * field should be used to open a trace file for the cache. + * + * *** DEPRECATED *** Use H5Fstart/stop logging functions instead + */ public boolean open_trace_file; + /** + * close_trace_file: Boolean field indicating whether the current trace + * file (if any) should be closed. + * + * *** DEPRECATED *** Use H5Fstart/stop logging functions instead + */ public boolean close_trace_file; + /** + * trace_file_name: Full path of the trace file to be opened if the + * open_trace_file field is TRUE. + * + * *** DEPRECATED *** Use H5Fstart/stop logging functions instead + */ public String trace_file_name; + /** + * evictions_enabled: Boolean field used to either report the current + * evictions enabled status of the cache, or to set the cache's + * evictions enabled status. + */ public boolean evictions_enabled; + /** + * set_initial_size: Boolean flag indicating whether the size of the + * initial size of the cache is to be set to the value given in + * the initial_size field. If set_initial_size is FALSE, the + * initial_size field is ignored. + */ public boolean set_initial_size; + /** + * initial_size: If enabled, this field contain the size the cache is + * to be set to upon receipt of this structure. Needless to say, + * initial_size must lie in the closed interval [min_size, max_size]. + */ public long initial_size; + /** + * min_clean_fraction: double in the range 0 to 1 indicating the fraction + * of the cache that is to be kept clean. This field is only used + * in parallel mode. Typical values are 0.1 to 0.5. + */ public double min_clean_fraction; + /** + * max_size: Maximum size to which the cache can be adjusted. The + * supplied value must fall in the closed interval + * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must + * be greater than or equal to min_size. + */ public long max_size; + /** + * min_size: Minimum size to which the cache can be adjusted. The + * supplied value must fall in the closed interval + * [H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE]. Also, min_size + * must be less than or equal to max_size. + */ public long min_size; + /** + * epoch_length: Number of accesses on the cache over which to collect + * hit rate stats before running the automatic cache resize code, + * if it is enabled. + */ public long epoch_length; - // size increase control fields: - public int incr_mode; // H5C_cache_incr_mode + // size increase control fields + /** + * incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose + * value indicates how we determine whether the cache size should be + * increased. At present there are two possible values. + */ + public int incr_mode; + /** + * lower_hr_threshold: Lower hit rate threshold. If the increment mode + * (incr_mode) is H5C_incr__threshold and the hit rate drops below the + * value supplied in this field in an epoch, increment the cache size by + * size_increment. Note that cache size may not be incremented above + * max_size, and that the increment may be further restricted by the + * max_increment field if it is enabled. + */ public double lower_hr_threshold; + /** + * increment: Double containing the multiplier used to derive the new + * cache size from the old if a cache size increment is triggered. + * The increment must be greater than 1.0, and should not exceed 2.0. + */ public double increment; + /** + * apply_max_increment: Boolean flag indicating whether the max_increment + * field should be used to limit the maximum cache size increment. + */ public boolean apply_max_increment; + /** + * max_increment: If enabled by the apply_max_increment field described + * above, this field contains the maximum number of bytes by which the + * cache size can be increased in a single re-size. + */ public long max_increment; - public int flash_incr_mode; // H5C_cache_flash_incr_mode + /** + * flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated + * type whose value indicates whether and by which algorithm we should + * make flash increases in the size of the cache to accommodate insertion + * of large entries and large increases in the size of a single entry. + */ + public int flash_incr_mode; + /** + * flash_multiple: Double containing the multiple described above in the + * H5C_flash_incr__add_space section of the discussion of the + * flash_incr_mode section. This field is ignored unless flash_incr_mode + * is H5C_flash_incr__add_space. + */ public double flash_multiple; + /** + * flash_threshold: Double containing the factor by which current max cache + * size is multiplied to obtain the size threshold for the add_space flash + * increment algorithm. The field is ignored unless flash_incr_mode is + * H5C_flash_incr__add_space. + */ public double flash_threshold; - // size decrease control fields: - public int decr_mode; // H5C_cache_decr_mode + // size decrease control fields + /** + * decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose + * value indicates how we determine whether the cache size should be + * decreased. At present there are four possibilities. + */ + public int decr_mode; + /** + * upper_hr_threshold: Upper hit rate threshold. The use of this field + * varies according to the current decr_mode. + */ public double upper_hr_threshold; + /** + * decrement: This field is only used when the decr_mode is + * H5C_decr__threshold. + */ public double decrement; + /** + * apply_max_decrement: Boolean flag used to determine whether decrements + * in cache size are to be limited by the max_decrement field. + */ public boolean apply_max_decrement; + /** + * max_decrement: Maximum number of bytes by which the cache size can be + * decreased in a single re-size. Note that decrements may also be + * restricted by the min_size of the cache, and (in age out modes) by + * the empty_reserve field. + */ public long max_decrement; + /** + * epochs_before_eviction: Integer field used in H5C_decr__age_out and + * H5C_decr__age_out_with_threshold decrement modes. + */ public int epochs_before_eviction; + /** + * apply_empty_reserve: Boolean field controlling whether the empty_reserve + * field is to be used in computing the new cache size when the + * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold. + */ public boolean apply_empty_reserve; + /** + * empty_reserve: To avoid a constant racheting down of cache size by small + * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold + * modes, this field allows one to require that any cache size + * reductions leave the specified fraction of unused space in the cache. + */ public double empty_reserve; - // parallel configuration fields: + // parallel configuration fields + /** + * dirty_bytes_threshold: Threshold of dirty byte creation used to + * synchronize updates between caches. + */ public long dirty_bytes_threshold; + /** + * metadata_write_strategy: Integer field containing a code indicating the + * desired metadata write strategy. + */ public int metadata_write_strategy; + /** H5AC_cache_config_t is a public structure intended for use in public APIs. + * At least in its initial incarnation, it is basically a copy of struct + * H5C_auto_size_ctl_t, minus the report_fcn field, and plus the + * dirty_bytes_threshold field. + * + * @param version: Integer field containing the version number of this version + * @param rpt_fcn_enabled: Boolean field used to enable and disable the default reporting function. + * @param open_trace_file: Boolean field indicating whether the trace_file_name + * field should be used to open a trace file for the cache. + * @param close_trace_file: Boolean field indicating whether the current trace + * file (if any) should be closed. + * @param trace_file_name: Full path of the trace file to be opened if the + * open_trace_file field is TRUE. + * @param evictions_enabled: Boolean field used to either report or set the current + * evictions enabled status of the cache. + * @param set_initial_size: Boolean flag indicating whether the size of the + * initial size of the cache is to be set to the value given in + * the initial_size field. + * @param initial_size: If enabled, this field contain the size the cache is + * to be set to upon receipt of this structure. + * @param min_clean_fraction: double in the range 0 to 1 indicating the fraction + * of the cache that is to be kept clean. + * @param max_size: Maximum size to which the cache can be adjusted. + * @param min_size: Minimum size to which the cache can be adjusted. + * @param epoch_length: Number of accesses on the cache over which to collect + * hit rate stats before running the automatic cache resize code. + * @param incr_mode: Instance of the H5C_cache_incr_mode enumerated type. + * @param lower_hr_threshold: Lower hit rate threshold. + * @param increment: Double containing the multiplier used to derive the new + * cache size from the old if a cache size increment is triggered. + * @param apply_max_increment: Boolean flag indicating whether the max_increment + * field should be used to limit the maximum cache size increment. + * @param max_increment: If enabled by the apply_max_increment field described + * above, this field contains the maximum number of bytes by which the + * cache size can be increased in a single re-size. + * @param flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated + * type whose value indicates whether and by which algorithm we should + * make flash increases in the size of the cache to accommodate insertion + * of large entries and large increases in the size of a single entry. + * @param flash_multiple: Double containing the multiple described above in the + * H5C_flash_incr__add_space section of the discussion of the + * flash_incr_mode section. + * @param flash_threshold: Double containing the factor by which current max cache + * size is multiplied to obtain the size threshold for the add_space flash + * increment algorithm. + * @param decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose + * value indicates how we determine whether the cache size should be + * decreased. + * @param upper_hr_threshold: Upper hit rate threshold. The use of this field + * varies according to the current decr_mode. + * @param decrement: This field is only used when the decr_mode is + * H5C_decr__threshold. + * @param apply_max_decrement: Boolean flag used to determine whether decrements + * in cache size are to be limited by the max_decrement field. + * @param max_decrement: Maximum number of bytes by which the cache size can be + * decreased in a single re-size. + * @param epochs_before_eviction: Integer field used in H5C_decr__age_out and + * H5C_decr__age_out_with_threshold decrement modes. + * @param apply_empty_reserve: Boolean field controlling whether the empty_reserve + * field is to be used in computing the new cache size when the + * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold. + * @param empty_reserve: To avoid a constant racheting down of cache size by small + * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold + * modes. + * @param dirty_bytes_threshold: Threshold of dirty byte creation used to + * synchronize updates between caches. + * @param metadata_write_strategy: Integer field containing a code indicating the + * desired metadata write strategy. + */ public H5AC_cache_config_t (int version, boolean rpt_fcn_enabled, boolean open_trace_file, boolean close_trace_file, String trace_file_name, boolean evictions_enabled, boolean set_initial_size, long initial_size, double min_clean_fraction, long max_size, diff --git a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java index e0741565094..5981fc7f36e 100644 --- a/java/src/hdf/hdf5lib/structs/H5E_error2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5E_error2_t.java @@ -20,14 +20,20 @@ */ public class H5E_error2_t implements Serializable{ private static final long serialVersionUID = 279144359041667613L; - - public long cls_id; //class ID - public long maj_num; //major error ID - public long min_num; //minor error number - public int line; //line in file where error occurs - public String func_name; //function in which error occurred - public String file_name; //file in which error occurred - public String desc; //optional supplied description + /** class ID */ + public long cls_id; + /** major error ID */ + public long maj_num; + /** minor error number */ + public long min_num; + /** line in file where error occurs */ + public int line; + /** function in which error occurred */ + public String func_name; + /** file in which error occurred */ + public String file_name; + /** optional supplied description */ + public String desc; H5E_error2_t(long cls_id, long maj_num, long min_num, int line, String func_name, String file_name, String desc) { this.cls_id = cls_id; diff --git a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java index 26690ec19c0..5da4abddcb8 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java @@ -26,15 +26,31 @@ public class H5FD_hdfs_fapl_t implements Serializable { private static final long serialVersionUID = 2072473407027648309L; + /** Version number of the H5FD_hdfs_fapl_t structure. */ private int version; + /** Name of "Name Node" to access as the HDFS server. */ private String namenode_name; + /** Port number to use to connect with Name Node. */ private int namenode_port; + /** Username to use when accessing file. */ private String user_name; + /** Path to the location of the Kerberos authentication cache. */ private String kerberos_ticket_cache; + /** Size (in bytes) of the file read stream buffer. */ private int stream_buffer_size; - /* + /** * Create a fapl_t structure with the specified components. + * @param namenode_name + * Name of "Name Node" to access as the HDFS server. + * @param namenode_port + * Port number to use to connect with Name Node. + * @param user_name + * Username to use when accessing file. + * @param kerberos_ticket_cache + * Path to the location of the Kerberos authentication cache. + * @param stream_buffer_size + * Size (in bytes) of the file read stream buffer. */ public H5FD_hdfs_fapl_t( String namenode_name, diff --git a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java index 735cc7ec440..39f5424a460 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java @@ -46,10 +46,15 @@ public class H5FD_ros3_fapl_t implements Serializable { private static final long serialVersionUID = 8985533001471224030L; + /** Version number of the H5FD_ros3_fapl_t structure */ private int version; + /** Flag TRUE or FALSE whether or not requests are to be authenticated with the AWS4 algorithm. */ private boolean authenticate; + /** region "aws region" for authenticating request */ private String aws_region; + /** id "secret id" or "access id" for authenticating request */ private String secret_id; + /** key "secret key" or "access key" for authenticating request */ private String secret_key; /** diff --git a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java index bb87201dd1d..f951bb48116 100644 --- a/java/src/hdf/hdf5lib/structs/H5F_info2_t.java +++ b/java/src/hdf/hdf5lib/structs/H5F_info2_t.java @@ -20,16 +20,37 @@ */ public class H5F_info2_t implements Serializable{ private static final long serialVersionUID = 4691681162544054518L; - public int super_version; // Superblock version # - public long super_size; // Superblock size - public long super_ext_size; // Superblock extension size - public int free_version; // Version # of file free space management - public long free_meta_size; // Free space manager metadata size - public long free_tot_space; // Amount of free space in the file - public int sohm_version; // Version # of shared object header info - public long sohm_hdr_size; // Shared object header message header size - public H5_ih_info_t sohm_msgs_info; // Shared object header message index & heap size + /** Superblock version number */ + public int super_version; + /** Superblock size */ + public long super_size; + /** Superblock extension size */ + public long super_ext_size; + /** Version number of file free space management */ + public int free_version; + /** Free space manager metadata size */ + public long free_meta_size; + /** Amount of free space in the file */ + public long free_tot_space; + /** Version number of shared object header info */ + public int sohm_version; + /** Shared object header message header size */ + public long sohm_hdr_size; + /** Shared object header message index and heap size */ + public H5_ih_info_t sohm_msgs_info; + /** + * Constructor fot current "global" information about file + * @param super_version: Superblock version number + * @param super_size: Superblock size + * @param super_ext_size: Superblock extension size + * @param free_version: Version number of file free space management + * @param free_meta_size: Free space manager metadata size + * @param free_tot_space: Amount of free space in the file + * @param sohm_version: Version number of shared object header info + * @param sohm_hdr_size: Shared object header message header size + * @param sohm_msgs_info: Shared object header message index and heap size + */ public H5F_info2_t (int super_version, long super_size, long super_ext_size, int free_version, long free_meta_size, long free_tot_space, int sohm_version, long sohm_hdr_size, H5_ih_info_t sohm_msgs_info) diff --git a/java/src/hdf/hdf5lib/structs/H5G_info_t.java b/java/src/hdf/hdf5lib/structs/H5G_info_t.java index 6d4f405aa53..e79f8595223 100644 --- a/java/src/hdf/hdf5lib/structs/H5G_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5G_info_t.java @@ -20,8 +20,12 @@ */ public class H5G_info_t implements Serializable{ private static final long serialVersionUID = -3746463015312132912L; - public int storage_type; // Type of storage for links in group - public long nlinks; // Number of links in group - public long max_corder; // Current max. creation order value for group - public boolean mounted; // Whether group has a file mounted on it + /** Type of storage for links in group */ + public int storage_type; + /** Number of links in group */ + public long nlinks; + /** Current max. creation order value for group */ + public long max_corder; + /** Whether group has a file mounted on it */ + public boolean mounted; } diff --git a/java/src/hdf/hdf5lib/structs/H5L_info_t.java b/java/src/hdf/hdf5lib/structs/H5L_info_t.java index 9da237b0733..388ad8f78c2 100644 --- a/java/src/hdf/hdf5lib/structs/H5L_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5L_info_t.java @@ -18,14 +18,20 @@ * Information struct for link (for H5Lget_info/H5Lget_info_by_idx) * */ -public class H5L_info_t implements Serializable{ +public class H5L_info_t implements Serializable { private static final long serialVersionUID = -4754320605310155033L; + /** Type of link */ public int type; + /** Indicate if creation order is valid */ public boolean corder_valid; + /** Creation order */ public long corder; + /** Character set of link name */ public int cset; + /** Size of a soft link or user-defined link value */ public long address_val_size; + /** Constructor for using val_size portion of C union */ H5L_info_t (int type, boolean corder_valid, long corder, int cset, long address_val_size) { diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java index 9a1749dc14d..2475dd933e7 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -20,16 +20,26 @@ */ public class H5O_hdr_info_t implements Serializable { private static final long serialVersionUID = 7883826382952577189L; - public int version; /* Version number of header format in file */ - public int nmesgs; /* Number of object header messages */ - public int nchunks; /* Number of object header chunks */ - public int flags; /* Object header status flags */ - public long space_total; /* Total space for storing object header in file */ - public long space_meta; /* Space within header for object header metadata information */ - public long space_mesg; /* Space within header for actual message information */ - public long space_free; /* Free space within object header */ - public long mesg_present; /* Flags to indicate presence of message type in header */ - public long mesg_shared; /* Flags to indicate message type is shared in header */ + /** Version number of header format in file */ + public int version; + /** Number of object header messages */ + public int nmesgs; + /** Number of object header chunks */ + public int nchunks; + /** Object header status flags */ + public int flags; + /** Total space for storing object header in file */ + public long space_total; + /** Space within header for object header metadata information */ + public long space_meta; + /** Space within header for actual message information */ + public long space_mesg; + /** Free space within object header */ + public long space_free; + /** Flags to indicate presence of message type in header */ + public long mesg_present; + /** Flags to indicate message type is shared in header */ + public long mesg_shared; H5O_hdr_info_t (int version, int nmesgs, int nchunks, int flags, long space_total, long space_meta, long space_mesg, long space_free, diff --git a/java/src/hdf/hdf5lib/structs/H5O_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_info_t.java index 02bdcbd5cdb..d16295d20d1 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_info_t.java @@ -20,20 +20,50 @@ */ public class H5O_info_t implements Serializable { private static final long serialVersionUID = 4691681163544054518L; - public long fileno; /* File number that object is located in */ - public long addr; /* Object address in file */ - public int type; /* Basic object type (group, dataset, etc.) */ - public int rc; /* Reference count of object */ - public long atime; /* Access time */ - public long mtime; /* Modification time */ - public long ctime; /* Change time */ - public long btime; /* Birth time */ - public long num_attrs; /* # of attributes attached to object */ - public H5O_hdr_info_t hdr; /* Object header information */ - /* Extra metadata storage for obj & attributes */ - public H5_ih_info_t meta_size_obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ - public H5_ih_info_t meta_size_attr; /* v2 B-tree & heap for attributes */ + /** File number that object is located in */ + public long fileno; + /** Object address in file */ + public long addr; + /** Basic object type (group, dataset, etc.) */ + public int type; + /** Reference count of object */ + public int rc; + /** Access time */ + public long atime; + /** Modification time */ + public long mtime; + /** Change time */ + public long ctime; + /** Birth time */ + public long btime; + /** # of attributes attached to object */ + public long num_attrs; + /** Object header information */ + public H5O_hdr_info_t hdr; + /** Extra metadata storage for obj + * v1/v2 B-tree and local/fractal heap for groups, B-tree for chunked datasets + */ + public H5_ih_info_t meta_size_obj; + /** Extra metadata storage for attributes + * v2 B-tree and heap for attributes + */ + public H5_ih_info_t meta_size_attr; + /** Constructor for data model information struct for objects + * + * @param fileno: File number that object is located in + * @param addr: Object address in file + * @param type: Basic object type + * @param rc: Reference count of object + * @param num_attrs: Number of attributes attached to object + * @param atime: Access time + * @param mtime: Modification time + * @param ctime: Change time + * @param btime: Birth time + * @param hdr: Object header information + * @param meta_size_obj: v1/v2 B-tree and local/fractal heap for groups, B-tree for chunked datasets + * @param meta_size_attr: v2 B-tree and heap for attributes + */ public H5O_info_t (long fileno, long addr, int type, int rc, long num_attrs, long atime, long mtime, long ctime, long btime, H5O_hdr_info_t hdr, H5_ih_info_t meta_size_obj, H5_ih_info_t meta_size_attr) diff --git a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java index 0551469f3c5..0c6111beb5d 100644 --- a/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5_ih_info_t.java @@ -20,7 +20,9 @@ */ public class H5_ih_info_t implements Serializable { private static final long serialVersionUID = -142238015615462707L; - public long index_size; /* btree and/or list */ + /** btree and/or list size of index */ + public long index_size; + /** btree and/or list size of hp */ public long heap_size; H5_ih_info_t (long index_size, long heap_size) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index e21b1ad8c05..0b01411adc4 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -1324,7 +1324,10 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re /* * This function fails if the region does not have blocks. */ - H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region_space); } + H5E_BEGIN_TRY + { + nblocks = H5Sget_select_hyper_nblocks(region_space); + } H5E_END_TRY; if (nblocks <= 0) { @@ -1497,7 +1500,10 @@ h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re /* * This function fails if the region does not have points. */ - H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region_space); } + H5E_BEGIN_TRY + { + npoints = H5Sget_select_elem_npoints(region_space); + } H5E_END_TRY; if (npoints <= 0) { @@ -2865,7 +2871,6 @@ h5str_dump_simple_data(JNIEnv *env, FILE *stream, hid_t container, hid_t type, v H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); } } - if (HDfprintf(stream, "%s", buffer.s) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_dump_simple_data: HDfprintf failure"); diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 2916aacda51..67dd24400bd 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -162,6 +162,7 @@ public final void _deleteH5file() { @After public void closeH5File() throws HDF5LibraryException { _closeH5File(); + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); System.out.println(); } diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 68be3a47ec7..1d783227f8b 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -795,6 +795,8 @@ HDF5_BUILD_DOC "Build documentation" HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF HDF5_ENABLE_FORMATTERS "format source files" OFF +HDF5_USE_FILE_LOCKING "Use file locking by default (mainly for SWMR)" ON +HDF5_IGNORE_DISABLED_FILE_LOCKS "Ignore file locks when disabled on file system" ON ---------------- External Library Options --------------------- HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO" From 9c8f446bdad8144acec82384b22109d698c775a4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 25 Mar 2021 08:27:30 -0500 Subject: [PATCH 34/66] synch file --- java/src/jni/h5util.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 0b01411adc4..567751a6b6f 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -1324,10 +1324,7 @@ h5str_dump_region_blocks(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re /* * This function fails if the region does not have blocks. */ - H5E_BEGIN_TRY - { - nblocks = H5Sget_select_hyper_nblocks(region_space); - } + H5E_BEGIN_TRY { nblocks = H5Sget_select_hyper_nblocks(region_space); } H5E_END_TRY; if (nblocks <= 0) { @@ -1500,10 +1497,7 @@ h5str_dump_region_points(JNIEnv *env, h5str_t *str, hid_t region_space, hid_t re /* * This function fails if the region does not have points. */ - H5E_BEGIN_TRY - { - npoints = H5Sget_select_elem_npoints(region_space); - } + H5E_BEGIN_TRY { npoints = H5Sget_select_elem_npoints(region_space); } H5E_END_TRY; if (npoints <= 0) { From df834ed087f3d38c50de844d0cfd9bd602270a78 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 31 Mar 2021 15:12:30 -0500 Subject: [PATCH 35/66] Merge of long double fix and compiler flags --- .clang-format | 2 + .gitattributes | 1 + MANIFEST | 9 + bin/format_source | 2 +- bin/format_source_patch | 2 +- config/cmake/HDFCXXCompilerFlags.cmake | 140 ++--- config/cmake/HDFCompilerFlags.cmake | 156 ++---- config/cmake/hdf5-config-version.cmake.in | 2 +- hl/tools/gif2h5/gifread.c | 5 +- java/test/CMakeLists.txt | 4 + java/test/Makefile.am | 2 + java/test/TestAll.java | 4 +- java/test/TestH5Arw.java | 449 ++++++++++++++++ java/test/TestH5Drw.java | 378 +++++++++++++ java/test/junit.sh.in | 46 ++ java/test/testfiles/JUnit-TestH5Arw.txt | 13 + java/test/testfiles/JUnit-TestH5Drw.txt | 13 + release_docs/RELEASE.txt | 28 +- tools/lib/h5diff_array.c | 11 +- tools/lib/h5tools_dump.c | 4 - tools/lib/h5tools_str.c | 19 +- tools/src/h5ls/h5ls.c | 5 - tools/test/h5dump/CMakeTests.cmake | 10 +- tools/test/h5dump/h5dumpgentest.c | 165 +++++- tools/test/h5dump/testh5dump.sh.in | 8 +- tools/testfiles/tfloatsattrs.ddl | 621 ++++++++++++++++++++++ tools/testfiles/tfloatsattrs.h5 | Bin 0 -> 47264 bytes tools/testfiles/tfloatsattrs.wddl | 621 ++++++++++++++++++++++ tools/testfiles/tldouble.ddl | 2 +- tools/testfiles/tldouble_scalar.ddl | 26 + tools/testfiles/tldouble_scalar.h5 | Bin 0 -> 2144 bytes 31 files changed, 2505 insertions(+), 243 deletions(-) create mode 100644 java/test/TestH5Arw.java create mode 100644 java/test/TestH5Drw.java create mode 100644 java/test/testfiles/JUnit-TestH5Arw.txt create mode 100644 java/test/testfiles/JUnit-TestH5Drw.txt create mode 100644 tools/testfiles/tfloatsattrs.ddl create mode 100644 tools/testfiles/tfloatsattrs.h5 create mode 100644 tools/testfiles/tfloatsattrs.wddl create mode 100755 tools/testfiles/tldouble_scalar.ddl create mode 100644 tools/testfiles/tldouble_scalar.h5 diff --git a/.clang-format b/.clang-format index 34b75631571..62dc6b584b2 100644 --- a/.clang-format +++ b/.clang-format @@ -7,6 +7,7 @@ AlignConsecutiveDeclarations: true AlignConsecutiveMacros: true #llvm10-11: AlignOperands: true - Align #llvm11: AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: None AlwaysBreakAfterReturnType: AllDefinitions # Can enable the following section when llvm 12.x is out #AttributeMacros: @@ -32,6 +33,7 @@ BreakBeforeBraces: Stroustrup BreakAfterJavaFieldAnnotations: true BreakStringLiterals: true ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also +ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS'] IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 3 diff --git a/.gitattributes b/.gitattributes index 87130b7ea27..7d434d2548c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -783,6 +783,7 @@ tools/testfiles/tints4dimsStride2.ddl -text tools/testfiles/tintsattrs.h5 -text svneol=unset#application/x-hdf tools/testfiles/tlarge_objname.h5 -text tools/testfiles/tldouble.h5 -text +tools/testfiles/tldouble_scalar.h5 -text tools/testfiles/tlonglinks.h5 -text tools/testfiles/tloop.h5 -text tools/testfiles/tloop2.h5 -text diff --git a/MANIFEST b/MANIFEST index 0af879e2fb1..cff8f3d0c84 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1907,6 +1907,9 @@ ./tools/testfiles/tfill.ddl ./tools/testfiles/tfilters.h5 ./tools/testfiles/tfletcher32.ddl +./tools/testfiles/tfloatsattrs.ddl +./tools/testfiles/tfloatsattrs.h5 +./tools/testfiles/tfloatsattrs.wddl ./tools/testfiles/tfvalues.h5 ./tools/testfiles/tgroup-1.ddl ./tools/testfiles/tgroup-2.ddl @@ -1946,6 +1949,8 @@ ./tools/testfiles/tlarge_objname.h5 ./tools/testfiles/tldouble.ddl ./tools/testfiles/tldouble.h5 +./tools/testfiles/tldouble_scalar.ddl +./tools/testfiles/tldouble_scalar.h5 ./tools/testfiles/tlonglinks.ddl ./tools/testfiles/tlonglinks.h5 ./tools/testfiles/tloop-1.ddl @@ -3290,9 +3295,11 @@ ./java/test/junit.sh.in ./java/test/testfiles/JUnit-TestH5.txt ./java/test/testfiles/JUnit-TestH5A.txt +./java/test/testfiles/JUnit-TestH5Arw.txt ./java/test/testfiles/JUnit-TestH5Dparams.txt ./java/test/testfiles/JUnit-TestH5D.txt ./java/test/testfiles/JUnit-TestH5Dplist.txt +./java/test/testfiles/JUnit-TestH5Drw.txt ./java/test/testfiles/JUnit-TestH5E.txt ./java/test/testfiles/JUnit-TestH5Edefault.txt ./java/test/testfiles/JUnit-TestH5Eparams.txt @@ -3329,9 +3336,11 @@ ./java/test/h5ex_g_iterate.orig ./java/test/TestH5.java ./java/test/TestH5A.java +./java/test/TestH5Arw.java ./java/test/TestH5Dparams.java ./java/test/TestH5D.java ./java/test/TestH5Dplist.java +./java/test/TestH5Drw.java ./java/test/TestH5E.java ./java/test/TestH5Edefault.java ./java/test/TestH5Eparams.java diff --git a/bin/format_source b/bin/format_source index 1128def955a..dce34e5b1ed 100755 --- a/bin/format_source +++ b/bin/format_source @@ -8,7 +8,7 @@ # # (Remember to update both bin/format_source and bin/format_source_patch) -find . -type d \( -path ./config \) -prune \ +find . \( -type d -path ./config -prune -and -not -path ./config \) \ -or \( \( \! \( \ -name H5LTanalyze.c \ -or -name H5LTparse.c \ diff --git a/bin/format_source_patch b/bin/format_source_patch index 8d6be014f70..439baf25542 100755 --- a/bin/format_source_patch +++ b/bin/format_source_patch @@ -8,7 +8,7 @@ # # (Remember to update both bin/format_source and bin/format_source_patch) -find . -type d \( -path ./config \) -prune \ +find . \( -type d -path ./config -prune -and -not -path ./config \) \ -or \( \( \! \( \ -name H5LTanalyze.c \ -or -name H5LTparse.c \ diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 12dec2094b7..757692c3313 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -91,8 +91,8 @@ if (NOT MSVC AND NOT MINGW) if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) - list (APPEND H5_CXXFLAGS0 "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") - list (APPEND H5_CXXFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings") + list (APPEND H5_CXXFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") + list (APPEND H5_CXXFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings") endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED @@ -100,9 +100,9 @@ if (NOT MSVC AND NOT MINGW) # add the general CXX flags for g++ compiler versions 4.8 and above. ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general") else () - ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general") endif () endif () elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -122,20 +122,20 @@ if (NOT MSVC AND NOT MINGW) if (HDF5_ENABLE_DEV_WARNINGS) message (STATUS "....HDF5 developer group warnings are enabled") # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - # list (APPEND H5_CXXFLAGS0 "-Winline -Wreorder -Wport -Wstrict-aliasing") + # list (APPEND H5_CXXFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing") # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () @@ -144,41 +144,41 @@ if (NOT MSVC AND NOT MINGW) # we should approach them a bit cautiously... Only needed for gcc 4.X if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") endif () # Append more extra warning flags that only gcc 4.8+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") if (HDF5_ENABLE_DEV_WARNINGS) - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8") else () - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8") endif () endif () # Append more extra warning flags that only gcc 4.9+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9") endif () # Append more extra warning flags that only gcc 5.1+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5") else () - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5") endif () endif () # Append more extra warning flags that only gcc 6.x+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") endif () # Append more extra warning flags that only gcc 7.x+ know about @@ -187,34 +187,34 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") if (HDF5_ENABLE_DEV_WARNINGS) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7") #else () - # ADD_H5_FLAGS (H5_CXXFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7") + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7") endif () endif () # Append more extra warning flags that only gcc 8.x+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") #if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") #else () - # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") #endif () if (HDF5_ENABLE_DEV_WARNINGS) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") else () # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8") endif () endif () # Append more extra warning flags that only gcc 9.x+ know about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS4 "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") endif () endif () else () @@ -232,97 +232,17 @@ if (HDF5_ENABLE_ALL_WARNINGS) if (HDF5_ENABLE_DEV_WARNINGS) if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/Wall /wd4668") + list (APPEND HDF5_CMAKE_CXX_FLAGS "/Wall" "/wd4668") endif () else () if (CMAKE_CXX_COMPILER_LOADED) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3") + list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3" "/wd4100" "/wd4706" "/wd4127") endif () endif () else () if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0} ${H5_CXXFLAGS1} ${H5_CXXFLAGS2} ${H5_CXXFLAGS3} ${H5_CXXFLAGS4}) - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_GROUPZERO_WARNINGS) - message (STATUS "....Group Zero warnings are enabled") - if (MSVC) - if (CMAKE_CXX_COMPILER_LOADED) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/W1") - endif () - else () - if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS0}) - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_GROUPONE_WARNINGS) - message (STATUS "....Group One warnings are enabled") - if (MSVC) - if (CMAKE_CXX_COMPILER_LOADED) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/W2") - endif () - else () - if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS1}) - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_GROUPTWO_WARNINGS) - message (STATUS "....Group Two warnings are enabled") - if (MSVC) - if (CMAKE_CXX_COMPILER_LOADED) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/W3") - endif () - else () - if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS2}) - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_GROUPTHREE_WARNINGS) - message (STATUS "....Group Three warnings are enabled") - if (MSVC) - if (CMAKE_CXX_COMPILER_LOADED) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_CXX_FLAGS "${HDF5_CMAKE_CXX_FLAGS}") - list (APPEND HDF5_CMAKE_CXX_FLAGS "/W4") - endif () - else () - if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS3}) - endif () - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -if (HDF5_ENABLE_GROUPFOUR_WARNINGS) - message (STATUS "....Group Four warnings are enabled") - if (NOT MSVC) - if (CMAKE_CXX_COMPILER_LOADED) - list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS4}) + list (APPEND HDF5_CMAKE_CXX_FLAGS ${H5_CXXFLAGS}) endif () endif () endif () diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index bce906d6ea2..add40bb17ad 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -15,6 +15,7 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE) set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}") endif () @@ -111,34 +112,34 @@ if (NOT MSVC AND NOT MINGW) # warnings that are emitted. If you need it, add it at configure time. if (CMAKE_C_COMPILER_ID STREQUAL "Intel") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general") - list (APPEND H5_CFLAGS0 "-Wcomment -Wdeprecated -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith") - list (APPEND H5_CFLAGS0 "-Wreturn-type -Wstrict-prototypes -Wuninitialized") - list (APPEND H5_CFLAGS0 "-Wunknown-pragmas -Wunused-function -Wunused-variable") + list (APPEND H5_CFLAGS "-Wcomment -Wdeprecated -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith") + list (APPEND H5_CFLAGS "-Wreturn-type -Wstrict-prototypes -Wuninitialized") + list (APPEND H5_CFLAGS "-Wunknown-pragmas -Wunused-function -Wunused-variable") # this is just a failsafe - list (APPEND H5_CFLAGS0 "-finline-functions") + list (APPEND H5_CFLAGS "-finline-functions") if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) - list (APPEND H5_CFLAGS0 "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") - list (APPEND H5_CFLAGS0 "-Wsign-compare -Wtrigraphs -Wwrite-strings") + list (APPEND H5_CFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") + list (APPEND H5_CFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings") endif() elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Add general CFlags for GCC versions 4.8 and above if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") else () - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general") endif () endif () # gcc automatically inlines based on the optimization level # this is just a failsafe - list (APPEND H5_CFLAGS0 "-finline-functions") + list (APPEND H5_CFLAGS "-finline-functions") elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") else () - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general") endif () elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI") list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform") @@ -156,17 +157,17 @@ if (NOT MSVC AND NOT MINGW) if (HDF5_ENABLE_DEV_WARNINGS) message (STATUS "....HDF5 developer group warnings are enabled") if (CMAKE_C_COMPILER_ID STREQUAL "Intel") - list (APPEND H5_CFLAGS0 "-Winline -Wreorder -Wport -Wstrict-aliasing") + list (APPEND H5_CFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing") elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") - ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () @@ -174,65 +175,79 @@ if (NOT MSVC AND NOT MINGW) # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") endif () # Append more extra warning flags that only gcc 4.8+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") if (HDF5_ENABLE_DEV_WARNINGS) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8") else () - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8") endif () endif () # Append more extra warning flags that only gcc 4.9+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") endif () # Append more extra warning flags that only gcc 5.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") else () - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5") endif () endif () # Append more extra warning flags that only gcc 6.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0) - ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") endif () # Append more extra warning flags that only gcc 7.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0) - ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") if (HDF5_ENABLE_DEV_WARNINGS) - ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7") #else () - # ADD_H5_FLAGS (H5_CFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7") + # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7") endif () endif () # Append more extra warning flags that only gcc 8.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) - ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") endif () if (HDF5_ENABLE_DEV_WARNINGS) - ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") else () - ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8") endif () endif () # Append more extra warning flags that only gcc 9.x+ know about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0) - ADD_H5_FLAGS (H5_CFLAGS4 "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") + endif () + + # Append more extra warning flags that only gcc 9.3+ know about + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3) + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3") + endif () + + # Append more extra warning flags that only gcc 10.x+ know about + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_DEV_WARNINGS) + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10") + #else () + # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10") + endif () endif () endif () endif () @@ -240,86 +255,19 @@ endif () #----------------------------------------------------------------------------- # Option to allow the user to enable all warnings #----------------------------------------------------------------------------- -option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF) +option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" ON) if (HDF5_ENABLE_ALL_WARNINGS) message (STATUS "....All Warnings are enabled") if (MSVC) if (HDF5_ENABLE_DEV_WARNINGS) string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/Wall /wd4668") + list (APPEND HDF5_CMAKE_C_FLAGS "/Wall" "/wd4668") else () string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/W3") + list (APPEND HDF5_CMAKE_C_FLAGS "/W3" "/wd4100" "/wd4706" "/wd4127") endif () else () - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0} ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}) - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -option (HDF5_ENABLE_GROUPZERO_WARNINGS "Enable group zero warnings" OFF) -if (HDF5_ENABLE_GROUPZERO_WARNINGS) - message (STATUS "....Group Zero warnings are enabled") - if (MSVC) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/W1") - else () - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS0}) - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -option (HDF5_ENABLE_GROUPONE_WARNINGS "Enable group one warnings" OFF) -if (HDF5_ENABLE_GROUPONE_WARNINGS) - message (STATUS "....Group One warnings are enabled") - if (MSVC) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/W2") - else () - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS1}) - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -option (HDF5_ENABLE_GROUPTWO_WARNINGS "Enable group two warnings" OFF) -if (HDF5_ENABLE_GROUPTWO_WARNINGS) - message (STATUS "....Group Two warnings are enabled") - if (MSVC) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/W3") - else () - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS2}) - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -option (HDF5_ENABLE_GROUPTHREE_WARNINGS "Enable group three warnings" OFF) -if (HDF5_ENABLE_GROUPTHREE_WARNINGS) - message (STATUS "....Group Three warnings are enabled") - if (MSVC) - string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " HDF5_CMAKE_C_FLAGS "${HDF5_CMAKE_C_FLAGS}") - list (APPEND HDF5_CMAKE_C_FLAGS "/W4") - else () - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS3}) - endif () -endif () - -#----------------------------------------------------------------------------- -# Option to allow the user to enable warnings by groups -#----------------------------------------------------------------------------- -option (HDF5_ENABLE_GROUPFOUR_WARNINGS "Enable group four warnings" OFF) -if (HDF5_ENABLE_GROUPFOUR_WARNINGS) - message (STATUS "....Group Four warnings are enabled") - if (NOT MSVC) - list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS4}) + list (APPEND HDF5_CMAKE_C_FLAGS ${H5_CFLAGS}) endif () endif () diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in index 8e93dc6dfe2..20ce630351a 100644 --- a/config/cmake/hdf5-config-version.cmake.in +++ b/config/cmake/hdf5-config-version.cmake.in @@ -33,7 +33,7 @@ else() endif() if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND - (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR)) + (PACKAGE_FIND_VERSION_MINOR STRLESS_EQUAL CVF_VERSION_MINOR)) set(PACKAGE_VERSION_COMPATIBLE TRUE) else() set(PACKAGE_VERSION_COMPATIBLE FALSE) diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c index d2afbc48c2c..dd9e5be8625 100644 --- a/hl/tools/gif2h5/gifread.c +++ b/hl/tools/gif2h5/gifread.c @@ -38,7 +38,10 @@ GetWord(GIFBYTE *MemGif) } GIFBYTE -GetByte(const GIFBYTE *MemGif) { return *MemGif; } +GetByte(const GIFBYTE *MemGif) +{ + return *MemGif; +} /* * Read a GIF image GIFBYTE Header. diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 8dd0b9ae508..c110f58687d 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -23,6 +23,7 @@ set (HDF5_JAVA_TEST_SOURCES TestH5Dparams TestH5D TestH5Dplist + TestH5Drw TestH5Lparams TestH5Lbasic TestH5Lcreate @@ -33,6 +34,7 @@ set (HDF5_JAVA_TEST_SOURCES TestH5Pvirtual TestH5Plist TestH5A + TestH5Arw TestH5Oparams TestH5Obasic TestH5Ocreate @@ -94,6 +96,8 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_DIR}/h5ex_g_iterateO2.hdf" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5" "${PROJECT_BINARY_DIR}/trefer_reg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tattrreg.h5" "${PROJECT_BINARY_DIR}/tattrreg.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tintsattrs.h5" "${PROJECT_BINARY_DIR}/tintsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") +HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5" "${PROJECT_BINARY_DIR}/tfloatsattrs.h5" "${HDF5_JAVA_TEST_LIB_TARGET}_files") add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list}) diff --git a/java/test/Makefile.am b/java/test/Makefile.am index 7a7fa8a463e..cb447e8f722 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -52,6 +52,7 @@ noinst_JAVA = \ TestH5T.java \ TestH5Dparams.java \ TestH5D.java \ + TestH5Drw.java \ TestH5Dplist.java \ TestH5Lparams.java \ TestH5Lbasic.java \ @@ -65,6 +66,7 @@ noinst_JAVA = \ TestH5Pvirtual.java \ TestH5Plist.java \ TestH5A.java \ + TestH5Arw.java \ TestH5Oparams.java \ TestH5Obasic.java \ TestH5Ocreate.java \ diff --git a/java/test/TestAll.java b/java/test/TestAll.java index 92cbb784902..0b5ef23e0c9 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -22,12 +22,12 @@ TestH5Gbasic.class, TestH5G.class, TestH5Giterate.class, TestH5Sbasic.class, TestH5S.class, TestH5Tparams.class, TestH5Tbasic.class, TestH5T.class, - TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, + TestH5Dparams.class, TestH5D.class, TestH5Dplist.class, TestH5Drw.class, TestH5Lparams.class, TestH5Lbasic.class, TestH5Lcreate.class, TestH5R.class, TestH5P.class, TestH5PData.class, TestH5Pfapl.class, TestH5Pvirtual.class, TestH5Plist.class, TestH5Pfapls3.class, TestH5Pfaplhdfs.class, - TestH5A.class, + TestH5A.class, TestH5Arw.class, TestH5Oparams.class, TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class, TestH5PL.class, TestH5Z.class }) diff --git a/java/test/TestH5Arw.java b/java/test/TestH5Arw.java new file mode 100644 index 00000000000..282b73651eb --- /dev/null +++ b/java/test/TestH5Arw.java @@ -0,0 +1,449 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +package test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; + +import hdf.hdf5lib.H5; +import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.HDFNativeData; +import hdf.hdf5lib.callbacks.H5A_iterate_cb; +import hdf.hdf5lib.callbacks.H5A_iterate_t; +import hdf.hdf5lib.exceptions.HDF5Exception; +import hdf.hdf5lib.exceptions.HDF5LibraryException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + +public class TestH5Arw { + @Rule public TestName testname = new TestName(); + private static final String H5_INTS_FILE = "tintsattrs.h5"; + private static final String H5_FLTS_FILE = "tfloatsattrs.h5"; + private static final int DIM_X = 8; + private static final int DIM8_Y = 8; + private static final int DIM16_Y = 16; + private static final int DIM32_Y = 32; + private static final int DIM64_Y = 64; + private static final int DIM128_Y = 128; + private static final String DATASETU08 = "DU08BITS"; + private static final String DATASETS08 = "DS08BITS"; + private static final String DATASETU16 = "DU16BITS"; + private static final String DATASETS16 = "DS16BITS"; + private static final String DATASETU32 = "DU32BITS"; + private static final String DATASETS32 = "DS32BITS"; + private static final String DATASETU64 = "DU64BITS"; + private static final String DATASETS64 = "DS64BITS"; + private static final String DATASETF32 = "DS32BITS"; + private static final String DATASETF64 = "DS64BITS"; + private static final String DATASETF128 = "DS128BITS"; + private static final int RANK = 2; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5aid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + + private final void _closeH5file() throws HDF5LibraryException { + if (H5aid >= 0) + try {H5.H5Aclose(H5aid);} catch (Exception ex) {} + if (H5did >= 0) + try {H5.H5Dclose(H5did);} catch (Exception ex) {} + if (H5fid > 0) + try {H5.H5Fclose(H5fid);} catch (Exception ex) {} + } + + public void openH5file(String filename, String dsetname) { + try { + H5fid = H5.H5Fopen(filename, + HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5Arw._openH5file: " + err); + } + assertTrue("TestH5Arw._openH5file: H5.H5Fopen: ", H5fid >= 0); + try { + H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5Arw._openH5file: " + err); + } + assertTrue("TestH5Arw._openH5file: H5.H5Dopen: ", H5did >= 0); + try { + H5aid = H5.H5Aopen(H5did, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5Arw._openH5file: " + err); + } + assertTrue("TestH5Arw._openH5file: H5.H5Aopen: ", H5aid >= 0); + } + + @After + public void closeH5file() throws HDF5LibraryException { + if (H5aid >= 0) + try {H5.H5Aclose(H5aid);} catch (Exception ex) {} + if (H5did >= 0) + try {H5.H5Aclose(H5did);} catch (Exception ex) {} + if (H5fid > 0) + try {H5.H5Fclose(H5fid);} catch (Exception ex) {} + H5fid = HDF5Constants.H5I_INVALID_HID; + H5did = HDF5Constants.H5I_INVALID_HID; + H5aid = HDF5Constants.H5I_INVALID_HID; + System.out.println(); + } + + @Before + public void verifyCount() + throws NullPointerException, HDF5Exception { + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + } + + @Test + public void testH5Aread_8bit_ints() { + byte[][] attr_data = new byte[DIM_X][DIM8_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU08); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_8bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_UINT8, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_8bit_ints: H5Aread: " + err); + } + + // End access to the attribute and release resources used by it. + try { + H5.H5Aclose(H5aid); + } + catch (Exception err) { + err.printStackTrace(); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS08, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_8bit_ints: H5Dopen: " + err); + } + + // Open an existing attribute. + try { + H5aid = H5.H5Aopen(H5did, DATASETS08, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_8bit_ints: H5Aopen: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_INT8, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_8bit_ints: H5Aread: " + err); + } + } + + @Test + public void testH5Aread_16bit_ints() { + short[][] attr_data = new short[DIM_X][DIM16_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU16); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_16bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_UINT16, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_16bit_ints: H5Aread: " + err); + } + + // End access to the attribute and release resources used by it. + try { + H5.H5Aclose(H5aid); + } + catch (Exception err) { + err.printStackTrace(); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS16, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_16bit_ints: H5Dopen: " + err); + } + + // Open an existing attribute. + try { + H5aid = H5.H5Aopen(H5did, DATASETS16, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_16bit_ints: H5Aopen: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_INT16, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_16bit_ints: H5Aread: " + err); + } + } + + @Test + public void testH5Aread_32bit_ints() { + int[][] attr_data = new int[DIM_X][DIM16_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU32); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_32bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_UINT32, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_32bit_ints: H5Aread: " + err); + } + + // End access to the attribute and release resources used by it. + try { + H5.H5Aclose(H5aid); + } + catch (Exception err) { + err.printStackTrace(); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS32, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_32bit_ints: H5Dopen: " + err); + } + + // Open an existing attribute. + try { + H5aid = H5.H5Aopen(H5did, DATASETS32, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_32bit_ints: H5Aopen: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_INT32, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_32bit_ints: H5Aread: " + err); + } + } + + @Test + public void testH5Aread_64bit_ints() { + long[][] attr_data = new long[DIM_X][DIM64_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU64); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_64bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_UINT64, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_64bit_ints: H5Aread: " + err); + } + + // End access to the attribute and release resources used by it. + try { + H5.H5Aclose(H5aid); + } + catch (Exception err) { + err.printStackTrace(); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS64, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_64bit_ints: H5Dopen: " + err); + } + + // Open an existing attribute. + try { + H5aid = H5.H5Aopen(H5did, DATASETS64, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_64bit_ints: H5Aopen: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_INT64, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_64bit_ints: H5Aread: " + err); + } + } + + @Test + public void testH5Aread_32bit_floats() { + float[][] attr_data = new float[DIM_X][DIM32_Y]; + + try { + openH5file(H5_FLTS_FILE, DATASETF32); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_32bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_FLOAT, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_32bit_floats: H5Aread: " + err); + } + for (int i = 0; i < DIM_X; i++) + assertTrue("testH5Aread_32bit_floats - H5.H5Aread: ", attr_data[i][0] == (32 - i)); + } + + @Test + public void testH5Aread_64bit_floats() { + double[][] attr_data = new double[DIM_X][DIM64_Y]; + + try { + openH5file(H5_FLTS_FILE, DATASETF64); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_64bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_DOUBLE, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_64bit_floats: H5Aread: " + err); + } + for (int i = 0; i < DIM_X; i++) + assertTrue("testH5Aread_64bit_floats - H5.H5Aread: ", attr_data[i][0] == (64 - i)); + } + + @Test + public void testH5Aread_128bit_floats() { + byte[][][] attr_data = new byte[DIM_X][DIM128_Y][8]; + + try { + openH5file(H5_FLTS_FILE, DATASETF128); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Aread_128bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Aread(H5aid, HDF5Constants.H5T_NATIVE_LDOUBLE, attr_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Aread_128bit_floats: H5Aread: " + err); + } + } + +} diff --git a/java/test/TestH5Drw.java b/java/test/TestH5Drw.java new file mode 100644 index 00000000000..69fb9d78595 --- /dev/null +++ b/java/test/TestH5Drw.java @@ -0,0 +1,378 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +package test; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.File; + +import hdf.hdf5lib.H5; +import hdf.hdf5lib.HDF5Constants; +import hdf.hdf5lib.HDFNativeData; +import hdf.hdf5lib.callbacks.H5D_iterate_cb; +import hdf.hdf5lib.callbacks.H5D_iterate_t; +import hdf.hdf5lib.exceptions.HDF5Exception; +import hdf.hdf5lib.exceptions.HDF5LibraryException; + +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TestName; + +public class TestH5Drw { + @Rule public TestName testname = new TestName(); + private static final String H5_INTS_FILE = "tintsattrs.h5"; + private static final String H5_FLTS_FILE = "tfloatsattrs.h5"; + private static final int DIM_X = 8; + private static final int DIM8_Y = 8; + private static final int DIM16_Y = 16; + private static final int DIM32_Y = 32; + private static final int DIM64_Y = 64; + private static final int DIM128_Y = 128; + private static final String DATASETU08 = "DU08BITS"; + private static final String DATASETS08 = "DS08BITS"; + private static final String DATASETU16 = "DU16BITS"; + private static final String DATASETS16 = "DS16BITS"; + private static final String DATASETU32 = "DU32BITS"; + private static final String DATASETS32 = "DS32BITS"; + private static final String DATASETU64 = "DU64BITS"; + private static final String DATASETS64 = "DS64BITS"; + private static final String DATASETF32 = "DS32BITS"; + private static final String DATASETF64 = "DS64BITS"; + private static final String DATASETF128 = "DS128BITS"; + private static final int RANK = 2; + long H5fid = HDF5Constants.H5I_INVALID_HID; + long H5did = HDF5Constants.H5I_INVALID_HID; + + private final void _closeH5file() throws HDF5LibraryException { + if (H5did >= 0) + try {H5.H5Dclose(H5did);} catch (Exception ex) {} + if (H5fid > 0) + try {H5.H5Fclose(H5fid);} catch (Exception ex) {} + } + + public void openH5file(String filename, String dsetname) { + try { + H5fid = H5.H5Fopen(filename, + HDF5Constants.H5F_ACC_RDONLY, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5Drw._openH5file: " + err); + } + assertTrue("TestH5Drw._openH5file: H5.H5Fopen: ", H5fid >= 0); + try { + H5did = H5.H5Dopen(H5fid, dsetname, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + err.printStackTrace(); + fail("TestH5Drw._openH5file: " + err); + } + assertTrue("TestH5Drw._openH5file: H5.H5Dopen: ", H5did >= 0); + } + + @After + public void closeH5file() throws HDF5LibraryException { + if (H5did >= 0) + try {H5.H5Dclose(H5did);} catch (Exception ex) {} + if (H5fid > 0) + try {H5.H5Fclose(H5fid);} catch (Exception ex) {} + H5fid = HDF5Constants.H5I_INVALID_HID; + H5did = HDF5Constants.H5I_INVALID_HID; + System.out.println(); + } + + @Before + public void verifyCount() + throws NullPointerException, HDF5Exception { + assertTrue("H5 open ids is 0", H5.getOpenIDCount()==0); + System.out.print(testname.getMethodName()); + } + + @Test + public void testH5Dread_8bit_ints() { + byte[][] dset_data = new byte[DIM_X][DIM8_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU08); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_8bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_8bit_ints: H5Dread: " + err); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS08, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_8bit_ints: H5Dopen: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT8, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_8bit_ints: H5Dread: " + err); + } + } + + @Test + public void testH5Dread_16bit_ints() { + short[][] dset_data = new short[DIM_X][DIM16_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU16); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_16bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT16, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_16bit_ints: H5Dread: " + err); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS16, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_16bit_ints: H5Dopen: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT16, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_16bit_ints: H5Dread: " + err); + } + } + + @Test + public void testH5Dread_32bit_ints() { + int[][] dset_data = new int[DIM_X][DIM16_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU32); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_32bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT32, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_32bit_ints: H5Dread: " + err); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS32, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_32bit_ints: H5Dopen: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT32, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_32bit_ints: H5Dread: " + err); + } + } + + @Test + public void testH5Dread_64bit_ints() { + long[][] dset_data = new long[DIM_X][DIM64_Y]; + + try { + openH5file(H5_INTS_FILE, DATASETU64); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_64bit_ints: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_UINT64, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_64bit_ints: H5Dread: " + err); + } + + // End access to the dataset and release resources used by it. + try { + H5.H5Dclose(H5did); + } + catch (Exception err) { + err.printStackTrace(); + } + + // Open an existing dataset. + try { + H5did = H5.H5Dopen(H5fid, DATASETS64, HDF5Constants.H5P_DEFAULT); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_64bit_ints: H5Dopen: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_INT64, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_64bit_ints: H5Dread: " + err); + } + } + + @Test + public void testH5Dread_32bit_floats() { + float[][] dset_data = new float[DIM_X][DIM32_Y]; + + try { + openH5file(H5_FLTS_FILE, DATASETF32); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_32bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_FLOAT, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_32bit_floats: H5Dread: " + err); + } + for (int i = 0; i < DIM_X; i++) + assertTrue("testH5Dread_32bit_floats - H5.H5Dread: ", dset_data[i][0] == (32 - i)); + } + + @Test + public void testH5Dread_64bit_floats() { + double[][] dset_data = new double[DIM_X][DIM64_Y]; + + try { + openH5file(H5_FLTS_FILE, DATASETF64); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_64bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_64bit_floats: H5Dread: " + err); + } + for (int i = 0; i < DIM_X; i++) + assertTrue("testH5Dread_64bit_floats - H5.H5Dread: ", dset_data[i][0] == (64 - i)); + } + + @Test + public void testH5Dread_128bit_floats() { + byte[][][] dset_data = new byte[DIM_X][DIM128_Y][8]; + + try { + openH5file(H5_FLTS_FILE, DATASETF128); + } + catch (Throwable err) { + err.printStackTrace(); + fail("testH5Dread_128bit_floats: openH5file: " + err); + } + + // Read data. + try { + H5.H5Dread(H5did, HDF5Constants.H5T_NATIVE_LDOUBLE, HDF5Constants.H5S_ALL, HDF5Constants.H5S_ALL, + HDF5Constants.H5P_DEFAULT, dset_data); + } + catch (Exception err) { + err.printStackTrace(); + fail("testH5Dread_128bit_floats: H5Dread: " + err); + } + } + +} diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 9bb2ba8a750..682d83d66d1 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -90,6 +90,7 @@ $HDFTEST_HOME/testfiles/JUnit-TestH5T.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Dparams.txt $HDFTEST_HOME/testfiles/JUnit-TestH5D.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Dplist.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Drw.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Lparams.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Lbasic.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Lcreate.txt @@ -102,6 +103,7 @@ $HDFTEST_HOME/testfiles/JUnit-TestH5Pfaplhdfs.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Pvirtual.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Plist.txt $HDFTEST_HOME/testfiles/JUnit-TestH5A.txt +$HDFTEST_HOME/testfiles/JUnit-TestH5Arw.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Oparams.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Obasic.txt $HDFTEST_HOME/testfiles/JUnit-TestH5Ocreate.txt @@ -250,6 +252,8 @@ COPY_DATAFILES_TO_BLDDIR() $CP -f $HDFTEST_HOME/h5ex_g_iterate.orig $BLDDIR/h5ex_g_iterateO2.hdf $CP -f $TOOLS_TESTFILES/tdatareg.h5 $BLDDIR/trefer_reg.h5 $CP -f $TOOLS_TESTFILES/tattrreg.h5 $BLDDIR/tattrreg.h5 + $CP -f $TOOLS_TESTFILES/tintsattrs.h5 $BLDDIR/tintsattrs.h5 + $CP -f $TOOLS_TESTFILES/tfloatsattrs.h5 $BLDDIR/tfloatsattrs.h5 } CLEAN_DATAFILES_AND_BLDDIR() @@ -665,6 +669,27 @@ else test yes = "$verbose" && $DIFF JUnit-TestH5D.txt JUnit-TestH5D.out |sed 's/^/ /' fi +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Drw" +TESTING JUnit-TestH5Drw +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Drw > JUnit-TestH5Drw.ext) + +# 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/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + JUnit-TestH5Drw.ext > JUnit-TestH5Drw.out + +if diff JUnit-TestH5Drw.out JUnit-TestH5Drw.txt > /dev/null; then + echo " PASSED JUnit-TestH5Drw" +else + echo "**FAILED** JUnit-TestH5Drw" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF JUnit-TestH5Drw.txt JUnit-TestH5Drw.out |sed 's/^/ /' +fi + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dplist" TESTING JUnit-TestH5Dplist ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Dplist > JUnit-TestH5Dplist.ext) @@ -896,6 +921,27 @@ else test yes = "$verbose" && $DIFF JUnit-TestH5A.txt JUnit-TestH5A.out |sed 's/^/ /' fi +echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Arw" +TESTING JUnit-TestH5Arw +($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Arw > JUnit-TestH5Arw.ext) + +# 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/Time: [0-9]*[\.,[0-9]*]*/Time: XXXX/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + JUnit-TestH5Arw.ext > JUnit-TestH5Arw.out + +if diff JUnit-TestH5Arw.out JUnit-TestH5Arw.txt > /dev/null; then + echo " PASSED JUnit-TestH5Arw" +else + echo "**FAILED** JUnit-TestH5Arw" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF JUnit-TestH5Arw.txt JUnit-TestH5Arw.out |sed 's/^/ /' +fi + echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Oparams" TESTING JUnit-TestH5Oparams ($RUNSERIAL $JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestH5Oparams > JUnit-TestH5Oparams.ext) diff --git a/java/test/testfiles/JUnit-TestH5Arw.txt b/java/test/testfiles/JUnit-TestH5Arw.txt new file mode 100644 index 00000000000..49d3b1c3db4 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Arw.txt @@ -0,0 +1,13 @@ +JUnit version 4.11 +.testH5Aread_128bit_floats +.testH5Aread_64bit_floats +.testH5Aread_8bit_ints +.testH5Aread_32bit_ints +.testH5Aread_64bit_ints +.testH5Aread_32bit_floats +.testH5Aread_16bit_ints + +Time: XXXX + +OK (7 tests) + diff --git a/java/test/testfiles/JUnit-TestH5Drw.txt b/java/test/testfiles/JUnit-TestH5Drw.txt new file mode 100644 index 00000000000..6b854cf3570 --- /dev/null +++ b/java/test/testfiles/JUnit-TestH5Drw.txt @@ -0,0 +1,13 @@ +JUnit version 4.11 +.testH5Dread_32bit_floats +.testH5Dread_32bit_ints +.testH5Dread_64bit_ints +.testH5Dread_64bit_floats +.testH5Dread_8bit_ints +.testH5Dread_128bit_floats +.testH5Dread_16bit_ints + +Time: XXXX + +OK (7 tests) + diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7cd302b8819..5b434f68ace 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -201,10 +201,10 @@ New Features Library: -------- - - H5Epush_ret() now requires a trailing semi-colon + - H5Epush_ret() now requires a trailing semicolon H5Epush_ret() is a function-like macro that has been changed to - contain a `do {} while(0)` loop. Consequently, a trailing semi-colon + contain a `do {} while(0)` loop. Consequently, a trailing semicolon is now required to end the `while` statement. Previously, a trailing semi would work, but was not mandatory. This change was made to allow clang-format to correctly format the source code. @@ -300,6 +300,19 @@ Bug Fixes since HDF5-1.10.7 release Configuration ------------- + - Remove arbitrary warning flag groups from CMake builds + + The arbitrary groups were created to reduce the quantity of warnings being + reported that overwhelmed testing report systems. Considerable work has + been accomplished to reduce the warning count and these arbitrary groups + are no longer needed. + Also the default for all warnings, HDF5_ENABLE_ALL_WARNINGS, is now ON. + + Visual Studio warnings C4100, C4706, and C4127 have been moved to + developer warnings, HDF5_ENABLE_DEV_WARNINGS, and are disabled for normal builds. + + (ADB - 2021/03/22, HDFFV-11228) + - Reclassify CMake messages, to allow new modes and --log-level option CMake message commands have a mode argument. By default, STATUS mode @@ -326,11 +339,20 @@ Bug Fixes since HDF5-1.10.7 release Tools ----- + - Changed how h5dump and h5ls identify long double. + + Long double support is not consistent across platforms. Tools will always + identify long double as 128-bit [little/big]-endian float. New test file + created for datasets with attributes for float, double and long double. + These files are also used in the java tests. + + (ADB - 2021/03/24, HDFFV-11229) + - Fixed tools argument parsing. Tools parsing used the length of the option from the long array to match the option from the command line. This incorrectly matched a shorter long - name option that was happened to be a subset of another long option. + name option that happened to be a subset of another long option. Changed to match whole names. (ADB - 2021/01/19, HDFFV-11106) diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 46f5389e933..46dcf7fa615 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -27,7 +27,7 @@ #define F_FORMAT "%-15g %-15g %-15g\n" #if H5_SIZEOF_LONG_DOUBLE != 0 -#define LD_FORMAT "%-15Lf %-15Lf %-15Lf\n" +#define LD_FORMAT "%-15Lg %-15Lg %-15Lg\n" #endif #define I_FORMAT "%-15d %-15d %-15d\n" @@ -42,7 +42,7 @@ #define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n" #if H5_SIZEOF_LONG_DOUBLE != 0 -#define LD_FORMAT_P "%-15.10Lf %-15.10Lf %-15.10Lf %-14.10Lf\n" +#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n" #endif #define I_FORMAT_P "%-15d %-15d %-15d %-14f\n" @@ -59,7 +59,7 @@ #define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n" #if H5_SIZEOF_LONG_DOUBLE != 0 -#define LD_FORMAT_P_NOTCOMP "%-15.10Lf %-15.10Lf %-15.10Lf not comparable\n" +#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n" #endif #define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n" @@ -2908,7 +2908,10 @@ ull2float(unsigned long long ull_value, float *f_value) HDmemcpy(f_value, buf, dst_size); done: - H5E_BEGIN_TRY { H5Pclose(dxpl_id); } + H5E_BEGIN_TRY + { + H5Pclose(dxpl_id); + } H5E_END_TRY; if (buf) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index caecfda5bd3..a129ccc1d31 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2215,10 +2215,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_append(buffer, "H5T_NATIVE_FLOAT"); else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE"); -#if H5_SIZEOF_LONG_DOUBLE != 0 - else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) - h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE"); -#endif else { /* byte order */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 059742382d2..9f76f8e5352 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -439,7 +439,10 @@ h5tools_str_dump_space_blocks(h5tools_str_t *str, hid_t rspace, const h5tool_for /* * This function fails if the rspace does not have blocks. */ - H5E_BEGIN_TRY { snblocks = H5Sget_select_hyper_nblocks(rspace); } + H5E_BEGIN_TRY + { + snblocks = H5Sget_select_hyper_nblocks(rspace); + } H5E_END_TRY; /* Print block information */ @@ -496,7 +499,10 @@ h5tools_str_dump_space_points(h5tools_str_t *str, hid_t rspace, const h5tool_for /* * This function fails if the rspace does not have points. */ - H5E_BEGIN_TRY { snpoints = H5Sget_select_elem_npoints(rspace); } + H5E_BEGIN_TRY + { + snpoints = H5Sget_select_elem_npoints(rspace); + } H5E_END_TRY; /* Print point information */ @@ -708,6 +714,15 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai h5tools_str_append(str, "%Lg", templdouble); #endif } + else { + size_t i; + + for (i = 0; i < nsize; i++) { + if (i) + h5tools_str_append(str, ":"); + h5tools_str_append(str, OPT(info->fmt_raw, "%02x"), ucp_vp[i]); + } + } break; case H5T_STRING: { diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 3db70612b1e..ab94573b15b 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -426,11 +426,6 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind) else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) { h5tools_str_append(buffer, "native double"); } -#if H5_SIZEOF_LONG_DOUBLE != 0 - else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) { - h5tools_str_append(buffer, "native long double"); - } -#endif else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) { h5tools_str_append(buffer, "native int8_t"); } diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 54439b886eb..bdf7b8aa29d 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -100,6 +100,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tfamily.ddl ${HDF5_TOOLS_DIR}/testfiles/tfill.ddl ${HDF5_TOOLS_DIR}/testfiles/tfletcher32.ddl + #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #special for windows ${HDF5_TOOLS_DIR}/testfiles/tfpformat.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ddl @@ -127,6 +128,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl @@ -270,6 +272,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tfcontents1.h5 ${HDF5_TOOLS_DIR}/testfiles/tfcontents2.h5 ${HDF5_TOOLS_DIR}/testfiles/tfilters.h5 + ${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.h5 ${HDF5_TOOLS_DIR}/testfiles/tfpformat.h5 ${HDF5_TOOLS_DIR}/testfiles/tfvalues.h5 ${HDF5_TOOLS_DIR}/testfiles/tgroup.h5 @@ -282,6 +285,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.h5 ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.h5 ${HDF5_TOOLS_DIR}/testfiles/tldouble.h5 + ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.h5 ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.h5 ${HDF5_TOOLS_DIR}/testfiles/tloop.h5 ${HDF5_TOOLS_DIR}/testfiles/tmulti-b.h5 @@ -382,8 +386,10 @@ configure_file(${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp NEWLINE_STYLE CRLF) #file (READ ${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp TEST_STREAM) #file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files") else () HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files") + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tfloatsattrs.ddl" "h5dump_std_files") endif () add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list}) @@ -1058,7 +1064,9 @@ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) # test for long double (some systems do not have long double) -# ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) + ADD_H5_TEST (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5) + ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) + ADD_H5_TEST (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5) # test for vms ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index b5d0f7f05f0..7894a4b9522 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -115,6 +115,7 @@ #define FILE85 "tgrpnullspace.h5" #define FILE87 "tintsnodata.h5" #define FILE88 "tldouble_scalar.h5" +#define FILE89 "tfloatsattrs.h5" /*------------------------------------------------------------------------- * prototypes @@ -395,6 +396,15 @@ typedef struct s1_t { #define F83_RANK 1 #define F83_ARRAYDIM 3 +/* "FILE89" macros */ +#define F89_XDIM 8 +#define F89_DATASETF32 "DS32BITS" +#define F89_YDIM32 32 +#define F89_DATASETF64 "DS64BITS" +#define F89_YDIM64 64 +#define F89_DATASETF128 "DS128BITS" +#define F89_YDIM128 128 + static void gent_group(void) { @@ -5351,7 +5361,10 @@ make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t tid, hid_t dcpl, void return 0; out: - H5E_BEGIN_TRY { H5Dclose(dsid); } + H5E_BEGIN_TRY + { + H5Dclose(dsid); + } H5E_END_TRY; return -1; } @@ -10169,6 +10182,152 @@ gent_intsattrs(void) HDfree(asetdbl); } +/*------------------------------------------------------------------------- + * Function: gent_floatsattrs + * + * Purpose: Generate a file to be used in the h5dump tests. + * Three datasets of 4, 8 and 16 bytes of float types are created. + * Fill them with raw data such that no bit will be all zero in a dataset. + *------------------------------------------------------------------------- + */ +static void +gent_floatsattrs(void) +{ + hid_t fid = H5I_INVALID_HID; + hid_t tid = H5I_INVALID_HID; + hid_t attr = H5I_INVALID_HID; + hid_t dataset = H5I_INVALID_HID; + hid_t space = H5I_INVALID_HID; + hid_t aspace = H5I_INVALID_HID; + hsize_t dims[2], adims[1]; + + float ** dset32 = NULL; + double ** dset64 = NULL; + long double **dset128 = NULL; + + float * aset32 = NULL; + double * aset64 = NULL; + long double *aset128 = NULL; + + float val32bits; + double val64bits; + long double val128bits; + + unsigned int i, j; + + /* Create arrays */ + H5TEST_ALLOCATE_2D_ARRAY(dset32, float, F89_XDIM, F89_YDIM32); + H5TEST_ALLOCATE_2D_ARRAY(dset64, double, F89_XDIM, F89_YDIM64); + H5TEST_ALLOCATE_2D_ARRAY(dset128, long double, F89_XDIM, F89_YDIM128); + + aset32 = HDcalloc(F89_XDIM * F89_YDIM32, sizeof(float)); + aset64 = HDcalloc(F89_XDIM * F89_YDIM64, sizeof(double)); + aset128 = HDcalloc(F89_XDIM * F89_YDIM128, sizeof(long double)); + + fid = H5Fcreate(FILE89, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if ((tid = H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) + goto error; + + if (H5Tget_size(tid) == 0) + goto error; + + /* Dataset of 32 bits float */ + dims[0] = F89_XDIM; + dims[1] = F89_YDIM32; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F89_DATASETF32, H5T_IEEE_F32LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val32bits = (float)F89_YDIM32; + for (i = 0; i < dims[0]; i++) { + dset32[i][0] = val32bits; + aset32[i * dims[1]] = dset32[i][0]; + for (j = 1; j < dims[1]; j++) { + dset32[i][j] = (float)(j * dims[0] + i) / (float)F89_YDIM32; + aset32[i * dims[1] + j] = dset32[i][j]; + } + val32bits -= (float)1; + } + + H5Dwrite(dataset, H5T_IEEE_F32LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset32[0]); + /* Attribute of 32 bits float */ + adims[0] = F89_XDIM * F89_YDIM32; + aspace = H5Screate_simple(1, adims, NULL); + attr = H5Acreate2(dataset, F89_DATASETF32, H5T_IEEE_F32LE, aspace, H5P_DEFAULT, H5P_DEFAULT); + H5Awrite(attr, H5T_IEEE_F32LE, aset32); + H5Aclose(attr); + H5Sclose(aspace); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 64 bits double */ + dims[0] = F89_XDIM; + dims[1] = F89_YDIM64; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F89_DATASETF64, H5T_IEEE_F64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val64bits = (double)F89_YDIM64; + for (i = 0; i < dims[0]; i++) { + dset64[i][0] = val64bits; + aset64[i * dims[1]] = dset64[i][0]; + for (j = 1; j < dims[1]; j++) { + dset64[i][j] = (double)(j * dims[0] + i) / (double)F89_YDIM64; + aset64[i * dims[1] + j] = dset64[i][j]; + } + val64bits -= (double)1; + } + + H5Dwrite(dataset, H5T_IEEE_F64LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64[0]); + /* Attribute of 64 bits double */ + adims[0] = F89_XDIM * F89_YDIM64; + aspace = H5Screate_simple(1, adims, NULL); + attr = H5Acreate2(dataset, F89_DATASETF64, H5T_IEEE_F64LE, aspace, H5P_DEFAULT, H5P_DEFAULT); + H5Awrite(attr, H5T_IEEE_F64LE, aset64); + H5Aclose(attr); + H5Sclose(aspace); + H5Sclose(space); + H5Dclose(dataset); + + /* Dataset of 128 bits long double */ + dims[0] = F89_XDIM; + dims[1] = F89_YDIM128; + space = H5Screate_simple(2, dims, NULL); + dataset = H5Dcreate2(fid, F89_DATASETF128, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + + val128bits = (long double)F89_YDIM128; + for (i = 0; i < dims[0]; i++) { + dset128[i][0] = val128bits; + aset128[i * dims[1]] = dset128[i][0]; + for (j = 1; j < dims[1]; j++) { + dset128[i][j] = (long double)(j * dims[0] + i) / (long double)F89_YDIM128; + aset128[i * dims[1] + j] = dset128[i][j]; + } + val128bits -= (long double)1; + } + + H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset128[0]); + /* Attribute of 128 bits long double */ + adims[0] = F89_XDIM * F89_YDIM128; + aspace = H5Screate_simple(1, adims, NULL); + attr = H5Acreate2(dataset, F89_DATASETF128, tid, aspace, H5P_DEFAULT, H5P_DEFAULT); + H5Awrite(attr, tid, aset128); + H5Aclose(attr); + H5Sclose(aspace); + H5Sclose(space); + H5Dclose(dataset); + +error: + H5Fclose(fid); + + HDfree(dset32); + HDfree(dset64); + HDfree(dset128); + + HDfree(aset32); + HDfree(aset64); + HDfree(aset128); +} + static void gent_bitnopaquefields(void) { @@ -10881,7 +11040,7 @@ H5Z_filter_dynlibud(unsigned int flags, size_t cd_nelmts, const unsigned int *cd return (0); /* Assignment to eliminate unused parameter warning. */ - cd_values = cd_values; + (void)cd_values; if (flags & H5Z_FLAG_REVERSE) { /*read*/ /* Subtract the original value with MULTIPLIER */ @@ -11013,6 +11172,7 @@ main(void) gent_aindices(); gent_longlinks(); gent_ldouble(); + gent_ldouble_scalar(); gent_binary(); gent_bigdims(); gent_hyperslab(); @@ -11036,6 +11196,7 @@ main(void) gent_compound_ints(); gent_intattrscalars(); gent_intsattrs(); + gent_floatsattrs(); gent_bitnopaquefields(); gent_nodata(); diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 2104e1c7e38..c94bc1f169b 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -130,6 +130,7 @@ $SRC_H5DUMP_TESTFILES/tfamily00010.h5 $SRC_H5DUMP_TESTFILES/tfcontents1.h5 $SRC_H5DUMP_TESTFILES/tfcontents2.h5 $SRC_H5DUMP_TESTFILES/tfilters.h5 +$SRC_H5DUMP_TESTFILES/tfloatsattrs.h5 $SRC_H5DUMP_TESTFILES/tfpformat.h5 $SRC_H5DUMP_TESTFILES/tfvalues.h5 $SRC_H5DUMP_TESTFILES/tgroup.h5 @@ -141,6 +142,7 @@ $SRC_H5DUMP_TESTFILES/tintsattrs.h5 $SRC_H5DUMP_TESTFILES/tints4dims.h5 $SRC_H5DUMP_TESTFILES/tlarge_objname.h5 $SRC_H5DUMP_TESTFILES/tldouble.h5 +$SRC_H5DUMP_TESTFILES/tldouble_scalar.h5 $SRC_H5DUMP_TESTFILES/tlonglinks.h5 $SRC_H5DUMP_TESTFILES/tloop.h5 $SRC_H5DUMP_TESTFILES/tmulti-b.h5 @@ -259,6 +261,7 @@ $SRC_H5DUMP_TESTFILES/textlink.ddl $SRC_H5DUMP_TESTFILES/tfamily.ddl $SRC_H5DUMP_TESTFILES/tfill.ddl $SRC_H5DUMP_TESTFILES/tfletcher32.ddl +$SRC_H5DUMP_TESTFILES/tfloatsattrs.ddl $SRC_H5DUMP_TESTFILES/tfpformat.ddl $SRC_H5DUMP_TESTFILES/tgroup-1.ddl $SRC_H5DUMP_TESTFILES/tgroup-2.ddl @@ -285,6 +288,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl $SRC_H5DUMP_TESTFILES/tintsattrs.ddl $SRC_H5DUMP_TESTFILES/tlarge_objname.ddl $SRC_H5DUMP_TESTFILES/tldouble.ddl +$SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl $SRC_H5DUMP_TESTFILES/tlonglinks.ddl $SRC_H5DUMP_TESTFILES/tloop-1.ddl $SRC_H5DUMP_TESTFILES/tmulti.ddl @@ -1344,7 +1348,9 @@ TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5 TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5 # test for long double (some systems do not have long double) -#TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5 +TOOLTEST tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 +TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5 +TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 # test for vms TOOLTEST tvms.ddl --enable-error-stack tvms.h5 diff --git a/tools/testfiles/tfloatsattrs.ddl b/tools/testfiles/tfloatsattrs.ddl new file mode 100644 index 00000000000..2cc5cfd4f43 --- /dev/null +++ b/tools/testfiles/tfloatsattrs.ddl @@ -0,0 +1,621 @@ +HDF5 "tfloatsattrs.h5" { +GROUP "/" { + DATASET "DS128BITS" { + DATATYPE 128-bit little-endian floating-point + DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 16384 + OFFSET 14416 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, + (0,9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, + (0,18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, 1.625, + (0,27): 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, 2.1875, + (0,36): 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, 2.6875, 2.75, + (0,45): 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, 3.25, 3.3125, + (0,54): 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, 3.8125, 3.875, + (0,63): 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, 4.375, 4.4375, + (0,72): 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, 4.875, 4.9375, 5, + (0,81): 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, 5.4375, 5.5, + (0,89): 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, 5.9375, 6, 6.0625, + (0,98): 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, 6.5, 6.5625, 6.625, + (0,107): 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, 7.0625, 7.125, 7.1875, + (0,116): 7.25, 7.3125, 7.375, 7.4375, 7.5, 7.5625, 7.625, 7.6875, 7.75, + (0,125): 7.8125, 7.875, 7.9375, + (1,0): 127, 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, + (1,6): 0.382812, 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, + (1,12): 0.757812, 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, + (1,18): 1.13281, 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, + (1,25): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, 1.94531, + (1,32): 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, 2.32031, 2.38281, + (1,39): 2.44531, 2.50781, 2.57031, 2.63281, 2.69531, 2.75781, 2.82031, + (1,46): 2.88281, 2.94531, 3.00781, 3.07031, 3.13281, 3.19531, 3.25781, + (1,53): 3.32031, 3.38281, 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, + (1,60): 3.75781, 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, + (1,67): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, 4.57031, + (1,74): 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, 4.94531, 5.00781, + (1,81): 5.07031, 5.13281, 5.19531, 5.25781, 5.32031, 5.38281, 5.44531, + (1,88): 5.50781, 5.57031, 5.63281, 5.69531, 5.75781, 5.82031, 5.88281, + (1,95): 5.94531, 6.00781, 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, + (1,102): 6.38281, 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, + (1,109): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, 7.19531, + (1,116): 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, 7.57031, 7.63281, + (1,123): 7.69531, 7.75781, 7.82031, 7.88281, 7.94531, + (2,0): 126, 0.078125, 0.140625, 0.203125, 0.265625, 0.328125, 0.390625, + (2,7): 0.453125, 0.515625, 0.578125, 0.640625, 0.703125, 0.765625, + (2,13): 0.828125, 0.890625, 0.953125, 1.01562, 1.07812, 1.14062, + (2,19): 1.20312, 1.26562, 1.32812, 1.39062, 1.45312, 1.51562, 1.57812, + (2,26): 1.64062, 1.70312, 1.76562, 1.82812, 1.89062, 1.95312, 2.01562, + (2,33): 2.07812, 2.14062, 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, + (2,40): 2.51562, 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, + (2,47): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, 3.32812, + (2,54): 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, 3.70312, 3.76562, + (2,61): 3.82812, 3.89062, 3.95312, 4.01562, 4.07812, 4.14062, 4.20312, + (2,68): 4.26562, 4.32812, 4.39062, 4.45312, 4.51562, 4.57812, 4.64062, + (2,75): 4.70312, 4.76562, 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, + (2,82): 5.14062, 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, + (2,89): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, 5.95312, + (2,96): 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, 6.32812, 6.39062, + (2,103): 6.45312, 6.51562, 6.57812, 6.64062, 6.70312, 6.76562, 6.82812, + (2,110): 6.89062, 6.95312, 7.01562, 7.07812, 7.14062, 7.20312, 7.26562, + (2,117): 7.32812, 7.39062, 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, + (2,124): 7.76562, 7.82812, 7.89062, 7.95312, + (3,0): 125, 0.0859375, 0.148438, 0.210938, 0.273438, 0.335938, + (3,6): 0.398438, 0.460938, 0.523438, 0.585938, 0.648438, 0.710938, + (3,12): 0.773438, 0.835938, 0.898438, 0.960938, 1.02344, 1.08594, + (3,18): 1.14844, 1.21094, 1.27344, 1.33594, 1.39844, 1.46094, 1.52344, + (3,25): 1.58594, 1.64844, 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, + (3,32): 2.02344, 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, + (3,39): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, 2.83594, + (3,46): 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, 3.21094, 3.27344, + (3,53): 3.33594, 3.39844, 3.46094, 3.52344, 3.58594, 3.64844, 3.71094, + (3,60): 3.77344, 3.83594, 3.89844, 3.96094, 4.02344, 4.08594, 4.14844, + (3,67): 4.21094, 4.27344, 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, + (3,74): 4.64844, 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, + (3,81): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, 5.46094, + (3,88): 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, 5.83594, 5.89844, + (3,95): 5.96094, 6.02344, 6.08594, 6.14844, 6.21094, 6.27344, 6.33594, + (3,102): 6.39844, 6.46094, 6.52344, 6.58594, 6.64844, 6.71094, 6.77344, + (3,109): 6.83594, 6.89844, 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, + (3,116): 7.27344, 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, + (3,123): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, + (4,0): 124, 0.09375, 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, + (4,7): 0.46875, 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, + (4,14): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, 1.28125, + (4,21): 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, 1.65625, 1.71875, + (4,28): 1.78125, 1.84375, 1.90625, 1.96875, 2.03125, 2.09375, 2.15625, + (4,35): 2.21875, 2.28125, 2.34375, 2.40625, 2.46875, 2.53125, 2.59375, + (4,42): 2.65625, 2.71875, 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, + (4,49): 3.09375, 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, + (4,56): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, 3.90625, + (4,63): 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, 4.28125, 4.34375, + (4,70): 4.40625, 4.46875, 4.53125, 4.59375, 4.65625, 4.71875, 4.78125, + (4,77): 4.84375, 4.90625, 4.96875, 5.03125, 5.09375, 5.15625, 5.21875, + (4,84): 5.28125, 5.34375, 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, + (4,91): 5.71875, 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, + (4,98): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, 6.53125, + (4,105): 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, 6.90625, 6.96875, + (4,112): 7.03125, 7.09375, 7.15625, 7.21875, 7.28125, 7.34375, 7.40625, + (4,119): 7.46875, 7.53125, 7.59375, 7.65625, 7.71875, 7.78125, 7.84375, + (4,126): 7.90625, 7.96875, + (5,0): 123, 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, + (5,7): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, + (5,13): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, + (5,19): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, 1.60156, + (5,26): 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, 1.97656, 2.03906, + (5,33): 2.10156, 2.16406, 2.22656, 2.28906, 2.35156, 2.41406, 2.47656, + (5,40): 2.53906, 2.60156, 2.66406, 2.72656, 2.78906, 2.85156, 2.91406, + (5,47): 2.97656, 3.03906, 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, + (5,54): 3.41406, 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, + (5,61): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, 4.22656, + (5,68): 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, 4.60156, 4.66406, + (5,75): 4.72656, 4.78906, 4.85156, 4.91406, 4.97656, 5.03906, 5.10156, + (5,82): 5.16406, 5.22656, 5.28906, 5.35156, 5.41406, 5.47656, 5.53906, + (5,89): 5.60156, 5.66406, 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, + (5,96): 6.03906, 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, + (5,103): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, 6.85156, + (5,110): 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, 7.22656, 7.28906, + (5,117): 7.35156, 7.41406, 7.47656, 7.53906, 7.60156, 7.66406, 7.72656, + (5,124): 7.78906, 7.85156, 7.91406, 7.97656, + (6,0): 122, 0.109375, 0.171875, 0.234375, 0.296875, 0.359375, 0.421875, + (6,7): 0.484375, 0.546875, 0.609375, 0.671875, 0.734375, 0.796875, + (6,13): 0.859375, 0.921875, 0.984375, 1.04688, 1.10938, 1.17188, + (6,19): 1.23438, 1.29688, 1.35938, 1.42188, 1.48438, 1.54688, 1.60938, + (6,26): 1.67188, 1.73438, 1.79688, 1.85938, 1.92188, 1.98438, 2.04688, + (6,33): 2.10938, 2.17188, 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, + (6,40): 2.54688, 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, + (6,47): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, 3.35938, + (6,54): 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, 3.73438, 3.79688, + (6,61): 3.85938, 3.92188, 3.98438, 4.04688, 4.10938, 4.17188, 4.23438, + (6,68): 4.29688, 4.35938, 4.42188, 4.48438, 4.54688, 4.60938, 4.67188, + (6,75): 4.73438, 4.79688, 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, + (6,82): 5.17188, 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, + (6,89): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, 5.98438, + (6,96): 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, 6.35938, 6.42188, + (6,103): 6.48438, 6.54688, 6.60938, 6.67188, 6.73438, 6.79688, 6.85938, + (6,110): 6.92188, 6.98438, 7.04688, 7.10938, 7.17188, 7.23438, 7.29688, + (6,117): 7.35938, 7.42188, 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, + (6,124): 7.79688, 7.85938, 7.92188, 7.98438, + (7,0): 121, 0.117188, 0.179688, 0.242188, 0.304688, 0.367188, 0.429688, + (7,7): 0.492188, 0.554688, 0.617188, 0.679688, 0.742188, 0.804688, + (7,13): 0.867188, 0.929688, 0.992188, 1.05469, 1.11719, 1.17969, + (7,19): 1.24219, 1.30469, 1.36719, 1.42969, 1.49219, 1.55469, 1.61719, + (7,26): 1.67969, 1.74219, 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, + (7,33): 2.11719, 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, + (7,40): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, 2.92969, + (7,47): 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, 3.30469, 3.36719, + (7,54): 3.42969, 3.49219, 3.55469, 3.61719, 3.67969, 3.74219, 3.80469, + (7,61): 3.86719, 3.92969, 3.99219, 4.05469, 4.11719, 4.17969, 4.24219, + (7,68): 4.30469, 4.36719, 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, + (7,75): 4.74219, 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, + (7,82): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, 5.55469, + (7,89): 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, 5.92969, 5.99219, + (7,96): 6.05469, 6.11719, 6.17969, 6.24219, 6.30469, 6.36719, 6.42969, + (7,103): 6.49219, 6.55469, 6.61719, 6.67969, 6.74219, 6.80469, 6.86719, + (7,110): 6.92969, 6.99219, 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, + (7,117): 7.36719, 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, + (7,124): 7.80469, 7.86719, 7.92969, 7.99219 + } + ATTRIBUTE "DS128BITS" { + DATATYPE 128-bit little-endian floating-point + DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } + DATA { + (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, + (9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, + (18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, + (26): 1.625, 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, + (35): 2.1875, 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, + (43): 2.6875, 2.75, 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, + (52): 3.25, 3.3125, 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, + (61): 3.8125, 3.875, 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, + (70): 4.375, 4.4375, 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, + (78): 4.875, 4.9375, 5, 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, + (87): 5.4375, 5.5, 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, + (95): 5.9375, 6, 6.0625, 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, + (104): 6.5, 6.5625, 6.625, 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, + (113): 7.0625, 7.125, 7.1875, 7.25, 7.3125, 7.375, 7.4375, 7.5, + (121): 7.5625, 7.625, 7.6875, 7.75, 7.8125, 7.875, 7.9375, 127, + (129): 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, 0.382812, + (135): 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, 0.757812, + (141): 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, 1.13281, + (147): 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, + (153): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, + (159): 1.94531, 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, + (165): 2.32031, 2.38281, 2.44531, 2.50781, 2.57031, 2.63281, + (171): 2.69531, 2.75781, 2.82031, 2.88281, 2.94531, 3.00781, + (177): 3.07031, 3.13281, 3.19531, 3.25781, 3.32031, 3.38281, + (183): 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, 3.75781, + (189): 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, + (195): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, + (201): 4.57031, 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, + (207): 4.94531, 5.00781, 5.07031, 5.13281, 5.19531, 5.25781, + (213): 5.32031, 5.38281, 5.44531, 5.50781, 5.57031, 5.63281, + (219): 5.69531, 5.75781, 5.82031, 5.88281, 5.94531, 6.00781, + (225): 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, 6.38281, + (231): 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, + (237): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, + (243): 7.19531, 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, + (249): 7.57031, 7.63281, 7.69531, 7.75781, 7.82031, 7.88281, + (255): 7.94531, 126, 0.078125, 0.140625, 0.203125, 0.265625, + (261): 0.328125, 0.390625, 0.453125, 0.515625, 0.578125, 0.640625, + (267): 0.703125, 0.765625, 0.828125, 0.890625, 0.953125, 1.01562, + (273): 1.07812, 1.14062, 1.20312, 1.26562, 1.32812, 1.39062, + (279): 1.45312, 1.51562, 1.57812, 1.64062, 1.70312, 1.76562, + (285): 1.82812, 1.89062, 1.95312, 2.01562, 2.07812, 2.14062, + (291): 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, 2.51562, + (297): 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, + (303): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, + (309): 3.32812, 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, + (315): 3.70312, 3.76562, 3.82812, 3.89062, 3.95312, 4.01562, + (321): 4.07812, 4.14062, 4.20312, 4.26562, 4.32812, 4.39062, + (327): 4.45312, 4.51562, 4.57812, 4.64062, 4.70312, 4.76562, + (333): 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, 5.14062, + (339): 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, + (345): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, + (351): 5.95312, 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, + (357): 6.32812, 6.39062, 6.45312, 6.51562, 6.57812, 6.64062, + (363): 6.70312, 6.76562, 6.82812, 6.89062, 6.95312, 7.01562, + (369): 7.07812, 7.14062, 7.20312, 7.26562, 7.32812, 7.39062, + (375): 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, 7.76562, + (381): 7.82812, 7.89062, 7.95312, 125, 0.0859375, 0.148438, + (387): 0.210938, 0.273438, 0.335938, 0.398438, 0.460938, 0.523438, + (393): 0.585938, 0.648438, 0.710938, 0.773438, 0.835938, 0.898438, + (399): 0.960938, 1.02344, 1.08594, 1.14844, 1.21094, 1.27344, + (405): 1.33594, 1.39844, 1.46094, 1.52344, 1.58594, 1.64844, + (411): 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, 2.02344, + (417): 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, + (423): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, + (429): 2.83594, 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, + (435): 3.21094, 3.27344, 3.33594, 3.39844, 3.46094, 3.52344, + (441): 3.58594, 3.64844, 3.71094, 3.77344, 3.83594, 3.89844, + (447): 3.96094, 4.02344, 4.08594, 4.14844, 4.21094, 4.27344, + (453): 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, 4.64844, + (459): 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, + (465): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, + (471): 5.46094, 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, + (477): 5.83594, 5.89844, 5.96094, 6.02344, 6.08594, 6.14844, + (483): 6.21094, 6.27344, 6.33594, 6.39844, 6.46094, 6.52344, + (489): 6.58594, 6.64844, 6.71094, 6.77344, 6.83594, 6.89844, + (495): 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, 7.27344, + (501): 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, + (507): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, 124, 0.09375, + (514): 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, 0.46875, + (520): 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, + (526): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, + (532): 1.28125, 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, + (538): 1.65625, 1.71875, 1.78125, 1.84375, 1.90625, 1.96875, + (544): 2.03125, 2.09375, 2.15625, 2.21875, 2.28125, 2.34375, + (550): 2.40625, 2.46875, 2.53125, 2.59375, 2.65625, 2.71875, + (556): 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, 3.09375, + (562): 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, + (568): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, + (574): 3.90625, 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, + (580): 4.28125, 4.34375, 4.40625, 4.46875, 4.53125, 4.59375, + (586): 4.65625, 4.71875, 4.78125, 4.84375, 4.90625, 4.96875, + (592): 5.03125, 5.09375, 5.15625, 5.21875, 5.28125, 5.34375, + (598): 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, 5.71875, + (604): 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, + (610): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, + (616): 6.53125, 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, + (622): 6.90625, 6.96875, 7.03125, 7.09375, 7.15625, 7.21875, + (628): 7.28125, 7.34375, 7.40625, 7.46875, 7.53125, 7.59375, + (634): 7.65625, 7.71875, 7.78125, 7.84375, 7.90625, 7.96875, 123, + (641): 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, + (647): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, + (653): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, + (659): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, + (665): 1.60156, 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, + (671): 1.97656, 2.03906, 2.10156, 2.16406, 2.22656, 2.28906, + (677): 2.35156, 2.41406, 2.47656, 2.53906, 2.60156, 2.66406, + (683): 2.72656, 2.78906, 2.85156, 2.91406, 2.97656, 3.03906, + (689): 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, 3.41406, + (695): 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, + (701): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, + (707): 4.22656, 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, + (713): 4.60156, 4.66406, 4.72656, 4.78906, 4.85156, 4.91406, + (719): 4.97656, 5.03906, 5.10156, 5.16406, 5.22656, 5.28906, + (725): 5.35156, 5.41406, 5.47656, 5.53906, 5.60156, 5.66406, + (731): 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, 6.03906, + (737): 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, + (743): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, + (749): 6.85156, 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, + (755): 7.22656, 7.28906, 7.35156, 7.41406, 7.47656, 7.53906, + (761): 7.60156, 7.66406, 7.72656, 7.78906, 7.85156, 7.91406, + (767): 7.97656, 122, 0.109375, 0.171875, 0.234375, 0.296875, + (773): 0.359375, 0.421875, 0.484375, 0.546875, 0.609375, 0.671875, + (779): 0.734375, 0.796875, 0.859375, 0.921875, 0.984375, 1.04688, + (785): 1.10938, 1.17188, 1.23438, 1.29688, 1.35938, 1.42188, + (791): 1.48438, 1.54688, 1.60938, 1.67188, 1.73438, 1.79688, + (797): 1.85938, 1.92188, 1.98438, 2.04688, 2.10938, 2.17188, + (803): 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, 2.54688, + (809): 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, + (815): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, + (821): 3.35938, 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, + (827): 3.73438, 3.79688, 3.85938, 3.92188, 3.98438, 4.04688, + (833): 4.10938, 4.17188, 4.23438, 4.29688, 4.35938, 4.42188, + (839): 4.48438, 4.54688, 4.60938, 4.67188, 4.73438, 4.79688, + (845): 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, 5.17188, + (851): 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, + (857): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, + (863): 5.98438, 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, + (869): 6.35938, 6.42188, 6.48438, 6.54688, 6.60938, 6.67188, + (875): 6.73438, 6.79688, 6.85938, 6.92188, 6.98438, 7.04688, + (881): 7.10938, 7.17188, 7.23438, 7.29688, 7.35938, 7.42188, + (887): 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, 7.79688, + (893): 7.85938, 7.92188, 7.98438, 121, 0.117188, 0.179688, 0.242188, + (900): 0.304688, 0.367188, 0.429688, 0.492188, 0.554688, 0.617188, + (906): 0.679688, 0.742188, 0.804688, 0.867188, 0.929688, 0.992188, + (912): 1.05469, 1.11719, 1.17969, 1.24219, 1.30469, 1.36719, + (918): 1.42969, 1.49219, 1.55469, 1.61719, 1.67969, 1.74219, + (924): 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, 2.11719, + (930): 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, + (936): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, + (942): 2.92969, 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, + (948): 3.30469, 3.36719, 3.42969, 3.49219, 3.55469, 3.61719, + (954): 3.67969, 3.74219, 3.80469, 3.86719, 3.92969, 3.99219, + (960): 4.05469, 4.11719, 4.17969, 4.24219, 4.30469, 4.36719, + (966): 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, 4.74219, + (972): 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, + (978): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, + (984): 5.55469, 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, + (990): 5.92969, 5.99219, 6.05469, 6.11719, 6.17969, 6.24219, + (996): 6.30469, 6.36719, 6.42969, 6.49219, 6.55469, 6.61719, + (1002): 6.67969, 6.74219, 6.80469, 6.86719, 6.92969, 6.99219, + (1008): 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, 7.36719, + (1014): 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, + (1020): 7.80469, 7.86719, 7.92969, 7.99219 + } + } + } + DATASET "DS32BITS" { + DATATYPE H5T_IEEE_F32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 1024 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, + (0,13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, + (0,25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, + (1,0): 31, 0.28125, 0.53125, 0.78125, 1.03125, 1.28125, 1.53125, + (1,7): 1.78125, 2.03125, 2.28125, 2.53125, 2.78125, 3.03125, 3.28125, + (1,14): 3.53125, 3.78125, 4.03125, 4.28125, 4.53125, 4.78125, 5.03125, + (1,21): 5.28125, 5.53125, 5.78125, 6.03125, 6.28125, 6.53125, 6.78125, + (1,28): 7.03125, 7.28125, 7.53125, 7.78125, + (2,0): 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, 1.8125, + (2,8): 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, 3.5625, 3.8125, + (2,16): 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, 5.3125, 5.5625, 5.8125, + (2,24): 6.0625, 6.3125, 6.5625, 6.8125, 7.0625, 7.3125, 7.5625, 7.8125, + (3,0): 29, 0.34375, 0.59375, 0.84375, 1.09375, 1.34375, 1.59375, + (3,7): 1.84375, 2.09375, 2.34375, 2.59375, 2.84375, 3.09375, 3.34375, + (3,14): 3.59375, 3.84375, 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, + (3,21): 5.34375, 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, + (3,28): 7.09375, 7.34375, 7.59375, 7.84375, + (4,0): 28, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125, + (4,9): 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, + (4,18): 4.625, 4.875, 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, + (4,27): 6.875, 7.125, 7.375, 7.625, 7.875, + (5,0): 27, 0.40625, 0.65625, 0.90625, 1.15625, 1.40625, 1.65625, + (5,7): 1.90625, 2.15625, 2.40625, 2.65625, 2.90625, 3.15625, 3.40625, + (5,14): 3.65625, 3.90625, 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, + (5,21): 5.40625, 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, + (5,28): 7.15625, 7.40625, 7.65625, 7.90625, + (6,0): 26, 0.4375, 0.6875, 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, + (6,8): 2.1875, 2.4375, 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, + (6,16): 4.1875, 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, + (6,24): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, 7.9375, + (7,0): 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, 1.71875, + (7,7): 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, 3.21875, 3.46875, + (7,14): 3.71875, 3.96875, 4.21875, 4.46875, 4.71875, 4.96875, 5.21875, + (7,21): 5.46875, 5.71875, 5.96875, 6.21875, 6.46875, 6.71875, 6.96875, + (7,28): 7.21875, 7.46875, 7.71875, 7.96875 + } + ATTRIBUTE "DS32BITS" { + DATATYPE H5T_IEEE_F32LE + DATASPACE SIMPLE { ( 256 ) / ( 256 ) } + DATA { + (0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, + (13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, + (25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, 31, 0.28125, 0.53125, + (35): 0.78125, 1.03125, 1.28125, 1.53125, 1.78125, 2.03125, 2.28125, + (42): 2.53125, 2.78125, 3.03125, 3.28125, 3.53125, 3.78125, 4.03125, + (49): 4.28125, 4.53125, 4.78125, 5.03125, 5.28125, 5.53125, 5.78125, + (56): 6.03125, 6.28125, 6.53125, 6.78125, 7.03125, 7.28125, 7.53125, + (63): 7.78125, 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, + (71): 1.8125, 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, + (78): 3.5625, 3.8125, 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, + (85): 5.3125, 5.5625, 5.8125, 6.0625, 6.3125, 6.5625, 6.8125, + (92): 7.0625, 7.3125, 7.5625, 7.8125, 29, 0.34375, 0.59375, 0.84375, + (100): 1.09375, 1.34375, 1.59375, 1.84375, 2.09375, 2.34375, + (106): 2.59375, 2.84375, 3.09375, 3.34375, 3.59375, 3.84375, + (112): 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, 5.34375, + (118): 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, + (124): 7.09375, 7.34375, 7.59375, 7.84375, 28, 0.375, 0.625, 0.875, + (132): 1.125, 1.375, 1.625, 1.875, 2.125, 2.375, 2.625, 2.875, + (140): 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, 4.625, 4.875, + (148): 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, 6.875, + (156): 7.125, 7.375, 7.625, 7.875, 27, 0.40625, 0.65625, 0.90625, + (164): 1.15625, 1.40625, 1.65625, 1.90625, 2.15625, 2.40625, + (170): 2.65625, 2.90625, 3.15625, 3.40625, 3.65625, 3.90625, + (176): 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, 5.40625, + (182): 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, + (188): 7.15625, 7.40625, 7.65625, 7.90625, 26, 0.4375, 0.6875, + (195): 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, 2.1875, 2.4375, + (202): 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, 4.1875, + (209): 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, + (216): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, + (223): 7.9375, 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, + (230): 1.71875, 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, + (236): 3.21875, 3.46875, 3.71875, 3.96875, 4.21875, 4.46875, + (242): 4.71875, 4.96875, 5.21875, 5.46875, 5.71875, 5.96875, + (248): 6.21875, 6.46875, 6.71875, 6.96875, 7.21875, 7.46875, + (254): 7.71875, 7.96875 + } + } + } + DATASET "DS64BITS" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 4096 + OFFSET 6144 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, 1.25, + (0,11): 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, 2.5, + (0,21): 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, 3.75, + (0,31): 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, 5, + (0,41): 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, 6.25, + (0,51): 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, 7.5, + (0,61): 7.625, 7.75, 7.875, + (1,0): 63, 0.140625, 0.265625, 0.390625, 0.515625, 0.640625, 0.765625, + (1,7): 0.890625, 1.01562, 1.14062, 1.26562, 1.39062, 1.51562, 1.64062, + (1,14): 1.76562, 1.89062, 2.01562, 2.14062, 2.26562, 2.39062, 2.51562, + (1,21): 2.64062, 2.76562, 2.89062, 3.01562, 3.14062, 3.26562, 3.39062, + (1,28): 3.51562, 3.64062, 3.76562, 3.89062, 4.01562, 4.14062, 4.26562, + (1,35): 4.39062, 4.51562, 4.64062, 4.76562, 4.89062, 5.01562, 5.14062, + (1,42): 5.26562, 5.39062, 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, + (1,49): 6.14062, 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, + (1,56): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, 7.76562, + (1,63): 7.89062, + (2,0): 62, 0.15625, 0.28125, 0.40625, 0.53125, 0.65625, 0.78125, + (2,7): 0.90625, 1.03125, 1.15625, 1.28125, 1.40625, 1.53125, 1.65625, + (2,14): 1.78125, 1.90625, 2.03125, 2.15625, 2.28125, 2.40625, 2.53125, + (2,21): 2.65625, 2.78125, 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, + (2,28): 3.53125, 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, + (2,35): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, 5.15625, + (2,42): 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, 5.90625, 6.03125, + (2,49): 6.15625, 6.28125, 6.40625, 6.53125, 6.65625, 6.78125, 6.90625, + (2,56): 7.03125, 7.15625, 7.28125, 7.40625, 7.53125, 7.65625, 7.78125, + (2,63): 7.90625, + (3,0): 61, 0.171875, 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, + (3,7): 0.921875, 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, + (3,14): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, 2.54688, + (3,21): 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, 3.29688, 3.42188, + (3,28): 3.54688, 3.67188, 3.79688, 3.92188, 4.04688, 4.17188, 4.29688, + (3,35): 4.42188, 4.54688, 4.67188, 4.79688, 4.92188, 5.04688, 5.17188, + (3,42): 5.29688, 5.42188, 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, + (3,49): 6.17188, 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, + (3,56): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, 7.79688, + (3,63): 7.92188, + (4,0): 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, 0.8125, 0.9375, + (4,8): 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, 1.6875, 1.8125, 1.9375, + (4,16): 2.0625, 2.1875, 2.3125, 2.4375, 2.5625, 2.6875, 2.8125, 2.9375, + (4,24): 3.0625, 3.1875, 3.3125, 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, + (4,32): 4.0625, 4.1875, 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, + (4,40): 5.0625, 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, + (4,48): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, 6.9375, + (4,56): 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, 7.8125, 7.9375, + (5,0): 59, 0.203125, 0.328125, 0.453125, 0.578125, 0.703125, 0.828125, + (5,7): 0.953125, 1.07812, 1.20312, 1.32812, 1.45312, 1.57812, 1.70312, + (5,14): 1.82812, 1.95312, 2.07812, 2.20312, 2.32812, 2.45312, 2.57812, + (5,21): 2.70312, 2.82812, 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, + (5,28): 3.57812, 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, + (5,35): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, 5.20312, + (5,42): 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, 5.95312, 6.07812, + (5,49): 6.20312, 6.32812, 6.45312, 6.57812, 6.70312, 6.82812, 6.95312, + (5,56): 7.07812, 7.20312, 7.32812, 7.45312, 7.57812, 7.70312, 7.82812, + (5,63): 7.95312, + (6,0): 58, 0.21875, 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, + (6,7): 0.96875, 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, + (6,14): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, 2.59375, + (6,21): 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, 3.34375, 3.46875, + (6,28): 3.59375, 3.71875, 3.84375, 3.96875, 4.09375, 4.21875, 4.34375, + (6,35): 4.46875, 4.59375, 4.71875, 4.84375, 4.96875, 5.09375, 5.21875, + (6,42): 5.34375, 5.46875, 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, + (6,49): 6.21875, 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, + (6,56): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, 7.84375, + (6,63): 7.96875, + (7,0): 57, 0.234375, 0.359375, 0.484375, 0.609375, 0.734375, 0.859375, + (7,7): 0.984375, 1.10938, 1.23438, 1.35938, 1.48438, 1.60938, 1.73438, + (7,14): 1.85938, 1.98438, 2.10938, 2.23438, 2.35938, 2.48438, 2.60938, + (7,21): 2.73438, 2.85938, 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, + (7,28): 3.60938, 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, + (7,35): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, 5.23438, + (7,42): 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, 5.98438, 6.10938, + (7,49): 6.23438, 6.35938, 6.48438, 6.60938, 6.73438, 6.85938, 6.98438, + (7,56): 7.10938, 7.23438, 7.35938, 7.48438, 7.60938, 7.73438, 7.85938, + (7,63): 7.98438 + } + ATTRIBUTE "DS64BITS" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 512 ) / ( 512 ) } + DATA { + (0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, + (10): 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, + (20): 2.5, 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, + (30): 3.75, 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, + (40): 5, 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, + (50): 6.25, 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, + (60): 7.5, 7.625, 7.75, 7.875, 63, 0.140625, 0.265625, 0.390625, + (68): 0.515625, 0.640625, 0.765625, 0.890625, 1.01562, 1.14062, + (74): 1.26562, 1.39062, 1.51562, 1.64062, 1.76562, 1.89062, 2.01562, + (81): 2.14062, 2.26562, 2.39062, 2.51562, 2.64062, 2.76562, 2.89062, + (88): 3.01562, 3.14062, 3.26562, 3.39062, 3.51562, 3.64062, 3.76562, + (95): 3.89062, 4.01562, 4.14062, 4.26562, 4.39062, 4.51562, 4.64062, + (102): 4.76562, 4.89062, 5.01562, 5.14062, 5.26562, 5.39062, + (108): 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, 6.14062, + (114): 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, + (120): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, + (126): 7.76562, 7.89062, 62, 0.15625, 0.28125, 0.40625, 0.53125, + (133): 0.65625, 0.78125, 0.90625, 1.03125, 1.15625, 1.28125, + (139): 1.40625, 1.53125, 1.65625, 1.78125, 1.90625, 2.03125, + (145): 2.15625, 2.28125, 2.40625, 2.53125, 2.65625, 2.78125, + (151): 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, 3.53125, + (157): 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, + (163): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, + (169): 5.15625, 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, + (175): 5.90625, 6.03125, 6.15625, 6.28125, 6.40625, 6.53125, + (181): 6.65625, 6.78125, 6.90625, 7.03125, 7.15625, 7.28125, + (187): 7.40625, 7.53125, 7.65625, 7.78125, 7.90625, 61, 0.171875, + (194): 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, 0.921875, + (200): 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, + (206): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, + (212): 2.54688, 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, + (218): 3.29688, 3.42188, 3.54688, 3.67188, 3.79688, 3.92188, + (224): 4.04688, 4.17188, 4.29688, 4.42188, 4.54688, 4.67188, + (230): 4.79688, 4.92188, 5.04688, 5.17188, 5.29688, 5.42188, + (236): 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, 6.17188, + (242): 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, + (248): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, + (254): 7.79688, 7.92188, 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, + (262): 0.8125, 0.9375, 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, + (269): 1.6875, 1.8125, 1.9375, 2.0625, 2.1875, 2.3125, 2.4375, + (276): 2.5625, 2.6875, 2.8125, 2.9375, 3.0625, 3.1875, 3.3125, + (283): 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, 4.0625, 4.1875, + (290): 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, 5.0625, + (297): 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, + (304): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, + (311): 6.9375, 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, + (318): 7.8125, 7.9375, 59, 0.203125, 0.328125, 0.453125, 0.578125, + (325): 0.703125, 0.828125, 0.953125, 1.07812, 1.20312, 1.32812, + (331): 1.45312, 1.57812, 1.70312, 1.82812, 1.95312, 2.07812, + (337): 2.20312, 2.32812, 2.45312, 2.57812, 2.70312, 2.82812, + (343): 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, 3.57812, + (349): 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, + (355): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, + (361): 5.20312, 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, + (367): 5.95312, 6.07812, 6.20312, 6.32812, 6.45312, 6.57812, + (373): 6.70312, 6.82812, 6.95312, 7.07812, 7.20312, 7.32812, + (379): 7.45312, 7.57812, 7.70312, 7.82812, 7.95312, 58, 0.21875, + (386): 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, 0.96875, + (392): 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, + (398): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, + (404): 2.59375, 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, + (410): 3.34375, 3.46875, 3.59375, 3.71875, 3.84375, 3.96875, + (416): 4.09375, 4.21875, 4.34375, 4.46875, 4.59375, 4.71875, + (422): 4.84375, 4.96875, 5.09375, 5.21875, 5.34375, 5.46875, + (428): 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, 6.21875, + (434): 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, + (440): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, + (446): 7.84375, 7.96875, 57, 0.234375, 0.359375, 0.484375, 0.609375, + (453): 0.734375, 0.859375, 0.984375, 1.10938, 1.23438, 1.35938, + (459): 1.48438, 1.60938, 1.73438, 1.85938, 1.98438, 2.10938, + (465): 2.23438, 2.35938, 2.48438, 2.60938, 2.73438, 2.85938, + (471): 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, 3.60938, + (477): 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, + (483): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, + (489): 5.23438, 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, + (495): 5.98438, 6.10938, 6.23438, 6.35938, 6.48438, 6.60938, + (501): 6.73438, 6.85938, 6.98438, 7.10938, 7.23438, 7.35938, + (507): 7.48438, 7.60938, 7.73438, 7.85938, 7.98438 + } + } + } +} +} diff --git a/tools/testfiles/tfloatsattrs.h5 b/tools/testfiles/tfloatsattrs.h5 new file mode 100644 index 0000000000000000000000000000000000000000..9e73542459708b3e64b10433bdc1c0d5bff76463 GIT binary patch literal 47264 zcmeI5f2^%lncvsBfWtU5osDBhJ00sz(@ad$G`rSJOw-8H=!7;?-5Jfqw3BA1X_`sX zG$&2dn5JnT@d6h_+#(_(;ubD&1%xdiUJ-GL7q}wg=J)0I3tZsx`|$e$mrI|u-tXGy zeLootf7E1B_iG-X``Pb4?>_te?)QAo-e;}F@kf31&wlUifAsc{x5Ez)hlWAl`Zo0)TiSoDh5Ww|-mTk@(D8Y{PyNNmJ{J6*_4u{x%fjf;_Fwfl z_4ZZ&%{T)`eeA>I{7gTsr~5(m-Flq~!$&{)&)@%%fAy(PZt|agpwIv8{U7YyP+zyh z`UU7~;qdbMZT~O7Lf=>Jv9_iC%ENX4p*r~xf92cQGQVz)v+-`d1x9|?#oR7I4|J`IzuUB2RCz$o-?dME{1YEt3y0_| zgs|;xzxvqqNemD9)%UB{^=A(I)%W}VW$#;kT}3_NdLAopzOIhcDRw z;&oL|b?*oLo4&5z*M0-z<-LDBudBCuJ`Crh^74FyPw0vmhxq#;zHwyx1#f;n#`Q-@ z)S*jzv-2_jOna~K^4`Cm^U?iYe$D^>NC@^Je+)lU(aXGMUdgNR3NeI%*U)R^6}|Ga zpLnf%nb$V2sn=;mPc(-|Hh@f8q5Xy#AZlXT6U1`jXezyuRi2ZLjZo{lM!dUO)4?$?Hz9 z2fQBhde-X|uML0vnLqx(A8YKj&1;9(Zm)e_hx&cq>GhAiKH&9HuTOdXN3Z|xb+p$B zUMG8b?o#=I;*9~4z zdcDo>^M_u4;`OIqf9Ca+@b;_WHWl*q@U(UN?B%>UEFTUau#;Uhq2LwZ|WS@gYCHKh|G+o#J(w*R5VJc)i{4 z^G9C)*y~?-{cEp(>-C?#{-@V5USII~iq|*1&hh$=*Y~`BkO|ez3%Zk;PrR> zKL5b$pL%`B>*HSk-s``5{co@1yuRr5Rj+S)o#%D2*Y~}C>~)>jFTL*Yy5H+juV=ho z_Ikr>wXM#;>J0p*o`K&DM;)4<`&#(z@J@g4!S_#Z_P%9pZLK|JYJPyaePs3f#On8n z)$bFl-zVx1gjHXifz=uK+k6JbvHkAyd;YvF)bo3wyp_)Zyyy4hdCTvM^OoPA=50g$ zIraR$EpIQW=l4;0dsRKZugTj%^$-h&HT5m(ho~Q_ewg~()PGAozemm6Z^zQgd&c~) z-x25caC!T^SXy~cmH+ko;z8R@JscrcFP}g7-R&K^{~u_-dii`H?|-NE|6T1@FYn*; z{y)_IcWJ+Rd4HYv=l9up`+Ko8Q!np-{T9pbgY)+HV`-*d-ksulxtfeX2fC?o;)F za-XUXl>1bDpxmeG1LZzdA1L>!`aro))d$LbsyOP5CF~pOk-6{z>^K<)4&)QvON#Pn7>e`A@b)|7Jp% zDF2D_pD6!{@}DUGiSnN)|B3RSDF2D_pD6!{@}DUGk#e7_kCgjdeWcvy>LcYoS05?& zx%x=C&(%lDeXc%I?sN5#a-XY@l>1zLq}=D~Bjr9ZAP5GPhH|1~2-;}>8e^dUZ{G)PD>QT8T^{CvFdQ|R7Ju3I49+i7ikIFr%N9CT> zqjFE`QMo7esN9o!RPISVD)*!w-_xGIq#l)fQjf|#)$9M?wD%9!E0^2U?`^v&e^dUZ z{7v~sf1=zQ^@(zC)F;ZlQJ*OHMt!2(8}*5DZ`3Esy-}Yi_eOo9+#B_Ya&Ocp%Dqva zDECHvqTCzx$$Q%K*QigFd!s&4?oGY^|Gd3_xKX*@p?-hcP5GPhH|1~2KPmsD{FCxe z%0DUpr2LcePs+bh{*Cf)w&?p;{*Cf)lz*fA8|B|9|3>*Y%D++mjq-1lf1~^x<-e}n zH`Lda`-b|ua^Fy2SMD3?>&ksYeO9zM;OZ+&9$MmHUSJx^mx8UsvuM z>g&pVLw#MjZ>X;;_YL)R<-YOW=%4=&f^VCj|M$mB9Wnfy$CoTW|KF0o+PB&ZjALnK z3_Z{Ka%K0(9o`POSrXKVk*Np0j!Zr1b!6&6uOm|rdL5a1(Cf(5 zgI-6b9`rgg^`O_0sRzA|Og+?}Bej1bmgl$nJfS@g1N|JCst=U=RDGb_r|JXcK2;wm z_o@0oxlh#x%6+OnQ0`OpfpVX!50v{I3CIRUat#sro>%Zo|`aGfJAC-Gj zkIFr%N9CT>qjFE`QMo7esN9o!RPISVD)*!wm3vZ;$~~z^<(|}|a!=|}xhM6g+>?4# z?x|k?_5I}P^MsQBSh+9M$I5-7K347v^|5kasE?KVLVc{<7wTi>zEB@4_l5dcxi8em z%6*|eR_+V+v2tIikCppEeXQIU>SN`;sMmkZfAx7n$$z5U8}*5DZ`3Esy-}Yi_eOo9 z+#B_Ya&Ocp%DqvaDECHvqTCzxiE?k$C(6B1pD6c6eWKhO^@(zC)F;Zlsn`GN^MsQ7 zZ{X(%<#~r-Z;R~=zRIs1+2;d&_P+@A_rKof8Q4ET>fOHq`(GA&`=Pc!EOh)>I$4naef@@bL%d&{ z#O5<^$|l|l-UdDqJO!TuJ`H>ZcoyQp?&EI{aetS0gxGZX!Vs;?bN@uL96;ayWzOXQ z;+@Xr0OBj1%K^m6xg0>eD|0@8cz5P}0Pzi(^8v(*%=rM~TMPRE#Cr<+0mSzd_5+BU z!hQhp-j?@Q-q&(d`N@{8@Z8r`hHLKPoBGcnsfJhKi#=|y`SM+4xq0;)43c#T>g^P zx!%vp`#abB_RRSJy8pSE^8v&=3U6NT=NI0*-Y+cd2hja5D(nXk&s$zz@0YZ^yxuQs zd3n8G-tzK#-zl!w`xWAPy|O7R zwf^;f^IHFUzjdvDz2ENNfA@OdB4>h@kYzb>;1Wwm)H9XEibS4ms(z4 z@B78|dVf{i==cZ3CO#+@hJ%O2e0G-K-xU7e2H)=nZ-vjdgLi@VzTWry(eV4p@cUWr z>+bh=iF5aQzuLKbz2EGdI?v}p=W+l&;pZ}UuJ_MoA9k+y<1^<2=>A_SzTD)m72dqw zzg2kidjED|KY+geyM_Hb5dWa%<@NrPmY3K2&stty?>Du)yx#8=*X#WOalPIj6DK|1 zvtnU*rOyWc8~ktZzrp_o{~P>o?*H!fZtnkbx$1nF`@iYrYwmyRvirYWuJ!)z|L*l} z+5hDL?Gv=@|8f9v_J28mIQzdGKwSKv4@=>VFeg|F;;d`d=L3{|Ns__&>t` z5&n=ey8p}NTG{=dI(bL;f9SINzk9vM?ElX79<%?;0oo@Nv;WHh#M%Fy z>pd3#Z(i@Q_&*;&_b>j>2M`zk=L3ja|1Yoi*!tfOp#81?{Q%2`>i?wUSO2#dV)cJz_&>t`5&ns3S`@bAOoc&)8ATIvT2M`zk=L3j~ z|MLOF#sB#L;@1Cu0CDSoKY+OPzaK!{`ri*AmjCPZ9_9afy+`@KUhh%@= z>VFeg|F;-o^?zmh|G;7Kx3sUc*=tAs!IsVqQ;h(vH!Z;1G(x2A-vQnY-Ur^Aecahj z0dEIi2Hpj}6}%Vx0{G~@55o!IlfkEh&jOzhz65*)_-gR=;G4mBfgc1v4t@^&D)_V6 zhn?*h@bTa;fWHL(3ixZ_Z-BoAJ_r15@OQx91%D6x1MrW)KLK9@{u%fe;G4j=f$s$0 z3w{9nF!(X>Q{ZR8FM?kIzusqa|98?4=Kk-o`@hHT{~o*ld+h%2vHQQr?*AUU|9hPM z-`Ontzq48Pe`mAo|ITK`|C={h@qdSl|2tg#-{IE(%Nwlq|0cKo-{jW+n=Jp=8%+LR zvi!ef`G3jP|GL4d|0`GjSFZlA4F4PaZ}7jl|MjJ%nft%T?*AUU|9kBI@3H&8$L{|g zyZ?La{_k=2e`mAo|ITLF|DDaU|2vx%|8L%4#s3{H{_k+{e}`NDFK@8c|C`+Uf0JAP zZ?gPfZ!r0P$@2e_<^LsD|LX>;{;yp9U%C3fGW>7wztR7%YNV#VKFsULf8B5ze7^^L zB7A-!_y+Kk;A7$AQ^DtgF9%->z8(As_$Bb?;KR>@zYP95_-yb6;7h?j1pgHLbMP(T zyTK2Ep8!7(eyz_2{~P>o@V~+T2LBuUZ}7jt{|5gX{BQ8T!T$#T8~ktZzrp_o{~P>o z@V~+T2LBuUZ}7jt{|5gX{BQ8T!T$#T8~ktZzrp_r{!j3Kg8vizpWy!l|0noA!T$;V zPw;<&{}cS5;Qs{wC-^_X{|Ww2@PC5;6a1gx{{;Uh_&>q_3I0#;e}exL{GZ_e1pg=a zKf(VA{!j3Kg8vizpWy!l|0noA!T$;VPw;<&{}cS5;Qs{wC-^_X{|Ww2@PC5;6a1gx z{{;Uh_&>q_3I0#;e}exL{GZ_e1pg=aKhgjD;r}}Gqy9cHgYO&g6h5DW7vK%>Hu(57 z@DA`!@NV!P@ILT<@YcQ$!-?Qiz-NHBgD(VM2EG!!3w#6kR`5OGz2GOoFMtn#kM6%8 z499{`0G|Xt8GI`Ebnuzrv%u$q&j()wz65+Z_zLh<;H$ycg0BbP2)-G7JNPc}ec%Vd zkANQsKMj5k{1W(8@Imlr`|qE^=fKB+j{_eM{yg{#;4gx|1pYGkE8wq!zXtv~_#5DF zg1-em8+;DE<2j2yL9Q-Qy82IoD;IDwc0X_%( z9q{+SKLTF^{ss6p@V(%N!B2r-1i#*AgZ~ZwH~8P+e}n%G{x|sF;D3Yv4gNRy-{60P z{|){(_}}1vga7T?z8?+#H~8P+e}n%G{x|sF;D37rj}QMF{BQ8T!T$#T8~h*P{|Ns_ z_&>t`5&n(a;Kf?bJ{*Ul~g#RP_AL0K9|3~;g!v7KekMMtl|0Db# z;r|H#NBBR&{}KL=@PCB=Bm5uX{|Ns__&>t`5&n(a;Kf?bJ{*Ul~ zg#RP_AL0K9|3~;g!v7KekMMtl|0Db#;r|H#NBBR&{}KL=@PCB=BmMsZ{NKR;bNGG( zd>VYd6TAn!AABNwd;HSYafe(T|*Y{004*YrW7r|c!e--?7@HfF{gUDdr{BQ8T!T$#T8~ktZzrp_o{~P>o z@V~+T2LBuUZ}7jt{|5gX{BQ8T!T$#T8~ktZzrp_o{~P>o@V~+T2LBuUZ}7jt{|5gX z{BQ8T!T$#T8~ktZzrp_o{~P>o@V~+T2LBuUZ}7jt{|5gX{BQ8T!T$#T8~ktZzrp_o z{~P>o@V~+T2LBuUZ}7jt|3?2m2mf!t|2yIP{opg;^DDvkfDeFAf{)JxUj)7id?WZi z@YCRf;N#%KFM_`c{wDZ5@WtTogMSRZ4*W~-9pL-HkAj~8zYKn(&j$Y+{BQ8T!T$#T z8~ktZzrp_o{~P>o@V~+T2LBuUZ}7jt{|5gX{BQ8T!T$#T8~ktZzrp_o{~P>o@V~+T z2LBuUZ}7j5GmiC7d$}k0Kf(X$nEvO5={PX_pWy!l|0noA!T$;VPw;<&{}cS5;Qs{w zC-^_X{|Ww2=ivFC2ZsL>{GZ_e1pg=aKf(VA{!j3Kg8vizpWy!l|0noA!T;$RJm2fU z@PC5;6a1gx{{;Uh_&>q_3I0#;e}exL{GZ_e1pg=aKRt}+`zRRxPw;<&{}cS5;Qs{w zC-^_X{|Ww2@PC5;)6)OGo?!V&uom7P+W($V|G&3-#GCy08JFt`9;%-swYO+m@liX2 z;r9u{?+?D7K)q|}hTji-J%QeSUr(UNzMepj4Sx6a1bX{tU|&z5w?BdNdIH_80q6Au zx|{X=8p?VCoja8E1Ug*S6X@^^U*E1Luz81eJ%LSb*Av*}gs<0n0?RvSJ%J@_J%J@R z`1-n@K)pj~48JVRy^(3AKc*213gaP9T1I7~uj3*2jPZ%(sFkn1kz<9!d@q}SJp6|I} zj3*2jPZ%(sFkn1kz<9!d@q_{62?NFx28<^R7*7~5o-klMVO~$5_jZ%sFrF}AJYm3i!hrFF0pke+#uEmNCk%V>d>;X0JYm3i z!hrFF0pke+#uEmNCkz-*7%-kNU_4>Kc*213gn{D;eLaC*{=S|-k9|FX9{YL%J@)kk zdhF{7^w`%E=&`RS&|_aupvS(RK#%i!0^KdIC(zyUdIH@ouP4ym%6bBw8_IeD9WLt$ zbhxZ1(BXDHfz2D*^#nG#T~A<>+w}xCS?dWbZ_s)IOV)Yo@PA!Tpgx7=dIGv(xt>5}_}}1vga7}g z^#tl;<(}6Q=rR1C*AwXNhyU|>0=@n4e_l_Zw;%p5>j`x35aIu_o0w!*V@=%JBbkJ%PF({(md$ z3Dn2VJ+CLwWB5O>C(zpu|L64tdi&x3yq-XBKl~rz{|Ns__&>t`5&n(a;Kf?bJ{*Ul~g#YV$0`;6M*AvhU%k=~*!~YTfkMRFnSx=xocIm#JK#y1J3G~m$ zYCVD2dwpO&VZeOCfcb<0^9cjy69&vD446+CFrP4BK4HLo!hrdN0rLq1<`V|YCk&WR z7%-nOU_N2Me8PbFgaPvj1LhM3%qI+(PZ%(tFkn7mz zKYv#13E+I}0OS4tYCQp*ANYT@o&e4dKL1~>Cjfu1))VOYJFM0d=zku8`Gf)U2?OR6 z2Fxc6m`@lmpDZ%sFrF}AJYm3i!hrFF0pke+#uEmNCkz-*7%-kNU_4>K zc*213gaP9T1I7~uj3*2jPZ%(sFkn1kz<9!d@q_{62?NFx28<^R7*7~5o-i!O6Y5jk z)p`PbpRU#u==ou_oeq605fb#+WuhtX5`GNme>j~ie!2hfD1n~ZUwVpu# z_m$Op0=?f?0_GD2%qI+(PZ%(tFkn7mznT2#gPtPk=HQp>zk7Ucm%mFfxE31A_!q zTo7tLy1I}cS62q0N|^aD8mf)KfCa*WIs+y=N{^5b@Njhu0C_b6>R(tYJpoN;uwY0j zPAvhkVd>EWCP606$iN0M3u+)E10)5)%x7lM0LyCu%})SgkT@F*QRj9NJw0;3^7%MfS)l~qVtyMe(0#kvD%{02r;`2~y)xnK Date: Mon, 5 Apr 2021 12:37:26 -0500 Subject: [PATCH 36/66] HDFFV-11229 merge changes from develop --- CMakeLists.txt | 8 + MANIFEST | 4 + config/cmake/run2Test.cmake | 420 ++++++++++++++++++ doxygen/Doxyfile.in | 1 + release_docs/RELEASE.txt | 1 + src/CMakeLists.txt | 44 +- test/CMakeTests.cmake | 3 +- test/ShellTests.cmake | 3 +- tools/lib/h5tools_dump.c | 4 +- tools/src/h5ls/h5ls.c | 3 + tools/testfiles/tfloatsattrs.ddl | 4 +- tools/testfiles/tfloatsattrs.xddl | 621 +++++++++++++++++++++++++++ tools/testfiles/tldouble.ddl | 2 +- tools/testfiles/tldouble.xddl | 11 + tools/testfiles/tldouble_scalar.ddl | 2 +- tools/testfiles/tldouble_scalar.xddl | 26 ++ 16 files changed, 1130 insertions(+), 27 deletions(-) create mode 100644 config/cmake/run2Test.cmake create mode 100644 tools/testfiles/tfloatsattrs.xddl create mode 100644 tools/testfiles/tldouble.xddl create mode 100644 tools/testfiles/tldouble_scalar.xddl diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd9b79d74c..36749e80e11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -507,6 +507,14 @@ else () set (tgt_file_ext "-shared") endif () +#----------------------------------------------------------------------------- +# perl is used in some optional src and tests, check availability +find_package (Perl) +if (PERL_FOUND) + set (H5_PERL_FOUND YES) +endif () +#----------------------------------------------------------------------------- + #----------------------------------------------------------------------------- # Option to Build Static executables #----------------------------------------------------------------------------- diff --git a/MANIFEST b/MANIFEST index 4ec1c33aff4..326608d22bf 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1912,6 +1912,7 @@ ./tools/testfiles/tfletcher32.ddl ./tools/testfiles/tfloatsattrs.ddl ./tools/testfiles/tfloatsattrs.h5 +./tools/testfiles/tfloatsattrs.xddl ./tools/testfiles/tfloatsattrs.wddl ./tools/testfiles/tfvalues.h5 ./tools/testfiles/tgroup-1.ddl @@ -1952,8 +1953,10 @@ ./tools/testfiles/tlarge_objname.h5 ./tools/testfiles/tldouble.ddl ./tools/testfiles/tldouble.h5 +./tools/testfiles/tldouble.xddl ./tools/testfiles/tldouble_scalar.ddl ./tools/testfiles/tldouble_scalar.h5 +./tools/testfiles/tldouble_scalar.xddl ./tools/testfiles/tlonglinks.ddl ./tools/testfiles/tlonglinks.h5 ./tools/testfiles/tloop-1.ddl @@ -3423,6 +3426,7 @@ ./config/cmake/patch.xml ./config/cmake/PkgInfo.in ./config/cmake/README.txt.cmake.in +./config/cmake/run2Test.cmake ./config/cmake/UseJava.cmake ./config/cmake/UseJavaClassFilelist.cmake ./config/cmake/UseJavaSymlinks.cmake diff --git a/config/cmake/run2Test.cmake b/config/cmake/run2Test.cmake new file mode 100644 index 00000000000..bc7d559e9f5 --- /dev/null +++ b/config/cmake/run2Test.cmake @@ -0,0 +1,420 @@ +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# +# run2Test.cmake executes a command and captures the output in a file. File is then compared +# against a reference file or a second file. Exit status of command can also be compared. +cmake_policy(SET CMP0007 NEW) + +# arguments checking +if (NOT TEST_PROGRAM) + message (FATAL_ERROR "Require TEST_PROGRAM to be defined") +endif () +if (NOT TEST_FOLDER) + message (FATAL_ERROR "Require TEST_FOLDER to be defined") +endif () +if (NOT TEST_OUTPUT) + message (FATAL_ERROR "Require TEST_OUTPUT to be defined") +endif () +if (NOT TEST_EXPECT) + message (STATUS "Require TEST_EXPECT to be defined") +endif () + +if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) +endif () + +if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) +endif () + +message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}") + +if (TEST_LIBRARY_DIRECTORY) + if (WIN32) + set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") + else () + set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") + endif () +endif () + +if (TEST_ENV_VAR) + set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") + #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") +endif () + +if (NOT TEST_INPUT) + # run the test program, capture the stdout/stderr and the result var + execute_process ( + COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS} + WORKING_DIRECTORY ${TEST_FOLDER} + RESULT_VARIABLE TEST_RESULT + OUTPUT_FILE ${TEST_OUTPUT} + ERROR_FILE ${TEST_OUTPUT}.err + OUTPUT_VARIABLE TEST_OUT + ERROR_VARIABLE TEST_ERROR + ) +else () + # run the test program with stdin, capture the stdout/stderr and the result var + execute_process ( + COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS} + WORKING_DIRECTORY ${TEST_FOLDER} + RESULT_VARIABLE TEST_RESULT + INPUT_FILE ${TEST_INPUT} + OUTPUT_FILE ${TEST_OUTPUT} + ERROR_FILE ${TEST_OUTPUT}.err + OUTPUT_VARIABLE TEST_OUT + ERROR_VARIABLE TEST_ERROR + ) +endif () + +if (TEST_REGEX) + # TEST_REGEX should always be matched + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM}) + string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT) + if (NOT REGEX_RESULT) + message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}") + endif () +endif () + +message (STATUS "COMMAND Result: ${TEST_RESULT}") + +# if the .err file exists and ERRROR_APPEND is enabled +if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + list (LENGTH TEST_STREAM test_len) + if (test_len GREATER 0) + if (TEST_MASK_FILE) + STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") + endif () + # remove special output + string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") + + if (NOT ERROR_APPEND) + # write back to original .err file + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + else () + # append error output to the stdout output file + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + endif () + endif () +endif () + +# append the test result status with a predefined text +if (TEST_APPEND) + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") +endif () + +# if the return value is !=${TEST_EXPECT} bail out +if (NOT TEST_RESULT EQUAL TEST_EXPECT) + if (NOT TEST_NOERRDISPLAY) + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + message (STATUS "Output :\n${TEST_STREAM}") + endif () + endif () + message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") +endif () + +message (STATUS "COMMAND Error: ${TEST_ERROR}") + +# remove special output +file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT) +if (TEST_FIND_RESULT GREATER -1) + string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM}) +endif () + +# remove special error output +if (NOT TEST_ERRREF) + # the error stack has been appended to the output file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +else () + # the error stack remains in the .err file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) +endif () +string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT) +if (TEST_FIND_RESULT GREATER -1) + string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") + # write back the changes to the original files + if (NOT TEST_ERRREF) + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + else () + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + endif () +endif () + +# if the output file needs Storage text removed +if (TEST_MASK) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + string (REGEX REPLACE "Storage:[^\n]+\n" "Storage:

\n" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") +endif () + +# if the output file needs Modified text removed +if (TEST_MASK_MOD) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") +endif () + +# if the output file or the .err file needs to mask out error stack info +if (TEST_MASK_ERROR) + if (NOT TEST_ERRREF) + # the error stack has been appended to the output file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + else () + # the error stack remains in the .err file + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + endif () + string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") + # write back the changes to the original files + if (NOT TEST_ERRREF) + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + else () + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + endif () +endif () + +# remove text from the output file +if (TEST_FILTER) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") +endif () + +if (TEST_REF_FILTER) + #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") +endif () + +if (TEST_REF_FILTER2) + #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER2}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) + string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE2} "${TEST_STREAM}") +endif () + +# compare output files to references unless this must be skipped +set (TEST_COMPARE_RESULT 0) +set (TEST_COMPARE_RESULT2 0) +if (NOT TEST_SKIP_COMPARE) + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + list (LENGTH TEST_STREAM test_len) + if (test_len GREATER 0) + if (WIN32) + configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) + endif () + #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") + endif () + endif () + endif () + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE2}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) + list (LENGTH TEST_STREAM test_len2) + if (test_len2 GREATER 0) + if (WIN32) + configure_file(${TEST_FOLDER}/${TEST_REFERENCE2} ${TEST_FOLDER}/${TEST_REFERENCE2}.tmp NEWLINE_STYLE CRLF) + if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE2}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE2}.tmp ${TEST_FOLDER}/${TEST_REFERENCE2}) + endif () + #file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) + #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE2} "${TEST_STREAM}") + endif () + endif () + endif () + + if (test_len GREATER 0) + if (NOT TEST_SORT_COMPARE) + # now compare the output with the reference + execute_process ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} + RESULT_VARIABLE TEST_COMPARE_RESULT + ) + else () + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2) + list (SORT v1) + list (SORT v2) + if (NOT v1 STREQUAL v2) + set(TEST_COMPARE_RESULT 1) + endif () + endif () + message (STATUS "TEST_COMPARE_RESULT: ${TEST_COMPARE_RESULT}\n") + endif () + if (test_len2 GREATER 0) + if (NOT TEST_SORT_COMPARE) + # now compare the output with the reference2 + execute_process ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE2} + RESULT_VARIABLE TEST_COMPARE_RESULT2 + ) + else () + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE2} v2) + list (SORT v1) + list (SORT v2) + if (NOT v1 STREQUAL v2) + set(TEST_COMPARE_RESULT2 1) + endif () + endif () + message (STATUS "TEST_COMPARE_RESULT2: ${TEST_COMPARE_RESULT2}\n") + endif () + + if (TEST_COMPARE_RESULT AND TEST_COMPARE_RESULT2) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) + list (LENGTH test_act len_act) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) + list (LENGTH test_ref len_ref) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE2} test_ref2) + list (LENGTH test_ref2 len_ref2) + if (len_act GREATER 0 AND len_ref GREATER 0) + math (EXPR _FP_LEN "${len_ref} - 1") + foreach (line RANGE 0 ${_FP_LEN}) + list (GET test_act ${line} str_act) + list (GET test_ref ${line} str_ref) + if (NOT str_act STREQUAL str_ref) + if (str_act) + message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") + endif () + endif () + if (len_ref2 GREATER 0) + list (GET test_ref2 ${line} str_ref2) + if (NOT str_act STREQUAL str_ref2) + if (str_act) + message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER2: ${str_ref2}\n") + endif () + endif () + endif () + endforeach () + else () + if (len_act EQUAL 0) + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty") + endif () + if (len_ref EQUAL 0) + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty") + endif () + endif () + + message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") + endif () + + # now compare the .err file with the error reference, if supplied + set (TEST_ERRREF_RESULT 0) + if (TEST_ERRREF) + file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) + list (LENGTH TEST_STREAM test_len) + if (test_len GREATER 0) + if (WIN32) + configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) + if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") + file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) + endif () + #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) + #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") + endif () + + # now compare the error output with the error reference + execute_process ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} + RESULT_VARIABLE TEST_ERRREF_RESULT + ) + if (TEST_ERRREF_RESULT) + set (TEST_ERRREF_RESULT 0) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) + list (LENGTH test_act len_act) + file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) + list (LENGTH test_ref len_ref) + math (EXPR _FP_LEN "${len_ref} - 1") + if (len_act GREATER 0 AND len_ref GREATER 0) + math (EXPR _FP_LEN "${len_ref} - 1") + foreach (line RANGE 0 ${_FP_LEN}) + list (GET test_act ${line} str_act) + list (GET test_ref ${line} str_ref) + if (NOT str_act STREQUAL str_ref) + if (str_act) + set (TEST_ERRREF_RESULT 1) + message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") + endif () + endif () + endforeach () + else () + if (len_act EQUAL 0) + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty") + endif () + if (len_ref EQUAL 0) + message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") + endif () + endif () + if (NOT len_act EQUAL len_ref) + set (TEST_ERRREF_RESULT 1) + endif () + endif () + endif () + + message (STATUS "COMPARE Result: ${TEST_ERRREF_RESULT}") + + # again, if return value is !=0 scream and shout + if (TEST_ERRREF_RESULT) + message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}") + endif () + endif () +endif () + +set (TEST_GREP_RESULT 0) +if (TEST_GREP_COMPARE) + # now grep the output with the reference + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + list (LENGTH TEST_STREAM test_len) + if (test_len GREATER 0) + # TEST_REFERENCE should always be matched + string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) + string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT) + if (NOT TEST_GREP_RESULT) + message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") + endif () + + string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) + if (TEST_EXPECT) + # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match + string (LENGTH "${TEST_MATCH}" TEST_GREP_RESULT) + if (TEST_GREP_RESULT) + message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") + endif () + endif () + endif () +endif () + +# dump the output unless nodisplay option is set +if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + execute_process ( + COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM} + RESULT_VARIABLE TEST_RESULT + ) +endif () + +# everything went fine... +message (STATUS "${TEST_PROGRAM} Passed") + diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index 711fa7a2196..b1b783c89d3 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -263,6 +263,7 @@ TAB_SIZE = 4 ALIASES = +@INCLUDE_PATH = @DOXYGEN_INCLUDE_ALIASES_PATH@ @INCLUDE = @DOXYGEN_INCLUDE_ALIASES@ # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e3beef8e4a6..03460ef129f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -239,6 +239,7 @@ New Features (ADB - 2020/10/27, HDFFV-10868) + Tools: ------ - h5repack added help text for user-defined filters. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 329a2dcdc96..7b70e679fbd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -924,8 +924,7 @@ set (H5_PUBLIC_GENERATED_HEADERS option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON) if (HDF5_GENERATE_HEADERS) set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE) - find_package (Perl) - if (PERL_FOUND) + if (H5_PERL_FOUND) execute_process ( COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt OUTPUT_VARIABLE SCRIPT_OUTPUT ) @@ -1302,34 +1301,43 @@ endif () if (DOXYGEN_FOUND) set (DOXYGEN_PACKAGE ${HDF5_PACKAGE}) set (DOXYGEN_VERSION_STRING ${HDF5_VERSION_STRING}) - set (DOXYGEN_INCLUDE_ALIASES ${HDF5_DOXYGEN_DIR}/aliases) + set (DOXYGEN_INCLUDE_ALIASES_PATH ${HDF5_DOXYGEN_DIR}) + set (DOXYGEN_INCLUDE_ALIASES aliases) + set (DOXYGEN_VERBATIM_VARS DOXYGEN_INCLUDE_ALIASES) set (DOXYGEN_PROJECT_LOGO ${HDF5_DOXYGEN_DIR}/img/HDFG-logo.png) set (DOXYGEN_PROJECT_BRIEF "C-API Reference") - set (DOXYGEN_INPUT_DIRECTORY ${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared) + set (DOXYGEN_INPUT_DIRECTORY "${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared") set (DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) set (DOXYGEN_MACRO_EXPANSION YES) set (DOXYGEN_OUTPUT_DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs) +# This configure and custom target work together # Replace variables inside @@ with the current values - configure_file(${HDF5_DOXYGEN_DIR}/Doxyfile.in Doxyfile @ONLY) - - doxygen_add_docs(hdf5lib_doc -# ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${HDF5_DOXYGEN_DIR}/dox - ${DOXYGEN_INPUT_DIRECTORY} - ALL - WORKING_DIRECTORY ${HDF5_SRC_DIR} - COMMENT "Generating HDF5 library Source Documentation" - ) - install( + configure_file (${HDF5_DOXYGEN_DIR}/Doxyfile.in ${HDF5_BINARY_DIR}/Doxyfile @ONLY) + add_custom_target (hdf5lib_doc ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${HDF5_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${HDF5_SRC_DIR} + COMMENT "Generating HDF5 library Source API documentation with Doxygen" + VERBATIM ) +# This cmake function requires that the non-default doxyfile settings are provided with set (DOXYGEN_xxx) commands +# In addition the doxyfile aliases @INCLUDE option is not supported and would need to be provided in a set (DOXYGEN_ALIASES) command. +# doxygen_add_docs (hdf5lib_doc +## ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${HDF5_DOXYGEN_DIR}/dox +# ${DOXYGEN_INPUT_DIRECTORY} +# ALL +# WORKING_DIRECTORY ${HDF5_SRC_DIR} +# COMMENT "Generating HDF5 library Source Documentation" +# ) + install ( DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs/html DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT Documents ) - if(NOT TARGET doxygen) - add_custom_target(doxygen) - endif() + if (NOT TARGET doxygen) + add_custom_target (doxygen) + endif () - add_dependencies(doxygen hdf5lib_doc) + add_dependencies (doxygen hdf5lib_doc) endif () diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 43010c267cf..1461648e75f 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -938,8 +938,7 @@ if (ENABLE_EXTENDED_TESTS) #-- Adding test for flushrefresh file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test") - find_package (Perl) - if (PERL_FOUND) + if (H5_PERL_FOUND) add_test ( NAME H5TEST-testflushrefresh-clear-objects COMMAND ${CMAKE_COMMAND} -E remove flushrefresh.h5 diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index 4676184caff..4d23de3ced7 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -23,8 +23,7 @@ if (UNIX) ############################################################################## # configure scripts to test dir ############################################################################## - find_package (Perl) - if (PERL_FOUND) + if (H5_PERL_FOUND) configure_file(${HDF5_TEST_SOURCE_DIR}/testflushrefresh.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh @ONLY) endif () configure_file(${HDF5_TEST_SOURCE_DIR}/test_usecases.sh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh @ONLY) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index a129ccc1d31..65895a018d1 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2215,8 +2215,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_append(buffer, "H5T_NATIVE_FLOAT"); else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE"); + else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) + h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE"); else { - + /* print what the library knows */ /* byte order */ if (H5Tget_size(type) > 1) { order = H5Tget_order(type); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index ab94573b15b..1343aaf4ccd 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -426,6 +426,9 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind) else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) { h5tools_str_append(buffer, "native double"); } + else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) { + h5tools_str_append(buffer, "native long double"); + } else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) { h5tools_str_append(buffer, "native int8_t"); } diff --git a/tools/testfiles/tfloatsattrs.ddl b/tools/testfiles/tfloatsattrs.ddl index 2cc5cfd4f43..68256e0dd1b 100644 --- a/tools/testfiles/tfloatsattrs.ddl +++ b/tools/testfiles/tfloatsattrs.ddl @@ -1,7 +1,7 @@ HDF5 "tfloatsattrs.h5" { GROUP "/" { DATASET "DS128BITS" { - DATATYPE 128-bit little-endian floating-point + DATATYPE H5T_NATIVE_LDOUBLE DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } STORAGE_LAYOUT { CONTIGUOUS @@ -169,7 +169,7 @@ GROUP "/" { (7,124): 7.80469, 7.86719, 7.92969, 7.99219 } ATTRIBUTE "DS128BITS" { - DATATYPE 128-bit little-endian floating-point + DATATYPE H5T_NATIVE_LDOUBLE DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } DATA { (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, diff --git a/tools/testfiles/tfloatsattrs.xddl b/tools/testfiles/tfloatsattrs.xddl new file mode 100644 index 00000000000..2cc5cfd4f43 --- /dev/null +++ b/tools/testfiles/tfloatsattrs.xddl @@ -0,0 +1,621 @@ +HDF5 "tfloatsattrs.h5" { +GROUP "/" { + DATASET "DS128BITS" { + DATATYPE 128-bit little-endian floating-point + DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 16384 + OFFSET 14416 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, + (0,9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, + (0,18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, 1.625, + (0,27): 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, 2.1875, + (0,36): 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, 2.6875, 2.75, + (0,45): 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, 3.25, 3.3125, + (0,54): 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, 3.8125, 3.875, + (0,63): 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, 4.375, 4.4375, + (0,72): 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, 4.875, 4.9375, 5, + (0,81): 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, 5.4375, 5.5, + (0,89): 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, 5.9375, 6, 6.0625, + (0,98): 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, 6.5, 6.5625, 6.625, + (0,107): 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, 7.0625, 7.125, 7.1875, + (0,116): 7.25, 7.3125, 7.375, 7.4375, 7.5, 7.5625, 7.625, 7.6875, 7.75, + (0,125): 7.8125, 7.875, 7.9375, + (1,0): 127, 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, + (1,6): 0.382812, 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, + (1,12): 0.757812, 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, + (1,18): 1.13281, 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, + (1,25): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, 1.94531, + (1,32): 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, 2.32031, 2.38281, + (1,39): 2.44531, 2.50781, 2.57031, 2.63281, 2.69531, 2.75781, 2.82031, + (1,46): 2.88281, 2.94531, 3.00781, 3.07031, 3.13281, 3.19531, 3.25781, + (1,53): 3.32031, 3.38281, 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, + (1,60): 3.75781, 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, + (1,67): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, 4.57031, + (1,74): 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, 4.94531, 5.00781, + (1,81): 5.07031, 5.13281, 5.19531, 5.25781, 5.32031, 5.38281, 5.44531, + (1,88): 5.50781, 5.57031, 5.63281, 5.69531, 5.75781, 5.82031, 5.88281, + (1,95): 5.94531, 6.00781, 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, + (1,102): 6.38281, 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, + (1,109): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, 7.19531, + (1,116): 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, 7.57031, 7.63281, + (1,123): 7.69531, 7.75781, 7.82031, 7.88281, 7.94531, + (2,0): 126, 0.078125, 0.140625, 0.203125, 0.265625, 0.328125, 0.390625, + (2,7): 0.453125, 0.515625, 0.578125, 0.640625, 0.703125, 0.765625, + (2,13): 0.828125, 0.890625, 0.953125, 1.01562, 1.07812, 1.14062, + (2,19): 1.20312, 1.26562, 1.32812, 1.39062, 1.45312, 1.51562, 1.57812, + (2,26): 1.64062, 1.70312, 1.76562, 1.82812, 1.89062, 1.95312, 2.01562, + (2,33): 2.07812, 2.14062, 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, + (2,40): 2.51562, 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, + (2,47): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, 3.32812, + (2,54): 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, 3.70312, 3.76562, + (2,61): 3.82812, 3.89062, 3.95312, 4.01562, 4.07812, 4.14062, 4.20312, + (2,68): 4.26562, 4.32812, 4.39062, 4.45312, 4.51562, 4.57812, 4.64062, + (2,75): 4.70312, 4.76562, 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, + (2,82): 5.14062, 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, + (2,89): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, 5.95312, + (2,96): 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, 6.32812, 6.39062, + (2,103): 6.45312, 6.51562, 6.57812, 6.64062, 6.70312, 6.76562, 6.82812, + (2,110): 6.89062, 6.95312, 7.01562, 7.07812, 7.14062, 7.20312, 7.26562, + (2,117): 7.32812, 7.39062, 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, + (2,124): 7.76562, 7.82812, 7.89062, 7.95312, + (3,0): 125, 0.0859375, 0.148438, 0.210938, 0.273438, 0.335938, + (3,6): 0.398438, 0.460938, 0.523438, 0.585938, 0.648438, 0.710938, + (3,12): 0.773438, 0.835938, 0.898438, 0.960938, 1.02344, 1.08594, + (3,18): 1.14844, 1.21094, 1.27344, 1.33594, 1.39844, 1.46094, 1.52344, + (3,25): 1.58594, 1.64844, 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, + (3,32): 2.02344, 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, + (3,39): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, 2.83594, + (3,46): 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, 3.21094, 3.27344, + (3,53): 3.33594, 3.39844, 3.46094, 3.52344, 3.58594, 3.64844, 3.71094, + (3,60): 3.77344, 3.83594, 3.89844, 3.96094, 4.02344, 4.08594, 4.14844, + (3,67): 4.21094, 4.27344, 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, + (3,74): 4.64844, 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, + (3,81): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, 5.46094, + (3,88): 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, 5.83594, 5.89844, + (3,95): 5.96094, 6.02344, 6.08594, 6.14844, 6.21094, 6.27344, 6.33594, + (3,102): 6.39844, 6.46094, 6.52344, 6.58594, 6.64844, 6.71094, 6.77344, + (3,109): 6.83594, 6.89844, 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, + (3,116): 7.27344, 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, + (3,123): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, + (4,0): 124, 0.09375, 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, + (4,7): 0.46875, 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, + (4,14): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, 1.28125, + (4,21): 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, 1.65625, 1.71875, + (4,28): 1.78125, 1.84375, 1.90625, 1.96875, 2.03125, 2.09375, 2.15625, + (4,35): 2.21875, 2.28125, 2.34375, 2.40625, 2.46875, 2.53125, 2.59375, + (4,42): 2.65625, 2.71875, 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, + (4,49): 3.09375, 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, + (4,56): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, 3.90625, + (4,63): 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, 4.28125, 4.34375, + (4,70): 4.40625, 4.46875, 4.53125, 4.59375, 4.65625, 4.71875, 4.78125, + (4,77): 4.84375, 4.90625, 4.96875, 5.03125, 5.09375, 5.15625, 5.21875, + (4,84): 5.28125, 5.34375, 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, + (4,91): 5.71875, 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, + (4,98): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, 6.53125, + (4,105): 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, 6.90625, 6.96875, + (4,112): 7.03125, 7.09375, 7.15625, 7.21875, 7.28125, 7.34375, 7.40625, + (4,119): 7.46875, 7.53125, 7.59375, 7.65625, 7.71875, 7.78125, 7.84375, + (4,126): 7.90625, 7.96875, + (5,0): 123, 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, + (5,7): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, + (5,13): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, + (5,19): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, 1.60156, + (5,26): 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, 1.97656, 2.03906, + (5,33): 2.10156, 2.16406, 2.22656, 2.28906, 2.35156, 2.41406, 2.47656, + (5,40): 2.53906, 2.60156, 2.66406, 2.72656, 2.78906, 2.85156, 2.91406, + (5,47): 2.97656, 3.03906, 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, + (5,54): 3.41406, 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, + (5,61): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, 4.22656, + (5,68): 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, 4.60156, 4.66406, + (5,75): 4.72656, 4.78906, 4.85156, 4.91406, 4.97656, 5.03906, 5.10156, + (5,82): 5.16406, 5.22656, 5.28906, 5.35156, 5.41406, 5.47656, 5.53906, + (5,89): 5.60156, 5.66406, 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, + (5,96): 6.03906, 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, + (5,103): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, 6.85156, + (5,110): 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, 7.22656, 7.28906, + (5,117): 7.35156, 7.41406, 7.47656, 7.53906, 7.60156, 7.66406, 7.72656, + (5,124): 7.78906, 7.85156, 7.91406, 7.97656, + (6,0): 122, 0.109375, 0.171875, 0.234375, 0.296875, 0.359375, 0.421875, + (6,7): 0.484375, 0.546875, 0.609375, 0.671875, 0.734375, 0.796875, + (6,13): 0.859375, 0.921875, 0.984375, 1.04688, 1.10938, 1.17188, + (6,19): 1.23438, 1.29688, 1.35938, 1.42188, 1.48438, 1.54688, 1.60938, + (6,26): 1.67188, 1.73438, 1.79688, 1.85938, 1.92188, 1.98438, 2.04688, + (6,33): 2.10938, 2.17188, 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, + (6,40): 2.54688, 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, + (6,47): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, 3.35938, + (6,54): 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, 3.73438, 3.79688, + (6,61): 3.85938, 3.92188, 3.98438, 4.04688, 4.10938, 4.17188, 4.23438, + (6,68): 4.29688, 4.35938, 4.42188, 4.48438, 4.54688, 4.60938, 4.67188, + (6,75): 4.73438, 4.79688, 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, + (6,82): 5.17188, 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, + (6,89): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, 5.98438, + (6,96): 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, 6.35938, 6.42188, + (6,103): 6.48438, 6.54688, 6.60938, 6.67188, 6.73438, 6.79688, 6.85938, + (6,110): 6.92188, 6.98438, 7.04688, 7.10938, 7.17188, 7.23438, 7.29688, + (6,117): 7.35938, 7.42188, 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, + (6,124): 7.79688, 7.85938, 7.92188, 7.98438, + (7,0): 121, 0.117188, 0.179688, 0.242188, 0.304688, 0.367188, 0.429688, + (7,7): 0.492188, 0.554688, 0.617188, 0.679688, 0.742188, 0.804688, + (7,13): 0.867188, 0.929688, 0.992188, 1.05469, 1.11719, 1.17969, + (7,19): 1.24219, 1.30469, 1.36719, 1.42969, 1.49219, 1.55469, 1.61719, + (7,26): 1.67969, 1.74219, 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, + (7,33): 2.11719, 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, + (7,40): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, 2.92969, + (7,47): 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, 3.30469, 3.36719, + (7,54): 3.42969, 3.49219, 3.55469, 3.61719, 3.67969, 3.74219, 3.80469, + (7,61): 3.86719, 3.92969, 3.99219, 4.05469, 4.11719, 4.17969, 4.24219, + (7,68): 4.30469, 4.36719, 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, + (7,75): 4.74219, 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, + (7,82): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, 5.55469, + (7,89): 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, 5.92969, 5.99219, + (7,96): 6.05469, 6.11719, 6.17969, 6.24219, 6.30469, 6.36719, 6.42969, + (7,103): 6.49219, 6.55469, 6.61719, 6.67969, 6.74219, 6.80469, 6.86719, + (7,110): 6.92969, 6.99219, 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, + (7,117): 7.36719, 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, + (7,124): 7.80469, 7.86719, 7.92969, 7.99219 + } + ATTRIBUTE "DS128BITS" { + DATATYPE 128-bit little-endian floating-point + DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } + DATA { + (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, + (9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, + (18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, + (26): 1.625, 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, + (35): 2.1875, 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, + (43): 2.6875, 2.75, 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, + (52): 3.25, 3.3125, 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, + (61): 3.8125, 3.875, 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, + (70): 4.375, 4.4375, 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, + (78): 4.875, 4.9375, 5, 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, + (87): 5.4375, 5.5, 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, + (95): 5.9375, 6, 6.0625, 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, + (104): 6.5, 6.5625, 6.625, 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, + (113): 7.0625, 7.125, 7.1875, 7.25, 7.3125, 7.375, 7.4375, 7.5, + (121): 7.5625, 7.625, 7.6875, 7.75, 7.8125, 7.875, 7.9375, 127, + (129): 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, 0.382812, + (135): 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, 0.757812, + (141): 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, 1.13281, + (147): 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, + (153): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, + (159): 1.94531, 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, + (165): 2.32031, 2.38281, 2.44531, 2.50781, 2.57031, 2.63281, + (171): 2.69531, 2.75781, 2.82031, 2.88281, 2.94531, 3.00781, + (177): 3.07031, 3.13281, 3.19531, 3.25781, 3.32031, 3.38281, + (183): 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, 3.75781, + (189): 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, + (195): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, + (201): 4.57031, 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, + (207): 4.94531, 5.00781, 5.07031, 5.13281, 5.19531, 5.25781, + (213): 5.32031, 5.38281, 5.44531, 5.50781, 5.57031, 5.63281, + (219): 5.69531, 5.75781, 5.82031, 5.88281, 5.94531, 6.00781, + (225): 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, 6.38281, + (231): 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, + (237): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, + (243): 7.19531, 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, + (249): 7.57031, 7.63281, 7.69531, 7.75781, 7.82031, 7.88281, + (255): 7.94531, 126, 0.078125, 0.140625, 0.203125, 0.265625, + (261): 0.328125, 0.390625, 0.453125, 0.515625, 0.578125, 0.640625, + (267): 0.703125, 0.765625, 0.828125, 0.890625, 0.953125, 1.01562, + (273): 1.07812, 1.14062, 1.20312, 1.26562, 1.32812, 1.39062, + (279): 1.45312, 1.51562, 1.57812, 1.64062, 1.70312, 1.76562, + (285): 1.82812, 1.89062, 1.95312, 2.01562, 2.07812, 2.14062, + (291): 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, 2.51562, + (297): 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, + (303): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, + (309): 3.32812, 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, + (315): 3.70312, 3.76562, 3.82812, 3.89062, 3.95312, 4.01562, + (321): 4.07812, 4.14062, 4.20312, 4.26562, 4.32812, 4.39062, + (327): 4.45312, 4.51562, 4.57812, 4.64062, 4.70312, 4.76562, + (333): 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, 5.14062, + (339): 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, + (345): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, + (351): 5.95312, 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, + (357): 6.32812, 6.39062, 6.45312, 6.51562, 6.57812, 6.64062, + (363): 6.70312, 6.76562, 6.82812, 6.89062, 6.95312, 7.01562, + (369): 7.07812, 7.14062, 7.20312, 7.26562, 7.32812, 7.39062, + (375): 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, 7.76562, + (381): 7.82812, 7.89062, 7.95312, 125, 0.0859375, 0.148438, + (387): 0.210938, 0.273438, 0.335938, 0.398438, 0.460938, 0.523438, + (393): 0.585938, 0.648438, 0.710938, 0.773438, 0.835938, 0.898438, + (399): 0.960938, 1.02344, 1.08594, 1.14844, 1.21094, 1.27344, + (405): 1.33594, 1.39844, 1.46094, 1.52344, 1.58594, 1.64844, + (411): 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, 2.02344, + (417): 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, + (423): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, + (429): 2.83594, 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, + (435): 3.21094, 3.27344, 3.33594, 3.39844, 3.46094, 3.52344, + (441): 3.58594, 3.64844, 3.71094, 3.77344, 3.83594, 3.89844, + (447): 3.96094, 4.02344, 4.08594, 4.14844, 4.21094, 4.27344, + (453): 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, 4.64844, + (459): 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, + (465): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, + (471): 5.46094, 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, + (477): 5.83594, 5.89844, 5.96094, 6.02344, 6.08594, 6.14844, + (483): 6.21094, 6.27344, 6.33594, 6.39844, 6.46094, 6.52344, + (489): 6.58594, 6.64844, 6.71094, 6.77344, 6.83594, 6.89844, + (495): 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, 7.27344, + (501): 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, + (507): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, 124, 0.09375, + (514): 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, 0.46875, + (520): 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, + (526): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, + (532): 1.28125, 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, + (538): 1.65625, 1.71875, 1.78125, 1.84375, 1.90625, 1.96875, + (544): 2.03125, 2.09375, 2.15625, 2.21875, 2.28125, 2.34375, + (550): 2.40625, 2.46875, 2.53125, 2.59375, 2.65625, 2.71875, + (556): 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, 3.09375, + (562): 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, + (568): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, + (574): 3.90625, 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, + (580): 4.28125, 4.34375, 4.40625, 4.46875, 4.53125, 4.59375, + (586): 4.65625, 4.71875, 4.78125, 4.84375, 4.90625, 4.96875, + (592): 5.03125, 5.09375, 5.15625, 5.21875, 5.28125, 5.34375, + (598): 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, 5.71875, + (604): 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, + (610): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, + (616): 6.53125, 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, + (622): 6.90625, 6.96875, 7.03125, 7.09375, 7.15625, 7.21875, + (628): 7.28125, 7.34375, 7.40625, 7.46875, 7.53125, 7.59375, + (634): 7.65625, 7.71875, 7.78125, 7.84375, 7.90625, 7.96875, 123, + (641): 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, + (647): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, + (653): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, + (659): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, + (665): 1.60156, 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, + (671): 1.97656, 2.03906, 2.10156, 2.16406, 2.22656, 2.28906, + (677): 2.35156, 2.41406, 2.47656, 2.53906, 2.60156, 2.66406, + (683): 2.72656, 2.78906, 2.85156, 2.91406, 2.97656, 3.03906, + (689): 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, 3.41406, + (695): 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, + (701): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, + (707): 4.22656, 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, + (713): 4.60156, 4.66406, 4.72656, 4.78906, 4.85156, 4.91406, + (719): 4.97656, 5.03906, 5.10156, 5.16406, 5.22656, 5.28906, + (725): 5.35156, 5.41406, 5.47656, 5.53906, 5.60156, 5.66406, + (731): 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, 6.03906, + (737): 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, + (743): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, + (749): 6.85156, 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, + (755): 7.22656, 7.28906, 7.35156, 7.41406, 7.47656, 7.53906, + (761): 7.60156, 7.66406, 7.72656, 7.78906, 7.85156, 7.91406, + (767): 7.97656, 122, 0.109375, 0.171875, 0.234375, 0.296875, + (773): 0.359375, 0.421875, 0.484375, 0.546875, 0.609375, 0.671875, + (779): 0.734375, 0.796875, 0.859375, 0.921875, 0.984375, 1.04688, + (785): 1.10938, 1.17188, 1.23438, 1.29688, 1.35938, 1.42188, + (791): 1.48438, 1.54688, 1.60938, 1.67188, 1.73438, 1.79688, + (797): 1.85938, 1.92188, 1.98438, 2.04688, 2.10938, 2.17188, + (803): 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, 2.54688, + (809): 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, + (815): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, + (821): 3.35938, 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, + (827): 3.73438, 3.79688, 3.85938, 3.92188, 3.98438, 4.04688, + (833): 4.10938, 4.17188, 4.23438, 4.29688, 4.35938, 4.42188, + (839): 4.48438, 4.54688, 4.60938, 4.67188, 4.73438, 4.79688, + (845): 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, 5.17188, + (851): 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, + (857): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, + (863): 5.98438, 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, + (869): 6.35938, 6.42188, 6.48438, 6.54688, 6.60938, 6.67188, + (875): 6.73438, 6.79688, 6.85938, 6.92188, 6.98438, 7.04688, + (881): 7.10938, 7.17188, 7.23438, 7.29688, 7.35938, 7.42188, + (887): 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, 7.79688, + (893): 7.85938, 7.92188, 7.98438, 121, 0.117188, 0.179688, 0.242188, + (900): 0.304688, 0.367188, 0.429688, 0.492188, 0.554688, 0.617188, + (906): 0.679688, 0.742188, 0.804688, 0.867188, 0.929688, 0.992188, + (912): 1.05469, 1.11719, 1.17969, 1.24219, 1.30469, 1.36719, + (918): 1.42969, 1.49219, 1.55469, 1.61719, 1.67969, 1.74219, + (924): 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, 2.11719, + (930): 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, + (936): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, + (942): 2.92969, 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, + (948): 3.30469, 3.36719, 3.42969, 3.49219, 3.55469, 3.61719, + (954): 3.67969, 3.74219, 3.80469, 3.86719, 3.92969, 3.99219, + (960): 4.05469, 4.11719, 4.17969, 4.24219, 4.30469, 4.36719, + (966): 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, 4.74219, + (972): 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, + (978): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, + (984): 5.55469, 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, + (990): 5.92969, 5.99219, 6.05469, 6.11719, 6.17969, 6.24219, + (996): 6.30469, 6.36719, 6.42969, 6.49219, 6.55469, 6.61719, + (1002): 6.67969, 6.74219, 6.80469, 6.86719, 6.92969, 6.99219, + (1008): 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, 7.36719, + (1014): 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, + (1020): 7.80469, 7.86719, 7.92969, 7.99219 + } + } + } + DATASET "DS32BITS" { + DATATYPE H5T_IEEE_F32LE + DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 1024 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, + (0,13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, + (0,25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, + (1,0): 31, 0.28125, 0.53125, 0.78125, 1.03125, 1.28125, 1.53125, + (1,7): 1.78125, 2.03125, 2.28125, 2.53125, 2.78125, 3.03125, 3.28125, + (1,14): 3.53125, 3.78125, 4.03125, 4.28125, 4.53125, 4.78125, 5.03125, + (1,21): 5.28125, 5.53125, 5.78125, 6.03125, 6.28125, 6.53125, 6.78125, + (1,28): 7.03125, 7.28125, 7.53125, 7.78125, + (2,0): 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, 1.8125, + (2,8): 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, 3.5625, 3.8125, + (2,16): 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, 5.3125, 5.5625, 5.8125, + (2,24): 6.0625, 6.3125, 6.5625, 6.8125, 7.0625, 7.3125, 7.5625, 7.8125, + (3,0): 29, 0.34375, 0.59375, 0.84375, 1.09375, 1.34375, 1.59375, + (3,7): 1.84375, 2.09375, 2.34375, 2.59375, 2.84375, 3.09375, 3.34375, + (3,14): 3.59375, 3.84375, 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, + (3,21): 5.34375, 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, + (3,28): 7.09375, 7.34375, 7.59375, 7.84375, + (4,0): 28, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125, + (4,9): 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, + (4,18): 4.625, 4.875, 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, + (4,27): 6.875, 7.125, 7.375, 7.625, 7.875, + (5,0): 27, 0.40625, 0.65625, 0.90625, 1.15625, 1.40625, 1.65625, + (5,7): 1.90625, 2.15625, 2.40625, 2.65625, 2.90625, 3.15625, 3.40625, + (5,14): 3.65625, 3.90625, 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, + (5,21): 5.40625, 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, + (5,28): 7.15625, 7.40625, 7.65625, 7.90625, + (6,0): 26, 0.4375, 0.6875, 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, + (6,8): 2.1875, 2.4375, 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, + (6,16): 4.1875, 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, + (6,24): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, 7.9375, + (7,0): 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, 1.71875, + (7,7): 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, 3.21875, 3.46875, + (7,14): 3.71875, 3.96875, 4.21875, 4.46875, 4.71875, 4.96875, 5.21875, + (7,21): 5.46875, 5.71875, 5.96875, 6.21875, 6.46875, 6.71875, 6.96875, + (7,28): 7.21875, 7.46875, 7.71875, 7.96875 + } + ATTRIBUTE "DS32BITS" { + DATATYPE H5T_IEEE_F32LE + DATASPACE SIMPLE { ( 256 ) / ( 256 ) } + DATA { + (0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, + (13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, + (25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, 31, 0.28125, 0.53125, + (35): 0.78125, 1.03125, 1.28125, 1.53125, 1.78125, 2.03125, 2.28125, + (42): 2.53125, 2.78125, 3.03125, 3.28125, 3.53125, 3.78125, 4.03125, + (49): 4.28125, 4.53125, 4.78125, 5.03125, 5.28125, 5.53125, 5.78125, + (56): 6.03125, 6.28125, 6.53125, 6.78125, 7.03125, 7.28125, 7.53125, + (63): 7.78125, 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, + (71): 1.8125, 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, + (78): 3.5625, 3.8125, 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, + (85): 5.3125, 5.5625, 5.8125, 6.0625, 6.3125, 6.5625, 6.8125, + (92): 7.0625, 7.3125, 7.5625, 7.8125, 29, 0.34375, 0.59375, 0.84375, + (100): 1.09375, 1.34375, 1.59375, 1.84375, 2.09375, 2.34375, + (106): 2.59375, 2.84375, 3.09375, 3.34375, 3.59375, 3.84375, + (112): 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, 5.34375, + (118): 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, + (124): 7.09375, 7.34375, 7.59375, 7.84375, 28, 0.375, 0.625, 0.875, + (132): 1.125, 1.375, 1.625, 1.875, 2.125, 2.375, 2.625, 2.875, + (140): 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, 4.625, 4.875, + (148): 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, 6.875, + (156): 7.125, 7.375, 7.625, 7.875, 27, 0.40625, 0.65625, 0.90625, + (164): 1.15625, 1.40625, 1.65625, 1.90625, 2.15625, 2.40625, + (170): 2.65625, 2.90625, 3.15625, 3.40625, 3.65625, 3.90625, + (176): 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, 5.40625, + (182): 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, + (188): 7.15625, 7.40625, 7.65625, 7.90625, 26, 0.4375, 0.6875, + (195): 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, 2.1875, 2.4375, + (202): 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, 4.1875, + (209): 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, + (216): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, + (223): 7.9375, 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, + (230): 1.71875, 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, + (236): 3.21875, 3.46875, 3.71875, 3.96875, 4.21875, 4.46875, + (242): 4.71875, 4.96875, 5.21875, 5.46875, 5.71875, 5.96875, + (248): 6.21875, 6.46875, 6.71875, 6.96875, 7.21875, 7.46875, + (254): 7.71875, 7.96875 + } + } + } + DATASET "DS64BITS" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 4096 + OFFSET 6144 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0,0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, 1.25, + (0,11): 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, 2.5, + (0,21): 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, 3.75, + (0,31): 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, 5, + (0,41): 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, 6.25, + (0,51): 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, 7.5, + (0,61): 7.625, 7.75, 7.875, + (1,0): 63, 0.140625, 0.265625, 0.390625, 0.515625, 0.640625, 0.765625, + (1,7): 0.890625, 1.01562, 1.14062, 1.26562, 1.39062, 1.51562, 1.64062, + (1,14): 1.76562, 1.89062, 2.01562, 2.14062, 2.26562, 2.39062, 2.51562, + (1,21): 2.64062, 2.76562, 2.89062, 3.01562, 3.14062, 3.26562, 3.39062, + (1,28): 3.51562, 3.64062, 3.76562, 3.89062, 4.01562, 4.14062, 4.26562, + (1,35): 4.39062, 4.51562, 4.64062, 4.76562, 4.89062, 5.01562, 5.14062, + (1,42): 5.26562, 5.39062, 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, + (1,49): 6.14062, 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, + (1,56): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, 7.76562, + (1,63): 7.89062, + (2,0): 62, 0.15625, 0.28125, 0.40625, 0.53125, 0.65625, 0.78125, + (2,7): 0.90625, 1.03125, 1.15625, 1.28125, 1.40625, 1.53125, 1.65625, + (2,14): 1.78125, 1.90625, 2.03125, 2.15625, 2.28125, 2.40625, 2.53125, + (2,21): 2.65625, 2.78125, 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, + (2,28): 3.53125, 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, + (2,35): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, 5.15625, + (2,42): 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, 5.90625, 6.03125, + (2,49): 6.15625, 6.28125, 6.40625, 6.53125, 6.65625, 6.78125, 6.90625, + (2,56): 7.03125, 7.15625, 7.28125, 7.40625, 7.53125, 7.65625, 7.78125, + (2,63): 7.90625, + (3,0): 61, 0.171875, 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, + (3,7): 0.921875, 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, + (3,14): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, 2.54688, + (3,21): 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, 3.29688, 3.42188, + (3,28): 3.54688, 3.67188, 3.79688, 3.92188, 4.04688, 4.17188, 4.29688, + (3,35): 4.42188, 4.54688, 4.67188, 4.79688, 4.92188, 5.04688, 5.17188, + (3,42): 5.29688, 5.42188, 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, + (3,49): 6.17188, 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, + (3,56): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, 7.79688, + (3,63): 7.92188, + (4,0): 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, 0.8125, 0.9375, + (4,8): 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, 1.6875, 1.8125, 1.9375, + (4,16): 2.0625, 2.1875, 2.3125, 2.4375, 2.5625, 2.6875, 2.8125, 2.9375, + (4,24): 3.0625, 3.1875, 3.3125, 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, + (4,32): 4.0625, 4.1875, 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, + (4,40): 5.0625, 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, + (4,48): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, 6.9375, + (4,56): 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, 7.8125, 7.9375, + (5,0): 59, 0.203125, 0.328125, 0.453125, 0.578125, 0.703125, 0.828125, + (5,7): 0.953125, 1.07812, 1.20312, 1.32812, 1.45312, 1.57812, 1.70312, + (5,14): 1.82812, 1.95312, 2.07812, 2.20312, 2.32812, 2.45312, 2.57812, + (5,21): 2.70312, 2.82812, 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, + (5,28): 3.57812, 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, + (5,35): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, 5.20312, + (5,42): 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, 5.95312, 6.07812, + (5,49): 6.20312, 6.32812, 6.45312, 6.57812, 6.70312, 6.82812, 6.95312, + (5,56): 7.07812, 7.20312, 7.32812, 7.45312, 7.57812, 7.70312, 7.82812, + (5,63): 7.95312, + (6,0): 58, 0.21875, 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, + (6,7): 0.96875, 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, + (6,14): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, 2.59375, + (6,21): 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, 3.34375, 3.46875, + (6,28): 3.59375, 3.71875, 3.84375, 3.96875, 4.09375, 4.21875, 4.34375, + (6,35): 4.46875, 4.59375, 4.71875, 4.84375, 4.96875, 5.09375, 5.21875, + (6,42): 5.34375, 5.46875, 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, + (6,49): 6.21875, 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, + (6,56): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, 7.84375, + (6,63): 7.96875, + (7,0): 57, 0.234375, 0.359375, 0.484375, 0.609375, 0.734375, 0.859375, + (7,7): 0.984375, 1.10938, 1.23438, 1.35938, 1.48438, 1.60938, 1.73438, + (7,14): 1.85938, 1.98438, 2.10938, 2.23438, 2.35938, 2.48438, 2.60938, + (7,21): 2.73438, 2.85938, 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, + (7,28): 3.60938, 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, + (7,35): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, 5.23438, + (7,42): 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, 5.98438, 6.10938, + (7,49): 6.23438, 6.35938, 6.48438, 6.60938, 6.73438, 6.85938, 6.98438, + (7,56): 7.10938, 7.23438, 7.35938, 7.48438, 7.60938, 7.73438, 7.85938, + (7,63): 7.98438 + } + ATTRIBUTE "DS64BITS" { + DATATYPE H5T_IEEE_F64LE + DATASPACE SIMPLE { ( 512 ) / ( 512 ) } + DATA { + (0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, + (10): 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, + (20): 2.5, 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, + (30): 3.75, 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, + (40): 5, 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, + (50): 6.25, 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, + (60): 7.5, 7.625, 7.75, 7.875, 63, 0.140625, 0.265625, 0.390625, + (68): 0.515625, 0.640625, 0.765625, 0.890625, 1.01562, 1.14062, + (74): 1.26562, 1.39062, 1.51562, 1.64062, 1.76562, 1.89062, 2.01562, + (81): 2.14062, 2.26562, 2.39062, 2.51562, 2.64062, 2.76562, 2.89062, + (88): 3.01562, 3.14062, 3.26562, 3.39062, 3.51562, 3.64062, 3.76562, + (95): 3.89062, 4.01562, 4.14062, 4.26562, 4.39062, 4.51562, 4.64062, + (102): 4.76562, 4.89062, 5.01562, 5.14062, 5.26562, 5.39062, + (108): 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, 6.14062, + (114): 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, + (120): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, + (126): 7.76562, 7.89062, 62, 0.15625, 0.28125, 0.40625, 0.53125, + (133): 0.65625, 0.78125, 0.90625, 1.03125, 1.15625, 1.28125, + (139): 1.40625, 1.53125, 1.65625, 1.78125, 1.90625, 2.03125, + (145): 2.15625, 2.28125, 2.40625, 2.53125, 2.65625, 2.78125, + (151): 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, 3.53125, + (157): 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, + (163): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, + (169): 5.15625, 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, + (175): 5.90625, 6.03125, 6.15625, 6.28125, 6.40625, 6.53125, + (181): 6.65625, 6.78125, 6.90625, 7.03125, 7.15625, 7.28125, + (187): 7.40625, 7.53125, 7.65625, 7.78125, 7.90625, 61, 0.171875, + (194): 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, 0.921875, + (200): 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, + (206): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, + (212): 2.54688, 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, + (218): 3.29688, 3.42188, 3.54688, 3.67188, 3.79688, 3.92188, + (224): 4.04688, 4.17188, 4.29688, 4.42188, 4.54688, 4.67188, + (230): 4.79688, 4.92188, 5.04688, 5.17188, 5.29688, 5.42188, + (236): 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, 6.17188, + (242): 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, + (248): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, + (254): 7.79688, 7.92188, 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, + (262): 0.8125, 0.9375, 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, + (269): 1.6875, 1.8125, 1.9375, 2.0625, 2.1875, 2.3125, 2.4375, + (276): 2.5625, 2.6875, 2.8125, 2.9375, 3.0625, 3.1875, 3.3125, + (283): 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, 4.0625, 4.1875, + (290): 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, 5.0625, + (297): 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, + (304): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, + (311): 6.9375, 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, + (318): 7.8125, 7.9375, 59, 0.203125, 0.328125, 0.453125, 0.578125, + (325): 0.703125, 0.828125, 0.953125, 1.07812, 1.20312, 1.32812, + (331): 1.45312, 1.57812, 1.70312, 1.82812, 1.95312, 2.07812, + (337): 2.20312, 2.32812, 2.45312, 2.57812, 2.70312, 2.82812, + (343): 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, 3.57812, + (349): 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, + (355): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, + (361): 5.20312, 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, + (367): 5.95312, 6.07812, 6.20312, 6.32812, 6.45312, 6.57812, + (373): 6.70312, 6.82812, 6.95312, 7.07812, 7.20312, 7.32812, + (379): 7.45312, 7.57812, 7.70312, 7.82812, 7.95312, 58, 0.21875, + (386): 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, 0.96875, + (392): 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, + (398): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, + (404): 2.59375, 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, + (410): 3.34375, 3.46875, 3.59375, 3.71875, 3.84375, 3.96875, + (416): 4.09375, 4.21875, 4.34375, 4.46875, 4.59375, 4.71875, + (422): 4.84375, 4.96875, 5.09375, 5.21875, 5.34375, 5.46875, + (428): 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, 6.21875, + (434): 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, + (440): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, + (446): 7.84375, 7.96875, 57, 0.234375, 0.359375, 0.484375, 0.609375, + (453): 0.734375, 0.859375, 0.984375, 1.10938, 1.23438, 1.35938, + (459): 1.48438, 1.60938, 1.73438, 1.85938, 1.98438, 2.10938, + (465): 2.23438, 2.35938, 2.48438, 2.60938, 2.73438, 2.85938, + (471): 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, 3.60938, + (477): 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, + (483): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, + (489): 5.23438, 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, + (495): 5.98438, 6.10938, 6.23438, 6.35938, 6.48438, 6.60938, + (501): 6.73438, 6.85938, 6.98438, 7.10938, 7.23438, 7.35938, + (507): 7.48438, 7.60938, 7.73438, 7.85938, 7.98438 + } + } + } +} +} diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl index 4793b4d1344..c032ef31a21 100644 --- a/tools/testfiles/tldouble.ddl +++ b/tools/testfiles/tldouble.ddl @@ -1,7 +1,7 @@ HDF5 "tldouble.h5" { GROUP "/" { DATASET "dset" { - DATATYPE 128-bit little-endian floating-point + DATATYPE H5T_NATIVE_LDOUBLE DATASPACE SIMPLE { ( 3 ) / ( 3 ) } DATA { (0): 1, 2, 3 diff --git a/tools/testfiles/tldouble.xddl b/tools/testfiles/tldouble.xddl new file mode 100644 index 00000000000..4793b4d1344 --- /dev/null +++ b/tools/testfiles/tldouble.xddl @@ -0,0 +1,11 @@ +HDF5 "tldouble.h5" { +GROUP "/" { + DATASET "dset" { + DATATYPE 128-bit little-endian floating-point + DATASPACE SIMPLE { ( 3 ) / ( 3 ) } + DATA { + (0): 1, 2, 3 + } + } +} +} diff --git a/tools/testfiles/tldouble_scalar.ddl b/tools/testfiles/tldouble_scalar.ddl index 0c17c314912..45f0b45ca72 100755 --- a/tools/testfiles/tldouble_scalar.ddl +++ b/tools/testfiles/tldouble_scalar.ddl @@ -1,7 +1,7 @@ HDF5 "tldouble_scalar.h5" { GROUP "/" { DATASET "dset" { - DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point } + DATATYPE H5T_ARRAY { [6] H5T_NATIVE_LDOUBLE } DATASPACE SCALAR STORAGE_LAYOUT { CONTIGUOUS diff --git a/tools/testfiles/tldouble_scalar.xddl b/tools/testfiles/tldouble_scalar.xddl new file mode 100644 index 00000000000..0c17c314912 --- /dev/null +++ b/tools/testfiles/tldouble_scalar.xddl @@ -0,0 +1,26 @@ +HDF5 "tldouble_scalar.h5" { +GROUP "/" { + DATASET "dset" { + DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point } + DATASPACE SCALAR + STORAGE_LAYOUT { + CONTIGUOUS + SIZE 96 + OFFSET 2048 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE H5D_FILL_VALUE_DEFAULT + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_LATE + } + DATA { + (0): [ 0, 1, 2, 3, 4, 5 ] + } + } +} +} From ddd18c4a62796164b04fe78ddfce5c503689cc61 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 5 Apr 2021 13:11:34 -0500 Subject: [PATCH 37/66] HDFFV-11229 correct test script --- tools/test/h5dump/CMakeTests.cmake | 50 ++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 3db63ef49f3..f98520d2a11 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -100,7 +100,9 @@ ${HDF5_TOOLS_DIR}/testfiles/tfamily.ddl ${HDF5_TOOLS_DIR}/testfiles/tfill.ddl ${HDF5_TOOLS_DIR}/testfiles/tfletcher32.ddl - #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #special for windows + #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #native + ${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.xddl #general + #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl #special for windows ${HDF5_TOOLS_DIR}/testfiles/tfpformat.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-2.ddl @@ -127,8 +129,10 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl - ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl - ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl + ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl #native + ${HDF5_TOOLS_DIR}/testfiles/tldouble.xddl #general + ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl #native + ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.xddl #general ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl @@ -476,6 +480,40 @@ endif () endmacro () + macro (ADD_H5_TEST_CHECK resultfile resultcode) + # If using memchecker add tests without using scripts + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN}) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + if (${resultcode}) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") + endif () + if (last_test) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) + endif () + else () + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.bin + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + add_test ( + NAME H5DUMP-${resultfile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${resultfile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${resultfile}.ddl" + -D "TEST_REFERENCE2=${resultfile}.xddl" + -P "${HDF_RESOURCES_DIR}/run2Test.cmake" + ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + endif () + endmacro () + macro (ADD_H5_TEST_N resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) @@ -1066,9 +1104,9 @@ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) # test for long double (some systems do not have long double) - ADD_H5_TEST (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5) - ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) - ADD_H5_TEST (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5) + ADD_H5_TEST_CHECK (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5) + ADD_H5_TEST_CHECK (tldouble 0 --enable-error-stack tldouble.h5) + ADD_H5_TEST_CHECK (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5) # test for vms ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) From 64b41ebb0faae7763291893af0c98acb699765c1 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 5 Apr 2021 13:58:25 -0500 Subject: [PATCH 38/66] HDFFV-11229 update autotools test script for two ref files --- tools/test/h5dump/testh5dump.sh.in | 69 ++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 82b379c55d1..0cbdfe44624 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -264,6 +264,7 @@ $SRC_H5DUMP_TESTFILES/tfamily.ddl $SRC_H5DUMP_TESTFILES/tfill.ddl $SRC_H5DUMP_TESTFILES/tfletcher32.ddl $SRC_H5DUMP_TESTFILES/tfloatsattrs.ddl +$SRC_H5DUMP_TESTFILES/tfloatsattrs.xddl $SRC_H5DUMP_TESTFILES/tfpformat.ddl $SRC_H5DUMP_TESTFILES/tgroup-1.ddl $SRC_H5DUMP_TESTFILES/tgroup-2.ddl @@ -290,7 +291,9 @@ $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl $SRC_H5DUMP_TESTFILES/tintsattrs.ddl $SRC_H5DUMP_TESTFILES/tlarge_objname.ddl $SRC_H5DUMP_TESTFILES/tldouble.ddl +$SRC_H5DUMP_TESTFILES/tldouble.xddl $SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl +$SRC_H5DUMP_TESTFILES/tldouble_scalar.xddl $SRC_H5DUMP_TESTFILES/tlonglinks.ddl $SRC_H5DUMP_TESTFILES/tloop-1.ddl $SRC_H5DUMP_TESTFILES/tmulti.ddl @@ -867,6 +870,66 @@ TOOLTEST5() { fi } +# same as TOOLTEST but compares output ddl to an alternate +# +TOOLTEST6() { + # check if caseless compare and diff requested + if [ "$1" = ignorecase ]; then + caseless="-i" + # replace cmp with diff which runs much longer. + xCMP="$DIFF -i" + shift + else + caseless="" + # stick with faster cmp if ignorecase is not requested. + xCMP="$CMP" + fi + + expect="$TESTDIR/$1" + expect2="$TESTDIR/`basename $1 .ddl`.xddl" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + 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 + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + echo " Expected result (*.ddl) missing" + nerrors="`expr $nerrors + 1`" + elif $xCMP $expect $actual > /dev/null 2>&1 ; then + echo " PASSED" + elif $xCMP $expect2 $actual > /dev/null 2>&1 ; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.[x]ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $caseless $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 $actual_ext + fi + +} + # same as TOOLTEST1 but expects h5dump to fail # TOOLTEST_FAIL() { @@ -1379,9 +1442,9 @@ TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5 TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5 # test for long double (some systems do not have long double) -TOOLTEST tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 -TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5 -TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 +TOOLTEST6 tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 +TOOLTEST6 tldouble.ddl --enable-error-stack tldouble.h5 +TOOLTEST6 tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 # test for vms TOOLTEST tvms.ddl --enable-error-stack tvms.h5 From 93689e030e6296d0ac8e1328df16723e5193f873 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 7 Apr 2021 12:37:55 -0500 Subject: [PATCH 39/66] HDFFV-11229 merge dev changes for long double display in tools --- MANIFEST | 3 - release_docs/RELEASE.txt | 6 +- tools/lib/h5tools_dump.c | 14 +- tools/src/h5ls/h5ls.c | 5 +- tools/test/h5dump/CMakeTests.cmake | 47 +- tools/test/h5dump/testh5dump.sh.in | 69 +-- tools/testfiles/tfloatsattrs.ddl | 4 +- tools/testfiles/tfloatsattrs.wddl | 4 +- tools/testfiles/tfloatsattrs.xddl | 621 --------------------------- tools/testfiles/tldouble.ddl | 2 +- tools/testfiles/tldouble.xddl | 11 - tools/testfiles/tldouble_scalar.ddl | 2 +- tools/testfiles/tldouble_scalar.xddl | 26 -- tools/testfiles/tnbit.ddl | 2 +- tools/testfiles/treadintfilter.ddl | 2 +- 15 files changed, 27 insertions(+), 791 deletions(-) delete mode 100644 tools/testfiles/tfloatsattrs.xddl delete mode 100644 tools/testfiles/tldouble.xddl delete mode 100644 tools/testfiles/tldouble_scalar.xddl diff --git a/MANIFEST b/MANIFEST index 326608d22bf..5c28165fe03 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1912,7 +1912,6 @@ ./tools/testfiles/tfletcher32.ddl ./tools/testfiles/tfloatsattrs.ddl ./tools/testfiles/tfloatsattrs.h5 -./tools/testfiles/tfloatsattrs.xddl ./tools/testfiles/tfloatsattrs.wddl ./tools/testfiles/tfvalues.h5 ./tools/testfiles/tgroup-1.ddl @@ -1953,10 +1952,8 @@ ./tools/testfiles/tlarge_objname.h5 ./tools/testfiles/tldouble.ddl ./tools/testfiles/tldouble.h5 -./tools/testfiles/tldouble.xddl ./tools/testfiles/tldouble_scalar.ddl ./tools/testfiles/tldouble_scalar.h5 -./tools/testfiles/tldouble_scalar.xddl ./tools/testfiles/tlonglinks.ddl ./tools/testfiles/tlonglinks.h5 ./tools/testfiles/tloop-1.ddl diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 972c2a24177..002fc2352e5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -405,8 +405,10 @@ Bug Fixes since HDF5-1.10.7 release - Changed how h5dump and h5ls identify long double. Long double support is not consistent across platforms. Tools will always - identify long double as 128-bit [little/big]-endian float. New test file - created for datasets with attributes for float, double and long double. + identify long double as 128-bit [little/big]-endian float nn-bit precision. + New test file created for datasets with attributes for float, double and + long double. In addition any unknown integer or float datatype will now + also show the number of bits for precision. These files are also used in the java tests. (ADB - 2021/03/24, HDFFV-11229) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 65895a018d1..3dd71581919 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2192,9 +2192,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ else sign_s = " unknown-sign"; - /* print size, order, and sign */ - h5tools_str_append(buffer, "%lu-bit%s%s integer", (unsigned long)(8 * H5Tget_size(type)), - order_s, sign_s); + /* print size, order, sign, and precision */ + h5tools_str_append(buffer, "%lu-bit%s%s integer %lu-bit precision", (unsigned long)(8 * H5Tget_size(type)), + order_s, sign_s, H5Tget_precision(type)); } break; @@ -2215,8 +2215,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_append(buffer, "H5T_NATIVE_FLOAT"); else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE"); - else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) - h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE"); else { /* print what the library knows */ /* byte order */ @@ -2234,9 +2232,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ else order_s = ""; - /* print size and byte order */ - h5tools_str_append(buffer, "%lu-bit%s floating-point", (unsigned long)(8 * H5Tget_size(type)), - order_s); + /* print size. byte order, and precision */ + h5tools_str_append(buffer, "%lu-bit%s floating-point %lu-bit precision", (unsigned long)(8 * H5Tget_size(type)), + order_s, H5Tget_precision(type)); } break; diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 1343aaf4ccd..575dc65c9fe 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -426,9 +426,6 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind) else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) { h5tools_str_append(buffer, "native double"); } - else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) { - h5tools_str_append(buffer, "native long double"); - } else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) { h5tools_str_append(buffer, "native int8_t"); } @@ -961,7 +958,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind) /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size" *strangely, unless use another pointer "copy".*/ copy = value + i * dst_size; - h5tools_str_append(buffer, "%" H5_PRINTF_LL_WIDTH "d", *((long long *)((void *)copy))); + h5tools_str_append(buffer, "%lld", *((long long *)((void *)copy))); } } diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index f98520d2a11..53355e0d54f 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -101,7 +101,6 @@ ${HDF5_TOOLS_DIR}/testfiles/tfill.ddl ${HDF5_TOOLS_DIR}/testfiles/tfletcher32.ddl #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.ddl #native - ${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.xddl #general #${HDF5_TOOLS_DIR}/testfiles/tfloatsattrs.wddl #special for windows ${HDF5_TOOLS_DIR}/testfiles/tfpformat.ddl ${HDF5_TOOLS_DIR}/testfiles/tgroup-1.ddl @@ -129,10 +128,8 @@ ${HDF5_TOOLS_DIR}/testfiles/tintsattrs.ddl ${HDF5_TOOLS_DIR}/testfiles/tintsnodata.ddl ${HDF5_TOOLS_DIR}/testfiles/tlarge_objname.ddl - ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl #native - ${HDF5_TOOLS_DIR}/testfiles/tldouble.xddl #general - ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl #native - ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.xddl #general + ${HDF5_TOOLS_DIR}/testfiles/tldouble.ddl + ${HDF5_TOOLS_DIR}/testfiles/tldouble_scalar.ddl ${HDF5_TOOLS_DIR}/testfiles/tlonglinks.ddl ${HDF5_TOOLS_DIR}/testfiles/tloop-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tmulti.ddl @@ -480,40 +477,6 @@ endif () endmacro () - macro (ADD_H5_TEST_CHECK resultfile resultcode) - # If using memchecker add tests without using scripts - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (${resultcode}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - endif () - if (last_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - else () - add_test ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.bin - ) - set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - add_test ( - NAME H5DUMP-${resultfile} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=${ARGN}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" - -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_REFERENCE=${resultfile}.ddl" - -D "TEST_REFERENCE2=${resultfile}.xddl" - -P "${HDF_RESOURCES_DIR}/run2Test.cmake" - ) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") - endif () - endmacro () - macro (ADD_H5_TEST_N resultfile resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) @@ -1104,9 +1067,9 @@ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5) # test for long double (some systems do not have long double) - ADD_H5_TEST_CHECK (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5) - ADD_H5_TEST_CHECK (tldouble 0 --enable-error-stack tldouble.h5) - ADD_H5_TEST_CHECK (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5) + ADD_H5_TEST (tfloatsattrs 0 -p --enable-error-stack tfloatsattrs.h5) + ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5) + ADD_H5_TEST (tldouble_scalar 0 -p --enable-error-stack tldouble_scalar.h5) # test for vms ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index 0cbdfe44624..82b379c55d1 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -264,7 +264,6 @@ $SRC_H5DUMP_TESTFILES/tfamily.ddl $SRC_H5DUMP_TESTFILES/tfill.ddl $SRC_H5DUMP_TESTFILES/tfletcher32.ddl $SRC_H5DUMP_TESTFILES/tfloatsattrs.ddl -$SRC_H5DUMP_TESTFILES/tfloatsattrs.xddl $SRC_H5DUMP_TESTFILES/tfpformat.ddl $SRC_H5DUMP_TESTFILES/tgroup-1.ddl $SRC_H5DUMP_TESTFILES/tgroup-2.ddl @@ -291,9 +290,7 @@ $SRC_H5DUMP_TESTFILES/tints4dimsStride2.ddl $SRC_H5DUMP_TESTFILES/tintsattrs.ddl $SRC_H5DUMP_TESTFILES/tlarge_objname.ddl $SRC_H5DUMP_TESTFILES/tldouble.ddl -$SRC_H5DUMP_TESTFILES/tldouble.xddl $SRC_H5DUMP_TESTFILES/tldouble_scalar.ddl -$SRC_H5DUMP_TESTFILES/tldouble_scalar.xddl $SRC_H5DUMP_TESTFILES/tlonglinks.ddl $SRC_H5DUMP_TESTFILES/tloop-1.ddl $SRC_H5DUMP_TESTFILES/tmulti.ddl @@ -870,66 +867,6 @@ TOOLTEST5() { fi } -# same as TOOLTEST but compares output ddl to an alternate -# -TOOLTEST6() { - # check if caseless compare and diff requested - if [ "$1" = ignorecase ]; then - caseless="-i" - # replace cmp with diff which runs much longer. - xCMP="$DIFF -i" - shift - else - caseless="" - # stick with faster cmp if ignorecase is not requested. - xCMP="$CMP" - fi - - expect="$TESTDIR/$1" - expect2="$TESTDIR/`basename $1 .ddl`.xddl" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" - 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 - - if [ ! -f $expect ]; then - # Create the expect file if it doesn't yet exist. - echo " CREATED" - cp $actual $expect - echo " Expected result (*.ddl) missing" - nerrors="`expr $nerrors + 1`" - elif $xCMP $expect $actual > /dev/null 2>&1 ; then - echo " PASSED" - elif $xCMP $expect2 $actual > /dev/null 2>&1 ; then - echo " PASSED" - else - echo "*FAILED*" - echo " Expected result (*.[x]ddl) differs from actual result (*.out)" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $caseless $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 $actual_ext - fi - -} - # same as TOOLTEST1 but expects h5dump to fail # TOOLTEST_FAIL() { @@ -1442,9 +1379,9 @@ TOOLTEST tgrpnullspace.ddl -p --enable-error-stack tgrpnullspace.h5 TOOLTEST zerodim.ddl --enable-error-stack zerodim.h5 # test for long double (some systems do not have long double) -TOOLTEST6 tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 -TOOLTEST6 tldouble.ddl --enable-error-stack tldouble.h5 -TOOLTEST6 tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 +TOOLTEST tfloatsattrs.ddl -p --enable-error-stack tfloatsattrs.h5 +TOOLTEST tldouble.ddl --enable-error-stack tldouble.h5 +TOOLTEST tldouble_scalar.ddl -p --enable-error-stack tldouble_scalar.h5 # test for vms TOOLTEST tvms.ddl --enable-error-stack tvms.h5 diff --git a/tools/testfiles/tfloatsattrs.ddl b/tools/testfiles/tfloatsattrs.ddl index 68256e0dd1b..11c65b8093f 100644 --- a/tools/testfiles/tfloatsattrs.ddl +++ b/tools/testfiles/tfloatsattrs.ddl @@ -1,7 +1,7 @@ HDF5 "tfloatsattrs.h5" { GROUP "/" { DATASET "DS128BITS" { - DATATYPE H5T_NATIVE_LDOUBLE + DATATYPE 128-bit little-endian floating-point 80-bit precision DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } STORAGE_LAYOUT { CONTIGUOUS @@ -169,7 +169,7 @@ GROUP "/" { (7,124): 7.80469, 7.86719, 7.92969, 7.99219 } ATTRIBUTE "DS128BITS" { - DATATYPE H5T_NATIVE_LDOUBLE + DATATYPE 128-bit little-endian floating-point 80-bit precision DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } DATA { (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, diff --git a/tools/testfiles/tfloatsattrs.wddl b/tools/testfiles/tfloatsattrs.wddl index 556efcd23f1..38b735f7f24 100644 --- a/tools/testfiles/tfloatsattrs.wddl +++ b/tools/testfiles/tfloatsattrs.wddl @@ -1,7 +1,7 @@ HDF5 "tfloatsattrs.h5" { GROUP "/" { DATASET "DS128BITS" { - DATATYPE 128-bit little-endian floating-point + DATATYPE 128-bit little-endian floating-point 80-bit precision DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } STORAGE_LAYOUT { CONTIGUOUS @@ -169,7 +169,7 @@ GROUP "/" { (7,124): 7.80469, 7.86719, 7.92969, 7.99219 } ATTRIBUTE "DS128BITS" { - DATATYPE 128-bit little-endian floating-point + DATATYPE 128-bit little-endian floating-point 80-bit precision DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } DATA { (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, diff --git a/tools/testfiles/tfloatsattrs.xddl b/tools/testfiles/tfloatsattrs.xddl deleted file mode 100644 index 2cc5cfd4f43..00000000000 --- a/tools/testfiles/tfloatsattrs.xddl +++ /dev/null @@ -1,621 +0,0 @@ -HDF5 "tfloatsattrs.h5" { -GROUP "/" { - DATASET "DS128BITS" { - DATATYPE 128-bit little-endian floating-point - DATASPACE SIMPLE { ( 8, 128 ) / ( 8, 128 ) } - STORAGE_LAYOUT { - CONTIGUOUS - SIZE 16384 - OFFSET 14416 - } - FILTERS { - NONE - } - FILLVALUE { - FILL_TIME H5D_FILL_TIME_IFSET - VALUE H5D_FILL_VALUE_DEFAULT - } - ALLOCATION_TIME { - H5D_ALLOC_TIME_LATE - } - DATA { - (0,0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, - (0,9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, - (0,18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, 1.625, - (0,27): 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, 2.1875, - (0,36): 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, 2.6875, 2.75, - (0,45): 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, 3.25, 3.3125, - (0,54): 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, 3.8125, 3.875, - (0,63): 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, 4.375, 4.4375, - (0,72): 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, 4.875, 4.9375, 5, - (0,81): 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, 5.4375, 5.5, - (0,89): 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, 5.9375, 6, 6.0625, - (0,98): 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, 6.5, 6.5625, 6.625, - (0,107): 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, 7.0625, 7.125, 7.1875, - (0,116): 7.25, 7.3125, 7.375, 7.4375, 7.5, 7.5625, 7.625, 7.6875, 7.75, - (0,125): 7.8125, 7.875, 7.9375, - (1,0): 127, 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, - (1,6): 0.382812, 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, - (1,12): 0.757812, 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, - (1,18): 1.13281, 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, - (1,25): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, 1.94531, - (1,32): 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, 2.32031, 2.38281, - (1,39): 2.44531, 2.50781, 2.57031, 2.63281, 2.69531, 2.75781, 2.82031, - (1,46): 2.88281, 2.94531, 3.00781, 3.07031, 3.13281, 3.19531, 3.25781, - (1,53): 3.32031, 3.38281, 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, - (1,60): 3.75781, 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, - (1,67): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, 4.57031, - (1,74): 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, 4.94531, 5.00781, - (1,81): 5.07031, 5.13281, 5.19531, 5.25781, 5.32031, 5.38281, 5.44531, - (1,88): 5.50781, 5.57031, 5.63281, 5.69531, 5.75781, 5.82031, 5.88281, - (1,95): 5.94531, 6.00781, 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, - (1,102): 6.38281, 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, - (1,109): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, 7.19531, - (1,116): 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, 7.57031, 7.63281, - (1,123): 7.69531, 7.75781, 7.82031, 7.88281, 7.94531, - (2,0): 126, 0.078125, 0.140625, 0.203125, 0.265625, 0.328125, 0.390625, - (2,7): 0.453125, 0.515625, 0.578125, 0.640625, 0.703125, 0.765625, - (2,13): 0.828125, 0.890625, 0.953125, 1.01562, 1.07812, 1.14062, - (2,19): 1.20312, 1.26562, 1.32812, 1.39062, 1.45312, 1.51562, 1.57812, - (2,26): 1.64062, 1.70312, 1.76562, 1.82812, 1.89062, 1.95312, 2.01562, - (2,33): 2.07812, 2.14062, 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, - (2,40): 2.51562, 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, - (2,47): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, 3.32812, - (2,54): 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, 3.70312, 3.76562, - (2,61): 3.82812, 3.89062, 3.95312, 4.01562, 4.07812, 4.14062, 4.20312, - (2,68): 4.26562, 4.32812, 4.39062, 4.45312, 4.51562, 4.57812, 4.64062, - (2,75): 4.70312, 4.76562, 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, - (2,82): 5.14062, 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, - (2,89): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, 5.95312, - (2,96): 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, 6.32812, 6.39062, - (2,103): 6.45312, 6.51562, 6.57812, 6.64062, 6.70312, 6.76562, 6.82812, - (2,110): 6.89062, 6.95312, 7.01562, 7.07812, 7.14062, 7.20312, 7.26562, - (2,117): 7.32812, 7.39062, 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, - (2,124): 7.76562, 7.82812, 7.89062, 7.95312, - (3,0): 125, 0.0859375, 0.148438, 0.210938, 0.273438, 0.335938, - (3,6): 0.398438, 0.460938, 0.523438, 0.585938, 0.648438, 0.710938, - (3,12): 0.773438, 0.835938, 0.898438, 0.960938, 1.02344, 1.08594, - (3,18): 1.14844, 1.21094, 1.27344, 1.33594, 1.39844, 1.46094, 1.52344, - (3,25): 1.58594, 1.64844, 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, - (3,32): 2.02344, 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, - (3,39): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, 2.83594, - (3,46): 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, 3.21094, 3.27344, - (3,53): 3.33594, 3.39844, 3.46094, 3.52344, 3.58594, 3.64844, 3.71094, - (3,60): 3.77344, 3.83594, 3.89844, 3.96094, 4.02344, 4.08594, 4.14844, - (3,67): 4.21094, 4.27344, 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, - (3,74): 4.64844, 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, - (3,81): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, 5.46094, - (3,88): 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, 5.83594, 5.89844, - (3,95): 5.96094, 6.02344, 6.08594, 6.14844, 6.21094, 6.27344, 6.33594, - (3,102): 6.39844, 6.46094, 6.52344, 6.58594, 6.64844, 6.71094, 6.77344, - (3,109): 6.83594, 6.89844, 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, - (3,116): 7.27344, 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, - (3,123): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, - (4,0): 124, 0.09375, 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, - (4,7): 0.46875, 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, - (4,14): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, 1.28125, - (4,21): 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, 1.65625, 1.71875, - (4,28): 1.78125, 1.84375, 1.90625, 1.96875, 2.03125, 2.09375, 2.15625, - (4,35): 2.21875, 2.28125, 2.34375, 2.40625, 2.46875, 2.53125, 2.59375, - (4,42): 2.65625, 2.71875, 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, - (4,49): 3.09375, 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, - (4,56): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, 3.90625, - (4,63): 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, 4.28125, 4.34375, - (4,70): 4.40625, 4.46875, 4.53125, 4.59375, 4.65625, 4.71875, 4.78125, - (4,77): 4.84375, 4.90625, 4.96875, 5.03125, 5.09375, 5.15625, 5.21875, - (4,84): 5.28125, 5.34375, 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, - (4,91): 5.71875, 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, - (4,98): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, 6.53125, - (4,105): 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, 6.90625, 6.96875, - (4,112): 7.03125, 7.09375, 7.15625, 7.21875, 7.28125, 7.34375, 7.40625, - (4,119): 7.46875, 7.53125, 7.59375, 7.65625, 7.71875, 7.78125, 7.84375, - (4,126): 7.90625, 7.96875, - (5,0): 123, 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, - (5,7): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, - (5,13): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, - (5,19): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, 1.60156, - (5,26): 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, 1.97656, 2.03906, - (5,33): 2.10156, 2.16406, 2.22656, 2.28906, 2.35156, 2.41406, 2.47656, - (5,40): 2.53906, 2.60156, 2.66406, 2.72656, 2.78906, 2.85156, 2.91406, - (5,47): 2.97656, 3.03906, 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, - (5,54): 3.41406, 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, - (5,61): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, 4.22656, - (5,68): 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, 4.60156, 4.66406, - (5,75): 4.72656, 4.78906, 4.85156, 4.91406, 4.97656, 5.03906, 5.10156, - (5,82): 5.16406, 5.22656, 5.28906, 5.35156, 5.41406, 5.47656, 5.53906, - (5,89): 5.60156, 5.66406, 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, - (5,96): 6.03906, 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, - (5,103): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, 6.85156, - (5,110): 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, 7.22656, 7.28906, - (5,117): 7.35156, 7.41406, 7.47656, 7.53906, 7.60156, 7.66406, 7.72656, - (5,124): 7.78906, 7.85156, 7.91406, 7.97656, - (6,0): 122, 0.109375, 0.171875, 0.234375, 0.296875, 0.359375, 0.421875, - (6,7): 0.484375, 0.546875, 0.609375, 0.671875, 0.734375, 0.796875, - (6,13): 0.859375, 0.921875, 0.984375, 1.04688, 1.10938, 1.17188, - (6,19): 1.23438, 1.29688, 1.35938, 1.42188, 1.48438, 1.54688, 1.60938, - (6,26): 1.67188, 1.73438, 1.79688, 1.85938, 1.92188, 1.98438, 2.04688, - (6,33): 2.10938, 2.17188, 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, - (6,40): 2.54688, 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, - (6,47): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, 3.35938, - (6,54): 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, 3.73438, 3.79688, - (6,61): 3.85938, 3.92188, 3.98438, 4.04688, 4.10938, 4.17188, 4.23438, - (6,68): 4.29688, 4.35938, 4.42188, 4.48438, 4.54688, 4.60938, 4.67188, - (6,75): 4.73438, 4.79688, 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, - (6,82): 5.17188, 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, - (6,89): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, 5.98438, - (6,96): 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, 6.35938, 6.42188, - (6,103): 6.48438, 6.54688, 6.60938, 6.67188, 6.73438, 6.79688, 6.85938, - (6,110): 6.92188, 6.98438, 7.04688, 7.10938, 7.17188, 7.23438, 7.29688, - (6,117): 7.35938, 7.42188, 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, - (6,124): 7.79688, 7.85938, 7.92188, 7.98438, - (7,0): 121, 0.117188, 0.179688, 0.242188, 0.304688, 0.367188, 0.429688, - (7,7): 0.492188, 0.554688, 0.617188, 0.679688, 0.742188, 0.804688, - (7,13): 0.867188, 0.929688, 0.992188, 1.05469, 1.11719, 1.17969, - (7,19): 1.24219, 1.30469, 1.36719, 1.42969, 1.49219, 1.55469, 1.61719, - (7,26): 1.67969, 1.74219, 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, - (7,33): 2.11719, 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, - (7,40): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, 2.92969, - (7,47): 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, 3.30469, 3.36719, - (7,54): 3.42969, 3.49219, 3.55469, 3.61719, 3.67969, 3.74219, 3.80469, - (7,61): 3.86719, 3.92969, 3.99219, 4.05469, 4.11719, 4.17969, 4.24219, - (7,68): 4.30469, 4.36719, 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, - (7,75): 4.74219, 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, - (7,82): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, 5.55469, - (7,89): 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, 5.92969, 5.99219, - (7,96): 6.05469, 6.11719, 6.17969, 6.24219, 6.30469, 6.36719, 6.42969, - (7,103): 6.49219, 6.55469, 6.61719, 6.67969, 6.74219, 6.80469, 6.86719, - (7,110): 6.92969, 6.99219, 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, - (7,117): 7.36719, 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, - (7,124): 7.80469, 7.86719, 7.92969, 7.99219 - } - ATTRIBUTE "DS128BITS" { - DATATYPE 128-bit little-endian floating-point - DATASPACE SIMPLE { ( 1024 ) / ( 1024 ) } - DATA { - (0): 128, 0.0625, 0.125, 0.1875, 0.25, 0.3125, 0.375, 0.4375, 0.5, - (9): 0.5625, 0.625, 0.6875, 0.75, 0.8125, 0.875, 0.9375, 1, 1.0625, - (18): 1.125, 1.1875, 1.25, 1.3125, 1.375, 1.4375, 1.5, 1.5625, - (26): 1.625, 1.6875, 1.75, 1.8125, 1.875, 1.9375, 2, 2.0625, 2.125, - (35): 2.1875, 2.25, 2.3125, 2.375, 2.4375, 2.5, 2.5625, 2.625, - (43): 2.6875, 2.75, 2.8125, 2.875, 2.9375, 3, 3.0625, 3.125, 3.1875, - (52): 3.25, 3.3125, 3.375, 3.4375, 3.5, 3.5625, 3.625, 3.6875, 3.75, - (61): 3.8125, 3.875, 3.9375, 4, 4.0625, 4.125, 4.1875, 4.25, 4.3125, - (70): 4.375, 4.4375, 4.5, 4.5625, 4.625, 4.6875, 4.75, 4.8125, - (78): 4.875, 4.9375, 5, 5.0625, 5.125, 5.1875, 5.25, 5.3125, 5.375, - (87): 5.4375, 5.5, 5.5625, 5.625, 5.6875, 5.75, 5.8125, 5.875, - (95): 5.9375, 6, 6.0625, 6.125, 6.1875, 6.25, 6.3125, 6.375, 6.4375, - (104): 6.5, 6.5625, 6.625, 6.6875, 6.75, 6.8125, 6.875, 6.9375, 7, - (113): 7.0625, 7.125, 7.1875, 7.25, 7.3125, 7.375, 7.4375, 7.5, - (121): 7.5625, 7.625, 7.6875, 7.75, 7.8125, 7.875, 7.9375, 127, - (129): 0.0703125, 0.132812, 0.195312, 0.257812, 0.320312, 0.382812, - (135): 0.445312, 0.507812, 0.570312, 0.632812, 0.695312, 0.757812, - (141): 0.820312, 0.882812, 0.945312, 1.00781, 1.07031, 1.13281, - (147): 1.19531, 1.25781, 1.32031, 1.38281, 1.44531, 1.50781, - (153): 1.57031, 1.63281, 1.69531, 1.75781, 1.82031, 1.88281, - (159): 1.94531, 2.00781, 2.07031, 2.13281, 2.19531, 2.25781, - (165): 2.32031, 2.38281, 2.44531, 2.50781, 2.57031, 2.63281, - (171): 2.69531, 2.75781, 2.82031, 2.88281, 2.94531, 3.00781, - (177): 3.07031, 3.13281, 3.19531, 3.25781, 3.32031, 3.38281, - (183): 3.44531, 3.50781, 3.57031, 3.63281, 3.69531, 3.75781, - (189): 3.82031, 3.88281, 3.94531, 4.00781, 4.07031, 4.13281, - (195): 4.19531, 4.25781, 4.32031, 4.38281, 4.44531, 4.50781, - (201): 4.57031, 4.63281, 4.69531, 4.75781, 4.82031, 4.88281, - (207): 4.94531, 5.00781, 5.07031, 5.13281, 5.19531, 5.25781, - (213): 5.32031, 5.38281, 5.44531, 5.50781, 5.57031, 5.63281, - (219): 5.69531, 5.75781, 5.82031, 5.88281, 5.94531, 6.00781, - (225): 6.07031, 6.13281, 6.19531, 6.25781, 6.32031, 6.38281, - (231): 6.44531, 6.50781, 6.57031, 6.63281, 6.69531, 6.75781, - (237): 6.82031, 6.88281, 6.94531, 7.00781, 7.07031, 7.13281, - (243): 7.19531, 7.25781, 7.32031, 7.38281, 7.44531, 7.50781, - (249): 7.57031, 7.63281, 7.69531, 7.75781, 7.82031, 7.88281, - (255): 7.94531, 126, 0.078125, 0.140625, 0.203125, 0.265625, - (261): 0.328125, 0.390625, 0.453125, 0.515625, 0.578125, 0.640625, - (267): 0.703125, 0.765625, 0.828125, 0.890625, 0.953125, 1.01562, - (273): 1.07812, 1.14062, 1.20312, 1.26562, 1.32812, 1.39062, - (279): 1.45312, 1.51562, 1.57812, 1.64062, 1.70312, 1.76562, - (285): 1.82812, 1.89062, 1.95312, 2.01562, 2.07812, 2.14062, - (291): 2.20312, 2.26562, 2.32812, 2.39062, 2.45312, 2.51562, - (297): 2.57812, 2.64062, 2.70312, 2.76562, 2.82812, 2.89062, - (303): 2.95312, 3.01562, 3.07812, 3.14062, 3.20312, 3.26562, - (309): 3.32812, 3.39062, 3.45312, 3.51562, 3.57812, 3.64062, - (315): 3.70312, 3.76562, 3.82812, 3.89062, 3.95312, 4.01562, - (321): 4.07812, 4.14062, 4.20312, 4.26562, 4.32812, 4.39062, - (327): 4.45312, 4.51562, 4.57812, 4.64062, 4.70312, 4.76562, - (333): 4.82812, 4.89062, 4.95312, 5.01562, 5.07812, 5.14062, - (339): 5.20312, 5.26562, 5.32812, 5.39062, 5.45312, 5.51562, - (345): 5.57812, 5.64062, 5.70312, 5.76562, 5.82812, 5.89062, - (351): 5.95312, 6.01562, 6.07812, 6.14062, 6.20312, 6.26562, - (357): 6.32812, 6.39062, 6.45312, 6.51562, 6.57812, 6.64062, - (363): 6.70312, 6.76562, 6.82812, 6.89062, 6.95312, 7.01562, - (369): 7.07812, 7.14062, 7.20312, 7.26562, 7.32812, 7.39062, - (375): 7.45312, 7.51562, 7.57812, 7.64062, 7.70312, 7.76562, - (381): 7.82812, 7.89062, 7.95312, 125, 0.0859375, 0.148438, - (387): 0.210938, 0.273438, 0.335938, 0.398438, 0.460938, 0.523438, - (393): 0.585938, 0.648438, 0.710938, 0.773438, 0.835938, 0.898438, - (399): 0.960938, 1.02344, 1.08594, 1.14844, 1.21094, 1.27344, - (405): 1.33594, 1.39844, 1.46094, 1.52344, 1.58594, 1.64844, - (411): 1.71094, 1.77344, 1.83594, 1.89844, 1.96094, 2.02344, - (417): 2.08594, 2.14844, 2.21094, 2.27344, 2.33594, 2.39844, - (423): 2.46094, 2.52344, 2.58594, 2.64844, 2.71094, 2.77344, - (429): 2.83594, 2.89844, 2.96094, 3.02344, 3.08594, 3.14844, - (435): 3.21094, 3.27344, 3.33594, 3.39844, 3.46094, 3.52344, - (441): 3.58594, 3.64844, 3.71094, 3.77344, 3.83594, 3.89844, - (447): 3.96094, 4.02344, 4.08594, 4.14844, 4.21094, 4.27344, - (453): 4.33594, 4.39844, 4.46094, 4.52344, 4.58594, 4.64844, - (459): 4.71094, 4.77344, 4.83594, 4.89844, 4.96094, 5.02344, - (465): 5.08594, 5.14844, 5.21094, 5.27344, 5.33594, 5.39844, - (471): 5.46094, 5.52344, 5.58594, 5.64844, 5.71094, 5.77344, - (477): 5.83594, 5.89844, 5.96094, 6.02344, 6.08594, 6.14844, - (483): 6.21094, 6.27344, 6.33594, 6.39844, 6.46094, 6.52344, - (489): 6.58594, 6.64844, 6.71094, 6.77344, 6.83594, 6.89844, - (495): 6.96094, 7.02344, 7.08594, 7.14844, 7.21094, 7.27344, - (501): 7.33594, 7.39844, 7.46094, 7.52344, 7.58594, 7.64844, - (507): 7.71094, 7.77344, 7.83594, 7.89844, 7.96094, 124, 0.09375, - (514): 0.15625, 0.21875, 0.28125, 0.34375, 0.40625, 0.46875, - (520): 0.53125, 0.59375, 0.65625, 0.71875, 0.78125, 0.84375, - (526): 0.90625, 0.96875, 1.03125, 1.09375, 1.15625, 1.21875, - (532): 1.28125, 1.34375, 1.40625, 1.46875, 1.53125, 1.59375, - (538): 1.65625, 1.71875, 1.78125, 1.84375, 1.90625, 1.96875, - (544): 2.03125, 2.09375, 2.15625, 2.21875, 2.28125, 2.34375, - (550): 2.40625, 2.46875, 2.53125, 2.59375, 2.65625, 2.71875, - (556): 2.78125, 2.84375, 2.90625, 2.96875, 3.03125, 3.09375, - (562): 3.15625, 3.21875, 3.28125, 3.34375, 3.40625, 3.46875, - (568): 3.53125, 3.59375, 3.65625, 3.71875, 3.78125, 3.84375, - (574): 3.90625, 3.96875, 4.03125, 4.09375, 4.15625, 4.21875, - (580): 4.28125, 4.34375, 4.40625, 4.46875, 4.53125, 4.59375, - (586): 4.65625, 4.71875, 4.78125, 4.84375, 4.90625, 4.96875, - (592): 5.03125, 5.09375, 5.15625, 5.21875, 5.28125, 5.34375, - (598): 5.40625, 5.46875, 5.53125, 5.59375, 5.65625, 5.71875, - (604): 5.78125, 5.84375, 5.90625, 5.96875, 6.03125, 6.09375, - (610): 6.15625, 6.21875, 6.28125, 6.34375, 6.40625, 6.46875, - (616): 6.53125, 6.59375, 6.65625, 6.71875, 6.78125, 6.84375, - (622): 6.90625, 6.96875, 7.03125, 7.09375, 7.15625, 7.21875, - (628): 7.28125, 7.34375, 7.40625, 7.46875, 7.53125, 7.59375, - (634): 7.65625, 7.71875, 7.78125, 7.84375, 7.90625, 7.96875, 123, - (641): 0.101562, 0.164062, 0.226562, 0.289062, 0.351562, 0.414062, - (647): 0.476562, 0.539062, 0.601562, 0.664062, 0.726562, 0.789062, - (653): 0.851562, 0.914062, 0.976562, 1.03906, 1.10156, 1.16406, - (659): 1.22656, 1.28906, 1.35156, 1.41406, 1.47656, 1.53906, - (665): 1.60156, 1.66406, 1.72656, 1.78906, 1.85156, 1.91406, - (671): 1.97656, 2.03906, 2.10156, 2.16406, 2.22656, 2.28906, - (677): 2.35156, 2.41406, 2.47656, 2.53906, 2.60156, 2.66406, - (683): 2.72656, 2.78906, 2.85156, 2.91406, 2.97656, 3.03906, - (689): 3.10156, 3.16406, 3.22656, 3.28906, 3.35156, 3.41406, - (695): 3.47656, 3.53906, 3.60156, 3.66406, 3.72656, 3.78906, - (701): 3.85156, 3.91406, 3.97656, 4.03906, 4.10156, 4.16406, - (707): 4.22656, 4.28906, 4.35156, 4.41406, 4.47656, 4.53906, - (713): 4.60156, 4.66406, 4.72656, 4.78906, 4.85156, 4.91406, - (719): 4.97656, 5.03906, 5.10156, 5.16406, 5.22656, 5.28906, - (725): 5.35156, 5.41406, 5.47656, 5.53906, 5.60156, 5.66406, - (731): 5.72656, 5.78906, 5.85156, 5.91406, 5.97656, 6.03906, - (737): 6.10156, 6.16406, 6.22656, 6.28906, 6.35156, 6.41406, - (743): 6.47656, 6.53906, 6.60156, 6.66406, 6.72656, 6.78906, - (749): 6.85156, 6.91406, 6.97656, 7.03906, 7.10156, 7.16406, - (755): 7.22656, 7.28906, 7.35156, 7.41406, 7.47656, 7.53906, - (761): 7.60156, 7.66406, 7.72656, 7.78906, 7.85156, 7.91406, - (767): 7.97656, 122, 0.109375, 0.171875, 0.234375, 0.296875, - (773): 0.359375, 0.421875, 0.484375, 0.546875, 0.609375, 0.671875, - (779): 0.734375, 0.796875, 0.859375, 0.921875, 0.984375, 1.04688, - (785): 1.10938, 1.17188, 1.23438, 1.29688, 1.35938, 1.42188, - (791): 1.48438, 1.54688, 1.60938, 1.67188, 1.73438, 1.79688, - (797): 1.85938, 1.92188, 1.98438, 2.04688, 2.10938, 2.17188, - (803): 2.23438, 2.29688, 2.35938, 2.42188, 2.48438, 2.54688, - (809): 2.60938, 2.67188, 2.73438, 2.79688, 2.85938, 2.92188, - (815): 2.98438, 3.04688, 3.10938, 3.17188, 3.23438, 3.29688, - (821): 3.35938, 3.42188, 3.48438, 3.54688, 3.60938, 3.67188, - (827): 3.73438, 3.79688, 3.85938, 3.92188, 3.98438, 4.04688, - (833): 4.10938, 4.17188, 4.23438, 4.29688, 4.35938, 4.42188, - (839): 4.48438, 4.54688, 4.60938, 4.67188, 4.73438, 4.79688, - (845): 4.85938, 4.92188, 4.98438, 5.04688, 5.10938, 5.17188, - (851): 5.23438, 5.29688, 5.35938, 5.42188, 5.48438, 5.54688, - (857): 5.60938, 5.67188, 5.73438, 5.79688, 5.85938, 5.92188, - (863): 5.98438, 6.04688, 6.10938, 6.17188, 6.23438, 6.29688, - (869): 6.35938, 6.42188, 6.48438, 6.54688, 6.60938, 6.67188, - (875): 6.73438, 6.79688, 6.85938, 6.92188, 6.98438, 7.04688, - (881): 7.10938, 7.17188, 7.23438, 7.29688, 7.35938, 7.42188, - (887): 7.48438, 7.54688, 7.60938, 7.67188, 7.73438, 7.79688, - (893): 7.85938, 7.92188, 7.98438, 121, 0.117188, 0.179688, 0.242188, - (900): 0.304688, 0.367188, 0.429688, 0.492188, 0.554688, 0.617188, - (906): 0.679688, 0.742188, 0.804688, 0.867188, 0.929688, 0.992188, - (912): 1.05469, 1.11719, 1.17969, 1.24219, 1.30469, 1.36719, - (918): 1.42969, 1.49219, 1.55469, 1.61719, 1.67969, 1.74219, - (924): 1.80469, 1.86719, 1.92969, 1.99219, 2.05469, 2.11719, - (930): 2.17969, 2.24219, 2.30469, 2.36719, 2.42969, 2.49219, - (936): 2.55469, 2.61719, 2.67969, 2.74219, 2.80469, 2.86719, - (942): 2.92969, 2.99219, 3.05469, 3.11719, 3.17969, 3.24219, - (948): 3.30469, 3.36719, 3.42969, 3.49219, 3.55469, 3.61719, - (954): 3.67969, 3.74219, 3.80469, 3.86719, 3.92969, 3.99219, - (960): 4.05469, 4.11719, 4.17969, 4.24219, 4.30469, 4.36719, - (966): 4.42969, 4.49219, 4.55469, 4.61719, 4.67969, 4.74219, - (972): 4.80469, 4.86719, 4.92969, 4.99219, 5.05469, 5.11719, - (978): 5.17969, 5.24219, 5.30469, 5.36719, 5.42969, 5.49219, - (984): 5.55469, 5.61719, 5.67969, 5.74219, 5.80469, 5.86719, - (990): 5.92969, 5.99219, 6.05469, 6.11719, 6.17969, 6.24219, - (996): 6.30469, 6.36719, 6.42969, 6.49219, 6.55469, 6.61719, - (1002): 6.67969, 6.74219, 6.80469, 6.86719, 6.92969, 6.99219, - (1008): 7.05469, 7.11719, 7.17969, 7.24219, 7.30469, 7.36719, - (1014): 7.42969, 7.49219, 7.55469, 7.61719, 7.67969, 7.74219, - (1020): 7.80469, 7.86719, 7.92969, 7.99219 - } - } - } - DATASET "DS32BITS" { - DATATYPE H5T_IEEE_F32LE - DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) } - STORAGE_LAYOUT { - CONTIGUOUS - SIZE 1024 - OFFSET 2048 - } - FILTERS { - NONE - } - FILLVALUE { - FILL_TIME H5D_FILL_TIME_IFSET - VALUE H5D_FILL_VALUE_DEFAULT - } - ALLOCATION_TIME { - H5D_ALLOC_TIME_LATE - } - DATA { - (0,0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, - (0,13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, - (0,25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, - (1,0): 31, 0.28125, 0.53125, 0.78125, 1.03125, 1.28125, 1.53125, - (1,7): 1.78125, 2.03125, 2.28125, 2.53125, 2.78125, 3.03125, 3.28125, - (1,14): 3.53125, 3.78125, 4.03125, 4.28125, 4.53125, 4.78125, 5.03125, - (1,21): 5.28125, 5.53125, 5.78125, 6.03125, 6.28125, 6.53125, 6.78125, - (1,28): 7.03125, 7.28125, 7.53125, 7.78125, - (2,0): 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, 1.8125, - (2,8): 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, 3.5625, 3.8125, - (2,16): 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, 5.3125, 5.5625, 5.8125, - (2,24): 6.0625, 6.3125, 6.5625, 6.8125, 7.0625, 7.3125, 7.5625, 7.8125, - (3,0): 29, 0.34375, 0.59375, 0.84375, 1.09375, 1.34375, 1.59375, - (3,7): 1.84375, 2.09375, 2.34375, 2.59375, 2.84375, 3.09375, 3.34375, - (3,14): 3.59375, 3.84375, 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, - (3,21): 5.34375, 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, - (3,28): 7.09375, 7.34375, 7.59375, 7.84375, - (4,0): 28, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125, - (4,9): 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, - (4,18): 4.625, 4.875, 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, - (4,27): 6.875, 7.125, 7.375, 7.625, 7.875, - (5,0): 27, 0.40625, 0.65625, 0.90625, 1.15625, 1.40625, 1.65625, - (5,7): 1.90625, 2.15625, 2.40625, 2.65625, 2.90625, 3.15625, 3.40625, - (5,14): 3.65625, 3.90625, 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, - (5,21): 5.40625, 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, - (5,28): 7.15625, 7.40625, 7.65625, 7.90625, - (6,0): 26, 0.4375, 0.6875, 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, - (6,8): 2.1875, 2.4375, 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, - (6,16): 4.1875, 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, - (6,24): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, 7.9375, - (7,0): 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, 1.71875, - (7,7): 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, 3.21875, 3.46875, - (7,14): 3.71875, 3.96875, 4.21875, 4.46875, 4.71875, 4.96875, 5.21875, - (7,21): 5.46875, 5.71875, 5.96875, 6.21875, 6.46875, 6.71875, 6.96875, - (7,28): 7.21875, 7.46875, 7.71875, 7.96875 - } - ATTRIBUTE "DS32BITS" { - DATATYPE H5T_IEEE_F32LE - DATASPACE SIMPLE { ( 256 ) / ( 256 ) } - DATA { - (0): 32, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, - (13): 3.25, 3.5, 3.75, 4, 4.25, 4.5, 4.75, 5, 5.25, 5.5, 5.75, 6, - (25): 6.25, 6.5, 6.75, 7, 7.25, 7.5, 7.75, 31, 0.28125, 0.53125, - (35): 0.78125, 1.03125, 1.28125, 1.53125, 1.78125, 2.03125, 2.28125, - (42): 2.53125, 2.78125, 3.03125, 3.28125, 3.53125, 3.78125, 4.03125, - (49): 4.28125, 4.53125, 4.78125, 5.03125, 5.28125, 5.53125, 5.78125, - (56): 6.03125, 6.28125, 6.53125, 6.78125, 7.03125, 7.28125, 7.53125, - (63): 7.78125, 30, 0.3125, 0.5625, 0.8125, 1.0625, 1.3125, 1.5625, - (71): 1.8125, 2.0625, 2.3125, 2.5625, 2.8125, 3.0625, 3.3125, - (78): 3.5625, 3.8125, 4.0625, 4.3125, 4.5625, 4.8125, 5.0625, - (85): 5.3125, 5.5625, 5.8125, 6.0625, 6.3125, 6.5625, 6.8125, - (92): 7.0625, 7.3125, 7.5625, 7.8125, 29, 0.34375, 0.59375, 0.84375, - (100): 1.09375, 1.34375, 1.59375, 1.84375, 2.09375, 2.34375, - (106): 2.59375, 2.84375, 3.09375, 3.34375, 3.59375, 3.84375, - (112): 4.09375, 4.34375, 4.59375, 4.84375, 5.09375, 5.34375, - (118): 5.59375, 5.84375, 6.09375, 6.34375, 6.59375, 6.84375, - (124): 7.09375, 7.34375, 7.59375, 7.84375, 28, 0.375, 0.625, 0.875, - (132): 1.125, 1.375, 1.625, 1.875, 2.125, 2.375, 2.625, 2.875, - (140): 3.125, 3.375, 3.625, 3.875, 4.125, 4.375, 4.625, 4.875, - (148): 5.125, 5.375, 5.625, 5.875, 6.125, 6.375, 6.625, 6.875, - (156): 7.125, 7.375, 7.625, 7.875, 27, 0.40625, 0.65625, 0.90625, - (164): 1.15625, 1.40625, 1.65625, 1.90625, 2.15625, 2.40625, - (170): 2.65625, 2.90625, 3.15625, 3.40625, 3.65625, 3.90625, - (176): 4.15625, 4.40625, 4.65625, 4.90625, 5.15625, 5.40625, - (182): 5.65625, 5.90625, 6.15625, 6.40625, 6.65625, 6.90625, - (188): 7.15625, 7.40625, 7.65625, 7.90625, 26, 0.4375, 0.6875, - (195): 0.9375, 1.1875, 1.4375, 1.6875, 1.9375, 2.1875, 2.4375, - (202): 2.6875, 2.9375, 3.1875, 3.4375, 3.6875, 3.9375, 4.1875, - (209): 4.4375, 4.6875, 4.9375, 5.1875, 5.4375, 5.6875, 5.9375, - (216): 6.1875, 6.4375, 6.6875, 6.9375, 7.1875, 7.4375, 7.6875, - (223): 7.9375, 25, 0.46875, 0.71875, 0.96875, 1.21875, 1.46875, - (230): 1.71875, 1.96875, 2.21875, 2.46875, 2.71875, 2.96875, - (236): 3.21875, 3.46875, 3.71875, 3.96875, 4.21875, 4.46875, - (242): 4.71875, 4.96875, 5.21875, 5.46875, 5.71875, 5.96875, - (248): 6.21875, 6.46875, 6.71875, 6.96875, 7.21875, 7.46875, - (254): 7.71875, 7.96875 - } - } - } - DATASET "DS64BITS" { - DATATYPE H5T_IEEE_F64LE - DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) } - STORAGE_LAYOUT { - CONTIGUOUS - SIZE 4096 - OFFSET 6144 - } - FILTERS { - NONE - } - FILLVALUE { - FILL_TIME H5D_FILL_TIME_IFSET - VALUE H5D_FILL_VALUE_DEFAULT - } - ALLOCATION_TIME { - H5D_ALLOC_TIME_LATE - } - DATA { - (0,0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, 1.25, - (0,11): 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, 2.5, - (0,21): 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, 3.75, - (0,31): 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, 5, - (0,41): 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, 6.25, - (0,51): 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, 7.5, - (0,61): 7.625, 7.75, 7.875, - (1,0): 63, 0.140625, 0.265625, 0.390625, 0.515625, 0.640625, 0.765625, - (1,7): 0.890625, 1.01562, 1.14062, 1.26562, 1.39062, 1.51562, 1.64062, - (1,14): 1.76562, 1.89062, 2.01562, 2.14062, 2.26562, 2.39062, 2.51562, - (1,21): 2.64062, 2.76562, 2.89062, 3.01562, 3.14062, 3.26562, 3.39062, - (1,28): 3.51562, 3.64062, 3.76562, 3.89062, 4.01562, 4.14062, 4.26562, - (1,35): 4.39062, 4.51562, 4.64062, 4.76562, 4.89062, 5.01562, 5.14062, - (1,42): 5.26562, 5.39062, 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, - (1,49): 6.14062, 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, - (1,56): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, 7.76562, - (1,63): 7.89062, - (2,0): 62, 0.15625, 0.28125, 0.40625, 0.53125, 0.65625, 0.78125, - (2,7): 0.90625, 1.03125, 1.15625, 1.28125, 1.40625, 1.53125, 1.65625, - (2,14): 1.78125, 1.90625, 2.03125, 2.15625, 2.28125, 2.40625, 2.53125, - (2,21): 2.65625, 2.78125, 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, - (2,28): 3.53125, 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, - (2,35): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, 5.15625, - (2,42): 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, 5.90625, 6.03125, - (2,49): 6.15625, 6.28125, 6.40625, 6.53125, 6.65625, 6.78125, 6.90625, - (2,56): 7.03125, 7.15625, 7.28125, 7.40625, 7.53125, 7.65625, 7.78125, - (2,63): 7.90625, - (3,0): 61, 0.171875, 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, - (3,7): 0.921875, 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, - (3,14): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, 2.54688, - (3,21): 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, 3.29688, 3.42188, - (3,28): 3.54688, 3.67188, 3.79688, 3.92188, 4.04688, 4.17188, 4.29688, - (3,35): 4.42188, 4.54688, 4.67188, 4.79688, 4.92188, 5.04688, 5.17188, - (3,42): 5.29688, 5.42188, 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, - (3,49): 6.17188, 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, - (3,56): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, 7.79688, - (3,63): 7.92188, - (4,0): 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, 0.8125, 0.9375, - (4,8): 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, 1.6875, 1.8125, 1.9375, - (4,16): 2.0625, 2.1875, 2.3125, 2.4375, 2.5625, 2.6875, 2.8125, 2.9375, - (4,24): 3.0625, 3.1875, 3.3125, 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, - (4,32): 4.0625, 4.1875, 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, - (4,40): 5.0625, 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, - (4,48): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, 6.9375, - (4,56): 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, 7.8125, 7.9375, - (5,0): 59, 0.203125, 0.328125, 0.453125, 0.578125, 0.703125, 0.828125, - (5,7): 0.953125, 1.07812, 1.20312, 1.32812, 1.45312, 1.57812, 1.70312, - (5,14): 1.82812, 1.95312, 2.07812, 2.20312, 2.32812, 2.45312, 2.57812, - (5,21): 2.70312, 2.82812, 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, - (5,28): 3.57812, 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, - (5,35): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, 5.20312, - (5,42): 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, 5.95312, 6.07812, - (5,49): 6.20312, 6.32812, 6.45312, 6.57812, 6.70312, 6.82812, 6.95312, - (5,56): 7.07812, 7.20312, 7.32812, 7.45312, 7.57812, 7.70312, 7.82812, - (5,63): 7.95312, - (6,0): 58, 0.21875, 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, - (6,7): 0.96875, 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, - (6,14): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, 2.59375, - (6,21): 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, 3.34375, 3.46875, - (6,28): 3.59375, 3.71875, 3.84375, 3.96875, 4.09375, 4.21875, 4.34375, - (6,35): 4.46875, 4.59375, 4.71875, 4.84375, 4.96875, 5.09375, 5.21875, - (6,42): 5.34375, 5.46875, 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, - (6,49): 6.21875, 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, - (6,56): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, 7.84375, - (6,63): 7.96875, - (7,0): 57, 0.234375, 0.359375, 0.484375, 0.609375, 0.734375, 0.859375, - (7,7): 0.984375, 1.10938, 1.23438, 1.35938, 1.48438, 1.60938, 1.73438, - (7,14): 1.85938, 1.98438, 2.10938, 2.23438, 2.35938, 2.48438, 2.60938, - (7,21): 2.73438, 2.85938, 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, - (7,28): 3.60938, 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, - (7,35): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, 5.23438, - (7,42): 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, 5.98438, 6.10938, - (7,49): 6.23438, 6.35938, 6.48438, 6.60938, 6.73438, 6.85938, 6.98438, - (7,56): 7.10938, 7.23438, 7.35938, 7.48438, 7.60938, 7.73438, 7.85938, - (7,63): 7.98438 - } - ATTRIBUTE "DS64BITS" { - DATATYPE H5T_IEEE_F64LE - DATASPACE SIMPLE { ( 512 ) / ( 512 ) } - DATA { - (0): 64, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1, 1.125, - (10): 1.25, 1.375, 1.5, 1.625, 1.75, 1.875, 2, 2.125, 2.25, 2.375, - (20): 2.5, 2.625, 2.75, 2.875, 3, 3.125, 3.25, 3.375, 3.5, 3.625, - (30): 3.75, 3.875, 4, 4.125, 4.25, 4.375, 4.5, 4.625, 4.75, 4.875, - (40): 5, 5.125, 5.25, 5.375, 5.5, 5.625, 5.75, 5.875, 6, 6.125, - (50): 6.25, 6.375, 6.5, 6.625, 6.75, 6.875, 7, 7.125, 7.25, 7.375, - (60): 7.5, 7.625, 7.75, 7.875, 63, 0.140625, 0.265625, 0.390625, - (68): 0.515625, 0.640625, 0.765625, 0.890625, 1.01562, 1.14062, - (74): 1.26562, 1.39062, 1.51562, 1.64062, 1.76562, 1.89062, 2.01562, - (81): 2.14062, 2.26562, 2.39062, 2.51562, 2.64062, 2.76562, 2.89062, - (88): 3.01562, 3.14062, 3.26562, 3.39062, 3.51562, 3.64062, 3.76562, - (95): 3.89062, 4.01562, 4.14062, 4.26562, 4.39062, 4.51562, 4.64062, - (102): 4.76562, 4.89062, 5.01562, 5.14062, 5.26562, 5.39062, - (108): 5.51562, 5.64062, 5.76562, 5.89062, 6.01562, 6.14062, - (114): 6.26562, 6.39062, 6.51562, 6.64062, 6.76562, 6.89062, - (120): 7.01562, 7.14062, 7.26562, 7.39062, 7.51562, 7.64062, - (126): 7.76562, 7.89062, 62, 0.15625, 0.28125, 0.40625, 0.53125, - (133): 0.65625, 0.78125, 0.90625, 1.03125, 1.15625, 1.28125, - (139): 1.40625, 1.53125, 1.65625, 1.78125, 1.90625, 2.03125, - (145): 2.15625, 2.28125, 2.40625, 2.53125, 2.65625, 2.78125, - (151): 2.90625, 3.03125, 3.15625, 3.28125, 3.40625, 3.53125, - (157): 3.65625, 3.78125, 3.90625, 4.03125, 4.15625, 4.28125, - (163): 4.40625, 4.53125, 4.65625, 4.78125, 4.90625, 5.03125, - (169): 5.15625, 5.28125, 5.40625, 5.53125, 5.65625, 5.78125, - (175): 5.90625, 6.03125, 6.15625, 6.28125, 6.40625, 6.53125, - (181): 6.65625, 6.78125, 6.90625, 7.03125, 7.15625, 7.28125, - (187): 7.40625, 7.53125, 7.65625, 7.78125, 7.90625, 61, 0.171875, - (194): 0.296875, 0.421875, 0.546875, 0.671875, 0.796875, 0.921875, - (200): 1.04688, 1.17188, 1.29688, 1.42188, 1.54688, 1.67188, - (206): 1.79688, 1.92188, 2.04688, 2.17188, 2.29688, 2.42188, - (212): 2.54688, 2.67188, 2.79688, 2.92188, 3.04688, 3.17188, - (218): 3.29688, 3.42188, 3.54688, 3.67188, 3.79688, 3.92188, - (224): 4.04688, 4.17188, 4.29688, 4.42188, 4.54688, 4.67188, - (230): 4.79688, 4.92188, 5.04688, 5.17188, 5.29688, 5.42188, - (236): 5.54688, 5.67188, 5.79688, 5.92188, 6.04688, 6.17188, - (242): 6.29688, 6.42188, 6.54688, 6.67188, 6.79688, 6.92188, - (248): 7.04688, 7.17188, 7.29688, 7.42188, 7.54688, 7.67188, - (254): 7.79688, 7.92188, 60, 0.1875, 0.3125, 0.4375, 0.5625, 0.6875, - (262): 0.8125, 0.9375, 1.0625, 1.1875, 1.3125, 1.4375, 1.5625, - (269): 1.6875, 1.8125, 1.9375, 2.0625, 2.1875, 2.3125, 2.4375, - (276): 2.5625, 2.6875, 2.8125, 2.9375, 3.0625, 3.1875, 3.3125, - (283): 3.4375, 3.5625, 3.6875, 3.8125, 3.9375, 4.0625, 4.1875, - (290): 4.3125, 4.4375, 4.5625, 4.6875, 4.8125, 4.9375, 5.0625, - (297): 5.1875, 5.3125, 5.4375, 5.5625, 5.6875, 5.8125, 5.9375, - (304): 6.0625, 6.1875, 6.3125, 6.4375, 6.5625, 6.6875, 6.8125, - (311): 6.9375, 7.0625, 7.1875, 7.3125, 7.4375, 7.5625, 7.6875, - (318): 7.8125, 7.9375, 59, 0.203125, 0.328125, 0.453125, 0.578125, - (325): 0.703125, 0.828125, 0.953125, 1.07812, 1.20312, 1.32812, - (331): 1.45312, 1.57812, 1.70312, 1.82812, 1.95312, 2.07812, - (337): 2.20312, 2.32812, 2.45312, 2.57812, 2.70312, 2.82812, - (343): 2.95312, 3.07812, 3.20312, 3.32812, 3.45312, 3.57812, - (349): 3.70312, 3.82812, 3.95312, 4.07812, 4.20312, 4.32812, - (355): 4.45312, 4.57812, 4.70312, 4.82812, 4.95312, 5.07812, - (361): 5.20312, 5.32812, 5.45312, 5.57812, 5.70312, 5.82812, - (367): 5.95312, 6.07812, 6.20312, 6.32812, 6.45312, 6.57812, - (373): 6.70312, 6.82812, 6.95312, 7.07812, 7.20312, 7.32812, - (379): 7.45312, 7.57812, 7.70312, 7.82812, 7.95312, 58, 0.21875, - (386): 0.34375, 0.46875, 0.59375, 0.71875, 0.84375, 0.96875, - (392): 1.09375, 1.21875, 1.34375, 1.46875, 1.59375, 1.71875, - (398): 1.84375, 1.96875, 2.09375, 2.21875, 2.34375, 2.46875, - (404): 2.59375, 2.71875, 2.84375, 2.96875, 3.09375, 3.21875, - (410): 3.34375, 3.46875, 3.59375, 3.71875, 3.84375, 3.96875, - (416): 4.09375, 4.21875, 4.34375, 4.46875, 4.59375, 4.71875, - (422): 4.84375, 4.96875, 5.09375, 5.21875, 5.34375, 5.46875, - (428): 5.59375, 5.71875, 5.84375, 5.96875, 6.09375, 6.21875, - (434): 6.34375, 6.46875, 6.59375, 6.71875, 6.84375, 6.96875, - (440): 7.09375, 7.21875, 7.34375, 7.46875, 7.59375, 7.71875, - (446): 7.84375, 7.96875, 57, 0.234375, 0.359375, 0.484375, 0.609375, - (453): 0.734375, 0.859375, 0.984375, 1.10938, 1.23438, 1.35938, - (459): 1.48438, 1.60938, 1.73438, 1.85938, 1.98438, 2.10938, - (465): 2.23438, 2.35938, 2.48438, 2.60938, 2.73438, 2.85938, - (471): 2.98438, 3.10938, 3.23438, 3.35938, 3.48438, 3.60938, - (477): 3.73438, 3.85938, 3.98438, 4.10938, 4.23438, 4.35938, - (483): 4.48438, 4.60938, 4.73438, 4.85938, 4.98438, 5.10938, - (489): 5.23438, 5.35938, 5.48438, 5.60938, 5.73438, 5.85938, - (495): 5.98438, 6.10938, 6.23438, 6.35938, 6.48438, 6.60938, - (501): 6.73438, 6.85938, 6.98438, 7.10938, 7.23438, 7.35938, - (507): 7.48438, 7.60938, 7.73438, 7.85938, 7.98438 - } - } - } -} -} diff --git a/tools/testfiles/tldouble.ddl b/tools/testfiles/tldouble.ddl index c032ef31a21..2fed52307f9 100644 --- a/tools/testfiles/tldouble.ddl +++ b/tools/testfiles/tldouble.ddl @@ -1,7 +1,7 @@ HDF5 "tldouble.h5" { GROUP "/" { DATASET "dset" { - DATATYPE H5T_NATIVE_LDOUBLE + DATATYPE 128-bit little-endian floating-point 80-bit precision DATASPACE SIMPLE { ( 3 ) / ( 3 ) } DATA { (0): 1, 2, 3 diff --git a/tools/testfiles/tldouble.xddl b/tools/testfiles/tldouble.xddl deleted file mode 100644 index 4793b4d1344..00000000000 --- a/tools/testfiles/tldouble.xddl +++ /dev/null @@ -1,11 +0,0 @@ -HDF5 "tldouble.h5" { -GROUP "/" { - DATASET "dset" { - DATATYPE 128-bit little-endian floating-point - DATASPACE SIMPLE { ( 3 ) / ( 3 ) } - DATA { - (0): 1, 2, 3 - } - } -} -} diff --git a/tools/testfiles/tldouble_scalar.ddl b/tools/testfiles/tldouble_scalar.ddl index 45f0b45ca72..596d8db2ce0 100755 --- a/tools/testfiles/tldouble_scalar.ddl +++ b/tools/testfiles/tldouble_scalar.ddl @@ -1,7 +1,7 @@ HDF5 "tldouble_scalar.h5" { GROUP "/" { DATASET "dset" { - DATATYPE H5T_ARRAY { [6] H5T_NATIVE_LDOUBLE } + DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point 80-bit precision } DATASPACE SCALAR STORAGE_LAYOUT { CONTIGUOUS diff --git a/tools/testfiles/tldouble_scalar.xddl b/tools/testfiles/tldouble_scalar.xddl deleted file mode 100644 index 0c17c314912..00000000000 --- a/tools/testfiles/tldouble_scalar.xddl +++ /dev/null @@ -1,26 +0,0 @@ -HDF5 "tldouble_scalar.h5" { -GROUP "/" { - DATASET "dset" { - DATATYPE H5T_ARRAY { [6] 128-bit little-endian floating-point } - DATASPACE SCALAR - STORAGE_LAYOUT { - CONTIGUOUS - SIZE 96 - OFFSET 2048 - } - FILTERS { - NONE - } - FILLVALUE { - FILL_TIME H5D_FILL_TIME_IFSET - VALUE H5D_FILL_VALUE_DEFAULT - } - ALLOCATION_TIME { - H5D_ALLOC_TIME_LATE - } - DATA { - (0): [ 0, 1, 2, 3, 4, 5 ] - } - } -} -} diff --git a/tools/testfiles/tnbit.ddl b/tools/testfiles/tnbit.ddl index fd5d1cf6ab1..cf2ac1fdb91 100644 --- a/tools/testfiles/tnbit.ddl +++ b/tools/testfiles/tnbit.ddl @@ -1,6 +1,6 @@ HDF5 "tfilters.h5" { DATASET "nbit" { - DATATYPE 32-bit little-endian integer + DATATYPE 32-bit little-endian integer 3-bit precision DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) } STORAGE_LAYOUT { CHUNKED ( 10, 5 ) diff --git a/tools/testfiles/treadintfilter.ddl b/tools/testfiles/treadintfilter.ddl index a2269a6b90f..fbad3f67369 100644 --- a/tools/testfiles/treadintfilter.ddl +++ b/tools/testfiles/treadintfilter.ddl @@ -78,7 +78,7 @@ DATASET "fletcher32" { } } DATASET "nbit" { - DATATYPE 32-bit little-endian integer + DATATYPE 32-bit little-endian integer 3-bit precision DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) } DATA { (0,0): 0, 1, 2, 3, -4, -3, -2, -1, 0, 1, From 5db53ab5fe68b34564cb38ccd6bba2d550972611 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Apr 2021 17:39:59 +0000 Subject: [PATCH 40/66] Committing clang-format changes --- tools/lib/h5tools_dump.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3dd71581919..58c9d12735f 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2193,8 +2193,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ sign_s = " unknown-sign"; /* print size, order, sign, and precision */ - h5tools_str_append(buffer, "%lu-bit%s%s integer %lu-bit precision", (unsigned long)(8 * H5Tget_size(type)), - order_s, sign_s, H5Tget_precision(type)); + h5tools_str_append(buffer, "%lu-bit%s%s integer %lu-bit precision", + (unsigned long)(8 * H5Tget_size(type)), order_s, sign_s, + H5Tget_precision(type)); } break; @@ -2233,8 +2234,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ order_s = ""; /* print size. byte order, and precision */ - h5tools_str_append(buffer, "%lu-bit%s floating-point %lu-bit precision", (unsigned long)(8 * H5Tget_size(type)), - order_s, H5Tget_precision(type)); + h5tools_str_append(buffer, "%lu-bit%s floating-point %lu-bit precision", + (unsigned long)(8 * H5Tget_size(type)), order_s, H5Tget_precision(type)); } break; From df1637967cb0a8335ef86c627051ea0cd15ed3fc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 9 Apr 2021 06:53:18 -0500 Subject: [PATCH 41/66] minor whitespace --- tools/lib/h5tools_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3dd71581919..e35f5cc561c 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -1262,7 +1262,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c hsize_t * temp_block, /* block size used in loop */ hsize_t * temp_stride, /* stride size used in loop */ const hsize_t *total_size, /* total size of dataset */ - unsigned int row_dim) /* index of row_counter dimension */ + unsigned int row_dim) /* index of row_counter dimension */ { size_t i; /* counters */ size_t j; /* counters */ From c5809ff3d9ff4c70b99733ff4222553b432be411 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 15 Apr 2021 13:53:39 -0500 Subject: [PATCH 42/66] remove unneeded macro --- MANIFEST | 1 - config/cmake/run2Test.cmake | 420 ------------------------------------ 2 files changed, 421 deletions(-) delete mode 100644 config/cmake/run2Test.cmake diff --git a/MANIFEST b/MANIFEST index 5c28165fe03..4ec1c33aff4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3423,7 +3423,6 @@ ./config/cmake/patch.xml ./config/cmake/PkgInfo.in ./config/cmake/README.txt.cmake.in -./config/cmake/run2Test.cmake ./config/cmake/UseJava.cmake ./config/cmake/UseJavaClassFilelist.cmake ./config/cmake/UseJavaSymlinks.cmake diff --git a/config/cmake/run2Test.cmake b/config/cmake/run2Test.cmake deleted file mode 100644 index bc7d559e9f5..00000000000 --- a/config/cmake/run2Test.cmake +++ /dev/null @@ -1,420 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -# run2Test.cmake executes a command and captures the output in a file. File is then compared -# against a reference file or a second file. Exit status of command can also be compared. -cmake_policy(SET CMP0007 NEW) - -# arguments checking -if (NOT TEST_PROGRAM) - message (FATAL_ERROR "Require TEST_PROGRAM to be defined") -endif () -if (NOT TEST_FOLDER) - message (FATAL_ERROR "Require TEST_FOLDER to be defined") -endif () -if (NOT TEST_OUTPUT) - message (FATAL_ERROR "Require TEST_OUTPUT to be defined") -endif () -if (NOT TEST_EXPECT) - message (STATUS "Require TEST_EXPECT to be defined") -endif () - -if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") - file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) -endif () - -if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") - file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) -endif () - -message (STATUS "COMMAND: ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS}") - -if (TEST_LIBRARY_DIRECTORY) - if (WIN32) - set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") - else () - set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") - endif () -endif () - -if (TEST_ENV_VAR) - set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}") - #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}") -endif () - -if (NOT TEST_INPUT) - # run the test program, capture the stdout/stderr and the result var - execute_process ( - COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS} - WORKING_DIRECTORY ${TEST_FOLDER} - RESULT_VARIABLE TEST_RESULT - OUTPUT_FILE ${TEST_OUTPUT} - ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_OUT - ERROR_VARIABLE TEST_ERROR - ) -else () - # run the test program with stdin, capture the stdout/stderr and the result var - execute_process ( - COMMAND ${TEST_EMULATOR} ${TEST_PROGRAM} ${TEST_ARGS} - WORKING_DIRECTORY ${TEST_FOLDER} - RESULT_VARIABLE TEST_RESULT - INPUT_FILE ${TEST_INPUT} - OUTPUT_FILE ${TEST_OUTPUT} - ERROR_FILE ${TEST_OUTPUT}.err - OUTPUT_VARIABLE TEST_OUT - ERROR_VARIABLE TEST_ERROR - ) -endif () - -if (TEST_REGEX) - # TEST_REGEX should always be matched - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX MATCH "${TEST_REGEX}" REGEX_MATCH ${TEST_STREAM}) - string (COMPARE EQUAL "${REGEX_MATCH}" "${TEST_MATCH}" REGEX_RESULT) - if (NOT REGEX_RESULT) - message (STATUS "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_MATCH}") - endif () -endif () - -message (STATUS "COMMAND Result: ${TEST_RESULT}") - -# if the .err file exists and ERRROR_APPEND is enabled -if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") - file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - list (LENGTH TEST_STREAM test_len) - if (test_len GREATER 0) - if (TEST_MASK_FILE) - STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") - endif () - # remove special output - string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") - - if (NOT ERROR_APPEND) - # write back to original .err file - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") - else () - # append error output to the stdout output file - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") - endif () - endif () -endif () - -# append the test result status with a predefined text -if (TEST_APPEND) - file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") -endif () - -# if the return value is !=${TEST_EXPECT} bail out -if (NOT TEST_RESULT EQUAL TEST_EXPECT) - if (NOT TEST_NOERRDISPLAY) - if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - message (STATUS "Output :\n${TEST_STREAM}") - endif () - endif () - message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") -endif () - -message (STATUS "COMMAND Error: ${TEST_ERROR}") - -# remove special output -file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) -string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT) -if (TEST_FIND_RESULT GREATER -1) - string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM}) -endif () - -# remove special error output -if (NOT TEST_ERRREF) - # the error stack has been appended to the output file - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) -else () - # the error stack remains in the .err file - file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) -endif () -string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT) -if (TEST_FIND_RESULT GREATER -1) - string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") - # write back the changes to the original files - if (NOT TEST_ERRREF) - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") - else () - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") - endif () -endif () - -# if the output file needs Storage text removed -if (TEST_MASK) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX REPLACE "Storage:[^\n]+\n" "Storage:
\n" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") -endif () - -# if the output file needs Modified text removed -if (TEST_MASK_MOD) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") -endif () - -# if the output file or the .err file needs to mask out error stack info -if (TEST_MASK_ERROR) - if (NOT TEST_ERRREF) - # the error stack has been appended to the output file - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - else () - # the error stack remains in the .err file - file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - endif () - string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - # write back the changes to the original files - if (NOT TEST_ERRREF) - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") - else () - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") - endif () -endif () - -# remove text from the output file -if (TEST_FILTER) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") -endif () - -if (TEST_REF_FILTER) - #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") - file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") -endif () - -if (TEST_REF_FILTER2) - #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER2}") - file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) - string (REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") - file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE2} "${TEST_STREAM}") -endif () - -# compare output files to references unless this must be skipped -set (TEST_COMPARE_RESULT 0) -set (TEST_COMPARE_RESULT2 0) -if (NOT TEST_SKIP_COMPARE) - if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") - file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list (LENGTH TEST_STREAM test_len) - if (test_len GREATER 0) - if (WIN32) - configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) - if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}.tmp") - file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE}.tmp ${TEST_FOLDER}/${TEST_REFERENCE}) - endif () - #file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") - endif () - endif () - endif () - if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE2}") - file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) - list (LENGTH TEST_STREAM test_len2) - if (test_len2 GREATER 0) - if (WIN32) - configure_file(${TEST_FOLDER}/${TEST_REFERENCE2} ${TEST_FOLDER}/${TEST_REFERENCE2}.tmp NEWLINE_STYLE CRLF) - if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE2}.tmp") - file(RENAME ${TEST_FOLDER}/${TEST_REFERENCE2}.tmp ${TEST_FOLDER}/${TEST_REFERENCE2}) - endif () - #file (READ ${TEST_FOLDER}/${TEST_REFERENCE2} TEST_STREAM) - #file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE2} "${TEST_STREAM}") - endif () - endif () - endif () - - if (test_len GREATER 0) - if (NOT TEST_SORT_COMPARE) - # now compare the output with the reference - execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} - RESULT_VARIABLE TEST_COMPARE_RESULT - ) - else () - file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) - file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2) - list (SORT v1) - list (SORT v2) - if (NOT v1 STREQUAL v2) - set(TEST_COMPARE_RESULT 1) - endif () - endif () - message (STATUS "TEST_COMPARE_RESULT: ${TEST_COMPARE_RESULT}\n") - endif () - if (test_len2 GREATER 0) - if (NOT TEST_SORT_COMPARE) - # now compare the output with the reference2 - execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE2} - RESULT_VARIABLE TEST_COMPARE_RESULT2 - ) - else () - file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) - file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE2} v2) - list (SORT v1) - list (SORT v2) - if (NOT v1 STREQUAL v2) - set(TEST_COMPARE_RESULT2 1) - endif () - endif () - message (STATUS "TEST_COMPARE_RESULT2: ${TEST_COMPARE_RESULT2}\n") - endif () - - if (TEST_COMPARE_RESULT AND TEST_COMPARE_RESULT2) - file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) - list (LENGTH test_act len_act) - file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) - list (LENGTH test_ref len_ref) - file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE2} test_ref2) - list (LENGTH test_ref2 len_ref2) - if (len_act GREATER 0 AND len_ref GREATER 0) - math (EXPR _FP_LEN "${len_ref} - 1") - foreach (line RANGE 0 ${_FP_LEN}) - list (GET test_act ${line} str_act) - list (GET test_ref ${line} str_ref) - if (NOT str_act STREQUAL str_ref) - if (str_act) - message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") - endif () - endif () - if (len_ref2 GREATER 0) - list (GET test_ref2 ${line} str_ref2) - if (NOT str_act STREQUAL str_ref2) - if (str_act) - message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER2: ${str_ref2}\n") - endif () - endif () - endif () - endforeach () - else () - if (len_act EQUAL 0) - message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT} is empty") - endif () - if (len_ref EQUAL 0) - message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty") - endif () - endif () - - message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}") - endif () - - # now compare the .err file with the error reference, if supplied - set (TEST_ERRREF_RESULT 0) - if (TEST_ERRREF) - file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - list (LENGTH TEST_STREAM test_len) - if (test_len GREATER 0) - if (WIN32) - configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) - if (EXISTS "${TEST_FOLDER}/${TEST_ERRREF}.tmp") - file(RENAME ${TEST_FOLDER}/${TEST_ERRREF}.tmp ${TEST_FOLDER}/${TEST_ERRREF}) - endif () - #file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - #file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") - endif () - - # now compare the error output with the error reference - execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} - RESULT_VARIABLE TEST_ERRREF_RESULT - ) - if (TEST_ERRREF_RESULT) - set (TEST_ERRREF_RESULT 0) - file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) - list (LENGTH test_act len_act) - file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) - list (LENGTH test_ref len_ref) - math (EXPR _FP_LEN "${len_ref} - 1") - if (len_act GREATER 0 AND len_ref GREATER 0) - math (EXPR _FP_LEN "${len_ref} - 1") - foreach (line RANGE 0 ${_FP_LEN}) - list (GET test_act ${line} str_act) - list (GET test_ref ${line} str_ref) - if (NOT str_act STREQUAL str_ref) - if (str_act) - set (TEST_ERRREF_RESULT 1) - message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") - endif () - endif () - endforeach () - else () - if (len_act EQUAL 0) - message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_OUTPUT}.err is empty") - endif () - if (len_ref EQUAL 0) - message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_ERRREF} is empty") - endif () - endif () - if (NOT len_act EQUAL len_ref) - set (TEST_ERRREF_RESULT 1) - endif () - endif () - endif () - - message (STATUS "COMPARE Result: ${TEST_ERRREF_RESULT}") - - # again, if return value is !=0 scream and shout - if (TEST_ERRREF_RESULT) - message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}") - endif () - endif () -endif () - -set (TEST_GREP_RESULT 0) -if (TEST_GREP_COMPARE) - # now grep the output with the reference - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - list (LENGTH TEST_STREAM test_len) - if (test_len GREATER 0) - # TEST_REFERENCE should always be matched - string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) - string (COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_GREP_RESULT) - if (NOT TEST_GREP_RESULT) - message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}") - endif () - - string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM}) - if (TEST_EXPECT) - # TEST_EXPECT (1) interprets TEST_FILTER as; NOT to match - string (LENGTH "${TEST_MATCH}" TEST_GREP_RESULT) - if (TEST_GREP_RESULT) - message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}") - endif () - endif () - endif () -endif () - -# dump the output unless nodisplay option is set -if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY) - file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - execute_process ( - COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM} - RESULT_VARIABLE TEST_RESULT - ) -endif () - -# everything went fine... -message (STATUS "${TEST_PROGRAM} Passed") - From 1c73ec06a62cde5287c9410f972e32ddfe868adf Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 18:55:58 +0000 Subject: [PATCH 43/66] Committing clang-format changes --- tools/lib/h5tools_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 83842356816..58c9d12735f 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -1262,7 +1262,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c hsize_t * temp_block, /* block size used in loop */ hsize_t * temp_stride, /* stride size used in loop */ const hsize_t *total_size, /* total size of dataset */ - unsigned int row_dim) /* index of row_counter dimension */ + unsigned int row_dim) /* index of row_counter dimension */ { size_t i; /* counters */ size_t j; /* counters */ From e2329c47bdc90a8679bf8145afc781ed0e3d3030 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 20 Apr 2021 08:30:47 -0500 Subject: [PATCH 44/66] Add "option" command for clang options --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36749e80e11..e1174f39b79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -526,12 +526,18 @@ if (BUILD_STATIC_EXECS) endif () endif () +option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF) +mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS) if (HDF5_ENABLE_ANALYZER_TOOLS) include (${HDF5_SOURCE_DIR}/config/sanitizer/tools.cmake) endif () +option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF) +mark_as_advanced (HDF5_ENABLE_SANITIZERS) if (HDF5_ENABLE_SANITIZERS) include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake) endif () +option (HDF5_ENABLE_FORMATTERS "format source files" OFF) +mark_as_advanced (HDF5_ENABLE_FORMATTERS) if (HDF5_ENABLE_FORMATTERS) include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake) endif () From 40cb29e50a521df13e2589d804cab9213afea85a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Apr 2021 08:34:40 -0500 Subject: [PATCH 45/66] Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. --- CMakeInstallation.cmake | 3 +- CMakeLists.txt | 2 +- c++/src/CMakeLists.txt | 6 +- config/cmake/H5pubconf.h.in | 18 ----- config/cmake/cacheinit.cmake | 2 + fortran/src/CMakeLists.txt | 62 ++++++++------- fortran/test/CMakeLists.txt | 14 ++-- hl/c++/src/CMakeLists.txt | 6 +- hl/fortran/src/CMakeLists.txt | 18 +++-- hl/src/CMakeLists.txt | 6 +- release_docs/RELEASE.txt | 21 +++++ src/CMakeLists.txt | 142 ++++++++++++++++++++-------------- test/ShellTests.cmake | 4 + 13 files changed, 181 insertions(+), 123 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index b82b13d1cbc..65be97154f3 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -201,7 +201,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs") set (release_files ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt - ${HDF5_SOURCE_DIR}/release_docs/COPYING ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt ) if (WIN32) @@ -259,9 +258,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") if (EXISTS "${HDF5_SOURCE_DIR}/release_docs") set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") endif () set (CPACK_PACKAGE_RELOCATABLE TRUE) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1174f39b79..132c27523fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1078,7 +1078,7 @@ endif () # Option to build HDF5 C++ Library #----------------------------------------------------------------------------- if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") - option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON) + option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF) if (HDF5_BUILD_CPP_LIB) # check for unsupported options if (HDF5_ENABLE_PARALLEL) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 8608c678062..4b1a2d66c46 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -209,7 +209,11 @@ install ( ) if (NOT WIN32 AND NOT MINGW) - set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5c++ diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 59f0dca47be..2f2a6627486 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -243,21 +243,9 @@ /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ -/* Define to 1 if you have the `llround' function. */ -#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@ - -/* Define to 1 if you have the `llroundf' function. */ -#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@ - /* Define to 1 if you have the `longjmp' function. */ #cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@ -/* Define to 1 if you have the `lround' function. */ -#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@ - -/* Define to 1 if you have the `lroundf' function. */ -#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@ - /* Define to 1 if you have the `lseek64' function. */ #cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@ @@ -319,12 +307,6 @@ compiled */ #cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@ -/* Define to 1 if you have the `round' function. */ -#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@ - -/* Define to 1 if you have the `roundf' function. */ -#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@ - /* Define to 1 if you have the `setjmp' function. */ #cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@ diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index fc852777551..e423debdaa7 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -21,6 +21,8 @@ set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE) set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE) +set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build C++ support" FORCE) + set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE) set (HDF5_INSTALL_MOD_FORTRAN "NO" CACHE STRING "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" FORCE) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 459ac5a319c..432788e882c 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -73,38 +73,35 @@ add_executable (H5match_types ) target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 +add_custom_command (TARGET H5match_types POST_BUILD + BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types ) if (NOT ONLY_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 + add_custom_command (TARGET H5match_types POST_BUILD + BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE) endif () if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 + add_custom_command (TARGET H5match_types POST_BUILD + BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5f90i_gen.h" "${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5fortran_types.F90" "${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -137,10 +134,19 @@ set (f90CStub_C_HDRS # generated files ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ) +add_custom_target (H5gen_i ALL + DEPENDS H5match_types ${f90CStub_C_HDRS} +) +set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES GENERATED TRUE) + set (f90CStub_C_SHHDRS # generated files ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ) +add_custom_target (H5gen_iSH ALL + DEPENDS H5match_types ${f90CStub_C_SHHDRS} +) +set_source_files_properties (${f90CStub_C_SHHDRS} PROPERTIES GENERATED TRUE) if (NOT ONLY_SHARED_LIBS) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) @@ -210,39 +216,39 @@ set (f90_F_GEN_SOURCES ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 ) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 +add_custom_command (TARGET H5_buildiface POST_BUILD + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" ) if (NOT ONLY_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 + add_custom_command (TARGET H5_buildiface POST_BUILD + BYPRODUCTS H5_gen.F90 COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/static/H5_gen.F90" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 file" ) add_custom_target (H5gen ALL - DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 + DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE) endif () if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 + add_custom_command (TARGET H5_buildiface POST_BUILD + BYPRODUCTS H5_gen.F90 COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_F90_BINARY_DIR}/H5_gen.F90" "${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90" + ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 shared file" ) add_custom_target (H5genSH ALL - DEPENDS ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 + DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 PROPERTIES GENERATED TRUE) endif () @@ -547,7 +553,11 @@ install ( ) if (NOT WIN32 AND NOT MINGW) - set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5fc diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index df83c9c0391..0dea405004f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -91,27 +91,27 @@ if (HDF5_ENABLE_FORMATTERS) endif () if (NOT BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 + add_custom_command (TARGET H5_test_buildiface POST_BUILD + BYPRODUCTS tf_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static DEPENDS H5_test_buildiface - COMMENT "Generating the tf_gen.F90 file" + COMMENT "Generating the tf_gen.F90 static file" ) add_custom_target (H5testgen ALL - DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 + DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 ) set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) else () - add_custom_command ( - OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 + add_custom_command (TARGET H5_test_buildiface POST_BUILD + BYPRODUCTS tf_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared DEPENDS H5_test_buildiface COMMENT "Generating the tf_gen.F90 shared file" ) add_custom_target (H5testgenSH ALL - DEPENDS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 + DEPENDS H5_test_buildiface ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 ) set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 PROPERTIES GENERATED TRUE) endif () diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 1eac9fe9228..e4886567d10 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -120,7 +120,11 @@ install ( ) if (NOT WIN32 AND NOT MINGW) - set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++ diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 0b7795b45de..4f0b45167b8 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -114,15 +114,15 @@ set (HDF5_HL_F90_F_BASE_SOURCES ) if (NOT ONLY_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 + add_custom_command (TARGET H5HL_buildiface POST_BUILD + BYPRODUCTS $H5LTff_gen.F90 H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files" ) add_custom_target (H5HLgen ALL - DEPENDS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 + DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 ) set_source_files_properties ( ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 @@ -131,15 +131,15 @@ if (NOT ONLY_SHARED_LIBS) ) endif () if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90 + add_custom_command (TARGET H5HL_buildiface POST_BUILD + BYPRODUCTS H5LTff_gen.F90 H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files" ) add_custom_target (H5HLgenSH ALL - DEPENDS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90 + DEPENDS H5HL_buildiface ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90 ) set_source_files_properties ( ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 @@ -353,7 +353,11 @@ install ( ) if (NOT WIN32 AND NOT MINGW) - set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_Fortran_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_Fortran_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5hlfc diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 785bdcfc784..427424ea50b 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -152,7 +152,11 @@ install ( ) if (NOT WIN32 AND NOT MINGW) - set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5hlcc diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 002fc2352e5..1259cd217a8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -49,6 +49,27 @@ New Features Configuration: ------------- + - CMake no longer builds the C++ library by default + + HDF5_BUILD_CPP_LIB now defaults to OFF, which is in line with the + Autotools build defaults. + + (DER - 2021/04/20) + + - Removal of pre-VS2015 work-arounds + + HDF5 now requires Visual Studio 2015 or greater, so old work-around + code and definitions have been removed, including: + + * + * snprintf and vsnprintf + * llround, llroundf, lround, lroundf, round, roundf + * strtoll and strtoull + * va_copy + * struct timespec + + (DER - 2021/03/22) + - Add CMake variable HDF5_LIB_INFIX This infix is added to all library names after 'hdf5'. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7b70e679fbd..b04fcb12bdf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -977,6 +977,7 @@ if (LOCAL_BATCH_TEST) endif () endif () +set (lib_prog_deps) if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) target_include_directories (H5detect PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") @@ -984,8 +985,11 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") TARGET_C_PROPERTIES (H5detect STATIC) target_link_libraries (H5detect PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$,$>:ws2_32.lib> - PRIVATE $<$:"-O0"> ) + target_compile_options(H5detect + PRIVATE "$<$:-O0>" + ) + set (lib_prog_deps ${lib_prog_deps} H5detect) if (HDF5_BATCH_H5DETECT) configure_file ( @@ -993,77 +997,68 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c") ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} ESCAPE_QUOTES @ONLY ) add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c - ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 - COMMAND ${HDF5_BATCH_CMD} - ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} - COMMAND ${CMAKE_COMMAND} - ARGS -E echo "Executed batch command to create H5Tinit.c" + OUTPUT gen_SRCS.stamp1 + COMMAND ${HDF5_BATCH_CMD} + ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT} + BYPRODUCTS H5Tinit.c gen_SRCS.stamp1 + COMMAND ${CMAKE_COMMAND} + ARGS -E echo "Executed batch command to create H5Tinit.c" COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 + ARGS -E touch gen_SRCS.stamp1 DEPENDS H5detect WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} ) add_custom_target (gen_H5Tinit COMMAND ${CMAKE_COMMAND} -P ${HDF5_SOURCE_DIR}/config/cmake/wait_H5Tinit.cmake ) - if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c - ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" - COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 - DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit_created - WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} - ) - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) - endif () + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) else () - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c - ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ - ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + add_custom_command (TARGET H5detect POST_BUILD + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + ARGS H5Tinit.c + BYPRODUCTS H5Tinit.c gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 + ARGS -E touch gen_SRCS.stamp1 DEPENDS H5detect WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + COMMENT "Create H5Tinit.c" ) + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c - ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 + add_custom_command (TARGET H5detect POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" + ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c + BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 - DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ARGS -E touch shared/shared_gen_SRCS.stamp1 + DEPENDS H5detect H5Tinit.c WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + COMMENT "Copy H5Tinit.c to shared folder" ) set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) endif () endif () - set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) else () add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 + OUTPUT gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 - DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ARGS -E touch gen_SRCS.stamp1 + DEPENDS H5Tinit.c WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + COMMENT "Touch existing H5Tinit.c" ) + set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) add_custom_command ( - OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c - ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 + OUTPUT shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c" + ARGS -E copy_if_different H5Tinit.c shared/H5Tinit.c + BYPRODUCTS shared/H5Tinit.c shared/shared_gen_SRCS.stamp1 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 - DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ARGS -E touch shared/shared_gen_SRCS.stamp1 + DEPENDS H5Tinit.c WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR} + COMMENT "Copy existing H5Tinit.c to shared folder" ) set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE) endif () @@ -1082,8 +1077,11 @@ target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_ TARGET_C_PROPERTIES (H5make_libsettings STATIC) target_link_libraries (H5make_libsettings PRIVATE "$<$:${MPI_C_LIBRARIES}>" $<$,$>:ws2_32.lib> - PRIVATE $<$:"-O0"> ) +target_compile_options(H5make_libsettings + PRIVATE "$<$:-O0>" +) +set (lib_prog_deps ${lib_prog_deps} H5make_libsettings) #----------------------------------------------------------------------------- # Add Target to clang-format @@ -1092,27 +1090,27 @@ if (HDF5_ENABLE_FORMATTERS) clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings) endif () -add_custom_command ( - OUTPUT ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c - ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2 - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ - ARGS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c +add_custom_command (TARGET H5make_libsettings POST_BUILD + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ + ARGS H5lib_settings.c + BYPRODUCTS H5lib_settings.c gen_SRCS.stamp2 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2 + ARGS -E touch gen_SRCS.stamp2 DEPENDS H5make_libsettings WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR} + COMMENT "Create H5lib_settings.c" ) set_source_files_properties (${HDF5_SRC_BINARY_DIR}/H5lib_settings.c PROPERTIES GENERATED TRUE) if (BUILD_SHARED_LIBS) - add_custom_command ( - OUTPUT ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c - ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 + add_custom_command (TARGET H5make_libsettings POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different "${HDF5_SRC_BINARY_DIR}/H5lib_settings.c" "${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c" + ARGS -E copy_if_different H5lib_settings.c shared/H5lib_settings.c + BYPRODUCTS shared/H5lib_settings.c shared/shared_gen_SRCS.stamp2 COMMAND ${CMAKE_COMMAND} - ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2 - DEPENDS ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c + ARGS -E touch shared/shared_gen_SRCS.stamp2 + DEPENDS H5make_libsettings H5lib_settings.c WORKING_DIRECTORY ${HDF5_SRC_BINARY_DIR} + COMMENT "Copy H5lib_settings.c to shared folder" ) set_source_files_properties (${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE) endif () @@ -1126,7 +1124,10 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF) #----------------------------------------------------------------------------- if (NOT ONLY_SHARED_LIBS) set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c) - add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2) + add_custom_target (gen_${HDF5_LIB_TARGET} ALL + DEPENDS ${lib_prog_deps} ${gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/gen_SRCS.stamp2 + COMMENT "Generation target files" + ) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) target_include_directories (${HDF5_LIB_TARGET} @@ -1162,7 +1163,10 @@ endif () if (BUILD_SHARED_LIBS) set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/shared/H5lib_settings.c) - add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2) + add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL + DEPENDS ${lib_prog_deps} ${shared_gen_SRCS} ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_SRC_BINARY_DIR}/shared/shared_gen_SRCS.stamp2 + COMMENT "Shared generation target files" + ) add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS}) target_include_directories (${HDF5_LIBSH_TARGET} @@ -1281,7 +1285,11 @@ install ( ) if (NOT WIN32) - set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + set (_PKG_CONFIG_COMPILER ${MPI_C_COMPILER}) + else () + set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) + endif () configure_file ( ${HDF_RESOURCES_DIR}/libh5cc.in ${HDF5_BINARY_DIR}/CMakeFiles/h5cc @@ -1293,6 +1301,20 @@ if (NOT WIN32) PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE COMPONENT libraries ) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + #legacy requires a different name + configure_file ( + ${HDF_RESOURCES_DIR}/libh5cc.in + ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc + @ONLY + ) + install ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5pcc + DESTINATION ${HDF5_INSTALL_BIN_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + COMPONENT libraries + ) + endif () endif () #----------------------------------------------------------------------------- @@ -1306,16 +1328,18 @@ if (DOXYGEN_FOUND) set (DOXYGEN_VERBATIM_VARS DOXYGEN_INCLUDE_ALIASES) set (DOXYGEN_PROJECT_LOGO ${HDF5_DOXYGEN_DIR}/img/HDFG-logo.png) set (DOXYGEN_PROJECT_BRIEF "C-API Reference") - set (DOXYGEN_INPUT_DIRECTORY "${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}/shared") + set (DOXYGEN_INPUT_DIRECTORY "${HDF5_SRC_DIR} ${HDF5_DOXYGEN_DIR}/dox ${HDF5_GENERATED_SOURCE_DIR}") set (DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) set (DOXYGEN_MACRO_EXPANSION YES) set (DOXYGEN_OUTPUT_DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs) + set (DOXYGEN_EXAMPLES_DIRECTORY ${HDF5_DOXYGEN_DIR}/examples) # This configure and custom target work together # Replace variables inside @@ with the current values configure_file (${HDF5_DOXYGEN_DIR}/Doxyfile.in ${HDF5_BINARY_DIR}/Doxyfile @ONLY) add_custom_target (hdf5lib_doc ALL COMMAND ${DOXYGEN_EXECUTABLE} ${HDF5_BINARY_DIR}/Doxyfile + DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_SRC_BINARY_DIR}/H5lib_settings.c WORKING_DIRECTORY ${HDF5_SRC_DIR} COMMENT "Generating HDF5 library Source API documentation with Doxygen" VERBATIM ) diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake index 4d23de3ced7..b28bbd60717 100644 --- a/test/ShellTests.cmake +++ b/test/ShellTests.cmake @@ -197,18 +197,22 @@ if (UNIX) # testvdsswmr.sh: vds_swmr* add_test (H5SHELL-testflushrefresh ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testflushrefresh.sh) set_tests_properties (H5SHELL-testflushrefresh PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (H5SHELL-test_usecases ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/test_usecases.sh) set_tests_properties (H5SHELL-test_usecases PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (H5SHELL-testswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.sh) set_tests_properties (H5SHELL-testswmr PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (H5SHELL-testvdsswmr ${SH_PROGRAM} ${HDF5_TEST_BINARY_DIR}/H5TEST/testvdsswmr.sh) set_tests_properties (H5SHELL-testvdsswmr PROPERTIES + ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) From 7579264d34e0e34789406722dff8a1dd8ae61842 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Apr 2021 14:18:48 -0500 Subject: [PATCH 46/66] Fortran target depends --- fortran/src/CMakeLists.txt | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 432788e882c..c3131d4c8f3 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -88,7 +88,7 @@ if (NOT ONLY_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -101,7 +101,7 @@ if (BUILD_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared - DEPENDS H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h + DEPENDS H5_buildiface H5match_types ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE) set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 PROPERTIES GENERATED TRUE) @@ -131,25 +131,30 @@ set (f90CStub_C_SOURCES set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h +) +set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES LANGUAGE C) + +set (f90CStub_CGEN_HDRS # generated files ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ) add_custom_target (H5gen_i ALL - DEPENDS H5match_types ${f90CStub_C_HDRS} + DEPENDS H5match_types ${f90CStub_CGEN_HDRS} ) -set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES GENERATED TRUE) -set (f90CStub_C_SHHDRS +set (f90CStub_CGEN_SHHDRS # generated files ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ) add_custom_target (H5gen_iSH ALL - DEPENDS H5match_types ${f90CStub_C_SHHDRS} + DEPENDS H5match_types ${f90CStub_CGEN_SHHDRS} ) -set_source_files_properties (${f90CStub_C_SHHDRS} PROPERTIES GENERATED TRUE) if (NOT ONLY_SHARED_LIBS) - add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) + add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_HDRS}) target_include_directories (${HDF5_F90_C_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" @@ -163,11 +168,12 @@ if (NOT ONLY_SHARED_LIBS) FOLDER libraries/fortran LINKER_LANGUAGE C ) + add_dependencies (${HDF5_F90_C_LIB_TARGET} H5gen_i) set (install_targets ${HDF5_F90_C_LIB_TARGET}) endif () if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS}) + add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_SHHDRS}) target_include_directories (${HDF5_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$:${MPI_C_INCLUDE_DIRS}>" INTERFACE "$/include>" @@ -182,6 +188,7 @@ if (BUILD_SHARED_LIBS) FOLDER libraries/fortran LINKER_LANGUAGE C ) + add_dependencies (${HDF5_F90_C_LIBSH_TARGET} H5gen_iSH) set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET}) endif () @@ -220,7 +227,7 @@ add_custom_command (TARGET H5_buildiface POST_BUILD BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS ${f90_F_GEN_SOURCES} + DEPENDS H5_buildiface ${f90_F_GEN_SOURCES} COMMENT "Generating the H5_gen.F90 file" ) if (NOT ONLY_SHARED_LIBS) @@ -229,7 +236,7 @@ if (NOT ONLY_SHARED_LIBS) COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static - DEPENDS ${HDF5_F90_BINARY_DIR}/H5_gen.F90 + DEPENDS H5_buildiface ${HDF5_F90_BINARY_DIR}/H5_gen.F90 COMMENT "Generating the H5_gen.F90 file" ) add_custom_target (H5gen ALL From ec8c0038f37d2d807f54ea07fd09a8a303a17f0d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Apr 2021 16:15:51 -0500 Subject: [PATCH 47/66] Remove incorrect source attribute --- fortran/src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index c3131d4c8f3..17d0286cefa 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -135,7 +135,6 @@ set (f90CStub_C_HDRS ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ) -set_source_files_properties (${f90CStub_C_HDRS} PROPERTIES LANGUAGE C) set (f90CStub_CGEN_HDRS # generated files From b899fd288556f1e9d3fc7157524cee86b0f29647 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Apr 2021 16:26:38 -0500 Subject: [PATCH 48/66] Revert define removal --- config/cmake/H5pubconf.h.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 2f2a6627486..59f0dca47be 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -243,9 +243,21 @@ /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ +/* Define to 1 if you have the `llround' function. */ +#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@ + +/* Define to 1 if you have the `llroundf' function. */ +#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@ + /* Define to 1 if you have the `longjmp' function. */ #cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@ +/* Define to 1 if you have the `lround' function. */ +#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@ + +/* Define to 1 if you have the `lroundf' function. */ +#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@ + /* Define to 1 if you have the `lseek64' function. */ #cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@ @@ -307,6 +319,12 @@ compiled */ #cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@ +/* Define to 1 if you have the `round' function. */ +#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@ + +/* Define to 1 if you have the `roundf' function. */ +#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@ + /* Define to 1 if you have the `setjmp' function. */ #cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@ From 3a97a18787591f4c23d0899c3a4166ebdb0328ea Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Apr 2021 16:10:21 -0500 Subject: [PATCH 49/66] printf specifiers and VS2015 min changes --- hl/tools/h5watch/h5watch.c | 5 +- java/src/jni/h5util.c | 2 +- src/H5ACmpio.c | 10 +- src/H5Abtree2.c | 9 +- src/H5B2dbg.c | 15 +- src/H5B2test.c | 4 +- src/H5Bdbg.c | 11 +- src/H5C.c | 669 ++++++++++++----------- src/H5Cdbg.c | 12 +- src/H5Cimage.c | 3 +- src/H5Cmpio.c | 15 +- src/H5Dbtree.c | 4 +- src/H5Dbtree2.c | 10 +- src/H5Dchunk.c | 7 +- src/H5Ddbg.c | 3 +- src/H5Dearray.c | 12 +- src/H5Dfarray.c | 12 +- src/H5Dmpio.c | 10 +- src/H5Dnone.c | 2 +- src/H5Dsingle.c | 2 +- src/H5EAdbg.c | 39 +- src/H5Eint.c | 33 +- src/H5FAdbg.c | 23 +- src/H5FDfamily.c | 2 +- src/H5FDlog.c | 70 +-- src/H5FDs3comms.c | 9 +- src/H5FSdbg.c | 19 +- src/H5Fdbg.c | 11 +- src/H5Gent.c | 6 +- src/H5HFbtree2.c | 16 +- src/H5HFdbg.c | 86 +-- src/H5HFdblock.c | 2 +- src/H5HLdbg.c | 9 +- src/H5I.c | 24 +- src/H5L.c | 12 +- src/H5MFdbg.c | 21 +- src/H5Oainfo.c | 16 +- src/H5Oattr.c | 14 +- src/H5Ocache_image.c | 5 +- src/H5Ocont.c | 2 +- src/H5Odbg.c | 31 +- src/H5Oefl.c | 18 +- src/H5Ofill.c | 2 +- src/H5Ofsinfo.c | 24 +- src/H5Oint.c | 6 +- src/H5Olayout.c | 15 +- src/H5Olinfo.c | 19 +- src/H5Olink.c | 9 +- src/H5Opline.c | 6 +- src/H5Osdspace.c | 4 +- src/H5Oshared.c | 41 +- src/H5Oshmesg.c | 5 +- src/H5Ostab.c | 4 +- src/H5SM.c | 22 +- src/H5SMbtree2.c | 6 +- src/H5Sdbg.c | 1 - src/H5Smpio.c | 28 +- src/H5Tconv.c | 220 ++++---- src/H5Tdbg.c | 11 +- src/H5Z.c | 23 +- src/H5dbg.c | 2 +- src/H5private.h | 24 +- src/H5system.c | 477 +---------------- src/H5trace.c | 26 +- src/H5win32defs.h | 112 +--- test/accum.c | 15 +- test/big.c | 6 +- test/btree2.c | 4 +- test/cache.c | 32 +- test/cache_api.c | 10 +- test/cache_common.c | 8 +- test/cmpd_dset.c | 46 +- test/dangle.c | 10 +- test/direct_chunk.c | 2 +- test/dsets.c | 52 +- test/dt_arith.c | 22 +- test/dtypes.c | 2 +- test/earray.c | 45 +- test/enum.c | 4 +- test/error_test.c | 2 +- test/external.c | 4 +- test/farray.c | 14 +- test/fheap.c | 786 ++++++++++++++-------------- test/filenotclosed.c | 2 +- test/fillval.c | 77 +-- test/filter_fail.c | 4 +- test/filter_plugin.c | 2 +- test/freespace.c | 15 +- test/gen_cross.c | 2 +- test/gen_filters.c | 4 +- test/getname.c | 4 +- test/gheap.c | 4 +- test/h5test.c | 5 +- test/hdfs.c | 58 +- test/istore.c | 6 +- test/lheap.c | 2 +- test/links.c | 12 +- test/links_env.c | 2 +- test/mf.c | 21 +- test/mirror_vfd.c | 10 +- test/mtime.c | 2 +- test/ntypes.c | 188 +++---- test/page_buffer.c | 2 +- test/pool.c | 4 +- test/ros3.c | 58 +- test/s3comms.c | 76 +-- test/set_extent.c | 2 +- test/tarray.c | 2 +- test/tcoords.c | 20 +- test/testframe.c | 10 +- test/testhdf5.c | 2 +- test/testmeta.c | 4 +- test/tfile.c | 2 +- test/tgenprop.c | 2 +- test/thread_id.c | 14 +- test/timer.c | 9 +- test/tmisc.c | 4 +- test/tselect.c | 6 +- test/ttsafe.c | 2 +- test/ttsafe_cancel.c | 24 +- test/ttsafe_dcreate.c | 2 +- test/ttsafe_error.c | 1 + test/tunicode.c | 8 +- test/tvlstr.c | 6 +- test/tvltypes.c | 14 +- test/twriteorder.c | 10 +- test/unlink.c | 2 +- test/use_append_mchunks.c | 10 +- test/use_common.c | 6 +- test/vfd.c | 12 +- testpar/t_bigio.c | 53 +- testpar/t_cache.c | 98 ++-- testpar/t_cache_image.c | 8 +- testpar/t_chunk_alloc.c | 10 +- testpar/t_coll_chunk.c | 21 +- testpar/t_coll_md_read.c | 16 +- testpar/t_dset.c | 219 ++++---- testpar/t_file.c | 78 +-- testpar/t_filter_read.c | 8 +- testpar/t_filters_parallel.c | 134 +++-- testpar/t_mdset.c | 132 +---- testpar/t_mpi.c | 2 +- testpar/t_prestart.c | 15 +- testpar/t_prop.c | 2 +- testpar/t_pshutdown.c | 8 +- testpar/t_shapesame.c | 63 +-- testpar/t_span_tree.c | 56 +- tools/lib/h5diff_util.c | 4 +- tools/lib/h5tools_dump.c | 4 +- tools/src/h5dump/h5dump_ddl.c | 6 +- tools/src/h5dump/h5dump_xml.c | 4 +- tools/src/h5ls/h5ls.c | 4 +- tools/src/h5stat/h5stat.c | 82 +-- tools/src/misc/h5clear.c | 2 +- tools/src/misc/h5debug.c | 2 +- tools/test/perform/perf.c | 5 +- tools/test/perform/pio_standalone.h | 12 +- tools/test/perform/sio_standalone.h | 12 +- 158 files changed, 2302 insertions(+), 2928 deletions(-) diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 7e1b734b6d8..a5e82ca6cb4 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -182,7 +182,7 @@ doprint(hid_t did, const hsize_t *start, const hsize_t *block, int rank) info.dset_format = "DSET-%s "; info.dset_hidefileno = 0; - info.obj_format = "-%lu:" H5_PRINTF_HADDR_FMT; + info.obj_format = "-%lu:%" PRIuHADDR; info.obj_hidefileno = 0; info.dset_blockformat_pre = "%sBlk%lu: "; @@ -340,7 +340,8 @@ monitor_dataset(hid_t fid, char *dsetname) if (i != ndims) { /* Printing changes in dimension sizes */ for (u = 0; u < ndims; u++) { - HDfprintf(stdout, "dimension %u: %Hu->%Hu", (unsigned)u, prev_dims[u], cur_dims[u]); + HDfprintf(stdout, "dimension %d: %" PRIuHSIZE "->%" PRIuHSIZE "", u, prev_dims[u], + cur_dims[u]); if (cur_dims[u] > prev_dims[u]) HDfprintf(stdout, " (increases)\n"); else if (cur_dims[u] < prev_dims[u]) diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 0b01411adc4..c05fee6de73 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -1059,7 +1059,7 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i H5_LIBRARY_ERROR(ENVONLY); /* Print object data and close object */ - if (HDsprintf(this_str, "%u-%lu", (unsigned)oi.type, oi.addr) < 0) + if (HDsprintf(this_str, "%u-%llu", (unsigned)oi.type, oi.addr) < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsprintf failure"); if (H5Oclose(obj) < 0) diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index 6bd40a71d28..39cc62c5936 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -1272,7 +1272,7 @@ H5AC__propagate_and_apply_candidate_list(H5F_t *f) if (aux_ptr->write_done) (aux_ptr->write_done)(); - /* to prevent "messages from the past" we must synchronize all + /* To prevent "messages from the past" we must synchronize all * processes again before we go on. */ if (MPI_SUCCESS != (mpi_result = MPI_Barrier(aux_ptr->mpi_comm))) @@ -1901,28 +1901,22 @@ H5AC__rsp__p0_only__flush(H5F_t *f) /* Check for error on the write operation */ if (result < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush.") /* this code exists primarily for the test bed -- it allows us to * enforce POSIX semantics on the server that pretends to be a * file system in our parallel tests. */ - if (aux_ptr->write_done) { - + if (aux_ptr->write_done) (aux_ptr->write_done)(); - } } /* end if */ /* Propagate cleaned entries to other ranks. */ if (H5AC__propagate_flushed_and_still_clean_entries_list(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't propagate clean entries list.") done: - FUNC_LEAVE_NOAPI(ret_value) - } /* H5AC__rsp__p0_only__flush() */ /*------------------------------------------------------------------------- diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c index 86f4cc8d461..3274dd78534 100644 --- a/src/H5Abtree2.c +++ b/src/H5Abtree2.c @@ -364,9 +364,8 @@ H5A__dense_btree2_name_debug(FILE *stream, int indent, int fwidth, const void *_ FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u, %08lx}\n", indent, "", fwidth, - "Record:", (hsize_t)nrecord->id.val, (unsigned)nrecord->flags, (unsigned)nrecord->corder, - (unsigned long)nrecord->hash); + HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u, %08" PRIx32 "}\n", indent, "", fwidth, + "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder, nrecord->hash); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A__dense_btree2_name_debug() */ @@ -516,8 +515,8 @@ H5A__dense_btree2_corder_debug(FILE *stream, int indent, int fwidth, const void FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%016Hx, %02x, %u}\n", indent, "", fwidth, "Record:", (hsize_t)nrecord->id.val, - (unsigned)nrecord->flags, (unsigned)nrecord->corder); + HDfprintf(stream, "%*s%-*s {%016" PRIx64 ", %02" PRIx8 ", %u}\n", indent, "", fwidth, + "Record:", nrecord->id.val, nrecord->flags, (unsigned)nrecord->corder); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5A__dense_btree2_corder_debug() */ diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 2d1a31a65ca..711b2005ec4 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -119,10 +119,12 @@ H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty flag:", hdr->cache_info.is_dirty ? "True" : "False"); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Depth:", hdr->depth); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of records in tree:", hdr->root.all_nrec); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Number of records in tree:", hdr->root.all_nrec); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of records in root node:", hdr->root.node_nrec); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of root node:", hdr->root.addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Address of root node:", hdr->root.addr); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Split percent:", hdr->split_percent); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Merge percent:", hdr->merge_percent); @@ -215,8 +217,8 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co for (u = 0; u < internal->nrec; u++) { /* Print node pointer */ HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u); - HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str, - internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, + HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), + temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, internal->node_ptrs[u].addr); /* Print record */ @@ -229,8 +231,9 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co /* Print final node pointer */ HDsnprintf(temp_str, sizeof(temp_str), "Node pointer #%u: (all/node/addr)", u); - HDfprintf(stream, "%*s%-*s (%Hu/%u/%a)\n", indent + 3, "", MAX(0, fwidth - 3), temp_str, - internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, internal->node_ptrs[u].addr); + HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE "/%u/%" PRIuHADDR ")\n", indent + 3, "", MAX(0, fwidth - 3), + temp_str, internal->node_ptrs[u].all_nrec, internal->node_ptrs[u].node_nrec, + internal->node_ptrs[u].addr); done: if (hdr && H5B2__hdr_unprotect(hdr, H5AC__NO_FLAGS_SET) < 0) diff --git a/src/H5B2test.c b/src/H5B2test.c index fe7fee726ea..2b84332b1d2 100644 --- a/src/H5B2test.c +++ b/src/H5B2test.c @@ -305,7 +305,7 @@ H5B2__test_debug(FILE *stream, int indent, int fwidth, const void *record, const HDassert(record); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Record:", *(const hsize_t *)record); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Record:", *(const hsize_t *)record); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5B2__test_debug() */ @@ -435,7 +435,7 @@ H5B2__test2_debug(FILE *stream, int indent, int fwidth, const void *record, cons HDassert(record); - HDfprintf(stream, "%*s%-*s (%Hu, %Hu)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s (%" PRIuHSIZE ", %" PRIuHSIZE ")\n", indent, "", fwidth, "Record:", ((const H5B2_test_rec_t *)record)->key, ((const H5B2_test_rec_t *)record)->val); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Bdbg.c b/src/H5Bdbg.c index f8a86b78541..23d0a8f6920 100644 --- a/src/H5Bdbg.c +++ b/src/H5Bdbg.c @@ -95,13 +95,13 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5 ((shared->type->id) == H5B_SNODE_ID ? "H5B_SNODE_ID" : ((shared->type->id) == H5B_CHUNK_ID ? "H5B_CHUNK_ID" : "Unknown!"))); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of node:", shared->sizeof_rnode); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of raw (disk) key:", shared->sizeof_rkey); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Dirty flag:", bt->cache_info.is_dirty ? "True" : "False"); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Level:", bt->level); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of left sibling:", bt->left); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of right sibling:", bt->right); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of left sibling:", bt->left); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of right sibling:", bt->right); HDfprintf(stream, "%*s%-*s %u (%u)\n", indent, "", fwidth, "Number of children (max):", bt->nchildren, shared->two_k); @@ -110,7 +110,8 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, const H5 */ for (u = 0; u < bt->nchildren; u++) { HDfprintf(stream, "%*sChild %d...\n", indent, "", u); - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "Address:", bt->child[u]); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), + "Address:", bt->child[u]); /* If there is a key debugging routine, use it to display the left & right keys */ if (type->debug_key) { diff --git a/src/H5C.c b/src/H5C.c index ad5f62b7d43..8930c75ea92 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -596,18 +596,18 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, HDfprintf(stdout, "%sAuto cache resize -- hit rate (%lf) out of bounds low (%6.5lf).\n", cache_ptr->prefix, hit_rate, (cache_ptr->resize_ctl).lower_hr_threshold); - HDfprintf(stdout, "%scache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, + HDfprintf(stdout, "%scache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; case flash_increase: HDassert(old_max_cache_size < new_max_cache_size); - HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %Zu.\n", cache_ptr->prefix, + HDfprintf(stdout, "%sflash cache resize(%d) -- size threshold = %zu.\n", cache_ptr->prefix, (int)((cache_ptr->resize_ctl).flash_incr_mode), cache_ptr->flash_size_increase_threshold); - HDfprintf(stdout, "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, + HDfprintf(stdout, "%s cache size increased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; @@ -648,7 +648,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t *cache_ptr, cache_ptr->prefix, hit_rate); } - HDfprintf(stdout, "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n", cache_ptr->prefix, + HDfprintf(stdout, "%s cache size decreased from (%zu/%zu) to (%zu/%zu).\n", cache_ptr->prefix, old_max_cache_size, old_min_clean_size, new_max_cache_size, new_min_clean_size); break; @@ -905,7 +905,7 @@ H5C_dest(H5F_t *f) if (cache_ptr->get_entry_ptr_from_addr_counter > 0) { - HDfprintf(stdout, "*** %ld calls to H5C_get_entry_ptr_from_add(). ***\n", + HDfprintf(stdout, "*** %" PRId64 " calls to H5C_get_entry_ptr_from_add(). ***\n", cache_ptr->get_entry_ptr_from_addr_counter); } #endif /* H5C_DO_SANITY_CHECKS */ @@ -970,8 +970,7 @@ H5C_evict(H5F_t *f) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict entries in the cache") - /* Disable the slist, - */ + /* Disable the slist */ if (H5C_set_slist_enabled(f->shared->cache, FALSE, TRUE) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "set slist disabled failed") @@ -984,8 +983,8 @@ H5C_evict(H5F_t *f) * Function: H5C_expunge_entry * * Purpose: Use this function to tell the cache to expunge an entry - * from the cache without writing it to disk even if it is - * dirty. The entry may not be either pinned or protected. + * from the cache without writing it to disk even if it is + * dirty. The entry may not be either pinned or protected. * * Return: Non-negative on success/Negative on failure * @@ -1756,7 +1755,7 @@ H5C_mark_entry_clean(void *_thing) * Function: H5C_mark_entry_unserialized * * Purpose: Mark a pinned or protected entry as unserialized. The target - * entry MUST be either pinned or protected, and MAY be both. + * entry MUST be either pinned or protected, and MAY be both. * * Return: Non-negative on success/Negative on failure * @@ -1802,7 +1801,7 @@ H5C_mark_entry_unserialized(void *thing) * Function: H5C_mark_entry_serialized * * Purpose: Mark a pinned entry as serialized. The target entry MUST be - * pinned. + * pinned. * * Return: Non-negative on success/Negative on failure * @@ -3066,15 +3065,15 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli * Function: H5C_unpin_entry() * * Purpose: Unpin a cache entry. The entry can be either protected or - * unprotected at the time of call, but must be pinned. + * unprotected at the time of call, but must be pinned. * * Return: Non-negative on success/Negative on failure * * Programmer: John Mainzer * 3/22/06 * - * Changes: Added extreme sanity checks on entry and exit. - JRM -- 4/26/14 + * Changes: Added extreme sanity checks on entry and exit. + * JRM -- 4/26/14 * *------------------------------------------------------------------------- */ @@ -3546,382 +3545,382 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit") #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(ret_value) - } /* H5C_unprotect() */ +} /* H5C_unprotect() */ - /*------------------------------------------------------------------------- - * - * Function: H5C_unsettle_entry_ring - * - * Purpose: Advise the metadata cache that the specified entry's free space - * manager ring is no longer settled (if it was on entry). - * - * If the target free space manager ring is already - * unsettled, do nothing, and return SUCCEED. - * - * If the target free space manager ring is settled, and - * we are not in the process of a file shutdown, mark - * the ring as unsettled, and return SUCCEED. - * - * If the target free space manager is settled, and we - * are in the process of a file shutdown, post an error - * message, and return FAIL. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * January 3, 2017 - * - *------------------------------------------------------------------------- - */ - herr_t H5C_unsettle_entry_ring(void *_entry) - { - H5C_cache_entry_t *entry = (H5C_cache_entry_t *)_entry; /* Entry whose ring to unsettle */ - H5C_t * cache; /* Cache for file */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) +/*------------------------------------------------------------------------- + * + * Function: H5C_unsettle_entry_ring + * + * Purpose: Advise the metadata cache that the specified entry's free space + * manager ring is no longer settled (if it was on entry). + * + * If the target free space manager ring is already + * unsettled, do nothing, and return SUCCEED. + * + * If the target free space manager ring is settled, and + * we are not in the process of a file shutdown, mark + * the ring as unsettled, and return SUCCEED. + * + * If the target free space manager is settled, and we + * are in the process of a file shutdown, post an error + * message, and return FAIL. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * January 3, 2017 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_unsettle_entry_ring(void *_entry) +{ + H5C_cache_entry_t *entry = (H5C_cache_entry_t *)_entry; /* Entry whose ring to unsettle */ + H5C_t * cache; /* Cache for file */ + herr_t ret_value = SUCCEED; /* Return value */ - /* Sanity checks */ - HDassert(entry); - HDassert(entry->ring != H5C_RING_UNDEFINED); - HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) || - (H5C_RING_MDFSM == entry->ring)); - cache = entry->cache_ptr; - HDassert(cache); - HDassert(cache->magic == H5C__H5C_T_MAGIC); + FUNC_ENTER_NOAPI(FAIL) - switch (entry->ring) { - case H5C_RING_USER: - /* Do nothing */ - break; + /* Sanity checks */ + HDassert(entry); + HDassert(entry->ring != H5C_RING_UNDEFINED); + HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) || + (H5C_RING_MDFSM == entry->ring)); + cache = entry->cache_ptr; + HDassert(cache); + HDassert(cache->magic == H5C__H5C_T_MAGIC); + + switch (entry->ring) { + case H5C_RING_USER: + /* Do nothing */ + break; - case H5C_RING_RDFSM: - if (cache->rdfsm_settled) { - if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") - cache->rdfsm_settled = FALSE; - } /* end if */ - break; + case H5C_RING_RDFSM: + if (cache->rdfsm_settled) { + if (cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + cache->rdfsm_settled = FALSE; + } /* end if */ + break; - case H5C_RING_MDFSM: - if (cache->mdfsm_settled) { - if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") - cache->mdfsm_settled = FALSE; - } /* end if */ - break; + case H5C_RING_MDFSM: + if (cache->mdfsm_settled) { + if (cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + cache->mdfsm_settled = FALSE; + } /* end if */ + break; - default: - HDassert(FALSE); /* this should be un-reachable */ - break; - } /* end switch */ + default: + HDassert(FALSE); /* this should be un-reachable */ + break; + } /* end switch */ done: - FUNC_LEAVE_NOAPI(ret_value) - } /* H5C_unsettle_entry_ring() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_unsettle_entry_ring() */ - /*------------------------------------------------------------------------- - * Function: H5C_unsettle_ring() - * - * Purpose: Advise the metadata cache that the specified free space - * manager ring is no longer settled (if it was on entry). - * - * If the target free space manager ring is already - * unsettled, do nothing, and return SUCCEED. - * - * If the target free space manager ring is settled, and - * we are not in the process of a file shutdown, mark - * the ring as unsettled, and return SUCCEED. - * - * If the target free space manager is settled, and we - * are in the process of a file shutdown, post an error - * message, and return FAIL. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 10/15/16 - * - *------------------------------------------------------------------------- - */ - herr_t H5C_unsettle_ring(H5F_t * f, H5C_ring_t ring) - { - H5C_t *cache_ptr; - herr_t ret_value = SUCCEED; /* Return value */ +/*------------------------------------------------------------------------- + * Function: H5C_unsettle_ring() + * + * Purpose: Advise the metadata cache that the specified free space + * manager ring is no longer settled (if it was on entry). + * + * If the target free space manager ring is already + * unsettled, do nothing, and return SUCCEED. + * + * If the target free space manager ring is settled, and + * we are not in the process of a file shutdown, mark + * the ring as unsettled, and return SUCCEED. + * + * If the target free space manager is settled, and we + * are in the process of a file shutdown, post an error + * message, and return FAIL. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 10/15/16 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring) +{ + H5C_t *cache_ptr; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(FAIL) - /* Sanity checks */ - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->cache); - HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring)); - cache_ptr = f->shared->cache; - HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic); - - switch (ring) { - case H5C_RING_RDFSM: - if (cache_ptr->rdfsm_settled) { - if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") - cache_ptr->rdfsm_settled = FALSE; - } /* end if */ - break; + /* Sanity checks */ + HDassert(f); + HDassert(f->shared); + HDassert(f->shared->cache); + HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring)); + cache_ptr = f->shared->cache; + HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic); + + switch (ring) { + case H5C_RING_RDFSM: + if (cache_ptr->rdfsm_settled) { + if (cache_ptr->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + cache_ptr->rdfsm_settled = FALSE; + } /* end if */ + break; - case H5C_RING_MDFSM: - if (cache_ptr->mdfsm_settled) { - if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") - cache_ptr->mdfsm_settled = FALSE; - } /* end if */ - break; + case H5C_RING_MDFSM: + if (cache_ptr->mdfsm_settled) { + if (cache_ptr->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + cache_ptr->mdfsm_settled = FALSE; + } /* end if */ + break; - default: - HDassert(FALSE); /* this should be un-reachable */ - break; - } /* end switch */ + default: + HDassert(FALSE); /* this should be un-reachable */ + break; + } /* end switch */ done: - FUNC_LEAVE_NOAPI(ret_value) - } /* H5C_unsettle_ring() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_unsettle_ring() */ - /*------------------------------------------------------------------------- - * Function: H5C_validate_resize_config() - * - * Purpose: Run a sanity check on the specified sections of the - * provided instance of struct H5C_auto_size_ctl_t. - * - * Do nothing and return SUCCEED if no errors are detected, - * and flag an error and return FAIL otherwise. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 3/23/05 - * - *------------------------------------------------------------------------- - */ - herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr, unsigned int tests) - { - herr_t ret_value = SUCCEED; /* Return value */ +/*------------------------------------------------------------------------- + * Function: H5C_validate_resize_config() + * + * Purpose: Run a sanity check on the specified sections of the + * provided instance of struct H5C_auto_size_ctl_t. + * + * Do nothing and return SUCCEED if no errors are detected, + * and flag an error and return FAIL otherwise. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 3/23/05 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) +{ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(FAIL) - if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") + if (config_ptr == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") - if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version") + if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version") - if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) { + if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) { - if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big") + if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big") - if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small") + if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small") - if (config_ptr->min_size > config_ptr->max_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size") + if (config_ptr->min_size > config_ptr->max_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size") - if (config_ptr->set_initial_size && ((config_ptr->initial_size < config_ptr->min_size) || - (config_ptr->initial_size > config_ptr->max_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "initial_size must be in the interval [min_size, max_size]") + if (config_ptr->set_initial_size && ((config_ptr->initial_size < config_ptr->min_size) || + (config_ptr->initial_size > config_ptr->max_size))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "initial_size must be in the interval [min_size, max_size]") - if ((config_ptr->min_clean_fraction < (double)0.0f) || - (config_ptr->min_clean_fraction > (double)1.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "min_clean_fraction must be in the interval [0.0, 1.0]") + if ((config_ptr->min_clean_fraction < (double)0.0f) || + (config_ptr->min_clean_fraction > (double)1.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_clean_fraction must be in the interval [0.0, 1.0]") - if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small") + if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small") - if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big") - } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */ + if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big") + } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */ - if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) { - if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode") + if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) { + if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode") - if (config_ptr->incr_mode == H5C_incr__threshold) { - if ((config_ptr->lower_hr_threshold < (double)0.0f) || - (config_ptr->lower_hr_threshold > (double)1.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "lower_hr_threshold must be in the range [0.0, 1.0]") + if (config_ptr->incr_mode == H5C_incr__threshold) { + if ((config_ptr->lower_hr_threshold < (double)0.0f) || + (config_ptr->lower_hr_threshold > (double)1.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "lower_hr_threshold must be in the range [0.0, 1.0]") - if (config_ptr->increment < (double)1.0f) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "increment must be greater than or equal to 1.0") + if (config_ptr->increment < (double)1.0f) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0") - /* no need to check max_increment, as it is a size_t, - * and thus must be non-negative. - */ - } /* H5C_incr__threshold */ + /* no need to check max_increment, as it is a size_t, + * and thus must be non-negative. + */ + } /* H5C_incr__threshold */ - switch (config_ptr->flash_incr_mode) { - case H5C_flash_incr__off: - /* nothing to do here */ - break; + switch (config_ptr->flash_incr_mode) { + case H5C_flash_incr__off: + /* nothing to do here */ + break; - case H5C_flash_incr__add_space: - if ((config_ptr->flash_multiple < (double)0.1f) || - (config_ptr->flash_multiple > (double)10.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_multiple must be in the range [0.1, 10.0]") - if ((config_ptr->flash_threshold < (double)0.1f) || - (config_ptr->flash_threshold > (double)1.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_threshold must be in the range [0.1, 1.0]") - break; + case H5C_flash_incr__add_space: + if ((config_ptr->flash_multiple < (double)0.1f) || + (config_ptr->flash_multiple > (double)10.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "flash_multiple must be in the range [0.1, 10.0]") + if ((config_ptr->flash_threshold < (double)0.1f) || + (config_ptr->flash_threshold > (double)1.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "flash_threshold must be in the range [0.1, 1.0]") + break; - default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode") - break; - } /* end switch */ - } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */ + default: + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode") + break; + } /* end switch */ + } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */ - if ((tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0) { + if ((tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0) { - if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) && - (config_ptr->decr_mode != H5C_decr__age_out) && - (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) { + if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) && + (config_ptr->decr_mode != H5C_decr__age_out) && + (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) { - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode") - } + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode") + } - if (config_ptr->decr_mode == H5C_decr__threshold) { - if (config_ptr->upper_hr_threshold > (double)1.0f) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0") + if (config_ptr->decr_mode == H5C_decr__threshold) { + if (config_ptr->upper_hr_threshold > (double)1.0f) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0") - if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]") + if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]") - /* no need to check max_decrement as it is a size_t - * and thus must be non-negative. - */ - } /* H5C_decr__threshold */ + /* no need to check max_decrement as it is a size_t + * and thus must be non-negative. + */ + } /* H5C_decr__threshold */ - if ((config_ptr->decr_mode == H5C_decr__age_out) || - (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) { + if ((config_ptr->decr_mode == H5C_decr__age_out) || + (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) { - if (config_ptr->epochs_before_eviction < 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive") - if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big") + if (config_ptr->epochs_before_eviction < 1) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive") + if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big") - if ((config_ptr->apply_empty_reserve) && ((config_ptr->empty_reserve > (double)1.0f) || - (config_ptr->empty_reserve < (double)0.0f))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "empty_reserve must be in the interval [0.0, 1.0]") + if ((config_ptr->apply_empty_reserve) && + ((config_ptr->empty_reserve > (double)1.0f) || (config_ptr->empty_reserve < (double)0.0f))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]") - /* no need to check max_decrement as it is a size_t - * and thus must be non-negative. - */ - } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */ + /* no need to check max_decrement as it is a size_t + * and thus must be non-negative. + */ + } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */ - if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) { - if ((config_ptr->upper_hr_threshold > (double)1.0f) || - (config_ptr->upper_hr_threshold < (double)0.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "upper_hr_threshold must be in the interval [0.0, 1.0]") - } /* H5C_decr__age_out_with_threshold */ - } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */ - - if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) { - if ((config_ptr->incr_mode == H5C_incr__threshold) && - ((config_ptr->decr_mode == H5C_decr__threshold) || - (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) && - (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config") - } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */ + if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) { + if ((config_ptr->upper_hr_threshold > (double)1.0f) || + (config_ptr->upper_hr_threshold < (double)0.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "upper_hr_threshold must be in the interval [0.0, 1.0]") + } /* H5C_decr__age_out_with_threshold */ + } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */ + + if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) { + if ((config_ptr->incr_mode == H5C_incr__threshold) && + ((config_ptr->decr_mode == H5C_decr__threshold) || + (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) && + (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config") + } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */ done: - FUNC_LEAVE_NOAPI(ret_value) - } /* H5C_validate_resize_config() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* H5C_validate_resize_config() */ - /*------------------------------------------------------------------------- - * Function: H5C_create_flush_dependency() - * - * Purpose: Initiates a parent<->child entry flush dependency. The parent - * entry must be pinned or protected at the time of call, and must - * have all dependencies removed before the cache can shut down. - * - * Note: Flush dependencies in the cache indicate that a child entry - * must be flushed to the file before its parent. (This is - * currently used to implement Single-Writer/Multiple-Reader (SWMR) - * I/O access for data structures in the file). - * - * Creating a flush dependency between two entries will also pin - * the parent entry. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * 3/05/09 - * - *------------------------------------------------------------------------- - */ - herr_t H5C_create_flush_dependency(void *parent_thing, void *child_thing) - { - H5C_t * cache_ptr; - H5C_cache_entry_t *parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ - H5C_cache_entry_t *child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */ - herr_t ret_value = SUCCEED; /* Return value */ +/*------------------------------------------------------------------------- + * Function: H5C_create_flush_dependency() + * + * Purpose: Initiates a parent<->child entry flush dependency. The parent + * entry must be pinned or protected at the time of call, and must + * have all dependencies removed before the cache can shut down. + * + * Note: Flush dependencies in the cache indicate that a child entry + * must be flushed to the file before its parent. (This is + * currently used to implement Single-Writer/Multiple-Reader (SWMR) + * I/O access for data structures in the file). + * + * Creating a flush dependency between two entries will also pin + * the parent entry. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * 3/05/09 + * + *------------------------------------------------------------------------- + */ +herr_t +H5C_create_flush_dependency(void *parent_thing, void *child_thing) +{ + H5C_t * cache_ptr; + H5C_cache_entry_t *parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ + H5C_cache_entry_t *child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(FAIL) - /* Sanity checks */ - HDassert(parent_entry); - HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(H5F_addr_defined(parent_entry->addr)); - HDassert(child_entry); - HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(H5F_addr_defined(child_entry->addr)); - cache_ptr = parent_entry->cache_ptr; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(cache_ptr == child_entry->cache_ptr); + /* Sanity checks */ + HDassert(parent_entry); + HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(H5F_addr_defined(parent_entry->addr)); + HDassert(child_entry); + HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(H5F_addr_defined(child_entry->addr)); + cache_ptr = parent_entry->cache_ptr; + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(cache_ptr == child_entry->cache_ptr); #ifndef NDEBUG - /* Make sure the parent is not already a parent */ - { - unsigned u; - - for (u = 0; u < child_entry->flush_dep_nparents; u++) - HDassert(child_entry->flush_dep_parent[u] != parent_entry); - } /* end block */ -#endif /* NDEBUG */ - - /* More sanity checks */ - if (child_entry == parent_entry) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, - "Child entry flush dependency parent can't be itself") - if (!(parent_entry->is_protected || parent_entry->is_pinned)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected") - - /* Check for parent not pinned */ - if (!parent_entry->is_pinned) { - /* Sanity check */ - HDassert(parent_entry->flush_dep_nchildren == 0); - HDassert(!parent_entry->pinned_from_client); - HDassert(!parent_entry->pinned_from_cache); + /* Make sure the parent is not already a parent */ + { + unsigned u; - /* Pin the parent entry */ - parent_entry->is_pinned = TRUE; - H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry) - } /* end else */ + for (u = 0; u < child_entry->flush_dep_nparents; u++) + HDassert(child_entry->flush_dep_parent[u] != parent_entry); + } /* end block */ +#endif /* NDEBUG */ + + /* More sanity checks */ + if (child_entry == parent_entry) + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself") + if (!(parent_entry->is_protected || parent_entry->is_pinned)) + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected") + + /* Check for parent not pinned */ + if (!parent_entry->is_pinned) { + /* Sanity check */ + HDassert(parent_entry->flush_dep_nchildren == 0); + HDassert(!parent_entry->pinned_from_client); + HDassert(!parent_entry->pinned_from_cache); + + /* Pin the parent entry */ + parent_entry->is_pinned = TRUE; + H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry) + } /* end else */ - /* Mark the entry as pinned from the cache's action (possibly redundantly) */ - parent_entry->pinned_from_cache = TRUE; + /* Mark the entry as pinned from the cache's action (possibly redundantly) */ + parent_entry->pinned_from_cache = TRUE; - /* Check if we need to resize the child's parent array */ - if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) { - if (child_entry->flush_dep_parent_nalloc == 0) { - /* Array does not exist yet, allocate it */ - HDassert(!child_entry->flush_dep_parent); + /* Check if we need to resize the child's parent array */ + if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) { + if (child_entry->flush_dep_parent_nalloc == 0) { + /* Array does not exist yet, allocate it */ + HDassert(!child_entry->flush_dep_parent); if (NULL == (child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_MALLOC( parent, H5C_FLUSH_DEP_PARENT_INIT * sizeof(H5C_cache_entry_t *)))) diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index f96f38716ad..e602284a957 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -284,9 +284,9 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) HDassert(calling_fcn != NULL); HDfprintf(stdout, "\n\nDumping metadata cache skip list from %s.\n", calling_fcn); - HDfprintf(stdout, " slist enabled = %d.\n", (int)(cache_ptr->slist_enabled)); - HDfprintf(stdout, " slist len = %u.\n", cache_ptr->slist_len); - HDfprintf(stdout, " slist size = %lld.\n", (long long)(cache_ptr->slist_size)); + HDfprintf(stdout, " slist %s.\n", cache_ptr->slist_enabled ? "enabled" : "disabled"); + HDfprintf(stdout, " slist len = %" PRIu32 ".\n", cache_ptr->slist_len); + HDfprintf(stdout, " slist size = %zu.\n", cache_ptr->slist_size); if (cache_ptr->slist_len > 0) { @@ -317,7 +317,7 @@ H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn) (int)(entry_ptr->is_protected), (int)(entry_ptr->is_pinned), (int)(entry_ptr->is_dirty), entry_ptr->type->name); - HDfprintf(stdout, " node_ptr = %p, item = %p\n", node_ptr, H5SL_item(node_ptr)); + HDfprintf(stdout, " node_ptr = %p, item = %p\n", (void *)node_ptr, H5SL_item(node_ptr)); /* increment node_ptr before we delete its target */ @@ -617,8 +617,8 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name, (long long)(cache_ptr->slist_scan_restarts), (long long)(cache_ptr->LRU_scan_restarts), (long long)(cache_ptr->index_scan_restarts)); - HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %Hu\n", cache_ptr->prefix, - cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, + HDfprintf(stdout, "%s cache image creations/reads/loads/size = %d / %d /%d / %" PRIuHSIZE "\n", + cache_ptr->prefix, cache_ptr->images_created, cache_ptr->images_read, cache_ptr->images_loaded, cache_ptr->last_image_size); HDfprintf(stdout, "%s prefetches / dirty prefetches = %lld / %lld\n", cache_ptr->prefix, diff --git a/src/H5Cimage.c b/src/H5Cimage.c index c61b02b452b..fcf1b1c24fd 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -1205,7 +1205,8 @@ H5C_load_cache_image_on_next_protect(H5F_t *f, haddr_t addr, hsize_t len, hbool_ HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); /* Set information needed to load cache image */ - cache_ptr->image_addr = addr, cache_ptr->image_len = len; + cache_ptr->image_addr = addr; + cache_ptr->image_len = len; cache_ptr->load_image = TRUE; cache_ptr->delete_image = rw; diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c index 6243ab6fa21..b7df352eff2 100644 --- a/src/H5Cmpio.c +++ b/src/H5Cmpio.c @@ -18,7 +18,7 @@ * Quincey Koziol * * Purpose: Functions in this file implement support for parallel I/O for - * generic cache code. + * generic cache code. * *------------------------------------------------------------------------- */ @@ -28,7 +28,7 @@ /****************/ #include "H5Cmodule.h" /* This source code file is part of the H5C module */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ /***********/ /* Headers */ @@ -154,10 +154,6 @@ static herr_t H5C__flush_candidates_in_ring(H5F_t *f, H5C_ring_t ring, unsigned * Programmer: John Mainzer * 3/17/10 * - * Changes: Updated sanity checks to allow for the possibility that - * the slist is disabled. - * JRM -- 8/3/20 - * *------------------------------------------------------------------------- */ herr_t @@ -176,11 +172,9 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha unsigned entries_to_clear[H5C_RING_NTYPES]; haddr_t addr; H5C_cache_entry_t *entry_ptr = NULL; - #if H5C_DO_SANITY_CHECKS haddr_t last_addr; #endif /* H5C_DO_SANITY_CHECKS */ - #if H5C_APPLY_CANDIDATE_LIST__DEBUG char tbl_buf[1024]; #endif /* H5C_APPLY_CANDIDATE_LIST__DEBUG */ @@ -743,13 +737,14 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr if (entry_ptr == NULL) { #if H5C_DO_SANITY_CHECKS - HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %a not in cache.\n", u, addr); + HDfprintf(stdout, "H5C_mark_entries_as_clean: entry[%u] = %" PRIuHADDR " not in cache.\n", u, + addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not in cache?!?!?") } /* end if */ else if (!entry_ptr->is_dirty) { #if H5C_DO_SANITY_CHECKS - HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %a is not dirty!?!\n", addr); + HDfprintf(stdout, "H5C_mark_entries_as_clean: entry %" PRIuHADDR " is not dirty!?!\n", addr); #endif /* H5C_DO_SANITY_CHECKS */ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Listed entry not dirty?!?!?") } /* end else-if */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 103808dad89..861b4281bd4 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -741,7 +741,7 @@ H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key, con HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", key->filter_mask); HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < udata->ndims; u++) - HDfprintf(stream, "%s%Hd", u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u])); + HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", (key->scaled[u] * udata->common.layout->dim[u])); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -1370,7 +1370,7 @@ H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__btree_idx_dump() */ diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c index 65a764e7276..f9a4a07a039 100644 --- a/src/H5Dbtree2.c +++ b/src/H5Dbtree2.c @@ -441,11 +441,11 @@ H5D__bt2_unfilt_debug(FILE *stream, int indent, int fwidth, const void *_record, HDassert(ctx->chunk_size == record->nbytes); HDassert(0 == record->filter_mask); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < ctx->ndims; u++) - HDfprintf(stream, "%s%Hd", u ? ", " : "", record->scaled[u] * ctx->dim[u]); + HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -555,13 +555,13 @@ H5D__bt2_filt_debug(FILE *stream, int indent, int fwidth, const void *_record, c HDassert(H5F_addr_defined(record->chunk_addr)); HDassert(0 != record->nbytes); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Chunk address:", record->chunk_addr); HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Chunk size:", (unsigned)record->nbytes); HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "Filter mask:", record->filter_mask); HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Logical offset:"); for (u = 0; u < ctx->ndims; u++) - HDfprintf(stream, "%s%Hd", u ? ", " : "", record->scaled[u] * ctx->dim[u]); + HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", record->scaled[u] * ctx->dim[u]); HDfputs("}\n", stream); FUNC_LEAVE_NOAPI(SUCCEED) @@ -1467,7 +1467,7 @@ H5D__bt2_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__bt2_idx_dump() */ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 75aff082233..7700c0e1048 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -6543,10 +6543,11 @@ H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) } /* end if */ /* Print information about this chunk */ - HDfprintf(udata->stream, " 0x%08x %8Zu %10a [", chunk_rec->filter_mask, chunk_rec->nbytes, - chunk_rec->chunk_addr); + HDfprintf(udata->stream, " 0x%08x %8" PRIu32 " %10" PRIuHADDR " [", chunk_rec->filter_mask, + chunk_rec->nbytes, chunk_rec->chunk_addr); for (u = 0; u < udata->ndims; u++) - HDfprintf(udata->stream, "%s%Hu", (u ? ", " : ""), (chunk_rec->scaled[u] * udata->chunk_dim[u])); + HDfprintf(udata->stream, "%s%" PRIuHSIZE, (u ? ", " : ""), + (chunk_rec->scaled[u] * udata->chunk_dim[u])); HDfputs("]\n", udata->stream); } /* end if */ diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 011bd384bfa..88876971fc3 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -77,7 +77,8 @@ H5Ddebug(hid_t dset_id) if (H5D_CHUNKED == dset->shared->layout.type) (void)H5D__chunk_dump_index(dset, stdout); else if (H5D_CONTIGUOUS == dset->shared->layout.type) - HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr); + HDfprintf(stdout, " %-10s %" PRIuHADDR "\n", + "Address:", dset->shared->layout.storage.u.contig.addr); done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Dearray.c b/src/H5Dearray.c index 500b6746e45..24e8df2ff95 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -417,8 +417,8 @@ H5D__earray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void HDassert(elmt); /* Print element */ - HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); + HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_debug() */ @@ -573,9 +573,9 @@ H5D__earray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const HDassert(elmt); /* Print element */ - HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, elmt->nbytes, - elmt->filter_mask); + HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, + elmt->nbytes, elmt->filter_mask); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_filt_debug() */ @@ -1742,7 +1742,7 @@ H5D__earray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__earray_idx_dump() */ diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c index 62c7948eb33..0741e8f5518 100644 --- a/src/H5Dfarray.c +++ b/src/H5Dfarray.c @@ -415,8 +415,8 @@ H5D__farray_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const void HDassert(elmt); /* Print element */ - HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); + HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, temp_str, *(const haddr_t *)elmt); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_debug() */ @@ -675,9 +675,9 @@ H5D__farray_filt_debug(FILE *stream, int indent, int fwidth, hsize_t idx, const HDassert(elmt); /* Print element */ - HDsprintf(temp_str, "Element #%llu:", (unsigned long long)idx); - HDfprintf(stream, "%*s%-*s {%a, %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, elmt->nbytes, - elmt->filter_mask); + HDsprintf(temp_str, "Element #%" PRIuHSIZE ":", idx); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %u, %0x}\n", indent, "", fwidth, temp_str, elmt->addr, + elmt->nbytes, elmt->filter_mask); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_filt_debug() */ @@ -1591,7 +1591,7 @@ H5D__farray_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__farray_idx_dump() */ diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 8b0d876b96f..573d1d38d92 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -1091,7 +1091,7 @@ H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ #ifdef H5D_DEBUG if (H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "total_chunks = %Zu, num_chunk = %Zu\n", total_chunks, num_chunk); + HDfprintf(H5DEBUG(D), "total_chunks = %zu, num_chunk = %zu\n", total_chunks, num_chunk); #endif /* Set up MPI datatype for chunks selected */ @@ -1571,7 +1571,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty chunk_addr = (haddr_t *)H5MM_calloc(total_chunk * sizeof(haddr_t)); #ifdef H5D_DEBUG if (H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "total_chunk %Zu\n", total_chunk); + HDfprintf(H5DEBUG(D), "total_chunk %zu\n", total_chunk); #endif /* Obtain IO option for each chunk */ @@ -1605,7 +1605,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty #ifdef H5D_DEBUG if (H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "mpi_rank = %d, chunk index = %Zu\n", mpi_rank, u); + HDfprintf(H5DEBUG(D), "mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif /* Get the chunk info for this chunk, if there are elements selected */ chunk_info = fm->select_chunk[u]; @@ -1625,7 +1625,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty if (chunk_io_option[u] == H5D_CHUNK_IO_MODE_COL) { #ifdef H5D_DEBUG if (H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "inside collective chunk IO mpi_rank = %d, chunk index = %Zu\n", + HDfprintf(H5DEBUG(D), "inside collective chunk IO mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif @@ -1664,7 +1664,7 @@ H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *ty else { /* possible independent IO for this chunk */ #ifdef H5D_DEBUG if (H5DEBUG(D)) - HDfprintf(H5DEBUG(D), "inside independent IO mpi_rank = %d, chunk index = %Zu\n", mpi_rank, + HDfprintf(H5DEBUG(D), "inside independent IO mpi_rank = %d, chunk index = %zu\n", mpi_rank, u); #endif diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 49d7c159f4e..b2dfd1a819d 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -470,7 +470,7 @@ H5D__none_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__none_idx_dump() */ diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index 94c34225ddc..50cf6a12c43 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -521,7 +521,7 @@ H5D__single_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream) HDassert(storage); HDassert(stream); - HDfprintf(stream, " Address: %a\n", storage->idx_addr); + HDfprintf(stream, " Address: %" PRIuHADDR "\n", storage->idx_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5D__single_idx_dump() */ diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index 038df1d7cb5..72d2f38cb04 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -111,10 +111,10 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Header size:", hdr->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Log2(Max. # of elements in array):", (unsigned)hdr->cparam.max_nelmts_bits); @@ -126,15 +126,16 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, (unsigned)hdr->cparam.sup_blk_min_data_ptrs); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Log2(Max. # of elements in data block page):", (unsigned)hdr->cparam.max_dblk_page_nelmts_bits); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Highest element index stored (+1):", hdr->stats.stored.max_idx_set); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of super blocks created:", hdr->stats.stored.nsuper_blks); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of data blocks created:", hdr->stats.stored.ndata_blks); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of elements 'realized':", hdr->stats.stored.nelmts); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Index Block Address:", hdr->idx_blk_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Index Block Address:", hdr->idx_blk_addr); CATCH if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0) @@ -198,10 +199,10 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Index Block size:", iblock->size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Index Block size:", iblock->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "# of data block addresses in index block:", iblock->ndblk_addrs); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "# of super block addresses in index block:", iblock->nsblk_addrs); /* Check if there are any elements in index block */ @@ -229,7 +230,7 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, for (u = 0; u < iblock->ndblk_addrs; u++) { /* Print address */ HDsprintf(temp_str, "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, iblock->dblk_addrs[u]); } /* end for */ } /* end if */ @@ -244,7 +245,7 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, for (u = 0; u < iblock->nsblk_addrs; u++) { /* Print address */ HDsprintf(temp_str, "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, iblock->sblk_addrs[u]); } /* end for */ } /* end if */ @@ -312,10 +313,10 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Super Block size:", sblock->size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Super Block size:", sblock->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "# of data block addresses in super block:", sblock->ndblks); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "# of elements in data blocks from this super block:", sblock->dblk_nelmts); /* Check if there are any data block addresses in super block */ @@ -328,7 +329,7 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, for (u = 0; u < sblock->ndblks; u++) { /* Print address */ HDsprintf(temp_str, "Address #%u:", u); - HDfprintf(stream, "%*s%-*s %a\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", (indent + 3), "", MAX(0, (fwidth - 3)), temp_str, sblock->dblk_addrs[u]); } /* end for */ } /* end if */ @@ -390,15 +391,15 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Protect data block */ /* (Note: setting parent of data block to 'hdr' for this operation should be OK -QAK) */ if (NULL == (dblock = H5EA__dblock_protect(hdr, hdr, addr, dblk_nelmts, H5AC__READ_ONLY_FLAG))) - H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %llu", - (unsigned long long)addr) + H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array data block, address = %" PRIuHADDR, + addr) /* Print opening message */ HDfprintf(stream, "%*sExtensible Array data Block...\n", indent, ""); /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data Block size:", dblock->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Block size:", dblock->size); /* Print the elements in the index block */ HDfprintf(stream, "%*sElements:\n", indent, ""); diff --git a/src/H5Eint.c b/src/H5Eint.c index b3a0d01592a..3fd4099ec60 100644 --- a/src/H5Eint.c +++ b/src/H5Eint.c @@ -650,11 +650,7 @@ herr_t H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *fmt, ...) { - va_list ap; /* Varargs info */ -#ifndef H5_HAVE_VASPRINTF - int tmp_len; /* Current size of description buffer */ - int desc_len; /* Actual length of description when formatted */ -#endif /* H5_HAVE_VASPRINTF */ + va_list ap; /* Varargs info */ char * tmp = NULL; /* Buffer to place formatted description in */ hbool_t va_started = FALSE; /* Whether the variable argument list is open */ herr_t ret_value = SUCCEED; /* Return value */ @@ -683,31 +679,9 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin HDva_start(ap, fmt); va_started = TRUE; -#ifdef H5_HAVE_VASPRINTF /* Use the vasprintf() routine, since it does what we're trying to do below */ if (HDvasprintf(&tmp, fmt, ap) < 0) HGOTO_DONE(FAIL) -#else /* H5_HAVE_VASPRINTF */ - /* Allocate space for the formatted description buffer */ - tmp_len = 128; - if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) - HGOTO_DONE(FAIL) - - /* If the description doesn't fit into the initial buffer size, allocate more space and try again */ - while ((desc_len = HDvsnprintf(tmp, (size_t)tmp_len, fmt, ap)) > (tmp_len - 1)) { - /* shutdown & restart the va_list */ - HDva_end(ap); - HDva_start(ap, fmt); - - /* Release the previous description, it's too small */ - H5MM_xfree(tmp); - - /* Allocate a description of the appropriate length */ - tmp_len = desc_len + 1; - if (NULL == (tmp = H5MM_malloc((size_t)tmp_len))) - HGOTO_DONE(FAIL) - } /* end while */ -#endif /* H5_HAVE_VASPRINTF */ /* Push the error on the stack */ if (H5E__push_stack(estack, file, func, line, cls_id, maj_id, min_id, tmp) < 0) @@ -716,16 +690,11 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin done: if (va_started) HDva_end(ap); -#ifdef H5_HAVE_VASPRINTF /* Memory was allocated with HDvasprintf so it needs to be freed * with HDfree */ if (tmp) HDfree(tmp); -#else /* H5_HAVE_VASPRINTF */ - if (tmp) - H5MM_xfree(tmp); -#endif /* H5_HAVE_VASPRINTF */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5E_printf_stack() */ diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index 1cdcf670373..8c2c9a8b1e2 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -111,19 +111,20 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Header size:", hdr->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size:", hdr->size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Raw Element Size:", (unsigned)hdr->cparam.raw_elmt_size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Native Element Size (on this platform):", hdr->cparam.cls->nat_elmt_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of elements in data block page:", (unsigned)((size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits)); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of elements in Fixed Array:", hdr->stats.nelmts); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Fixed Array Data Block Address:", hdr->dblk_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Fixed Array Data Block Address:", hdr->dblk_addr); CATCH if (dbg_ctx && cls->dst_dbg_ctx(dbg_ctx) < 0) @@ -185,12 +186,12 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Print the values */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Array class ID:", hdr->cparam.cls->name); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of Data Block:", dblock->addr); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data Block size:", dblock->size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of Data Block:", dblock->addr); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Data Block size:", dblock->size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of elements in Data Block:", hdr->cparam.nelmts); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of pages in Data Block:", dblock->npages); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Number of elements per Data Block page:", dblock->dblk_page_nelmts); if (dblock->npages) { /* paging */ @@ -207,7 +208,7 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, /* Read and print each page's elements in the data block */ for (page_idx = 0; page_idx < dblock->npages; page_idx++) { if (!H5VM_bit_get(dblock->dblk_page_init, page_idx)) { - HDfprintf(stream, "%*s%-*s %Hu %s\n", indent, "", fwidth, "Page %Zu:", page_idx, "empty"); + HDfprintf(stream, "%*s%-*s %zu %s\n", indent, "", fwidth, "Page %zu:", page_idx, "empty"); } /* end if */ else { /* get the page */ @@ -225,7 +226,7 @@ BEGIN_FUNC(PKG, ERR, herr_t, SUCCEED, FAIL, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr) - HDfprintf(stream, "%*sElements in page %Zu:\n", indent, "", page_idx); + HDfprintf(stream, "%*sElements in page %zu:\n", indent, "", page_idx); for (u = 0; u < dblk_page_nelmts; u++) { /* Call the class's 'debug' callback */ if ((hdr->cparam.cls->debug)(stream, (indent + 3), MAX(0, (fwidth - 3)), (hsize_t)u, diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 2e7dd5f8f9d..adfa1a31aa7 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -35,7 +35,7 @@ #include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ +#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 4032d3b2232..aa2d6db5dd3 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -741,15 +741,17 @@ H5FD__log_close(H5FD_t *_file) addr = 1; while (addr < file->eoa) { if (file->nwrite[addr] != last_val) { - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, - (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + HDfprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); last_val = file->nwrite[addr]; last_addr = addr; } /* end if */ addr++; } /* end while */ - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) written to %3d times\n", last_addr, - (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + HDfprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) written to %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); } /* end if */ /* Dump the read I/O information */ @@ -760,15 +762,17 @@ H5FD__log_close(H5FD_t *_file) addr = 1; while (addr < file->eoa) { if (file->nread[addr] != last_val) { - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, - (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + HDfprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); last_val = file->nread[addr]; last_addr = addr; } /* end if */ addr++; } /* end while */ - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) read from %3d times\n", last_addr, - (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); + HDfprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) read from %3d times\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), (int)last_val); } /* end if */ /* Dump the I/O flavor information */ @@ -779,15 +783,16 @@ H5FD__log_close(H5FD_t *_file) addr = 1; while (addr < file->eoa) { if (file->flavor[addr] != last_val) { - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, - (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); + HDfprintf(file->logfp, + "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); last_val = file->flavor[addr]; last_addr = addr; } /* end if */ addr++; } /* end while */ - HDfprintf(file->logfp, "\tAddr %10a-%10a (%10lu bytes) flavor is %s\n", last_addr, (addr - 1), - (unsigned long)(addr - last_addr), flavors[last_val]); + HDfprintf(file->logfp, "\tAddr %10" PRIuHADDR "-%10" PRIuHADDR " (%10lu bytes) flavor is %s\n", + last_addr, (addr - 1), (unsigned long)(addr - last_addr), flavors[last_val]); } /* end if */ /* Free the logging information */ @@ -957,8 +962,9 @@ H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hs } /* end if */ if (file->fa.flags & H5FD_LOG_ALLOC) - HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", addr, (addr + size) - 1, size, - flavors[type]); + HDfprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", addr, + (haddr_t)((addr + size) - 1), size, flavors[type]); } /* end if */ /* Set return value */ @@ -996,8 +1002,8 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Log the file memory freed */ if (file->fa.flags & H5FD_LOG_FREE) - HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Freed\n", addr, (addr + size) - 1, size, - flavors[type]); + HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", + addr, (haddr_t)((addr + size) - 1), size, flavors[type]); } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) @@ -1063,8 +1069,9 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr) /* Log the extension like an allocation */ if (file->fa.flags & H5FD_LOG_ALLOC) - HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Allocated\n", file->eoa, addr, size, - flavors[type]); + HDfprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Allocated\n", + file->eoa, addr, size, flavors[type]); } /* end if */ /* Check for decreasing file size */ @@ -1080,8 +1087,9 @@ H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr) /* Log the shrink like a free */ if (file->fa.flags & H5FD_LOG_FREE) - HDfprintf(file->logfp, "%10a-%10a (%10Hu bytes) (%s) Freed\n", file->eoa, addr, size, - flavors[type]); + HDfprintf(file->logfp, + "%10" PRIuHADDR "-%10" PRIuHADDR " (%10" PRIuHSIZE " bytes) (%s) Freed\n", + file->eoa, addr, size, flavors[type]); } /* end if */ } /* end if */ @@ -1230,7 +1238,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Emit log string if we're tracking individual seek events. */ if (file->fa.flags & H5FD_LOG_LOC_SEEK) { - HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr); + HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); /* Add the seek time, if we're tracking that. * Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK @@ -1283,8 +1291,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); if (file->fa.flags & H5FD_LOG_LOC_READ) - HDfprintf(file->logfp, "Error! Reading: %10a-%10a (%10Zu bytes)\n", orig_addr, - (orig_addr + orig_size) - 1, orig_size); + HDfprintf(file->logfp, "Error! Reading: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", + orig_addr, (orig_addr + orig_size) - 1, orig_size); HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, " @@ -1326,8 +1334,8 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had /* Log information about the read */ if (file->fa.flags & H5FD_LOG_LOC_READ) { - HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Read", orig_addr, (orig_addr + orig_size) - 1, - orig_size, flavors[type]); + HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Read", orig_addr, + (orig_addr + orig_size) - 1, orig_size, flavors[type]); /* Verify that we are reading in the type of data we allocated in this location */ if (file->flavor) { @@ -1452,7 +1460,7 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha /* Emit log string if we're tracking individual seek events. */ if (file->fa.flags & H5FD_LOG_LOC_SEEK) { - HDfprintf(file->logfp, "Seek: From %10a To %10a", file->pos, addr); + HDfprintf(file->logfp, "Seek: From %10" PRIuHADDR " To %10" PRIuHADDR, file->pos, addr); /* Add the seek time, if we're tracking that. * Note that the seek time is NOT emitted for when just H5FD_LOG_TIME_SEEK @@ -1505,8 +1513,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha offset = HDlseek(file->fd, (HDoff_t)0, SEEK_CUR); if (file->fa.flags & H5FD_LOG_LOC_WRITE) - HDfprintf(file->logfp, "Error! Writing: %10a-%10a (%10Zu bytes)\n", orig_addr, - (orig_addr + orig_size) - 1, orig_size); + HDfprintf(file->logfp, "Error! Writing: %10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes)\n", + orig_addr, (orig_addr + orig_size) - 1, orig_size); HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed: time = %s, filename = '%s', file descriptor = %d, errno = %d, " @@ -1541,8 +1549,8 @@ H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, ha /* Log information about the write */ if (file->fa.flags & H5FD_LOG_LOC_WRITE) { - HDfprintf(file->logfp, "%10a-%10a (%10Zu bytes) (%s) Written", orig_addr, (orig_addr + orig_size) - 1, - orig_size, flavors[type]); + HDfprintf(file->logfp, "%10" PRIuHADDR "-%10" PRIuHADDR " (%10zu bytes) (%s) Written", orig_addr, + (orig_addr + orig_size) - 1, orig_size, flavors[type]); /* Check if this is the first write into a "default" section, grabbed by the metadata agregation * algorithm */ @@ -1662,7 +1670,7 @@ H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ /* Emit log string if we're tracking individual truncate events. */ if (file->fa.flags & H5FD_LOG_TRUNCATE) { - HDfprintf(file->logfp, "Truncate: To %10a", file->eoa); + HDfprintf(file->logfp, "Truncate: To %10" PRIuHADDR, file->eoa); /* Add the truncate time, if we're tracking that. * Note that the truncate time is NOT emitted for when just H5FD_LOG_TIME_TRUNCATE diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 4b393650136..22e59614617 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -1267,8 +1267,8 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1)); if (rangebytesstr == NULL) HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string."); - ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), - "bytes=" H5_PRINTF_HADDR_FMT "-" H5_PRINTF_HADDR_FMT, offset, offset + len - 1); + ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-%" PRIuHADDR, + offset, offset + len - 1); if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); } @@ -1276,8 +1276,7 @@ H5FD_s3comms_s3r_read(s3r_t *handle, haddr_t offset, size_t len, void *dest) rangebytesstr = (char *)H5MM_malloc(sizeof(char) * (S3COMMS_MAX_RANGE_STRING_SIZE + 1)); if (rangebytesstr == NULL) HGOTO_ERROR(H5E_ARGS, H5E_CANTALLOC, FAIL, "could not malloc range format string."); - ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=" H5_PRINTF_HADDR_FMT "-", - offset); + ret = HDsnprintf(rangebytesstr, (S3COMMS_MAX_RANGE_STRING_SIZE), "bytes=%" PRIuHADDR "-", offset); if (ret <= 0 || ret >= S3COMMS_MAX_RANGE_STRING_SIZE) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to format HTTP Range value"); } @@ -1952,7 +1951,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha for (buffer_i = 0; buffer_i < 128; buffer_i++) buffer[buffer_i] = 0; - line_buffer = fgets(line_buffer, 128, file); + line_buffer = HDfgets(line_buffer, 128, file); if (line_buffer == NULL) /* reached end of file */ goto done; } while (HDstrncmp(line_buffer, profile_line, HDstrlen(profile_line))); diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c index ecf0eb88147..3862b53a005 100644 --- a/src/H5FSdbg.c +++ b/src/H5FSdbg.c @@ -121,12 +121,13 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) (fspace->client == H5FS_CLIENT_FHEAP_ID ? "Fractal heap" : (fspace->client == H5FS_CLIENT_FILE_ID ? "File" : "Unknown"))); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Total free space tracked:", fspace->tot_space); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Total free space tracked:", fspace->tot_space); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Total number of free space sections tracked:", fspace->tot_sect_count); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of serializable free space sections tracked:", fspace->serial_sect_count); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of ghost free space sections tracked:", fspace->ghost_sect_count); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of free space section classes:", (unsigned)fspace->nclasses); @@ -134,11 +135,13 @@ H5FS_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth) HDfprintf(stream, "%*s%-*s %u%%\n", indent, "", fwidth, "Expand percent:", fspace->expand_percent); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "# of bits for section address space:", fspace->max_sect_addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Maximum section size:", fspace->max_sect_size); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Serialized sections address:", fspace->sect_addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Maximum section size:", fspace->max_sect_size); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Serialized sections address:", fspace->sect_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Serialized sections size used:", fspace->sect_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Serialized sections size allocated:", fspace->alloc_sect_size); done: diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index 0191c2cf9bc..5157180e328 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -72,9 +72,10 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f)); HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs); - HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth, "Address of super block:", f->shared->sblock->base_addr); - HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth, "Size of userblock:", userblock_size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth, + "Size of userblock:", userblock_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Superblock version number:", f->shared->sblock->super_vers); @@ -99,16 +100,16 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]); HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth, "File status flags:", (unsigned)(f->shared->sblock->status_flags)); - HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, "Superblock extension address:", f->shared->sblock->ext_addr); - HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, "Shared object header message table address:", f->shared->sohm_addr); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Shared object header message version number:", (unsigned)f->shared->sohm_vers); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes); - HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, "Address of driver information block:", f->shared->sblock->driver_addr); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, diff --git a/src/H5Gent.c b/src/H5Gent.c index 9c1bc87a361..a0fa28d9037 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -526,7 +526,7 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, con HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Name offset into private heap:", (unsigned long)(ent->name_off)); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object header address:", ent->header); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object header address:", ent->header); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Cache info type:"); switch (ent->type) { @@ -538,10 +538,10 @@ H5G__ent_debug(const H5G_entry_t *ent, FILE *stream, int indent, int fwidth, con HDfprintf(stream, "Symbol Table\n"); HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Cached entry information:"); - HDfprintf(stream, "%*s%-*s %a\n", nested_indent, "", nested_fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, "B-tree address:", ent->cache.stab.btree_addr); - HDfprintf(stream, "%*s%-*s %a\n", nested_indent, "", nested_fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", nested_indent, "", nested_fwidth, "Heap address:", ent->cache.stab.heap_addr); break; diff --git a/src/H5HFbtree2.c b/src/H5HFbtree2.c index b2404aa5cdb..353d7d7c1bf 100644 --- a/src/H5HFbtree2.c +++ b/src/H5HFbtree2.c @@ -434,8 +434,8 @@ H5HF__huge_bt2_indir_debug(FILE *stream, int indent, int fwidth, const void *_nr FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%a, %Hu, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, - nrecord->id); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len, nrecord->id); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_indir_debug() */ @@ -636,8 +636,9 @@ H5HF__huge_bt2_filt_indir_debug(FILE *stream, int indent, int fwidth, const void FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, - nrecord->len, nrecord->filter_mask, nrecord->obj_size, nrecord->id); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE ", %" PRIuHSIZE "}\n", + indent, "", fwidth, "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, + nrecord->obj_size, nrecord->id); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_filt_indir_debug() */ @@ -818,7 +819,8 @@ H5HF__huge_bt2_dir_debug(FILE *stream, int indent, int fwidth, const void *_nrec FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%a, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, nrecord->len); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_dir_debug() */ @@ -1028,8 +1030,8 @@ H5HF__huge_bt2_filt_dir_debug(FILE *stream, int indent, int fwidth, const void * FUNC_ENTER_STATIC_NOERR - HDfprintf(stream, "%*s%-*s {%a, %Hu, %x, %Hu}\n", indent, "", fwidth, "Record:", nrecord->addr, - nrecord->len, nrecord->filter_mask, nrecord->obj_size); + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIuHSIZE ", %x, %" PRIuHSIZE "}\n", indent, "", fwidth, + "Record:", nrecord->addr, nrecord->len, nrecord->filter_mask, nrecord->obj_size); FUNC_LEAVE_NOAPI(SUCCEED) } /* H5HF__huge_bt2_filt_dir_debug() */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 60fff22edd8..cc61aa19179 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -153,8 +153,8 @@ H5HF_id_print(H5HF_t *fh, const void *_id, FILE *stream, int indent, int fwidth) HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve heap ID length") /* Display the heap ID */ - HDfprintf(stream, "%*s%-*s (%c, %Hu, %Zu)\n", indent, "", fwidth, "Heap ID info: (type, offset, length)", - id_type, obj_off, obj_len); + HDfprintf(stream, "%*s%-*s (%c, %" PRIuHSIZE " , %zu)\n", indent, "", fwidth, + "Heap ID info: (type, offset, length)", id_type, obj_off, obj_len); done: FUNC_LEAVE_NOAPI(ret_value) @@ -190,9 +190,9 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw */ /* Creation parameter values */ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Doubling table width:", dtable->cparam.width); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Starting block size:", dtable->cparam.start_block_size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Max. direct block size:", dtable->cparam.max_direct_size); HDfprintf(stream, "%*s%-*s %u (bits)\n", indent, "", fwidth, "Max. index size:", dtable->cparam.max_index); @@ -200,7 +200,8 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw "Starting # of rows in root indirect block:", dtable->cparam.start_root_rows); /* Run-time varying parameter values */ - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Table's root address:", dtable->table_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Table's root address:", dtable->table_addr); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows in root indirect block:", dtable->curr_root_rows); @@ -211,7 +212,7 @@ H5HF__dtable_debug(const H5HF_dtable_t *dtable, FILE *stream, int indent, int fw "Max. # of direct rows in any indirect block:", dtable->max_direct_rows); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "# of bits for IDs in first row:", dtable->first_row_bits); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "# of IDs in first row:", dtable->num_id_first_row); FUNC_LEAVE_NOAPI(SUCCEED) @@ -250,32 +251,37 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Heap is:", hdr->man_dtable.curr_root_rows > 0 ? "Indirect" : "Direct"); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Objects stored in 'debugging' format:", hdr->debug_objs); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "'Write once' flag:", hdr->write_once); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Objects stored in 'debugging' format:", hdr->debug_objs ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "'Write once' flag:", hdr->write_once ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "'Huge' object IDs have wrapped:", hdr->huge_ids_wrapped ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Free space in managed blocks:", hdr->total_man_free); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Managed space data block size:", hdr->man_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "Managed space data block size:", hdr->man_size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Total managed space allocated:", hdr->man_alloc_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Offset of managed space iterator:", hdr->man_iter_off); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Number of managed objects in heap:", hdr->man_nobjs); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of free space manager for managed blocks:", hdr->fs_addr); HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Max. size of managed object:", (unsigned long)hdr->max_man_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "'Huge' object space used:", hdr->huge_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "'Huge' object space used:", hdr->huge_size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Number of 'huge' objects in heap:", hdr->huge_nobjs); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "ID of next 'huge' object:", hdr->huge_next_id); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "ID of next 'huge' object:", hdr->huge_next_id); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of v2 B-tree for 'huge' objects:", hdr->huge_bt2_addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "'Tiny' object space used:", hdr->tiny_size); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, + "'Tiny' object space used:", hdr->tiny_size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Number of 'tiny' objects in heap:", hdr->tiny_nobjs); HDfprintf(stream, "%*sManaged Objects Doubling-Table Info...\n", indent, ""); @@ -285,7 +291,7 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i if (hdr->filter_len > 0) { HDfprintf(stream, "%*sI/O filter Info...\n", indent, ""); if (hdr->man_dtable.curr_root_rows == 0) { - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Compressed size of root direct block:", hdr->pline_root_direct_size); HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), "Filter mask for root direct block:", hdr->pline_root_direct_filter_mask); @@ -301,7 +307,7 @@ H5HF_hdr_print(const H5HF_hdr_t *hdr, hbool_t dump_internal, FILE *stream, int i HDfprintf(stream, "%*s%-*s %x\n", indent + 3, "", MAX(0, fwidth - 3), "Root indirect block flags:", hdr->root_iblock_flags); HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), - "Root indirect block pointer:", hdr->root_iblock); + "Root indirect block pointer:", (void *)hdr->root_iblock); if (hdr->root_iblock) H5HF_iblock_print(hdr->root_iblock, dump_internal, stream, indent + 3, fwidth); } /* end if */ @@ -412,7 +418,7 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata) len = end - start; HDsnprintf(temp_str, sizeof(temp_str), "Section #%u:", (unsigned)udata->sect_count); - HDfprintf(udata->stream, "%*s%-*s %8Zu, %8Zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9), + HDfprintf(udata->stream, "%*s%-*s %8zu, %8zu\n", udata->indent + 3, "", MAX(0, udata->fwidth - 9), temp_str, start, len); udata->sect_count++; @@ -486,12 +492,12 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of fractal heap that owns this block:", hdr->heap_addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Offset of direct block in heap:", dblock->block_off); blk_prefix_size = H5HF_MAN_ABS_DIRECT_OVERHEAD(hdr); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of block header:", blk_prefix_size); /* Allocate space for the free space markers */ if (NULL == (marker = (uint8_t *)H5MM_calloc(dblock->size))) @@ -594,11 +600,11 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st /* * Print the values. */ - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of fractal heap that owns this block:", hdr->heap_addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " \n", indent, "", fwidth, "Offset of indirect block in heap:", iblock->block_off); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Size of indirect block:", iblock->size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Current # of rows:", iblock->nrows); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. # of rows:", iblock->max_rows); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, @@ -618,11 +624,11 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v); if (hdr->filter_len > 0) - HDfprintf(stream, "%*s%-*s %9a/%6Zu/%x\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, - iblock->ents[off].addr, iblock->filt_ents[off].size, + HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "/%6zu/%x\n", indent + 6, "", MAX(0, fwidth - 6), + temp_str, iblock->ents[off].addr, iblock->filt_ents[off].size, iblock->filt_ents[off].filter_mask); else - HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, + HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, iblock->ents[off].addr); } /* end for */ } /* end for */ @@ -642,7 +648,7 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st size_t off = (u * hdr->man_dtable.cparam.width) + v; HDsnprintf(temp_str, sizeof(temp_str), "Col #%u:", (unsigned)v); - HDfprintf(stream, "%*s%-*s %9a\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, + HDfprintf(stream, "%*s%-*s %9" PRIuHADDR "\n", indent + 6, "", MAX(0, fwidth - 6), temp_str, iblock->ents[off].addr); } /* end for */ } /* end for */ @@ -655,12 +661,12 @@ H5HF_iblock_print(const H5HF_indirect_t *iblock, hbool_t dump_internal, FILE *st HDfprintf(stream, "%*sFractal Indirect Block Internal Information:\n", indent, ""); /* Print general information */ - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Reference count:", iblock->rc); /* Print parent's information */ HDfprintf(stream, "%*s%-*s %p\n", indent + 3, "", MAX(0, fwidth - 3), - "Parent indirect block address:", iblock->parent); + "Parent indirect block address:", (void *)iblock->parent); if (iblock->parent) H5HF_iblock_print(iblock->parent, TRUE, stream, indent + 6, fwidth); } /* end if */ @@ -760,9 +766,9 @@ H5HF_sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) : (sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW ? "first row" : (sect->sect_info.type == H5HF_FSPACE_SECT_NORMAL_ROW ? "normal row" : "unknown")))); - HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth, + HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, "Section address:", sect->sect_info.addr); - HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth, + HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, "Section size:", sect->sect_info.size); /* Dump section-specific debugging information */ diff --git a/src/H5HFdblock.c b/src/H5HFdblock.c index 6c77e08b586..657306ba913 100644 --- a/src/H5HFdblock.c +++ b/src/H5HFdblock.c @@ -396,7 +396,7 @@ H5HF__man_dblock_new(H5HF_hdr_t *hdr, size_t request, H5HF_free_section_t **ret_ if (min_dblock_size > next_size) { HDfprintf( stderr, - "%s: Skipping direct block sizes not supported, min_dblock_size = %Zu, next_size = %Zu\n", + "%s: Skipping direct block sizes not supported, min_dblock_size = %zu, next_size = %zu\n", FUNC, min_dblock_size, next_size); HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, FAIL, "skipping direct block sizes not supported yet") } /* end if */ diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c index b4aeaa27f40..d0cfa960107 100644 --- a/src/H5HLdbg.c +++ b/src/H5HLdbg.c @@ -64,10 +64,9 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, H5E_THROW(H5E_CANTPROTECT, "unable to load/protect local heap"); HDfprintf(stream, "%*sLocal Heap...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, - "Header size (in bytes):", (unsigned long)h->prfx_size); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Header size (in bytes):", h->prfx_size); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Address of heap data:", h->dblk_addr); + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data bytes allocated for heap:", h->dblk_size); /* Traverse the free list and check that all free blocks fall within * the heap and that no two free blocks point to the same region of @@ -81,7 +80,7 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL, char temp_str[32]; HDsnprintf(temp_str, sizeof(temp_str), "Block #%d:", free_block); - HDfprintf(stream, "%*s%-*s %8Zu, %8Zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str, + HDfprintf(stream, "%*s%-*s %8zu, %8zu\n", indent + 3, "", MAX(0, fwidth - 9), temp_str, freelist->offset, freelist->size); if ((freelist->offset + freelist->size) > h->dblk_size) HDfprintf(stream, "***THAT FREE BLOCK IS OUT OF BOUNDS!\n"); diff --git a/src/H5I.c b/src/H5I.c index b21503b4eb5..3d985f7961e 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -218,13 +218,13 @@ H5Iregister_type(size_t H5_ATTR_DEBUG_API_USED hash_size, unsigned reserved, H5I /* Found a free type ID */ new_type = (H5I_type_t)i; done = TRUE; - } /* end if */ - } /* end for */ + } + } /* Verify that we found a type to give out */ if (done == FALSE) HGOTO_ERROR(H5E_ATOM, H5E_NOSPACE, H5I_BADID, "Maximum number of ID types exceeded") - } /* end else */ + } /* Allocate new ID class */ if (NULL == (cls = H5FL_CALLOC(H5I_class_t))) @@ -352,8 +352,8 @@ H5Itype_exists(H5I_type_t type) * * Return: SUCCEED/FAIL * - * Programmer: James Laird - * Nathaniel Furrer + * Programmer: James Laird + * Nathaniel Furrer * Friday, April 23, 2004 * *------------------------------------------------------------------------- @@ -385,7 +385,7 @@ H5Inmembers(H5I_type_t type, hsize_t *num_members) HGOTO_ERROR(H5E_ATOM, H5E_CANTCOUNT, FAIL, "can't compute number of members") H5_CHECKED_ASSIGN(*num_members, hsize_t, members, int64_t); - } /* end if */ + } done: FUNC_LEAVE_API(ret_value) @@ -1350,7 +1350,7 @@ H5I_dec_app_ref_always_close(hid_t id) int H5Iinc_ref(hid_t id) { - int ret_value; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) H5TRACE1("Is", "i", id); @@ -1417,7 +1417,7 @@ H5I_inc_ref(hid_t id, hbool_t app_ref) int H5Iget_ref(hid_t id) { - int ret_value; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) H5TRACE1("Is", "i", id); @@ -1479,7 +1479,7 @@ H5I_get_ref(hid_t id, hbool_t app_ref) int H5Iinc_type_ref(H5I_type_t type) { - int ret_value; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) H5TRACE1("Is", "It", type); @@ -1637,7 +1637,7 @@ H5I_dec_type_ref(H5I_type_t type) int H5Iget_type_ref(H5I_type_t type) { - int ret_value; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_API((-1)) H5TRACE1("Is", "It", type); @@ -1776,8 +1776,8 @@ H5I__search_cb(void *obj, hid_t id, void *_udata) void * H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key) { - H5I_search_ud_t udata; /* Context for iteration */ - void * ret_value; /* Return value */ + H5I_search_ud_t udata; /* Context for iteration */ + void * ret_value = NULL; /* Return value */ FUNC_ENTER_API(NULL) H5TRACE3("*x", "Itx*x", type, func, key); diff --git a/src/H5L.c b/src/H5L.c index d98789fddd9..36ac3f4cedc 100644 --- a/src/H5L.c +++ b/src/H5L.c @@ -2760,16 +2760,16 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT } /* end H5L__exists_inter_cb() */ /*------------------------------------------------------------------------- - * Function: H5L_exists_tolerant + * Function: H5L_exists_tolerant * - * Purpose: Returns whether a link exists in a group + * Purpose: Returns whether a link exists in a group * - * Note: Same as H5L_exists, except that missing links are reported - * as 'FALSE' instead of causing failures + * Note: Same as H5L_exists, except that missing links are reported + * as 'FALSE' instead of causing failures * - * Return: Non-negative (TRUE/FALSE) on success/Negative on failure + * Return: Non-negative (TRUE/FALSE) on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, December 31 2015 * *------------------------------------------------------------------------- diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c index 16986189826..50bd1d06979 100644 --- a/src/H5MFdbg.c +++ b/src/H5MFdbg.c @@ -110,11 +110,11 @@ H5MF__sects_debug_cb(H5FS_section_info_t *_sect, void *_udata) : (sect->sect_info.type == H5MF_FSPACE_SECT_SMALL ? "small" : (sect->sect_info.type == H5MF_FSPACE_SECT_LARGE ? "large" : "unknown")))); - HDfprintf(udata->stream, "%*s%-*s %a\n", udata->indent, "", udata->fwidth, + HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, "Section address:", sect->sect_info.addr); - HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth, + HDfprintf(udata->stream, "%*s%-*s %" PRIuHSIZE "\n", udata->indent, "", udata->fwidth, "Section size:", sect->sect_info.size); - HDfprintf(udata->stream, "%*s%-*s %Hu\n", udata->indent, "", udata->fwidth, + HDfprintf(udata->stream, "%*s%-*s %" PRIuHADDR "\n", udata->indent, "", udata->fwidth, "End of section:", (haddr_t)((sect->sect_info.addr + sect->sect_info.size) - 1)); HDfprintf(udata->stream, "%*s%-*s %s\n", udata->indent, "", udata->fwidth, "Section state:", (sect->sect_info.state == H5FS_SECT_LIVE ? "live" : "serialized")); @@ -223,7 +223,7 @@ H5MF_sects_dump(H5F_t *f, FILE *stream) if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, H5FD_MEM_DEFAULT))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %a\n", FUNC, eoa); + HDfprintf(stderr, "%s: for type = H5FD_MEM_DEFAULT, eoa = %" PRIuHADDR "\n", FUNC, eoa); #endif /* H5MF_ALLOC_DEBUG */ if (H5F_PAGED_AGGR(f)) { /* File space paging */ @@ -265,15 +265,17 @@ H5MF_sects_dump(H5F_t *f, FILE *stream) /* Retrieve metadata aggregator info, if available */ H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: ma_addr = %a, ma_size = %Hu, end of ma = %a\n", FUNC, ma_addr, ma_size, - (haddr_t)((ma_addr + ma_size) - 1)); + HDfprintf(stderr, + "%s: ma_addr = %" PRIuHADDR ", ma_size = %" PRIuHSIZE ", end of ma = %" PRIuHADDR "\n", + FUNC, ma_addr, ma_size, (haddr_t)((ma_addr + ma_size) - 1)); #endif /* H5MF_ALLOC_DEBUG */ /* Retrieve 'small data' aggregator info, if available */ H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sda_addr, &sda_size); #ifdef H5MF_ALLOC_DEBUG - HDfprintf(stderr, "%s: sda_addr = %a, sda_size = %Hu, end of sda = %a\n", FUNC, sda_addr, sda_size, - (haddr_t)((sda_addr + sda_size) - 1)); + HDfprintf(stderr, + "%s: sda_addr = %" PRIuHADDR ", sda_size = %" PRIuHSIZE ", end of sda = %" PRIuHADDR "\n", + FUNC, sda_addr, sda_size, (haddr_t)((sda_addr + sda_size) - 1)); #endif /* H5MF_ALLOC_DEBUG */ /* Iterate over all the free space types that have managers and dump each free list's space */ @@ -286,7 +288,8 @@ H5MF_sects_dump(H5F_t *f, FILE *stream) /* Retrieve the 'eoa' for this file memory type */ if (HADDR_UNDEF == (eoa = H5F_get_eoa(f, atype))) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "driver get_eoa request failed") - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "eoa:", eoa); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), + "eoa:", eoa); /* Print header for sections */ HDfprintf(stream, "%*sSections:\n", indent + 3, ""); diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 2cd1c9945a0..4dd069c9220 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -499,18 +499,18 @@ H5O__ainfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Track creation order of attributes:", ainfo->track_corder); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Index creation order of attributes:", ainfo->index_corder); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of attributes:", ainfo->nattrs); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Track creation order of attributes:", ainfo->track_corder ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Index creation order of attributes:", ainfo->index_corder ? "TRUE" : "FALSE"); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. creation index value:", (unsigned)ainfo->max_crt_idx); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' attribute storage fractal heap address:", ainfo->fheap_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' attribute storage name index v2 B-tree address:", ainfo->name_bt2_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' attribute storage creation order index v2 B-tree address:", ainfo->corder_bt2_addr); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 8980ddf4e5a..4dee7aa1870 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -650,7 +650,6 @@ H5O_attr_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *native_src, h * Purpose: Copies a message from _MESG to _DEST in file * * Return: Success: Ptr to _DEST - * * Failure: NULL * * Programmer: Quincey Koziol @@ -719,9 +718,9 @@ H5O__attr_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_lo } /* H5O__attr_post_copy_file() */ /*------------------------------------------------------------------------- - * Function: H5O_attr_get_crt_index + * Function: H5O_attr_get_crt_index * - * Purpose: Get creation index from the message + * Purpose: Get creation index from the message * * Return: Success: Non-negative * Failure: Negative @@ -748,9 +747,9 @@ H5O_attr_get_crt_index(const void *_mesg, H5O_msg_crt_idx_t *crt_idx /*out*/) } /* end H5O_attr_get_crt_index() */ /*------------------------------------------------------------------------- - * Function: H5O_attr_set_crt_index + * Function: H5O_attr_set_crt_index * - * Purpose: Set creation index from the message + * Purpose: Set creation index from the message * * Return: Success: Non-negative * Failure: Negative @@ -844,8 +843,9 @@ H5O__attr_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidt break; } /* end switch */ HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Character Set of Name:", s); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Object opened:", mesg->obj_opened); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object:", mesg->oloc.addr); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Object opened:", mesg->obj_opened ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Object:", mesg->oloc.addr); /* Check for attribute creation order index on the attribute */ if (mesg->shared->crt_idx != H5O_MAX_CRT_ORDER_IDX) diff --git a/src/H5Ocache_image.c b/src/H5Ocache_image.c index 9aaac473dc2..ee0d3a582db 100644 --- a/src/H5Ocache_image.c +++ b/src/H5Ocache_image.c @@ -350,9 +350,10 @@ H5O__mdci_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Metadata Cache Image Block address:", mdci->addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Metadata Cache Image Block address:", mdci->addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Metadata Cache Image Block size in bytes:", mdci->size); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Ocont.c b/src/H5Ocont.c index f61ec3fa93c..080225a08c0 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -258,7 +258,7 @@ H5O__cont_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Continuation address:", cont->addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Continuation address:", cont->addr); HDfprintf(stream, "%*s%-*s %lu\n", indent, "", fwidth, "Continuation size in bytes:", (unsigned long)(cont->size)); diff --git a/src/H5Odbg.c b/src/H5Odbg.c index 537c9d44673..f6b991d0595 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -68,12 +68,12 @@ #ifdef H5O_DEBUG /*------------------------------------------------------------------------- - * Function: H5O_assert + * Function: H5O_assert * - * Purpose: Sanity check the information for an object header data + * Purpose: Sanity check the information for an object header data * structure. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Oct 17 2006 @@ -263,11 +263,11 @@ H5O_debug_id(unsigned type_id, H5F_t *f, const void *mesg, FILE *stream, int ind } /* end H5O_debug_id() */ /*------------------------------------------------------------------------- - * Function: H5O_debug_real + * Function: H5O_debug_real * - * Purpose: Prints debugging info about an object header. + * Purpose: Prints debugging info about an object header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Aug 6 1997 @@ -295,7 +295,8 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int /* debug */ HDfprintf(stream, "%*sObject Header...\n", indent, ""); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Dirty:", oh->cache_info.is_dirty); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Dirty:", oh->cache_info.is_dirty ? "TRUE" : "FALSE"); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", oh->version); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Header size (in bytes):", (unsigned)H5O_SIZEOF_HDR(oh)); @@ -344,9 +345,9 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int } /* end if */ } /* end if */ - HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of messages (allocated):", oh->nmesgs, oh->alloc_nmesgs); - HDfprintf(stream, "%*s%-*s %Zu (%Zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks, + HDfprintf(stream, "%*s%-*s %zu (%zu)\n", indent, "", fwidth, "Number of chunks (allocated):", oh->nchunks, oh->alloc_nchunks); /* debug each chunk */ @@ -355,7 +356,8 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int HDfprintf(stream, "%*sChunk %d...\n", indent, "", i); - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", MAX(0, fwidth - 3), "Address:", oh->chunk[i].addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", MAX(0, fwidth - 3), + "Address:", oh->chunk[i].addr); /* Decrement chunk 0's size by the object header prefix size */ if (0 == i) { @@ -370,9 +372,9 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int chunk_total += chunk_size; gap_total += oh->chunk[i].gap; - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size); + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Size in bytes:", chunk_size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap); + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Gap:", oh->chunk[i].gap); } /* end for */ /* debug each message */ @@ -401,7 +403,8 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int HDfprintf(stream, "%*s%-*s 0x%04x `%s' (%d)\n", indent + 3, "", MAX(0, fwidth - 3), "Message ID (sequence number):", (unsigned)(oh->mesg[i].type->id), oh->mesg[i].type->name, sequence[oh->mesg[i].type->id]++); - HDfprintf(stream, "%*s%-*s %t\n", indent + 3, "", MAX(0, fwidth - 3), "Dirty:", oh->mesg[i].dirty); + HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", MAX(0, fwidth - 3), + "Dirty:", oh->mesg[i].dirty ? "TRUE" : "FALSE"); HDfprintf(stream, "%*s%-*s ", indent + 3, "", MAX(0, fwidth - 3), "Message flags:"); if (oh->mesg[i].flags) { hbool_t flag_printed = FALSE; @@ -461,7 +464,7 @@ H5O_debug_real(H5F_t *f, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int chunkno = oh->mesg[i].chunkno; if (chunkno >= oh->nchunks) HDfprintf(stream, "*** BAD CHUNK NUMBER\n"); - HDfprintf(stream, "%*s%-*s (%Zu, %Zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3), + HDfprintf(stream, "%*s%-*s (%zu, %zu) bytes\n", indent + 3, "", MAX(0, fwidth - 3), "Raw message data (offset, size) in chunk:", (size_t)(oh->mesg[i].raw - oh->chunk[chunkno].image), oh->mesg[i].raw_size); diff --git a/src/H5Oefl.c b/src/H5Oefl.c index 885150f2efa..5ec85aaea88 100644 --- a/src/H5Oefl.c +++ b/src/H5Oefl.c @@ -529,28 +529,28 @@ H5O__efl_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int ind HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Heap address:", mesg->heap_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Heap address:", mesg->heap_addr); - HDfprintf(stream, "%*s%-*s %u/%u\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused, + HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Slots used/allocated:", mesg->nused, mesg->nalloc); for (u = 0; u < mesg->nused; u++) { char buf[64]; - HDsnprintf(buf, sizeof(buf), "File %u", (unsigned)u); + HDsnprintf(buf, sizeof(buf), "File %zu", u); HDfprintf(stream, "%*s%s:\n", indent, "", buf); HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(fwidth - 3, 0), "Name:", mesg->slot[u].name); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0), - "Name offset:", (unsigned long)(mesg->slot[u].name_offset)); + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(fwidth - 3, 0), + "Name offset:", mesg->slot[u].name_offset); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0), - "Offset of data in file:", (unsigned long)(mesg->slot[u].offset)); + HDfprintf(stream, "%*s%-*s %" PRIdMAX "\n", indent + 3, "", MAX(fwidth - 3, 0), + "Offset of data in file:", (intmax_t)(mesg->slot[u].offset)); - HDfprintf(stream, "%*s%-*s %lu\n", indent + 3, "", MAX(fwidth - 3, 0), - "Bytes reserved for data:", (unsigned long)(mesg->slot[u].size)); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", MAX(fwidth - 3, 0), + "Bytes reserved for data:", (mesg->slot[u].size)); } /* end for */ FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 7111d63e6ae..5e907ff6a34 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -944,7 +944,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, int in break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth, "Size:", fill->size); + HDfprintf(stream, "%*s%-*s %zd\n", indent, "", fwidth, "Size:", fill->size); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); if (fill->type) { H5T_debug(fill->type, stream); diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 54da829b4fd..29f7927251d 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -25,10 +25,10 @@ #include "H5Omodule.h" /* This source code file is part of the H5O module */ #include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ +#include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5Opkg.h" /* Object headers */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5Opkg.h" /* Object headers */ /* PRIVATE PROTOTYPES */ static void * H5O_fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, @@ -119,7 +119,6 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS /* Map version 0 (deprecated) to version 1 message */ switch (strategy) { - case H5F_FILE_SPACE_ALL_PERSIST: fsinfo->strategy = H5F_FSPACE_STRATEGY_FSM_AGGR; fsinfo->persist = TRUE; @@ -166,10 +165,9 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS &(fsinfo->eoa_pre_fsm_fsalloc)); /* EOA before free-space header and section info */ /* Decode addresses of free space managers, if persisting */ - if (fsinfo->persist) { + if (fsinfo->persist) for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) H5F_addr_decode(f, &p, &(fsinfo->fs_addr[ptype - 1])); - } /* end if */ fsinfo->mapped = FALSE; } @@ -371,22 +369,24 @@ H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int HDfprintf(stream, "%s\n", "unknown"); } /* end switch */ - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Free-space persist:", fsinfo->persist); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Free-space persist:", fsinfo->persist ? "TRUE" : "FALSE"); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Free-space section threshold:", fsinfo->threshold); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "File space page size:", fsinfo->page_size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "File space page size:", fsinfo->page_size); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Page end metadata threshold:", fsinfo->pgend_meta_thres); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "eoa_pre_fsm_fsalloc:", fsinfo->eoa_pre_fsm_fsalloc); if (fsinfo->persist) { for (ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; ptype++) - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Free space manager address:", fsinfo->fs_addr[ptype - 1]); } /* end if */ diff --git a/src/H5Oint.c b/src/H5Oint.c index 3274932c02e..9d3b5b3af93 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -564,7 +564,7 @@ H5O_open(H5O_loc_t *loc) #ifdef H5O_DEBUG if (H5DEBUG(O)) - HDfprintf(H5DEBUG(O), "> %a\n", loc->addr); + HDfprintf(H5DEBUG(O), "> %" PRIuHADDR "\n", loc->addr); #endif /* Turn off the variable for holding file or increment open-lock counters */ @@ -795,10 +795,10 @@ H5O_close(H5O_loc_t *loc, hbool_t *file_closed /*out*/) #ifdef H5O_DEBUG if (H5DEBUG(O)) { if (H5F_FILE_ID(loc->file) < 0 && 1 == H5F_NREFS(loc->file)) - HDfprintf(H5DEBUG(O), "< %a auto %lu remaining\n", loc->addr, + HDfprintf(H5DEBUG(O), "< %" PRIuHADDR " auto %lu remaining\n", loc->addr, (unsigned long)H5F_NOPEN_OBJS(loc->file)); else - HDfprintf(H5DEBUG(O), "< %a\n", loc->addr); + HDfprintf(H5DEBUG(O), "< %" PRIuHADDR "\n", loc->addr); } #endif diff --git a/src/H5Olayout.c b/src/H5Olayout.c index d3c5048af07..651e317a2c9 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -1203,31 +1203,32 @@ H5O__layout_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int (unsigned)mesg->u.chunk.idx_type); break; } /* end switch */ - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Index address:", mesg->storage.u.chunk.idx_addr); break; case H5D_CONTIGUOUS: HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Contiguous"); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Data address:", mesg->storage.u.contig.addr); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.contig.size); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, + "Data Size:", mesg->storage.u.contig.size); break; case H5D_COMPACT: HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Compact"); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Data Size:", mesg->storage.u.compact.size); break; case H5D_VIRTUAL: HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Type:", "Virtual"); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Global heap address:", mesg->storage.u.virt.serial_list_hobjid.addr); - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "Global heap index:", mesg->storage.u.virt.serial_list_hobjid.idx); for (u = 0; u < mesg->storage.u.virt.list_nused; u++) { - HDfprintf(stream, "%*sMapping %u:\n", indent, "", u); + HDfprintf(stream, "%*sMapping %zu:\n", indent, "", u); HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, "Virtual selection:", ""); HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth - 3, diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index 97195606082..711f199c077 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -548,17 +548,18 @@ H5O__linfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int i HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Track creation order of links:", linfo->track_corder); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Index creation order of links:", linfo->index_corder); - HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of links:", linfo->nlinks); - HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth, "Max. creation order value:", linfo->max_corder); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Track creation order of links:", linfo->track_corder ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Index creation order of links:", linfo->index_corder ? "TRUE" : "FALSE"); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent, "", fwidth, "Number of links:", linfo->nlinks); + HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, + "Max. creation order value:", linfo->max_corder); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' link storage fractal heap address:", linfo->fheap_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' link storage name index v2 B-tree address:", linfo->name_bt2_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "'Dense' link storage creation order index v2 B-tree address:", linfo->corder_bt2_addr); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Olink.c b/src/H5Olink.c index 9f1de298892..1c9579bf24d 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -820,7 +820,7 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in : (lnk->type >= H5L_TYPE_UD_MIN ? "User-defined" : "Unknown"))))); if (lnk->corder_valid) - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Creation Order:", lnk->corder); + HDfprintf(stream, "%*s%-*s %" PRId64 "\n", indent, "", fwidth, "Creation Order:", lnk->corder); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Link Name Character Set:", (lnk->cset == H5T_CSET_ASCII ? "ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown"))); @@ -829,7 +829,8 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in /* Display link-specific information */ switch (lnk->type) { case H5L_TYPE_HARD: - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object address:", lnk->u.hard.addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Object address:", lnk->u.hard.addr); break; case H5L_TYPE_SOFT: @@ -846,11 +847,11 @@ H5O__link_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in (const char *)lnk->u.ud.udata + (HDstrlen((const char *)lnk->u.ud.udata) + 1); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "External File Name:", lnk->u.ud.udata); + "External File Name:", (const char *)lnk->u.ud.udata); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "External Object Name:", objname); } /* end if */ else { - HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent, "", fwidth, "User-Defined Link Size:", lnk->u.ud.size); } /* end else */ } /* end if */ diff --git a/src/H5Opline.c b/src/H5Opline.c index 89e8c661c3f..c679462dd50 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -648,14 +648,14 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth, "Number of filters:", pline->nused, + HDfprintf(stream, "%*s%-*s %zu/%zu\n", indent, "", fwidth, "Number of filters:", pline->nused, pline->nalloc); /* Loop over all the filters */ for (i = 0; i < pline->nused; i++) { char name[32]; - HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i); + HDsnprintf(name, sizeof(name), "Filter at position %zu", i); HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), "Filter identification:", (unsigned)(pline->filter[i].id)); @@ -666,7 +666,7 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int in HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), "Filter name:"); HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), "Flags:", pline->filter[i].flags); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", MAX(0, fwidth - 3), "Num CD values:", pline->filter[i].cd_nelmts); /* Filter parameters */ diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 37b5068d583..c715df85cf4 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -507,7 +507,7 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int HDfprintf(stream, "%*s%-*s {", indent, "", fwidth, "Dim Size:"); for (u = 0; u < sdim->rank; u++) - HDfprintf(stream, "%s%Hu", u ? ", " : "", sdim->size[u]); + HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->size[u]); HDfprintf(stream, "}\n"); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Dim Max:"); @@ -517,7 +517,7 @@ H5O__sdspace_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int if (H5S_UNLIMITED == sdim->max[u]) HDfprintf(stream, "%sUNLIM", u ? ", " : ""); else - HDfprintf(stream, "%s%Hu", u ? ", " : "", sdim->max[u]); + HDfprintf(stream, "%s%" PRIuHSIZE, u ? ", " : "", sdim->max[u]); } /* end for */ HDfprintf(stream, "}\n"); } /* end if */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index c8e49834bf1..129f35a6f65 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -83,12 +83,12 @@ /*------------------------------------------------------------------------- * Function: H5O_shared_read * - * Purpose: Reads a message referred to by a shared message. + * Purpose: Reads a message referred to by a shared message. * - * Return: Success: Ptr to message in native format. The message - * should be freed by calling H5O_msg_reset(). + * Return: Success: Ptr to message in native format. The message + * should be freed by calling H5O_msg_reset(). * - * Failure: NULL + * Failure: NULL * * Programmer: Quincey Koziol * Sep 24 2003 @@ -192,7 +192,7 @@ H5O_shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t /*------------------------------------------------------------------------- * Function: H5O__shared_link_adj * - * Purpose: Changes the link count for the object referenced by a shared + * Purpose: Changes the link count for the object referenced by a shared * message. * * This function changes the object header link count and is @@ -286,7 +286,7 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ /*------------------------------------------------------------------------- * Function: H5O_shared_decode * - * Purpose: Decodes a shared object message + * Purpose: Decodes a shared object message * * Return: Non-negative on success/Negative on failure * @@ -373,7 +373,7 @@ H5O_shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *bu /*------------------------------------------------------------------------- * Function: H5O_shared_encode * - * Purpose: Encodes message _MESG into buffer BUF. + * Purpose: Encodes message _MESG into buffer BUF. * * Return: Non-negative on success/Negative on failure * @@ -419,9 +419,9 @@ H5O_shared_encode(const H5F_t *f, uint8_t *buf /*out*/, const H5O_shared_t *sh_m } /* end H5O_shared_encode() */ /*------------------------------------------------------------------------- - * Function: H5O_set_shared + * Function: H5O_set_shared * - * Purpose: Sets the shared component for a message. + * Purpose: Sets the shared component for a message. * * Return: Non-negative on success/Negative on failure * @@ -448,10 +448,10 @@ H5O_set_shared(H5O_shared_t *dst, const H5O_shared_t *src) /*------------------------------------------------------------------------- * Function: H5O_shared_size * - * Purpose: Returns the length of a shared object message. + * Purpose: Returns the length of a shared object message. * - * Return: Success: Length - * Failure: 0 + * Return: Success: Length + * Failure: 0 * * Programmer: Robb Matzke * Thursday, April 2, 1998 @@ -466,15 +466,15 @@ H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg) FUNC_ENTER_NOAPI_NOINIT_NOERR if (sh_mesg->type == H5O_SHARE_TYPE_COMMITTED) { - ret_value = (size_t)1 + /*version */ - (size_t)1 + /*the type field */ - (size_t)H5F_SIZEOF_ADDR(f); /*sharing by another obj hdr */ + ret_value = (size_t)1 + /* Version */ + (size_t)1 + /* Type field */ + (size_t)H5F_SIZEOF_ADDR(f); /* Sharing by another obj hdr */ } /* end if */ else { HDassert(sh_mesg->type == H5O_SHARE_TYPE_SOHM); - ret_value = 1 + /*version */ - 1 + /*the type field */ - H5O_FHEAP_ID_LEN; /* Shared in the heap */ + ret_value = 1 + /* Version */ + 1 + /* Type field */ + H5O_FHEAP_ID_LEN; /* Shared in the heap */ } /* end else */ FUNC_LEAVE_NOAPI(ret_value) @@ -540,7 +540,7 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar FUNC_ENTER_PACKAGE - /* check args */ + /* Check args */ HDassert(f); HDassert(sh_mesg); @@ -702,7 +702,8 @@ H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth) case H5O_SHARE_TYPE_COMMITTED: HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Shared Message type:", "Obj Hdr"); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Object address:", mesg->u.loc.oh_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, + "Object address:", mesg->u.loc.oh_addr); break; case H5O_SHARE_TYPE_SOHM: diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c index 1a655c67349..cd666a00f63 100644 --- a/src/H5Oshmesg.c +++ b/src/H5Oshmesg.c @@ -11,7 +11,7 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: James Laird +/* Programmer: James Laird * Monday, January 29, 2007 * * Purpose: A message holding "implicitly shared object header message" @@ -229,7 +229,8 @@ H5O__shmesg_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int HDassert(fwidth >= 0); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Version:", mesg->version); - HDfprintf(stream, "%*s%-*s %a (rel)\n", indent, "", fwidth, "Shared message table address:", mesg->addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, + "Shared message table address:", mesg->addr); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Number of indexes:", mesg->nindexes); FUNC_LEAVE_NOAPI(SUCCEED) diff --git a/src/H5Ostab.c b/src/H5Ostab.c index 974813b6082..fa030bd193e 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -412,9 +412,9 @@ H5O__stab_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE *stream, int in HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "B-tree address:", stab->btree_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "B-tree address:", stab->btree_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "Name heap address:", stab->heap_addr); + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent, "", fwidth, "Name heap address:", stab->heap_addr); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__stab_debug() */ diff --git a/src/H5SM.c b/src/H5SM.c index 6b6c5d0502d..ad2d9ef8c1c 100644 --- a/src/H5SM.c +++ b/src/H5SM.c @@ -2567,19 +2567,19 @@ H5SM_table_debug(H5F_t *f, haddr_t table_addr, FILE *stream, int indent, int fwi ? "List" : (table->indexes[x].index_type == H5SM_BTREE ? "B-Tree" : "Unknown"))); - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, "Address of index:", table->indexes[x].index_addr); - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, "Address of index's heap:", table->indexes[x].heap_addr); HDfprintf(stream, "%*s%-*s 0x%08x\n", indent + 3, "", fwidth, "Message type flags:", table->indexes[x].mesg_types); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, "Minimum size of messages:", table->indexes[x].min_mesg_size); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, "Number of messages:", table->indexes[x].num_messages); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, "Maximum list size:", table->indexes[x].list_max); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %zu\n", indent + 3, "", fwidth, "Minimum B-tree size:", table->indexes[x].btree_min); } /* end for */ @@ -2667,16 +2667,16 @@ H5SM_list_debug(H5F_t *f, haddr_t list_addr, FILE *stream, int indent, int fwidt HDassert(fh); HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in heap"); - HDfprintf(stream, "%*s%-*s 0x%Zx\n", indent + 3, "", fwidth, - "Heap ID:", list->messages[x].u.heap_loc.fheap_id); - HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s 0x%" PRIx64 "\n", indent + 3, "", fwidth, + "Heap ID:", list->messages[x].u.heap_loc.fheap_id.val); + HDfprintf(stream, "%*s%-*s %" PRIuHSIZE "\n", indent + 3, "", fwidth, "Reference count:", list->messages[x].u.heap_loc.ref_count); } /* end if */ else if (list->messages[x].location == H5SM_IN_OH) { HDfprintf(stream, "%*s%-*s %s\n", indent + 3, "", fwidth, "Location:", "in object header"); - HDfprintf(stream, "%*s%-*s %a\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, "Object header address:", list->messages[x].u.mesg_loc.oh_addr); - HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth, + HDfprintf(stream, "%*s%-*s %" PRIuHADDR "\n", indent + 3, "", fwidth, "Message creation index:", list->messages[x].u.mesg_loc.oh_addr); HDfprintf(stream, "%*s%-*s %u\n", indent + 3, "", fwidth, "Message type ID:", list->messages[x].msg_type_id); diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index 01c3fe3ded3..6f71966dff8 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -187,12 +187,12 @@ H5SM__bt2_debug(FILE *stream, int indent, int fwidth, const void *record, const FUNC_ENTER_STATIC_NOERR if (sohm->location == H5SM_IN_HEAP) - HDfprintf(stream, "%*s%-*s {%a, %lo, %Hx}\n", indent, "", fwidth, - "Shared Message in heap:", sohm->u.heap_loc.fheap_id, sohm->hash, + HDfprintf(stream, "%*s%-*s {%" PRIu64 ", %" PRIo32 ", %" PRIxHSIZE "}\n", indent, "", fwidth, + "Shared Message in heap:", sohm->u.heap_loc.fheap_id.val, sohm->hash, sohm->u.heap_loc.ref_count); else { HDassert(sohm->location == H5SM_IN_OH); - HDfprintf(stream, "%*s%-*s {%a, %lo, %Hx, %Hx}\n", indent, "", fwidth, + HDfprintf(stream, "%*s%-*s {%" PRIuHADDR ", %" PRIo32 ", %x, %" PRIx32 "}\n", indent, "", fwidth, "Shared Message in OH:", sohm->u.mesg_loc.oh_addr, sohm->hash, sohm->msg_type_id, sohm->u.mesg_loc.index); } /* end else */ diff --git a/src/H5Sdbg.c b/src/H5Sdbg.c index b4ead956f19..d20916b026b 100644 --- a/src/H5Sdbg.c +++ b/src/H5Sdbg.c @@ -17,7 +17,6 @@ * Quincey Koziol * Jul 24 2007 * - * * Purpose: Dump debugging information about a dataspace * *------------------------------------------------------------------------- diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 79eb64e9e05..9a38aaa8b55 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -697,8 +697,10 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), "%s: start=%Hd stride=%Hu count=%Hu block=%Hu xtent=%Hu", FUNC, - d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); + HDfprintf(H5DEBUG(S), + "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE + " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, + FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); if (u == 0) HDfprintf(H5DEBUG(S), " rank=%u\n", rank); else @@ -729,8 +731,10 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), "%s: start=%Hd stride=%Hu count=%Hu block=%Hu xtent=%Hu", FUNC, - d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); + HDfprintf(H5DEBUG(S), + "%s: start=%" PRIdHSIZE " stride=%" PRIuHSIZE " count=%" PRIuHSIZE + " block=%" PRIuHSIZE " xtent=%" PRIuHSIZE, + FUNC, d[u].start, d[u].strid, d[u].count, d[u].block, d[u].xtent); if (u == 0) HDfprintf(H5DEBUG(S), " rank=%u\n", rank); else @@ -754,7 +758,8 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new #ifdef H5S_DEBUG if (H5DEBUG(S)) { i = ((int)rank) - 1; - HDfprintf(H5DEBUG(S), " offset[%2d]=%Hu; max_xtent[%2d]=%Hu\n", i, offset[i], i, max_xtent[i]); + HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, offset[i], i, + max_xtent[i]); } #endif for (i = ((int)rank) - 2; i >= 0; --i) { @@ -762,7 +767,8 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new max_xtent[i] = max_xtent[i + 1] * d[i].xtent; #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), " offset[%2d]=%Hu; max_xtent[%2d]=%Hu\n", i, offset[i], i, max_xtent[i]); + HDfprintf(H5DEBUG(S), " offset[%2d]=%" PRIuHSIZE "; max_xtent[%2d]=%" PRIuHSIZE "\n", i, + offset[i], i, max_xtent[i]); #endif } /* end for */ @@ -777,9 +783,9 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new *******************************************************/ #ifdef H5S_DEBUG if (H5DEBUG(S)) { - HDfprintf(H5DEBUG(S), "%s: Making contig type %Zu MPI_BYTEs\n", FUNC, elmt_size); + HDfprintf(H5DEBUG(S), "%s: Making contig type %zu MPI_BYTEs\n", FUNC, elmt_size); for (i = ((int)rank) - 1; i >= 0; --i) - HDfprintf(H5DEBUG(S), "d[%d].xtent=%Hu \n", i, d[i].xtent); + HDfprintf(H5DEBUG(S), "d[%d].xtent=%" PRIuHSIZE "\n", i, d[i].xtent); } #endif @@ -809,7 +815,8 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new if (H5DEBUG(S)) HDfprintf(H5DEBUG(S), "%s: Dimension i=%d \n" - "start=%Hd count=%Hu block=%Hu stride=%Hu, xtent=%Hu max_xtent=%d\n", + "start=%" PRIdHSIZE " count=%" PRIuHSIZE " block=%" PRIuHSIZE " stride=%" PRIuHSIZE + ", xtent=%" PRIuHSIZE " max_xtent=%" PRIuHSIZE "\n", FUNC, i, d[i].start, d[i].count, d[i].block, d[i].strid, d[i].xtent, max_xtent[i]); #endif @@ -950,7 +957,8 @@ H5S__mpio_reg_hyper_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new #ifdef H5S_DEBUG if (H5DEBUG(S)) - HDfprintf(H5DEBUG(S), "Leave %s, count=%ld is_derived_type=%t\n", FUNC, *count, *is_derived_type); + HDfprintf(H5DEBUG(S), "Leave %s, count=%d is_derived_type=%s\n", FUNC, *count, + (*is_derived_type) ? "TRUE" : "FALSE"); #endif FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__mpio_reg_hyper_type() */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 6a05207588a..0c2ae4dacf7 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -118,19 +118,19 @@ * The macros take a subset of these arguments in the order listed here: * * CDATA: A pointer to the H5T_cdata_t structure that was passed to the - * conversion function. + * conversion function. * * STYPE: The hid_t value for the source datatype. * * DTYPE: The hid_t value for the destination datatype. * - * BUF: A pointer to the conversion buffer. + * BUF: A pointer to the conversion buffer. * - * NELMTS: The number of values to be converted. + * NELMTS: The number of values to be converted. * - * ST: The C name for source datatype (e.g., int) + * ST: The C name for source datatype (e.g., int) * - * DT: The C name for the destination datatype (e.g., signed char) + * DT: The C name for the destination datatype (e.g., signed char) * * D_MIN: The minimum possible destination value. For unsigned * destination types this should be zero. For signed @@ -980,14 +980,12 @@ done: #define CI_PRINT_STATS(STYPE, DTYPE) \ { \ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \ - HDfprintf(H5DEBUG(T), " %Hu src elements aligned on %lu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \ - (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \ + HDfprintf(H5DEBUG(T), " %zu src elements aligned on %zu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->s_aligned, H5T_NATIVE_##STYPE##_ALIGN_g); \ } \ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \ - HDfprintf(H5DEBUG(T), " %Hu dst elements aligned on %lu-byte boundaries\n", \ - ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \ - (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \ + HDfprintf(H5DEBUG(T), " %zu dst elements aligned on %zu-byte boundaries\n", \ + ((H5T_conv_hw_t *)cdata->priv)->d_aligned, H5T_NATIVE_##DTYPE##_ALIGN_g); \ } \ } @@ -2658,7 +2656,7 @@ H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Monday, January 4, 1999 @@ -2799,7 +2797,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * * Return: Success: Non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, January 4, 1999 @@ -2994,7 +2992,7 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, si * * Return: Success: Non-negative * - * Failure: negative + * Failure: negative * * Programmer: Raymond Lu * 12 October 2012 @@ -4860,7 +4858,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -4881,7 +4879,7 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -4902,7 +4900,7 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -4923,7 +4921,7 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -4944,7 +4942,7 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -4965,7 +4963,7 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -4986,7 +4984,7 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5007,7 +5005,7 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5028,7 +5026,7 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5049,7 +5047,7 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5070,7 +5068,7 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5091,7 +5089,7 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5112,7 +5110,7 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5133,7 +5131,7 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5154,7 +5152,7 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5175,7 +5173,7 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5196,7 +5194,7 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5217,7 +5215,7 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5238,7 +5236,7 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5259,7 +5257,7 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5280,7 +5278,7 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5301,7 +5299,7 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5322,7 +5320,7 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -5343,7 +5341,7 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -5364,7 +5362,7 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5385,7 +5383,7 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5406,7 +5404,7 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5427,7 +5425,7 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5448,7 +5446,7 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5469,7 +5467,7 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5490,7 +5488,7 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5511,7 +5509,7 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5532,7 +5530,7 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5553,7 +5551,7 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5574,7 +5572,7 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5595,7 +5593,7 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5616,7 +5614,7 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5637,7 +5635,7 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5658,7 +5656,7 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5679,7 +5677,7 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5700,7 +5698,7 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5721,7 +5719,7 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5742,7 +5740,7 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5763,7 +5761,7 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5784,7 +5782,7 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -5805,7 +5803,7 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -5826,7 +5824,7 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5847,7 +5845,7 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5868,7 +5866,7 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5889,7 +5887,7 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5910,7 +5908,7 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5931,7 +5929,7 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5952,7 +5950,7 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5973,7 +5971,7 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -5994,7 +5992,7 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6015,7 +6013,7 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6036,7 +6034,7 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6057,7 +6055,7 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6078,7 +6076,7 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6099,7 +6097,7 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6120,7 +6118,7 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6141,7 +6139,7 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6162,7 +6160,7 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6183,7 +6181,7 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6204,7 +6202,7 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6225,7 +6223,7 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6246,7 +6244,7 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -6267,7 +6265,7 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -6288,7 +6286,7 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6309,7 +6307,7 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6330,7 +6328,7 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6351,7 +6349,7 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6372,7 +6370,7 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6393,7 +6391,7 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6414,7 +6412,7 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6435,7 +6433,7 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6456,7 +6454,7 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6477,7 +6475,7 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6498,7 +6496,7 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6519,7 +6517,7 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6540,7 +6538,7 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6561,7 +6559,7 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmt * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6582,7 +6580,7 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6603,7 +6601,7 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6624,7 +6622,7 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6645,7 +6643,7 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelm * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6666,7 +6664,7 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6687,7 +6685,7 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nel * * Return: Success: Non-negative * - * Failure: Negative + * Failure: Negative * * Programmer: Robb Matzke * Friday, November 13, 1998 @@ -6708,7 +6706,7 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -6729,7 +6727,7 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * * Return: Success: non-negative * - * Failure: negative + * Failure: negative * * Programmer: Robb Matzke * Monday, November 16, 1998 @@ -7404,7 +7402,7 @@ H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t ne * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_LLONG_LDOUBLE +#ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE herr_t H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) @@ -7466,7 +7464,7 @@ H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_ULLONG_LDOUBLE +#ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE herr_t H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) @@ -8104,7 +8102,7 @@ H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t n * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_LDOUBLE_LLONG +#ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG herr_t H5T__conv_ldouble_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) @@ -8151,14 +8149,6 @@ H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t * Programmer: Raymond Lu * Wednesday, Jan 21, 2004 * - * Raymond Lu - * Wednesday, April 21, 2004 - * There is a new design for exception handling like overflow, - * which is passed in as a transfer property. - * - * Raymond Lu - * Monday, March 13, 2006 - * Added support for VAX floating-point types. *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index e9cd289c049..1da0121ac14 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -111,10 +111,10 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i nbytes *= path->stats.nelmts; H5_bandwidth(bandwidth, (double)nbytes, path->stats.times.elapsed); - HDfprintf(H5DEBUG(T), " %-16s %10Hd %10d %8T %8T %8T %10s\n", path->name, path->stats.nelmts, - path->stats.ncalls, path->stats.times.user, path->stats.times.system, - path->stats.times.elapsed, bandwidth); - } /* end if */ + HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name, + path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed, + bandwidth); + } #endif FUNC_LEAVE_NOAPI(SUCCEED) @@ -394,7 +394,8 @@ H5T_debug(const H5T_t *dt, FILE *stream) HDfprintf(stream, "\n\"%s\" = 0x", dt->shared->u.enumer.name[i]); for (k = 0; k < base_size; k++) - HDfprintf(stream, "%02p", ((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); + HDfprintf(stream, "%02" PRIx8, + *((uint8_t *)dt->shared->u.enumer.value + (i * base_size) + k)); } /* end for */ HDfprintf(stream, "\n"); } diff --git a/src/H5Z.c b/src/H5Z.c index 483d86bf748..09772728725 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -137,8 +137,15 @@ H5Z_term_package(void) if (H5DEBUG(Z)) { for (i = 0; i < H5Z_table_used_g; i++) { for (dir = 0; dir < 2; dir++) { + struct { + char *user; + char *system; + char *elapsed; + } timestrs = {H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.user), + H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.system), + H5_timer_get_time_string(H5Z_stat_table_g[i].stats[dir].times.elapsed)}; if (0 == H5Z_stat_table_g[i].stats[dir].total) - continue; + goto next; if (0 == nprint++) { /* Print column headers */ @@ -163,12 +170,14 @@ H5Z_term_package(void) H5Z_stat_table_g[i].stats[dir].times.elapsed); /* Print the statistics */ - HDfprintf(H5DEBUG(Z), " %s%-15s %10Hd %10Hd %8T %8T %8T %10s\n", (dir ? "<" : ">"), - comment, H5Z_stat_table_g[i].stats[dir].total, - H5Z_stat_table_g[i].stats[dir].errors, - H5Z_stat_table_g[i].stats[dir].times.user, - H5Z_stat_table_g[i].stats[dir].times.system, - H5Z_stat_table_g[i].stats[dir].times.elapsed, bandwidth); + HDfprintf(H5DEBUG(Z), " %s%-15s %10" PRIdHSIZE " %10" PRIdHSIZE " %8s %8s %8s %10s\n", + (dir ? "<" : ">"), comment, H5Z_stat_table_g[i].stats[dir].total, + H5Z_stat_table_g[i].stats[dir].errors, timestrs.user, timestrs.system, + timestrs.elapsed, bandwidth); +next: + HDfree(timestrs.user); + HDfree(timestrs.system); + HDfree(timestrs.elapsed); } /* end for */ } /* end for */ } /* end if */ diff --git a/src/H5dbg.c b/src/H5dbg.c index 682b327e001..a371e7a9186 100644 --- a/src/H5dbg.c +++ b/src/H5dbg.c @@ -91,7 +91,7 @@ H5_buffer_dump(FILE *stream, int indent, const uint8_t *buf, const uint8_t *mark for (u = 0; u < buf_size; u += 16) { uint8_t c; - HDfprintf(stream, "%*s %8d: ", indent, "", u + buf_offset); + HDfprintf(stream, "%*s %8zu: ", indent, "", u + buf_offset); /* Print the hex values */ for (v = 0; v < 16; v++) { diff --git a/src/H5private.h b/src/H5private.h index 418e341d762..fc213e5d313 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -880,10 +880,12 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifndef HDfork #define HDfork() fork() #endif /* HDfork */ +#ifndef HDfprintf +#define HDfprintf fprintf +#endif #ifndef HDfpathconf #define HDfpathconf(F, N) fpathconf(F, N) #endif /* HDfpathconf */ -H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...); #ifndef HDfputc #define HDfputc(C, F) fputc(C, F) #endif /* HDfputc */ @@ -1216,7 +1218,7 @@ typedef off_t h5_stat_size_t; #define HDpread(F, B, C, O) pread(F, B, C, O) #endif /* HDpread */ #ifndef HDprintf -#define HDprintf(...) HDfprintf(stdout, __VA_ARGS__) +#define HDprintf printf #endif /* HDprintf */ #ifndef HDputc #define HDputc(C, F) putc(C, F) @@ -1428,6 +1430,9 @@ H5_DLL void HDsrand(unsigned int seed); #ifndef HDstrcspn #define HDstrcspn(X, Y) strcspn(X, Y) #endif /* HDstrcspn */ +#ifndef HDstrdup +#define HDstrdup(S) strdup(S) +#endif /* HDstrdup */ #ifndef HDstrerror #define HDstrerror(N) strerror(N) #endif /* HDstrerror */ @@ -1588,9 +1593,6 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); #ifndef HDva_start #define HDva_start(A, P) va_start(A, P) #endif /* HDva_start */ -#ifndef HDvasprintf -#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) -#endif /* HDvasprintf */ #ifndef HDvfprintf #define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A) #endif /* HDvfprintf */ @@ -1619,18 +1621,6 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); #define HDwrite(F, M, Z) write(F, M, Z) #endif /* HDwrite */ -/* - * And now for a couple non-Posix functions... Watch out for systems that - * define these in terms of macros. - */ -#if !defined strdup && !defined H5_HAVE_STRDUP -extern char * strdup(const char *s); -#endif - -#ifndef HDstrdup -#define HDstrdup(S) strdup(S) -#endif /* HDstrdup */ - /* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */ /* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */ #define H5_STRINGIZE(x) #x diff --git a/src/H5system.c b/src/H5system.c index 99a6f4de33b..14c1b269ac9 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -65,387 +65,35 @@ /* Track whether tzset routine was called */ static hbool_t H5_ntzset = FALSE; -/*------------------------------------------------------------------------- - * Function: HDfprintf - * - * Purpose: Prints the optional arguments under the control of the format - * string FMT to the stream STREAM. This function takes the - * same format as fprintf(3c) with a few added features: - * - * The conversion modifier `H' refers to the size of an - * `hsize_t' or `hssize_t' type. For instance, "0x%018Hx" - * prints an `hsize_t' value as a hex number right justified and - * zero filled in an 18-character field. - * - * The conversion 'a' refers to an haddr_t type. - * - * The conversion 't' refers to an htri_t type. - * - * Return: Success: Number of characters printed - * - * Failure: -1 - * - * Programmer: Robb Matzke - * Thursday, April 9, 1998 - * - *------------------------------------------------------------------------- +#ifndef H5_HAVE_VASPRINTF +/* HDvasprintf provides vasprintf-like function on targets where it is + * unavailable. */ -/* Disable warning for "format not a string literal" here -QAK */ -/* - * This pragma only needs to surround the fprintf() calls with - * format_templ in the code below, but early (4.4.7, at least) gcc only - * allows diagnostic pragmas to be toggled outside of functions. - */ -H5_GCC_DIAG_OFF("format-nonliteral") int -HDfprintf(FILE *stream, const char *fmt, ...) +HDvasprintf(char **bufp, const char *fmt, va_list _ap) { - int n = 0, nout = 0; - int fwidth, prec; - int zerofill; - int leftjust; - int plussign; - int ldspace; - int prefix; - char modifier[8]; - int conv; - char * rest, format_templ[128]; - int len; - const char *s; - va_list ap; - - HDassert(stream); - HDassert(fmt); - - HDva_start(ap, fmt); - while (*fmt) { - fwidth = prec = 0; - zerofill = 0; - leftjust = 0; - plussign = 0; - prefix = 0; - ldspace = 0; - modifier[0] = '\0'; - - if ('%' == fmt[0] && '%' == fmt[1]) { - HDputc('%', stream); - fmt += 2; - nout++; - } - else if ('%' == fmt[0]) { - s = fmt + 1; - - /* Flags */ - while (HDstrchr("-+ #", *s)) { - switch (*s) { - case '-': - leftjust = 1; - break; - - case '+': - plussign = 1; - break; - - case ' ': - ldspace = 1; - break; - - case '#': - prefix = 1; - break; - - default: - HDassert(0 && "Unknown format flag"); - } /* end switch */ /*lint !e744 Switch statement doesn't _need_ default */ - s++; - } /* end while */ - - /* Field width */ - if (HDisdigit(*s)) { - zerofill = ('0' == *s); - fwidth = (int)HDstrtol(s, &rest, 10); - s = rest; - } /* end if */ - else if ('*' == *s) { - fwidth = HDva_arg(ap, int); - if (fwidth < 0) { - leftjust = 1; - fwidth = -fwidth; - } - s++; - } - - /* Precision */ - if ('.' == *s) { - s++; - if (HDisdigit(*s)) { - prec = (int)HDstrtol(s, &rest, 10); - s = rest; - } - else if ('*' == *s) { - prec = HDva_arg(ap, int); - s++; - } - if (prec < 1) - prec = 1; - } - - /* Extra type modifiers */ - if (HDstrchr("zZHhlqLI", *s)) { - switch (*s) { - /*lint --e{506} Don't issue warnings about constant value booleans */ - /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true */ - case 'H': - if (sizeof(hsize_t) < sizeof(long)) - modifier[0] = '\0'; - else if (sizeof(hsize_t) == sizeof(long)) { - HDstrncpy(modifier, "l", sizeof(modifier)); - modifier[sizeof(modifier) - 1] = '\0'; - } /* end if */ - else { - HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier)); - modifier[sizeof(modifier) - 1] = '\0'; - } /* end else */ - break; - - case 'Z': - case 'z': - if (sizeof(size_t) < sizeof(long)) - modifier[0] = '\0'; - else if (sizeof(size_t) == sizeof(long)) { - HDstrncpy(modifier, "l", sizeof(modifier)); - modifier[sizeof(modifier) - 1] = '\0'; - } /* end if */ - else { - HDstrncpy(modifier, H5_PRINTF_LL_WIDTH, sizeof(modifier)); - modifier[sizeof(modifier) - 1] = '\0'; - } /* end else */ - break; - - default: - /* Handle 'I64' modifier for Microsoft's "__int64" type */ - if (*s == 'I' && *(s + 1) == '6' && *(s + 2) == '4') { - modifier[0] = *s; - modifier[1] = *(s + 1); - modifier[2] = *(s + 2); - modifier[3] = '\0'; - s += 2; /* Increment over 'I6', the '4' is taken care of below */ - } /* end if */ - else { - /* Handle 'll' for long long types */ - if (*s == 'l' && *(s + 1) == 'l') { - modifier[0] = *s; - modifier[1] = *s; - modifier[2] = '\0'; - s++; /* Increment over first 'l', second is taken care of below */ - } /* end if */ - else { - modifier[0] = *s; - modifier[1] = '\0'; - } /* end else */ - } /* end else */ - break; - } - s++; - } - - /* Conversion */ - conv = *s++; - - /* Create the format template */ - len = 0; - len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), "%%%s%s%s%s%s", - (leftjust ? "-" : ""), (plussign ? "+" : ""), (ldspace ? " " : ""), - (prefix ? "#" : ""), (zerofill ? "0" : "")); - if (fwidth > 0) - len += - HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%d", fwidth); - if (prec > 0) - len += - HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), ".%d", prec); - if (*modifier) - len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%s", - modifier); - HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), "%c", conv); - - /* Conversion */ - switch (conv) { - case 'd': - case 'i': - if (!HDstrcmp(modifier, "h")) { - short x = (short)HDva_arg(ap, int); - n = fprintf(stream, format_templ, x); - } - else if (!*modifier) { - int x = HDva_arg(ap, int); - n = fprintf(stream, format_templ, x); - } - else if (!HDstrcmp(modifier, "l")) { - long x = HDva_arg(ap, long); - n = fprintf(stream, format_templ, x); - } - else { - int64_t x = HDva_arg(ap, int64_t); - n = fprintf(stream, format_templ, x); - } - break; - - case 'o': - case 'u': - case 'x': - case 'X': - if (!HDstrcmp(modifier, "h")) { - unsigned short x = (unsigned short)HDva_arg(ap, unsigned int); - n = fprintf(stream, format_templ, x); - } - else if (!*modifier) { - unsigned int x = HDva_arg(ap, unsigned int); - n = fprintf(stream, format_templ, x); - } - else if (!HDstrcmp(modifier, "l")) { - unsigned long x = HDva_arg(ap, unsigned long); - n = fprintf(stream, format_templ, x); - } - else { - uint64_t x = HDva_arg(ap, uint64_t); - n = fprintf(stream, format_templ, x); - } - break; - - case 'f': - case 'e': - case 'E': - case 'g': - case 'G': - if (!HDstrcmp(modifier, "h")) { - float x = (float)HDva_arg(ap, double); - n = fprintf(stream, format_templ, (double)x); - } - else if (!*modifier || !HDstrcmp(modifier, "l")) { - double x = HDva_arg(ap, double); - n = fprintf(stream, format_templ, x); - } - else { - /* - * Some compilers complain when `long double' and - * `double' are the same thing. - */ -#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE - long double x = HDva_arg(ap, long double); - n = fprintf(stream, format_templ, x); -#else - double x = HDva_arg(ap, double); - n = fprintf(stream, format_templ, x); -#endif - } - break; - - case 'a': { - haddr_t x = HDva_arg(ap, haddr_t); - - if (H5F_addr_defined(x)) { - len = 0; - len += HDsnprintf(format_templ, (sizeof(format_templ) - (size_t)(len + 1)), - "%%%s%s%s%s%s", (leftjust ? "-" : ""), (plussign ? "+" : ""), - (ldspace ? " " : ""), (prefix ? "#" : ""), (zerofill ? "0" : "")); - if (fwidth > 0) - len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), - "%d", fwidth); - - /*lint --e{506} Don't issue warnings about constant value booleans */ - /*lint --e{774} Don't issue warnings boolean within 'if' always evaluates false/true - */ - if (sizeof(x) == H5_SIZEOF_INT) { - HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); - len++; - } /* end if */ - else if (sizeof(x) == H5_SIZEOF_LONG) { - HDstrncat(format_templ, "lu", (sizeof(format_templ) - (size_t)(len + 1))); - len++; - } /* end if */ - else if (sizeof(x) == H5_SIZEOF_LONG_LONG) { - HDstrncat(format_templ, H5_PRINTF_LL_WIDTH, - (sizeof(format_templ) - (size_t)(len + 1))); - len += (int)sizeof(H5_PRINTF_LL_WIDTH); - HDstrncat(format_templ, "u", (sizeof(format_templ) - (size_t)(len + 1))); - len++; - } - n = fprintf(stream, format_templ, x); - } - else { - len = 0; - HDstrncpy(format_templ, "%", (sizeof(format_templ) - (size_t)(len + 1))); - len++; - if (leftjust) { - HDstrncat(format_templ, "-", (sizeof(format_templ) - (size_t)(len + 1))); - len++; - } /* end if */ - if (fwidth) - len += HDsnprintf(format_templ + len, (sizeof(format_templ) - (size_t)(len + 1)), - "%d", fwidth); - HDstrncat(format_templ, "s", (sizeof(format_templ) - (size_t)(len + 1))); - n = fprintf(stream, format_templ, "UNDEF"); - } - } break; - - case 'c': { - char x = (char)HDva_arg(ap, int); - n = fprintf(stream, format_templ, x); - } break; - - case 's': - case 'p': { - char *x = HDva_arg(ap, char *); - n = fprintf(stream, format_templ, x); - } break; - - case 'n': - format_templ[HDstrlen(format_templ) - 1] = 'u'; - n = fprintf(stream, format_templ, nout); - break; - - case 't': { - htri_t tri_var = HDva_arg(ap, htri_t); - - if (tri_var > 0) - n = fprintf(stream, "TRUE"); - else if (!tri_var) - n = fprintf(stream, "FALSE"); - else - n = fprintf(stream, "FAIL(%d)", (int)tri_var); - } break; - - case 'T': /* Elapsed time, in seconds */ - { - double seconds = HDva_arg(ap, double); - char * time_string = H5_timer_get_time_string(seconds); - - if (time_string) { - n = fprintf(stream, format_templ, time_string); - HDfree(time_string); - } /* end if */ - else - n = fprintf(stream, format_templ, "(error)"); - } break; - - default: - HDfputs(format_templ, stream); - n = (int)HDstrlen(format_templ); - break; - } - nout += n; - fmt = s; - } - else { - HDputc(*fmt, stream); - fmt++; - nout++; + char * buf; /* buffer to receive formatted string */ + size_t bufsz; /* size of buffer to allocate */ + + for (bufsz = 32; (buf = HDmalloc(bufsz)) != NULL;) { + int ret; + va_list ap; + + HDva_copy(ap, _ap); + ret = HDvsnprintf(buf, bufsz, fmt, ap); + va_end(ap); + if (ret >= 0 && (size_t)ret < bufsz) { + *bufp = buf; + return ret; } + HDfree(buf); + if (ret < 0) + return ret; + bufsz = (size_t)ret + 1; } - HDva_end(ap); - return nout; -} /* end HDfprintf() */ -H5_GCC_DIAG_ON("format-nonliteral") + return -1; +} +#endif /* H5_HAVE_VASPRINTF */ /*------------------------------------------------------------------------- * Function: HDstrtoll @@ -932,32 +580,6 @@ Wgetlogin(void) return NULL; } -int -c99_snprintf(char *str, size_t size, const char *format, ...) -{ - int count; - va_list ap; - - HDva_start(ap, format); - count = c99_vsnprintf(str, size, format, ap); - HDva_end(ap); - - return count; -} - -int -c99_vsnprintf(char *str, size_t size, const char *format, va_list ap) -{ - int count = -1; - - if (size != 0) - count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); - if (count == -1) - count = _vscprintf(format, ap); - - return count; -} - /*------------------------------------------------------------------------- * Function: Wflock * @@ -1009,55 +631,6 @@ Wflock(int fd, int operation) return 0; } /* end Wflock() */ -/*------------------------------------------------------------------------- - * Function: Wllround, Wllroundf, Wlround, Wlroundf, Wround, Wroundf - * - * Purpose: Wrapper function for round functions for use with VS2012 - * and earlier. - * - * Return: The rounded value that was passed in. - * - * Programmer: Dana Robinson - * December 2016 - * - *------------------------------------------------------------------------- - */ -long long -Wllround(double arg) -{ - return (long long)(arg < 0.0 ? HDceil(arg - 0.5) : HDfloor(arg + 0.5)); -} - -long long -Wllroundf(float arg) -{ - return (long long)(arg < 0.0F ? HDceil(arg - 0.5F) : HDfloor(arg + 0.5F)); -} - -long -Wlround(double arg) -{ - return (long)(arg < 0.0 ? HDceil(arg - 0.5) : HDfloor(arg + 0.5)); -} - -long -Wlroundf(float arg) -{ - return (long)(arg < 0.0F ? HDceil(arg - 0.5F) : HDfloor(arg + 0.5F)); -} - -double -Wround(double arg) -{ - return arg < 0.0 ? HDceil(arg - 0.5) : HDfloor(arg + 0.5); -} - -float -Wroundf(float arg) -{ - return (float)(arg < 0.0F ? HDceil(arg - 0.5F) : HDfloor(arg + 0.5F)); -} - /*------------------------------------------------------------------------- * Function: H5_get_utf16_str * @@ -1413,7 +986,7 @@ H5_nanosleep(uint64_t nanosec) struct timespec sleeptime; /* Struct to hold time to sleep */ /* Set up time to sleep */ - sleeptime.tv_sec = 0; + sleeptime.tv_sec = 0; sleeptime.tv_nsec = (long)nanosec; HDnanosleep(&sleeptime, NULL); diff --git a/src/H5trace.c b/src/H5trace.c index 83455d9d1c9..a70a9e209f8 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -259,7 +259,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { haddr_t addr = HDva_arg(ap, haddr_t); - HDfprintf(out, "%a", addr); + HDfprintf(out, "%" PRIuHADDR, addr); } /* end else */ break; @@ -823,7 +823,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *); - HDfprintf(out, "0x%p", error); + HDfprintf(out, "0x%p", (void *)error); } /* end else */ break; @@ -1116,7 +1116,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t *); - HDfprintf(out, "0x%p", statbuf); + HDfprintf(out, "0x%p", (void *)statbuf); } break; #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -1139,7 +1139,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) if (H5S_UNLIMITED == p[i]) HDfprintf(out, "%sH5S_UNLIMITED", (i ? ", " : "")); else - HDfprintf(out, "%s%Hu", (i ? ", " : ""), p[i]); + HDfprintf(out, "%s%" PRIuHSIZE, (i ? ", " : ""), p[i]); } /* end for */ HDfprintf(out, "}"); } /* end if */ @@ -1153,7 +1153,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) if (H5S_UNLIMITED == hsize) HDfprintf(out, "H5S_UNLIMITED"); else { - HDfprintf(out, "%Hu", hsize); + HDfprintf(out, "%" PRIuHSIZE, hsize); asize[argno] = (hssize_t)hsize; } /* end else */ } /* end else */ @@ -1170,7 +1170,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, " {"); for (i = 0; i < asize[asize_idx]; i++) - HDfprintf(out, "%s%Hd", (i ? ", " : ""), p[i]); + HDfprintf(out, "%s%" PRIdHSIZE, (i ? ", " : ""), p[i]); HDfprintf(out, "}"); } /* end if */ } /* end if */ @@ -1180,7 +1180,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { hssize_t hssize = HDva_arg(ap, hssize_t); - HDfprintf(out, "%Hd", hssize); + HDfprintf(out, "%" PRIdHSIZE, hssize); asize[argno] = (hssize_t)hssize; } /* end else */ break; @@ -2519,7 +2519,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, " {"); for (i = 0; i < asize[asize_idx]; i++) - HDfprintf(out, "%s%Zu", (i ? ", " : ""), p[i]); + HDfprintf(out, "%s%zu", (i ? ", " : ""), p[i]); HDfprintf(out, "}"); } /* end if */ } /* end if */ @@ -2529,7 +2529,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { size_t size = HDva_arg(ap, size_t); - HDfprintf(out, "%Zu", size); + HDfprintf(out, "%zu", size); asize[argno] = (hssize_t)size; } /* end else */ break; @@ -2576,7 +2576,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t *); - HDfprintf(out, "0x%p", filter); + HDfprintf(out, "0x%p", (void *)filter); } /* end else */ break; @@ -2625,7 +2625,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, " {"); for (i = 0; i < asize[asize_idx]; i++) - HDfprintf(out, "%s%Zd", (i ? ", " : ""), p[i]); + HDfprintf(out, "%s%zd", (i ? ", " : ""), p[i]); HDfprintf(out, "}"); } /* end if */ } /* end if */ @@ -2635,7 +2635,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) else { ssize_t ssize = HDva_arg(ap, ssize_t); - HDfprintf(out, "%Zd", ssize); + HDfprintf(out, "%zd", ssize); asize[argno] = (hssize_t)ssize; } /* end else */ break; @@ -2676,5 +2676,5 @@ H5_trace(const double *returning, const char *func, const char *type, ...) if (H5_debug_g.ttimes) return function_times.elapsed; else - return 0.0F; + return (double)0.0F; } /* end H5_trace() */ diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 9cd0afb9c30..88911b07b5a 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -11,66 +11,18 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Scott Wegner - * June 3, 2008 - * - * Purpose: This file is used to map HDF macros to Windows functions. This +/* Purpose: This file is used to map HDF macros to Windows functions. This * should get included H5private mappings, so as to override them. * Any macro not mapped here, however, will receive a similar mapping * inside H5private.h * */ -#ifndef H5_HAVE_INTTYPES_H -/* The following definitions should be suitable for 64-bit Windows, which is - * LLP64, and for 32-bit Windows, which is ILP32. Those are the only - * platforms where is likely to be missing. VS2015 and later - * *may* provide these definitions. - */ -#ifdef _WIN64 -#define PRIdPTR "lld" -#define PRIoPTR "llo" -#define PRIuPTR "llu" -#define PRIxPTR "llx" -#define PRIXPTR "llX" -#else /* _WIN64 */ -#define PRIdPTR "ld" -#define PRIoPTR "lo" -#define PRIuPTR "lu" -#define PRIxPTR "lx" -#define PRIXPTR "lX" -#endif /* _WIN64 */ - -#define PRId8 "d" -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRId16 "d" -#define PRIo16 "o" -#define PRIu16 "u" -#define PRIx16 "x" -#define PRIX16 "X" -#define PRId32 "d" -#define PRIo32 "o" -#define PRIu32 "u" -#define PRIx32 "x" -#define PRIX32 "X" -#define PRId64 "lld" -#define PRIo64 "llo" -#define PRIu64 "llu" -#define PRIx64 "llx" -#define PRIX64 "llX" -#define PRIdMAX "lld" -#define PRIoMAX "llo" -#define PRIuMAX "llu" -#define PRIxMAX "llx" -#define PRIXMAX "llX" -#endif -/* - * _MSC_VER = 1900 VS2015 - * _MSC_VER = 1800 VS2013 - * _MSC_VER = 1700 VS2012 +/* _MSC_VER = 192x VS2019 + * _MSC_VER = 191x VS2017 + * _MSC_VER = 1900 VS2015 + * _MSC_VER = 1800 VS2013 + * _MSC_VER = 1700 VS2012 */ #ifdef H5_HAVE_WIN32_API @@ -119,22 +71,8 @@ typedef __int64 h5_stat_size_t; #ifdef H5_HAVE_VISUAL_STUDIO -#if (_MSC_VER < 1800) -#ifndef H5_HAVE_STRTOLL -#define HDstrtoll(S, R, N) _strtoi64(S, R, N) -#endif /* H5_HAVE_STRTOLL */ -#ifndef H5_HAVE_STRTOULL -#define HDstrtoull(S, R, N) _strtoui64(S, R, N) -#endif /* H5_HAVE_STRTOULL */ -/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are - * just pointers into the stack in those CRTs, the usual work-around - * is to just define the operation as a pointer copy. - */ -#define HDva_copy(D, S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ - /* - * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO + * The (void*) cast just avoids a compiler warning in MSVC */ #define HDmemset(X, C, Z) memset((void *)(X), C, Z) @@ -143,26 +81,6 @@ struct timezone { int tz_dsttime; }; -/* time.h before VS2015 does not include timespec */ -#if (_MSC_VER < 1900) -struct timespec { - time_t tv_sec; /* Seconds - >= 0 */ - long tv_nsec; /* Nanoseconds - [0, 999999999] */ -}; -#endif /* MSC_VER < 1900 */ - -#if (_MSC_VER <= 1700) -/* The isnan function needs underscore in VS2012 and earlier */ -#define HDisnan(X) _isnan(X) -/* The round functions do not exist in VS2012 and earlier */ -#define HDllround(V) Wllround(V) -#define HDllroundf(V) Wllroundf(V) -#define HDlround(V) Wlround(V) -#define HDlroundf(V) Wlroundf(V) -#define HDround(V) Wround(V) -#define HDroundf(V) Wroundf(V) -#endif /* MSC_VER < 1700 */ - #endif /* H5_HAVE_VISUAL_STUDIO */ #ifdef __cplusplus @@ -172,25 +90,11 @@ H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); H5_DLL int Wsetenv(const char *name, const char *value, int overwrite); H5_DLL int Wflock(int fd, int operation); H5_DLL char * Wgetlogin(void); -H5_DLL int c99_snprintf(char *str, size_t size, const char *format, ...); -H5_DLL int c99_vsnprintf(char *str, size_t size, const char *format, va_list ap); H5_DLL herr_t H5_expand_windows_env_vars(char **env_var); H5_DLL wchar_t *H5_get_utf16_str(const char *s); H5_DLL int Wopen_utf8(const char *path, int oflag, ...); H5_DLL int Wremove_utf8(const char *path); H5_DLL int H5_get_win32_times(H5_timevals_t *tvs); - -/* Round functions only needed for VS2012 and earlier. - * They are always built to ensure they don't go stale and - * can be deleted (along with their #defines, above) when we - * drop VS2012 support. - */ -H5_DLL long long Wllround(double arg); -H5_DLL long long Wllroundf(float arg); -H5_DLL long Wlround(double arg); -H5_DLL long Wlroundf(float arg); -H5_DLL double Wround(double arg); -H5_DLL float Wroundf(float arg); #ifdef __cplusplus } #endif /* __cplusplus */ @@ -199,8 +103,6 @@ H5_DLL float Wroundf(float arg); #define HDsetenv(N, V, O) Wsetenv(N, V, O) #define HDflock(F, L) Wflock(F, L) #define HDgetlogin() Wgetlogin() -#define HDsnprintf c99_snprintf /*varargs*/ -#define HDvsnprintf c99_vsnprintf /*varargs*/ /* Non-POSIX functions */ diff --git a/test/accum.c b/test/accum.c index 330c656c0e7..45cabf7414b 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2293,7 +2293,6 @@ test_swmr_write_big(hbool_t newest_format) FAIL_STACK_ERROR; /* Pop API context */ - if (api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR api_ctx_pushed = FALSE; @@ -2357,16 +2356,18 @@ accum_printf(const H5F_t *f) HDprintf("=====================================================\n"); HDprintf(" accumulator allocated size == %zu\n", accum->alloc_size); HDprintf(" accumulated data size == %zu\n", accum->size); - HDfprintf(stdout, " accumulator dirty? == %t\n", accum->dirty); + HDfprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE"); HDprintf("=====================================================\n"); - HDfprintf(stdout, " start of accumulated data, loc = %a\n", accum->loc); + HDfprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc); if (accum->dirty) { - HDfprintf(stdout, " start of dirty region, loc = %a\n", (haddr_t)(accum->loc + accum->dirty_off)); - HDfprintf(stdout, " end of dirty region, loc = %a\n", + HDfprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n", + (haddr_t)(accum->loc + accum->dirty_off)); + HDfprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len)); } /* end if */ - HDfprintf(stdout, " end of accumulated data, loc = %a\n", (haddr_t)(accum->loc + accum->size)); - HDfprintf(stdout, " end of accumulator allocation, loc = %a\n", + HDfprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n", + (haddr_t)(accum->loc + accum->size)); + HDfprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->alloc_size)); HDprintf("=====================================================\n"); } diff --git a/test/big.c b/test/big.c index 989e4bcba02..36fb27db6bc 100644 --- a/test/big.c +++ b/test/big.c @@ -429,7 +429,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n) for (i = 0; i < wrt_n; i++) { /* start position must be at least hs_size from the end */ hs_start[0] = randll(size2[0] - hs_size[0], i); - HDfprintf(out, "#%03d 0x%016Hx\n", i, hs_start[0]); + HDfprintf(out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]); if (H5Sselect_hyperslab(space2, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0) goto error; for (j = 0; j < WRT_SIZE; j++) { @@ -524,7 +524,7 @@ reader(char *filename, hid_t fapl) break; i = (int)HDstrtol(ln + 1, &s, 10); hs_offset[0] = HDstrtoull(s, NULL, 0); - HDfprintf(stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], ""); + HDfprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], ""); HDfflush(stdout); if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) @@ -605,7 +605,7 @@ usage(void) "\t-c\tFile system Checking skipped. Caution: this test generates\n" "\t\tmany big files and may fill up the file system.\n" "\t-fsize\tChange family size default to where is\n" - "\t\ta positive float point number. Default value is %Hu.\n" + "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n" "Examples:\n" "\tbig -fsize 2.1e9 \t# test with file size just under 2GB\n" "\tbig -fsize 2.2e9 \t# test with file size just above 2GB\n" diff --git a/test/btree2.c b/test/btree2.c index 58c45e26ae8..ffb73de7e27 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -10089,14 +10089,14 @@ main(void) if (nerrors) goto error; - puts("All v2 B-tree tests passed."); + HDputs("All v2 B-tree tests passed."); h5_cleanup(FILENAME, fapl); return 0; error: - puts("*** TESTS FAILED ***"); + HDputs("*** TESTS FAILED ***"); H5E_BEGIN_TRY { diff --git a/test/cache.c b/test/cache.c index cd7826e689e..895d3013c6d 100644 --- a/test/cache.c +++ b/test/cache.c @@ -2770,17 +2770,17 @@ write_permitted_check(int /*------------------------------------------------------------------------- * Function: check_insert_entry() * - * Purpose: Verify that H5C_insert_entry behaves as expected. - * Test the behaviour with different flags. + * Purpose: Verify that H5C_insert_entry behaves as expected. + * Test the behaviour with different flags. * - * This test was added primarily to test basic insert - * pinned entry functionallity, but I through in explicit - * tests for other functionallity that is tested implicitly - * elsewhere. + * This test was added primarily to test basic insert + * pinned entry functionallity, but I through in explicit + * tests for other functionallity that is tested implicitly + * elsewhere. * - * Return: void + * Return: void * - * Programmer: John Mainzer + * Programmer: John Mainzer * 8/10/06 * * Modifications: @@ -4448,7 +4448,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int #if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ - HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", + HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", test_num); #endif /* JRM */ @@ -8230,7 +8230,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->at_main_addr != check[i].at_main_addr ) { - HDfprintf(stdout, + HDfprintf(stdout, "(%d,%d) at main addr (expected) = %d (%d).\n", (int)(check[i].entry_type), (int)(check[i].entry_index), @@ -8240,7 +8240,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->is_dirty), (int)(check[i].is_dirty)); @@ -8248,7 +8248,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->header.is_dirty), (int)(check[i].is_dirty)); @@ -8256,7 +8256,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -8264,7 +8264,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -8272,7 +8272,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->is_pinned), (int)(check[i].is_pinned)); @@ -8280,7 +8280,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->header.is_pinned), (int)(check[i].is_pinned)); diff --git a/test/cache_api.c b/test/cache_api.c index 051ff24a508..60014c885d6 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -1216,9 +1216,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* do random reads on all datasets */ n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - m = rand() % NUM_DSETS; - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + m = HDrand() % NUM_DSETS; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ @@ -1328,8 +1328,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) m = 0; n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ diff --git a/test/cache_common.c b/test/cache_common.c index bf31ecdafde..37621962ab2 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -716,9 +716,11 @@ deserialize(const void *image, size_t len, void *udata, hbool_t *dirty, int32_t else { if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) { HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr); - HDfprintf(stdout, "*image = 0x%x 0x%x 0x%x\n", (int)(*((const char *)image)), - (int)(*(((const char *)image) + 1)), (int)(*(((const char *)image) + 2))); - HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF), (int)((idx & 0xFF00) >> 8)); + HDfprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n", + (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)), + (*(((const uint8_t *)image) + 2))); + HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF, + (((uint32_t)idx & 0xFF00) >> 8)); } /* end if */ HDassert((*((const char *)image)) == (char)(type & 0xFF)); HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8)); diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index b4e60ed8876..e74b4381938 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -302,7 +302,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] || s1[i].d != s2[i].d || s1[i].e != s2[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -339,7 +339,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] || s1[i].d != s3[i].d || s1[i].e != s3[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -369,7 +369,7 @@ test_compound(char *filename, hid_t fapl) for (i = 0; i < NX * NY; i++) { if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -413,7 +413,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] || s1[i].d != s5[i].d || s1[i].e != s5[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -423,7 +423,7 @@ test_compound(char *filename, hid_t fapl) if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i || s5[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -482,7 +482,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] || s1[i].d != s6[i].d || s1[i].e != s6[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -492,7 +492,7 @@ test_compound(char *filename, hid_t fapl) if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i || s6[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -561,7 +561,7 @@ test_compound(char *filename, hid_t fapl) s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] || s2[i].d != s1[i].d || s2[i].e != s1[i].e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -590,7 +590,7 @@ test_compound(char *filename, hid_t fapl) /* Read the dataset */ s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t)); - assert(s8); + HDassert(s8); if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) { goto error; } @@ -604,7 +604,7 @@ test_compound(char *filename, hid_t fapl) if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] || ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -643,7 +643,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] || ps2->d != ps1->d || ps2->e != ps1->e) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -652,7 +652,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) || ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -691,7 +691,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) || ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -702,7 +702,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) || ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -723,7 +723,7 @@ test_compound(char *filename, hid_t fapl) h_size[0] = 2 * NX / 3 - f_offset[0]; h_size[1] = 2 * NY / 3 - f_offset[1]; s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t)); - assert(s11); + HDassert(s11); /* Initialize */ for (i = 0; i < h_size[0] * h_size[1]; i++) { @@ -751,7 +751,7 @@ test_compound(char *filename, hid_t fapl) ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 || ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } @@ -759,14 +759,14 @@ test_compound(char *filename, hid_t fapl) j < f_offset[1] + h_size[1]) { if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) { H5_FAILED(); - puts(" Wrong values written or read"); + HDputs(" Wrong values written or read"); goto error; } } else { if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } } @@ -792,7 +792,7 @@ test_compound(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); /* Release resources */ if (s1) @@ -1669,7 +1669,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); return 1; } @@ -1684,7 +1684,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) for (_i = 0; _i < PACK_NMEMBS; _i++) \ HDprintf(" %d", order[_i]); \ HDprintf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \ - fflush(stdout); \ + HDfflush(stdout); \ goto error; \ } @@ -1719,7 +1719,7 @@ test_pack_ooo(void) * the compound */ unsigned i, j; /* Indices */ - HDsrand((unsigned)time(NULL)); + HDsrand((unsigned)HDtime(NULL)); /* Initialize "free_order" array to indicate that all slots in order are * free */ @@ -2233,7 +2233,7 @@ main(int argc, char *argv[]) /* Turn off optimized compound converter? */ if (argc > 1) { - if (argc > 2 || strcmp("--noopt", argv[1])) { + if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) { HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]); HDexit(EXIT_FAILURE); } diff --git a/test/dangle.c b/test/dangle.c index e6cb8af7b55..d41507b6f74 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -663,7 +663,7 @@ main(void) int nerrors = 0; /* Run tests w/weak file close */ - puts("Testing dangling objects with weak file close:"); + HDputs("Testing dangling objects with weak file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_WEAK); nerrors += test_dangle_group(H5F_CLOSE_WEAK); nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK); @@ -671,7 +671,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_WEAK); /* Run tests w/semi file close */ - puts("Testing dangling objects with semi file close:"); + HDputs("Testing dangling objects with semi file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_SEMI); nerrors += test_dangle_group(H5F_CLOSE_SEMI); nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI); @@ -679,7 +679,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_SEMI); /* Run tests w/strong file close */ - puts("Testing dangling objects with strong file close:"); + HDputs("Testing dangling objects with strong file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_STRONG); nerrors += test_dangle_group(H5F_CLOSE_STRONG); nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG); @@ -692,11 +692,11 @@ main(void) /* Check for errors */ if (nerrors) goto error; - puts("All dangling ID tests passed."); + HDputs("All dangling ID tests passed."); return 0; error: - puts("***** DANGLING ID TESTS FAILED *****"); + HDputs("***** DANGLING ID TESTS FAILED *****"); return 1; } diff --git a/test/direct_chunk.c b/test/direct_chunk.c index 7db7242f25f..61e3df94587 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2326,7 +2326,7 @@ main(void) need_comma = TRUE; } /* end if */ HDprintf(":\n"); - fflush(stdout); + HDfflush(stdout); nerrors += test_single_chunk(config); } /* end for */ diff --git a/test/dsets.c b/test/dsets.c index 74ff06ec69f..6160c65d617 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -375,13 +375,13 @@ test_create(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -450,13 +450,13 @@ test_create(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); /* Attempt to create a dataset with invalid chunk sizes */ csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, @@ -472,7 +472,7 @@ test_create(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -494,11 +494,11 @@ test_create(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - assert(status >= 0); + HDassert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - assert(status >= 0); + HDassert(status >= 0); dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -571,7 +571,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl) /* Create a small conversion buffer to test strip mining */ tconv_buf = HDmalloc((size_t)1000); xfer = H5Pcreate(H5P_DATASET_XFER); - assert(xfer >= 0); + HDassert(xfer >= 0); if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0) goto error; @@ -4383,9 +4383,9 @@ test_nbit_compound_3(hid_t file) /* Check that the values read are the same as the values written */ for (i = 0; i < (size_t)size[0]; i++) { - if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 || - strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len || - new_data[i].r != orig_data[i].r) { + if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 || + HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || + new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) { H5_FAILED(); HDprintf(" Read different values than written.\n"); HDprintf(" At index %lu\n", (unsigned long)i); @@ -4601,7 +4601,7 @@ test_nbit_int_size(hid_t file) if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) || dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) { H5_FAILED(); - HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size); + HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size); goto error; } @@ -4811,7 +4811,7 @@ test_nbit_flt_size(hid_t file) if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) || dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) { H5_FAILED(); - HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size); + HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size); goto error; } /* end if */ @@ -4822,8 +4822,14 @@ test_nbit_flt_size(hid_t file) PASSED(); + HDfree(orig); + HDfree(orig_data); + return SUCCEED; error: + HDfree(orig); + HDfree(orig_data); + return FAIL; } /* end test_nbit_flt_size() */ @@ -7892,7 +7898,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) TESTING(testname); - assert(NPOINTS < 100); + HDassert(NPOINTS < 100); h5_fixname(FILENAME[6], fapl, filename, sizeof filename); @@ -8414,13 +8420,13 @@ test_deprec(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -8479,7 +8485,7 @@ test_deprec(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); /* Add the deflate filter, if available */ #if defined H5_HAVE_FILTER_DEFLATE @@ -8515,7 +8521,7 @@ test_deprec(hid_t file) csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms); @@ -8530,7 +8536,7 @@ test_deprec(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0) goto error; @@ -8555,11 +8561,11 @@ test_deprec(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - assert(status >= 0); + HDassert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - assert(status >= 0); + HDassert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) < 0) diff --git a/test/dt_arith.c b/test/dt_arith.c index 1eafee2345f..f2bf6cf48b9 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -359,7 +359,7 @@ static int without_hardware_g = 0; \ for (n = 0; n < 2; n++) { \ if (n == 1) { \ - memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ + HDmemset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ /* -0 */ \ H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \ CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \ @@ -566,7 +566,7 @@ generates_sigfpe(void) HDfflush(stdout); HDfflush(stderr); - if ((pid = fork()) < 0) { + if ((pid = HDfork()) < 0) { HDperror("fork"); HDexit(EXIT_FAILURE); } @@ -580,7 +580,7 @@ generates_sigfpe(void) HDexit(EXIT_SUCCESS); } - while (pid != waitpid(pid, &status, 0)) + while (pid != HDwaitpid(pid, &status, 0)) /*void*/; if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) { HDputs("Floating-point overflow cases will be tested."); @@ -2391,7 +2391,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* Are the two results the same? */ for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++) @@ -2949,12 +2949,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) */ HDfflush(stdout); HDfflush(stderr); - if ((child_pid = fork()) < 0) { + if ((child_pid = HDfork()) < 0) { HDperror("fork"); return 1; } else if (child_pid > 0) { - while (child_pid != waitpid(child_pid, &status, 0)) /*void*/ + while (child_pid != HDwaitpid(child_pid, &status, 0)) /*void*/ ; if (WIFEXITED(status) && 255 == WEXITSTATUS(status)) { return 0; /*child exit after catching SIGFPE*/ @@ -3023,7 +3023,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) if (sizeof(float) == sizeof(double)) HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible."); if (OTHER == src_type || OTHER == dst_type) { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -3042,7 +3042,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) goto error; } else { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -4351,7 +4351,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* For Intel machines, the size of "long double" is 12 bytes, precision * is 80 bits; for AMD processors, the size of "long double" is 16 bytes, @@ -5010,7 +5010,7 @@ run_fp_tests(const char *name) { int nerrors = 0; - if (!strcmp(name, "noop")) { + if (!HDstrcmp(name, "noop")) { nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT); nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE); #if H5_SIZEOF_LONG_DOUBLE != 0 @@ -5247,7 +5247,7 @@ run_fp_int_conv(const char *name) #endif #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG - if (!strcmp(name, "hw")) { /* Hardware conversion */ + if (!HDstrcmp(name, "hw")) { /* Hardware conversion */ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); } diff --git a/test/dtypes.c b/test/dtypes.c index 383361b470b..b7b8dbdc15e 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2556,7 +2556,7 @@ test_compound_12(void) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Tries to cut off the last member. Should have failed."); + HDputs(" Tries to cut off the last member. Should have failed."); goto error; } diff --git a/test/earray.c b/test/earray.c index 8e3204f6f89..eedf02f8cd9 100644 --- a/test/earray.c +++ b/test/earray.c @@ -331,52 +331,63 @@ check_stats(const H5EA_t *ea, const earray_state_t *state) /* Compare information */ if (earray_stats.stored.max_idx_set != state->max_idx_set) { - HDfprintf(stdout, "earray_stats.stored.max_idx_set = %Hu, state->max_idx_set = %Hu\n", + HDfprintf(stdout, + "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n", earray_stats.stored.max_idx_set, state->max_idx_set); TEST_ERROR } /* end if */ if (earray_stats.stored.nelmts != state->nelmts) { - HDfprintf(stdout, "earray_stats.stored.nelmts = %Hu, state->nelmts = %Hu\n", + HDfprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n", earray_stats.stored.nelmts, state->nelmts); TEST_ERROR } /* end if */ if (earray_stats.computed.hdr_size != state->hdr_size) { - HDfprintf(stdout, "earray_stats.computed.hdr_size = %Hu, state->hdr_size = %Hu\n", + HDfprintf(stdout, + "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n", earray_stats.computed.hdr_size, state->hdr_size); TEST_ERROR } /* end if */ if (earray_stats.computed.nindex_blks != state->nindex_blks) { - HDfprintf(stdout, "earray_stats.computed.nindex_blks = %Hu, state->nindex_blks = %Hu\n", + HDfprintf(stdout, + "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n", earray_stats.computed.nindex_blks, state->nindex_blks); TEST_ERROR } /* end if */ if (earray_stats.computed.index_blk_size != state->index_blk_size) { - HDfprintf(stdout, "earray_stats.computed.index_blk_size = %Hu, state->index_blk_size = %Hu\n", + HDfprintf(stdout, + "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE + "\n", earray_stats.computed.index_blk_size, state->index_blk_size); TEST_ERROR } /* end if */ if (earray_stats.stored.ndata_blks != state->ndata_blks) { - HDfprintf(stdout, "earray_stats.stored.ndata_blks = %Hu, state->ndata_blks = %Hu\n", + HDfprintf(stdout, + "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n", earray_stats.stored.ndata_blks, state->ndata_blks); TEST_ERROR } /* end if */ /* Don't compare this currently, it's very hard to compute */ #ifdef NOT_YET if (earray_stats.stored.data_blk_size != state->data_blk_size) { - HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n", + HDfprintf(stdout, + "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE + "\n", earray_stats.stored.data_blk_size, state->data_blk_size); TEST_ERROR } /* end if */ #endif /* NOT_YET */ if (earray_stats.stored.nsuper_blks != state->nsuper_blks) { - HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n", + HDfprintf(stdout, + "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n", earray_stats.stored.nsuper_blks, state->nsuper_blks); TEST_ERROR } /* end if */ /* Don't compare this currently, it's very hard to compute */ #ifdef NOT_YET if (earray_stats.stored.super_blk_size != state->super_blk_size) { - HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n", + HDfprintf(stdout, + "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE + "\n", earray_stats.stored.super_blk_size, state->super_blk_size); TEST_ERROR } /* end if */ @@ -777,7 +788,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE } #else /* NDEBUG */ SKIPPED(); - puts(" Not tested when assertions are disabled"); + HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ /* @@ -2451,12 +2462,12 @@ main(void) switch (curr_test) { /* "Normal" testing parameters */ case EARRAY_TEST_NORMAL: - puts("Testing with normal parameters"); + HDputs("Testing with normal parameters"); break; /* "Re-open array" testing parameters */ case EARRAY_TEST_REOPEN: - puts("Testing with reopen array flag set"); + HDputs("Testing with reopen array flag set"); tparam.reopen_array = EARRAY_TEST_REOPEN; break; @@ -2485,31 +2496,31 @@ main(void) switch (curr_iter) { /* "Forward" testing parameters */ case EARRAY_ITER_FW: - puts("Testing with forward iteration"); + HDputs("Testing with forward iteration"); tparam.eiter = &ea_iter_fw; break; /* "Reverse" testing parameters */ case EARRAY_ITER_RV: - puts("Testing with reverse iteration"); + HDputs("Testing with reverse iteration"); tparam.eiter = &ea_iter_rv; break; /* "Random" testing parameters */ case EARRAY_ITER_RND: - puts("Testing with random iteration"); + HDputs("Testing with random iteration"); tparam.eiter = &ea_iter_rnd; break; /* "Random #2" testing parameters */ case EARRAY_ITER_RND2: - puts("Testing with random #2 iteration"); + HDputs("Testing with random #2 iteration"); tparam.eiter = &ea_iter_rnd2; break; /* "Cyclic" testing parameters */ case EARRAY_ITER_CYC: - puts("Testing with cyclic iteration"); + HDputs("Testing with cyclic iteration"); tparam.eiter = &ea_iter_cyc; break; diff --git a/test/enum.c b/test/enum.c index 47e7e1c0e2a..39238923536 100644 --- a/test/enum.c +++ b/test/enum.c @@ -792,11 +792,11 @@ main(void) if (nerrors) goto error; - puts("All enum tests passed."); + HDputs("All enum tests passed."); h5_cleanup(FILENAME, fapl); return 0; error: - puts("*** ENUM TESTS FAILED ***"); + HDputs("*** ENUM TESTS FAILED ***"); return 1; } diff --git a/test/error_test.c b/test/error_test.c index 5e744747b03..c8205ff817c 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -506,7 +506,7 @@ test_create(void) /*------------------------------------------------------------------------- * Function: test_copy * - * Purpose: Test copyinging an error stack + * Purpose: Test copying an error stack * * Return: Success: 0 * Failure: -1 diff --git a/test/external.c b/test/external.c index 19a11e7a1ad..c31701df665 100644 --- a/test/external.c +++ b/test/external.c @@ -485,12 +485,12 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h for (i = 0; i < n_external_files; i++) { if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) { HDfprintf(stderr, "External file %d overflows name buffer\n", i + 1); - fflush(stderr); + HDfflush(stderr); return -1; } if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) { HDfprintf(stderr, "Problem adding external file %s\n", exname); - fflush(stderr); + HDfflush(stderr); return -1; } } diff --git a/test/farray.c b/test/farray.c index 7254654dc57..a93abd48c95 100644 --- a/test/farray.c +++ b/test/farray.c @@ -177,20 +177,20 @@ check_stats(const H5FA_t *fa, const farray_state_t *state) /* Compare information */ if (farray_stats.hdr_size != state->hdr_size) { - HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n", farray_stats.hdr_size, - state->hdr_size); + HDfprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n", + farray_stats.hdr_size, state->hdr_size); TEST_ERROR } if (farray_stats.dblk_size != state->dblk_size) { - HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n", farray_stats.dblk_size, - state->dblk_size); + HDfprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n", + farray_stats.dblk_size, state->dblk_size); TEST_ERROR } if (farray_stats.nelmts != state->nelmts) { - HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n", farray_stats.nelmts, - state->nelmts); + HDfprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n", + farray_stats.nelmts, state->nelmts); TEST_ERROR } @@ -491,7 +491,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE } #else /* NDEBUG */ SKIPPED(); - puts(" Not tested when assertions are disabled"); + HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ /* diff --git a/test/fheap.c b/test/fheap.c index b1558dbd3d9..e075a64d8cb 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -178,14 +178,14 @@ static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_hea fheap_heap_ids_t *keep_ids); /*------------------------------------------------------------------------- - * Function: init_small_cparam + * Function: init_small_cparam * - * Purpose: Initialize heap creation parameter structure with small + * Purpose: Initialize heap creation parameter structure with small * settings * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -214,14 +214,14 @@ init_small_cparam(H5HF_create_t *cparam) } /* init_small_cparam() */ /*------------------------------------------------------------------------- - * Function: init_large_cparam + * Function: init_large_cparam * - * Purpose: Initialize heap creation parameter structure with large + * Purpose: Initialize heap creation parameter structure with large * settings * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -250,13 +250,13 @@ init_large_cparam(H5HF_create_t *cparam) } /* init_large_cparam() */ /*------------------------------------------------------------------------- - * Function: check_stats + * Function: check_stats * - * Purpose: Verify stats for a heap + * Purpose: Verify stats for a heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -272,43 +272,45 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state) if (H5HF_stat_info(fh, &heap_stats) < 0) FAIL_STACK_ERROR if (heap_stats.man_nobjs != state->man_nobjs) { - HDfprintf(stdout, "heap_stats.man_nobjs = %Hu, state->man_nobjs = %Zu\n", heap_stats.man_nobjs, - state->man_nobjs); + HDfprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n", + heap_stats.man_nobjs, state->man_nobjs); TEST_ERROR } /* end if */ if (heap_stats.man_size != state->man_size) { - HDfprintf(stdout, "heap_stats.man_size = %Hu, state->man_size = %Hu\n", heap_stats.man_size, - state->man_size); + HDfprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n", + heap_stats.man_size, state->man_size); TEST_ERROR } /* end if */ if (heap_stats.man_alloc_size != state->man_alloc_size) { - HDfprintf(stdout, "heap_stats.man_alloc_size = %Hu, state->man_alloc_size = %Hu\n", + HDfprintf(stdout, + "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n", heap_stats.man_alloc_size, state->man_alloc_size); TEST_ERROR } /* end if */ if (heap_stats.man_free_space != state->man_free_space) { - HDfprintf(stdout, "heap_stats.man_free_space = %Hu, state->man_free_space = %Hu\n", + HDfprintf(stdout, + "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n", heap_stats.man_free_space, state->man_free_space); TEST_ERROR } /* end if */ if (heap_stats.huge_nobjs != state->huge_nobjs) { - HDfprintf(stdout, "heap_stats.huge_nobjs = %Hu, state->huge_nobjs = %Zu\n", heap_stats.huge_nobjs, - state->huge_nobjs); + HDfprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n", + heap_stats.huge_nobjs, state->huge_nobjs); TEST_ERROR } /* end if */ if (heap_stats.huge_size != state->huge_size) { - HDfprintf(stdout, "heap_stats.huge_size = %Hu, state->huge_size = %Hu\n", heap_stats.huge_size, - state->huge_size); + HDfprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n", + heap_stats.huge_size, state->huge_size); TEST_ERROR } /* end if */ if (heap_stats.tiny_nobjs != state->tiny_nobjs) { - HDfprintf(stdout, "heap_stats.tiny_nobjs = %Hu, state->tiny_nobjs = %Zu\n", heap_stats.tiny_nobjs, - state->tiny_nobjs); + HDfprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n", + heap_stats.tiny_nobjs, state->tiny_nobjs); TEST_ERROR } /* end if */ if (heap_stats.tiny_size != state->tiny_size) { - HDfprintf(stdout, "heap_stats.tiny_size = %Hu, state->tiny_size = %Hu\n", heap_stats.tiny_size, - state->tiny_size); + HDfprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n", + heap_stats.tiny_size, state->tiny_size); TEST_ERROR } /* end if */ @@ -320,13 +322,13 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state) } /* check_stats() */ /*------------------------------------------------------------------------- - * Function: op_memcpy + * Function: op_memcpy * - * Purpose: Perform 'memcpy' for an object + * Purpose: Perform 'memcpy' for an object * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, September 11, 2006 @@ -343,9 +345,9 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data) } /* op_memcpy() */ /*------------------------------------------------------------------------- - * Function: add_obj + * Function: add_obj * - * Purpose: Add an object to heap + * Purpose: Add an object to heap * * Note: The following fields in the 'state' structure are set to * the values expected _after_ any block created for the object: @@ -359,7 +361,7 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -465,13 +467,13 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state, } /* add_obj() */ /*------------------------------------------------------------------------- - * Function: get_del_string + * Function: get_del_string * - * Purpose: Return string describing the kind of deletion to perform + * Purpose: Return string describing the kind of deletion to perform * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -503,9 +505,9 @@ get_del_string(const fheap_test_param_t *tparam) /*------------------------------------------------------------------------- * Function: get_fill_size * - * Purpose: Retrieve the size of objects to "bulk" fill blocks with + * Purpose: Retrieve the size of objects to "bulk" fill blocks with * - * Return: Size of object to pass down to "fill_heap" routine on + * Return: Size of object to pass down to "fill_heap" routine on * success/can't fail * * Programmer: Quincey Koziol @@ -532,13 +534,13 @@ get_fill_size(const fheap_test_param_t *tparam) } /* get_fill_size() */ /*------------------------------------------------------------------------- - * Function: begin_test + * Function: begin_test * - * Purpose: Perform common "test being" operations + * Purpose: Perform common "test being" operations * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -582,12 +584,12 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t * H5_GCC_DIAG_ON("format-nonliteral") /*------------------------------------------------------------------------- - * Function: reopen_file + * Function: reopen_file * - * Purpose: Perform common "re-open" operations on file & heap for testing + * Purpose: Perform common "re-open" operations on file & heap for testing * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -637,13 +639,13 @@ reopen_file(hid_t *file, H5F_t **f, const char *filename, hid_t fapl, H5HF_t **f } /* end reopen_file() */ /*------------------------------------------------------------------------- - * Function: open_heap + * Function: open_heap * - * Purpose: Perform common "open" operations on file & heap for testing + * Purpose: Perform common "open" operations on file & heap for testing * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -748,13 +750,13 @@ open_heap(char *filename, hid_t fapl, const H5HF_create_t *cparam, const fheap_t } /* end open_heap() */ /*------------------------------------------------------------------------- - * Function: reopen_heap + * Function: reopen_heap * - * Purpose: Perform common "re-open" operations on heap for testing + * Purpose: Perform common "re-open" operations on heap for testing * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -784,12 +786,12 @@ reopen_heap(H5F_t *f, H5HF_t **fh, haddr_t fh_addr, const fheap_test_param_t *tp } /* end reopen_heap() */ /*------------------------------------------------------------------------- - * Function: close_heap + * Function: close_heap * - * Purpose: Perform common "close" operations on file & heap for testing + * Purpose: Perform common "close" operations on file & heap for testing * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -849,13 +851,13 @@ close_heap(char *filename, hid_t fapl, fheap_test_param_t *tparam, hid_t file, H } /* end close_heap() */ /*------------------------------------------------------------------------- - * Function: del_objs_half_refill + * Function: del_objs_half_refill * - * Purpose: Remove half of objects from heap and refill + * Purpose: Remove half of objects from heap and refill * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -941,13 +943,13 @@ del_objs_half_refill(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_he } /* del_objs_half_refill() */ /*------------------------------------------------------------------------- - * Function: del_objs + * Function: del_objs * - * Purpose: Remove objects from heap + * Purpose: Remove objects from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -1022,9 +1024,9 @@ del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t * } /* del_objs() */ /*------------------------------------------------------------------------- - * Function: fill_heap + * Function: fill_heap * - * Purpose: Insert (small) objects to fill up the free space in a heap block + * Purpose: Insert (small) objects to fill up the free space in a heap block * * Note: The following fields in the 'state' structure are set to * the values expected _after_ the block has been created: @@ -1038,7 +1040,7 @@ del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t * * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -1232,13 +1234,13 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s } /* fill_heap() */ /*------------------------------------------------------------------------- - * Function: fill_root_row + * Function: fill_root_row * - * Purpose: Fill up a row of direct blocks in the root indirect block + * Purpose: Fill up a row of direct blocks in the root indirect block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1328,13 +1330,13 @@ fill_root_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *sta } /* fill_root_row() */ /*------------------------------------------------------------------------- - * Function: fill_partial row + * Function: fill_partial row * - * Purpose: Fill up part of a row of direct blocks in an non-root indirect block + * Purpose: Fill up part of a row of direct blocks in an non-root indirect block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 11, 2006 @@ -1373,13 +1375,13 @@ fill_partial_row(H5HF_t *fh, unsigned row, unsigned width, size_t obj_size, fhea } /* fill_partial_row() */ /*------------------------------------------------------------------------- - * Function: fill_row + * Function: fill_row * - * Purpose: Fill up entire row of direct blocks in an non-root indirect block + * Purpose: Fill up entire row of direct blocks in an non-root indirect block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1405,16 +1407,16 @@ fill_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *state, f } /* fill_row() */ /*------------------------------------------------------------------------- - * Function: fill_root_direct + * Function: fill_root_direct * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in the root indirect block * (Generally used to create & fill up direct blocks in a new * indirect block) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -1444,15 +1446,15 @@ fill_root_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_h } /* fill_root_direct() */ /*------------------------------------------------------------------------- - * Function: fill_2nd_indirect + * Function: fill_2nd_indirect * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a second-level indirect block (which only has * direct blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1483,14 +1485,14 @@ fill_2nd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_state_t } /* fill_2nd_direct() */ /*------------------------------------------------------------------------- - * Function: fill_all_direct + * Function: fill_all_direct * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks up to the maximum direct block size * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1520,15 +1522,15 @@ fill_all_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_he } /* fill_all_direct() */ /*------------------------------------------------------------------------- - * Function: fill_2nd_indirect_row + * Function: fill_2nd_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of second-level indirect block (which only * have direct blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1558,15 +1560,15 @@ fill_2nd_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_stat } /* fill_2nd_direct_row() */ /*------------------------------------------------------------------------- - * Function: fill_all_2nd_indirect_rows + * Function: fill_all_2nd_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of second-level indirect blocks (which only * have direct blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1595,15 +1597,15 @@ fill_all_2nd_indirect_rows(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *stat } /* fill_2nd_direct_row() */ /*------------------------------------------------------------------------- - * Function: fill_3rd_indirect + * Function: fill_3rd_indirect * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a third-level indirect block (which * has one more level of indirect blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -1633,15 +1635,15 @@ fill_3rd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_state_t } /* fill_3rd_indirect() */ /*------------------------------------------------------------------------- - * Function: fill_3rd_indirect_row + * Function: fill_3rd_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of third-level indirect block (which * have one more level of indirect blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1672,15 +1674,15 @@ fill_3rd_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_stat } /* fill_3rd_direct_row() */ /*------------------------------------------------------------------------- - * Function: fill_all_3rd_indirect_rows + * Function: fill_all_3rd_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of third-level indirect blocks (which * have one more level of indirect blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1710,15 +1712,15 @@ fill_all_3rd_indirect_rows(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *stat } /* fill_all_3rd_direct_rows() */ /*------------------------------------------------------------------------- - * Function: fill_4th_indirect_row + * Function: fill_4th_indirect_row * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in a row of fourth-level indirect blocks (which * have two more levels of indirect blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1759,15 +1761,15 @@ fill_4th_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_stat } /* fill_4th_direct_row() */ /*------------------------------------------------------------------------- - * Function: fill_all_4th_indirect_rows + * Function: fill_all_4th_indirect_rows * - * Purpose: Insert (small) objects to fill up the free space in all direct + * Purpose: Insert (small) objects to fill up the free space in all direct * heap blocks in all rows of fourth-level indirect blocks (which * have two more levels of indirect blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1815,12 +1817,12 @@ fill_all_4th_indirect_rows(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *stat } /* fill_all_4th_direct_rows() */ /*------------------------------------------------------------------------- - * Function: test_create + * Function: test_create * - * Purpose: Create fractal heap + * Purpose: Create fractal heap * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, February 24, 2006 @@ -1934,12 +1936,12 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_create() */ /*------------------------------------------------------------------------- - * Function: test_reopen + * Function: test_reopen * - * Purpose: Create & reopen a fractal heap + * Purpose: Create & reopen a fractal heap * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -2087,12 +2089,12 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_reopen() */ /*------------------------------------------------------------------------- - * Function: test_open_twice + * Function: test_open_twice * - * Purpose: Open a fractal heap twice + * Purpose: Open a fractal heap twice * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -2265,12 +2267,12 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_open_twice() */ /*------------------------------------------------------------------------- - * Function: test_delete_open + * Function: test_delete_open * - * Purpose: Delete opened fractal heap (& open deleted heap) + * Purpose: Delete opened fractal heap (& open deleted heap) * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, January 5, 2007 @@ -2443,12 +2445,12 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_delete_open() */ /*------------------------------------------------------------------------- - * Function: test_id_limits + * Function: test_id_limits * - * Purpose: Test limits for heap ID lengths + * Purpose: Test limits for heap ID lengths * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -2781,12 +2783,12 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) } /* test_id_limits() */ /*------------------------------------------------------------------------- - * Function: test_filtered_create + * Function: test_filtered_create * - * Purpose: Test creating a heap with I/O filters + * Purpose: Test creating a heap with I/O filters * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -2903,12 +2905,12 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) } /* test_filtered_create() */ /*------------------------------------------------------------------------- - * Function: test_size + * Function: test_size * - * Purpose: Test querying heap size + * Purpose: Test querying heap size * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, August 14, 2007 @@ -3177,12 +3179,12 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl) } /* test_reopen_hdr() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_weird + * Function: test_man_insert_weird * - * Purpose: Test inserting "weird" sized objects into absolute heap + * Purpose: Test inserting "weird" sized objects into absolute heap * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -3291,13 +3293,13 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa #ifdef ALL_INSERT_TESTS /*------------------------------------------------------------------------- - * Function: test_man_insert_first + * Function: test_man_insert_first * - * Purpose: Test inserting first object into absolute heap + * Purpose: Test inserting first object into absolute heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, February 24, 2006 @@ -3392,13 +3394,13 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa } /* test_man_insert_first() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_second + * Function: test_man_insert_second * - * Purpose: Test inserting two objects into absolute heap + * Purpose: Test inserting two objects into absolute heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3487,14 +3489,14 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp } /* test_man_insert_second() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_root_mult + * Function: test_man_insert_root_mult * - * Purpose: Test inserting mult. objects into absolute heap, up to the + * Purpose: Test inserting mult. objects into absolute heap, up to the * limit of a root direct block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3585,15 +3587,15 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_insert_root_mult() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_force_indirect + * Function: test_man_insert_force_indirect * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block and forcing the root block to be converted * into an indirect block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3691,15 +3693,15 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par } /* test_man_insert_force_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_fill_second + * Function: test_man_insert_fill_second * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block, forcing the root block to be converted * into an indirect block and filling the secnod indirect block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -3797,16 +3799,16 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ } /* test_man_insert_fill_second() */ /*------------------------------------------------------------------------- - * Function: test_man_insert_third_direct + * Function: test_man_insert_third_direct * - * Purpose: Test inserting mult. objects into absolute heap, filling the + * Purpose: Test inserting mult. objects into absolute heap, filling the * root direct block, forcing the root block to be converted * into an indirect block, filling the secnod indirect block and * creating a third direct block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -3909,15 +3911,15 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param } /* test_man_insert_third_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_first_row + * Function: test_man_fill_first_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 13, 2006 @@ -4005,15 +4007,15 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t } /* test_man_fill_first_row() */ /*------------------------------------------------------------------------- - * Function: test_man_start_second_row + * Function: test_man_start_second_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, then add another object to start second row. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 14, 2006 @@ -4108,15 +4110,15 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_start_second_row() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_second_row + * Function: test_man_fill_second_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, then fill the second row also. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 14, 2006 @@ -4208,16 +4210,16 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * } /* test_man_fill_second_row() */ /*------------------------------------------------------------------------- - * Function: test_man_start_third_row + * Function: test_man_start_third_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first row of root indirect * block, fill the second row also, then add another object to * start the third row. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4319,15 +4321,15 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * } /* test_man_start_third_row() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_fourth_row + * Function: test_man_fill_fourth_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill first four rows of root indirect * block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4417,15 +4419,15 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * } /* test_man_fill_fourth_row() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_all_root_direct + * Function: test_man_fill_all_root_direct * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4513,15 +4515,15 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para } /* test_man_fill_all_root_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_first_recursive_indirect + * Function: test_man_first_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block and create first recursive indirect block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4614,16 +4616,16 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_ } /* test_man_first_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_second_direct_recursive_indirect + * Function: test_man_second_direct_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block and start second * direct block in that indirect block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4724,16 +4726,16 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe } /* test_man_second_direct_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_first_recursive_indirect + * Function: test_man_fill_first_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block and filling all * direct blocks in that indirect block. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4826,9 +4828,9 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_ } /* test_man_fill_first_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_second_recursive_indirect + * Function: test_man_second_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and adding another @@ -4836,7 +4838,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4936,9 +4938,9 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test } /* test_man_second_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_second_recursive_indirect + * Function: test_man_fill_second_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and then create second @@ -4947,7 +4949,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -5044,9 +5046,9 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap } /* test_man_fill_second_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_recursive_indirect_row + * Function: test_man_fill_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, create first recursive indirect block, filling all * direct blocks in that indirect block and then create second @@ -5055,7 +5057,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -5144,16 +5146,16 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te } /* test_man_fill_recursive_indirect_row() */ /*------------------------------------------------------------------------- - * Function: test_man_start_2nd_recursive_indirect + * Function: test_man_start_2nd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the first row of indirect * blocks and start on first block in second row of indirect blocks * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5253,16 +5255,16 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t } /* test_man_start_2nd_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_recursive_indirect_two_deep + * Function: test_man_recursive_indirect_two_deep * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5355,9 +5357,9 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te } /* test_man_recursive_indirect_two_deep() */ /*------------------------------------------------------------------------- - * Function: test_man_start_3rd_recursive_indirect + * Function: test_man_start_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and start first direct block @@ -5365,7 +5367,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5465,9 +5467,9 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t } /* test_man_start_3rd_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_first_3rd_recursive_indirect + * Function: test_man_fill_first_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill first indirect block @@ -5475,7 +5477,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5576,9 +5578,9 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh } /* test_man_fill_first_3rd_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_recursive_indirect_row + * Function: test_man_fill_3rd_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill all indirect blocks @@ -5586,7 +5588,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5684,9 +5686,9 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea } /* test_man_fill_3rd_recursive_indirect_row() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_all_3rd_recursive_indirect + * Function: test_man_fill_all_3rd_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep and fill all indirect blocks @@ -5694,7 +5696,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5792,9 +5794,9 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea } /* test_man_fill_all_3rd_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_start_4th_recursive_indirect + * Function: test_man_start_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -5803,7 +5805,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5907,9 +5909,9 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t } /* test_man_start_4th_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_first_4th_recursive_indirect + * Function: test_man_fill_first_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -5918,7 +5920,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6028,9 +6030,9 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh } /* test_man_fill_first_4th_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_4th_recursive_indirect_row + * Function: test_man_fill_4th_recursive_indirect_row * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -6039,7 +6041,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6140,9 +6142,9 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea } /* test_man_fill_4th_recursive_indirect_row() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_all_4th_recursive_indirect + * Function: test_man_fill_all_4th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -6151,7 +6153,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6253,9 +6255,9 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea #endif /* ALL_INSERT_TESTS */ /*------------------------------------------------------------------------- - * Function: test_man_start_5th_recursive_indirect + * Function: test_man_start_5th_recursive_indirect * - * Purpose: Test inserting mult. objects into absolute heap, creating + * Purpose: Test inserting mult. objects into absolute heap, creating * enough direct blocks to fill all direct rows of root indirect * block, fill all direct blocks in the row of indirect * blocks that are 2 levels deep, fill all indirect blocks @@ -6265,7 +6267,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6386,13 +6388,13 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t } /* test_man_start_5th_recursive_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_bogus + * Function: test_man_remove_bogus * - * Purpose: Test removing bogus heap IDs + * Purpose: Test removing bogus heap IDs * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -6546,13 +6548,13 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed); } /* test_man_remove_bogus() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_one + * Function: test_man_remove_one * - * Purpose: Test removing single object from heap + * Purpose: Test removing single object from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -6710,13 +6712,13 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara } /* test_man_remove_one() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_two + * Function: test_man_remove_two * - * Purpose: Test removing two objects from heap + * Purpose: Test removing two objects from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -6903,14 +6905,14 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara } /* test_man_remove_two() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_one_larger + * Function: test_man_remove_one_larger * - * Purpose: Test removing single larger (but < standalone size) object + * Purpose: Test removing single larger (but < standalone size) object * from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 6, 2006 @@ -7072,14 +7074,14 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_remove_one_larger() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_two_larger + * Function: test_man_remove_two_larger * - * Purpose: Test removing two larger (but < standalone size) objects + * Purpose: Test removing two larger (but < standalone size) objects * from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, June 10, 2006 @@ -7312,14 +7314,14 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_remove_two_larger() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_three_larger + * Function: test_man_remove_three_larger * - * Purpose: Test removing three larger (but < standalone size) objects + * Purpose: Test removing three larger (but < standalone size) objects * from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 12, 2006 @@ -7612,12 +7614,12 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param } /* test_man_remove_three_larger() */ /*------------------------------------------------------------------------- - * Function: test_man_incr_insert_remove + * Function: test_man_incr_insert_remove * - * Purpose: Test incremental insert & removal of objects in heap + * Purpose: Test incremental insert & removal of objects in heap * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Sunday, April 1, 2012 @@ -7740,14 +7742,14 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ } /* test_man_incr_insert_remove() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_root_direct + * Function: test_man_remove_root_direct * - * Purpose: Test filling and removing all objects from root direct block in + * Purpose: Test filling and removing all objects from root direct block in * heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -7813,14 +7815,14 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ } /* test_man_remove_root_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_two_direct + * Function: test_man_remove_two_direct * - * Purpose: Test filling and removing all objects from (first) two direct + * Purpose: Test filling and removing all objects from (first) two direct * blocks in heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -7901,14 +7903,14 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_remove_two_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_first_row + * Function: test_man_remove_first_row * - * Purpose: Test filling and removing all objects from first row of direct + * Purpose: Test filling and removing all objects from first row of direct * blocks in heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 5, 2006 @@ -7971,14 +7973,14 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_remove_first_row() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_first_two_rows + * Function: test_man_remove_first_two_rows * - * Purpose: Test filling and removing all objects from first two rows of + * Purpose: Test filling and removing all objects from first two rows of * direct blocks in heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 12, 2006 @@ -8043,14 +8045,14 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par } /* test_man_remove_first_two_rows() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_first_four_rows + * Function: test_man_remove_first_four_rows * - * Purpose: Test filling and removing all objects from first four rows of + * Purpose: Test filling and removing all objects from first four rows of * direct blocks in heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8119,14 +8121,14 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa } /* test_man_remove_first_four_rows() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_all_root_direct + * Function: test_man_remove_all_root_direct * - * Purpose: Test filling and removing all objects from all direct blocks + * Purpose: Test filling and removing all objects from all direct blocks * in root indirect block of heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8189,14 +8191,14 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa } /* test_man_remove_all_root_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_2nd_indirect + * Function: test_man_remove_2nd_indirect * - * Purpose: Test filling and removing all objects up to 2nd level indirect + * Purpose: Test filling and removing all objects up to 2nd level indirect * blocks of heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8263,14 +8265,14 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param } /* test_man_remove_2nd_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_remove_3rd_indirect + * Function: test_man_remove_3rd_indirect * - * Purpose: Test filling and removing all objects up to 3rd level indirect + * Purpose: Test filling and removing all objects up to 3rd level indirect * blocks of heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, July 24, 2006 @@ -8341,9 +8343,9 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param } /* test_man_remove_3rd_indirect() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block + * Function: test_man_skip_start_block * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation * @@ -8351,7 +8353,7 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -8422,15 +8424,15 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t } /* test_man_skip_start_block() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block_add_back + * Function: test_man_skip_start_block_add_back * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation, then add object which fits in skipped direct block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 28, 2006 @@ -8520,16 +8522,16 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test } /* test_man_skip_start_block_add_back() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_start_block_add_skipped + * Function: test_man_skip_start_block_add_skipped * - * Purpose: Test inserting object into absolute heap which is too large + * Purpose: Test inserting object into absolute heap which is too large * for starting block size, which forces root indirect block * creation, then add objects to fill skipped direct blocks * and add another object to start on next "normal" block * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 28, 2006 @@ -8630,16 +8632,16 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t } /* test_man_skip_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_2nd_block + * Function: test_man_skip_2nd_block * - * Purpose: Test inserting object into absolute heap which is small + * Purpose: Test inserting object into absolute heap which is small * enough for starting block size, then add object too large * for any blocks in first row of direct blocks, to force * early creation of indirect block (and range of skipped blocks) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 1, 2006 @@ -8724,9 +8726,9 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t } /* test_man_skip_2nd_block() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_2nd_block_add_skipped + * Function: test_man_skip_2nd_block_add_skipped * - * Purpose: Test inserting object into absolute heap which is small + * Purpose: Test inserting object into absolute heap which is small * enough for starting block size, then add object too large * for any blocks in first row of direct blocks, to force * early creation of indirect block (and range of skipped blocks). @@ -8736,7 +8738,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 1, 2006 @@ -8867,9 +8869,9 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes } /* test_man_skip_2nd_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped + * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped * - * Purpose: Test filling initial direct block, then add object small enough + * Purpose: Test filling initial direct block, then add object small enough * for initial block size (to create root indirect block), then * add object too large for any blocks in first three rows of * direct blocks, to force extension of indirect block (and range @@ -8881,7 +8883,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9035,9 +9037,9 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * } /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_row_skip_add_skipped + * Function: test_man_fill_row_skip_add_skipped * - * Purpose: Test filling first row of direct blocks, then + * Purpose: Test filling first row of direct blocks, then * add object too large for any blocks in first three rows of * direct blocks, to force extension of indirect block (and range * of skipped blocks). @@ -9048,7 +9050,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t * * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -9165,9 +9167,9 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test } /* test_man_fill_row_skip_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped + * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped * - * Purpose: Test adding object too large for all but the last row in the + * Purpose: Test adding object too large for all but the last row in the * direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root @@ -9175,7 +9177,7 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -9294,16 +9296,16 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ } /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped + * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first row of direct * blocks in indirect block, to force extension of non-root * indirect block (and range of skipped blocks). * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9418,9 +9420,9 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea } /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped + * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for all direct blocks in first row of * indirect blocks, to force skipping a row of indirect blocks * (and range of skipped blocks), then backfill all direct blocks @@ -9428,7 +9430,7 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9445,14 +9447,14 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ H5HF_t * fh = NULL; /* Fractal heap wrapper */ haddr_t fh_addr; /* Address of fractal heap */ fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */ - unsigned - num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */ - unsigned row; /* Current row in indirect block */ - h5_stat_size_t empty_size; /* Size of a file with an empty heap */ - size_t obj_size; /* Size of object */ - size_t fill_size; /* Size of objects for "bulk" filled blocks */ - fheap_heap_state_t state; /* State of fractal heap */ - unsigned u; /* Local index variable */ + unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */ + /* first indirect blocks */ + unsigned row; /* Current row in indirect block */ + h5_stat_size_t empty_size; /* Size of a file with an empty heap */ + size_t obj_size; /* Size of object */ + size_t fill_size; /* Size of objects for "bulk" filled blocks */ + fheap_heap_state_t state; /* State of fractal heap */ + unsigned u; /* Local index variable */ /* Test description */ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then " "backfill and extend, then remove all objects %s"; @@ -9549,9 +9551,9 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ } /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped + * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, except the last * one, then insert object insert object that is too large to * hold in row of 2nd level indirect blocks (forcing the use of @@ -9560,7 +9562,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -9692,9 +9694,9 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ } /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped + * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for all direct blocks in first row of * indirect blocks, to force skipping a row of indirect blocks * (and range of skipped blocks), then add object that is too @@ -9706,7 +9708,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -9860,16 +9862,16 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5 } /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped + * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root * indirect block (and range of skipped blocks). * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -10014,9 +10016,9 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ } /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped + * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * add object too large for initial block in first two rows of * indirect blocks, to force extension of non-root * indirect block, then add object too large for first row of @@ -10025,7 +10027,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 11, 2006 @@ -10199,9 +10201,9 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t } /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped + * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, the insert object * that is too large to hold in first row of direct blocks of * 3rd level indirect block, then backfill & extend all skipped @@ -10209,7 +10211,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10328,9 +10330,9 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t } /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first row of direct blocks of @@ -10340,7 +10342,7 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10470,9 +10472,9 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H } /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first row of 2nd level indirect @@ -10481,7 +10483,7 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10622,19 +10624,19 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h } /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks in 3rd level indirect block, then insert object * that is too large to hold in first & second rows of 2nd level * indirect blocks (although this 3rd level indirect block only * has one row of 2nd level indirect blocks) of 3rd level indirect - * block, then backfill & extend all skipped direct blocks. + * block, then backfill & extend all skipped direct blocks. * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10779,9 +10781,9 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( } /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped + * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, all 3rd level * indirect blocks in first row except the last one, fill direct * blocks in last 3rd level indirect block, then insert object @@ -10792,7 +10794,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped( * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tues, April 18, 2006 @@ -10942,9 +10944,9 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t } /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped + * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, all 3rd level * indirect blocks in first row, fill direct blocks in 2nd row 3rd * level indirect block, fill all direct blocks in 1st row of @@ -10956,7 +10958,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tues, April 18, 2006 @@ -11112,9 +11114,9 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s } /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, then * fill all direct blocks in 4th level indirect block, then @@ -11124,7 +11126,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -11273,9 +11275,9 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 } /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */ /*------------------------------------------------------------------------- - * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped + * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, then * fill all direct blocks and 2nd level indirect blocks in 4th @@ -11287,7 +11289,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5 * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11456,7 +11458,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo * Function: *test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in first row of 4th level indirect @@ -11470,7 +11472,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11674,7 +11676,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ * Function: *test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in 4th level indirect @@ -11690,7 +11692,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11874,7 +11876,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star * Function: *test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped * - * Purpose: Test filling all direct blocks in root indirect block and all + * Purpose: Test filling all direct blocks in root indirect block and all * direct blocks in 2nd level indirect blocks, fill all direct * blocks and indirect blocks in 3rd level indirect block, fill all * direct & indirect blocks in first row of 4th level indirect @@ -11890,7 +11892,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -12109,9 +12111,9 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ */ /*------------------------------------------------------------------------- - * Function: test_man_frag_simple + * Function: test_man_frag_simple * - * Purpose: Test inserting objects small enough to fit into first row of + * Purpose: Test inserting objects small enough to fit into first row of * direct blocks, but not to share a block with another object, * until start-block-size * 2 blocks are reached. Then, go back * and fill in the space in the blocks skipped. @@ -12120,7 +12122,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_ * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, July 24, 2006 @@ -12241,9 +12243,9 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_man_frag_simple() */ /*------------------------------------------------------------------------- - * Function: test_man_frag_direct + * Function: test_man_frag_direct * - * Purpose: Test inserting small object to fit into each direct block + * Purpose: Test inserting small object to fit into each direct block * in root block, but not to share a block with another object, * Then, go back and fill in the space in the blocks skipped. * @@ -12251,7 +12253,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12410,9 +12412,9 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_man_frag_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_frag_2nd_direct + * Function: test_man_frag_2nd_direct * - * Purpose: Test filling all direct blocks in root indirect block, then + * Purpose: Test filling all direct blocks in root indirect block, then * inserting small object to fit into each direct block * in 2nd level indirect block, but not to share a block with * another object. @@ -12422,7 +12424,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12521,9 +12523,9 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * } /* test_man_frag_2nd_direct() */ /*------------------------------------------------------------------------- - * Function: test_man_frag_3rd_direct + * Function: test_man_frag_3rd_direct * - * Purpose: Test filling all direct blocks in root indirect block and + * Purpose: Test filling all direct blocks in root indirect block and * all 2nd level indirect blocks, then * inserting small object to fit into each direct block * in 3rd level indirect block, but not to share a block with @@ -12534,7 +12536,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12641,14 +12643,14 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t * } /* test_man_frag_3rd_direct() */ /*------------------------------------------------------------------------- - * Function: test_huge_insert_one + * Function: test_huge_insert_one * - * Purpose: Test inserting one huge object in the heap + * Purpose: Test inserting one huge object in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 7, 2006 @@ -12791,14 +12793,14 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_huge_insert_one() */ /*------------------------------------------------------------------------- - * Function: test_huge_insert_two + * Function: test_huge_insert_two * - * Purpose: Test inserting two huge objects in the heap + * Purpose: Test inserting two huge objects in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13021,14 +13023,14 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_huge_insert_two() */ /*------------------------------------------------------------------------- - * Function: test_huge_insert_three + * Function: test_huge_insert_three * - * Purpose: Test inserting three huge objects in the heap + * Purpose: Test inserting three huge objects in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13326,14 +13328,14 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp } /* test_huge_insert_three() */ /*------------------------------------------------------------------------- - * Function: test_huge_insert_mix + * Function: test_huge_insert_mix * - * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap + * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13751,12 +13753,12 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_huge_insert_mix() */ /*------------------------------------------------------------------------- - * Function: test_filtered_huge + * Function: test_filtered_huge * - * Purpose: Test storing 'huge' object in a heap with I/O filters + * Purpose: Test storing 'huge' object in a heap with I/O filters * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, August 15, 2006 @@ -13847,7 +13849,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam if (reopen_heap(f, &fh, fh_addr, tparam) < 0) TEST_ERROR -/* QAK */ #ifdef QAK /* Close the fractal heap */ if (H5HF_close(fh) < 0) @@ -13874,7 +13875,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam if (NULL == (fh = H5HF_open(f, fh_addr))) FAIL_STACK_ERROR #endif /* QAK */ - /* QAK */ /* Check up on heap... */ state.huge_size = obj_size; @@ -13960,14 +13960,14 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam } /* test_filtered_huge() */ /*------------------------------------------------------------------------- - * Function: test_tiny_insert_one + * Function: test_tiny_insert_one * - * Purpose: Test inserting one tiny object in the heap + * Purpose: Test inserting one tiny object in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14110,14 +14110,14 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_tiny_insert_one() */ /*------------------------------------------------------------------------- - * Function: test_tiny_insert_two + * Function: test_tiny_insert_two * - * Purpose: Test inserting two tiny objects in the heap + * Purpose: Test inserting two tiny objects in the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14340,15 +14340,15 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_tiny_insert_two() */ /*------------------------------------------------------------------------- - * Function: test_tiny_insert_mix + * Function: test_tiny_insert_mix * - * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in + * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in * the heap * * Then, remove all the objects, in various ways * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14947,12 +14947,12 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar } /* test_tiny_insert_mix() */ /*------------------------------------------------------------------------- - * Function: test_filtered_man_root_direct + * Function: test_filtered_man_root_direct * - * Purpose: Test storing one 'managed' object in a heap with I/O filters + * Purpose: Test storing one 'managed' object in a heap with I/O filters * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -15120,12 +15120,12 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para } /* test_filtered_man_root_direct() */ /*------------------------------------------------------------------------- - * Function: test_filtered_man_root_indirect + * Function: test_filtered_man_root_indirect * - * Purpose: Test storing several objects in a 'managed heap with I/O filters + * Purpose: Test storing several objects in a 'managed heap with I/O filters * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, October 24, 2006 @@ -15446,16 +15446,16 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa } /* test_filtered_man_root_indirect() */ /*------------------------------------------------------------------------- - * Function: test_random + * Function: test_random * - * Purpose: Test inserting random sized objects into a heap, and read + * Purpose: Test inserting random sized objects into a heap, and read * them back. * * Then, go back and remove all objects * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, May 9, 2006 @@ -15646,9 +15646,9 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed); } /* test_random() */ /*------------------------------------------------------------------------- - * Function: test_random_pow2 + * Function: test_random_pow2 * - * Purpose: Test inserting random sized objects with a "power of 2 + * Purpose: Test inserting random sized objects with a "power of 2 * distribution" (which favors small objects) into a heap, * and read them back. * @@ -15656,7 +15656,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed); * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -15861,12 +15861,12 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed); } /* test_random_pow2() */ /*------------------------------------------------------------------------- - * Function: test_write + * Function: test_write * - * Purpose: Test inserting objects, then changing the value for them. + * Purpose: Test inserting objects, then changing the value for them. * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, December 18, 2006 @@ -16152,14 +16152,14 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_write() */ /*------------------------------------------------------------------------- - * Function: test_bug1 + * Function: test_bug1 * - * Purpose: Test inserting several objects, then deleting one and + * Purpose: Test inserting several objects, then deleting one and * re-inserting an object, along with opening and closing * the file. * * Return: Success: 0 - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, November 28, 2006 @@ -16324,13 +16324,13 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) } /* test_bug1() */ /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test the fractal heap code + * Purpose: Test the fractal heap code * * Return: Success: * - * Failure: + * Failure: * * Programmer: Quincey Koziol * Friday, February 24, 2006 diff --git a/test/filenotclosed.c b/test/filenotclosed.c index 74de488530b..b5def9b4f45 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -80,7 +80,7 @@ main(void) contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0); if (!contig_addr_vfd) { SKIPPED(); - puts(" Temporary skipped for a spilt/multi driver"); + HDputs(" Temporary skipped for a spilt/multi driver"); HDexit(EXIT_SUCCESS); } diff --git a/test/fillval.c b/test/fillval.c index bfba392b16a..8e21648daef 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -207,7 +207,7 @@ test_getset(void) H5E_END_TRY; if (fill_i != 0) { H5_FAILED(); - puts(" H5Pget_fill_value() should return default 0"); + HDputs(" H5Pget_fill_value() should return default 0"); goto error; } @@ -226,8 +226,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) { H5_FAILED(); - puts(" Failed to get fill value using same data type that was "); - puts(" used to set the fill value."); + HDputs(" Failed to get fill value using same data type that was "); + HDputs(" used to set the fill value."); goto error; } @@ -238,8 +238,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) { H5_FAILED(); - puts(" Failed to get fill value using a data type other than what"); - puts(" was used to set the fill value."); + HDputs(" Failed to get fill value using a data type other than what"); + HDputs(" was used to set the fill value."); goto error; } @@ -252,7 +252,7 @@ test_getset(void) goto error; if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) { H5_FAILED(); - puts(" Resetting the fill value was unsuccessful."); + HDputs(" Resetting the fill value was unsuccessful."); goto error; } @@ -670,12 +670,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset3) < 0) @@ -690,7 +690,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) { H5_FAILED(); - puts(" Got allocated space instead of unallocated."); + HDputs(" Got allocated space instead of unallocated."); HDprintf(" Got %d\n", allocation); goto error; } @@ -702,12 +702,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset4) < 0) @@ -725,7 +725,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -754,14 +754,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset5) < 0) @@ -794,14 +794,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset6) < 0) @@ -819,7 +819,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -935,7 +935,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f H5_FAILED(); HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__); HDfprintf(stdout, - " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, " + " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE + "}, read: %u, " "Fill value: %u\n", hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], val_rd, fillval); @@ -952,7 +953,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f H5_FAILED(); HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__); HDfprintf(stdout, - " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %f, %d, %f, %c" + " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE + "}, read: %f, %d, %f, %c" "Fill value: %f, %d, %f, %c\n", hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], (double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)fill_c.a, fill_c.x, fill_c.y, @@ -994,7 +996,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f H5_FAILED(); HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__); HDfprintf(stdout, - " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %u, " + " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + ", %" PRIuHSIZE "}, read: %u, " "Fill value: %u\n", hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], buf[u], fillval); @@ -1020,7 +1023,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f H5_FAILED(); HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__); HDfprintf(stdout, - " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %f, %d, %f, %c" + " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + ", %" PRIuHSIZE "}, read: %f, %d, %f, %c" "Fill value: %f, %d, %f, %c\n", hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], (double)buf_c[u].a, buf_c[u].x, buf_c[u].y, buf_c[u].z, (double)fill_c.a, @@ -1445,7 +1449,8 @@ test_extend_verify_integer(unsigned lineno, const hsize_t *offset, const void *_ if (*test_val != *compare_val) { HDfprintf(stdout, "%u: Value read was not expected.\n", lineno); HDfprintf(stdout, - " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: %d, " + " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + "}, read: %d, " "expected: %d\n", offset[0], offset[1], offset[2], offset[3], offset[4], *test_val, *compare_val); goto error; @@ -1536,7 +1541,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_ HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) { HDfprintf(stdout, "%u: Value read was not expected.\n", lineno); HDfprintf(stdout, - " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: {%d, '%s', '%s', %d} " + " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + "}, read: {%d, '%s', '%s', %d} " "expected: {%d, '%s', '%s', %d}\n", offset[0], offset[1], offset[2], offset[3], offset[4], test_val->x, test_val->a, test_val->b, test_val->y, compare_val->x, compare_val->a, compare_val->b, compare_val->y); @@ -1651,7 +1657,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end if */ else { /* Sanity check */ - assert(dtype_class == H5T_COMPOUND); + HDassert(dtype_class == H5T_COMPOUND); /* Initialize specific values for this datatype */ val_size = sizeof(comp_vl_datatype); @@ -1703,7 +1709,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end for */ /* Check for overflow */ - assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); + HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); /* Allocate & initialize buffer */ buf = HDmalloc((size_t)(nelmts * val_size)); @@ -2015,7 +2021,6 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t HDfree(init_val_c.a); HDfree(init_val_c.b); HDfree(buf); - buf = NULL; /* Cleanup IDs */ if (H5Pclose(dcpl) < 0) @@ -2144,7 +2149,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) */ if (H5D_CONTIGUOUS == layout) { SKIPPED(); - puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); + HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); goto skip; } #endif @@ -2262,7 +2267,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2274,7 +2279,7 @@ test_compatible(void) goto error; if (val_rd != 0) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set 0\n", (long)val_rd); goto error; } @@ -2315,7 +2320,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2327,7 +2332,7 @@ test_compatible(void) goto error; if (val_rd != fill_val) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val); goto error; } @@ -2662,11 +2667,11 @@ main(int argc, char *argv[]) if (argc >= 2) { test_contig = test_chunk = test_compact = 0; for (argno = 1; argno < argc; argno++) { - if (!strcmp(argv[argno], "contiguous")) + if (!HDstrcmp(argv[argno], "contiguous")) test_contig = 1; - else if (!strcmp(argv[argno], "chunked")) + else if (!HDstrcmp(argv[argno], "chunked")) test_chunk = 1; - else if (!strcmp(argv[argno], "compact")) + else if (!HDstrcmp(argv[argno], "compact")) test_compact = 1; else { HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]); @@ -2696,11 +2701,11 @@ main(int argc, char *argv[]) /* Set the FAPL for the type of format */ if (new_format) { - puts("\nTesting with new file format:"); + HDputs("\nTesting with new file format:"); my_fapl = fapl2; } /* end if */ else { - puts("Testing with old file format:"); + HDputs("Testing with old file format:"); my_fapl = fapl; } /* end else */ diff --git a/test/filter_fail.c b/test/filter_fail.c index e7011307114..a1bcf288318 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -174,7 +174,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Data writing is supposed to fail because the chunk can't be written to file."); + HDputs(" Data writing is supposed to fail because the chunk can't be written to file."); TEST_ERROR } } @@ -195,7 +195,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Dataset is supposed to fail because the chunk can't be flushed to file."); + HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file."); TEST_ERROR } } diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 60f71713008..276141a36d6 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -1068,7 +1068,7 @@ test_path_api_calls(void) /* Get the path */ if ((path_len = H5PLget(0, path, 256)) <= 0) { - HDfprintf(stderr, " get 0 len: %u : %s\n", path_len, path); + HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path); TEST_ERROR; } if (HDstrcmp(path, "a_path_0") != 0) { diff --git a/test/freespace.c b/test/freespace.c index 51f0dc177cd..6cab2bfe5b9 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -399,22 +399,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state) FAIL_STACK_ERROR if (frspace_stats.tot_space != state->tot_space) { - HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space, - state->tot_space); + HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n", + frspace_stats.tot_space, state->tot_space); TEST_ERROR } /* end if */ if (frspace_stats.tot_sect_count != state->tot_sect_count) { - HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n", frspace_stats.tot_sect_count, state->tot_sect_count); TEST_ERROR } /* end if */ if (frspace_stats.serial_sect_count != state->serial_sect_count) { - HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE + "\n", frspace_stats.serial_sect_count, state->serial_sect_count); TEST_ERROR } /* end if */ if (frspace_stats.ghost_sect_count != state->ghost_sect_count) { - HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE + "\n", frspace_stats.ghost_sect_count, state->ghost_sect_count); TEST_ERROR } /* end if */ diff --git a/test/gen_cross.c b/test/gen_cross.c index d9bb70095f6..3eac79a1604 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -928,7 +928,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) #else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; - puts(not_supported); + HDputs(not_supported); #endif /* H5_HAVE_FILTER_DEFLATE */ return 0; diff --git a/test/gen_filters.c b/test/gen_filters.c index 4dcb4be0ee4..7b7c2682fd1 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -243,12 +243,12 @@ main(void) if (nerrors) goto error; - printf("All tests passed.\n"); + HDprintf("All tests passed.\n"); return 0; error: nerrors = MAX(1, nerrors); - printf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); + HDprintf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); return 1; } diff --git a/test/getname.c b/test/getname.c index 51f274b149a..30ab98d5904 100644 --- a/test/getname.c +++ b/test/getname.c @@ -3787,7 +3787,7 @@ main(void) if (nerrors) goto error; - puts("All getname tests passed."); + HDputs("All getname tests passed."); h5_cleanup(FILENAME, fapl); @@ -3800,7 +3800,7 @@ main(void) } H5E_END_TRY; - puts("***** GET NAME TESTS FAILED *****"); + HDputs("***** GET NAME TESTS FAILED *****"); return 1; } diff --git a/test/gheap.c b/test/gheap.c index 07312f62afb..779b331915e 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -41,9 +41,9 @@ nerrors++; \ if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \ H5_FAILED(); \ - puts(MSG); \ + HDputs(MSG); \ if (nerrors == GHEAP_REPEATED_ERR_LIM) \ - puts(" Suppressing further errors..."); \ + HDputs(" Suppressing further errors..."); \ } /* end if */ \ } /* end GHEAP_REPEATED_ERR */ diff --git a/test/h5test.c b/test/h5test.c index 7e869b139d4..5cf9224855d 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1958,7 +1958,8 @@ h5_compare_file_bytes(char *f1name, char *f2name) f2size = HDftell(f2ptr); if (f1size != f2size) { - HDfprintf(stderr, "Files differ in size, %llu vs. %llu\n", f1size, f2size); + HDfprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", (hsize_t)f1size, + (hsize_t)f2size); ret_value = -1; goto done; } @@ -1976,7 +1977,7 @@ h5_compare_file_bytes(char *f1name, char *f2name) goto done; } if (f1char != f2char) { - HDfprintf(stderr, "Mismatch @ 0x%llX: 0x%X != 0x%X\n", ii, f1char, f2char); + HDfprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", (hsize_t)ii, f1char, f2char); ret_value = -1; goto done; } diff --git a/test/hdfs.c b/test/hdfs.c index d24e7aa3ea8..5465e775bc0 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -230,9 +230,10 @@ */ #define JSERR_STR(expected, actual, reason) \ { \ + const char *_reason = reason; \ JSFAILED_AT() \ - if ((reason) != NULL) { \ - HDprintf("%s\n", (reason)); \ + if (_reason != NULL) { \ + HDprintf("%s\n", _reason); \ } \ else { \ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \ @@ -302,7 +303,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(expected, actual, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -347,7 +348,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(actual, expected, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -413,8 +414,8 @@ test_fapl_config_validation(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS fapl configuration validation"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -563,9 +564,10 @@ test_fapl_config_validation(void) JSVERIFY(config.version, fa_fetch.version, "version number mismatch") JSVERIFY(config.namenode_port, fa_fetch.namenode_port, "namenode port mismatch") JSVERIFY(config.stream_buffer_size, fa_fetch.stream_buffer_size, "streambuffer size mismatch") - JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, NULL) - JSVERIFY_STR(config.user_name, fa_fetch.user_name, NULL) - JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, NULL) + JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, "node name mismatch") + JSVERIFY_STR(config.user_name, fa_fetch.user_name, "user name mismatch") + JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, + "kerberos ticket cache mismatch") } /*----------------------------- @@ -622,8 +624,8 @@ test_hdfs_fapl(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS fapl "); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -708,8 +710,8 @@ test_vfd_open(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD-level open"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -964,8 +966,8 @@ test_eof_eoa(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS eof/eoa gets and sets"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1004,7 +1006,7 @@ test_eof_eoa(void) /* verify as found */ - JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), NULL) + JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), "EOF mismatch") JSVERIFY(H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), H5FDget_eof(fd_shakespeare, H5FD_MEM_DRAW), "mismatch between DEFAULT and RAW memory types") JSVERIFY(0, H5FDget_eoa(fd_shakespeare, H5FD_MEM_DEFAULT), "EoA should be unset by H5FDopen") @@ -1077,8 +1079,8 @@ test_H5FDread_without_eoa_set_fails(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD read-eoa temporal coupling library limitation"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1179,8 +1181,8 @@ test_read(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD read/range-gets"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1286,7 +1288,7 @@ test_read(void) HADDR_UNDEF); /* Demonstrate success with "automatic" value */ FAIL_IF(NULL == file_raven) - JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), NULL) + JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), "EOF mismatch") /********* * TESTS * @@ -1393,8 +1395,8 @@ test_noops_and_autofails(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD always-fail and no-op routines"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1449,8 +1451,8 @@ test_noops_and_autofails(void) /* no-op calls to `lock()` and `unlock()` */ JSVERIFY(SUCCEED, H5FDlock(file, TRUE), "lock always succeeds; has no effect") - JSVERIFY(SUCCEED, H5FDlock(file, FALSE), NULL) - JSVERIFY(SUCCEED, H5FDunlock(file), NULL) + JSVERIFY(SUCCEED, H5FDlock(file, FALSE), "lock issue") + JSVERIFY(SUCCEED, H5FDunlock(file), "unlock issue") /* Lock/unlock with null file or similar error crashes tests. * HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()` */ @@ -1548,8 +1550,8 @@ test_H5F_integration(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS file access through HD5F library (H5F API)"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1617,7 +1619,7 @@ test_H5F_integration(void) #if HDFS_TEST_DEBUG HDprintf("\nerror!"); - fflush(stdout); + HDfflush(stdout); #endif /* HDFS_TEST_DEBUG */ if (fapl_id >= 0) { diff --git a/test/istore.c b/test/istore.c index 20107df6374..c75b8bfb17a 100644 --- a/test/istore.c +++ b/test/istore.c @@ -619,13 +619,13 @@ main(int argc, char *argv[]) else { int i; for (i = 1, size_of_test = 0; i < argc; i++) { - if (!strcmp(argv[i], "small")) { + if (!HDstrcmp(argv[i], "small")) { size_of_test |= TEST_SMALL; } - else if (!strcmp(argv[i], "medium")) { + else if (!HDstrcmp(argv[i], "medium")) { size_of_test |= TEST_MEDIUM; } - else if (!strcmp(argv[i], "large")) { + else if (!HDstrcmp(argv[i], "large")) { size_of_test |= TEST_LARGE; } else { diff --git a/test/lheap.c b/test/lheap.c index a2691eede3d..25dfed0d545 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -102,7 +102,7 @@ main(void) if (j > 4) buf[j] = '\0'; - if (UFAIL == (obj[i] = H5HL_insert(f, heap, strlen(buf) + 1, buf))) { + if (UFAIL == (obj[i] = H5HL_insert(f, heap, HDstrlen(buf) + 1, buf))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; diff --git a/test/links.c b/test/links.c index ee370de63f7..3dfba36cf9e 100644 --- a/test/links.c +++ b/test/links.c @@ -1982,7 +1982,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -1995,7 +1995,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -2012,7 +2012,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("link_to_group1", tmpstr)) + if (HDstrcmp("link_to_group1", tmpstr) != 0) TEST_ERROR /* Test the dangling soft link */ @@ -2025,7 +2025,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("dangle", tmpstr)) + if (HDstrcmp("dangle", tmpstr) != 0) TEST_ERROR /* Test H5Gmove and H5Gmove2 */ @@ -9675,7 +9675,7 @@ lapl_udata(hid_t fapl, hbool_t new_format) TEST_ERROR /* Now use the same ud link to access group_b */ - strcpy(group_b_name, "group_b"); + HDstrcpy(group_b_name, "group_b"); if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0) TEST_ERROR @@ -9980,7 +9980,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format) H5E_END_TRY /* Create a user-defined link to the group. */ - strcpy(group_name, "/group"); + HDstrcpy(group_name, "/group"); if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR diff --git a/test/links_env.c b/test/links_env.c index aca84dd4b9c..590be20a1bc 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -115,7 +115,7 @@ external_link_env(hid_t fapl, hbool_t new_format) /* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */ if (gid < 0) { H5_FAILED(); - puts(" Should have found the file in tmp_links_env directory."); + HDputs(" Should have found the file in tmp_links_env directory."); goto error; } diff --git a/test/mf.c b/test/mf.c index 1483621a498..e3a9c46052e 100644 --- a/test/mf.c +++ b/test/mf.c @@ -167,22 +167,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state) FAIL_STACK_ERROR if (frspace_stats.tot_space != state->tot_space) { - HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space, - state->tot_space); + HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n", + frspace_stats.tot_space, state->tot_space); TEST_ERROR } /* end if */ if (frspace_stats.tot_sect_count != state->tot_sect_count) { - HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n", frspace_stats.tot_sect_count, state->tot_sect_count); TEST_ERROR } /* end if */ if (frspace_stats.serial_sect_count != state->serial_sect_count) { - HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE + "\n", frspace_stats.serial_sect_count, state->serial_sect_count); TEST_ERROR } /* end if */ if (frspace_stats.ghost_sect_count != state->ghost_sect_count) { - HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n", + HDfprintf(stdout, + "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE + "\n", frspace_stats.ghost_sect_count, state->ghost_sect_count); TEST_ERROR } /* end if */ @@ -6176,7 +6181,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); } /* end else */ /* Close memb_fapl */ @@ -7774,7 +7779,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); return 0; @@ -8936,7 +8941,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); /* Close memb_fapl */ if (H5Pclose(memb_fapl) < 0) diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index e252096b226..3556cd2e7f1 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -63,8 +63,8 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY; #define LOGPRINT(lvl, ...) \ do { \ if ((lvl) <= g_verbosity) { \ - fprintf(g_log_stream, __VA_ARGS__); \ - fflush(g_log_stream); \ + HDfprintf(g_log_stream, __VA_ARGS__); \ + HDfflush(g_log_stream); \ } \ } while (0) @@ -150,7 +150,7 @@ _populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, ch } if (HDsnprintf(_path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname, - (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ + (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ _basename) > H5FD_SPLITTER_PATH_MAX) { TEST_ERROR; } @@ -2341,7 +2341,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in rw file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } @@ -2356,7 +2356,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in wo file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } diff --git a/test/mtime.c b/test/mtime.c index edefa049fa6..02ba0f06211 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -144,7 +144,7 @@ main(void) H5_FAILED(); /* If this fails, examine H5Omtime.c. Modification time is very * system dependent (e.g., on Windows DST must be hardcoded). */ - puts(" Old modification time incorrect"); + HDputs(" Old modification time incorrect"); goto error; } if (H5Fclose(file) < 0) diff --git a/test/ntypes.c b/test/ntypes.c index 3aba65c34bf..4d1ec5129f3 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -621,16 +621,16 @@ test_compound_dtype2(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_compound_dtype + * Function: test_compound_dtype * - * Purpose: Test H5Tget_native_type for compound datatype + * Purpose: Test H5Tget_native_type for compound datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -834,16 +834,16 @@ test_compound_dtype(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_compound_dtype3 + * Function: test_compound_dtype3 * - * Purpose: Test H5Tget_native_type for compound datatype + * Purpose: Test H5Tget_native_type for compound datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1075,16 +1075,16 @@ test_compound_dtype3(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_compound_opaque + * Function: test_compound_opaque * - * Purpose: Test H5Tget_native_type for compound datatype with opaque field + * Purpose: Test H5Tget_native_type for compound datatype with opaque field * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Quincey Koziol - * January 31, 2004 + * Programmer: Quincey Koziol + * January 31, 2004 * * Modifications: * @@ -1302,16 +1302,16 @@ test_compound_opaque(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_enum_dtype + * Function: test_enum_dtype * - * Purpose: Test H5Tget_native_type for enumerate datatype + * Purpose: Test H5Tget_native_type for enumerate datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1446,16 +1446,16 @@ test_enum_dtype(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_array_dtype + * Function: test_array_dtype * - * Purpose: Test H5Tget_native_type for array datatype + * Purpose: Test H5Tget_native_type for array datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1634,16 +1634,16 @@ test_array_dtype(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_array_dtype2 + * Function: test_array_dtype2 * - * Purpose: Test H5Tget_native_type for array datatype + * Purpose: Test H5Tget_native_type for array datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1769,16 +1769,16 @@ test_array_dtype2(hid_t file) } /*------------------------------------------------------------------------- - * Function: test_vl_dtype + * Function: test_vl_dtype * - * Purpose: Test H5Tget_native_type for variable length datatype + * Purpose: Test H5Tget_native_type for variable length datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -1975,16 +1975,16 @@ test_vl_dtype(hid_t file) } /* end test_vl_type() */ /*------------------------------------------------------------------------- - * Function: test_vlstr_dtype + * Function: test_vlstr_dtype * - * Purpose: Test H5Tget_native_type for variable length string datatype + * Purpose: Test H5Tget_native_type for variable length string datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2001,9 +2001,9 @@ test_vlstr_dtype(hid_t file) "testing whether that nation or any nation so conceived and so dedicated can long endure."}; char * rdata[SPACE1_DIM1]; /* Information read in */ hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */ - hid_t dataset = -1; /* Dataset ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hid_t dataset = -1; /* Dataset ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ @@ -2115,16 +2115,16 @@ test_vlstr_dtype(hid_t file) } /* end test_vlstr_dtype() */ /*------------------------------------------------------------------------- - * Function: test_str_dtype + * Function: test_str_dtype * - * Purpose: Test H5Tget_native_type for fixed-length string datatype + * Purpose: Test H5Tget_native_type for fixed-length string datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2135,9 +2135,9 @@ test_str_dtype(hid_t file) { const char wdata[SPACE1_DIM1][4] = {"one", "two", "3rd", "4th"}; /* Information to write */ char rdata[SPACE1_DIM1][4]; /* Information read in */ - hid_t dataset = -1; /* Dataset ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hid_t dataset = -1; /* Dataset ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i; /* counting variable */ @@ -2237,16 +2237,16 @@ test_str_dtype(hid_t file) } /* end test_str_dtype() */ /*------------------------------------------------------------------------- - * Function: test_refer_dtype + * Function: test_refer_dtype * - * Purpose: Test H5Tget_native_type for reference datatype + * Purpose: Test H5Tget_native_type for reference datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2262,10 +2262,10 @@ test_refer_dtype(hid_t file) float c; } s1_t; - hid_t dataset = -1; /* Dataset ID */ + hid_t dataset = -1; /* Dataset ID */ hid_t group = -1; /* Group ID */ - hid_t sid1 = -1; /* Dataspace ID */ - hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ + hid_t sid1 = -1; /* Dataspace ID */ + hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */ hsize_t dims1[] = {1}; H5O_type_t obj_type; /* Object type */ hobj_ref_t *wbuf = NULL, /* buffer to write to disk */ @@ -2410,16 +2410,16 @@ test_refer_dtype(hid_t file) } /* test_refer_dtype() */ /*------------------------------------------------------------------------- - * Function: test_refer_dtype2 + * Function: test_refer_dtype2 * - * Purpose: Test H5Tget_native_type for reference + * Purpose: Test H5Tget_native_type for reference * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2428,10 +2428,10 @@ test_refer_dtype(hid_t file) static herr_t test_refer_dtype2(hid_t file) { - hid_t dset1 = -1, /* Dataset ID */ + hid_t dset1 = -1, /* Dataset ID */ dset2 = -1; /* Dereferenced dataset ID */ - hid_t sid1 = -1, /* Dataspace ID #1 */ - sid2 = -1; /* Dataspace ID #2 */ + hid_t sid1 = -1, /* Dataspace ID #1 */ + sid2 = -1; /* Dataspace ID #2 */ hid_t dtype = -1, native_type = -1; hsize_t dims1[] = {1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2}; hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */ @@ -2624,16 +2624,16 @@ test_refer_dtype2(hid_t file) } /* test_refer_dtype2() */ /*------------------------------------------------------------------------- - * Function: test_opaque_dtype + * Function: test_opaque_dtype * - * Purpose: Test H5Tget_native_type for opaque datatype + * Purpose: Test H5Tget_native_type for opaque datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * @@ -2723,16 +2723,16 @@ test_opaque_dtype(hid_t file) } /* test_opaque_dtype */ /*------------------------------------------------------------------------- - * Function: test_bitfield_dtype + * Function: test_bitfield_dtype * - * Purpose: Test H5Tget_native_type for bitfield datatype + * Purpose: Test H5Tget_native_type for bitfield datatype * - * Return: Success: 0 + * Return: Success: 0 * - * Failure: -1 + * Failure: -1 * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * Raymond Lu @@ -3098,12 +3098,12 @@ test_ninteger(void) } /* end test_ninteger() */ /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test H5Tget_native_type for different datatype + * Purpose: Test H5Tget_native_type for different datatype * - * Programmer: Raymond Lu - * October 15, 2002 + * Programmer: Raymond Lu + * October 15, 2002 * * Modifications: * diff --git a/test/page_buffer.c b/test/page_buffer.c index e4934793c8c..7f2748d447b 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -348,7 +348,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); } /* end if */ diff --git a/test/pool.c b/test/pool.c index 3fa3722562c..9ce18468bc4 100644 --- a/test/pool.c +++ b/test/pool.c @@ -784,11 +784,11 @@ main(void) if (nerrors) goto error; - puts("All memory pool tests passed."); + HDputs("All memory pool tests passed."); return 0; error: - puts("*** TESTS FAILED ***"); + HDputs("*** TESTS FAILED ***"); return 1; } diff --git a/test/ros3.c b/test/ros3.c index aae2dd2d48e..11a6451dbd0 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -306,7 +306,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(expected, actual, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -351,7 +351,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(actual, expected, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -548,8 +548,8 @@ test_fapl_config_validation(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -829,8 +829,8 @@ test_vfd_open(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -972,15 +972,15 @@ test_eof_eoa(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1083,15 +1083,15 @@ test_H5FDread_without_eoa_set_fails(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1257,15 +1257,15 @@ test_read(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1401,8 +1401,8 @@ test_noops_and_autofails(void) if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1530,15 +1530,15 @@ test_cmp(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1654,15 +1654,15 @@ test_H5F_integration(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1709,7 +1709,7 @@ test_H5F_integration(void) * CLEANUP * ***********/ HDprintf("\nerror!"); - fflush(stdout); + HDfflush(stdout); if (fapl_id >= 0) { H5E_BEGIN_TRY diff --git a/test/s3comms.c b/test/s3comms.c index b07ef428db1..2723921a0d0 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -299,7 +299,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(expected, actual, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -347,7 +347,7 @@ *---------------------------------------------------------------------------- */ #define JSVERIFY_STR(actual, expected, reason) \ - if (strcmp((actual), (expected)) != 0) { \ + if (HDstrcmp((actual), (expected)) != 0) { \ JSERR_STR((expected), (actual), (reason)); \ goto error; \ } /* JSVERIFY_STR */ @@ -1269,10 +1269,10 @@ test_HMAC_SHA256(void) cases[i].msg); if (cases[i].ret == SUCCEED) { #ifdef VERBOSE - if (0 != strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) { + if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) { /* print out how wrong things are, and then fail */ - dest = (char *)realloc(dest, cases[i].dest_size + 1); + dest = (char *)HDrealloc(dest, cases[i].dest_size + 1); HDassert(dest != NULL); dest[cases[i].dest_size] = 0; HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest); @@ -1281,17 +1281,17 @@ test_HMAC_SHA256(void) #else /* VERBOSE not defined */ /* simple pass/fail test */ - JSVERIFY(0, strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL); + JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL); #endif /* VERBOSE */ } - free(dest); + HDfree(dest); } PASSED(); return 0; error: - free(dest); + HDfree(dest); return -1; } /* end test_HMAC_SHA256() */ @@ -1357,9 +1357,9 @@ test_nlowercase(void) JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in) if (cases[i].len > 0) { - JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL) + JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL) } - free(dest); + HDfree(dest); } /* end for each testcase */ JSVERIFY(FAIL, H5FD_s3comms_nlowercase(NULL, cases[0].in, cases[0].len), "null distination should fail") @@ -1368,7 +1368,7 @@ test_nlowercase(void) return 0; error: - free(dest); + HDfree(dest); return -1; } /* end test_nlowercase() */ @@ -1729,7 +1729,7 @@ test_percent_encode_char(void) JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len), NULL) JSVERIFY(cases[i].exp_len, dest_len, NULL) - JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL) + JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL) JSVERIFY_STR(cases[i].exp, dest, NULL) } @@ -1768,8 +1768,8 @@ test_s3r_get_filesize(void) */ if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1828,14 +1828,14 @@ test_s3r_open(void) if (s3_test_credentials_loaded == 0) { SKIPPED(); - puts(" s3 credentials are not loaded"); - fflush(stdout); + HDputs(" s3 credentials are not loaded"); + HDfflush(stdout); return 0; } if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -1861,7 +1861,7 @@ test_s3r_open(void) FAIL_IF(purl->port == NULL); FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000")) } - else if (strcmp(purl->port, "9000") != 0) { + else if (HDstrcmp(purl->port, "9000") != 0) { FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000")) } else { @@ -2032,8 +2032,8 @@ test_s3r_read(void) */ if (FALSE == s3_test_bucket_defined) { SKIPPED(); - puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); - fflush(stdout); + HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined"); + HDfflush(stdout); return 0; } @@ -2093,7 +2093,7 @@ test_s3r_read(void) JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL) JSVERIFY( 0, - strncmp( + HDstrncmp( buffer, "And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n", 94), @@ -2110,7 +2110,7 @@ test_s3r_read(void) H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */ buffer), NULL) - JSVERIFY(0, strcmp("", buffer), NULL) + JSVERIFY(0, HDstrcmp("", buffer), NULL) /************************ * read starts past eof * @@ -2120,14 +2120,14 @@ test_s3r_read(void) H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */ (size_t)100, buffer), NULL) - JSVERIFY(0, strcmp("", buffer), NULL) + JSVERIFY(0, HDstrcmp("", buffer), NULL) /********************** * read starts on eof * **********************/ JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL) - JSVERIFY(0, strcmp("", buffer), NULL) + JSVERIFY(0, HDstrcmp("", buffer), NULL) /************* * TEAR DOWN * @@ -2217,10 +2217,10 @@ test_signing_key(void) JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when), NULL) - JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH), - cases[i].exp) + JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH), + (const char *)cases[i].exp) - free(key); + HDfree(key); key = NULL; } @@ -2243,7 +2243,7 @@ test_signing_key(void) JSVERIFY(FAIL, H5FD_s3comms_signing_key(key, cases[0].secret_key, cases[0].region, NULL), "time string cannot be NULL") - free(key); + HDfree(key); key = NULL; PASSED(); @@ -2251,7 +2251,7 @@ test_signing_key(void) error: if (key != NULL) { - free(key); + HDfree(key); } return -1; @@ -2399,9 +2399,9 @@ test_trim(void) JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL) JSVERIFY(cases[i].exp_len, dest_len, cases[i].in) if (dest_len > 0) { - JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp) + JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp) } - free(str); + HDfree(str); str = NULL; } /* end for each testcase */ @@ -2412,9 +2412,9 @@ test_trim(void) HDassert(str == NULL); str = (char *)HDmalloc(sizeof(char *) * 11); HDassert(str != NULL); - memcpy(str, "some text ", 11); /* string with null terminator */ + HDmemcpy(str, "some text ", 11); /* string with null terminator */ JSVERIFY(FAIL, H5FD_s3comms_trim(NULL, str, 10, &dest_len), "destination for trim cannot be NULL"); - free(str); + HDfree(str); str = NULL; PASSED(); @@ -2422,7 +2422,7 @@ test_trim(void) error: if (str != NULL) { - free(str); + HDfree(str); } return -1; @@ -2513,9 +2513,9 @@ test_uriencode(void) H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written), NULL); JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL) - JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected); + JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected); - free(dest); + HDfree(dest); dest = NULL; } /* end for each testcase */ @@ -2531,7 +2531,7 @@ test_uriencode(void) JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, false, &dest_written), "source string cannot be NULL"); - free(dest); + HDfree(dest); dest = NULL; PASSED(); @@ -2539,7 +2539,7 @@ test_uriencode(void) error: if (dest != NULL) { - free(dest); + HDfree(dest); } return -1; diff --git a/test/set_extent.c b/test/set_extent.c index 3927408ff5a..daec7fd4dd3 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2636,7 +2636,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab TEST_ERROR if (H5Dvlen_reclaim(type, mspace, H5P_DEFAULT, wbuf) < 0) TEST_ERROR - free(fill_value.p); + HDfree(fill_value.p); if (H5Sclose(mspace) < 0) TEST_ERROR if (H5Pclose(my_dcpl) < 0) diff --git a/test/tarray.c b/test/tarray.c index 59a38a8e52b..10480fe697b 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -2230,5 +2230,5 @@ test_array(void) void cleanup_array(void) { - remove(FILENAME); + HDremove(FILENAME); } /* end cleanup_array() */ diff --git a/test/tcoords.c b/test/tcoords.c index 855b383e4e3..fef8689f35a 100644 --- a/test/tcoords.c +++ b/test/tcoords.c @@ -87,10 +87,10 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked) } /* Construct dataset's name */ - memset(dset_name, 0, (size_t)NAME_LEN); - strcat(dset_name, SINGLE_END_DSET); + HDmemset(dset_name, 0, (size_t)NAME_LEN); + HDstrcat(dset_name, SINGLE_END_DSET); if (is_chunked) - strcat(dset_name, "_chunked"); + HDstrcat(dset_name, "_chunked"); did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT); CHECK(did, FAIL, "H5Dcreate2"); @@ -259,10 +259,10 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked) hsize_t mem3_block[4] = {1, 3, 6, 1}; /* Construct dataset's name */ - memset(dset_name, 0, NAME_LEN); - strcat(dset_name, SINGLE_END_DSET); + HDmemset(dset_name, 0, NAME_LEN); + HDstrcat(dset_name, SINGLE_END_DSET); if (is_chunked) - strcat(dset_name, "_chunked"); + HDstrcat(dset_name, "_chunked"); /* Dataspace for the dataset in file */ sid = H5Screate_simple(4, da_dims, da_dims); @@ -436,10 +436,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked) } /* Construct dataset's name */ - memset(dset_name, 0, NAME_LEN); - strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET); + HDmemset(dset_name, 0, NAME_LEN); + HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET); if (is_chunked) - strcat(dset_name, "_chunked"); + HDstrcat(dset_name, "_chunked"); did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT); CHECK(did, FAIL, "H5Dcreate2"); @@ -687,5 +687,5 @@ test_coords(void) void cleanup_coords(void) { - remove(FILENAME); + HDremove(FILENAME); } diff --git a/test/testframe.c b/test/testframe.c index 4b0beb5e31c..f8059978725 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -442,15 +442,15 @@ GetTestExpress(void) /* set it here for now. Should be done in something like h5test_init(). */ if (TestExpress == -1) { - env_val = getenv("HDF5TestExpress"); + env_val = HDgetenv("HDF5TestExpress"); if (env_val == NULL) SetTestExpress(1); - else if (strcmp(env_val, "0") == 0) + else if (HDstrcmp(env_val, "0") == 0) SetTestExpress(0); - else if (strcmp(env_val, "1") == 0) + else if (HDstrcmp(env_val, "1") == 0) SetTestExpress(1); - else if (strcmp(env_val, "2") == 0) + else if (HDstrcmp(env_val, "2") == 0) SetTestExpress(2); else SetTestExpress(3); @@ -521,7 +521,7 @@ ParseTestVerbosity(char *argv) else if (*argv == 'h') SetTestVerbosity(VERBO_HI); else - SetTestVerbosity(atoi(argv)); + SetTestVerbosity(HDatoi(argv)); } /* diff --git a/test/testhdf5.c b/test/testhdf5.c index cf0dfa8aa71..3585c447983 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -81,7 +81,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP")) TestCleanup(); /* Release test infrastructure */ diff --git a/test/testmeta.c b/test/testmeta.c index 370547b2015..c59c6cb0d75 100644 --- a/test/testmeta.c +++ b/test/testmeta.c @@ -83,7 +83,7 @@ main(void) for (i = 0; i < NEXTARRAYS; i++) { /* Create dataset */ - sprintf(name, "/ExtArray%06d", i); + HDsprintf(name, "/ExtArray%06d", i); dataset_id = H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT); @@ -103,7 +103,7 @@ main(void) /* Removed print statement as it would lock system resources on Windows */ /* * HDprintf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS); - * fflush(stdout); + * HDfflush(stdout); */ floatval = (float)j; diff --git a/test/tfile.c b/test/tfile.c index 2b7ada1c651..c096342b17d 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3987,7 +3987,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); return 0; diff --git a/test/tgenprop.c b/test/tgenprop.c index 4e787393998..7e805e22cde 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -2172,5 +2172,5 @@ test_genprop(void) void cleanup_genprop(void) { - remove(FILENAME); + HDremove(FILENAME); } diff --git a/test/thread_id.c b/test/thread_id.c index 0c9f61ef79e..c7b2b448416 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -73,7 +73,7 @@ pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *at if (attr != NULL) return EINVAL; - memset(barrier, 0, sizeof(*barrier)); + HDmemset(barrier, 0, sizeof(*barrier)); barrier->count = count; @@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc)); } } @@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc)); } } @@ -203,16 +203,16 @@ atomic_printf(const char *fmt, ...) va_list ap; ssize_t nprinted, nwritten; - va_start(ap, fmt); - nprinted = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); + HDva_start(ap, fmt); + nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap); + HDva_end(ap); if (nprinted == -1) my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__); else if (nprinted >= (ssize_t)sizeof(buf)) my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__); - nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted); + nwritten = HDwrite(STDOUT_FILENO, buf, (size_t)nprinted); if (nwritten < nprinted) { my_errx(EXIT_FAILURE, "%s.%d: write error or short write", __func__, __LINE__); } diff --git a/test/timer.c b/test/timer.c index e907655aa90..24f3245099f 100644 --- a/test/timer.c +++ b/test/timer.c @@ -146,7 +146,7 @@ test_timer_system_user(void) */ if (timer.initial.system < (double)0.0f || timer.initial.user < (double)0.0f) { SKIPPED(); - printf("NOTE: No suitable way to get system/user times on this platform.\n"); + HDprintf("NOTE: No suitable way to get system/user times on this platform.\n"); return 0; } @@ -383,7 +383,7 @@ main(void) h5_reset(); - printf("Testing platform-independent timer functionality.\n"); + HDprintf("Testing platform-independent timer functionality.\n"); nerrors += test_time_formatting() < 0 ? 1 : 0; nerrors += test_timer_system_user() < 0 ? 1 : 0; @@ -391,11 +391,12 @@ main(void) nerrors += test_timer_functionality() < 0 ? 1 : 0; if (nerrors) { - printf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); + HDprintf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors, + nerrors > 1 ? "S" : ""); return 1; } else { - printf("All platform-independent timer tests passed.\n"); + HDprintf("All platform-independent timer tests passed.\n"); return 0; } } diff --git a/test/tmisc.c b/test/tmisc.c index 2ccd49ec320..8dac16d36a0 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -2840,7 +2840,7 @@ test_misc16(void) if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf( "Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", - (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i])); + (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { @@ -2925,7 +2925,7 @@ test_misc17(void) if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf( "Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", - (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i])); + (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { diff --git a/test/tselect.c b/test/tselect.c index fd47d97c176..c5c50f8a1c4 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -5257,7 +5257,7 @@ test_select_hyper_union_stagger(void) CHECK(error, FAIL, "H5Fclose"); /* Initialize intput buffer */ - memset(data_out, 0, 7 * 7 * sizeof(int)); + HDmemset(data_out, 0, 7 * 7 * sizeof(int)); /* Open file */ file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT); @@ -5555,7 +5555,7 @@ test_select_hyper_valid_combination(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Selection Combination Validity\n")); - assert(SPACE9_DIM2 >= POINT1_NPOINTS); + HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for single point selection */ single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL); @@ -14705,7 +14705,7 @@ test_internal_consistency(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Consistency of Internal States\n")); - assert(SPACE9_DIM2 >= POINT1_NPOINTS); + HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for "all" selection */ all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL); diff --git a/test/ttsafe.c b/test/ttsafe.c index 05c84f494c6..067a7159e0a 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -132,7 +132,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP")) TestCleanup(); /* Release test infrastructure */ diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index de235c8f30d..acaa9d63873 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -65,46 +65,46 @@ tts_cancel(void) /* make thread scheduling global */ ret = pthread_attr_init(&attribute); - assert(ret == 0); + HDassert(ret == 0); #ifdef H5_HAVE_SYSTEM_SCOPE_THREADS ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - assert(ret == 0); + HDassert(ret == 0); #endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* Initialize mutex & condition variables */ ret = pthread_mutex_init(&mutex, NULL); - assert(ret == 0); + HDassert(ret == 0); ret = pthread_cond_init(&cond, NULL); - assert(ret == 0); + HDassert(ret == 0); /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file * creation plist and default file access plist */ cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert(cancel_file >= 0); + HDassert(cancel_file >= 0); ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL); - assert(ret == 0); + HDassert(ret == 0); tts_cancel_barrier(); ret = pthread_cancel(childthread); - assert(ret == 0); + HDassert(ret == 0); dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT); - assert(dataset >= 0); + HDassert(dataset >= 0); ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); - assert(ret >= 0); + HDassert(ret >= 0); if (buffer != 11) TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer); ret = H5Dclose(dataset); - assert(ret >= 0); + HDassert(ret >= 0); ret = H5Fclose(cancel_file); - assert(ret >= 0); + HDassert(ret >= 0); /* Destroy the thread attribute */ ret = pthread_attr_destroy(&attribute); - assert(ret == 0); + HDassert(ret == 0); } /* end tts_cancel() */ void * diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index 1d10ad5bff6..6243f5e1aaf 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -140,7 +140,7 @@ tts_dcreate_creator(void *_thread_data) hsize_t dimsf[1]; /* dataset dimensions */ struct thread_info thread_data; - memcpy(&thread_data, _thread_data, sizeof(struct thread_info)); + HDmemcpy(&thread_data, _thread_data, sizeof(struct thread_info)); /* define dataspace for dataset */ dimsf[0] = 1; diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 925f6ffe468..336fc9e02e4 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -217,6 +217,7 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE } error_flag_g = -1; + return SUCCEED; } diff --git a/test/tunicode.c b/test/tunicode.c index 6d4f02989f2..83d31aaed20 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -532,7 +532,7 @@ test_attrname(hid_t fid, const char *string) CHECK(attr_id, FAIL, "H5Acreate2"); size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf); CHECK(size, FAIL, "H5Aget_name"); - ret = strcmp(read_buf, string); + ret = HDstrcmp(read_buf, string); VERIFY(ret, 0, "strcmp"); read_buf[0] = '\0'; @@ -541,7 +541,7 @@ test_attrname(hid_t fid, const char *string) CHECK(ret, FAIL, "H5Awrite"); ret = H5Aread(attr_id, dtype_id, read_buf); CHECK(ret, FAIL, "H5Aread"); - ret = strcmp(read_buf, string); + ret = HDstrcmp(read_buf, string); VERIFY(ret, 0, "strcmp"); /* Clean up */ @@ -682,7 +682,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string) VERIFY(val, E1_WHITE, "H5Tenum_valueof"); ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH); CHECK(ret, FAIL, "H5Tenum_nameof"); - ret = strcmp(readbuf, string); + ret = HDstrcmp(readbuf, string); VERIFY(ret, 0, "strcmp"); /* Close the datatype */ @@ -709,7 +709,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string) /* Read the tag back. */ read_buf = H5Tget_tag(type_id); - ret = strcmp(read_buf, string); + ret = HDstrcmp(read_buf, string); VERIFY(ret, 0, "H5Tget_tag"); H5free_memory(read_buf); diff --git a/test/tvlstr.c b/test/tvlstr.c index df4202ede43..0363798fff2 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -203,7 +203,7 @@ test_vlstrings_basic(void) for (i = 0; i < SPACE1_DIM1; i++) { if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i, - (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); + (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { @@ -307,7 +307,7 @@ test_vlstrings_special(void) for (i = 0; i < SPACE1_DIM1; i++) { if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i, - (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); + (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) { @@ -536,7 +536,7 @@ test_compact_vlstring(void) for (i = 0; i < SPACE1_DIM1; i++) { if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i, - (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); + (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { diff --git a/test/tvltypes.c b/test/tvltypes.c index 17b93ad0e44..61d58cf8f1b 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -2691,13 +2691,13 @@ test_vltypes_fill_value(void) } break; case H5D_VIRTUAL: - assert(0 && "Invalid layout type!"); + HDassert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - assert(0 && "Unknown layout type!"); + HDassert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2799,13 +2799,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - assert(0 && "Invalid layout type!"); + HDassert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - assert(0 && "Unknown layout type!"); + HDassert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2986,13 +2986,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - assert(0 && "Invalid layout type!"); + HDassert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - assert(0 && "Unknown layout type!"); + HDassert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -3262,5 +3262,5 @@ test_vltypes(void) void cleanup_vltypes(void) { - remove(FILENAME); + HDremove(FILENAME); } diff --git a/test/twriteorder.c b/test/twriteorder.c index 56b19b66eb3..e792487c85b 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -139,21 +139,21 @@ parse_option(int argc, char *const argv[]) HDexit(EXIT_SUCCESS); break; case 'b': /* number of planes to write/read */ - if ((blocksize_g = atoi(optarg)) <= 0) { + if ((blocksize_g = HDatoi(optarg)) <= 0) { HDfprintf(stderr, "bad blocksize %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); }; break; case 'n': /* number of planes to write/read */ - if ((nlinkedblock_g = atoi(optarg)) < 2) { + if ((nlinkedblock_g = HDatoi(optarg)) < 2) { HDfprintf(stderr, "bad number of linked blocks %s, must be greater than 1.\n", optarg); usage(progname_g); Hgoto_error(-1); }; break; case 'p': /* number of planes to write/read */ - if ((part_size_g = atoi(optarg)) <= 0) { + if ((part_size_g = HDatoi(optarg)) <= 0) { HDfprintf(stderr, "bad partition size %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); @@ -402,7 +402,7 @@ main(int argc, char *argv[]) Hgoto_error(1); }; }; - mypid = getpid(); + mypid = HDgetpid(); /* ============= */ /* launch reader */ @@ -438,7 +438,7 @@ main(int argc, char *argv[]) /* If readwrite, collect exit code of child process */ /* ================================================ */ if (launch_g == UC_READWRITE) { - if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) { + if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) { HDperror("waitpid"); Hgoto_error(1); } diff --git a/test/unlink.c b/test/unlink.c index f939bd69933..744fe6e274b 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -578,7 +578,7 @@ test_filespace(hid_t fapl) size_t rdcc_nbytes; double rdcc_w0; - puts("Testing file space gets reused:"); + HDputs("Testing file space gets reused:"); /* Open file */ h5_fixname(FILENAME[4], fapl, filename, sizeof filename); diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index f8fb5e2384b..47c9f9262fa 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -163,12 +163,12 @@ main(int argc, char *argv[]) /* Fork process */ /* ============ */ if (UC_opts.launch == UC_READWRITE) { - if ((childpid = fork()) < 0) { - perror("fork"); + if ((childpid = HDfork()) < 0) { + HDperror("fork"); Hgoto_error(1); } } - mypid = getpid(); + mypid = HDgetpid(); /* ============= */ /* launch reader */ @@ -237,8 +237,8 @@ main(int argc, char *argv[]) /* If readwrite, collect exit code of child process */ /* ================================================ */ if (UC_opts.launch == UC_READWRITE) { - if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) { - perror("waitpid"); + if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) { + HDperror("waitpid"); Hgoto_error(1); } diff --git a/test/use_common.c b/test/use_common.c index d7479837d3b..0ea2c83e2fd 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -66,7 +66,7 @@ parse_option(int argc, char *const argv[], options_t *opts) switch (c) { case 'h': usage(opts->progname); - exit(EXIT_SUCCESS); + HDexit(EXIT_SUCCESS); break; case 'f': /* usecase data file name */ opts->filename = HDstrdup(optarg); @@ -440,7 +440,7 @@ read_uc_file(hbool_t towait, options_t *opts) { hid_t fid; /* File ID for new HDF5 file */ hid_t dsid; /* dataset ID */ - UC_CTYPE *buffer, *bufptr; /* read data buffer */ + UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */ hid_t f_sid; /* dataset file space id */ hid_t m_sid; /* memory space id */ int rank; /* rank */ @@ -603,6 +603,8 @@ read_uc_file(hbool_t towait, options_t *opts) return -1; } + HDfree(buffer); + if (nreadererr) return -1; else diff --git a/test/vfd.c b/test/vfd.c index 49e0781e48a..843c7729c37 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -2219,9 +2219,9 @@ test_ros3(void) /* need a macro to compare instances of H5FD_ros3_fapl_t */ if ((test_ros3_fa.version != ros3_fa_0.version) || (test_ros3_fa.authenticate != ros3_fa_0.authenticate) || - (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) || - (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) || - (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0)) + (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) || + (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) || + (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0)) TEST_ERROR; h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename)); @@ -2270,7 +2270,7 @@ test_ros3(void) AT(); \ HDfprintf(stderr, mesg); \ H5Eprint2(H5E_DEFAULT, stderr); \ - fflush(stderr); \ + HDfflush(stderr); \ ret_value = -1; \ goto done; \ } @@ -2482,7 +2482,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err } /* Verify existence of logfile if appropriate */ - logfile = fopen(vfd_config->log_file_path, "r"); + logfile = HDfopen(vfd_config->log_file_path, "r"); if ((TRUE == provide_logfile_path && NULL == logfile) || (FALSE == provide_logfile_path && NULL != logfile)) { SPLITTER_TEST_FAULT("no logfile when one was expected\n"); @@ -2503,7 +2503,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err } if (logfile != NULL) - fclose(logfile); + HDfclose(logfile); HDfree(vfd_config); HDfree(filename_rw); diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 1a8976cdbf9..2fbe1acca31 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -131,12 +131,13 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s } if (VERBOSE_MED) { - HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "total datapoints=%" PRIuHSIZE "\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1], + block[0] * block[1] * count[0] * count[1]); k = 0; for (i = 0; i < num_points; i++) { HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); @@ -157,15 +158,15 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE *dataset) /* print the column heading */ HDprintf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + HDprintf("%3" PRIuHSIZE " ", start[1] + j); } HDprintf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]); for (j = 0; j < block[1]; j++) { - HDprintf("%llu ", *dataptr++); + HDprintf("%" PRIuHSIZE " ", *dataptr++); } HDprintf("\n"); } @@ -184,10 +185,11 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], /* print it if VERBOSE_MED */ if (VERBOSE_MED) { HDprintf("verify_data dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); + HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]); HDprintf("original values:\n"); dataset_print(start, block, original); HDprintf("compared values:\n"); @@ -199,9 +201,10 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], for (j = 0; j < block[1]; j++) { if (*dataset != *original) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %llu, got %llu\n", - (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), - (unsigned long)(j + start[1]), *(original), *(dataset)); + HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]" + "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): " + "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n", + i, j, i + start[0], j + start[1], *(original), *(dataset)); } dataset++; original++; @@ -1163,8 +1166,6 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type) * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1269,8 +1270,6 @@ coll_chunk2(void) * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1325,17 +1324,9 @@ coll_chunk3(void) * * Failure: -1 * - * Modifications: - * Remove invalid temporary property checkings for API_LINK_HARD and - * API_LINK_TRUE cases. - * Programmer: Jonathan Kim - * Date: 2012-10-10 - * * Programmer: Unknown * July 12th, 2004 * - * Modifications: - * *------------------------------------------------------------------------- */ @@ -1842,9 +1833,8 @@ main(int argc, char **argv) * that we try to ensure that our bigio handling is actually * envoked and tested. */ - if (newsize != oldsize) { + if (newsize != oldsize) bigcount = newsize * 2; - } MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size_g); @@ -1855,9 +1845,8 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("Failed to turn off atexit processing. Continue.\n"); - }; /* set alarm. */ ALARM_ON; diff --git a/testpar/t_cache.c b/testpar/t_cache.c index d084f5fff33..94d09e6105a 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -1251,7 +1251,7 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%ld).\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, FUNC, actual_total_reads, total_reads); } } @@ -1261,7 +1261,7 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%ld).\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, FUNC, actual_total_writes, total_writes); } } @@ -1465,7 +1465,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1473,7 +1474,7 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %Zu != mssg->len = %d.\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC, data[target_index].len, mssg_ptr->len); } } @@ -1482,7 +1483,9 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: proc %d read invalid entry. idx/base_addr = %d/%a.\n", + HDfprintf(stdout, + "%d:%s: proc %d read invalid entry. " + "idx/base_addr = %d/%" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg_ptr->src, target_index, data[target_index].base_addr); } } @@ -1651,7 +1654,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1659,7 +1663,7 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %Zu != mssg->len = %d.\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, FUNC, data[target_index].len, mssg_ptr->len); } } @@ -1788,11 +1792,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total writes %ld.\n", (int)(mssg_ptr->src), total_writes); + HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); } else { - HDfprintf(stdout, "%d request total writes %ld -- FAILED.\n", (int)(mssg_ptr->src), total_writes); + HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); } } @@ -1858,11 +1862,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total reads %ld.\n", (int)(mssg_ptr->src), total_reads); + HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); } else { - HDfprintf(stdout, "%d request total reads %ld -- FAILED.\n", (int)(mssg_ptr->src), total_reads); + HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); } } @@ -1917,7 +1921,8 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else { @@ -2005,7 +2010,8 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %a.\n", world_mpi_rank, FUNC, target_addr); + HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, FUNC, + target_addr); } } else { @@ -2489,10 +2495,10 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n", world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.base_addr = %a.\n", + HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg.base_addr); HDfprintf(stdout, - "%d:%s: entry_ptr->base_addr = %a.\n", + "%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, entry_ptr->base_addr); } @@ -2502,7 +2508,7 @@ datum_notify(H5C_notify_action_t action, void *thing) HDfprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n", world_mpi_rank, FUNC); - HDfprintf(stdout, "%d:%s: mssg.len = %a.\n", + HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", world_mpi_rank, FUNC, mssg.len); } @@ -4297,8 +4303,8 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx reads mismatch (%ld/%ld).\n", world_mpi_rank, - FUNC, (long long)addr, reported_entry_reads, expected_entry_reads); + HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", + world_mpi_rank, FUNC, addr, reported_entry_reads, expected_entry_reads); } } } @@ -4394,7 +4400,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%ld/%ld).\n", world_mpi_rank, + HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, FUNC, (long long)addr, reported_entry_writes, expected_entry_writes); } } @@ -4486,8 +4492,8 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%ld).\n", - world_mpi_rank, FUNC, reported_total_reads, expected_total_reads); + HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, + FUNC, reported_total_reads, expected_total_reads); } } } @@ -6514,15 +6520,15 @@ trace_file_check(int metadata_write_strategy) HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i); if (expected_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, "", expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len); } if (actual_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, "", actual_line_len); } } @@ -6538,9 +6544,9 @@ trace_file_check(int metadata_write_strategy) if (verbose) { HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, FUNC, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\" %d\n", world_mpi_rank, FUNC, + HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, FUNC, (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %d\n", world_mpi_rank, FUNC, buffer, + HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, FUNC, buffer, actual_line_len); } } @@ -6868,9 +6874,9 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); - }; + H5open(); express_test = do_express_test(); @@ -6887,9 +6893,8 @@ main(int argc, char **argv) } #ifdef H5_HAVE_MPE - if (MAINPROCESS) { + if (MAINPROCESS) HDprintf(" Tests compiled for MPE.\n"); - } virt_num_data_entries = MPE_VIRT_NUM_DATA_ENTIES; #endif /* H5_HAVE_MPE */ @@ -6902,11 +6907,8 @@ main(int argc, char **argv) } if (mpi_size < 3) { - - if (MAINPROCESS) { - + if (MAINPROCESS) HDprintf(" Need at least 3 processes. Exiting.\n"); - } goto finish; } @@ -6924,17 +6926,14 @@ main(int argc, char **argv) /* setup file access property list with the world communicator */ if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, FUNC); - } } if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) { - nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, FUNC); - } } /* fix the file names */ @@ -6942,9 +6941,8 @@ main(int argc, char **argv) if (h5_fixname(FILENAME[u], fapl, filenames[u], sizeof(filenames[u])) == NULL) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, FUNC); - } break; } } @@ -6952,9 +6950,8 @@ main(int argc, char **argv) /* close the fapl before we set it up again */ if (H5Pclose(fapl) < 0) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, FUNC); - } } /* now create the fapl again, excluding the server process. */ @@ -6963,32 +6960,25 @@ main(int argc, char **argv) /* setup file access property list */ if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, FUNC); - } } if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) { - nerrors++; - if (verbose) { + if (verbose) HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, FUNC); - } } } setup_rand(); max_nerrors = get_max_nerrors(); - if (max_nerrors != 0) { /* errors in setup -- no point in continuing */ - - if (world_mpi_rank == 0) { - + if (world_mpi_rank == 0) HDfprintf(stdout, "Errors in test initialization. Exiting.\n"); - } goto finish; } diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index ee411bd97b4..fcbe83b410a 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -3916,9 +3916,8 @@ main(int argc, char **argv) * hang in the atexit post processing in which it may try to make MPI * calls. By then, MPI calls may not work. */ - if (H5dont_atexit() < 0) { + if (H5dont_atexit() < 0) HDprintf("%d:Failed to turn off atexit processing. Continue.\n", mpi_rank); - }; H5open(); @@ -3930,11 +3929,8 @@ main(int argc, char **argv) } if (mpi_size < 2) { - - if (mpi_rank == 0) { - + if (mpi_rank == 0) HDprintf(" Need at least 2 processes. Exiting.\n"); - } goto finish; } diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index b530d5ff2d9..865e1f890c1 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -85,7 +85,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_ /* Only MAINPROCESS should create the file. Others just wait. */ if (MAINPROCESS) { nchunks = chunk_factor * mpi_size; - dims[0] = nchunks * CHUNK_SIZE; + dims[0] = (hsize_t)(nchunks * CHUNK_SIZE); /* Create the data space with unlimited dimensions. */ dataspace = H5Screate_simple(1, dims, maxdims); VRFY((dataspace >= 0), ""); @@ -118,7 +118,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_ count[0] = 1; stride[0] = 1; block[0] = chunk_dims[0]; - offset[0] = (nchunks - 2) * chunk_dims[0]; + offset[0] = (hsize_t)(nchunks - 2) * chunk_dims[0]; hrc = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block); VRFY((hrc >= 0), ""); @@ -223,7 +223,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti dataspace = H5Dget_space(*dataset); VRFY((dataspace >= 0), ""); - size[0] = nchunks * CHUNK_SIZE; + size[0] = (hsize_t)nchunks * CHUNK_SIZE; switch (action) { @@ -235,7 +235,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti stride[0] = 1; block[0] = chunk_dims[0]; for (i = 0; i < nchunks / mpi_size; i++) { - offset[0] = (i * mpi_size + mpi_rank) * chunk_dims[0]; + offset[0] = (hsize_t)(i * mpi_size + mpi_rank) * chunk_dims[0]; hrc = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block); VRFY((hrc >= 0), ""); @@ -364,7 +364,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in /* reset buffer values */ HDmemset(buffer, -1, CHUNK_SIZE); - offset[0] = i * chunk_dims[0]; + offset[0] = (hsize_t)i * chunk_dims[0]; hrc = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block); VRFY((hrc >= 0), ""); diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index fc117e3de9f..651a3922294 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -609,7 +609,6 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ hsize_t current_dims; /* for point selection */ - int i; /* set up MPI parameters */ MPI_Comm_size(comm, &mpi_size); @@ -627,7 +626,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY((status >= 0), ""); /* setup dimensionality object */ - dims[0] = SPACE_DIM1 * mpi_size; + dims[0] = (hsize_t)(SPACE_DIM1 * mpi_size); dims[1] = SPACE_DIM2; /* allocate memory for data buffer */ @@ -660,7 +659,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY((crp_plist >= 0), ""); /* Set up chunk information. */ - chunk_dims[0] = dims[0] / chunk_factor; + chunk_dims[0] = dims[0] / (hsize_t)chunk_factor; /* to decrease the testing time, maintain bigger chunk size */ (chunk_factor == 1) ? (chunk_dims[1] = SPACE_DIM2) : (chunk_dims[1] = SPACE_DIM2 / 2); @@ -1044,7 +1043,7 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t stride[1] = 1; count[0] = SPACE_DIM1; count[1] = SPACE_DIM2; - start[0] = mpi_rank * count[0]; + start[0] = (hsize_t)mpi_rank * count[0]; start[1] = 0; break; @@ -1057,7 +1056,7 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t stride[1] = 3; count[0] = SPACE_DIM1 / (stride[0] * block[0]); count[1] = (SPACE_DIM2) / (stride[1] * block[1]); - start[0] = SPACE_DIM1 * mpi_rank; + start[0] = (hsize_t)SPACE_DIM1 * (hsize_t)mpi_rank; start[1] = 0; break; @@ -1071,7 +1070,7 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t stride[1] = 1; count[0] = ((mpi_rank >= MAX(1, (mpi_size - 2))) ? 0 : SPACE_DIM1); count[1] = SPACE_DIM2; - start[0] = mpi_rank * count[0]; + start[0] = (hsize_t)mpi_rank * count[0]; start[1] = 0; break; @@ -1083,15 +1082,15 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t block[0] = 1; count[0] = 2; - stride[0] = SPACE_DIM1 * mpi_size / 4 + 1; + stride[0] = (hsize_t)SPACE_DIM1 * (hsize_t)mpi_size / 4 + 1; block[1] = SPACE_DIM2; count[1] = 1; start[1] = 0; stride[1] = 1; if ((mpi_rank * 3) < (mpi_size * 2)) - start[0] = mpi_rank; + start[0] = (hsize_t)mpi_rank; else - start[0] = 1 + SPACE_DIM1 * mpi_size / 2 + (mpi_rank - 2 * mpi_size / 3); + start[0] = (hsize_t)(1 + SPACE_DIM1 * mpi_size / 2 + (mpi_rank - 2 * mpi_size / 3)); break; case BYROW_SELECTINCHUNK: @@ -1099,7 +1098,7 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t block[0] = 1; count[0] = 1; - start[0] = mpi_rank * SPACE_DIM1; + start[0] = (hsize_t)(mpi_rank * SPACE_DIM1); stride[0] = 1; block[1] = SPACE_DIM2; count[1] = 1; @@ -1110,7 +1109,7 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t default: /* Unknown mode. Set it to cover the whole dataset. */ - block[0] = SPACE_DIM1 * mpi_size; + block[0] = (hsize_t)SPACE_DIM1 * (hsize_t)mpi_size; block[1] = SPACE_DIM2; stride[0] = block[0]; stride[1] = block[1]; diff --git a/testpar/t_coll_md_read.c b/testpar/t_coll_md_read.c index 6f148ea65fb..951882df7a2 100644 --- a/testpar/t_coll_md_read.c +++ b/testpar/t_coll_md_read.c @@ -99,8 +99,8 @@ test_partial_no_selection_coll_md_read(void) dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); VRFY((dataset_dims != NULL), "malloc succeeded"); - dataset_dims[0] = PARTIAL_NO_SELECTION_Y_DIM_SCALE * mpi_size; - dataset_dims[1] = PARTIAL_NO_SELECTION_X_DIM_SCALE * mpi_size; + dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size; + dataset_dims[1] = (hsize_t)PARTIAL_NO_SELECTION_X_DIM_SCALE * (hsize_t)mpi_size; max_dataset_dims[0] = H5S_UNLIMITED; max_dataset_dims[1] = H5S_UNLIMITED; @@ -125,12 +125,12 @@ test_partial_no_selection_coll_md_read(void) * * The ranks will write rows across the dataset. */ - start[0] = PARTIAL_NO_SELECTION_Y_DIM_SCALE * mpi_rank; + start[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_rank; start[1] = 0; stride[0] = PARTIAL_NO_SELECTION_Y_DIM_SCALE; stride[1] = PARTIAL_NO_SELECTION_X_DIM_SCALE; count[0] = 1; - count[1] = mpi_size; + count[1] = (hsize_t)mpi_size; block[0] = PARTIAL_NO_SELECTION_Y_DIM_SCALE; block[1] = PARTIAL_NO_SELECTION_X_DIM_SCALE; @@ -416,8 +416,8 @@ test_link_chunk_io_sort_chunk_issue(void) dataset_dims = HDmalloc(LINK_CHUNK_IO_SORT_CHUNK_ISSUE_DIMS * sizeof(*dataset_dims)); VRFY((dataset_dims != NULL), "malloc succeeded"); - dataset_dims[0] = - LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE * mpi_size * LINK_CHUNK_IO_SORT_CHUNK_ISSUE_Y_DIM_SCALE; + dataset_dims[0] = (hsize_t)LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE * (hsize_t)mpi_size * + (hsize_t)LINK_CHUNK_IO_SORT_CHUNK_ISSUE_Y_DIM_SCALE; max_dataset_dims[0] = H5S_UNLIMITED; fspace_id = H5Screate_simple(LINK_CHUNK_IO_SORT_CHUNK_ISSUE_DIMS, dataset_dims, max_dataset_dims); @@ -442,8 +442,8 @@ test_link_chunk_io_sort_chunk_issue(void) * The ranks will write rows across the dataset. */ stride[0] = LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE; - count[0] = (dataset_dims[0] / LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE) / mpi_size; - start[0] = count[0] * mpi_rank; + count[0] = (dataset_dims[0] / LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE) / (hsize_t)mpi_size; + start[0] = count[0] * (hsize_t)mpi_rank; block[0] = LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE; VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) >= 0), diff --git a/testpar/t_dset.c b/testpar/t_dset.c index dbc466f8484..400dc3614a3 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -48,61 +48,61 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s switch (mode) { case BYROW: /* Each process takes a slabs of rows. */ - block[0] = dim0 / mpi_size; - block[1] = dim1; + block[0] = (hsize_t)(dim0 / mpi_size); + block[1] = (hsize_t)dim1; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = mpi_rank * block[0]; + start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; if (VERBOSE_MED) HDprintf("slab_set BYROW\n"); break; case BYCOL: /* Each process takes a block of columns. */ - block[0] = dim0; - block[1] = dim1 / mpi_size; + block[0] = (hsize_t)dim0; + block[1] = (hsize_t)(dim1 / mpi_size); stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; start[0] = 0; - start[1] = mpi_rank * block[1]; + start[1] = (hsize_t)mpi_rank * block[1]; if (VERBOSE_MED) HDprintf("slab_set BYCOL\n"); break; case ZROW: /* Similar to BYROW except process 0 gets 0 row */ - block[0] = (mpi_rank ? dim0 / mpi_size : 0); - block[1] = dim1; + block[0] = (hsize_t)(mpi_rank ? dim0 / mpi_size : 0); + block[1] = (hsize_t)dim1; stride[0] = (mpi_rank ? block[0] : 1); /* avoid setting stride to 0 */ stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = (mpi_rank ? mpi_rank * block[0] : 0); + start[0] = (mpi_rank ? (hsize_t)mpi_rank * block[0] : 0); start[1] = 0; if (VERBOSE_MED) HDprintf("slab_set ZROW\n"); break; case ZCOL: /* Similar to BYCOL except process 0 gets 0 column */ - block[0] = dim0; - block[1] = (mpi_rank ? dim1 / mpi_size : 0); + block[0] = (hsize_t)dim0; + block[1] = (hsize_t)(mpi_rank ? dim1 / mpi_size : 0); stride[0] = block[0]; - stride[1] = (mpi_rank ? block[1] : 1); /* avoid setting stride to 0 */ + stride[1] = (hsize_t)(mpi_rank ? block[1] : 1); /* avoid setting stride to 0 */ count[0] = 1; count[1] = 1; start[0] = 0; - start[1] = (mpi_rank ? mpi_rank * block[1] : 0); + start[1] = (mpi_rank ? (hsize_t)mpi_rank * block[1] : 0); if (VERBOSE_MED) HDprintf("slab_set ZCOL\n"); break; default: /* Unknown mode. Set it to cover the whole dataset. */ HDprintf("unknown slab_set mode (%d)\n", mode); - block[0] = dim0; - block[1] = dim1; + block[0] = (hsize_t)dim0; + block[1] = (hsize_t)dim1; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; @@ -303,7 +303,7 @@ dataset_writeInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); /* ---------------------------------------- @@ -326,8 +326,8 @@ dataset_writeInd(void) * and the slabs local to the MPI process. * ------------------------------------------- */ /* setup dimensionality object */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -441,9 +441,9 @@ dataset_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); /* setup file access template */ @@ -555,7 +555,6 @@ dataset_writeAll(void) size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ hsize_t current_dims; /* for point selection */ - int i; herr_t ret; /* Generic return value */ int mpi_size, mpi_rank; @@ -572,12 +571,12 @@ dataset_writeAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* set up the coords array selection */ - num_points = dim1; - coords = (hsize_t *)HDmalloc(dim1 * RANK * sizeof(hsize_t)); + num_points = (size_t)dim1; + coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); /* ------------------- @@ -600,8 +599,8 @@ dataset_writeAll(void) * and create the dataset * ------------------------- */ /* setup 2-D dimensionality object */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -889,16 +888,16 @@ dataset_writeAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); block[0] = 1; - block[1] = dim1; + block[1] = (hsize_t)dim1; stride[0] = 1; - stride[1] = dim1; + stride[1] = (hsize_t)dim1; count[0] = 1; count[1] = 1; - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; dataset_fill(start, block, data_array1); @@ -944,7 +943,7 @@ dataset_writeAll(void) /* Dataset6: point selection in File - Point selection in Memory*/ /* create a file dataspace independently */ - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; point_set(start, count, stride, block, num_points, coords, OUT_OF_ORDER); file_dataspace = H5Dget_space(dataset6); @@ -981,7 +980,7 @@ dataset_writeAll(void) /* Dataset7: point selection in File - All selection in Memory*/ /* create a file dataspace independently */ - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; point_set(start, count, stride, block, num_points, coords, IN_ORDER); file_dataspace = H5Dget_space(dataset7); @@ -1071,7 +1070,6 @@ dataset_readAll(void) size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ - hsize_t current_dims; /* for point selection */ int i, j, k; herr_t ret; /* Generic return value */ @@ -1089,14 +1087,14 @@ dataset_readAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* set up the coords array selection */ - num_points = dim1; - coords = (hsize_t *)HDmalloc(dim0 * dim1 * RANK * sizeof(hsize_t)); + num_points = (size_t)dim1; + coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); /* ------------------- @@ -1273,18 +1271,18 @@ dataset_readAll(void) free(data_array1); if (data_origin1) free(data_origin1); - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); block[0] = 1; - block[1] = dim1; + block[1] = (hsize_t)dim1; stride[0] = 1; - stride[1] = dim1; + stride[1] = (hsize_t)dim1; count[0] = 1; count[1] = 1; - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; dataset_fill(start, block, data_origin1); @@ -1334,12 +1332,12 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset6: point selection in File - Point selection in Memory*/ /* create a file dataspace independently */ - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; point_set(start, count, stride, block, num_points, coords, IN_ORDER); file_dataspace = H5Dget_space(dataset6); @@ -1380,7 +1378,7 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset7: point selection in memory - All selection in file*/ @@ -1390,12 +1388,12 @@ dataset_readAll(void) ret = H5Sselect_all(file_dataspace); VRFY((ret >= 0), "H5Sselect_all succeeded"); - num_points = dim0 * dim1; + num_points = (size_t)(dim0 * dim1); k = 0; for (i = 0; i < dim0; i++) { for (j = 0; j < dim1; j++) { - coords[k++] = i; - coords[k++] = j; + coords[k++] = (hsize_t)i; + coords[k++] = (hsize_t)j; } } mem_dataspace = H5Dget_space(dataset7); @@ -1417,7 +1415,7 @@ dataset_readAll(void) ret = H5Dread(dataset7, H5T_NATIVE_INT, mem_dataspace, file_dataspace, xfer_plist, data_array1); VRFY((ret >= 0), "H5Dread dataset7 succeeded"); - start[0] = dim0 / mpi_size * mpi_rank; + start[0] = (hsize_t)(dim0 / mpi_size * mpi_rank); start[1] = 0; ret = dataset_vrfy(start, count, stride, block, data_array1 + (dim0 / mpi_size * dim1 * mpi_rank), data_origin1); @@ -1503,11 +1501,11 @@ extend_writeInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* setup chunk-size. Make sure sizes are > 0 */ - chunk_dims[0] = chunkdim0; - chunk_dims[1] = chunkdim1; + chunk_dims[0] = (hsize_t)chunkdim0; + chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); /* ------------------- @@ -1591,8 +1589,8 @@ extend_writeInd(void) VRFY((mem_dataspace >= 0), ""); /* Extend its current dim sizes before writing */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; ret = H5Dset_extent(dataset1, dims); VRFY((ret >= 0), "H5Dset_extent succeeded"); @@ -1648,8 +1646,8 @@ extend_writeInd(void) H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; ret = H5Dset_extent(dataset2, dims); VRFY((ret >= 0), "H5Dset_extent succeeded"); @@ -1807,7 +1805,7 @@ extend_writeInd2(void) * Write to the second half of the dataset * -------------------------*/ for (i = 0; i < (int)orig_size; i++) - written[i] = orig_size + i; + written[i] = (int)orig_size + i; MESG("data array re-initialized"); if (VERBOSE_MED) { MESG("writing at offset 10: "); @@ -1881,11 +1879,11 @@ extend_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); /* ------------------- @@ -2063,11 +2061,11 @@ extend_writeAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* setup chunk-size. Make sure sizes are > 0 */ - chunk_dims[0] = chunkdim0; - chunk_dims[1] = chunkdim1; + chunk_dims[0] = (hsize_t)chunkdim0; + chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); /* ------------------- @@ -2151,8 +2149,8 @@ extend_writeAll(void) VRFY((mem_dataspace >= 0), ""); /* Extend its current dim sizes before writing */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; ret = H5Dset_extent(dataset1, dims); VRFY((ret >= 0), "H5Dset_extent succeeded"); @@ -2229,8 +2227,8 @@ extend_writeAll(void) H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; ret = H5Dset_extent(dataset2, dims); VRFY((ret >= 0), "H5Dset_extent succeeded"); @@ -2301,11 +2299,11 @@ extend_readAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc(dim0 * dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); /* ------------------- @@ -2471,7 +2469,7 @@ compress_readAll(void) hid_t dataspace; /* Dataspace ID */ hid_t dataset; /* Dataset ID */ int rank = 1; /* Dataspace rank */ - hsize_t dim = dim0; /* Dataspace dimensions */ + hsize_t dim = (hsize_t)dim0; /* Dataspace dimensions */ unsigned u; /* Local index variable */ unsigned chunk_opts; /* Chunk options */ unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */ @@ -2684,8 +2682,8 @@ none_selection_chunk(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* setup chunk-size. Make sure sizes are > 0 */ - chunk_dims[0] = chunkdim0; - chunk_dims[1] = chunkdim1; + chunk_dims[0] = (hsize_t)chunkdim0; + chunk_dims[1] = (hsize_t)chunkdim1; /* ------------------- * START AN HDF5 FILE @@ -2715,8 +2713,8 @@ none_selection_chunk(void) VRFY((ret >= 0), "H5Pset_chunk succeeded"); /* setup dimensionality object */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -2989,8 +2987,8 @@ test_actual_io_mode(int selection_mode) VRFY((fid >= 0), "H5Fcreate succeeded"); /* Create the basic Space */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -3001,7 +2999,7 @@ test_actual_io_mode(int selection_mode) /* If we are not testing contiguous datasets */ if (is_chunked) { /* Set up chunk information. */ - chunk_dims[0] = dims[0] / mpi_size; + chunk_dims[0] = dims[0] / (hsize_t)mpi_size; chunk_dims[1] = dims[1]; ret = H5Pset_chunk(dcpl, 2, chunk_dims); VRFY((ret >= 0), "chunk creation property list succeeded"); @@ -3067,14 +3065,14 @@ test_actual_io_mode(int selection_mode) } else { /* Select the first and the nth chunk in the nth column */ - block[0] = dim0 / mpi_size; - block[1] = dim1 / mpi_size; + block[0] = (hsize_t)(dim0 / mpi_size); + block[1] = (hsize_t)(dim1 / mpi_size); count[0] = 2; count[1] = 1; - stride[0] = mpi_rank * block[0]; + stride[0] = (hsize_t)mpi_rank * block[0]; stride[1] = 1; start[0] = 0; - start[1] = mpi_rank * block[1]; + start[1] = (hsize_t)mpi_rank * block[1]; } test_name = "Multi Chunk - Mixed"; @@ -3105,18 +3103,18 @@ test_actual_io_mode(int selection_mode) if (mpi_rank == 0) { /* Select the first chunk in the first column */ slab_set(mpi_rank, mpi_size, start, count, stride, block, BYCOL); - block[0] = block[0] / mpi_size; + block[0] = block[0] / (hsize_t)mpi_size; } else { /* Select the first and the nth chunk in the nth column */ - block[0] = dim0 / mpi_size; - block[1] = dim1 / mpi_size; + block[0] = (hsize_t)(dim0 / mpi_size); + block[1] = (hsize_t)(dim1 / mpi_size); count[0] = 2; count[1] = 1; - stride[0] = mpi_rank * block[0]; + stride[0] = (hsize_t)mpi_rank * block[0]; stride[1] = 1; start[0] = 0; - start[1] = mpi_rank * block[1]; + start[1] = (hsize_t)mpi_rank * block[1]; } /* If the testname was not already set by the RESET case */ @@ -3189,7 +3187,7 @@ test_actual_io_mode(int selection_mode) length = dim0 * dim1; /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * length); + buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -3437,7 +3435,6 @@ test_no_collective_cause_mode(int selection_mode) uint32_t no_collective_cause_global_write = 0; uint32_t no_collective_cause_global_read = 0; uint32_t no_collective_cause_global_expected = 0; - hsize_t coord[NELM][RANK]; const char *filename; const char *test_name; @@ -3525,8 +3522,8 @@ test_no_collective_cause_mode(int selection_mode) dims[1] = COL_FACTOR * 6; } else { - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; } sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -3547,7 +3544,7 @@ test_no_collective_cause_mode(int selection_mode) /* If we are not testing contiguous datasets */ if (is_chunked) { /* Set up chunk information. */ - chunk_dims[0] = dims[0] / mpi_size; + chunk_dims[0] = dims[0] / (hsize_t)mpi_size; chunk_dims[1] = dims[1]; ret = H5Pset_chunk(dcpl, 2, chunk_dims); VRFY((ret >= 0), "chunk creation property list succeeded"); @@ -3629,7 +3626,7 @@ test_no_collective_cause_mode(int selection_mode) length = dims[0] * dims[1]; /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * length); + buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -3821,8 +3818,8 @@ test_no_collective_cause_mode_filter(int selection_mode) } /* Create the basic Space */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -3839,7 +3836,7 @@ test_no_collective_cause_mode_filter(int selection_mode) /* If we are not testing contiguous datasets */ if (is_chunked) { /* Set up chunk information. */ - chunk_dims[0] = dims[0] / mpi_size; + chunk_dims[0] = dims[0] / (hsize_t)mpi_size; chunk_dims[1] = dims[1]; ret = H5Pset_chunk(dcpl, 2, chunk_dims); VRFY((ret >= 0), "chunk creation property list succeeded"); @@ -4055,10 +4052,10 @@ dataset_atomicity(void) buf_size = dim0 * dim1; /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc(buf_size, sizeof(int)); + write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc(buf_size, sizeof(int)); + read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); /* setup file access template */ @@ -4074,8 +4071,8 @@ dataset_atomicity(void) VRFY((ret >= 0), "H5Pclose succeeded"); /* setup dimensionality object */ - dims[0] = dim0; - dims[1] = dim1; + dims[0] = (hsize_t)dim0; + dims[1] = (hsize_t)dim1; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -4214,10 +4211,10 @@ dataset_atomicity(void) VRFY((dataset2 >= 0), "H5Dopen2 succeeded"); /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc(buf_size, sizeof(int)); + write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc(buf_size, sizeof(int)); + read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); for (i = 0; i < buf_size; i++) { @@ -4233,12 +4230,12 @@ dataset_atomicity(void) VRFY((ret >= 0), "atomcity get failed"); VRFY((atomicity == TRUE), "atomcity set failed"); - block[0] = dim0 / mpi_size - 1; - block[1] = dim1 / mpi_size - 1; + block[0] = (hsize_t)(dim0 / mpi_size - 1); + block[1] = (hsize_t)(dim1 / mpi_size - 1); stride[0] = block[0] + 1; stride[1] = block[1] + 1; - count[0] = mpi_size; - count[1] = mpi_size; + count[0] = (hsize_t)mpi_size; + count[1] = (hsize_t)mpi_size; start[0] = 0; start[1] = 0; @@ -4296,19 +4293,19 @@ dataset_atomicity(void) compare = 5; for (i = 0; i < dim0; i++) { - if (i >= mpi_rank * (block[0] + 1)) { + if (i >= mpi_rank * ((int)block[0] + 1)) { break; } - if ((i + 1) % (block[0] + 1) == 0) { + if ((i + 1) % ((int)block[0] + 1) == 0) { k += dim1; continue; } for (j = 0; j < dim1; j++) { - if (j >= mpi_rank * (block[1] + 1)) { - k += dim1 - mpi_rank * (block[1] + 1); + if (j >= mpi_rank * ((int)block[1] + 1)) { + k += dim1 - mpi_rank * ((int)block[1] + 1); break; } - if ((j + 1) % (block[1] + 1) == 0) { + if ((j + 1) % ((int)block[1] + 1) == 0) { k++; continue; } diff --git a/testpar/t_file.c b/testpar/t_file.c index 4365aef8f17..78070523d2e 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -190,7 +190,7 @@ test_page_buffer_access(void) fapl_self = create_faccess_plist(MPI_COMM_SELF, MPI_INFO_NULL, facc_type); - ret = H5Pset_page_buffer_size(fapl_self, sizeof(int)*1000, 0, 0); + ret = H5Pset_page_buffer_size(fapl_self, sizeof(int) * 1000, 0, 0); VRFY((ret == 0), ""); /* collective metadata writes do not work with page buffering */ ret = H5Pset_coll_metadata_write(fapl_self, FALSE); @@ -210,49 +210,49 @@ test_page_buffer_access(void) VRFY((f->shared->page_buf != NULL), "Page Buffer created with 1 process"); /* allocate space for 200 raw elements */ - raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements); + raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int) * (size_t)num_elements); VRFY((raw_addr != HADDR_UNDEF), ""); /* allocate space for 200 metadata elements */ - meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements); + meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int) * (size_t)num_elements); VRFY((meta_addr != HADDR_UNDEF), ""); page_count = 0; - ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data); + ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * (size_t)num_elements, data); VRFY((ret == 0), ""); - ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data); - ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data); + ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * (size_t)num_elements, data); + ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * (size_t)num_elements, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); /* update the first 50 elements */ - for(i=0 ; i<50 ; i++) + for (i = 0; i < 50; i++) data[i] = i; - ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*50, data); + ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); H5Eprint2(H5E_DEFAULT, stderr); VRFY((ret == 0), ""); - ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*50, data); + ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); page_count += 2; VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); /* update the second 50 elements */ - for(i=0 ; i<50 ; i++) - data[i] = i+50; - ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*50), sizeof(int)*50, data); + for (i = 0; i < 50; i++) + data[i] = i + 50; + ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 50), sizeof(int) * 50, data); VRFY((ret == 0), ""); - ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*50), sizeof(int)*50, data); + ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 50), sizeof(int) * 50, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); /* update 100 - 200 */ - for(i=0 ; i<100 ; i++) - data[i] = i+100; - ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, data); + for (i = 0; i < 100; i++) + data[i] = i + 100; + ret = H5F_block_write(f, H5FD_MEM_DRAW, raw_addr + (sizeof(int) * 100), sizeof(int) * 100, data); VRFY((ret == 0), ""); - ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*100, data); + ret = H5F_block_write(f, H5FD_MEM_SUPER, meta_addr + (sizeof(int) * 100), sizeof(int) * 100, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); @@ -260,37 +260,41 @@ test_page_buffer_access(void) VRFY((ret == 0), ""); /* read elements 0 - 200 */ - ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*200, data); + ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 200, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); - for (i=0; i < 200; i++) + for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*200, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); - for (i=0; i < 200; i++) + for (i = 0; i < 200; i++) VRFY((data[i] == i), "Read different values than written"); /* read elements 0 - 50 */ - ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*50, data); + ret = H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); - for (i=0; i < 50; i++) + for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); - ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*50, data); + ret = H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int) * 50, data); VRFY((ret == 0), ""); VRFY((H5SL_count(f->shared->page_buf->slist_ptr) == page_count), "Wrong number of pages in PB"); - for (i=0; i < 50; i++) + for (i = 0; i < 50; i++) VRFY((data[i] == i), "Read different values than written"); /* close the file */ ret = H5Fclose(file_id); VRFY((ret >= 0), "H5Fclose succeeded"); ret = H5Pclose(fapl_self); - VRFY((ret>=0), "H5Pclose succeeded"); + VRFY((ret >= 0), "H5Pclose succeeded"); /* Pop API context */ - if(api_ctx_pushed) { ret = H5CX_pop(); VRFY((ret == 0), "H5CX_pop()"); api_ctx_pushed = FALSE; } + if (api_ctx_pushed) { + ret = H5CX_pop(); + VRFY((ret == 0), "H5CX_pop()"); + api_ctx_pushed = FALSE; + } } #endif @@ -484,19 +488,19 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str grp_id = H5Gcreate2(file_id, "GROUP", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VRFY((grp_id >= 0), ""); - dims[0] = ROW_FACTOR * mpi_size; - dims[1] = COL_FACTOR * mpi_size; + dims[0] = (hsize_t)(ROW_FACTOR * mpi_size); + dims[1] = (hsize_t)(COL_FACTOR * mpi_size); sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); /* Each process takes a slabs of rows. */ - block[0] = dims[0] / mpi_size; + block[0] = dims[0] / (hsize_t)mpi_size; block[1] = dims[1]; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = mpi_rank * block[0]; + start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; num_elements = block[0] * block[1]; @@ -645,17 +649,17 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t grp_id = H5Gopen2(file_id, "GROUP", H5P_DEFAULT); VRFY((grp_id >= 0), ""); - dims[0] = ROW_FACTOR * mpi_size; - dims[1] = COL_FACTOR * mpi_size; + dims[0] = (hsize_t)(ROW_FACTOR * mpi_size); + dims[1] = (hsize_t)(COL_FACTOR * mpi_size); /* Each process takes a slabs of rows. */ - block[0] = dims[0] / mpi_size; + block[0] = dims[0] / (hsize_t)mpi_size; block[1] = dims[1]; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = mpi_rank * block[0]; + start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; num_elements = block[0] * block[1]; @@ -677,8 +681,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t ndims = H5Sget_simple_extent_dims(sid, dims, NULL); VRFY((ndims == 2), "H5Sget_simple_extent_dims succeeded"); - VRFY(dims[0] == ROW_FACTOR * mpi_size, "Wrong dataset dimensions"); - VRFY(dims[1] == COL_FACTOR * mpi_size, "Wrong dataset dimensions"); + VRFY(dims[0] == (hsize_t)(ROW_FACTOR * mpi_size), "Wrong dataset dimensions"); + VRFY(dims[1] == (hsize_t)(COL_FACTOR * mpi_size), "Wrong dataset dimensions"); ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -691,7 +695,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t ret = H5Sclose(sid); VRFY((ret == 0), ""); - for (i = 0; i < num_elements; i++) + for (i = 0; i < (int)num_elements; i++) VRFY((data_array[i] == mpi_rank + 1), "Dataset Verify failed"); } diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 9d07f23aa2d..5c0d10f08dd 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -71,10 +71,10 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) hs_size[0] = size[0] = HS_DIM1; hs_size[1] = HS_DIM2; - size[1] = hs_size[1] * mpi_size; + size[1] = hs_size[1] * (hsize_t)mpi_size; hs_offset[0] = 0; - hs_offset[1] = hs_size[1] * mpi_rank; + hs_offset[1] = hs_size[1] * (hsize_t)mpi_rank; /* Create the data space */ sid = H5Screate_simple(2, size, NULL); @@ -208,7 +208,9 @@ test_filter_read(void) unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */ herr_t hrc; const char * filename; - hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ +#ifdef H5_HAVE_FILTER_FLETCHER32 + hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ +#endif #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 37479b365e9..5153bce6034 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -255,8 +255,9 @@ test_write_one_chunk_filtered_dataset(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -418,8 +419,9 @@ test_write_filtered_dataset_no_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -578,8 +580,9 @@ test_write_filtered_dataset_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -746,8 +749,9 @@ test_write_filtered_dataset_single_no_selection(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -1202,8 +1206,9 @@ test_write_filtered_dataset_interleaved_write(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -1379,8 +1384,10 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(void) start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1547,8 +1554,10 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1714,8 +1723,10 @@ test_write_3d_filtered_dataset_overlap(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], start[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], start[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -1900,8 +1911,9 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2080,8 +2092,9 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2279,8 +2292,9 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2471,8 +2485,9 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2687,8 +2702,9 @@ test_read_one_chunk_filtered_dataset(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -2890,8 +2906,9 @@ test_read_filtered_dataset_no_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3094,8 +3111,9 @@ test_read_filtered_dataset_overlap(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3324,8 +3342,9 @@ test_read_filtered_dataset_single_no_selection(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -3906,8 +3925,9 @@ test_read_filtered_dataset_interleaved_read(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4135,8 +4155,9 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(void) start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4351,8 +4372,9 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4574,8 +4596,9 @@ test_read_3d_filtered_dataset_overlap(void) start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -4807,8 +4830,9 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5035,8 +5059,9 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5265,8 +5290,9 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(void) start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5502,8 +5528,9 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } @@ -5803,8 +5830,10 @@ test_write_parallel_read_serial(void) offset[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu, %llu ], stride[ %llu, %llu, %llu ], offset[ " - "%llu, %llu, %llu ], block size[ %llu, %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1], offset[2], block[0], block[1], block[2]); HDfflush(stdout); @@ -5973,8 +6002,9 @@ test_shrinking_growing_chunks(void) start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %llu, %llu ], stride[ %llu, %llu ], start[ %llu, %llu ], " - "block size[ %llu, %llu ]\n", + HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); HDfflush(stdout); } diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 5bacc12e0a4..a75ffe391dc 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -128,12 +128,6 @@ zero_dim_dset(void) /* * Example of using PHDF5 to create ndatasets datasets. Each process write * a slab of array to the file. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void multiple_dset_write(void) @@ -161,7 +155,7 @@ multiple_dset_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)(size * size * sizeof(double))); + outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); VRFY((outme != NULL), "HDmalloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); @@ -216,12 +210,6 @@ multiple_dset_write(void) } /* Example of using PHDF5 to create, write, and read compact dataset. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void compact_dataset(void) @@ -241,15 +229,15 @@ compact_dataset(void) size = get_size(); for (i = 0; i < DIM; i++) - file_dims[i] = size; + file_dims[i] = (hsize_t)size; MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)(size * size * sizeof(double))); + outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double))); VRFY((outme != NULL), "HDmalloc succeeded for outme"); - inme = HDmalloc((size_t)(size * size * sizeof(double))); + inme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); VRFY((outme != NULL), "HDmalloc succeeded for inme"); filename = GetTestParameters(); @@ -351,14 +339,6 @@ compact_dataset(void) /* * Example of using PHDF5 to create, write, and read dataset and attribute * of Null dataspace. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * JRM - 8/24/04 */ void null_dataset(void) @@ -463,14 +443,6 @@ null_dataset(void) * Actual data is _not_ written to these datasets. Dataspaces are exact * sizes(2GB, 4GB, etc.), but the metadata for the file pushes the file over * the boundary of interest. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * JRM - 8/11/04 */ void big_dataset(void) @@ -592,16 +564,6 @@ big_dataset(void) /* Example of using PHDF5 to read a partial written dataset. The dataset does * not have actual data written to the entire raw data area and relies on the * default fill value of zeros to work correctly. - * - * Changes: Removed the assert that mpi_size <= the SIZE #define. - * As best I can tell, this assert isn't needed here, - * and in any case, the SIZE #define is being removed - * in an update of the functions in this file to run - * with an arbitrary number of processes. - * - * Also added code to free dynamically allocated buffers. - * - * JRM - 8/11/04 */ void dataset_fillvalue(void) @@ -728,7 +690,7 @@ dataset_fillvalue(void) * Each process writes 1 row of data. Thus last row is not written. */ /* Create hyperslabs in memory and file dataspaces */ - req_start[0] = mpi_rank; + req_start[0] = (hsize_t)mpi_rank; ret = H5Sselect_hyperslab(filespace, H5S_SELECT_SET, req_start, NULL, req_count, NULL); VRFY((ret >= 0), "H5Sselect_hyperslab succeeded on memory dataspace"); ret = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, req_start, NULL, req_count, NULL); @@ -854,12 +816,6 @@ collective_group_write_independent_group_read(void) /* Write multiple groups with a chunked dataset in each group collectively. * These groups and datasets are for testing independent read later. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ void collective_group_write(void) @@ -889,7 +845,7 @@ collective_group_write(void) chunk_size[0] = (hsize_t)(size / 2); chunk_size[1] = (hsize_t)(size / 2); - outme = HDmalloc((size_t)(size * size * sizeof(DATATYPE))); + outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); VRFY((outme != NULL), "HDmalloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); @@ -991,16 +947,6 @@ independent_group_read(void) } /* Open and read datasets and compare data - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * Also added code to verify the results of dynamic memory - * allocations, and to free dynamically allocated memeory - * when we are done with it. - * - * JRM - 8/16/04 */ static void group_dataset_read(hid_t fid, int mpi_rank, int m) @@ -1013,10 +959,10 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)(size * size * sizeof(DATATYPE))); + indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); VRFY((indata != NULL), "HDmalloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)(size * size * sizeof(DATATYPE))); + outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); /* open every group under root group. */ @@ -1033,9 +979,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) /* this is the original value */ for (i = 0; i < size; i++) - for (j = 0; j < size; j++) { + for (j = 0; j < size; j++) outdata[(i * size) + j] = (i + j) * 1000 + mpi_rank; - } /* compare the original value(outdata) to the value in file(indata).*/ ret = check_value(indata, outdata, size); @@ -1074,11 +1019,6 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) * + means the group has attribute(s). * ' means the datasets in the groups have attribute(s). * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ void multiple_group_write(void) @@ -1162,12 +1102,6 @@ multiple_group_write(void) /* * In a group, creates NDATASETS datasets. Each process writes a hyperslab * of a data array to the file. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/16/04 */ static void write_dataset(hid_t memspace, hid_t filespace, hid_t gid) @@ -1183,7 +1117,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - outme = HDmalloc((size_t)(size * size * sizeof(double))); + outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); VRFY((outme != NULL), "HDmalloc succeeded for outme"); for (n = 0; n < NDATASET; n++) { @@ -1241,12 +1175,6 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter) /* * This function is to verify the data from multiple group testing. It opens * every dataset in every group and check their correctness. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ void multiple_group_read(void) @@ -1321,12 +1249,6 @@ multiple_group_read(void) /* * This function opens all the datasets in a certain, checks the data using * dataset_vrfy function. - * - * Changes: Updated function to use a dynamically calculated size, - * instead of the old SIZE #define. This should allow it - * to function with an arbitrary number of processors. - * - * JRM - 8/11/04 */ static int read_dataset(hid_t memspace, hid_t filespace, hid_t gid) @@ -1341,10 +1263,10 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)(size * size * sizeof(DATATYPE))); + indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); VRFY((indata != NULL), "HDmalloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)(size * size * sizeof(DATATYPE))); + outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); for (n = 0; n < NDATASET; n++) { @@ -1477,12 +1399,6 @@ read_attribute(hid_t obj_id, int this_type, int num) /* This functions compares the original data with the read-in data for its * hyperslab part only by process ID. - * - * Changes: Modified function to use a passed in size parameter - * instead of the old SIZE #define. This should let us - * run with an arbitrary number of processes. - * - * JRM - 8/16/04 */ static int check_value(DATATYPE *indata, DATATYPE *outdata, int size) @@ -1497,8 +1413,8 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size) get_slab(chunk_origin, chunk_dims, count, NULL, size); - indata += chunk_origin[0] * size; - outdata += chunk_origin[0] * size; + indata += chunk_origin[0] * (hsize_t)size; + outdata += chunk_origin[0] * (hsize_t)size; for (i = chunk_origin[0]; i < (chunk_origin[0] + chunk_dims[0]); i++) for (j = chunk_origin[1]; j < (chunk_origin[1] + chunk_dims[1]); j++) { if (*indata != *outdata) @@ -1515,12 +1431,6 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size) } /* Decide the portion of data chunk in dataset by process ID. - * - * Changes: Modified function to use a passed in size parameter - * instead of the old SIZE #define. This should let us - * run with an arbitrary number of processes. - * - * JRM - 8/11/04 */ static void @@ -1532,15 +1442,15 @@ get_slab(hsize_t chunk_origin[], hsize_t chunk_dims[], hsize_t count[], hsize_t MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); if (chunk_origin != NULL) { - chunk_origin[0] = mpi_rank * (size / mpi_size); + chunk_origin[0] = (hsize_t)mpi_rank * (hsize_t)(size / mpi_size); chunk_origin[1] = 0; } if (chunk_dims != NULL) { - chunk_dims[0] = size / mpi_size; - chunk_dims[1] = size; + chunk_dims[0] = (hsize_t)(size / mpi_size); + chunk_dims[1] = (hsize_t)size; } if (file_dims != NULL) - file_dims[0] = file_dims[1] = size; + file_dims[0] = file_dims[1] = (hsize_t)size; if (count != NULL) count[0] = count[1] = 1; } @@ -1562,8 +1472,6 @@ get_slab(hsize_t chunk_origin[], hsize_t chunk_dims[], hsize_t count[], hsize_t * This function reproduces this situation. At present the test hangs * on failure. * JRM - 9/13/04 - * - * Changes: None. */ #define N 4 @@ -1807,10 +1715,6 @@ io_mode_confusion(void) * cache clients will have to construct on disk images on demand. * * JRM -- 10/13/10 - * - * Changes: - * Break it into two parts, a writer to write the file and a reader - * the correctness of the writer. AKC -- 2010/10/27 */ #define NUM_DATA_SETS 4 diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 67ec6cb6831..a883f555f51 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -513,7 +513,7 @@ test_mpio_1wMr(char *filename, int special_request) * ==================================================*/ irank = 0; for (i = 0; i < DIMSIZE; i++) - writedata[i] = irank * DIMSIZE + i; + writedata[i] = (uint8_t)(irank * DIMSIZE + i); mpi_off = irank * DIMSIZE; /* Only one process writes */ diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index 8c88d4786e5..384fb1b42ad 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -32,7 +32,7 @@ main(int argc, char **argv) hid_t fapl, sid, mem_dataspace; herr_t ret; char filename[1024]; - int mpi_size, mpi_rank, ndims, i, j; + int mpi_size, mpi_rank, ndims; MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; hsize_t dims[RANK]; @@ -40,6 +40,7 @@ main(int argc, char **argv) hsize_t count[RANK]; hsize_t stride[RANK]; hsize_t block[RANK]; + hsize_t i, j; DATATYPE *data_array = NULL, *dataptr; /* data buffer */ MPI_Init(&argc, &argv); @@ -70,21 +71,21 @@ main(int argc, char **argv) ndims = H5Sget_simple_extent_dims(sid, dims, NULL); VRFY((ndims == 2), "H5Sget_simple_extent_dims succeeded"); - VRFY(dims[0] == ROW_FACTOR * mpi_size, "Wrong dataset dimensions"); - VRFY(dims[1] == COL_FACTOR * mpi_size, "Wrong dataset dimensions"); + VRFY(dims[0] == (hsize_t)(ROW_FACTOR * mpi_size), "Wrong dataset dimensions"); + VRFY(dims[1] == (hsize_t)(COL_FACTOR * mpi_size), "Wrong dataset dimensions"); /* allocate memory for data buffer */ data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); VRFY((data_array != NULL), "data_array HDmalloc succeeded"); /* Each process takes a slabs of rows. */ - block[0] = dims[0] / mpi_size; + block[0] = dims[0] / (hsize_t)mpi_size; block[1] = dims[1]; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = mpi_rank * block[0]; + start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); @@ -104,8 +105,8 @@ main(int argc, char **argv) for (j = 0; j < block[1]; j++) { if (*dataptr != mpi_rank + 1) { HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), - (unsigned long)(j + start[1]), mpi_rank + 1, *(dataptr)); + (unsigned long)i, (unsigned long)j, (unsigned long)((hsize_t)i + start[0]), + (unsigned long)((hsize_t)j + start[1]), mpi_rank + 1, *(dataptr)); nerrors++; } dataptr++; diff --git a/testpar/t_prop.c b/testpar/t_prop.c index e88c656ea24..bcde00e231e 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -53,7 +53,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) void *rbuf; MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); - buf_size = recv_size; + buf_size = (size_t)recv_size; rbuf = (uint8_t *)HDmalloc(buf_size); MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c index a426c09f878..b8028a4d824 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -65,8 +65,8 @@ main(int argc, char **argv) grp_id = H5Gcreate2(file_id, "Group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VRFY((grp_id >= 0), "H5Gcreate succeeded"); - dims[0] = ROW_FACTOR * mpi_size; - dims[1] = COL_FACTOR * mpi_size; + dims[0] = (hsize_t)ROW_FACTOR * (hsize_t)mpi_size; + dims[1] = (hsize_t)COL_FACTOR * (hsize_t)mpi_size; sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded"); @@ -78,13 +78,13 @@ main(int argc, char **argv) VRFY((data_array != NULL), "data_array HDmalloc succeeded"); /* Each process takes a slabs of rows. */ - block[0] = dims[0] / mpi_size; + block[0] = dims[0] / (hsize_t)mpi_size; block[1] = dims[1]; stride[0] = block[0]; stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = mpi_rank * block[0]; + start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; /* put some trivial data in the data_array */ diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 0f35293f930..16226ee206d 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -1701,21 +1701,6 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) * * Programmer: JRM -- 9/18/09 * - * Modifications: - * - * JRM -- 9/16/10 - * Added express_test parameter. Use it to control whether - * we set up the chunks so that no chunk is shared between - * processes, and also whether we set an alignment when we - * create the test file. - * - * JRM -- 8/11/11 - * Refactored function heavily & broke it into six functions. - * Added the skips_ptr, max_skips, total_tests_ptr, - * tests_run_ptr, and tests_skiped_ptr parameters to support - * skipping portions of the test according to the express - * test value. - * *------------------------------------------------------------------------- */ @@ -1905,20 +1890,6 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i * * Programmer: JRM -- 9/18/09 * - * Modifications: - * - * Modified function to take a sample of the run times - * of the different tests, and skip some of them if - * run times are too long. - * - * We need to do this because Lustre runns very slowly - * if two or more processes are banging on the same - * block of memory. - * JRM -- 9/10/10 - * Break this one big test into 4 smaller tests according - * to {independent,collective}x{contigous,chunked} datasets. - * AKC -- 2010/01/14 - * *------------------------------------------------------------------------- */ @@ -2038,8 +2009,8 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", tests_skipped, - total_tests); + HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } return; @@ -3671,14 +3642,6 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) * * Programmer: JRM -- 10/10/09 * - * Modifications: - * - * JRM -- 9/16/10 - * Added the express_test parameter. Use it to control - * whether we set an alignment, and whether we allocate - * chunks such that no two processes will normally touch - * the same chunk. - * *------------------------------------------------------------------------- */ @@ -3854,20 +3817,6 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i * * Programmer: JRM -- 9/18/09 * - * Modifications: - * - * Modified function to take a sample of the run times - * of the different tests, and skip some of them if - * run times are too long. - * - * We need to do this because Lustre runns very slowly - * if two or more processes are banging on the same - * block of memory. - * JRM -- 9/10/10 - * Break this one big test into 4 smaller tests according - * to {independent,collective}x{contigous,chunked} datasets. - * AKC -- 2010/01/17 - * *------------------------------------------------------------------------- */ @@ -3983,16 +3932,16 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } /* end of switch(sstest_type) */ #if CONTIG_HS_DR_PIO_TEST__DEBUG if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped, - total_tests); + HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", + tests_run, tests_skipped, total_tests); } #endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */ } } if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " %lld of %lld subtests skipped to expedite testing.\n", tests_skipped, - total_tests); + HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } return; diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 293a94529a7..32d0265ea9a 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -238,17 +238,17 @@ coll_write_test(int chunk_factor) * Buffers' initialization. */ - mdim1[0] = MSPACE1_DIM * mpi_size; + mdim1[0] = (hsize_t)(MSPACE1_DIM * mpi_size); mdim[0] = MSPACE_DIM1; - mdim[1] = MSPACE_DIM2 * mpi_size; + mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size); fsdim[0] = FSPACE_DIM1; - fsdim[1] = FSPACE_DIM2 * mpi_size; + fsdim[1] = (hsize_t)(FSPACE_DIM2 * mpi_size); - vector = (int *)HDmalloc(sizeof(int) * mdim1[0] * mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * mdim[0] * mdim[1] * mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * mdim[0] * mdim[1] * mpi_size); + vector = (int *)HDmalloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); + matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); + matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); - HDmemset(vector, 0, sizeof(int) * mdim1[0] * mpi_size); + HDmemset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1; for (i = 1; i < MSPACE1_DIM * mpi_size - 1; i++) vector[i] = i; @@ -273,8 +273,8 @@ coll_write_test(int chunk_factor) VRFY((ret >= 0), "Fill value creation property list succeeded"); if (chunk_factor != 0) { - chunk_dims[0] = fsdim[0] / chunk_factor; - chunk_dims[1] = fsdim[1] / chunk_factor; + chunk_dims[0] = fsdim[0] / (hsize_t)chunk_factor; + chunk_dims[1] = fsdim[1] / (hsize_t)chunk_factor; ret = H5Pset_chunk(dcrt_plist, 2, chunk_dims); VRFY((ret >= 0), "chunk creation property list succeeded"); } @@ -312,7 +312,7 @@ coll_write_test(int chunk_factor) */ start[0] = FHSTART0; - start[1] = FHSTART1 + mpi_rank * FHSTRIDE1 * FHCOUNT1; + start[1] = (hsize_t)(FHSTART1 + mpi_rank * FHSTRIDE1 * FHCOUNT1); stride[0] = FHSTRIDE0; stride[1] = FHSTRIDE1; count[0] = FHCOUNT0; @@ -333,7 +333,7 @@ coll_write_test(int chunk_factor) */ start[0] = SHSTART0; - start[1] = SHSTART1 + SHCOUNT1 * SHBLOCK1 * mpi_rank; + start[1] = (hsize_t)(SHSTART1 + SHCOUNT1 * SHBLOCK1 * mpi_rank); stride[0] = SHSTRIDE0; stride[1] = SHSTRIDE1; count[0] = SHCOUNT0; @@ -469,7 +469,7 @@ coll_write_test(int chunk_factor) * */ start[0] = RFFHSTART0; - start[1] = RFFHSTART1 + mpi_rank * RFFHCOUNT1; + start[1] = (hsize_t)(RFFHSTART1 + mpi_rank * RFFHCOUNT1); block[0] = RFFHBLOCK0; block[1] = RFFHBLOCK1; stride[0] = RFFHSTRIDE0; @@ -495,7 +495,7 @@ coll_write_test(int chunk_factor) */ start[0] = RFSHSTART0; - start[1] = RFSHSTART1 + RFSHCOUNT1 * mpi_rank; + start[1] = (hsize_t)(RFSHSTART1 + RFSHCOUNT1 * mpi_rank); block[0] = RFSHBLOCK0; block[1] = RFSHBLOCK1; stride[0] = RFSHSTRIDE0; @@ -533,7 +533,7 @@ coll_write_test(int chunk_factor) */ start[0] = RMFHSTART0; - start[1] = RMFHSTART1 + mpi_rank * RMFHCOUNT1; + start[1] = (hsize_t)(RMFHSTART1 + mpi_rank * RMFHCOUNT1); block[0] = RMFHBLOCK0; block[1] = RMFHBLOCK1; stride[0] = RMFHSTRIDE0; @@ -556,7 +556,7 @@ coll_write_test(int chunk_factor) * */ start[0] = RMSHSTART0; - start[1] = RMSHSTART1 + mpi_rank * RMSHCOUNT1; + start[1] = (hsize_t)(RMSHSTART1 + mpi_rank * RMSHCOUNT1); block[0] = RMSHBLOCK0; block[1] = RMSHBLOCK1; stride[0] = RMSHSTRIDE0; @@ -571,8 +571,8 @@ coll_write_test(int chunk_factor) * Initialize data buffer. */ - HDmemset(matrix_out, 0, sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); - HDmemset(matrix_out1, 0, sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); + HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /* * Read data back to the buffer matrix_out. */ @@ -690,9 +690,9 @@ coll_read_test(int chunk_factor) /* Initialize the buffer */ mdim[0] = MSPACE_DIM1; - mdim[1] = MSPACE_DIM2 * mpi_size; - matrix_out = (int *)HDmalloc(sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); + mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size); + matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /*** For testing collective hyperslab selection read ***/ @@ -727,7 +727,7 @@ coll_read_test(int chunk_factor) * */ start[0] = RFFHSTART0; - start[1] = RFFHSTART1 + mpi_rank * RFFHCOUNT1; + start[1] = (hsize_t)(RFFHSTART1 + mpi_rank * RFFHCOUNT1); block[0] = RFFHBLOCK0; block[1] = RFFHBLOCK1; stride[0] = RFFHSTRIDE0; @@ -747,7 +747,7 @@ coll_read_test(int chunk_factor) * */ start[0] = RFSHSTART0; - start[1] = RFSHSTART1 + RFSHCOUNT1 * mpi_rank; + start[1] = (hsize_t)(RFSHSTART1 + RFSHCOUNT1 * mpi_rank); block[0] = RFSHBLOCK0; block[1] = RFSHBLOCK1; stride[0] = RFSHSTRIDE0; @@ -776,7 +776,7 @@ coll_read_test(int chunk_factor) */ start[0] = RMFHSTART0; - start[1] = RMFHSTART1 + mpi_rank * RMFHCOUNT1; + start[1] = (hsize_t)(RMFHSTART1 + mpi_rank * RMFHCOUNT1); block[0] = RMFHBLOCK0; block[1] = RMFHBLOCK1; stride[0] = RMFHSTRIDE0; @@ -798,7 +798,7 @@ coll_read_test(int chunk_factor) * */ start[0] = RMSHSTART0; - start[1] = RMSHSTART1 + mpi_rank * RMSHCOUNT1; + start[1] = (hsize_t)(RMSHSTART1 + mpi_rank * RMSHCOUNT1); block[0] = RMSHBLOCK0; block[1] = RMSHBLOCK1; stride[0] = RMSHSTRIDE0; @@ -812,8 +812,8 @@ coll_read_test(int chunk_factor) * Initialize data buffer. */ - HDmemset(matrix_out, 0, sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); - HDmemset(matrix_out1, 0, sizeof(int) * MSPACE_DIM1 * MSPACE_DIM2 * mpi_size); + HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /* * Read data back to the buffer matrix_out. @@ -973,9 +973,9 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t * pre-C99 compilers again. */ - base_count = dims[sel_offset] / (checker_edge_size * 2); + base_count = dims[sel_offset] / (hsize_t)(checker_edge_size * 2); - if ((dims[sel_rank] % (checker_edge_size * 2)) > 0) { + if ((dims[sel_rank] % (hsize_t)(checker_edge_size * 2)) > 0) { base_count++; } diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index b32a1389a46..3e248027f62 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -322,9 +322,9 @@ void print_found(hsize_t nfound) { if (g_Parallel) - parallel_print("%" H5_PRINTF_LL_WIDTH "u differences found\n", (unsigned long long)nfound); + parallel_print("%" PRIuHSIZE " differences found\n", nfound); else - HDfprintf(stdout, "%Hu differences found\n", nfound); + HDfprintf(stdout, "%" PRIuHSIZE " differences found\n", nfound); } /*----------------------------------------------------------------- diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 58c9d12735f..493df395181 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -81,8 +81,8 @@ h5tool_format_t h5tools_dataformat = { 1, /*skip_first */ - 1, /*obj_hidefileno */ - " " H5_PRINTF_HADDR_FMT, /*obj_format */ + 1, /*obj_hidefileno */ + " %" PRIuHADDR, /*obj_format */ 1, /*dset_hidefileno */ "DATASET %s ", /*dset_format */ diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index fab8a6c5c62..8d5a4a82994 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -1233,9 +1233,9 @@ dump_fcpl(hid_t fid) indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s %s\n", "FREE_SPACE_PERSIST", fs_persist ? "TRUE" : "FALSE"); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream, "%s %Hu\n", "FREE_SPACE_SECTION_THRESHOLD", fs_threshold); + PRINTSTREAM(rawoutstream, "%s %" PRIuHSIZE "\n", "FREE_SPACE_SECTION_THRESHOLD", fs_threshold); indentation(dump_indent + COL); - PRINTSTREAM(rawoutstream, "%s %Hu\n", "FILE_SPACE_PAGE_SIZE", fsp_size); + PRINTSTREAM(rawoutstream, "%s %" PRIuHSIZE "\n", "FILE_SPACE_PAGE_SIZE", fsp_size); /*------------------------------------------------------------------------- * USER_BLOCK @@ -1244,7 +1244,7 @@ dump_fcpl(hid_t fid) indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "USER_BLOCK %s\n", BEGIN); indentation(dump_indent + COL + COL); - PRINTSTREAM(rawoutstream, "%s %Hu\n", "USERBLOCK_SIZE", userblock); + PRINTSTREAM(rawoutstream, "%s %" PRIuHSIZE "\n", "USERBLOCK_SIZE", userblock); indentation(dump_indent + COL); PRINTSTREAM(rawoutstream, "%s\n", END); diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index b830deec775..61c2ce2672b 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -93,8 +93,8 @@ static h5tool_format_t xml_dataformat = { 1, /*skip_first */ - 1, /*obj_hidefileno */ - " " H5_PRINTF_HADDR_FMT, /*obj_format */ + 1, /*obj_hidefileno */ + " %" PRIuHADDR, /*obj_format */ 1, /*dset_hidefileno */ "DATASET %s ", /*dset_format */ diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 575dc65c9fe..97e98f22629 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -95,8 +95,8 @@ static h5tool_format_t ls_dataformat = { 0, /*skip_first */ - 0, /*obj_hidefileno */ - "-%lu:" H5_PRINTF_HADDR_FMT, /*obj_format */ + 0, /*obj_hidefileno */ + "-%lu:%" PRIuHADDR, /*obj_format */ 0, /*dset_hidefileno */ "DSET-%s ", /*dset_format */ diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index 4aae014991e..b000c46683f 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -1190,7 +1190,7 @@ print_file_info(const iter_t *iter) HDprintf("\t# of unique links: %lu\n", iter->uniq_links); HDprintf("\t# of unique other: %lu\n", iter->uniq_others); HDprintf("\tMax. # of links to object: %lu\n", iter->max_links); - HDfprintf(stdout, "\tMax. # of objects in group: %Hu\n", iter->max_fanout); + HDfprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout); return 0; } /* print_file_info() */ @@ -1213,40 +1213,40 @@ static herr_t print_file_metadata(const iter_t *iter) { HDfprintf(stdout, "File space information for file metadata (in bytes):\n"); - HDfprintf(stdout, "\tSuperblock: %Hu\n", iter->super_size); - HDfprintf(stdout, "\tSuperblock extension: %Hu\n", iter->super_ext_size); - HDfprintf(stdout, "\tUser block: %Hu\n", iter->ublk_size); + HDfprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size); + HDfprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size); + HDfprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size); HDfprintf(stdout, "\tObject headers: (total/unused)\n"); - HDfprintf(stdout, "\t\tGroups: %Hu/%Hu\n", iter->group_ohdr_info.total_size, + HDfprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size); - HDfprintf(stdout, "\t\tDatasets(exclude compact data): %Hu/%Hu\n", iter->dset_ohdr_info.total_size, - iter->dset_ohdr_info.free_size); - HDfprintf(stdout, "\t\tDatatypes: %Hu/%Hu\n", iter->dtype_ohdr_info.total_size, + HDfprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n", + iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size); + HDfprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size, iter->dtype_ohdr_info.free_size); HDfprintf(stdout, "\tGroups:\n"); - HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->groups_btree_storage_size); - HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->groups_heap_storage_size); + HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size); + HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size); HDfprintf(stdout, "\tAttributes:\n"); - HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->attrs_btree_storage_size); - HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->attrs_heap_storage_size); + HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size); + HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size); HDfprintf(stdout, "\tChunked datasets:\n"); - HDfprintf(stdout, "\t\tIndex: %Hu\n", iter->datasets_index_storage_size); + HDfprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size); HDfprintf(stdout, "\tDatasets:\n"); - HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->datasets_heap_storage_size); + HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size); HDfprintf(stdout, "\tShared Messages:\n"); - HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->SM_hdr_storage_size); - HDfprintf(stdout, "\t\tB-tree/List: %Hu\n", iter->SM_index_storage_size); - HDfprintf(stdout, "\t\tHeap: %Hu\n", iter->SM_heap_storage_size); + HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size); + HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size); + HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size); HDfprintf(stdout, "\tFree-space managers:\n"); - HDfprintf(stdout, "\t\tHeader: %Hu\n", iter->free_hdr); - HDfprintf(stdout, "\t\tAmount of free space: %Hu\n", iter->free_space); + HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr); + HDfprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space); return 0; } /* print_file_metadata() */ @@ -1324,11 +1324,11 @@ print_group_metadata(const iter_t *iter) { HDprintf("File space information for groups' metadata (in bytes):\n"); - HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n", iter->group_ohdr_info.total_size, - iter->group_ohdr_info.free_size); + HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n", + iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size); - HDfprintf(stdout, "\tB-tree/List: %Hu\n", iter->groups_btree_storage_size); - HDfprintf(stdout, "\tHeap: %Hu\n", iter->groups_heap_storage_size); + HDfprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size); + HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size); return 0; } /* print_group_metadata() */ @@ -1362,7 +1362,7 @@ print_dataset_info(const iter_t *iter) HDprintf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]); HDprintf("1-D Dataset information:\n"); - HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %Hu\n", iter->max_dset_dims); + HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims); HDprintf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1); total = 0; for (u = 0; u < (unsigned)sdsets_threshold; u++) { @@ -1394,8 +1394,9 @@ print_dataset_info(const iter_t *iter) } /* end if */ HDprintf("Dataset storage information:\n"); - HDfprintf(stdout, "\tTotal raw data size: %Hu\n", iter->dset_storage_size); - HDfprintf(stdout, "\tTotal external raw data size: %Hu\n", iter->dset_external_storage_size); + HDfprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size); + HDfprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n", + iter->dset_external_storage_size); HDprintf("Dataset layout information:\n"); for (u = 0; u < H5D_NLAYOUTS; u++) @@ -1439,11 +1440,11 @@ print_dset_metadata(const iter_t *iter) { HDprintf("File space information for datasets' metadata (in bytes):\n"); - HDfprintf(stdout, "\tObject headers (total/unused): %Hu/%Hu\n", iter->dset_ohdr_info.total_size, - iter->dset_ohdr_info.free_size); + HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n", + iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size); - HDfprintf(stdout, "\tIndex for Chunked datasets: %Hu\n", iter->datasets_index_storage_size); - HDfprintf(stdout, "\tHeap: %Hu\n", iter->datasets_heap_storage_size); + HDfprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n", iter->datasets_index_storage_size); + HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size); return 0; } /* print_dset_metadata() */ @@ -1557,7 +1558,7 @@ print_freespace_info(const iter_t *iter) unsigned u; /* Local index variable */ HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE"); - HDfprintf(stdout, "Free-space section threshold: %Hu bytes\n", iter->fs_threshold); + HDfprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold); HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS); total = 0; for (u = 0; u < SIZE_SMALL_SECTS; u++) { @@ -1605,7 +1606,7 @@ print_storage_summary(const iter_t *iter) double percent = 0.0f; HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]); - HDfprintf(stdout, "File space page size: %Hu bytes\n", iter->fsp_size); + HDfprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size); HDprintf("Summary of file space information:\n"); total_meta = iter->super_size + iter->super_ext_size + iter->ublk_size + iter->group_ohdr_info.total_size + @@ -1614,27 +1615,28 @@ print_storage_summary(const iter_t *iter) iter->datasets_index_storage_size + iter->datasets_heap_storage_size + iter->SM_hdr_storage_size + iter->SM_index_storage_size + iter->SM_heap_storage_size + iter->free_hdr; - HDfprintf(stdout, " File metadata: %Hu bytes\n", total_meta); - HDfprintf(stdout, " Raw data: %Hu bytes\n", iter->dset_storage_size); + HDfprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta); + HDfprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size); percent = ((double)iter->free_space / (double)iter->filesize) * (double)100.0f; - HDfprintf(stdout, " Amount/Percent of tracked free space: %Hu bytes/%3.1f%\n", iter->free_space, - percent); + HDfprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n", + iter->free_space, percent); if (iter->filesize < (total_meta + iter->dset_storage_size + iter->free_space)) { unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize; - HDfprintf(stdout, " ??? File has %Hu more bytes accounted for than its size! ???\n", unaccount); + HDfprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n", + unaccount); } else { unaccount = iter->filesize - (total_meta + iter->dset_storage_size + iter->free_space); - HDfprintf(stdout, " Unaccounted space: %Hu bytes\n", unaccount); + HDfprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount); } - HDfprintf(stdout, "Total space: %Hu bytes\n", + HDfprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n", total_meta + iter->dset_storage_size + iter->free_space + unaccount); if (iter->nexternal) - HDfprintf(stdout, "External raw data: %Hu bytes\n", iter->dset_external_storage_size); + HDfprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size); return 0; } /* print_storage_summary() */ diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index 6fb3dfda276..ac7c0ca314c 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -358,7 +358,7 @@ main(int argc, const char *argv[]) h5tools_setstatus(EXIT_FAILURE); goto done; } - HDfprintf(stdout, "EOA is %a; EOF is %a \n", eoa, st.st_size); + HDfprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size); } /* --increment option */ diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index 88a3462f40c..ed64061fb06 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -337,7 +337,7 @@ main(int argc, char *argv[]) /* * Read the signature at the specified file position. */ - HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr); + HDfprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr); if (H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) { HDfprintf(stderr, "cannot read signature\n"); exit_value = 3; diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 30bda7b61ef..bf4b2a950c2 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -313,7 +313,7 @@ main(int argc, char **argv) VRFY((ret >= 0), "H5Dwrite dataset1 succeeded", !H5FATAL); if (ret < 0) - HDfprintf(stderr, "node %d, read error, loc = %Ld: %s\n", mynod, mynod * opt_block, + HDfprintf(stderr, "node %d, read error, loc = %" PRId64 ": %s\n", mynod, mynod * opt_block, strerror(myerrno)); /* if the user wanted to check correctness, compare the write @@ -427,7 +427,8 @@ parse_args(int argc, char **argv) if (NULL != (p = (char *)HDstrchr(optarg, '/'))) opt_threshold = (hsize_t)HDatoi(p + 1); } - HDfprintf(stdout, "alignment/threshold=%Hu/%Hu\n", opt_alignment, opt_threshold); + HDfprintf(stdout, "alignment/threshold=%" PRIuHSIZE "/%" PRIuHSIZE "\n", opt_alignment, + opt_threshold); break; case '2': /* use 2-files, i.e., split file driver */ opt_split_vfd = 1; diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h index e97af9fa88f..35a521773b4 100644 --- a/tools/test/perform/pio_standalone.h +++ b/tools/test/perform/pio_standalone.h @@ -130,12 +130,12 @@ #else /* H5_HAVE_WIN32_API */ #define HDfileno(F) fileno(F) #endif /* H5_HAVE_WIN32_API */ -#define HDfloor(X) floor(X) -#define HDfmod(X, Y) fmod(X, Y) -#define HDfopen(S, M) fopen(S, M) -#define HDfork() fork() -#define HDfpathconf(F, N) fpathconf(F, N) -H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...); +#define HDfloor(X) floor(X) +#define HDfmod(X, Y) fmod(X, Y) +#define HDfopen(S, M) fopen(S, M) +#define HDfork() fork() +#define HDfpathconf(F, N) fpathconf(F, N) +#define HDfprintf fprintf #define HDfputc(C, F) fputc(C, F) #define HDfputs(S, F) fputs(S, F) #define HDfread(M, Z, N, F) fread(M, Z, N, F) diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h index a1769626edd..d8b641206dc 100644 --- a/tools/test/perform/sio_standalone.h +++ b/tools/test/perform/sio_standalone.h @@ -145,12 +145,12 @@ #else /* H5_HAVE_WIN32_API */ #define HDfileno(F) fileno(F) #endif /* H5_HAVE_WIN32_API */ -#define HDfloor(X) floor(X) -#define HDfmod(X, Y) fmod(X, Y) -#define HDfopen(S, M) fopen(S, M) -#define HDfork() fork() -#define HDfpathconf(F, N) fpathconf(F, N) -H5_DLL int HDfprintf(FILE *stream, const char *fmt, ...); +#define HDfloor(X) floor(X) +#define HDfmod(X, Y) fmod(X, Y) +#define HDfopen(S, M) fopen(S, M) +#define HDfork() fork() +#define HDfpathconf(F, N) fpathconf(F, N) +#define HDfprintf fprintf #define HDfputc(C, F) fputc(C, F) #define HDfputs(S, F) fputs(S, F) #define HDfread(M, Z, N, F) fread(M, Z, N, F) From ac82eb70bc00763c60a570fbbf8ae09135b81280 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Apr 2021 21:12:38 +0000 Subject: [PATCH 50/66] Committing clang-format changes --- src/H5C.c | 642 +++++++++++++++++++++++++++--------------------------- 1 file changed, 321 insertions(+), 321 deletions(-) diff --git a/src/H5C.c b/src/H5C.c index 8930c75ea92..15471895ee2 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -3545,382 +3545,382 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags) HDONE_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on exit") #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_unprotect() */ + } /* H5C_unprotect() */ -/*------------------------------------------------------------------------- - * - * Function: H5C_unsettle_entry_ring - * - * Purpose: Advise the metadata cache that the specified entry's free space - * manager ring is no longer settled (if it was on entry). - * - * If the target free space manager ring is already - * unsettled, do nothing, and return SUCCEED. - * - * If the target free space manager ring is settled, and - * we are not in the process of a file shutdown, mark - * the ring as unsettled, and return SUCCEED. - * - * If the target free space manager is settled, and we - * are in the process of a file shutdown, post an error - * message, and return FAIL. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * January 3, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_unsettle_entry_ring(void *_entry) -{ - H5C_cache_entry_t *entry = (H5C_cache_entry_t *)_entry; /* Entry whose ring to unsettle */ - H5C_t * cache; /* Cache for file */ - herr_t ret_value = SUCCEED; /* Return value */ + /*------------------------------------------------------------------------- + * + * Function: H5C_unsettle_entry_ring + * + * Purpose: Advise the metadata cache that the specified entry's free space + * manager ring is no longer settled (if it was on entry). + * + * If the target free space manager ring is already + * unsettled, do nothing, and return SUCCEED. + * + * If the target free space manager ring is settled, and + * we are not in the process of a file shutdown, mark + * the ring as unsettled, and return SUCCEED. + * + * If the target free space manager is settled, and we + * are in the process of a file shutdown, post an error + * message, and return FAIL. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * January 3, 2017 + * + *------------------------------------------------------------------------- + */ + herr_t H5C_unsettle_entry_ring(void *_entry) + { + H5C_cache_entry_t *entry = (H5C_cache_entry_t *)_entry; /* Entry whose ring to unsettle */ + H5C_t * cache; /* Cache for file */ + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(FAIL) - /* Sanity checks */ - HDassert(entry); - HDassert(entry->ring != H5C_RING_UNDEFINED); - HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) || - (H5C_RING_MDFSM == entry->ring)); - cache = entry->cache_ptr; - HDassert(cache); - HDassert(cache->magic == H5C__H5C_T_MAGIC); - - switch (entry->ring) { - case H5C_RING_USER: - /* Do nothing */ - break; + /* Sanity checks */ + HDassert(entry); + HDassert(entry->ring != H5C_RING_UNDEFINED); + HDassert((H5C_RING_USER == entry->ring) || (H5C_RING_RDFSM == entry->ring) || + (H5C_RING_MDFSM == entry->ring)); + cache = entry->cache_ptr; + HDassert(cache); + HDassert(cache->magic == H5C__H5C_T_MAGIC); - case H5C_RING_RDFSM: - if (cache->rdfsm_settled) { - if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") - cache->rdfsm_settled = FALSE; - } /* end if */ - break; + switch (entry->ring) { + case H5C_RING_USER: + /* Do nothing */ + break; - case H5C_RING_MDFSM: - if (cache->mdfsm_settled) { - if (cache->flush_in_progress || cache->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") - cache->mdfsm_settled = FALSE; - } /* end if */ - break; + case H5C_RING_RDFSM: + if (cache->rdfsm_settled) { + if (cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + cache->rdfsm_settled = FALSE; + } /* end if */ + break; - default: - HDassert(FALSE); /* this should be un-reachable */ - break; - } /* end switch */ + case H5C_RING_MDFSM: + if (cache->mdfsm_settled) { + if (cache->flush_in_progress || cache->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + cache->mdfsm_settled = FALSE; + } /* end if */ + break; + + default: + HDassert(FALSE); /* this should be un-reachable */ + break; + } /* end switch */ done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_unsettle_entry_ring() */ + FUNC_LEAVE_NOAPI(ret_value) + } /* H5C_unsettle_entry_ring() */ -/*------------------------------------------------------------------------- - * Function: H5C_unsettle_ring() - * - * Purpose: Advise the metadata cache that the specified free space - * manager ring is no longer settled (if it was on entry). - * - * If the target free space manager ring is already - * unsettled, do nothing, and return SUCCEED. - * - * If the target free space manager ring is settled, and - * we are not in the process of a file shutdown, mark - * the ring as unsettled, and return SUCCEED. - * - * If the target free space manager is settled, and we - * are in the process of a file shutdown, post an error - * message, and return FAIL. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 10/15/16 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_unsettle_ring(H5F_t *f, H5C_ring_t ring) -{ - H5C_t *cache_ptr; - herr_t ret_value = SUCCEED; /* Return value */ + /*------------------------------------------------------------------------- + * Function: H5C_unsettle_ring() + * + * Purpose: Advise the metadata cache that the specified free space + * manager ring is no longer settled (if it was on entry). + * + * If the target free space manager ring is already + * unsettled, do nothing, and return SUCCEED. + * + * If the target free space manager ring is settled, and + * we are not in the process of a file shutdown, mark + * the ring as unsettled, and return SUCCEED. + * + * If the target free space manager is settled, and we + * are in the process of a file shutdown, post an error + * message, and return FAIL. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 10/15/16 + * + *------------------------------------------------------------------------- + */ + herr_t H5C_unsettle_ring(H5F_t * f, H5C_ring_t ring) + { + H5C_t *cache_ptr; + herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI(FAIL) - /* Sanity checks */ - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->cache); - HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring)); - cache_ptr = f->shared->cache; - HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic); - - switch (ring) { - case H5C_RING_RDFSM: - if (cache_ptr->rdfsm_settled) { - if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") - cache_ptr->rdfsm_settled = FALSE; - } /* end if */ - break; + /* Sanity checks */ + HDassert(f); + HDassert(f->shared); + HDassert(f->shared->cache); + HDassert((H5C_RING_RDFSM == ring) || (H5C_RING_MDFSM == ring)); + cache_ptr = f->shared->cache; + HDassert(H5C__H5C_T_MAGIC == cache_ptr->magic); + + switch (ring) { + case H5C_RING_RDFSM: + if (cache_ptr->rdfsm_settled) { + if (cache_ptr->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle") + cache_ptr->rdfsm_settled = FALSE; + } /* end if */ + break; - case H5C_RING_MDFSM: - if (cache_ptr->mdfsm_settled) { - if (cache_ptr->close_warning_received) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") - cache_ptr->mdfsm_settled = FALSE; - } /* end if */ - break; + case H5C_RING_MDFSM: + if (cache_ptr->mdfsm_settled) { + if (cache_ptr->close_warning_received) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle") + cache_ptr->mdfsm_settled = FALSE; + } /* end if */ + break; - default: - HDassert(FALSE); /* this should be un-reachable */ - break; - } /* end switch */ + default: + HDassert(FALSE); /* this should be un-reachable */ + break; + } /* end switch */ done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_unsettle_ring() */ - -/*------------------------------------------------------------------------- - * Function: H5C_validate_resize_config() - * - * Purpose: Run a sanity check on the specified sections of the - * provided instance of struct H5C_auto_size_ctl_t. - * - * Do nothing and return SUCCEED if no errors are detected, - * and flag an error and return FAIL otherwise. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: John Mainzer - * 3/23/05 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(FAIL) - - if (config_ptr == NULL) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") - - if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version") + FUNC_LEAVE_NOAPI(ret_value) + } /* H5C_unsettle_ring() */ - if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) { + /*------------------------------------------------------------------------- + * Function: H5C_validate_resize_config() + * + * Purpose: Run a sanity check on the specified sections of the + * provided instance of struct H5C_auto_size_ctl_t. + * + * Do nothing and return SUCCEED if no errors are detected, + * and flag an error and return FAIL otherwise. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: John Mainzer + * 3/23/05 + * + *------------------------------------------------------------------------- + */ + herr_t H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr, unsigned int tests) + { + herr_t ret_value = SUCCEED; /* Return value */ - if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big") + FUNC_ENTER_NOAPI(FAIL) - if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small") + if (config_ptr == NULL) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "NULL config_ptr on entry") - if (config_ptr->min_size > config_ptr->max_size) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size") + if (config_ptr->version != H5C__CURR_AUTO_SIZE_CTL_VER) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown config version") - if (config_ptr->set_initial_size && ((config_ptr->initial_size < config_ptr->min_size) || - (config_ptr->initial_size > config_ptr->max_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "initial_size must be in the interval [min_size, max_size]") + if ((tests & H5C_RESIZE_CFG__VALIDATE_GENERAL) != 0) { - if ((config_ptr->min_clean_fraction < (double)0.0f) || - (config_ptr->min_clean_fraction > (double)1.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_clean_fraction must be in the interval [0.0, 1.0]") + if (config_ptr->max_size > H5C__MAX_MAX_CACHE_SIZE) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "max_size too big") - if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small") + if (config_ptr->min_size < H5C__MIN_MAX_CACHE_SIZE) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size too small") - if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big") - } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */ + if (config_ptr->min_size > config_ptr->max_size) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_size > max_size") - if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) { - if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode") + if (config_ptr->set_initial_size && ((config_ptr->initial_size < config_ptr->min_size) || + (config_ptr->initial_size > config_ptr->max_size))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "initial_size must be in the interval [min_size, max_size]") - if (config_ptr->incr_mode == H5C_incr__threshold) { - if ((config_ptr->lower_hr_threshold < (double)0.0f) || - (config_ptr->lower_hr_threshold > (double)1.0f)) + if ((config_ptr->min_clean_fraction < (double)0.0f) || + (config_ptr->min_clean_fraction > (double)1.0f)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "lower_hr_threshold must be in the range [0.0, 1.0]") + "min_clean_fraction must be in the interval [0.0, 1.0]") - if (config_ptr->increment < (double)1.0f) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0") + if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too small") - /* no need to check max_increment, as it is a size_t, - * and thus must be non-negative. - */ - } /* H5C_incr__threshold */ + if (config_ptr->epoch_length > H5C__MAX_AR_EPOCH_LENGTH) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epoch_length too big") + } /* H5C_RESIZE_CFG__VALIDATE_GENERAL */ - switch (config_ptr->flash_incr_mode) { - case H5C_flash_incr__off: - /* nothing to do here */ - break; + if ((tests & H5C_RESIZE_CFG__VALIDATE_INCREMENT) != 0) { + if ((config_ptr->incr_mode != H5C_incr__off) && (config_ptr->incr_mode != H5C_incr__threshold)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode") - case H5C_flash_incr__add_space: - if ((config_ptr->flash_multiple < (double)0.1f) || - (config_ptr->flash_multiple > (double)10.0f)) + if (config_ptr->incr_mode == H5C_incr__threshold) { + if ((config_ptr->lower_hr_threshold < (double)0.0f) || + (config_ptr->lower_hr_threshold > (double)1.0f)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_multiple must be in the range [0.1, 10.0]") - if ((config_ptr->flash_threshold < (double)0.1f) || - (config_ptr->flash_threshold > (double)1.0f)) + "lower_hr_threshold must be in the range [0.0, 1.0]") + + if (config_ptr->increment < (double)1.0f) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "flash_threshold must be in the range [0.1, 1.0]") - break; + "increment must be greater than or equal to 1.0") - default: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode") - break; - } /* end switch */ - } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */ + /* no need to check max_increment, as it is a size_t, + * and thus must be non-negative. + */ + } /* H5C_incr__threshold */ - if ((tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0) { + switch (config_ptr->flash_incr_mode) { + case H5C_flash_incr__off: + /* nothing to do here */ + break; - if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) && - (config_ptr->decr_mode != H5C_decr__age_out) && - (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) { + case H5C_flash_incr__add_space: + if ((config_ptr->flash_multiple < (double)0.1f) || + (config_ptr->flash_multiple > (double)10.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "flash_multiple must be in the range [0.1, 10.0]") + if ((config_ptr->flash_threshold < (double)0.1f) || + (config_ptr->flash_threshold > (double)1.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "flash_threshold must be in the range [0.1, 1.0]") + break; - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode") - } + default: + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid flash_incr_mode") + break; + } /* end switch */ + } /* H5C_RESIZE_CFG__VALIDATE_INCREMENT */ - if (config_ptr->decr_mode == H5C_decr__threshold) { - if (config_ptr->upper_hr_threshold > (double)1.0f) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0") + if ((tests & H5C_RESIZE_CFG__VALIDATE_DECREMENT) != 0) { - if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]") + if ((config_ptr->decr_mode != H5C_decr__off) && (config_ptr->decr_mode != H5C_decr__threshold) && + (config_ptr->decr_mode != H5C_decr__age_out) && + (config_ptr->decr_mode != H5C_decr__age_out_with_threshold)) { - /* no need to check max_decrement as it is a size_t - * and thus must be non-negative. - */ - } /* H5C_decr__threshold */ + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid decr_mode") + } - if ((config_ptr->decr_mode == H5C_decr__age_out) || - (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) { + if (config_ptr->decr_mode == H5C_decr__threshold) { + if (config_ptr->upper_hr_threshold > (double)1.0f) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0") - if (config_ptr->epochs_before_eviction < 1) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive") - if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big") + if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]") - if ((config_ptr->apply_empty_reserve) && - ((config_ptr->empty_reserve > (double)1.0f) || (config_ptr->empty_reserve < (double)0.0f))) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]") + /* no need to check max_decrement as it is a size_t + * and thus must be non-negative. + */ + } /* H5C_decr__threshold */ - /* no need to check max_decrement as it is a size_t - * and thus must be non-negative. - */ - } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */ + if ((config_ptr->decr_mode == H5C_decr__age_out) || + (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) { - if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) { - if ((config_ptr->upper_hr_threshold > (double)1.0f) || - (config_ptr->upper_hr_threshold < (double)0.0f)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "upper_hr_threshold must be in the interval [0.0, 1.0]") - } /* H5C_decr__age_out_with_threshold */ - } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */ - - if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) { - if ((config_ptr->incr_mode == H5C_incr__threshold) && - ((config_ptr->decr_mode == H5C_decr__threshold) || - (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) && - (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config") - } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */ + if (config_ptr->epochs_before_eviction < 1) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction must be positive") + if (config_ptr->epochs_before_eviction > H5C__MAX_EPOCH_MARKERS) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big") -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* H5C_validate_resize_config() */ + if ((config_ptr->apply_empty_reserve) && ((config_ptr->empty_reserve > (double)1.0f) || + (config_ptr->empty_reserve < (double)0.0f))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "empty_reserve must be in the interval [0.0, 1.0]") -/*------------------------------------------------------------------------- - * Function: H5C_create_flush_dependency() - * - * Purpose: Initiates a parent<->child entry flush dependency. The parent - * entry must be pinned or protected at the time of call, and must - * have all dependencies removed before the cache can shut down. - * - * Note: Flush dependencies in the cache indicate that a child entry - * must be flushed to the file before its parent. (This is - * currently used to implement Single-Writer/Multiple-Reader (SWMR) - * I/O access for data structures in the file). - * - * Creating a flush dependency between two entries will also pin - * the parent entry. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * 3/05/09 - * - *------------------------------------------------------------------------- - */ -herr_t -H5C_create_flush_dependency(void *parent_thing, void *child_thing) -{ - H5C_t * cache_ptr; - H5C_cache_entry_t *parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ - H5C_cache_entry_t *child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */ - herr_t ret_value = SUCCEED; /* Return value */ + /* no need to check max_decrement as it is a size_t + * and thus must be non-negative. + */ + } /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */ - FUNC_ENTER_NOAPI(FAIL) + if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) { + if ((config_ptr->upper_hr_threshold > (double)1.0f) || + (config_ptr->upper_hr_threshold < (double)0.0f)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "upper_hr_threshold must be in the interval [0.0, 1.0]") + } /* H5C_decr__age_out_with_threshold */ + } /* H5C_RESIZE_CFG__VALIDATE_DECREMENT */ + + if ((tests & H5C_RESIZE_CFG__VALIDATE_INTERACTIONS) != 0) { + if ((config_ptr->incr_mode == H5C_incr__threshold) && + ((config_ptr->decr_mode == H5C_decr__threshold) || + (config_ptr->decr_mode == H5C_decr__age_out_with_threshold)) && + (config_ptr->lower_hr_threshold >= config_ptr->upper_hr_threshold)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "conflicting threshold fields in config") + } /* H5C_RESIZE_CFG__VALIDATE_INTERACTIONS */ - /* Sanity checks */ - HDassert(parent_entry); - HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(H5F_addr_defined(parent_entry->addr)); - HDassert(child_entry); - HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(H5F_addr_defined(child_entry->addr)); - cache_ptr = parent_entry->cache_ptr; - HDassert(cache_ptr); - HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); - HDassert(cache_ptr == child_entry->cache_ptr); -#ifndef NDEBUG - /* Make sure the parent is not already a parent */ - { - unsigned u; +done: + FUNC_LEAVE_NOAPI(ret_value) + } /* H5C_validate_resize_config() */ - for (u = 0; u < child_entry->flush_dep_nparents; u++) - HDassert(child_entry->flush_dep_parent[u] != parent_entry); - } /* end block */ -#endif /* NDEBUG */ + /*------------------------------------------------------------------------- + * Function: H5C_create_flush_dependency() + * + * Purpose: Initiates a parent<->child entry flush dependency. The parent + * entry must be pinned or protected at the time of call, and must + * have all dependencies removed before the cache can shut down. + * + * Note: Flush dependencies in the cache indicate that a child entry + * must be flushed to the file before its parent. (This is + * currently used to implement Single-Writer/Multiple-Reader (SWMR) + * I/O access for data structures in the file). + * + * Creating a flush dependency between two entries will also pin + * the parent entry. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * 3/05/09 + * + *------------------------------------------------------------------------- + */ + herr_t H5C_create_flush_dependency(void *parent_thing, void *child_thing) + { + H5C_t * cache_ptr; + H5C_cache_entry_t *parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */ + H5C_cache_entry_t *child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */ + herr_t ret_value = SUCCEED; /* Return value */ - /* More sanity checks */ - if (child_entry == parent_entry) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Child entry flush dependency parent can't be itself") - if (!(parent_entry->is_protected || parent_entry->is_pinned)) - HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected") + FUNC_ENTER_NOAPI(FAIL) - /* Check for parent not pinned */ - if (!parent_entry->is_pinned) { - /* Sanity check */ - HDassert(parent_entry->flush_dep_nchildren == 0); - HDassert(!parent_entry->pinned_from_client); - HDassert(!parent_entry->pinned_from_cache); + /* Sanity checks */ + HDassert(parent_entry); + HDassert(parent_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(H5F_addr_defined(parent_entry->addr)); + HDassert(child_entry); + HDassert(child_entry->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(H5F_addr_defined(child_entry->addr)); + cache_ptr = parent_entry->cache_ptr; + HDassert(cache_ptr); + HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC); + HDassert(cache_ptr == child_entry->cache_ptr); +#ifndef NDEBUG + /* Make sure the parent is not already a parent */ + { + unsigned u; + + for (u = 0; u < child_entry->flush_dep_nparents; u++) + HDassert(child_entry->flush_dep_parent[u] != parent_entry); + } /* end block */ +#endif /* NDEBUG */ + + /* More sanity checks */ + if (child_entry == parent_entry) + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, + "Child entry flush dependency parent can't be itself") + if (!(parent_entry->is_protected || parent_entry->is_pinned)) + HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Parent entry isn't pinned or protected") + + /* Check for parent not pinned */ + if (!parent_entry->is_pinned) { + /* Sanity check */ + HDassert(parent_entry->flush_dep_nchildren == 0); + HDassert(!parent_entry->pinned_from_client); + HDassert(!parent_entry->pinned_from_cache); - /* Pin the parent entry */ - parent_entry->is_pinned = TRUE; - H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry) - } /* end else */ + /* Pin the parent entry */ + parent_entry->is_pinned = TRUE; + H5C__UPDATE_STATS_FOR_PIN(cache_ptr, parent_entry) + } /* end else */ - /* Mark the entry as pinned from the cache's action (possibly redundantly) */ - parent_entry->pinned_from_cache = TRUE; + /* Mark the entry as pinned from the cache's action (possibly redundantly) */ + parent_entry->pinned_from_cache = TRUE; - /* Check if we need to resize the child's parent array */ - if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) { - if (child_entry->flush_dep_parent_nalloc == 0) { - /* Array does not exist yet, allocate it */ - HDassert(!child_entry->flush_dep_parent); + /* Check if we need to resize the child's parent array */ + if (child_entry->flush_dep_nparents >= child_entry->flush_dep_parent_nalloc) { + if (child_entry->flush_dep_parent_nalloc == 0) { + /* Array does not exist yet, allocate it */ + HDassert(!child_entry->flush_dep_parent); if (NULL == (child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_MALLOC( parent, H5C_FLUSH_DEP_PARENT_INIT * sizeof(H5C_cache_entry_t *)))) From 2ec49e0d5e02a45a75b53c4625cfb2599acfac0b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Apr 2021 16:24:49 -0500 Subject: [PATCH 51/66] Add time struct --- src/H5Tdbg.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/H5Tdbg.c b/src/H5Tdbg.c index 1da0121ac14..613aa603a8d 100644 --- a/src/H5Tdbg.c +++ b/src/H5Tdbg.c @@ -91,6 +91,13 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i if (H5DEBUG(T) && path->stats.ncalls > 0) { hsize_t nbytes; char bandwidth[32]; + struct { + char *user; + char *system; + char *elapsed; + } timestrs = {H5_timer_get_time_string(path->stats.times.user), + H5_timer_get_time_string(path->stats.times.system), + H5_timer_get_time_string(path->stats.times.elapsed)}; if (nprint && 0 == (*nprint)++) { HDfprintf(H5DEBUG(T), "H5T: type conversion statistics:\n"); @@ -108,12 +115,14 @@ H5T__print_stats(H5T_path_t H5_ATTR_UNUSED *path, int H5_ATTR_UNUSED *nprint /*i nbytes = H5T_get_size(path->dst); else nbytes = 0; - nbytes *= path->stats.nelmts; H5_bandwidth(bandwidth, (double)nbytes, path->stats.times.elapsed); HDfprintf(H5DEBUG(T), " %-16s %10" PRIdHSIZE " %10u %8s %8s %8s %10s\n", path->name, path->stats.nelmts, path->stats.ncalls, timestrs.user, timestrs.system, timestrs.elapsed, bandwidth); + HDfree(timestrs.user); + HDfree(timestrs.system); + HDfree(timestrs.elapsed); } #endif From ae7ea503b8bb8a109b2055744c3fd8287e18cee8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 7 May 2021 14:10:57 -0500 Subject: [PATCH 52/66] TRILAB-227 and tools debug merges from develop --- src/CMakeLists.txt | 14 ++- tools/lib/h5diff.c | 8 +- tools/lib/h5diff_array.c | 185 ++++++++++++++--------------- tools/lib/h5diff_dset.c | 2 +- tools/lib/h5diff_util.c | 4 +- tools/lib/h5tools.c | 38 +++--- tools/lib/h5tools_dump.c | 60 +++++----- tools/lib/h5tools_str.c | 14 +-- tools/src/h5ls/h5ls.c | 16 +-- tools/test/h5diff/CMakeTests.cmake | 2 +- tools/test/h5diff/testh5diff.sh.in | 2 +- 11 files changed, 172 insertions(+), 173 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b04fcb12bdf..0613cf3edec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1321,8 +1321,8 @@ endif () # Option to build documentation #----------------------------------------------------------------------------- if (DOXYGEN_FOUND) - set (DOXYGEN_PACKAGE ${HDF5_PACKAGE}) - set (DOXYGEN_VERSION_STRING ${HDF5_VERSION_STRING}) + set (DOXYGEN_PACKAGE ${HDF5_PACKAGE_NAME}) + set (DOXYGEN_VERSION_STRING ${HDF5_PACKAGE_VERSION_STRING}) set (DOXYGEN_INCLUDE_ALIASES_PATH ${HDF5_DOXYGEN_DIR}) set (DOXYGEN_INCLUDE_ALIASES aliases) set (DOXYGEN_VERBATIM_VARS DOXYGEN_INCLUDE_ALIASES) @@ -1332,7 +1332,15 @@ if (DOXYGEN_FOUND) set (DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) set (DOXYGEN_MACRO_EXPANSION YES) set (DOXYGEN_OUTPUT_DIRECTORY ${HDF5_BINARY_DIR}/hdf5lib_docs) - set (DOXYGEN_EXAMPLES_DIRECTORY ${HDF5_DOXYGEN_DIR}/examples) + set (DOXYGEN_EXAMPLES_DIRECTORY "${HDF5_DOXYGEN_DIR}/examples ${HDF5_SRC_DIR} ${HDF5_SOURCE_DIR}/examples ${HDF5_TEST_SRC_DIR}") + set (DOXYGEN_LAYOUT_FILE ${HDF5_DOXYGEN_DIR}/hdf5doxy_layout.xml) + set (DOXYGEN_HTML_HEADER ${HDF5_DOXYGEN_DIR}/hdf5_header.html) + set (DOXYGEN_HTML_FOOTER ${HDF5_DOXYGEN_DIR}/hdf5_footer.html) + set (DOXYGEN_HTML_EXTRA_STYLESHEET ${HDF5_DOXYGEN_DIR}/hdf5doxy.css) + set (DOXYGEN_HTML_EXTRA_FILES "${HDF5_DOXYGEN_DIR}/hdf5_navtree_hacks.js ${HDF5_DOXYGEN_DIR}/img/ftv2node.png ${HDF5_DOXYGEN_DIR}/img/ftv2pnode.png") + set (DOXYGEN_SERVER_BASED_SEARCH NO) + set (DOXYGEN_EXTERNAL_SEARCH NO) + set (DOXYGEN_SEARCHENGINE_URL) # This configure and custom target work together # Replace variables inside @@ with the current values diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index d55b60574ed..15ad48319a9 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -451,7 +451,7 @@ build_match_list(const char *objname1, trav_info_t *info1, const char *objname2, done: *table_out = table; - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -483,7 +483,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata) const char * ext_path; herr_t ret_value = SUCCEED; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* init linkinfo struct */ HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t)); @@ -567,7 +567,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata) done: if (lnk_info.trg_path) HDfree(lnk_info.trg_path); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -615,7 +615,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char trav_table_t *match_list = NULL; diff_err_t ret_value = H5DIFF_NO_ERR; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* init filenames */ HDmemset(filenames, 0, MAX_FILENAME * 2); /* init link info struct */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 46dcf7fa615..c79dd7e5af5 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -225,7 +225,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ mcomp_t members; H5T_class_t type_class; - H5TOOLS_START_DEBUG(" - rank:%d hs_nelmts:%ld errstat:%d", opts->rank, opts->hs_nelmts, opts->err_stat); + H5TOOLS_START_DEBUG(" - rank:%d hs_nelmts:%lld errstat:%d", opts->rank, opts->hs_nelmts, opts->err_stat); opts->print_header = 1; /* enable print header */ /* get the size. */ @@ -411,7 +411,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ HDmemset(&members, 0, sizeof(mcomp_t)); get_member_types(opts->m_tid, &members); for (i = 0; i < opts->hs_nelmts; i++) { - H5TOOLS_DEBUG("opts->pos[%ld]:%ld - nelmts:%ld", i, opts->pos[i], opts->hs_nelmts); + H5TOOLS_DEBUG("opts->pos[%lld]:%lld - nelmts:%lld", i, opts->pos[i], opts->hs_nelmts); nfound += diff_datum(mem1 + i * size, mem2 + i * size, i, opts, container1_id, container2_id, &members); if (opts->count_bool && nfound >= opts->count) @@ -419,7 +419,7 @@ diff_array(void *_mem1, void *_mem2, diff_opt_t *opts, hid_t container1_id, hid_ } /* i */ close_member_types(&members); } /* switch */ - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -475,7 +475,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co hsize_t nfound = 0; /* differences found */ diff_err_t ret_value = opts->err_stat; - H5TOOLS_START_DEBUG("ph:%d elemtno:%d - errstat:%d", opts->print_header, elemtno, opts->err_stat); + H5TOOLS_START_DEBUG("ph:%d elemtno:%lld - errstat:%d", opts->print_header, elemtno, opts->err_stat); type_size = H5Tget_size(opts->m_tid); type_class = H5Tget_class(opts->m_tid); @@ -593,8 +593,8 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co * of length of strings. * For now mimic the previous way. */ - H5TOOLS_DEBUG("string size:%d", size1); - H5TOOLS_DEBUG("string size:%d", size2); + H5TOOLS_DEBUG("string size:%ld", size1); + H5TOOLS_DEBUG("string size:%ld", size2); if (size1 != size2) { H5TOOLS_DEBUG("string sizes difference"); nfound++; @@ -725,7 +725,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co H5TOOLS_DEBUG("H5T_ARRAY ph=%d", opts->print_header); arr_opts = *opts; - H5TOOLS_DEBUG("Check opts: hs_nelmts:%ld to %ld rank:%d to %ld", opts->hs_nelmts, + H5TOOLS_DEBUG("Check opts: hs_nelmts:%lld to %lld rank:%d to %d", opts->hs_nelmts, arr_opts.hs_nelmts, opts->rank, arr_opts.rank); /* get the array's base datatype for each element */ arr_opts.m_tid = H5Tget_super(opts->m_tid); @@ -1064,7 +1064,7 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co done: opts->err_stat = opts->err_stat | ret_value; - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -1156,7 +1156,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di hsize_t nfound_p = 0; /* point differences found */ hsize_t ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); ndims1 = H5Sget_simple_extent_ndims(region1_id); ndims2 = H5Sget_simple_extent_ndims(region2_id); @@ -1175,8 +1175,8 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di npoints2 = H5Sget_select_elem_npoints(region2_id); } H5E_END_TRY; - H5TOOLS_DEBUG("blocks: 1=%ld-2=%ld", nblocks1, nblocks2); - H5TOOLS_DEBUG("points: 1=%ld-2=%ld", npoints1, npoints2); + H5TOOLS_DEBUG("blocks: 1=%lld-2=%lld", nblocks1, nblocks2); + H5TOOLS_DEBUG("points: 1=%lld-2=%lld", npoints1, npoints2); if (nblocks1 != nblocks2 || npoints1 != npoints2 || ndims1 != ndims2) { opts->not_cmp = 1; @@ -1332,7 +1332,7 @@ diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t region2_id, di ret_value = nfound_p + nfound_b; done: - H5TOOLS_ENDDEBUG(" with diffs:%d", ret_value); + H5TOOLS_ENDDEBUG(" with diffs:%lld", ret_value); return ret_value; } @@ -1369,7 +1369,7 @@ character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t } nfound++; } - H5TOOLS_ENDDEBUG(": %d", nfound); + H5TOOLS_ENDDEBUG(": %lld", nfound); return nfound; } @@ -1440,7 +1440,7 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno, nfound++; } - H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero); + H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero); return nfound; } @@ -1621,7 +1621,7 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d } } - H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero); + H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero); return nfound; } @@ -1792,7 +1792,7 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, nfound++; } } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -1967,7 +1967,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2056,7 +2056,7 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2144,7 +2144,7 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2232,7 +2232,7 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2324,7 +2324,7 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2412,7 +2412,7 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2500,7 +2500,7 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2588,7 +2588,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2678,7 +2678,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d nfound++; } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2771,7 +2771,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d } } - H5TOOLS_ENDDEBUG(":%d - errstat:%d", nfound, opts->err_stat); + H5TOOLS_ENDDEBUG(":%lld - errstat:%d", nfound, opts->err_stat); return nfound; } @@ -2871,7 +2871,7 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, } } - H5TOOLS_ENDDEBUG(": %d zero:%d", nfound, both_zero); + H5TOOLS_ENDDEBUG(": %lld zero:%d", nfound, both_zero); return nfound; } @@ -2890,7 +2890,7 @@ ull2float(unsigned long long ull_value, float *f_value) size_t dst_size; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) H5TOOLS_GOTO_ERROR(FAIL, "H5Pcreate failed"); @@ -2917,7 +2917,7 @@ ull2float(unsigned long long ull_value, float *f_value) if (buf) HDfree(buf); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -3119,96 +3119,87 @@ print_header(diff_opt_t *opts) static void print_pos(diff_opt_t *opts, hsize_t idx, size_t u) { - int i, j; - - H5TOOLS_START_DEBUG(" -- idx:%ld", idx); + H5TOOLS_START_DEBUG(" -- idx:%lld", idx); if (print_data(opts)) { + hsize_t curr_pos = idx; /* print header */ if (opts->print_header == 1) { opts->print_header = 0; - print_header(opts); } /* end print header */ H5TOOLS_DEBUG("rank=%d", opts->rank); if (opts->rank > 0) { - hsize_t curr_pos = idx; - parallel_print("[ "); - H5TOOLS_DEBUG("do calc_acc_pos[%ld] nelmts:%d - errstat:%d", idx, opts->hs_nelmts, + H5TOOLS_DEBUG("do calc_acc_pos[%lld] nelmts:%lld - errstat:%d", idx, opts->hs_nelmts, opts->err_stat); - if (opts->sset[0] != NULL) { /* Subsetting is used - calculate total position */ - hsize_t prev_dim_size = 0; /* previous dim size */ - hsize_t prev_str = 0; /* previouw stride idx*/ - hsize_t str_cnt = 0; /* stride multiplier*/ - hsize_t curr_idx = 0; /* calculated running position */ - hsize_t str_idx = 0; - hsize_t blk_idx = 0; - hsize_t cnt_idx = 0; - hsize_t dim_size = 0; /* current dim size */ - hsize_t elmnt_cnt = 1; - hsize_t next_idx = idx; - hsize_t data_idx = 0; - j = opts->rank - 1; - H5TOOLS_DEBUG("...begin:%ld=> opts->rank:%ld (idx:%ld)", j, opts->rank, idx); - do { - curr_idx = next_idx; /* New current data position */ - cnt_idx = opts->sset[0]->count.data[j]; /* Count value for current dim */ - blk_idx = opts->sset[0]->block.data[j]; /* Block value for current dim */ - str_idx = opts->sset[0]->stride.data[j]; /* Stride value for current dim */ - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (curr_idx:%ld) - c:%ld b:%ld s:%ld", j, - curr_pos, curr_idx, cnt_idx, blk_idx, str_idx); - dim_size = opts->dims[j]; /* Current dimension size */ - H5TOOLS_DEBUG("... sset loop:%d with elmnt_cnt:%ld - (prev_dim_size:%ld - dim_size:%ld) " - "- str_cnt:%ld", - j, elmnt_cnt, prev_dim_size, dim_size, str_cnt); - data_idx = elmnt_cnt * dim_size; - H5TOOLS_DEBUG("... sset loop:%d with curr_pos:%ld (data_idx:%ld)", j, curr_pos, data_idx); - for (i = 0; i < cnt_idx; i++) { - H5TOOLS_DEBUG("... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld (curr_idx:%ld - " - "data_idx:%ld)", - i, cnt_idx, str_cnt, curr_idx, data_idx); - if (curr_idx >= data_idx) { - /* get to next block */ - data_idx += str_idx * dim_size; - /* get next block */ - str_cnt++; - H5TOOLS_DEBUG( - "... ... data loop:%d with cnt_idx:%ld - str_cnt:%ld - data_idx:%ld", i, - cnt_idx, str_cnt, data_idx); - } - H5TOOLS_DEBUG("... ... end data loop:%d with dim_cnt:%ld - str_cnt:%ld - " - "(curr_idx:%ld - data_idx:%ld)", - i, dim_size, str_cnt, curr_idx, data_idx); + hsize_t curr_idx = 0; /* current pos in the selection space for each dimension */ + + curr_pos = 0; /* current position in full space */ + if (curr_idx < idx) { + int j; + hsize_t count; + hsize_t block; + hsize_t stride; + hsize_t tmp = 0; + hsize_t k0 = 0; /* whole location beyond current dimension */ + hsize_t k1 = 0; /* partial location within dimension */ + hsize_t dim_size = 0; /* previous dim size */ + hsize_t prev_dim_size = 0; /* previous dim size */ + hsize_t total_dim_size = 1; /* current dim size */ + hsize_t prev_total_dim_size = 1; /* current dim size */ + + prev_dim_size = 1; + total_dim_size = 1; + curr_idx = idx; + /* begin with fastest changing dimension */ + for (int i = 0; i < opts->rank; i++) { + j = opts->rank - i - 1; + prev_total_dim_size *= prev_dim_size; + dim_size = opts->dims[j]; + H5TOOLS_DEBUG("j=%d, dim_size=%lld, prev_dim_size=%lld, total_dim_size=%lld, " + "prev_total_dim_size=%lld", + j, dim_size, prev_dim_size, total_dim_size, prev_total_dim_size); + count = opts->sset[0]->count.data[j]; + block = opts->sset[0]->block.data[j]; + stride = opts->sset[0]->stride.data[j]; + H5TOOLS_DEBUG("stride=%lld, count=%lld, block=%lld", stride, count, block); + tmp = count * block; + k0 = curr_idx / tmp; + k1 = curr_idx % tmp; + curr_pos += k1 * stride * prev_total_dim_size; + H5TOOLS_DEBUG("curr_idx=%lld, k0=%lld, k1=%lld, curr_pos=%lld", curr_idx, k0, k1, + curr_pos); + if (k0 > 0) + curr_idx = k0 * total_dim_size; + H5TOOLS_DEBUG("curr_idx=%lld, tmp=%lld", curr_idx, tmp); + total_dim_size *= dim_size; + /* if last calculation exists within in current dimension */ + if (k0 == 0) + break; + H5TOOLS_DEBUG("j=%d, curr_pos=%lld", j, curr_pos); + prev_dim_size = dim_size; } - next_idx += dim_size * str_cnt; - H5TOOLS_DEBUG("... sset loop:%d with curr_idx:%ld (next_idx:%ld)", j, curr_idx, next_idx); - str_cnt = 0; - prev_str = str_idx; - prev_dim_size = dim_size; - H5TOOLS_DEBUG("... end sset loop:%d with prev_dim_size:%ld (curr_idx:%ld - data_idx:%ld) " - "- str_cnt:%ld", - j, prev_dim_size, curr_idx, data_idx, str_cnt); - elmnt_cnt *= dim_size; /* Total number of elements in dimension */ - j--; - } while (next_idx >= elmnt_cnt && j >= 0); - curr_pos = curr_idx; /* New current position */ - H5TOOLS_DEBUG("pos loop:%d,%d with elmnt_cnt:%ld - curr_pos:%ld", i, j, elmnt_cnt, curr_pos); - } /* if (opts->sset[0] != NULL) */ + /* check if there is a final calculation needed for slowest changing dimension */ + if (k0 > 0) + curr_pos += k0 * stride * prev_total_dim_size; + H5TOOLS_DEBUG("4:curr_idx=%lld, curr_pos=%lld", curr_idx, curr_pos); + } + } /* * Calculate the number of elements represented by a unit change in a * certain index position. */ calc_acc_pos((unsigned)opts->rank, curr_pos, opts->acc, opts->pos); - for (i = 0; i < opts->rank; i++) { - H5TOOLS_DEBUG("pos loop:%d with opts->pos=%ld opts->sm_pos=%ld", i, opts->pos[i], + for (int i = 0; i < opts->rank; i++) { + H5TOOLS_DEBUG("pos loop:%d with opts->pos=%lld opts->sm_pos=%lld", i, opts->pos[i], opts->sm_pos[i]); opts->pos[i] += (unsigned long)opts->sm_pos[i]; - H5TOOLS_DEBUG("pos loop:%d with opts->pos=%ld", i, opts->pos[i]); + H5TOOLS_DEBUG("pos loop:%d with opts->pos=%lld", i, opts->pos[i]); parallel_print(HSIZE_T_FORMAT, (unsigned long long)opts->pos[i]); parallel_print(" "); } @@ -3227,7 +3218,7 @@ print_pos(diff_opt_t *opts, hsize_t idx, size_t u) parallel_print(SPACES); } - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 8de2b117966..0e276fc6e02 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -949,7 +949,7 @@ diff_can_type(hid_t f_tid1, hid_t f_tid2, int rank1, int rank2, hsize_t *dims1, int i; int ret_value = 1; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /*------------------------------------------------------------------------- * check for the same class *------------------------------------------------------------------------- diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 3e248027f62..e487a12fad9 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -339,7 +339,7 @@ match_up_memsize(hid_t f_tid1_id, hid_t f_tid2_id, hid_t *m_tid1, hid_t *m_tid2, { herr_t ret_value = SUCCEED; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((*m_size1) != (*m_size2)) { if ((*m_size1) < (*m_size2)) { H5Tclose(*m_tid1); @@ -362,6 +362,6 @@ match_up_memsize(hid_t f_tid1_id, hid_t f_tid2_id, hid_t *m_tid1, hid_t *m_tid2, H5TOOLS_GOTO_ERROR(FAIL, "native type sizes do not compare"); done: - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 7ee4678bd12..bc4ac360463 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -950,7 +950,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context if (!ctx->need_prefix) return; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); HDmemset(&prefix, 0, sizeof(h5tools_str_t)); HDmemset(&str, 0, sizeof(h5tools_str_t)); @@ -1019,7 +1019,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context h5tools_str_close(&prefix); h5tools_str_close(&str); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -1265,7 +1265,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex ctx->prev_multiline = multiline; - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return dimension_break; } @@ -1306,7 +1306,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools int secnum; /* section sequence number */ int multiline; /* datum was multiline */ - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); H5TOOLS_DEBUG("elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter); s = h5tools_str_fmt(buffer, (size_t)0, "%s"); @@ -1419,7 +1419,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools ctx->prev_multiline = multiline; - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return dimension_break; } @@ -1438,7 +1438,7 @@ init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos, hs int i; unsigned j; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); for (i = 0; (unsigned)i < ndims; i++) p_min_idx[i] = 0; @@ -1453,7 +1453,7 @@ init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos, hs pos[j] = 0; } - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -1471,7 +1471,7 @@ calc_acc_pos(unsigned ndims, hsize_t elmtno, const hsize_t *acc, hsize_t *pos) int i; hsize_t curr_pos = elmtno; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if (ndims > 0) { for (i = 0; i < (int)ndims; i++) { @@ -1486,7 +1486,7 @@ calc_acc_pos(unsigned ndims, hsize_t elmtno, const hsize_t *acc, hsize_t *pos) } } - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return curr_pos; } @@ -1510,7 +1510,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t hbool_t past_catch = FALSE; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((size = H5Tget_size(tid)) == 0) H5TOOLS_THROW((-1), "H5Tget_size failed"); @@ -1717,7 +1717,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t } /* end switch */ CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1750,7 +1750,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai hid_t sid1 = H5I_INVALID_HID; int ret_value = -1; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* Get the dataspace of the dataset */ if ((sid1 = H5Dget_space(region_id)) < 0) H5TOOLS_THROW((-1), "H5Dget_space failed"); @@ -1816,7 +1816,7 @@ done:; if (H5Sclose(sid1) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1844,7 +1844,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea hbool_t past_catch = FALSE; hbool_t ret_value = TRUE; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0) H5TOOLS_THROW(FALSE, "H5Sget_select_hyper_nblocks failed"); nblocks = (hsize_t)snblocks; @@ -1880,7 +1880,7 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea H5_LEAVE(TRUE) CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1911,7 +1911,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE * void * region_buf = NULL; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((type_size = H5Tget_size(type_id)) == 0) H5TOOLS_GOTO_ERROR((-1), "H5Tget_size failed"); @@ -1941,7 +1941,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE * if (H5Sclose(mem_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1967,7 +1967,7 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea hbool_t past_catch = FALSE; hbool_t ret_value = TRUE; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0) H5TOOLS_THROW(FALSE, "H5Sget_select_elem_npoints failed"); npoints = (hsize_t)snpoints; @@ -1994,7 +1994,7 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea H5_LEAVE(ret_value) CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 493df395181..fb0353f88e7 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -465,7 +465,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -522,7 +522,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for HDmemset(&ctx, 0, sizeof(ctx)); - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((type_size = H5Tget_size(type_id)) == 0) H5TOOLS_THROW(FAIL, "H5Tget_size failed"); @@ -642,7 +642,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for if (H5Sclose(sid1) < 0) H5TOOLS_ERROR(FAIL, "H5Sclose failed"); CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -696,7 +696,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea HDassert(ctx); HDassert(buffer); - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); outputformat = *info; outputformat.idx_fmt = ""; outputformat.idx_n_fmt = ""; @@ -865,7 +865,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -915,7 +915,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre HDassert(ptdata); HDassert(ndims > 0); - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); HDmemset(&ctx, 0, sizeof(ctx)); /* Allocate space for the dimension array */ @@ -1001,7 +1001,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre if (H5Sclose(mem_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1053,7 +1053,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea HDassert(ctx); HDassert(buffer); - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); outputformat = *info; outputformat.idx_fmt = ""; outputformat.idx_n_fmt = ""; @@ -1217,7 +1217,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea H5_LEAVE(dimension_break) CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1284,7 +1284,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c unsigned int vl_data = 0; /* contains VL datatypes */ herr_t ret_value = SUCCEED; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((size_t)ctx->ndims > NELMTS(sm_size)) H5TOOLS_THROW(FAIL, "ndims and sm_size comparision failed"); @@ -1398,7 +1398,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c if (sm_buf) HDfree(sm_buf); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1583,7 +1583,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co hbool_t past_catch = FALSE; herr_t ret_value = SUCCEED; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((f_space = H5Dget_space(dset)) < 0) H5TOOLS_THROW(FAIL, "H5Dget_space failed"); @@ -1607,7 +1607,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co if (f_space >= 0 && H5Sclose(f_space) < 0) H5TOOLS_THROW(FAIL, "H5Sclose failed"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1660,7 +1660,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont unsigned int vl_data = 0; /* contains VL datatypes */ int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if (H5I_INVALID_HID == (f_space = H5Dget_space(dset))) H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed"); @@ -1795,7 +1795,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont if (f_space >= 0 && H5Sclose(f_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1826,7 +1826,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte /* VL data special information */ unsigned int vl_data = 0; /* contains VL datatypes */ - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if (H5I_INVALID_HID == (f_space = H5Aget_space(attr_id))) H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed"); @@ -1885,7 +1885,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte if (f_space >= 0 && H5Sclose(f_space) < 0) H5TOOLS_ERROR((-1), "H5Sclose failed"); CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1917,7 +1917,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t * h5tool_format_t info_dflt; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* Use default values */ if (!stream) stream = rawoutstream; @@ -1969,7 +1969,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t * if (f_space > 0) H5Sclose(f_space); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -1993,7 +1993,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c h5tool_format_t info_dflt; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* Use default values */ if (!stream) stream = rawoutstream; @@ -2039,7 +2039,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c if (f_space > 0) H5Sclose(f_space); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -2082,7 +2082,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ const char *order_s = NULL; /* byte order string */ int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((type_class = H5Tget_class(type)) < 0) H5TOOLS_THROW((-1), "H5Tget_class failed"); if (object_search && H5Tcommitted(type) > 0) { @@ -2633,7 +2633,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ } CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -2659,7 +2659,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space) int i; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((ndims = H5Sget_simple_extent_dims(space, size, maxsize)) < 0) H5TOOLS_THROW((-1), "H5Sget_simple_extent_dims failed"); @@ -2713,7 +2713,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space) } /* end switch */ CATCH - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -2748,7 +2748,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i hbool_t past_catch = FALSE; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if (info->line_ncols > 0) ncols = info->line_ncols; @@ -2860,7 +2860,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i if (0 == nmembs) h5tools_str_append(buffer, "\n"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return ret_value; } @@ -4043,7 +4043,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex h5tools_str_t buffer; /* string into which to render */ h5tools_context_t datactx; /* print context */ - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); datactx = *ctx; /* print context */ /* Assume entire data space to be printed */ @@ -4115,7 +4115,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex h5tools_str_close(&buffer); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -4332,5 +4332,5 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t * } h5tools_str_close(&buffer); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 9f76f8e5352..3102d92a884 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -287,7 +287,7 @@ h5tools_str_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *info, h { size_t i = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims); h5tools_str_reset(str); @@ -306,7 +306,7 @@ h5tools_str_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t *info, h h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)elmtno); H5TOOLS_DEBUG("str=%s", str->s); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); /* Add prefix and suffix to the index */ return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: ")); @@ -327,7 +327,7 @@ h5tools_str_region_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t * { size_t i = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); H5TOOLS_DEBUG("elmtno=%ld, ctx->ndims=%d", elmtno, ctx->ndims); h5tools_str_reset(str); @@ -347,7 +347,7 @@ h5tools_str_region_prefix(h5tools_str_t *str /*in,out*/, const h5tool_format_t * h5tools_str_append(str, OPT(info->idx_n_fmt, HSIZE_T_FORMAT), (hsize_t)0); H5TOOLS_DEBUG("str=%s", str->s); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); /* Add prefix and suffix to the index */ return h5tools_str_fmt(str, (size_t)0, OPT(info->idx_fmt, "%s: ")); @@ -657,7 +657,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai H5T_class_t type_class; char * ret_value = NULL; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* Build default formats for long long types */ if (!fmt_llong[0]) { HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH); @@ -1271,7 +1271,7 @@ h5tools_str_sprint_reference(h5tools_str_t *str, hid_t container, void *vp) char ref_name[1024]; const char *path; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); h5tools_str_append(str, " \""); obj = H5Rdereference2(container, H5P_DEFAULT, H5R_DATASET_REGION, vp); @@ -1294,7 +1294,7 @@ h5tools_str_sprint_reference(h5tools_str_t *str, hid_t container, void *vp) } h5tools_str_append(str, "\""); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 97e98f22629..fcd403ec931 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -1304,7 +1304,7 @@ dump_dataset_values(hid_t dset) h5tool_format_t * info = &ls_dataformat; unsigned char * region_buf = NULL; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); f_type = H5Dget_type(dset); space = H5Dget_space(dset); @@ -1444,7 +1444,7 @@ dump_dataset_values(hid_t dset) PRINTVALSTREAM(rawoutstream, "\n"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -1473,7 +1473,7 @@ dump_attribute_values(hid_t attr) h5tool_format_t * info = &ls_dataformat; unsigned char * region_buf = NULL; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); f_type = H5Aget_type(attr); space = H5Aget_space(attr); @@ -1620,7 +1620,7 @@ dump_attribute_values(hid_t attr) PRINTVALSTREAM(rawoutstream, "\n"); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -1649,7 +1649,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain h5tools_context_t ctx; /* print context */ h5tool_format_t * info = &ls_dataformat; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1728,7 +1728,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain H5TOOLS_DEBUG("Attribute open failed"); h5tools_str_close(&buffer); } - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return 0; } @@ -2074,7 +2074,7 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void h5tools_context_t ctx; /* print context */ h5tool_format_t * info = &ls_dataformat; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2216,7 +2216,7 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void } h5tools_str_close(&buffer); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return 0; } /* end list_obj() */ diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 6e9a65d7402..ff27d496558 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -1535,7 +1535,7 @@ ADD_H5_TEST (h5diff_801 1 -v ${FILE7} ${FILE8A} /g1/array /g1/array) # ############################################################################## # # dataset subsets # ############################################################################## -#TRILABS_227 ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]) +ADD_H5_TEST (h5diff_830 1 --enable-error-stack -v ${FILE7} ${FILE8} /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;]) # ############################################################################## # # VDS tests diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index 24e9e23e356..3f906917ae4 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -1189,7 +1189,7 @@ TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array # ############################################################################## # # dataset subsets # ############################################################################## -#TRILABS_227 TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;] +TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;] # ############################################################################## # VDS tests From 79b03d3c674628fb0b8ea6cd02b935628939cf53 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 19 May 2021 08:05:17 -0500 Subject: [PATCH 53/66] Merge various changes from dev --- bin/checkposix | 6 ++--- config/clang-warnings/error-general | 3 --- config/clang-warnings/noerror-general | 3 --- config/cmake/HDFCompilerFlags.cmake | 6 ++--- config/gnu-warnings/error-general | 4 ---- config/gnu-warnings/noerror-general | 4 ---- fortran/src/CMakeLists.txt | 32 +++++++++++++++------------ release_docs/INSTALL_CMake.txt | 2 +- release_docs/INSTALL_Warnings.txt | 13 ++++------- tools/src/h5diff/h5diff_common.c | 8 +++---- tools/test/h5diff/testh5diff.sh.in | 2 +- 11 files changed, 34 insertions(+), 49 deletions(-) diff --git a/bin/checkposix b/bin/checkposix index 57efa78bc01..c913cdd67b5 100755 --- a/bin/checkposix +++ b/bin/checkposix @@ -44,7 +44,7 @@ foreach $arg (@ARGV) { # # If a user specifies one file, process it no matter what so people # can inspect files we normally skip (like H5system.c). - if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5VLpassthru|H5system|H5detect|H5make_libsettings/) { + if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5system|H5detect|H5make_libsettings/) { print "$filename is exempt from using Standard library macro wrappers\n"; next; } @@ -84,7 +84,7 @@ foreach $arg (@ARGV) { # Now find all function calls on this line which don't start with 'H' while (($name)=/\b([a-z_A-GI-Z]\w*)\s*\(/) { $_ = $'; - + # Ignore C statements that look sort of like function # calls. next if $name =~ /^(if|for|offsetof|return|sizeof|switch|while|void)$/; @@ -141,7 +141,7 @@ foreach $arg (@ARGV) { } # TESTING (not comprehensive - just noise reduction) - + # Test macros and functions (testhdf5.h) next if $name =~ /^(AddTest|TestErrPrintf|TestSummary|TestCleanup|TestShutdown)$/; next if $name =~ /^(CHECK|CHECK_PTR|CHECK_PTR_NULL|CHECK_PTR_EQ|CHECK_I)$/; diff --git a/config/clang-warnings/error-general b/config/clang-warnings/error-general index 883dff76f7a..384fcc6ddc2 100644 --- a/config/clang-warnings/error-general +++ b/config/clang-warnings/error-general @@ -26,9 +26,6 @@ # -Wunused-variable # -# H5VLpassthru.c -# -Werror=unused-parameter -# -Wunused-parameter # # diff --git a/config/clang-warnings/noerror-general b/config/clang-warnings/noerror-general index ad50dfcbce1..b570b2384aa 100644 --- a/config/clang-warnings/noerror-general +++ b/config/clang-warnings/noerror-general @@ -26,9 +26,6 @@ # -Wunused-variable # -# H5VLpassthru.c -# -Werror=unused-parameter -# -Wunused-parameter # # diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index add40bb17ad..bb6ad78ded5 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -134,7 +134,7 @@ if (NOT MSVC AND NOT MINGW) # gcc automatically inlines based on the optimization level # this is just a failsafe list (APPEND H5_CFLAGS "-finline-functions") - elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") + elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general") @@ -160,13 +160,13 @@ if (NOT MSVC AND NOT MINGW) list (APPEND H5_CFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing") elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") - elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") + elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") - elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang") + elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general index 4358b2064dc..21471fc42de 100644 --- a/config/gnu-warnings/error-general +++ b/config/gnu-warnings/error-general @@ -3,7 +3,6 @@ # circumstances, so ask the compiler to treat them as errors: # -Werror=bad-function-cast --Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=missing-prototypes @@ -30,9 +29,6 @@ # -Wunused-variable # -# H5VLpassthru.c -# -Werror=unused-parameter -# -Wunused-parameter # # diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general index e19014f473b..f5b4afbebab 100644 --- a/config/gnu-warnings/noerror-general +++ b/config/gnu-warnings/noerror-general @@ -3,7 +3,6 @@ # circumstances, so ask the compiler to treat them as errors: # -Wbad-function-cast --Wdeclaration-after-statement -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-prototypes @@ -30,9 +29,6 @@ # -Wunused-variable # -# H5VLpassthru.c -# -Werror=unused-parameter -# -Wunused-parameter # # diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 17d0286cefa..cefe894a29b 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -136,21 +136,25 @@ set (f90CStub_C_HDRS ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ) -set (f90CStub_CGEN_HDRS - # generated files - ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h -) -add_custom_target (H5gen_i ALL - DEPENDS H5match_types ${f90CStub_CGEN_HDRS} -) +if (NOT ONLY_SHARED_LIBS) + set (f90CStub_CGEN_HDRS + # generated files + ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h + ) + add_custom_target (H5gen_i ALL + DEPENDS H5match_types ${f90CStub_CGEN_HDRS} + ) +endif () -set (f90CStub_CGEN_SHHDRS - # generated files - ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h -) -add_custom_target (H5gen_iSH ALL - DEPENDS H5match_types ${f90CStub_CGEN_SHHDRS} -) +if (BUILD_SHARED_LIBS) + set (f90CStub_CGEN_SHHDRS + # generated files + ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h + ) + add_custom_target (H5gen_iSH ALL + DEPENDS H5match_types ${f90CStub_CGEN_SHHDRS} + ) +endif () if (NOT ONLY_SHARED_LIBS) add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS} ${f90CStub_CGEN_HDRS}) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1d783227f8b..bb5fb3f9108 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -734,7 +734,7 @@ BUILD_STATIC_EXECS "Build Static Executables" OFF BUILD_TESTING "Build HDF5 Unit Testing" ON ---------------- HDF5 Build Options --------------------- -HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON +HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF HDF5_BUILD_JAVA "Build JAVA support" OFF diff --git a/release_docs/INSTALL_Warnings.txt b/release_docs/INSTALL_Warnings.txt index 5fde45f699c..97981be5ba6 100644 --- a/release_docs/INSTALL_Warnings.txt +++ b/release_docs/INSTALL_Warnings.txt @@ -60,7 +60,6 @@ Autotools UNIX warnings added to H5_CFLAGS -Wcast-align -Wcast-qual -Wconversion - -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 @@ -88,11 +87,13 @@ Autotools UNIX warnings added to H5_CFLAGS -Waggregate-return -Wmissing-format-attribute -Wmissing-noreturn + -Wunsuffixed-float-constants (gcc 4.5+) enable-developer-warnings=OFF -Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn + -Wno-unsuffixed-float-constants (gcc 4.5+) IF GCC <= 4.3 -Wno-long-long @@ -128,7 +129,6 @@ IF GCC <= 4.6 -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants IF GCC <= 4.7 -Wno-long-long @@ -141,7 +141,6 @@ IF GCC <= 4.7 -Wstrict-aliasing -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines enable-developer-warnings=ON: @@ -158,7 +157,6 @@ IF GCC <= 4.8 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines -Wstack-usage=8192 @@ -205,7 +203,6 @@ IF GCC < 5 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines -Wstack-usage=8192 @@ -231,7 +228,6 @@ IF GCC < 6 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines -Wstack-usage=8192 @@ -259,7 +255,6 @@ IF GCC < 7 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants -Wdouble-promotion -Wtrampolines -Wstack-usage=8192 @@ -295,7 +290,6 @@ IF GNU GCC -Wcast-align -Wcast-qual -Wconversion - -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 @@ -322,10 +316,12 @@ IF GNU GCC HDF5_ENABLE_DEV_WARNINGS=ON -Winline -Waggregate-return + -Wunsuffixed-float-constants (gcc 4.5+) HDF5_ENABLE_DEV_WARNINGS=OFF -Wno-unused-parameter -Wno-inline -Wno-aggregate-return + -Wno-unsuffixed-float-constants (gcc 4.5+) ======================================================================== @@ -383,7 +379,6 @@ HDF5_ENABLE_GROUPONE_WARNINGS:BOOL=ON IF GCC >= 4.5 -Wstrict-overflow=5 -Wjump-misses-init - -Wunsuffixed-float-constants ======================================================================== diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 64023840469..05c0e05406c 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -132,7 +132,7 @@ parse_hsize_list(const char *h_list, subset_d *d) } d->data = p_list; d->len = size_count; - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- @@ -181,7 +181,7 @@ parse_subset_params(const char *dset) parse_hsize_list(brace, &s->block); } - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); return s; } @@ -202,7 +202,7 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char struct exclude_path_list *exclude_head, *exclude_prev, *exclude_node; struct exclude_path_list *exclude_attr_head, *exclude_attr_prev, *exclude_attr_node; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); /* process the command-line */ HDmemset(opts, 0, sizeof(diff_opt_t)); @@ -444,7 +444,7 @@ parse_command_line(int argc, const char *argv[], const char **fname1, const char opts->sset[1] = parse_subset_params(*objname2); - H5TOOLS_ENDDEBUG(""); + H5TOOLS_ENDDEBUG(" "); } /*------------------------------------------------------------------------- diff --git a/tools/test/h5diff/testh5diff.sh.in b/tools/test/h5diff/testh5diff.sh.in index 3f906917ae4..d34896cbecb 100644 --- a/tools/test/h5diff/testh5diff.sh.in +++ b/tools/test/h5diff/testh5diff.sh.in @@ -1189,7 +1189,7 @@ TOOLTEST h5diff_801.txt -v h5diff_dset1.h5 h5diff_dset3.h5 /g1/array /g1/array # ############################################################################## # # dataset subsets # ############################################################################## -TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/array3D[0,0,0;2,2,1;2,2,2;] /g1/array3D[0,0,0;2,2,1;2,2,2;] +#TOOLTEST h5diff_830.txt --enable-error-stack -v h5diff_dset1.h5 h5diff_dset2.h5 "/g1/array3D[0,0,0;2,2,1;2,2,2;]" "/g1/array3D[0,0,0;2,2,1;2,2,2;]" # ############################################################################## # VDS tests From 9a9558731af2f0adcb1784b0517597a6404a5aee Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 May 2021 08:31:12 -0500 Subject: [PATCH 54/66] Issue #669 remove version from pkgcfg filename --- c++/src/CMakeLists.txt | 4 ++-- fortran/src/CMakeLists.txt | 4 ++-- hl/c++/src/CMakeLists.txt | 4 ++-- hl/fortran/src/CMakeLists.txt | 4 ++-- hl/src/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 4b1a2d66c46..835d422c71e 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -199,11 +199,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}" configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_CPP_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT cpplibraries ) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index cefe894a29b..fd11c39f4c2 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -553,11 +553,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}" configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT fortlibraries ) diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index e4886567d10..c516df15e7e 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -110,11 +110,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSIO configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT hlcpplibraries ) diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 4f0b45167b8..6c97886f9fb 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -343,11 +343,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSI configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_F90_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT hlfortlibraries ) diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 427424ea50b..7678de84001 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -142,11 +142,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}" configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT hllibraries ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0613cf3edec..ac6d65a69f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1275,11 +1275,11 @@ set (_PKG_CONFIG_REQUIRES_PRIVATE) configure_file ( ${HDF_CONFIG_DIR}/libhdf5.pc.in - ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}.pc @ONLY ) install ( - FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}.pc DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig COMPONENT libraries ) From 006827c6d098da31805d8962261a16c0e66133ba Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 21 May 2021 16:17:28 -0500 Subject: [PATCH 55/66] remove version from h5cc script --- config/cmake/libh5cc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/libh5cc.in b/config/cmake/libh5cc.in index f7cab986e62..c98d9ca23ba 100644 --- a/config/cmake/libh5cc.in +++ b/config/cmake/libh5cc.in @@ -29,4 +29,4 @@ printf 'dir is %s\n' "$dir" export PKG_CONFIG_PATH=$dir/lib/pkgconfig -@_PKG_CONFIG_COMPILER@ `pkg-config --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@-@_PKG_CONFIG_VERSION@` $@ +@_PKG_CONFIG_COMPILER@ `pkg-config --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@` $@ From 5dd2af9516d76f62e99df6b655264b4444b1e2dd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 25 May 2021 10:26:03 -0500 Subject: [PATCH 56/66] doxygen changes merged from develop --- MANIFEST | 64 +- configure.ac | 27 +- doxygen/Doxyfile.in | 39 +- doxygen/aliases | 39 +- doxygen/dox/About.dox | 11 + doxygen/dox/Cookbook.dox | 5 + doxygen/dox/DDLBNF110.dox | 650 + doxygen/dox/FileFormatSpec.dox | 23 + doxygen/dox/GettingStarted.dox | 3 + doxygen/dox/H5AC_cache_config_t.dox | 415 + doxygen/dox/H5Acreate.dox | 9 + doxygen/dox/H5Aiterate.dox | 9 + doxygen/dox/H5Fget_info.dox | 44 + doxygen/dox/H5Lget_info.dox | 17 + doxygen/dox/H5Lget_info_by_idx.dox | 17 + doxygen/dox/H5Literate.dox | 20 + doxygen/dox/H5Literate_by_name.dox | 21 + doxygen/dox/H5Lvisit.dox | 20 + doxygen/dox/H5Lvisit_by_name.dox | 20 + doxygen/dox/H5Oget_info.dox | 72 + doxygen/dox/H5Oget_info_by_idx.dox | 55 + doxygen/dox/H5Oget_info_by_name.dox | 58 + doxygen/dox/H5Ovisit.dox | 55 + doxygen/dox/H5Ovisit_by_name.dox | 54 + doxygen/dox/H5Sencode.dox | 5 + doxygen/dox/MetadataCachingInHDF5.dox | 1020 + doxygen/dox/OtherSpecs.dox | 11 + doxygen/dox/Overview.dox | 32 + doxygen/dox/ReferenceManual.dox | 40 + doxygen/dox/Specifications.dox | 22 + doxygen/dox/TechnicalNotes.dox | 20 + doxygen/dox/api-compat-macros.dox | 1 - doxygen/dox/mainpage.dox | 36 - doxygen/dox/maybe_metadata_reads.dox | 82 + doxygen/examples/FF-IH_FileGroup.gif | Bin 0 -> 3407 bytes doxygen/examples/FF-IH_FileObject.gif | Bin 0 -> 2136 bytes .../examples/FileFormatSpecChunkDiagram.jpg | Bin 0 -> 29237 bytes doxygen/examples/H5.format.1.0.html | 4050 +++ doxygen/examples/H5.format.1.1.html | 6439 +++++ doxygen/examples/H5.format.2.0.html | 14902 +++++++++++ doxygen/examples/H5.format.html | 20400 ++++++++++++++++ doxygen/examples/H5A_examples.c | 145 + doxygen/examples/H5D_examples.c | 173 + doxygen/examples/H5F_examples.c | 187 + .../H5Pget_metadata_read_attempts.1.c | 22 + .../H5Pget_metadata_read_attempts.2.c | 44 + .../H5Pget_metadata_read_attempts.3.c | 44 + doxygen/examples/H5Pget_object_flush_cb.c | 41 + .../examples/H5Pset_metadata_read_attempts.c | 59 + doxygen/examples/H5Pset_object_flush_cb.c | 41 + doxygen/examples/ImageSpec.html | 1203 + doxygen/examples/PaletteExample1.gif | Bin 0 -> 2731 bytes doxygen/examples/Palettes.fm.anc.gif | Bin 0 -> 4748 bytes doxygen/examples/TableSpec.html | 193 + doxygen/examples/ThreadSafeLibrary.html | 787 + doxygen/examples/VFL.html | 1601 ++ doxygen/hdf5_footer.html | 21 + doxygen/hdf5_header.html | 61 + doxygen/hdf5_navtree_hacks.js | 246 + doxygen/hdf5doxy.css | 251 + doxygen/hdf5doxy_layout.xml | 182 + doxygen/img/FF-IH_FileGroup.gif | Bin 0 -> 3407 bytes doxygen/img/FF-IH_FileObject.gif | Bin 0 -> 2136 bytes doxygen/img/FileFormatSpecChunkDiagram.jpg | Bin 0 -> 29237 bytes doxygen/img/HDFG-logo.png | Bin 4541 -> 1689 bytes doxygen/img/PaletteExample1.gif | Bin 0 -> 2731 bytes doxygen/img/Palettes.fm.anc.gif | Bin 0 -> 4748 bytes doxygen/img/ftv2node.png | Bin 0 -> 86 bytes doxygen/img/ftv2pnode.png | Bin 0 -> 229 bytes release_docs/RELEASE.txt | 4 +- src/H5.c | 4 + src/H5ACpublic.h | 343 +- src/H5Amodule.h | 37 + src/H5Apublic.h | 1186 +- src/H5Cpublic.h | 23 +- src/H5Dmodule.h | 33 + src/H5Dpublic.h | 1560 +- src/H5Epublic.h | 767 +- src/H5FDcore.h | 64 +- src/H5FDdirect.h | 63 +- src/H5FDfamily.h | 52 +- src/H5FDhdfs.h | 14 +- src/H5FDlog.h | 405 +- src/H5FDmirror.h | 14 +- src/H5FDmpi.h | 8 +- src/H5FDmpio.h | 225 +- src/H5FDmulti.h | 219 +- src/H5FDpublic.h | 88 +- src/H5FDros3.h | 14 +- src/H5FDsplitter.h | 14 +- src/H5FDstdio.h | 16 +- src/H5FDwindows.h | 30 + src/H5Fmodule.h | 39 + src/H5Fpublic.h | 1760 +- src/H5Gmodule.h | 92 + src/H5Gpublic.h | 1034 +- src/H5Imodule.h | 5 + src/H5Ipublic.h | 618 +- src/H5Lmodule.h | 8 + src/H5Lpublic.h | 1513 +- src/H5MMpublic.h | 5 + src/H5Omodule.h | 6 + src/H5Opublic.h | 1940 +- src/H5PLmodule.h | 5 + src/H5PLpublic.h | 188 +- src/H5Pmodule.h | 46 + src/H5Ppublic.h | 9664 +++++++- src/H5Rmodule.h | 7 + src/H5Rpublic.h | 356 +- src/H5Smodule.h | 27 + src/H5Spublic.h | 1146 +- src/H5Tmodule.h | 72 + src/H5Tpublic.h | 2897 ++- src/H5Zmodule.h | 65 + src/H5Zpublic.h | 678 +- src/H5module.h | 34 + src/H5public.h | 571 +- src/H5system.c | 1 + 118 files changed, 80624 insertions(+), 1444 deletions(-) create mode 100644 doxygen/dox/About.dox create mode 100644 doxygen/dox/Cookbook.dox create mode 100644 doxygen/dox/DDLBNF110.dox create mode 100644 doxygen/dox/FileFormatSpec.dox create mode 100644 doxygen/dox/GettingStarted.dox create mode 100644 doxygen/dox/H5AC_cache_config_t.dox create mode 100644 doxygen/dox/H5Acreate.dox create mode 100644 doxygen/dox/H5Aiterate.dox create mode 100644 doxygen/dox/H5Fget_info.dox create mode 100644 doxygen/dox/H5Lget_info.dox create mode 100644 doxygen/dox/H5Lget_info_by_idx.dox create mode 100644 doxygen/dox/H5Literate.dox create mode 100644 doxygen/dox/H5Literate_by_name.dox create mode 100644 doxygen/dox/H5Lvisit.dox create mode 100644 doxygen/dox/H5Lvisit_by_name.dox create mode 100644 doxygen/dox/H5Oget_info.dox create mode 100644 doxygen/dox/H5Oget_info_by_idx.dox create mode 100644 doxygen/dox/H5Oget_info_by_name.dox create mode 100644 doxygen/dox/H5Ovisit.dox create mode 100644 doxygen/dox/H5Ovisit_by_name.dox create mode 100644 doxygen/dox/H5Sencode.dox create mode 100644 doxygen/dox/MetadataCachingInHDF5.dox create mode 100644 doxygen/dox/OtherSpecs.dox create mode 100644 doxygen/dox/Overview.dox create mode 100644 doxygen/dox/ReferenceManual.dox create mode 100644 doxygen/dox/Specifications.dox create mode 100644 doxygen/dox/TechnicalNotes.dox delete mode 100644 doxygen/dox/mainpage.dox create mode 100644 doxygen/dox/maybe_metadata_reads.dox create mode 100644 doxygen/examples/FF-IH_FileGroup.gif create mode 100644 doxygen/examples/FF-IH_FileObject.gif create mode 100644 doxygen/examples/FileFormatSpecChunkDiagram.jpg create mode 100644 doxygen/examples/H5.format.1.0.html create mode 100644 doxygen/examples/H5.format.1.1.html create mode 100644 doxygen/examples/H5.format.2.0.html create mode 100644 doxygen/examples/H5.format.html create mode 100644 doxygen/examples/H5A_examples.c create mode 100644 doxygen/examples/H5D_examples.c create mode 100644 doxygen/examples/H5F_examples.c create mode 100644 doxygen/examples/H5Pget_metadata_read_attempts.1.c create mode 100644 doxygen/examples/H5Pget_metadata_read_attempts.2.c create mode 100644 doxygen/examples/H5Pget_metadata_read_attempts.3.c create mode 100644 doxygen/examples/H5Pget_object_flush_cb.c create mode 100644 doxygen/examples/H5Pset_metadata_read_attempts.c create mode 100644 doxygen/examples/H5Pset_object_flush_cb.c create mode 100644 doxygen/examples/ImageSpec.html create mode 100644 doxygen/examples/PaletteExample1.gif create mode 100644 doxygen/examples/Palettes.fm.anc.gif create mode 100644 doxygen/examples/TableSpec.html create mode 100644 doxygen/examples/ThreadSafeLibrary.html create mode 100644 doxygen/examples/VFL.html create mode 100644 doxygen/hdf5_footer.html create mode 100644 doxygen/hdf5_header.html create mode 100644 doxygen/hdf5_navtree_hacks.js create mode 100644 doxygen/hdf5doxy.css create mode 100644 doxygen/hdf5doxy_layout.xml create mode 100644 doxygen/img/FF-IH_FileGroup.gif create mode 100644 doxygen/img/FF-IH_FileObject.gif create mode 100644 doxygen/img/FileFormatSpecChunkDiagram.jpg create mode 100644 doxygen/img/PaletteExample1.gif create mode 100644 doxygen/img/Palettes.fm.anc.gif create mode 100644 doxygen/img/ftv2node.png create mode 100644 doxygen/img/ftv2pnode.png create mode 100644 src/H5module.h diff --git a/MANIFEST b/MANIFEST index d990e2d983c..5a966848dd2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -206,13 +206,74 @@ ./doxygen/aliases ./doxygen/Doxyfile.in +./doxygen/dox/About.dox +./doxygen/dox/Cookbook.dox +./doxygen/dox/DDLBNF110.dox +./doxygen/dox/FileFormatSpec.dox +./doxygen/dox/GettingStarted.dox +./doxygen/dox/H5AC_cache_config_t.dox +./doxygen/dox/H5Acreate.dox +./doxygen/dox/H5Aiterate.dox +./doxygen/dox/H5Fget_info.dox +./doxygen/dox/H5Lget_info_by_idx.dox +./doxygen/dox/H5Lget_info.dox +./doxygen/dox/H5Literate_by_name.dox +./doxygen/dox/H5Literate.dox +./doxygen/dox/H5Lvisit_by_name.dox +./doxygen/dox/H5Lvisit.dox +./doxygen/dox/H5Oget_info_by_idx.dox +./doxygen/dox/H5Oget_info_by_name.dox +./doxygen/dox/H5Oget_info.dox +./doxygen/dox/H5Ovisit_by_name.dox +./doxygen/dox/H5Ovisit.dox +./doxygen/dox/H5Sencode.dox +./doxygen/dox/MetadataCachingInHDF5.dox +./doxygen/dox/OtherSpecs.dox +./doxygen/dox/Overview.dox +./doxygen/dox/ReferenceManual.dox +./doxygen/dox/Specifications.dox +./doxygen/dox/TechnicalNotes.dox ./doxygen/dox/api-compat-macros.dox -./doxygen/dox/mainpage.dox +./doxygen/dox/maybe_metadata_reads.dox ./doxygen/dox/rm-template.dox +./doxygen/examples/FF-IH_FileGroup.gif +./doxygen/examples/FF-IH_FileObject.gif +./doxygen/examples/FileFormatSpecChunkDiagram.jpg +./doxygen/examples/H5Pset_metadata_read_attempts.c +./doxygen/examples/H5Pset_object_flush_cb.c +./doxygen/examples/H5.format.1.0.html +./doxygen/examples/H5.format.1.1.html +./doxygen/examples/H5.format.2.0.html +./doxygen/examples/H5.format.html +./doxygen/examples/H5A_examples.c +./doxygen/examples/H5D_examples.c ./doxygen/examples/H5Fclose.c ./doxygen/examples/H5Fcreate.c +./doxygen/examples/H5F_examples.c +./doxygen/examples/H5Pget_metadata_read_attempts.1.c +./doxygen/examples/H5Pget_metadata_read_attempts.2.c +./doxygen/examples/H5Pget_metadata_read_attempts.3.c +./doxygen/examples/H5Pget_object_flush_cb.c +./doxygen/examples/ImageSpec.html +./doxygen/examples/PaletteExample1.gif +./doxygen/examples/Palettes.fm.anc.gif +./doxygen/examples/TableSpec.html +./doxygen/examples/ThreadSafeLibrary.html +./doxygen/examples/VFL.html ./doxygen/examples/hello_hdf5.c +./doxygen/hdf5_footer.html +./doxygen/hdf5_header.html +./doxygen/hdf5_navtree_hacks.js +./doxygen/hdf5doxy.css +./doxygen/hdf5doxy_layout.xml +./doxygen/img/FF-IH_FileGroup.gif +./doxygen/img/FF-IH_FileObject.gif +./doxygen/img/FileFormatSpecChunkDiagram.jpg ./doxygen/img/HDFG-logo.png +./doxygen/img/PaletteExample1.gif +./doxygen/img/Palettes.fm.anc.gif +./doxygen/img/ftv2node.png +./doxygen/img/ftv2pnode.png ./examples/Attributes.txt ./examples/Makefile.am @@ -548,6 +609,7 @@ ./src/H5err.txt ./src/H5detect.c ./src/H5make_libsettings.c +./src/H5module.h ./src/H5mpi.c ./src/H5overflow.txt ./src/H5private.h diff --git a/configure.ac b/configure.ac index 4a710fd68cb..e9776f5661b 100644 --- a/configure.ac +++ b/configure.ac @@ -1089,18 +1089,37 @@ if test "X$HDF5_DOXYGEN" = "Xyes"; then AC_SUBST([DOXYGEN_OPTIMIZE_OUTPUT_FOR_C]) AC_SUBST([DOXYGEN_MACRO_EXPANSION]) AC_SUBST([DOXYGEN_OUTPUT_DIRECTORY]) - + AC_SUBST([DOXYGEN_EXAMPLES_DIRECTORY]) + AC_SUBST([DOXYGEN_LAYOUT_FILE]) + AC_SUBST([DOXYGEN_HTML_HEADER]) + AC_SUBST([DOXYGEN_HTML_FOOTER]) + AC_SUBST([DOXYGEN_HTML_EXTRA_STYLESHEET]) + AC_SUBST([DOXYGEN_HTML_EXTRA_FILES]) + AC_SUBST([DOXYGEN_SERVER_BASED_SEARCH]) + AC_SUBST([DOXYGEN_EXTERNAL_SEARCH]) + AC_SUBST([DOXYGEN_SEARCHENGINE_URL]) + +# SRCDIR Environment variables used inside doxygen macro for the source location: DOXYGEN_PACKAGE=${PACKAGE_NAME} DOXYGEN_VERSION_STRING=${PACKAGE_VERSION} DOXYGEN_INCLUDE_ALIASES='$(SRCDIR)/doxygen/aliases' DOXYGEN_PROJECT_LOGO='$(SRCDIR)/doxygen/img/HDFG-logo.png' - DOXYGEN_PROJECT_BRIEF="C-API Reference" + DOXYGEN_PROJECT_BRIEF= DOXYGEN_INPUT_DIRECTORY='$(SRCDIR) $(SRCDIR)/doxygen/dox' DOXYGEN_OPTIMIZE_OUTPUT_FOR_C=YES DOXYGEN_MACRO_EXPANSION=YES DOXYGEN_OUTPUT_DIRECTORY=hdf5lib_docs - - DX_INIT_DOXYGEN([HDF5], [../doxygen/Doxyfile], [hdf5lib_docs]) + DOXYGEN_EXAMPLES_DIRECTORY='$(SRCDIR)/doxygen/examples $(SRCDIR)/src $(SRCDIR)/examples $(SRCDIR)/test' + DOXYGEN_LAYOUT_FILE='$(SRCDIR)/doxygen/hdf5doxy_layout.xml' + DOXYGEN_HTML_HEADER='$(SRCDIR)/doxygen/hdf5_header.html' + DOXYGEN_HTML_FOOTER='$(SRCDIR)/doxygen/hdf5_footer.html' + DOXYGEN_HTML_EXTRA_STYLESHEET='$(SRCDIR)/doxygen/hdf5doxy.css' + DOXYGEN_HTML_EXTRA_FILES='$(SRCDIR)/doxygen/hdf5_navtree_hacks.js $(SRCDIR)/doxygen/img/ftv2node.png $(SRCDIR)/doxygen/img/ftv2pnode.png' + DOXYGEN_SERVER_BASED_SEARCH=NO + DOXYGEN_EXTERNAL_SEARCH=NO + DOXYGEN_SEARCHENGINE_URL= + + DX_INIT_DOXYGEN([HDF5], [./doxygen/Doxyfile], [hdf5lib_docs]) else AC_MSG_RESULT([no]) diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index b1b783c89d3..0e41a7bba0c 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -738,7 +738,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = @DOXYGEN_LAYOUT_FILE@ # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -855,9 +855,16 @@ INPUT_ENCODING = UTF-8 FILE_PATTERNS = H5*public.h \ H5*module.h \ - H5VLconnector.h \ - H5VLconnector_passthru.h \ - H5VLnative.h \ + H5FDcore.h \ + H5FDdirect.h \ + H5FDfamily.h \ + H5FDlog.h \ + H5FDmpi.h \ + H5FDmpio.h \ + H5FDmulti.h \ + H5FDsec2.h \ + H5FDstdio.h \ + H5FDwindows.h \ H5version.h \ *.dox @@ -907,7 +914,7 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = ../src ../examples ../test examples +EXAMPLE_PATH = @DOXYGEN_EXAMPLES_DIRECTORY@ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -1168,7 +1175,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = @DOXYGEN_HTML_HEADER@ # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1178,7 +1185,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = @DOXYGEN_HTML_FOOTER@ # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1203,7 +1210,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1213,7 +1220,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = @DOXYGEN_HTML_EXTRA_FILES@ # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to @@ -1271,7 +1278,7 @@ HTML_DYNAMIC_MENUS = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_DYNAMIC_SECTIONS = NO +HTML_DYNAMIC_SECTIONS = YES # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand @@ -1483,7 +1490,7 @@ ECLIPSE_DOC_ID = org.doxygen.Project # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -DISABLE_INDEX = NO +DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag @@ -1631,7 +1638,7 @@ MATHJAX_CODEFILE = # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -SEARCHENGINE = NO +SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using JavaScript. There @@ -1643,7 +1650,7 @@ SEARCHENGINE = NO # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. -SERVER_BASED_SEARCH = YES +SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@ # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file @@ -1659,7 +1666,7 @@ SERVER_BASED_SEARCH = YES # The default value is: NO. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH = NO +EXTERNAL_SEARCH = @DOXYGEN_EXTERNAL_SEARCH@ # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. @@ -1670,7 +1677,7 @@ EXTERNAL_SEARCH = NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = @DOXYGEN_SEARCHENGINE_URL@ # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -2167,7 +2174,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = H5_HAVE_PARALLEL # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/doxygen/aliases b/doxygen/aliases index aa22bd461fc..30fbd9b33f1 100644 --- a/doxygen/aliases +++ b/doxygen/aliases @@ -1,3 +1,5 @@ +ALIASES += THG="The HDF Group" + ################################################################################ # Styling ################################################################################ @@ -35,6 +37,9 @@ ALIASES += op{1}="\param[in] \1 Callback function" ALIASES += op_data="\param[in,out] op_data User-defined callback function context" ALIASES += op_data{1}="\param[in,out] \1 User-defined callback function context" +ALIASES += op_data_in="\param[in] op_data User-defined callback function context" +ALIASES += op_data_in{1}="\param[in] \1 User-defined callback function context" + ################################################################################ # Attributes ################################################################################ @@ -60,12 +65,19 @@ ALIASES += space_id{1}="\param[in] \1 Dataspace identifier" # Dataypes ################################################################################ -ALIASES += dtype_id="\param[in] dtype_id Datatype identifier" -ALIASES += dtype_id{1}="\param[in] \1 Datatype identifier" +ALIASES += type_id="\param[in] type_id Datatype identifier" +ALIASES += type_id{1}="\param[in] \1 Datatype identifier" ALIASES += file_type_id{1}="\param[in] \1 Datatype (in-file) identifier" ALIASES += mem_type_id{1}="\param[in] \1 Datatype (in-memory) identifier" +################################################################################ +# Errors +################################################################################ + +ALIASES += estack_id="\param[in] estack_id Error stack identifier" +ALIASES += estack_id{1}="\param[in] \1 Error stack identifier" + ################################################################################ # Files ################################################################################ @@ -160,11 +172,32 @@ ALIASES += fgdta_loc_obj_id{1}="\loc_obj_id{\1}. The identifier may be that of a ALIASES += estack_id="\param[in] estack_id Error stack identifier" ALIASES += estack_id{1}="\param[in] \1 Error stack identifier" +ALIASES += cpp_c_api_note="\attention \Bold{C++ Developers using HDF5 C-API functions beware:}\n Several functions in this C-API take function pointers or callbacks as arguments. Examples include H5Pset_elink_cb(), H5Pset_type_conv_cb(), H5Tconvert(), and H5Ewalk2(). Application code must ensure that those callback functions return normally such to allow the HDF5 to manage its resources and maintain a consistent state. For instance, those functions must not use the C \c setjmp / \c longjmp mechanism to leave those callback functions. Within the context of C++, any exceptions thrown within the callback function must be caught, such as with a \Code{catch(…)} statement. Any exception state can be placed within the provided user data function call arguments, and may be thrown again once the calling function has returned. Exceptions raised and not handled inside the callback are not supported as it might leave the HDF5 library in an inconsistent state. Similarly, using C++20 coroutines cannot be used as callbacks, since they do not support plain return statements. If a callback function yields execution to another C++20 coroutine calling HDF5 functions as well, this may lead to undefined behavior." +ALIASES += sa_metadata_ops="\sa \li H5Pget_all_coll_metadata_ops() \li H5Pget_coll_metadata_write() \li H5Pset_all_coll_metadata_ops() \li H5Pset_coll_metadata_write() \li \ref maybe_metadata_reads" + +################################################################################ +# References +################################################################################ + +ALIASES += ref_cons_semantics="Enabling a Strict Consistency Semantics Model in Parallel HDF5" +ALIASES += ref_dld_filters="HDF5 Dynamically Loaded Filters" +ALIASES += ref_file_image_ops="HDF5 File Image Operations" +ALIASES += ref_filter_pipe="Data Flow Pipeline for H5Dread()" +ALIASES += ref_group_impls="Group implementations in HDF5" +ALIASES += ref_h5lib_relver="HDF5 Library Release Version Numbers" +ALIASES += ref_mdc_in_hdf5="Metadata Caching in HDF5" +ALIASES += ref_mdc_logging="Metadata Cache Logging" +ALIASES += ref_news_110="New Features in HDF5 Release 1.10" +ALIASES += ref_h5ocopy="Copying Committed Datatypes with H5Ocopy()" +ALIASES += ref_sencode_fmt_change="RFC H5Secnode() / H5Sdecode() Format Change" +ALIASES += ref_vlen_strings="\Emph{Creating variable-length string datatypes}" +ALIASES += ref_vol_doc="VOL documentation" ################################################################################ # The Usual Suspects ################################################################################ +ALIASES += click4more="(Click on a enumerator, field, or type for more information.)" ALIASES += csets="
#H5T_CSET_ASCIIUS ASCII
#H5T_CSET_UTF8UTF-8 Unicode encoding
" ALIASES += datatype_class=" \li #H5T_INTEGER \li #H5T_FLOAT \li #H5T_STRING \li #H5T_BITFIELD \li #H5T_OPAQUE \li #H5T_COMPOUND \li #H5T_REFERENCE \li #H5T_ENUM \li #H5T_VLEN \li #H5T_ARRAY" ALIASES += file_access="
#H5F_ACC_RDWRFile was opened with read/write access.
#H5F_ACC_RDONLYFile was opened with read-only access.
#H5F_ACC_SWMR_WRITEFile was opened with read/write access for a single-writer/multiple-reader (SWMR) scenario. Note that the writer process must also open the file with the #H5F_ACC_RDWR flag.
#H5F_ACC_SWMR_READFile was opened with read-only access for a single-writer/multiple-reader (SWMR) scenario. Note that the reader process must also open the file with the #H5F_ACC_RDONLY flag.
" @@ -180,5 +213,5 @@ ALIASES += scopes=" + * + * \since 1.8.0 + * + */ diff --git a/doxygen/dox/H5Ovisit.dox b/doxygen/dox/H5Ovisit.dox new file mode 100644 index 00000000000..1e2a3ea89df --- /dev/null +++ b/doxygen/dox/H5Ovisit.dox @@ -0,0 +1,55 @@ +/** + * \ingroup H5O + * \def H5Ovisit + * + * #H5Ovisit is a macro that is mapped to one of the following: + * \li #H5Ovisit3 + * \li #H5Ovisit1 + * + * \details Such macros are provided to facilitate application + * compatibility. Their use and mappings are fully described in + * API Compatibility Macros in HDF5; we urge you to read that + * document closely. + * + * In HDF5 versions 1.12 and after, #H5Ovisit is mapped to + * #H5Ovisit3. In version 1.10, #H5Ovisit is identical + * to #H5Ovisit1. + * + * Specific compile-time compatibility flags and the resulting + * mappings are as follows: + * + * \par + *
#H5F_SCOPE_GLOBALFlushes the entire v ALIASES += sign_prop="
#H5T_SGN_NONE0Unsigned integer type
#H5T_SGN_21Two's complement signed integer type
" ALIASES += storage_type="
#H5G_STORAGE_TYPE_COMPACTCompact storage
#H5G_STORAGE_TYPE_DENSEIndexed storage
#H5G_STORAGE_TYPE_SYMBOL_TABLESymbol tables, the original HDF5 structure
" ALIASES += str_pad_type="
#H5T_STR_NULLTERM0Null terminate (as C does)
#H5T_STR_NULLPAD1Pad with zeros
#H5T_STR_SPACEPAD2Pad with spaces (as FORTRAN does)
" -ALIASES += virtual=" \see Supporting Functions: \li H5Pget_layout() \li H5Pset_layout() \li H5Sget_regular_hyperslab() \li H5Sis_regular_hyperslab() \li H5Sselect_hyperslab() \see VDS Functions: \li H5Pget_virtual_count() \li H5Pget_virtual_dsetname() \li H5Pget_virtual_filename() \li H5Pget_virtual_prefix() \li H5Pget_virtual_printf_gap() \li H5Pget_virtual_srcspace() \li H5Pget_virtual_view() \li H5Pget_virtual_vspace() \li H5Pset_virtual \li H5Pset_virtual_prefix() \li H5Pset_virtual_printf_gap() \li H5Pset_virtual_view()" +ALIASES += see_virtual=" \see Supporting Functions: H5Pget_layout(), H5Pset_layout(), H5Sget_regular_hyperslab(), H5Sis_regular_hyperslab(), H5Sselect_hyperslab() \see VDS Functions: H5Pget_virtual_count(), H5Pget_virtual_dsetname(), H5Pget_virtual_filename(), H5Pget_virtual_prefix(), H5Pget_virtual_printf_gap(), H5Pget_virtual_srcspace(), H5Pget_virtual_view(), H5Pget_virtual_vspace(), H5Pset_virtual(), H5Pset_virtual_prefix(), H5Pset_virtual_printf_gap(), H5Pset_virtual_view()" ALIASES += obj_info_fields="
FlagPurpose
#H5O_INFO_BASICFill in the fileno, addr, type, and rc fields
#H5O_INFO_TIMEFill in the atime, mtime, ctime, and btime fields
#H5O_INFO_NUM_ATTRS Fill in the num_attrs field
#H5O_INFO_HDRFill in the num_attrs field
#H5O_INFO_META_SIZEFill in the meta_size field
#H5O_INFO_ALL#H5O_INFO_BASIC | #H5O_INFO_TIME | #H5O_INFO_NUM_ATTRS | #H5O_INFO_HDR | #H5O_INFO_META_SIZE
" diff --git a/doxygen/dox/About.dox b/doxygen/dox/About.dox new file mode 100644 index 00000000000..3be920208e7 --- /dev/null +++ b/doxygen/dox/About.dox @@ -0,0 +1,11 @@ +/** \page About About + +The implementation of this documentation set is based on the fantastic work of the +Eigen project. +Please refer to their GitLab repository +and the online version of their +Doxygen-based documentation. +Not only does Eigen set a standard as a piece of software, but also as an example +of documentation done right. + +*/ \ No newline at end of file diff --git a/doxygen/dox/Cookbook.dox b/doxygen/dox/Cookbook.dox new file mode 100644 index 00000000000..4abc8964db8 --- /dev/null +++ b/doxygen/dox/Cookbook.dox @@ -0,0 +1,5 @@ +/** \page Cookbook Cookbook + + Healthy, everyday recipes for every taste and budget... + + */ \ No newline at end of file diff --git a/doxygen/dox/DDLBNF110.dox b/doxygen/dox/DDLBNF110.dox new file mode 100644 index 00000000000..f7e4267a06f --- /dev/null +++ b/doxygen/dox/DDLBNF110.dox @@ -0,0 +1,650 @@ +/** \page DDLBNF110 DDL in BNF through HDF5 1.10 + +\todo Revise this & break it up! + +\section intro110 Introduction + +This document contains the data description language (DDL) for an HDF5 file. The +description is in Backus-Naur Form (BNF). + +\section expo110 Explanation of Symbols + +This section contains a brief explanation of the symbols used in the DDL. + +\code{.unparsed} +::= defined as + a token with the name tname + | one of or + opt zero or one occurrence of + * zero or more occurrence of + + one or more occurrence of + [0-9] an element in the range between 0 and 9 + '[' the token within the quotes (used for special characters) + TBD To Be Decided +\endcode + +\section ddl110 The DDL + +\code{.unparsed} + ::= HDF5 { opt } + + ::= + + ::= SUPER_BLOCK { + SUPERBLOCK_VERSION + FREELIST_VERSION + SYMBOLTABLE_VERSION + OBJECTHEADER_VERSION + OFFSET_SIZE + LENGTH_SIZE + BTREE_RANK + BTREE_LEAF + ISTORE_K + + USER_BLOCK { + USERBLOCK_SIZE + } + } + + ::= FILE_SPACE_STRATEGY + FREE_SPACE_PERSIST + FREE_SPACE_SECTION_THRESHOLD + FILE_SPACE_PAGE_SIZE + + ::= H5F_FSPACE_STRATEGY_FSM_AGGR | H5F_FSPACE_STRATEGY_PAGE | + H5F_FSPACE_STRATEGY_AGGR | H5F_FSPACE_STRATEGY_NONE | + Unknown strategy + + ::= GROUP "/" { + * + opt + opt + * + * + } + + ::= | | | + + ::= DATATYPE { + + } + + ::= the assigned name for anonymous named type is + in the form of #oid, where oid is the object id + of the type + + ::= | |
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Compatibility settingsH5Ovisit
No compatibility flag \n  #H5Ovisit3 in 1.12 or after \n + * #H5Ovisit1 for 1.8 and 1.10
Emulate Release 1.12#H5Ovisit3
Emulate Release 1.10 or 1.8 interface#H5Ovisit1
+ * + * \version 1.12.0 The macro #H5Ovisit and function #H5Ovisit3 were added, + * and #H5Ovisit1 was deprecated. + * \version 1.10.5 The macro #H5Ovisit was removed. The functions + * #H5Ovisit and #H5Ovisit1 are identical in this release. + * This change was added to restore the broken API compatibility + * introduced in HDF5-1.10.3. + * \version 1.10.3 The function #H5Ovisit was renamed to #H5Ovisit1. + * The macro #H5Ovisit and the function #H5Ovisit2 were + * introduced in this release. + * \version 1.8.8 Fortran subroutine and data structure added. + * + * \since 1.8.0 + * + */ diff --git a/doxygen/dox/H5Ovisit_by_name.dox b/doxygen/dox/H5Ovisit_by_name.dox new file mode 100644 index 00000000000..2ba48468a1b --- /dev/null +++ b/doxygen/dox/H5Ovisit_by_name.dox @@ -0,0 +1,54 @@ +/** + * \ingroup H5O + * \def H5Ovisit_by_name + * + * #H5Ovisit_by_name is a macro that is mapped to one of the following: + * \li #H5Ovisit_by_name3 + * \li #H5Ovisit_by_name1 + * + * \details Such macros are provided to facilitate application + * compatibility. Their use and mappings are fully described in + * API Compatibility Macros in HDF5; we urge you to read that + * document closely. + * + * In HDF5 versions 1.12 and after, #H5Ovisit_by_name is mapped to + * #H5Ovisit_by_name3. In version 1.10, #H5Ovisit_by_name + * is identical to #H5Ovisit_by_name1. + * + * Specific compile-time compatibility flags and the resulting + * mappings are as follows: + * + * \par + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Compatibility settingsH5Ovisit_by_name
No compatibility flag \n  #H5Ovisit_by_name3 for 1.12 and above \n + * #H5Ovisit_by_name1 for 1.10 or 1.8
Emulate Release 1.12 interface#H5Ovisit_by_name3
Emulate Release 1.10 or 1.8 interface#H5Ovisit_by_name1
+ * + * \version 1.12.0 The macro #H5Ovisit_by_name and function #H5Ovisit_by_name3 were added. + * \version 1.10.5 The macro #H5Ovisit_by_name was removed. The functions + * #H5Ovisit_by_name and #H5Ovisit_by_name1 are identical + * in this release. This change was added to restore the + * broken API compatibility introduced in HDF5-1.10.3. + * \version 1.10.3 The function #H5Ovisit_by_name was renamed to #H5Ovisit_by_name1. + * The macro #H5Ovisit_by_name and the function #H5Ovisit_by_name2 + * were introduced in this release. + * \version 1.8.8 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ diff --git a/doxygen/dox/H5Sencode.dox b/doxygen/dox/H5Sencode.dox new file mode 100644 index 00000000000..fe0995cd587 --- /dev/null +++ b/doxygen/dox/H5Sencode.dox @@ -0,0 +1,5 @@ +/** + * \ingroup H5S + * \def H5Sencode() + * H5Sencode() is a macro that is mapped to either H5Sencode1() or H5Sencode2(). +*/ diff --git a/doxygen/dox/MetadataCachingInHDF5.dox b/doxygen/dox/MetadataCachingInHDF5.dox new file mode 100644 index 00000000000..9ba0fabf80e --- /dev/null +++ b/doxygen/dox/MetadataCachingInHDF5.dox @@ -0,0 +1,1020 @@ +/** \page TNMDC Metadata Caching in HDF5 + +\todo Revise this! + +\section intro Introduction + +In the 1.6.4 release, we introduced a re-implementation of the metadata +cache. That release contained an incomplete version of the cache which could not +be controlled via the API. The version in the 1.8 release is more mature and +includes new API calls that allow the user program to configure the metadata +cache both on file open and at run time. + +From the user perspective, the most striking effect of the new cache should be a +large reduction in the cache memory requirements when working with complex HDF5 +files. + +Those working with such files may also notice a reduction in file close time. + +Those working with HDF5 files with a simple structure shouldn't notice any +particular changes in most cases. In rare cases, there may be a significant +improvement in performance. + +The remainder of this document contains an architectural overview of the old and +new metadata caches, a discussion of algorithms used to automatically adjust +cache size to circumstances, and a high-level discussion of the cache +configuration controls. It can be safely skipped by anyone who works only with +HDF5 files with relatively simple structure (i.e. no huge groups, no datasets +with large numbers of chunks, and no objects with large numbers of attributes.) + +On the other hand, it is mandatory reading if you want to use something other +than the default metadata cache configuration. The documentation on the metadata +cache-related API calls will not make much sense without this background. + +\section oldnew Old and New Metadata Cache + +\subsection old The Old Metadata Cache + +The old metadata cache indexed the cache with a hash table with no provision for +collisions. Instead, collisions were handled by evicting the existing entry to +make room for the new entry. Aside from flushes, there was no other mechanism +for evicting entries, so the replacement policy could best be described as +"Evict on Collision". + +As a result, if two frequently used entries hashed to the same location, they +would evict each other regularly. To decrease the likelihood of this situation, +the default hash table size was set fairly large -- slightly more than +10,000. This worked well, but since the size of metadata entries is not bounded, +and since entries were only evicted on collision, the large hash table size +allowed the cache size to explode when working with HDF5 files with complex +structure. + +The "Evict on Collision" replacement policy also caused problems with the +parallel version of the HDF5 library, as a collision with a dirty entry could +force a write in response to a metadata read. Since all metadata writes must be +collective in the parallel case while reads need not be, this could cause the +library to hang if only some of the processes participated in a metadata read +that forced a write. Prior to the implementation of the new metadata cache, we +dealt with this issue by maintaining a shadow cache for dirty entries evicted by +a read. + +\subsection new The New Metadata Cache + +The new metadata cache was designed to address the above issues. After +implementation, it became evident that the working set size for HDF5 files +varies widely depending on both structure and access patterns. Thus it was +necessary to add support for cache size adjustment under either automatic or +user program control (see section 2.3 for details). + +When the cache is operating under direct user program control, it is also +possible to temporarily disable evictions from the metadata cache so as to +maximize raw data throughput at the expense of allowing the cache to grow +without bound until evictions are enabled again. + +Structurally, the new metadata cache can be thought of as a heavily modified +version of the UNIX buffer cache as described in chapter three of M. J. Bach's +"The Design of the UNIX Operating System" In essence, the UNIX buffer cache uses +a hash table with chaining to index a pool of fixed-size buffers. It uses the +LRU replacement policy to select candidates for eviction. + +Since HDF5 metadata entries are not of fixed size and may grow arbitrarily +large, the size of the new metadata cache cannot be controlled by setting a +maximum number of entries. Instead, the new cache keeps a running sum of the +sizes of all entries and attempts to evict entries as necessary to stay within a +user-specified maximum size. (Note the use of the word "attempts" here -- as +will be seen, it is possible for the cache to exceed its currently specified +maximum size.) At present, the LRU replacement policy is the only option for +selecting candidates for eviction. + +Per the standard Unix buffer cache, dirty entries are given two passes through +the LRU list before being evicted. The first time they reach the end of the LRU +list, they are flushed, marked as clean, and moved to the head of the LRU +list. When a clean entry reaches the end of the LRU list, it is simply evicted +if space is needed. + +The cache cannot evict entries that are locked, and thus it will temporarily +grow beyond its maximum size if there are insufficient unlocked entries +available for eviction. + +In the parallel version of the library, only the cache running under process 0 +of the file communicator is allowed to write metadata to file. All the other +caches must retain dirty metadata until the process 0 cache tells them that the +metadata is clean. + +Since all operations modifying metadata must be collective, all caches see the +same stream of dirty metadata. This fact is used to allow them to synchronize +every n bytes of dirty metadata, where n is a user-configurable value that +defaults to 256 KB. + +To avoid sending the other caches messages from the future, process 0 must not +write any dirty entries until it reaches a synchronization point. When it +reaches a synchronization point, it writes entries as needed, and then +broadcasts the list of flushed entries to the other caches. The caches on the +other processes use this list to mark entries clean before they leave the +synchronization point, allowing them to evict those entries as needed. + +The caches will also synchronize on a user-initiated flush. + +To minimize overhead when running in parallel, the cache maintains a "clean" LRU +list in addition to the regular LRU list. This list contains only clean entries +and is used as a source of candidates for eviction when flushing dirty entries +is not allowed. + +Since flushing entries is forbidden most of the time when running in parallel, +the caches can be forced to exceed their maximum sizes if they run out of clean +entries to evict. + +To decrease the likelihood of this event, the new cache allows the user to +specify a minimum clean size -- which is a minimum total size of all the entries +on the clean LRU plus all unused space in the cache. + +While the clean LRU list is only maintained in the parallel version of the HDF5 +library, the notion of a minimum clean size still applies in the serial +case. Here it is used to force a mix of clean and dirty entries in the cache +even in the write-only case. + +This, in turn, reduces the number of redundant flushes by avoiding the case in +which the cache fills with dirty metadata and all entries must be flushed before +a clean entry can be evicted to make room for a new entry. + +Observe that in both the serial and parallel cases, the maintenance of a minimum +clean size modifies the replacement policy, as dirty entries may be flushed +earlier than would otherwise be the case so as to maintain the desired amount of +clean and/or empty space in the cache. + +While the new metadata cache only supports the LRU replacement policy at +present, that may change. Support for multiple replacement policies was very +much in mind when the cache was designed, as was the ability to switch +replacement policies at run time. The situation has been complicated by the +later addition of the adaptive cache resizing requirement, as two of the +resizing algorithms piggyback on the LRU list. However, if there is a need for +additional replacement policies, it shouldn't be too hard to implement them. + +\section adapt Adaptive Cache Resizing in the New Metadata Cache + +As mentioned earlier, the metadata working set size for an HDF5 file varies +wildly depending on the structure of the file and the access pattern. For +example, a 2MB limit on metadata cache size is excessive for an H5repack of +almost all HDF5 files we have tested. However, I have a file submitted by one of +our users that will run a 13% hit rate with this cache size and will lock up one +of our Linux boxes using the old metadata cache. Increase the new metadata cache +size to 4 MB, and the hit rate exceeds 99%. + +In this case, the main culprit is a root group with more than 20,000 entries in +it. As a result, the root group heap exceeds 1 MB, which tends to crowd out the +rest of the metadata in a 2 MB cache + +This case and a number of synthetic tests convinced us that we needed to modify +the new metadata cache to expand and contract according to need within +user-specified bounds. + +I was unable to find any previous work on this problem, so I invented solutions +as I went along. If you are aware of prior work, please send me references. The +closest I was able to come was a group of embedded CPU designers who were +turning off sections of their cache to conserve power. + +\subsection increasing Increasing the Cache Size + +In the context of the HDF5 library, the problem of increasing the cache size as +necessary to contain the current working set turns out to involve two rather +different issues. + +The first of these, which was recognized immediately, is the problem of +recognizing long term changes in working set size, and increasing the cache size +accordingly, while not reacting to transients. + +The second, which I recognized the hard way, is to adjust the cache size for +sudden, dramatic increases in working set size caused by requests for large +pieces of metadata which may be larger than the current metadata cache size. + +The algorithms for handling these situations are discussed below. These problems +are largely orthogonal to each other, so both algorithms may be used +simultaneously. + +\subsubsection hrtcsi Hit Rate Threshold Cache Size Increment + +Perhaps the most obvious heuristic for identifying cases in which the cache is +too small involves monitoring the hit rate. If the hit rate is low for a while, +and the cache is at its current maximum size, the current maximum cache size is +probably too small. + +The hit rate threshold algorithm for increasing cache size applies this +intuition directly. + +Hit rate statistics are collected over a user-specified number of cache +accesses. This period is known as an epoch. + +At the end of each epoch, the hit rate is computed, and the counters are +reset. If the hit rate is below a user-specified threshold and the cache is at +its current maximum size, the maximum size of the cache is increased by a +user-specified multiple. If required, the new cache maximum size is clipped to +stay within the user-specified upper bound on the maximum cache size, and +optionally, within a user-specified maximum increment. + +My tests indicate that this algorithm works well in most cases. However, in a +synthetic test in which hit rate increased slowly with cache size, and load +remained steady for many epochs, I observed a case in which cache size increased +until the hit rate just exceeded the specified minimum and then stalled. This is +a problem, as to avoid volatility, it is necessary to set the minimum hit rate +threshold well below the desired hit rate. Thus we may find ourselves with a +cache running with a 91% hit rate when we really want it to increase its size +until the hit rate is about 99%. + +If this case occurs frequently in actual use, I will have to come up with an +improved algorithm. Please let me know if you see this behavior. However, I had +to work rather hard to create it in my synthetic tests, so I would expect it to +be uncommon. + +\subsubsection fcsi Flash Cache Size Increment + +A fundamental problem with the above algorithm is that contains the hidden +assumption that cache entries are relatively small in comparison to the cache +itself. While I knew this assumption was not generally true when I developed the +algorithm, I thought that cases, where it failed, would be so rare as to not be +worth considering, as even if they did occur, the above algorithm would rectify +the situation within an epoch or two. + +While it is true that such occurrences are rare, and it is true that the hit +rate threshold cache size increment algorithm will rectify the situation +eventually, the performance degradation experienced by users while waiting for +the epoch to end was so extreme that some way of accelerating response to such +situations was essential. + +To understand the problem, consider the following use case: + +Suppose we create a group, and then repeatedly create a new data set in the +group, write some data to it and then close it. + +In some versions of the HDF5 file format, the names of the datasets will be +stored in a local heap associated with the group, and the space for that heap +will be allocated in a single, contiguous chunk. When this local heap is full, +we allocate a new chunk twice the size of the old, copy the data from the old +local heap into the new, and discard the old local heap. + +By default, the minimum metadata cache size is set to 2 MB. Thus in this use +case, our hit rate will be fine as long as the local heap is no larger than a +little less than 2 MB, as the group related metadata is accessed frequently and +never evicted, and the data set related metadata is never accessed once the data +set is closed, and thus is evicted smoothly to make room for new data sets. + +All this changes abruptly when the local heap finally doubles in size to a value +above the slightly less than 2 MB limit. All of a sudden, the local heap is the +size of the metadata cache, and the cache must constantly swap it in to access +it, and then swap it out to make room for other metadata. + +The hit rate threshold-based algorithm for increasing the cache size will fix +this problem eventually, but performance will be very bad until it does, as the +metadata cache will largely ineffective until its size is increased. + +An obvious heuristic for addressing this "big rock in a small pond" issue is to +watch for large "incoming rocks", and increase the size of the "pond" if the +rock is so big that it will force most of the "water" out of the "pond". + +The add space flash cache size increment algorithm applies this intuition +directly: + +Let x be either the size of a newly inserted entry, a newly loaded entry, or the +number of bytes by which the size of an existing entry has been increased +(i.e. the size of the "rock"). + +If x is greater than some user-specified fraction of the current maximum cache +size, increase the current maximum cache size by x times some user-specified +multiple, less any free space that was in the cache, to begin with. Further, to +avoid confusing the other cache size increment/decrement code, start a new +epoch. + +At present, this algorithm pays no attention to any user-specified limit on the +maximum size of any single cache size increase, but it DOES stay within the +user-specified upper bound on the maximum cache size. + +While it should be easy to see how this algorithm could be fooled into +inactivity by a large number of entries that were not quite large enough to +cross the threshold, in practice it seems to work reasonably well. + +Needless to say, I will revisit the issue should this cease to be the case. + +\subsection decreasing Decreasing the Cache Size + +Identifying cases in which the maximum cache size is larger than necessary +turned out to be more difficult. + +\subsubsection hrtcsr Hit Rate Threshold Cache Size Reduction + +One obvious heuristic is to monitor the hit rate and guess that we can safely +decrease cache size if the hit rate exceeds some user-supplied threshold (say +.99995). The hit rate threshold size decrement algorithm implemented in the new +metadata cache implements this intuition as follows: + +At the end of each epoch (this is the same epoch that is used in the cache size +increment algorithm), the hit rate is compared with the user-specified +threshold. If the hit rate exceeds that threshold, the current maximum cache +size is decreased by a user-specified factor. If required, the size of the +reduction is clipped to stay within a user-specified lower bound on the maximum +cache size, and optionally, within a user-specified maximum decrement. + +In my synthetic tests, this algorithm works poorly. Even with a very high +threshold and a small maximum reduction, it results in cache size +oscillations. The size increment code typically increments the maximum cache +size above the working set size. This results in a high hit rate, which causes +the threshold size decrement code to reduce the maximum cache size below the +working set size, which causes the hit rate to crash causing the cycle to +repeat. The resulting average hit rate is poor. + +It remains to be seen if this behavior will be seen in the field. The algorithm +is available for use, but it wouldn't be my first choice. If you use it, please +report back. + +\subsubsection acsr Ageout Cache Size Reduction + +Another heuristic for dealing with oversized cache conditions is to look for +entries that haven't been accessed for a long time, evict them, and reduce the +cache size accordingly. + +The age out cache size reduction applies this intuition as follows: At the end +of each epoch (again the same epoch as used in the cache size increment +algorithm), all entries that haven't been accessed for a user-configurable +number of epochs (1 - 10 at present) are evicted. The maximum cache size is then +reduced to equal the sum of the sizes of the remaining entries. The size of the +reduction is clipped to stay within a user-specified lower bound on maximum +cache size, and optionally, within a user-specified maximum decrement. + +In addition, the user may specify a minimum fraction of the cache which must be +empty before the cache size is reduced. Thus if an empty reserve of 0.1 was +specified on a 10 MB cache, there would be no cache size reduction unless the +eviction of aged out entries resulted in more than 1 MB of empty space. Further, +even after the reduction, the cache would be one-tenth empty. + +In my synthetic tests, the age out algorithm works rather well, although it is +somewhat sensitive to the epoch length and age out period selection. + +\subsubsection awhrtcsr Ageout With Hit Rate Threshold Cache Size Reduction + +To address these issues, I combined the hit rate threshold and age out +heuristics. + +Age out with threshold works just like age out, except that the algorithm is not +run unless the hit rate exceeded a user-specified threshold in the previous +epoch. + +In my synthetic tests, age out with threshold seems to work nicely, with no +observed oscillation. Thus I have selected it as the default cache size +reduction algorithm. + +For those interested in such things, the age out algorithm is implemented by +inserting a marker entry at the head of the LRU list at the beginning of each +epoch. Entries that haven't been accessed for at least n epochs are simply +entries that appear in the LRU list after the n-th marker at the end of an +epoch. + +\section configuring Configuring the New Metadata Cache + +Due to a lack of resources, the design work on the automatic cache size +adjustment algorithms was done hastily, using primarily synthetic tests. I don't +think I spent more than a couple weeks writing and running performance tests -- +most time went into coding and functional testing. + +As a result, while I think the algorithms provided for adaptive cache resizing +will work well in actual use, I don't really know (although preliminary results +from the field are promising). Fortunately, the issue shouldn't arise for the +vast majority of HDF5 users, and those for whom it may arise should be savvy +enough to recognize problems and deal with them. + +For this latter class of users, I have implemented a number of new API calls +allowing the user to select and configure the cache resize algorithms, or to +turn them off and control cache size directly from the user program. There are +also API calls that allow the user program to monitor hit rate and cache size. + +From the user perspective, all the cache configuration data for a given file is +contained in an instance of the \ref H5AC_cache_config_t structure -- the definition +of which is given below: + +\snippet H5ACpublic.h H5AC_cache_config_t_snip + +This structure is defined in \c H5ACpublic.h. Each field is discussed below and in +the associated header comment. + +The C API allows you to get and set this structure directly. Unfortunately, the +Fortran API has to do this with individual parameters for each of the fields +(with the exception of version). + +While the API calls are discussed individually in the reference manual, the +following high-level discussion of what fields to change for different purposes +should be useful. + +\subsection gconfig General Configuration + +The \c version field is intended to allow \THG to change the \c +H5AC_cache_config_t structure without breaking old code. For now, this field +should always be set to \c H5AC__CURR_CACHE_CONFIG_VERSION, even when you are +getting the current configuration data from the cache. The library needs the +version number to know where fields are located with reference to the supplied +base address. + +The \ref H5AC_cache_config_t.rpt_fcn_enabled "rpt_fcn_enabled" field is a +boolean flag that allows you to turn on and off the resize reporting function +that reports the activities of the adaptive cache resize code at the end of each +epoch -- assuming that it is enabled. + +The report function is unsupported, so you are on your own if you use it. Since +it dumps status data to stdout, you should not attempt to use it with Windows +unless you modify the source. You may find it useful if you want to experiment +with different adaptive resize configurations. It is also a convenient way of +diagnosing poor cache configuration. Finally, if you do lots of runs with +identical behavior, you can use it to determine the metadata cache size needed +in each phase of your program so you can set the required cache sizes manually. + +The trace file fields are also unsupported. They allow one to open and close a +trace file in which all calls to the metadata cache are logged in a +user-specified file for later analysis. The feature is intended primarily for +THG use in debugging or optimizing the metadata cache in cases where users in +the field observe obscure failures or poor performance that we cannot re-create +in the lab. The trace file will allow us to re-create the exact sequence of +cache operations that are triggering the problem. + +At present we do not have a playback utility for trace files, although I imagine +that we will write one quickly when and if we need it. + +To enable the trace file, you load the full path of the desired trace file into +\ref H5AC_cache_config_t.trace_file_name "trace_file_name", and set \ref +H5AC_cache_config_t.open_trace_file "open_trace_file" to \c TRUE. In the +parallel case, an ASCII representation of the rank of each process is appended +to the supplied trace file name to create a unique trace file name for that +process. + +To close an open trace file, set \ref H5AC_cache_config_t.close_trace_file +"close_trace_file" to \c TRUE. + +It must be emphasized that you are on your own if you play with the trace file +feature absent a request from \THG. Needless to say, the trace file feature is +disabled by default. If you enable it, you will take a large performance hit and +generate huge trace files. + +The \ref H5AC_cache_config_t.evictions_enabled "evictions_enabled" field is a +boolean flag allowing the user to disable the eviction of entries from the +metadata cache. Under normal operation conditions, this field will always be set +to \c TRUE. + +In rare circumstances, the raw data throughput requirements may be so high that +the user wishes to postpone metadata writes so as to reserve I/O throughput for +raw data. The \ref H5AC_cache_config_t.evictions_enabled "evictions_enabled" +field exists to allow this -- although the user is to be warned that the +metadata cache will grow without bound while evictions are disabled. Thus +evictions should be re-enabled as soon as possible, and it may be wise to +monitor cache size and statistics (to see how to enable statistics, see the +debugging facilities section below). + +Evictions may only be disabled when the automatic cache resize code is disabled +as well. Thus to disable evictions, not only must the user set the \ref +H5AC_cache_config_t.evictions_enabled "evictions_enabled" field to \c FALSE, but +he must also set \ref H5AC_cache_config_t.incr_mode "incr_mode" to +#H5C_incr__off, set \ref H5AC_cache_config_t.flash_incr_mode "flash_incr_mode" +to #H5C_flash_incr__off, and set \ref H5AC_cache_config_t.decr_mode "decr_mode" +to #H5C_decr__off. + +To re-enable evictions, just set \ref H5AC_cache_config_t.evictions_enabled +"evictions_enabled" back to \c TRUE. + +Before passing on to other subjects, it is worth re-iterating that disabling +evictions is an extreme step. Before attempting it, you might consider setting a +large cache size manually, and flushing the cache just before high raw data +throughput is required. This may yield the desired results without the risks +inherent in disabling evictions. + +The \ref H5AC_cache_config_t.set_initial_size "set_initial_size" and \ref +H5AC_cache_config_t.initial_size "initial_size" fields allow you to specify an +initial maximum cache size. If \ref H5AC_cache_config_t.set_initial_size +"set_initial_size" is \c TRUE, \ref H5AC_cache_config_t.initial_size +"initial_size" must lie in the interval [\ref H5AC_cache_config_t.min_size +"min_size", \ref H5AC_cache_config_t.max_size "max_size"] (see below for a +discussion of the \ref H5AC_cache_config_t.min_size "min_size" and \ref +H5AC_cache_config_t.max_size "max_size" fields). + +If you disable the adaptive cache resizing code (done by setting \ref +H5AC_cache_config_t.incr_mode "incr_mode" to #H5C_incr__off, \ref +H5AC_cache_config_t.flash_incr_mode "flash_incr_mode" to #H5C_flash_incr__off, +and \ref H5AC_cache_config_t.decr_mode "decr_mode" to #H5C_decr__off), you can +use these fields to control maximum cache size manually, as the maximum cache +size will remain at the initial size. + +Note, that the maximum cache size is only modified when \ref +H5AC_cache_config_t.set_initial_size "set_initial_size" is \c TRUE. This allows +the use of configurations specified at compile time to change resize +configuration without altering the current maximum size of the cache. Without +this feature, an additional call would be required to get the current maximum +cache size so as to set the \ref H5AC_cache_config_t.initial_size "initial_size" +to the current maximum cache size, and thereby avoid changing it. + +The \ref H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" sets the +current minimum clean size as a fraction of the current max cache size. While +this field was originally used only in the parallel version of the library, it +now applies to the serial version as well. Its value must lie in the range +\Code{[0.0, 1.0]}. 0.01 is reasonable in the serial case, and 0.3 in the +parallel. + +A potential interaction, discovered at release 1.8.3, between the enforcement of +the \ref H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" and the +adaptive cache resize code can severely degrade performance. While this +interaction is easily dealt with in the serial case by setting \ref +H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" to 0.01, the problem +is more difficult in the parallel case. Please see the Interactions section +below for further details. + +The \ref H5AC_cache_config_t.max_size "max_size" and \ref +H5AC_cache_config_t.min_size "min_size" fields specify the range of maximum +sizes that may be set for the cache by the automatic resize code. \ref +H5AC_cache_config_t.min_size "min_size" must be less than or equal to +\ref H5AC_cache_config_t.max_size "max_size", and both must lie in the range +\Code{[H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE]} -- currently [1 KB, +128 MB]. If you routinely run a cache size in the top half of this range, you +should increase the hash table size. To do this, modify the \c +H5C__HASH_TABLE_LEN \Code{\#define} in \c H5Cpkg.h and re-compile. At present, +\c H5C__HASH_TABLE_LEN must be a power of two. + +The \c epoch_length is the number of cache accesses between runs of the adaptive +cache size control algorithms. It is ignored if these algorithms are turned +off. It must lie in the range \Code{[H5C__MIN_AR_EPOCH_LENGTH, +H5C__MAX_AR_EPOCH_LENGTH]} -- currently [100, 1000000]. The above constants are +defined in \c H5Cprivate.h. 50000 is a reasonable value. + +\subsection increment Increment Configuration + +The \ref H5AC_cache_config_t.incr_mode "incr_mode" field specifies the cache +size increment algorithm used. Its value must be a member of the \ref +H5C_cache_incr_mode enum type -- currently either #H5C_incr__off or +#H5C_incr__threshold (note the double underscores after \c "incr"). This type is +defined in H5Cpublic.h. + +If \ref H5AC_cache_config_t.incr_mode "incr_mode" is set to #H5C_incr__off, +regular automatic cache size increases are disabled, and the \ref +H5AC_cache_config_t.lower_hr_threshold "lower_hr_threshold", \ref +H5AC_cache_config_t.increment "increment", \ref +H5AC_cache_config_t.apply_max_increment "apply_max_increment", and \ref +H5AC_cache_config_t.max_increment "max_increment", fields are ignored. + +The \ref H5AC_cache_config_t.flash_incr_mode "flash_incr_mode" field specifies +the flash cache size increment algorithm used. Its value must be a member of the +\ref H5C_cache_flash_incr_mode enum type -- currently either +#H5C_flash_incr__off or #H5C_flash_incr__add_space (note the double underscores +after \c "incr"). This type is defined in H5Cpublic.h. + +If \ref H5AC_cache_config_t.flash_incr_mode "flash_incr_mode" is set to +#H5C_flash_incr__off, flash cache size increases are disabled, and the \ref +H5AC_cache_config_t.flash_multiple "flash_multiple", and \ref +H5AC_cache_config_t.flash_threshold "flash_threshold", fields are ignored. + +\subsubsection hrtcsic Hit Rate Threshold Cache Size Increase Configuration + +If \ref H5AC_cache_config_t.incr_mode "incr_mode" is #H5C_incr__threshold, the +cache size is increased via the hit rate threshold algorithm. The remaining +fields in the section are then used as follows: + +\ref H5AC_cache_config_t.lower_hr_threshold "lower_hr_threshold" is the +threshold below which the hit rate must fall to trigger an increase. The value +must lie in the range \Code{[0.0 - 1.0]}. In my tests, a relatively high value +seems to work best -- 0.9 for example. + +\ref H5AC_cache_config_t.increment "increment" is the factor by which the old +maximum cache size is multiplied to obtain an initial new maximum cache size +when an increment is needed. The actual change in size may be smaller as +required by \ref H5AC_cache_config_t.max_size "max_size" (above) and \c +max_increment (discussed below). increment must be greater than or equal to +1.0. If you set it to 1.0, you will effectively turn off the increment code. 2.0 +is a reasonable value. + +\ref H5AC_cache_config_t.apply_max_increment "apply_max_increment" and \ref +H5AC_cache_config_t.max_increment "max_increment" allow the user to specify a +maximum increment. If \ref H5AC_cache_config_t.apply_max_increment +"apply_max_increment" is \c TRUE, the cache size will never be increased by more +than the number of bytes specified in \ref H5AC_cache_config_t.max_increment +"max_increment" in any single increase. + +\subsubsection fcsic Flash Cache Size Increase Configuration + +If \ref H5AC_cache_config_t.flash_incr_mode "flash_incr_mode" is set to +#H5C_flash_incr__add_space, flash cache size increases are enabled. The size of +the cache will be increased under the following circumstances: + +Let \c t be the current maximum cache size times the value of the \ref +H5AC_cache_config_t.flash_threshold "flash_threshold" field. + +Let \c x be either the size of the newly inserted entry, the size of the newly +loaded entry, or the number of bytes added to the size of the entry under +consideration for triggering a flash cache size increase. + +If \Code{t < x}, the basic condition for a flash cache size increase is met, and +we proceed as follows: + +Let \c space_needed equal \c x less the amount of free space in the cache. + +Further, let \ref H5AC_cache_config_t.increment "increment" equal \c +space_needed times the value of the \ref H5AC_cache_config_t.flash_multiple +"flash_multiple" field. If \ref H5AC_cache_config_t.increment "increment" plus +the current cache size is greater than \ref H5AC_cache_config_t.max_size +"max_size" (discussed above), reduce \ref H5AC_cache_config_t.increment +"increment" so that \ref H5AC_cache_config_t.increment "increment" plus the +current cache size is equal to \ref H5AC_cache_config_t.max_size "max_size". + +If the increment is greater than zero, increase the current cache size by \ref +H5AC_cache_config_t.increment "increment". To avoid confusing the other cache +size increment or decrement algorithms, start a new epoch. Note, however, that +we do not cycle the epoch markers if some variant of the age out algorithm is in +use. + +The use of the \ref H5AC_cache_config_t.flash_threshold "flash_threshold" field +is discussed above. It must be a floating-point value in the range of +\Code{[0.1, 1.0]}. 0.25 is a reasonable value. + +The use of the \ref H5AC_cache_config_t.flash_multiple "flash_multiple" field is +also discussed above. It must be a floating-point value in the range of +\Code{[0.1, 10.0]}. 1.4 is a reasonable value. + +\subsection decrement Decrement Configuration + +The \ref H5AC_cache_config_t.decr_mode "decr_mode" field specifies the cache +size decrement algorithm used. Its value must be a member of the \ref +H5C_cache_decr_mode enum type -- currently either #H5C_decr__off, +#H5C_decr__threshold, #H5C_decr__age_out, or #H5C_decr__age_out_with_threshold +(note the double underscores after \c "decr"). This type is defined in +H5Cpublic.h. + +If \ref H5AC_cache_config_t.decr_mode "decr_mode" is set to #H5C_decr__off, +automatic cache size decreases are disabled, and the remaining fields in the +cache size decrease control section are ignored. + +\subsubsection hrtcsdc Hit Rate Threshold Cache Size Decrease Configuration + +If \ref H5AC_cache_config_t.decr_mode "decr_mode" is #H5C_decr__threshold, the +cache size is decreased by the threshold algorithm, and the remaining fields of +the decrement section are used as follows: + +\ref H5AC_cache_config_t.upper_hr_threshold "upper_hr_threshold" is the +threshold above which the hit rate must rise to trigger cache size reduction. It +must be in the range \Code{[0.0, 1.0]}. In my synthetic tests, very high values +like .9995 or .99995 seemed to work best. + +\ref H5AC_cache_config_t.decrement "decrement" is the factor by which the +current maximum cache size is multiplied to obtain a tentative new maximum cache +size. It must lie in the range \Code{[0.0, 1.0]}. Relatively large values like +.9 seem to work best in my synthetic tests. Note that the actual size reduction +may be smaller as required by \ref H5AC_cache_config_t.min_size "min_size" and +\ref H5AC_cache_config_t.max_decrement "max_decrement" (discussed below). \ref +H5AC_cache_config_t.apply_max_decrement "apply_max_decrement" and \ref +H5AC_cache_config_t.max_decrement "max_decrement" allow the user to specify a +maximum decrement. If \ref H5AC_cache_config_t.apply_max_decrement +"apply_max_decrement" is \c TRUE, the cache size will never be reduced by more +than \ref H5AC_cache_config_t.max_decrement "max_decrement" bytes in any single +reduction. + +With the hit rate threshold cache size decrement algorithm, the remaining fields +in the section are ignored. + +\subsubsection acsr Ageout Cache Size Reduction + +If \ref H5AC_cache_config_t.decr_mode "decr_mode" is #H5C_decr__age_out the +cache size is decreased by the ageout algorithm, and the remaining fields of the +decrement section are used as follows: + +\ref H5AC_cache_config_t.epochs_before_eviction "epochs_before_eviction" is the +number of epochs an entry must reside unaccessed in the cache before it is +evicted. This value must lie in the range \Code{[1, H5C__MAX_EPOCH_MARKERS]}. \c +H5C__MAX_EPOCH_MARKERS is defined in H5Cprivate.h, and is currently set to 10. + +\ref H5AC_cache_config_t.apply_max_decrement "apply_max_decrement" and \ref +H5AC_cache_config_t.max_decrement "max_decrement" are used as in section +2.4.3.1. + +\ref H5AC_cache_config_t.apply_empty_reserve "apply_emty_reserve" and \ref +H5AC_cache_config_t.empty_reserve "empty_reserve" allow the user to specify a +minimum empty reserve as discussed in section 2.3.2.2. An empty reserve of 0.05 +or 0.1 seems to work well. + +The \ref H5AC_cache_config_t.decrement "decrement" and \ref +H5AC_cache_config_t.upper_hr_threshold "upper_hr_threshold" fields are ignored +in this case. + +\subsubsection awhrtcsr Ageout With Hit Rate Threshold Cache Size Reduction + +If \ref H5AC_cache_config_t.decr_mode "decr_mode" is +#H5C_decr__age_out_with_threshold, the cache size is decreased by the ageout +with hit rate threshold algorithm, and the fields of decrement section are used +as per the Ageout algorithm (see 5.3.2) with the exception of \ref +H5AC_cache_config_t.upper_hr_threshold "upper_hr_threshold". + +Here, \ref H5AC_cache_config_t.upper_hr_threshold "upper_hr_threshold" is the +threshold above which the hit rate must rise to trigger cache size reduction. It +must be in the range \Code{[0.0, 1.0]}. In my synthetic tests, high values like +.999 seemed to work well. + +\subsection parallel Parallel Configuration + +This section is a catch-all for parallel specific configuration data. At +present, it has only one field -- +\ref H5AC_cache_config_t.dirty_bytes_threshold "dirty_bytes_threshold". + +In PHDF5, all operations that modify metadata must be executed collectively. We +used to think that this was enough to ensure consistency across the metadata +caches, but since we allow processes to read metadata individually, the order of +dirty entries in the LRU list can vary across processes. This, in turn, can +change the order in which dirty metadata cache entries reach the bottom of the +LRU and are flushed to disk -- opening the door to messages from the past and +messages from the future bugs. + +To prevent this, only the metadata cache on process 0 of the file communicator +is allowed to write to file, and then only after entering a sync point with the +other caches. After it writes entries to file, it sends the base addresses of +the now clean entries to the other caches, so they can mark these entries clean +as well, and then leaves the sync point. The other caches mark the specified +entries as clean before they leave the synch point as well. (Observe, that since +all caches see the same stream of dirty metadata, they will all have the same +set of dirty entries upon sync point entry and exit.) + +The different caches know when to synchronize by counting the number of bytes of +dirty metadata created by the collective operations modifying metadata. Whenever +this count exceeds the value specified in the \ref +H5AC_cache_config_t.dirty_bytes_threshold "dirty_bytes_threshold", they all +enter the sync point, and process 0 flushes down to its minimum clean size and +sends the list of newly cleaned entries to the other caches. + +Needless to say, the value of the \ref H5AC_cache_config_t.dirty_bytes_threshold +"dirty_bytes_threshold" field must be consistent across all the caches operating +on a given file. + +All dirty metadata can also by flushed under programmatic control via the +H5Fflush() call. This call must be collective and will reset the dirty data +counts on each metadata cache. + +Absent calls to H5Fflush(), dirty metadata will only be flushed when the \ref +H5AC_cache_config_t.dirty_bytes_threshold "dirty_bytes_threshold" is exceeded, +and then only down to the H5AC_cache_config_t.min_clean_fraction +"min_clean_fraction". Thus, if a program does all its metadata modifications in +one phase, and then doesn't modify metadata thereafter, a residue of dirty +metadata will be frozen in the metadata caches for the remainder of the +computation -- effectively reducing the sizes of the caches. + +In the default configuration, the caches will eventually resize themselves to +maintain an acceptable hit rate. However, this will take time, and it will +increase the application's footprint in memory. + +If your application behaves in this manner, you can avoid this by a collective +call to H5Fflush() immediately after the metadata modification phase. + +\subsection interactions Interactions + +Evictions may not be disabled unless the automatic cache resize code is disabled +as well (by setting \ref H5AC_cache_config_t.decr_mode "decr_mode" to +#H5C_decr__off, \c flash_decr_mode to #H5C_flash_incr__add_space, and \ref +H5AC_cache_config_t.incr_mode "incr_mode" to #H5C_incr__off) -- thus placing the +cache size under the direct control of the user program. + +There is no logical necessity for this restriction. It is imposed because it +simplifies testing greatly and because I can't see any reason why one would want +to disable evictions while the automatic cache size adjustment code was +enabled. This restriction can be relaxed if anyone can come up with a good +reason to do so. + +At present, there are two interactions between the increment and decrement +sections of the configuration. + +If \ref H5AC_cache_config_t.incr_mode "incr_mode" is #H5C_incr__threshold, and +\ref H5AC_cache_config_t.decr_mode "decr_mode" is either #H5C_decr__threshold or +#H5C_decr__age_out_with_threshold, then \ref +H5AC_cache_config_t.lower_hr_threshold "lower_hr_threshold" must be strictly +less than \ref H5AC_cache_config_t.upper_hr_threshold "upper_hr_threshold". + +Also, if the flash cache size increment code is enabled and is triggered, it +will restart the current epoch without calling any other cache size increment or +decrement code. + +In both the serial and parallel cases, there is the potential for an interaction +between the \ref H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" and +the cache size increment code that can severely degrade +performance. Specifically, if the \ref H5AC_cache_config_t.min_clean_fraction +"min_clean_fraction" is large enough, it is possible that keeping the specified +fraction of the cache clean may generate enough flushes to seriously degrade +performance even though the hit rate is excellent. + +In the serial case, this is easily dealt with by selecting a very small \ref +H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" -- 0.01 for example +-- as this still avoids the "metadata blizzard" phenomenon that appears when the +cache fills with dirty metadata and must then flush all of it before evicting an +entry to make space for a new entry. + +The problem is more difficult in the parallel case, as the \ref +H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" is used to ensure +that the cache contains clean entries that can be evicted to make space for new +entries when metadata writes are forbidden -- i.e. between sync points. + +This issue was discovered shortly before release 1.8.3 and an automated solution +has not been implemented. Should it become an issue for an application, try +manually setting the cache size to ~1.5 times the maximum working set size for +the application, and leave \ref H5AC_cache_config_t.min_clean_fraction +"min_clean_fraction" set to 0.3. + +You can approximate the working set size of your application via repeated calls +to H5Fget_mdc_size() and H5Fget_mdc_hit_rate() while running your program with +the cache resize code enabled. The maximum value returned by H5Fget_mdc_size() +should be a reasonable approximation -- particularly if the associated hit rate +is good. In the parallel case, there is also an interaction between \c +min_clean_fraction and \ref H5AC_cache_config_t.dirty_bytes_threshold +"dirty_bytes_threshold". Absent calls to H5Fflush() (discussed above), the upper +bound on the amount of dirty data in the metadata caches will oscillate between +(1 - \ref H5AC_cache_config_t.min_clean_fraction "min_clean_fraction") times +current maximum cache size, and that value plus the \ref +H5AC_cache_config_t.dirty_bytes_threshold "dirty_bytes_threshold". Needless to +say, it will be best if the \ref H5AC_cache_config_t.min_size "min_size", \ref +H5AC_cache_config_t.min_clean_fraction "min_clean_fraction", and the \ref +H5AC_cache_config_t.dirty_bytes_threshold "dirty_bytes_threshold" +are chosen so that the cache can't fill with dirty data. + +\subsection defaults Default Metadata Cache Configuration + +Starting with release 1.8.3, HDF5 provides different default metadata cache +configurations depending on whether the library is compiled for serial or +parallel. + +The default configuration for the serial case is as follows: + +\code{.c} +{ + /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ ( 2 * 1024 * 1024), + /* double min_clean_fraction = */ 0.01, + /* size_t max_size = */ (32 * 1024 * 1024), + /* size_t min_size = */ ( 1 * 1024 * 1024), + /* long int epoch_length = */ 50000, + /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024), + /* enum H5C_cache_flash_incr_mode */ + /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* double flash_multiple = */ 1.4, + /* double flash_threshold = */ 0.25, + /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (1 * 1024 * 1024), + /* int epochs_before_eviction = */ 3, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.1, + /* int dirty_bytes_threshold = */ (256 * 1024) +} +\endcode + +The default configuration for the parallel case is as follows: + +\code{.c} +{ + /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, + /* hbool_t rpt_fcn_enabled = */ FALSE, + /* hbool_t open_trace_file = */ FALSE, + /* hbool_t close_trace_file = */ FALSE, + /* char trace_file_name[] = */ "", + /* hbool_t evictions_enabled = */ TRUE, + /* hbool_t set_initial_size = */ TRUE, + /* size_t initial_size = */ ( 2 * 1024 * 1024), + /* double min_clean_fraction = */ 0.3, + /* size_t max_size = */ (32 * 1024 * 1024), + /* size_t min_size = */ ( 1 * 1024 * 1024), + /* long int epoch_length = */ 50000, + /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, + /* hbool_t apply_max_increment = */ TRUE, + /* size_t max_increment = */ (4 * 1024 * 1024), + /* enum H5C_cache_flash_incr_mode */ + /* flash_incr_mode = */ H5C_flash_incr__add_space, + /* double flash_multiple = */ 1.0, + /* double flash_threshold = */ 0.25, + /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, + /* hbool_t apply_max_decrement = */ TRUE, + /* size_t max_decrement = */ (1 * 1024 * 1024), + /* int epochs_before_eviction = */ 3, + /* hbool_t apply_empty_reserve = */ TRUE, + /* double empty_reserve = */ 0.1, + /* int dirty_bytes_threshold = */ (256 * 1024) +} +\endcode + +The default serial configuration should be adequate for most serial HDF5 users. + +The same may not be true for the default parallel configuration due to the +interaction between the \ref H5AC_cache_config_t.min_clean_fraction "min_clean_fraction" and the cache size increase code. See +the Interactions section for further details. + +Should you need to change the default configuration, it can be found in +H5ACprivate.h. Look for the definition of H5AC__DEFAULT_RESIZE_CONFIG. + +\section controlling Controlling the New Metadata Cache Size From Your Program + +You have already seen how \ref H5AC_cache_config_t has facilities that allow you +to control the metadata cache size directly. Use H5Fget_mdc_config() and +H5Fset_mdc_config() to get and set the metadata cache configuration on an open +file. Use H5Pget_mdc_config() and H5Pset_mdc_config() to get and set the initial +metadata cache configuration in a file access property list. Recall that this +list contains configuration data used when opening a file. + +Use H5Fget_mdc_hit_rate() to get the average hit rate since the last time the +hit rate stats were reset. This happens automatically at the beginning of each +epoch if the adaptive cache resize code is enabled. You can also do it manually +with H5Freset_mdc_hit_rate_stats(). Be careful about doing this if the adaptive +cache resize code is enabled, as you may confuse it. + +Use H5Fget_mdc_size() to get metadata cache size data on an open file. + +Finally, note that cache size and cache footprint are two different things -- in +my tests, the cache footprint (as inferred from the UNIX \c top command) is +typically about three times the maximum cache size. I haven't tracked it down +yet, but I would guess that most of this is due to the very small typical cache +entry size combined with the rather large size of the cache entry header +structure. This should be investigated further, but there are other matters of +higher priority. + +\section news New Metadata Cache Debugging Facilities + +The new metadata cache has a variety of debugging facilities that may be of +use. I doubt that any other than the report function and the trace file will +ever be accessible via the API, but they are relatively easy to turn on in the +source code. + +Note that none of this should be viewed as supported -- it is described here on +the off chance that you want to use it, but you are on your own if you do. Also, +there are no promises as to consistency between versions. + +As mentioned above, you can use the \ref H5AC_cache_config_t.rpt_fcn_enabled "rpt_fcn_enabled" field of the +configuration structure to enable the default reporting function +(H5C_def_auto_resize_rpt_fcn() in H5C.c). If this function doesn't work for you, +you will have to write your own. In particular, remember that it uses \c stdout, +so it will probably be unhappy under Windows. + +Again, remember that this facility is not supported. Further, it is likely to +change every time I do any serious work on the cache. + +There is also an extensive statistics collection code. Use +H5C_COLLECT_CACHE_STATS and H5C_COLLECT_CACHE_ENTRY_STATS in H5Cprivate.h to +turn this on. If you also turn on H5AC_DUMP_STATS_ON_CLOSE in H5ACprivate.h, +stats will be dumped when you close a file. Alternatively you can call +H5C_stats() and H5C_stats__reset() within the library to dump and reset +stats. Both of these functions are defined in H5C.c. + +Finally, the cache also contains an extensive sanity checking code. Much of this +is turned on when you compile in debug mode, but to enable the full suite, turn +on H5C_DO_SANITY_CHECKS in H5Cprivate.h. + +\section trouble Trouble Shooting + +Absent major bugs in the cache, the only troubleshooting you should have to do +is diagnosing and fixing problems with your cache configuration. + +Assuming it runs on your platform (I've only used it under Linux), the reporting +function is probably the most convenient diagnosis tool. However, since it is +unsupported code, I will not discuss it further beyond directing you to the +source (H5C_def_auto_resize_rpt_fcn() in H5C.c). + +Absent the reporting function, regular calls to H5Fget_mdc_hit_rate() should +give you a good idea of the hit rate over time. Remember that the hit rate stats +are reset at the end of each epoch (when adaptive cache resizing is enabled), so +you should expect some jitter. + +Similar calls to H5Fget_mdc_size() should allow you to monitor cache size and +the fraction of the current maximum cache size that is actually in use. + +If the hit rate is consistently low, and the cache it at its current maximum +size, increasing the maximum size is an obvious fix. + +If you see hit rate and cache size oscillations, try disabling adaptive cache +resizing and setting a fixed cache size a bit greater than the high end of the +cache size oscillations you observed. + +If the hit rate oscillations don't go away, you are probably looking at a +feature of your application that can't be helped without major changes to the +cache. Please send along a description of the situation. + +If the oscillations do go away, you may be able to come up with a configuration +that deals with the situation. If that fails, control the cache size manually, +and write to me, so I can try to develop an adaptive resize algorithm that works +in your case. + +Needless to say, you should give the cache a few epochs to adapt to +circumstances. If that is too slow for you, try manual cache size control. + +If you find it necessary to disable evictions, you may find it useful to enable +the internal statistics collection code mentioned above in the section on +debugging facilities. + +Amongst many other things, the stats code will report the maximum cache size, +and the average successful and unsuccessful search depths in the hash table. If +these latter figures are significantly above 1, you should increase the size of +the hash table. + + */ \ No newline at end of file diff --git a/doxygen/dox/OtherSpecs.dox b/doxygen/dox/OtherSpecs.dox new file mode 100644 index 00000000000..e53f26e89c2 --- /dev/null +++ b/doxygen/dox/OtherSpecs.dox @@ -0,0 +1,11 @@ +/** \page IMG HDF5 Image and Palette Specification Version 1.2 + +\htmlinclude ImageSpec.html + +*/ + +/** \page TBL HDF5 Table Specification Version 1.0 + +\htmlinclude TableSpec.html + +*/ diff --git a/doxygen/dox/Overview.dox b/doxygen/dox/Overview.dox new file mode 100644 index 00000000000..754722e83de --- /dev/null +++ b/doxygen/dox/Overview.dox @@ -0,0 +1,32 @@ + +/** \mainpage notitle + +This is the documentation set for HDF5. You can +download it as a tgz archive for offline reading. + +This is the documention set for HDF5 in terms of specifications and software +developed and maintained by The HDF +Group. It is impractical to document the entire HDF5 ecosystem in one place, +and you should also consult the documentation sets of the many outstanding +community projects. + +For a first contact with HDF5, the best place is to have a look at the \link +GettingStarted getting started \endlink page that shows you how to write and +compile your first program with HDF5. + +The \b main \b documentation is organized by documentation flavor. Most +technical documentation consists to varying degrees of information related to +tasks, concepts, or reference material. As its title +suggests, the \link RM Reference Manual \endlink is 100% reference material, +while the \link Cookbook \endlink is focused on tasks. The different guide-type +documents cover a mix of tasks, concepts, and reference, to help a certain +audience succeed. + +Finally, do not miss the search engine (top right-hand corner)! If you are +looking for a specific function, it'll take you there directly. If unsure, it'll +give you an idea of what's on offer and a few promising leads. + +\par ToDo List + There is plenty of unfinished business. + +*/ diff --git a/doxygen/dox/ReferenceManual.dox b/doxygen/dox/ReferenceManual.dox new file mode 100644 index 00000000000..0e0a494bc8f --- /dev/null +++ b/doxygen/dox/ReferenceManual.dox @@ -0,0 +1,40 @@ +/** \page RM Reference Manual + +The functions provided by the HDF5 C-API are grouped into the following +\Emph{modules}: + +\li \ref H5A "Attributes" — Management of HDF5 attributes (\ref H5A) +\li \ref H5D "Datasets" — Management of HDF5 datasets (\ref H5D) +\li \ref H5S "Dataspaces" — Management of HDF5 dataspaces which describe the shape of datasets and attributes (\ref H5S) +\li \ref H5T "Datatypes" — Management of datatypes which describe elements of datasets and attributes (\ref H5T) +\li \ref H5E "Error Handling" — Functions for handling HDF5 errors (\ref H5E) +\li \ref H5F "Files" — Management of HDF5 files (\ref H5F) +\li \ref H5Z "Filters" — Configuration of filters that process data during I/O operation (\ref H5Z) +\li \ref H5G "Groups" — Management of groups in HDF5 files (\ref H5G) +\li \ref H5I "Identifiers" — Management of object identifiers and object names (\ref H5I) +\li \ref H5 "Library" — General purpose library functions (\ref H5) +\li \ref H5L "Links" — Management of links in HDF5 groups (\ref H5L) +\li \ref H5O "Objects" — Management of objects in HDF5 files (\ref H5O) +\li \ref H5PL "Plugins" — Programmatic control over dynamically loaded plugins (\ref H5PL) +\li \ref H5P "Property Lists" — Management of property lists to control HDF5 library behavior (\ref H5P) +\li \ref H5R "References" — Management of references to specific objects and data regions in an HDF5 file (\ref H5R) + +\par Asynchronous Functions + A subset of functions has \ref ASYNC "asynchronous variants". + +\par API Versioning + See \ref api-compat-macros + +\par Deprecated Functions and Types + A list of deprecated functions and types can be found + here. + +\par Etiquette + Here are a few simple rules to follow: + \li \Bold{Handle discipline:} If you acquire a handle (by creation or copy), \Emph{you own it!} (..., i.e., you have to close it.) + \li \Bold{Dynamic memory allocation:} ... + \li \Bold{Use of locations:} Identifier + name combo + +\cpp_c_api_note + +*/ \ No newline at end of file diff --git a/doxygen/dox/Specifications.dox b/doxygen/dox/Specifications.dox new file mode 100644 index 00000000000..4ae48d0e0ad --- /dev/null +++ b/doxygen/dox/Specifications.dox @@ -0,0 +1,22 @@ +/** \page SPEC Specifications + +\section DDL + +\li \ref DDLBNF110 "DDL in BNF through HDF5 1.10" +\li \ref DDLBNF112 "DDL in BNF for HDF5 1.12 and above" + +\section File Format + +\li \ref FMT1 "HDF5 File Format Specification Version 1.0" +\li \ref FMT11 "HDF5 File Format Specification Version 1.1" +\li \ref FMT2 "HDF5 File Format Specification Version 2.0" +\li \ref FMT3 "HDF5 File Format Specification Version 3.0" + +\section Other + +\li \ref IMG "HDF5 Image and Palette Specification Version 1.2" +\li \ref TBL "HDF5 Table Specification Version 1.0" +\li + HDF5 Dimension Scale Specification + +*/ \ No newline at end of file diff --git a/doxygen/dox/TechnicalNotes.dox b/doxygen/dox/TechnicalNotes.dox new file mode 100644 index 00000000000..2bda1754d54 --- /dev/null +++ b/doxygen/dox/TechnicalNotes.dox @@ -0,0 +1,20 @@ +/** \page TN Technical Notes + +\li \link api-compat-macros API Compatibility Macros \endlink +\li \ref TNMDC "Metadata Caching in HDF5" +\li \ref MT "Thread Safe library" +\li \ref VFL "Virtual File Layer" + + */ + +/** \page MT HDF5 Thread Safe library + +\htmlinclude ThreadSafeLibrary.html + +*/ + +/** \page VFL HDF5 Virtual File Layer + +\htmlinclude VFL.html + +*/ diff --git a/doxygen/dox/api-compat-macros.dox b/doxygen/dox/api-compat-macros.dox index 6b85ccb3886..4a1578d7748 100644 --- a/doxygen/dox/api-compat-macros.dox +++ b/doxygen/dox/api-compat-macros.dox @@ -1,5 +1,4 @@ /** \page api-compat-macros API Compatibility Macros - \tableofcontents \section audience Audience The target audience for this document has existing applications that use the diff --git a/doxygen/dox/mainpage.dox b/doxygen/dox/mainpage.dox deleted file mode 100644 index 83fc323de0c..00000000000 --- a/doxygen/dox/mainpage.dox +++ /dev/null @@ -1,36 +0,0 @@ -/*! \mainpage API Documentation for HDF5 Version 1.13 (Draft) - * - * \todo Fix the search form for server deployments. - * \todo Make it mobile-friendly - * - * \section intro_sec Introduction - * - * \todo Write an introduction. - * - * \section quick_links Quick Links - * - *
    - *
  • \ref PDT "Predefined Datatypes"
  • - *
  • \ref api-compat-macros "API Compatibility Macros"
  • - *
  • HDF5 Wiki
  • - *
- * - * \section using_locations The Use of Locations (Identifier + Name) in the HDF5 API - * - * \todo Make this crystal clear! - * - * \section cpp_note Programming Note for C++ Developers Using C Functions - * - * If a C routine that takes a function pointer as an argument is called from - * within C++ code, the C routine should be returned from normally. - * - * Examples of this kind of routine include callbacks such as H5Pset_elink_cb() - * and H5Pset_type_conv_cb() and functions such as H5Tconvert() and H5Ewalk2(). - * - * Exiting the routine in its normal fashion allows the HDF5 C library to clean - * up its work properly. In other words, if the C++ application jumps out of - * the routine back to the C++ \c catch statement, the library is not given the - * opportunity to close any temporary data structures that were set up when the - * routine was called. The C++ application should save some state as the - * routine is started so that any problem that occurs might be diagnosed. - */ \ No newline at end of file diff --git a/doxygen/dox/maybe_metadata_reads.dox b/doxygen/dox/maybe_metadata_reads.dox new file mode 100644 index 00000000000..25c905fdfb7 --- /dev/null +++ b/doxygen/dox/maybe_metadata_reads.dox @@ -0,0 +1,82 @@ +/** + * \page maybe_metadata_reads Functions with No Access Property List Parameter that May Generate Metadata Reads + * + * \ingroup GACPL + * + * Currently there are several operations in HDF5 that can issue metadata reads + * from the metadata cache, but that take no property list. It is therefore not + * possible to set a collective requirement individually for those operations. The + * only solution with the HDF5 1.10.0 release is to set the collective requirement + * globally on H5Fopen() or H5Fcreate() for all metadata operations to be + * collective. + * + * The following is a list of those functions in the HDF5 library. This list is + * integral to the discussion in the H5Pset_all_coll_metadata_ops() entry: + * + *
+ *
+ * H5Awrite()
+ * H5Aread()
+ * H5Arename()
+ * H5Aiterate2()
+ * H5Adelete()
+ * H5Aexists()
+ *
+ * H5Dget_space_status()
+ * H5Dget_storage_size()
+ * H5Dset_extent()
+ * H5Ddebug()
+ * H5Dclose()
+ * H5Dget_create_plist()
+ * H5Dget_space()   (when dataset is a virtual dataset)
+ *
+ * H5Gget_create_plist()
+ * H5Gget_info()
+ * H5Gclose()
+ *
+ * H5Literate()
+ * H5Lvisit()
+ *
+ * H5Rcreate()
+ * H5Rdereference2()   (when reference is an object reference)
+ * H5Rget_region()
+ * H5Rget_obj_type2()
+ * H5Rget_name()
+ *
+ * H5Ocopy()
+ * H5Oopen_by_addr()
+ * H5Oincr_refcount()
+ * H5Odecr_refcount()
+ * H5Oget_info()
+ * H5Oset_comment()
+ * H5Ovisit()
+ *
+ * H5Fis_hdf5()
+ * H5Fflush()
+ * H5Fclose()
+ * H5Fget_file_image()
+ * H5Freopen()
+ * H5Fget_freespace()
+ * H5Fget_info2()
+ * H5Fget_free_sections()
+ * H5Fmount()
+ * H5Funmount()
+ *
+ * H5Iget_name()
+ *
+ * H5Tget_create_plist()
+ * H5Tclose()
+ *
+ * H5Zunregister()
+ * 
+ * + * In addition, \b most deprecated functions fall into this category. + * + * The HDF Group may address the above limitation in a future major release, but + * no decision has been made at this time. Such a change might, for example, + * include adding new versions of some or all the above functions with an extra + * property list parameter to allow an individual setting for the collective + * calling requirement. + * + * \sa_metadata_ops + */ diff --git a/doxygen/examples/FF-IH_FileGroup.gif b/doxygen/examples/FF-IH_FileGroup.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0d76f507140eca293ac455538e3b802fcdcd834 GIT binary patch literal 3407 zcmV-V4Y2Y@Nk%w1VYmRJ0g?Xz|Ns9000960{{R30A^8LW00062EC2ui0Js370RRI3 zRF0|3?GK%pwAzca-n{!?1;9v_=82~2%Ax@X$MQ^v?TzO;`PTjql!v~&a*$&x_^J8@fZDn_c7^KNLd&y?J0W8G zTDtqYhww`4IvXm?BW#=;aggiwOME=sTb&>%JH2eJ3jJD^G-~$HWs_*|9KnYFH#|M0 zF%F@=h`s~{B*jgdNrN0~eLSOs7pEu=Uru?)a%QcXHs9#X^Uh;W5IBFvvqB8)ZW*y9Tb!kAkGl*pLlkycun zWRXTz`6H8CzT{V!e{o5qmu6b9RxRf zQ5UPN9QTAI6sxYg?)2+dAK)4+R>k6_m#fGBqSn+Hd&F_8vdaq6 zthBX4N0+QmAoEjD2hGDwOVs2uF1NUWB(1ik809Sw>vH6cxS_loFTA3~Ky146j^i%9 z3{`7vzw@>uFTLc<^6t6Gs+(>;vLvh!!vXti@4nC4D=@_hhvh57^IR$+;Pk^LyU8)Hurjp6A$yevo$?Wn;pkN3*Aq+%vXo^kQdGQ*Ni8P@72C4Bza4wzYe?0m5VOWx`>av_!@!_o>=U=AA361mru-i z@|>j3H}1~=xxC-6PyYz?m^Y8Rd&UPoeE8yzZ)){&3`PC}0BIUxpu%H8iH>MiHNR~( zQ~s$g@`pe_a2|T+w}&*kU6%;YA&RF^p*H**kb> z1qbfX5W^DU5Md%ZBd!3AL_r}A>o^*msH|KUd4;34z#|VGa7u&{N&BWin+E>ALj`k~+1|DS zly&WErO;d3zSaW4)op|>aM7zi;U6vkO0G1S%Z7<6*9lvhVlAKO0 zqzB+`owG#yZLoo5*}Mc}4Hbq!uY+w#4+IZWyn(V5ATko|};IU8P6Q9=jNSYt!+L=P=~Orfr1Q0t!}=Y~)KI z6=2B|a*lb7QM9XYI8-1Nqs;-dg6cOzlqVnQTEWwziuMIBci7+QgQcu3c)< zO|!Xflhqoy!#(bA!@Jk+?sm3aTB~_L4P#=;ce$F?8!ncW z5e{m8&=6kN2;Q{g9q_*KY~dOQ>A7cmaCvt;A!yzdZ5J#5+IJ9>?rp7%9D}bPgbgcHhS+_M0yFgr)(Cdlw=0i z{zMF}y$rwNHJ{M{_U1kECIAiTUylL;HI?e-s*mq0uM_dAUPnLx`*)@Lyn0?O! zfd$xqlb}455rGYu3lvy^&trh`Ks_JGC>N+%fiMUbD1q%|Rw%duD#(E%2nZ=SVJ7H+ zKmi#gD1qVNOgWf6AqXFd(1Jf`gB=JhLx>14_e)7}gg%IZLUe%UGz0I4gfqAt_2dB~ zn0|NzUP%}oT$qJk_=Q@~g)T@PWLSnhcpY|u7-qPJLIVSC_=aN;hgJw4pcVsmc!#i3 zhd5{+eAtG5_=mibhk`hWRYQVU_#US)g+eGFh?t0A_=v?5hD}%>lvs(1h#!?91CH1q zEt7_l_=y|;(}$OkAfyJJWjN{abfQXKnsE+ICgtFp}>Bxxj$c}`_9_O?oxj1;b*l%HD9x?P?_~HpDfr;o; zDVL%qI|3JZX(<4ydkX|#^th5bSp_rMA5WJm zp_J$U*d0yjjZFDum4ItbDV2WX2vr%C*U@7yHxcvINBu~LNjWjd);aEQc2>!iW$83~ zgbT=g87t4S(t<=mor9{KPHEGIhTSK zbE{PUC4k7ML?=bX$o|DA;pL>6+K`o6?h<$T^s|IcyKuoUaL)9ypm* zRhj&9F#5(4%H@-f(Utf!FywM}lS7`6_#5B3o4fftsQEPJ$s6AZo1{Z#v`IL_nU@kE lHxeijOMNM6oLHJpW{AfLpq}`jMYf#HBa}dSDlt$106X7}i9G-S literal 0 HcmV?d00001 diff --git a/doxygen/examples/FF-IH_FileObject.gif b/doxygen/examples/FF-IH_FileObject.gif new file mode 100644 index 0000000000000000000000000000000000000000..8eba623b1d3050598551eb322e95cf9081e08fc5 GIT binary patch literal 2136 zcmV-e2&eZ)Nk%w1VdVhi0FnOy|Ns9000960{{R30A^8LW00062EC2ui0ObJW06+r& zl#i*)?GK}zwAzcao*|%afC5N*pLvMeigoTQs-qcuWoV;#qRO!TVg&%iqVb4KDwoXW zQ73dJS=6d^Bt;I5+hM1;1-QW7Z8_YYrDhig1oUHs>*zElLvn&m2JZ;Sfl#{blGlL_u!%gEWKC|uJV+?T3{s7aS zJc!2wU2h)*4-1}xQWNd{?OeBR5#-g$hmeiBg-W0pgp)8Lg@+6?ITR%^BLs^76)9Z| zr7A6Xl4a3yO1M(xpr# z>1+x$>WO_)t17F>vX#}X4X|b%#Wn28uj-zPjp>!F6tiblrd8`{nvb9a@tGUP7N=c+ zJ~_~H;Vx=kxqzrD*gMo;KfvJvIt-$C@CUe}BrhO2k#Z=>Y1?!;B&HGQ(T?;?p{BVO z>MWk)yiH>HFcH(KJ+5B+B#{~2p>>-XBl?VF*vx9HZYzm(apRWKm?8!p7%zvyq?6nA zyb~bgTgf?youD%J@mETMCqL_+`g-V_zGl*%8B)MNi|%clSl~ALbo*8Ri?0e#1-W9F zHSZ|_V1l~*ryy<2Z8DZ74KDW}gp+|Zp@S8cb|Fd`YPg|r5x(@HURPmQB3dV!^v-3E z^uX9qcQsbji~-fy)_Ezmprc4V?g->mEdsb+kLL)6VCP1e*N{t)O~1{DHL9d`C}AckSW#W}FqK1|1x|C21CdSgBP8o#obBZ=W&J+Lchk z*8->o_L}Q#!T##RrK6AvoNrwJERyUZ%2AOBg~aCJ z>#3P39U&6r>F_S3+oGAztagLF?J7>^>BO@Ih-*&S#jKP$Rdy27ePE8 zMreQqsY5cD`H3@UoPL&o&kaDu90JQNPXzL?5(??AJ%0sFG<(QZDlC>>s*L8#cim~@ z&3bml;LcqIQeT^f;+b`l9sX=}j#clBG+Zu`81^Ldmisl@VVAAe*_5Q6^V)2ufDzqr zlO^{bbgOMQy?BG2_TFFhJ~#ciU+Rl;2!>+-kxs%Q?8HYeq&yFJcN(rWr1D? z+A~z8^HcPZaJFgRo9C1a^^7K;bvibbhVFWe?+jX~>t>EuJLe_}uOtayE}6Q~4ZchK zhiW$OeDKhZYq#_yFV2$nw2?8*@h-er(bc9Bs^I#?%6EiHkl3n2zwXh5yahkr-&gHw1&zwt$D zRdFy_{TR}zHw>tROzab^#+O7-QA&v9d*b;Rbs9|n2+>%r$QB?9RwbK!YKzn>7P3yI zEoKGhUOvm>7@=53Paq34Wf()Mx)nw@s)CAKbVRn$C>k|li;a0SLJ-MVEhNg1h(#!* z`{J0cD6Yeif$QTViHOB{S<;Nx>Y_!gP(?;wF_Emv4XsLrMrW1bRT~hTC@*P6+*}I= zwMyfxfa4YLfbW%+gd}WCNk`tGa+rgRm$xFv%j)?uT!RspQ~0>dX|aV`nT%vKiS?9X z$!l#ugvqn2Nv>|D1XxgNqB(~|lh9?SE2%&Q3s^ZlAOO%`Falu>X%wS+9&iD;3ZFb9 zcB6m(tA)lRMvNk`o%s=zgIoKTJ!=Ldi!q@8IsF@nNNiJ4oP08)ep!V?TiGy7FpAC7J{ei^XWAXXVj!B zb*cR$=twE`)Dik`iOFjjnPfz#fT~c38}vz5A)~XAU3G^JY#`8_Cc6t_HLOn)s$l-N zwXIIAo+^CVR^etfr|NT|AJku-T9hA?;Z3&Lo;%Qam^nyta)gDU zpH7%hn`Hy5`IPEq7)v>xK(u#-I^hj%Q8wsNWwaFh5@6MeTF@%)wSU4{L|@0+1*Vp% z`Pl6Sg=$%i0N1T;yPQ>_SzO1x4Y`v4``mF6*<9m37mmsGq28EVH|I`wl+ji0a-o}D z%H|cjfRpa^$cwbcfw#Qg9q)S6d)@cut#If?5q;&W-R;6MyzO-_b-Qcb`2Lr_o73BH z&DppD^Y${DQ}BY@c`*Avc%3ql@PuWW3rJmqv zZpBbnTw86R!>f<^-Hc)8*{ZB`dwtp~S>rmuvW^z5v?Jj2ObcWi<4}M?&aqT>oS@*Q z>BHTL-hrWfFe*Pv%ckQGmbv^L$buOrM;^0}3TtM!d^ycwW^)>@%tS38aUpAlv-j3J zV)Eu0&kvq6#;ELPngUwSeI|4%Z|y8xL-RJ!;u$ob7tH9*$XU@$jdVyIJ>UyldZQoS O^l>^3=MpBM002A2s2P9& literal 0 HcmV?d00001 diff --git a/doxygen/examples/FileFormatSpecChunkDiagram.jpg b/doxygen/examples/FileFormatSpecChunkDiagram.jpg new file mode 100644 index 0000000000000000000000000000000000000000..03fd90aa06a229712d2e2872b17304432aa18716 GIT binary patch literal 29237 zcmeFZ2Ut|gvM;{K85GGNphSt1b5yeAq#z(ka?S`2K|pd6P!vI;q#@^=gGf$-WF&(# zNEk`;7CRmHKKJZ<&%68G_y2!ykKb|@y?S+5RabXc{i=G9)5t~Oin6?tJb;3N0z3l$ z0m!8*J96GOj{!hc6<`AZ02@F@5d%=cJ3R0YY@AclKU48>(0B~h+iw3{~ z%kaU!CBX}z*#iH=zP$VU^S1>4mcZW<_*(*hOWmjrj5xHP ztO*j(YRHa5|LwjuA^xX(G!Y&ENJ#j{{XZ-V?3b6)``fbke^H12=J{_4{4IgMCGfWd z{+7T$B*1%{M^N-OpXhB7dLBMeULjFl5#T>61JMk?6mSLX0D3?U@C5H2flFfqxrBG! z+TGn*l$+bpjmy-+$;^_=+{uC4+titxhwC;sATH(YY-(<2=}vEEX=URm!Sc1Cg@xY6 zLV`tKK=rn&^BqfT8%1ANOKo2@9dlnha}f&`DMg!C`$tiAf-DG0D#m>P_MbFL0&Bn{Z#?E%x2nrT9HZBe>2_7B^8w~{w z+rRxmwgOkNQ7BL`(NJyzs8>gd{9u)&@nKvuyJtlzzS7Y z08|t-G*omn3=DKIZi(U#J_pdRVi4cpk-@yCX^M5zg@iXS{v9@hY*`zr)(DJ|&&)Ll z2bYYTf|81fnT7Qh8^3^{kg$m8ox5`K3W`d~+B&*=`u86gm|Ivrwz9Udb#wRd^z!!c z4Sp698umOqA|dfbQgX`6SE-p<**Up+@AC`FD=Mq1YijH2+dDeDx_f&2`bWpcCnl$+ zKg}#HudIGqTi@8+g71GjI6OK=d_TG53k5*?nXTVA`vYHBLB3GY(b3ScF8M-1^#U)n ztLPXvcrb}&G_g!wuHEDf#3qrAe^=Iq!@#EnBQ$ zjj@05H3Q(Ip@4&jb`_8UPUIt4Gf;oM3T>&PlM~IE_VRt4EN#fd`}QpFuiSfsUvUMC zk*K?9ifOrI-g~w!ZU_m`?mls09vjIq^tyG}GoVmAWD9H-l{k2?3zzV3zjWNqH5wU0 z4;<-vZ`wvG;Yy26Yn-#ZaZ{r@-mcu|#?uW>e0652-7FEw)hQE&yQkR~ht6A5kC6b7 z8NvG7mHUCiS$2P5o5m&I%1am*i!pIpyD%A%n0=?{Olo4OK6OpltTOd+3{I4p{au6t zLqZ*We0)Nd2qmT!*Zpc8ef|Vd?;NE}B~y(a0yGOslr*ZmJJ9M0);?W4V;6l3Q}bAj7Y zljqu>FDbeaLZT^+ad~M@cr>xgRvSh;X;+Lr@|rH6f5^f1F=~{QgSFnqW2G(5oycm5&Miflnc=sJf2 zio%T;X00#!Y;1cy*>Y^E#4312@%5n!cj8(P=#NRZdSKE0MhGE=RHh`|qGdqkn*3*0 zI*$N`ygUhCy)GN356n@^-!oro%8@etB$Z#K^B;U;?=eKD4U)<*p6Zi3!A&|+l1Dzz z$UxQ63ur~mhM}K~)Mc?_(VtA2_<%aihXkesFLXbiaU+2Q)g`A>3_~QaQ6_x_3A7Im zBZ2h~opcELMkKJJ1NlRN?zE;f4djetm*~Q;Q3eSF;SF5~=m^A8BD9Sw3?0<(!AZht zA~~FBBOxU5!W(@z=`9=;`{SGyH&ne2G_WvoycgQ*ncr3$JWg50ex%1CGhC9E_VUZC zS6LhbN_}QZEct~ku!>5l@B4793v6yF#Dph_1{NI>z!STJ1k$;$Ko*0(A%SSke=5;8 zl>=OaAY|eq<~E!YbIo=5SMq%r6Yn(0X^17514PBjEhPNp(tTDX<)yt0GL7`Hr-y2Y z3M9Z7)}K&1gb|EPa%1f5QGztdrRAv;2s1`m|7%YiS$h)m7&w`c87p ziF&3_Y-8AFmxaQLcFn45#?GYU+9PS~&VzlOGali;JZCfcL!%A2w`%H^Y2vB;7t^2NE!K5JLjW%Y_g;B(R$3ZFte9hXhVIG|;7fKSXrD|MNc{ zF+Hw|Wo|6HnUJc(^RP&=tx2JXTg4m#DtfwRc=(;2V3AACX zBLS+ce=32tM*z!?7aZQM-J^zu4gRhaH?;PZn8Q3HGQ1eO0Xl=Er>xdofeAwm<*&ApgOT$NrOc{tJE0zu-U^4?jk1RV!;L5P4-kY|mzNU;qqm-<-TN?=~dxaO%4T7W@CM zC}f_%@j6mNo*n6@dOc^Xsg2G|k}7qQ|6&@%%h0=c1f7piWiDzznxN6G>2xA`Fw^DW zl!pks5ke+Bb&7egB;88MbE5N4tA)1XN$Koemp{t=KhRNXkZ|>mLKl4Ej$%2+FUd?P zcN^|7u%)oo#U@rMwXR1r9gaH>q7!Kss&Eb5otx&?^}4%$0;}~mZ)bCntkgzk&8Y!sxYu~U?irP?s_-Z`z$zy z()>nPEhAOMd+!gbW1RL-F3u`_mFdRmXH=>KMOiV|HF53?$+vB98jfpV668fy&dzb| zUr;;fnpOb4<(oo0y`MJADAAxLI4o|j1mR#+8H_iY=5A`tsJJ;5)X(2# ziZa~P=OaZYq`65P_BJ|r_a_=kqWEWi^HMWLvthNQO+Q-( zkL;Q`!{nMyX+#|^3f-&M_N?v6c!%2wg{qG=`_M5c&4UA63=i9EMZ3a6B$;gM!=7`Q zS5&r)a!yX##7x95`_yzkJ74d7E*qofjhU;qFcmjBbg~uGEOzRk-LVZZWlf#jnjH+4 z85v2TzmPAzAV&gy%&?mCpkgF&a6hYc#$z%OR;XA$&fpC-8+)Nd9mQ_}^^Bj6T7hLP zLCzAK@F3G{3rIjNVpQoCf4JdwT@p>L+dr6lXmNkC>9D{4lZULRbAQnHB^i^MRQF#wd3|_jCVQiWv=m2Jwodc)@7-7>oJ&z zdUc-|t(9fW&e{xrAI;4(7voy2Rou&pA5^+ds??($BLa;Gz-7(+>AC^hO0kqkVEZ+M zZS4;#15NmLA#Q~Ppblq+@d(TO`#rF{_D!bUdeKe2#X{wb;4iVhz%FY+`b@po84{R5 z0t;WjEljG){p)umP=y3qK3wplI7Z~37v@2R&P&cOOyF6k`f8vxbZT;X*0Lf^w()Ph zTC#CUEr8f= zE`Uat9TI?~oLQsJk!t_gzrqm|R6ePrmgDb`?f}ja-QSb`@4PHx^5>R^o>iBG>>vcQ zgGR_%ab0f=me0xv>V4O&fYnlRjyYX>I$m~4^~QFNVNfw!5K*$k23lq2AIQI$7;9O- zn7Tj$+=yX}dbYeD$&cMN61#xxLcZ>UHYQ;BpS@eKPsVd{!!M#eh^GmBPWS0pGHHt}75bJVKYzvg2mN zbh&B>%rVIB^Jc~r^#D2$`|8<--K!4WZjELE%$e^DXY~g^yfnP-LeHP>Sh-NMtFd?R z4bvLcmkqP2>Yh_wh}#%1in8Nw(4NpwFKM8U>##quUAg6kM`VMNO+FcN6!~7o*C&`C zWzg^LTSEx`OjBdYwd>|;vb|kO+CEnpVmgV5ChH5<#Z93dIo3y`-N`9VTv=8?gc-%t z{WX3Ltb)DIL}nQ7?mxMfnsR2|iCr@aA!Hv;jaNCQj(KJcX5V2drKRbA(UOTG+scM+^emt9eb4Uz@kQLunUFp?P}`5 zham(!{i3dBAL{h`-3W-hAe9P$Y-o-`V5HWdrKrA0cS7QxeuiPNy^%q9=P!C{SCZK{ zwQ~G?9k$+nU9M<#e~)|4KEACDJDBj{>V~rb zP~p>0^g0U_3jqgTiTotWrYtI>tNiu&_&(R8ZeEpQyS0-IsEH;H$wWELXtx@83_UaH zCL$#EadA)#NG# z%RfUy0XlvDI~Dk1QFs- zGV)mT!CTnSf{2`=EvZjb1Q$79d=|{B6Cm84bEhQLe8EvG&|88D4OFTPH$41}dt^rT zs#Fb@IE!`}cvaaCG^Aeb0IP2?To&*oSry=tJvt4+$_}FJ)PcB8=>xp^l=$)^m8Wip zCD*2IB4Xh^_ZlXv6vM*KSWMAtJYnUf532Jm>1ilmMiH!Ii_8Yc`KEsox{!0a0-4%@ zoM7l^H`dj2kH6x7;jnNZv9~pew=Gi4ee*%_dUR$o3#Gmu1%0e6Av@?F{%%rb^TqwH zL~2PJfprmbodpS?=+&Qqrq+M!al0fxg06#>2KFUwF!qP60#=TXnO3SP#HC9UwyV z-+G)Tw$u{ro+e9u&etL8Q2d#o{#Is*Ie?a+ z{zyb1$Cwj-+9t^h|1uep>+RS%lq36*^K-g&IBKt=hH?d}Cv>IzDLmh6geyyL?xkqT zu3cW2-)6SA+S=YYO0{9(L}1_77dp;TUrYKMOu|fP&xBTHH!AB)Qxqmv>6ofI!eX=& z_j~BO)d1le>f%2%t#f74HiiJX+u1#5UUh+QCA*wU(R}SQ z7h%gLM0Zm?-}!Jvv({(?W=9p`NYiyCuO2TRZtF)`Bu*=daPnJ?QN^TL6>fgJZ<}0Z zG@~Z?0llB{p_MTG;pW5RGd3iE>M)B0u%CuUnO}&T53NUR@Hf2Tc7Gz4pJI{Nnjjj} z^@3Q+ph`72?Pccoq>=u-cJLL2G;q%Q9F|9cxQseNw;64r;o{0Uxzyq6%d;{gBa%?p zXjo0FQxrl_jdn?O>j!yv(`^PX_;p?0Eu5?h?8=z5i&J z%n@_LRvSDy)&puCXE43(3RLo*DO143{n{QP!d&MY9cn=r}JJ)wu-T$Wx(+i8t?687+Er61W8=i$OLQT*zC z_NLJOXaVL?ZONkT(s5Dop2U*Lo61)lU~BQCSWHUq&xF`pqF;d81ye4dM+Yu;lEoJ z*&sCMn7<>CY`+88O)Z$x{yh4vNAdJ?*i>>QI=DEos62P?B zdt?3$^3EL}pAZy?A{cJ@&7s9&g0o-9JyAa;ut`5LB=D#LF%PrtJ0tYl#`TRuf==r4*r_imJn zQC1dkZo92eTcY+_An4CnhXj_{>p@K0 z&Macyrpe)@rC?aHUf|NclKgmJw`~t6_!e#b2&aG zwGG|t-h7VD9R847bFD{^!HiehG;w^%Eut*bj|9FREB=764j!h#?&P>geTP?xF~dPj z*X;bWwND?G2v&@j{-}<2Oti!fOG#4qO$7(Xd}8zn#`a7u)b}(1h6^36#!m_akZCUg zWF|1`chzVD1fs!c$Q%p_oFRU~^;4wI5BuFOjzqO-Q&Uau~#sGMX-I#j_VaLZ9A zHg(K0PqswMII}eYN9@{xgwRq?SP_(?swa6tEl9}PJu>`CTma4Odsp|^^ZtA(u=>Bp zUDu4C&Txs-qpFAxMh{rx&9#}MoeOY;Da~G@z0GY=EfivbkWIy!M4L+z+w(`JJW+WC%3XJe!SG!1XCu~?k0^ea^oC${uf{56ApFv3e z$Em>jf4&+K3ZiGFn7gx?wz8_Udg7+{#q{dj=9qN0f6y0iu8eC5!Uui3M&~tMEkrrl zZ1#RKaS_5JTweAjA| zys(6EMIn49(j!{SX`yLQzmKNor%Ic?{!KCIsD?AM@@03332vin+y+2b3DLLk?fjLA zlBV9Q0 z|Hz&RZU;RL3&B=i{Ab)P>vs(e;q2@*l_pmzecZ#Vm?|fq-R>Ro zH3o}v>lS~@^Hj-__g$8DHpPtP38Z-=d*(9TK98lbmhB2M;|4jK*{s>RRAZm>5=yON zc!9CPt@%7Sp5kausMu>&%YotSe$$aX3zYj7sIt!U1wPlYNyot$PraYaD4krQ4q56@ zJWV@soyen$5_I<{ZN4JG3`?5!yZ)}`&XC~`ar}ir^J-0b{@-prbvFktpVcHN& zOm2NDE83vP&~sYS$s3hphj>`e+F4MhdaI4PK7A zD{@hd;x(N_zo31%okVLnVABYxY^Wh}{&l-q_b8$0$gv&DHLwv)F7qKMnc2HJHp%_@ zt`hG3-VGeH;t;L-yW;Lcau11O{A_HT3W;##N;d0BzRiBGNsT@nccHevABV2o>6BDD zy_4Z6@?A#l9J6?QduiOk140PR%IjyYs;~a`E)G?QolB-|RgVQ+XTLMflYvHtZp%d^ zX@0I;t|3Bp{yM6n<=D*%99x(oqkI$>3O-*$;AHt9z}12z=*~SS2epC-*6iPb?9^Q+ z1M@U6yK}jj1JavFbRJUq^_)GT_zw|vUCBRtDt#Fn z_&KWa%QsDI7ajQ=;@Z;g@pJxDZ%3P@+@`V$c*)+hEk14M_bp)#aCOBBnn<{q+B(Q^@?s=)fyDV)%m&vD3;_rjf*txx||R9 z89yx;ppgC~1#`%Q?1TIMurJX$ngwVcTn1YDNKm$Q^b?Rkhs=i50Re~$Va|Y4o>3DC z5MY7m>ad{t8MV#AS-doD)nC}ybudu@oGGAxP^t@>ceU91 zsG3=%WGAO4dUeA6ykH<3)x}v&WapOOb$Foy>}!y_1Jz#7z}xnIb{|>^L-m<~0u%-z zU?o-=I2L8^gDhnn(4AoRA%Wn_1b_r^MuY|rLpG>cE(j{WUMOY|8Duu5Tu>2#jzWfg zIzn))<@?Q8gtY|LMPNB(aTW|stVRHb1%Fjbn@|6278yG&J4I4iMcdm~N=OdKh|i=Y zhP~D)V?%u?zy9n^nXq;M%35OE0##)!A%aDI1iItbx5JTH6TduBd0y0;LCoh&D4ap$ z_CLzee@QlYe=@MA}l$$E;#b2w$}QUMY>+;w4h>kUuE923E1=U)C1NzgmKt z{ShH>+z-oKDVVRbXL}qt>y6bux)gl6qA(4;M#s40Tf0ty#+bUbc%H$}TD%fn`3tvm z|6k@7Grg-x&4ED^#xzmhJ?N)`E*xj!kRZa~)I;dOeedUQpoi*krsc_s(fR)NhylU%&4_nGr;Yk15q1|fwd+x;y;-W6QKy&f@<%}?rIq^aqyvLr8b2$ndpclO*Li!0~R(wV=D zy;6oAd+91|CB~a zqWSQmZu!)o?0fMwwU+U`(CN9)IS~xh)~@nL^V@HhN(<{^#sZa(&}{z!b0s58?Hm_y z#koGBTcojlPS9{WEic|IR20ZV;vR3nv8bsrqMuJ1yIDQU_P1iO&;eFZ`E5Fbjk3H+r-+ zrLX)&`Yi%U^K&xbL$P-Cp`-_*k}lU9%=(cZ|w{@BQK&^dReJ@p+W$^^)v;gW|w3H@F?_l z&RuJgLlk)eJaomj1V$~eQPEaF zhnBKy19(j+Z-hGrJL*LU#?h3n+>kb{Q+{g)%}mtSqw*YYg^kTA!M>^4ouZFHAr)~- z*3WfK#UwYhlr$u8dN*t@g9Sf2RinmWf(;Tl{MeG@_J?dvU8T8dWj#I70@lp9_8;5^ z!aK`DX9;v9kZD1ubIf{G_6zAFlf%9A6YN5@$eW}d_}PzwcnMf3C}?nhL*Rc!;{Rf= zDC}RZGJ0ubciFZm72D7)s5EZh7XCSH``7es@Ec{drIPL}LXYn2JQCQf-)hntyAXc_ zX5-kM74{>6f0@;YKK=)!+{J`6ix(k3z$LXRkmms=)z|hMLMP)#EFOx6QVwDd@mKy5 z*8hzJln-Yzm32+9xgtH!{m+W^)#*1BO) zMK3P6FFR2Cg|R;TI)v0rifZ$>BLb+@t*TK=K9Yv!Qp)=+VJESjtj*L2AN~cxjl>zQ z*FeyNDg_1i>D$WBV+h48rV2mS^d>%)-4*G{Wv6Qk&+S<>y2?+HPa5#2$15x}}OeD>bmL z(dNThYZsPci9)~yzY}zjtf}r4oZTCuB?n>B3qmjzXGLHZL^X6$^Exv+K7g(E_DI1+ z;=X~oCO@}&4U94MgdMNv9Sx+PnV(GAfjQfnTj|7+7vDN)>F~gm<8Z8tVS$;E`_0^N zxs+gW7D$QhgWC^!YUK&>qr7!!SL39pRI{PoiH^N9na%e{p-*|w?CaC@Mm&;-`QIBQ zUnBjT92eZJLDA+z**rA-&fVmtHA$zJVB)aga4<-vS7dq29jdB)i|4jYJ$OA0_x!kVrM){@E$slUpJ6n0)E?;YeM)4lMcjJ5ULHALVWZ* z(7+--0aMu4twO~m^=r=57^P0{YNcr}>nCSlcGD2M`$`INsaGJdkf?)r;pGI%u!jcH zxdysgl>`DFCgHC`zv3Yvl}8kX!6FDL zB3%vU73w7L@v%|zWPStMSH*?)$StK-x+N1yKVn4KvO3k7bK`6M2`8%26u_0v1A zy?u<{X^VN&SW#~ICf@bmbj?UqX#M5KOX=WfUI&9N zE-XlZ5=?mpmQ8dJ$uv9Q!1o`4((JsHW`s64P4~wyTlI1|uK=r3TvW|~Gfm4joj7Lq zf&zwEiAB8Wl{yN{g%-m3oadGxL@VOpj9ym1;4^9>L0Md&bZj(o%a|#7?(WakKk;X@a{gtr-TN1zRd_=g%NB7OH7<+X}{%&0!(t) zMN#%p4>#6e00({Ut-=peUkPMOSP^3>^A$HwjA*~-EBTY9@ofsiKF{9E; zo9VM7IK_oBdK+{SW;z2xTYHg!<}gjblNj$!BY#o`5xQNv=ThdEVfwY;qv!>u}LoPNA=qEq9W(n<0HPm0i5i+LpBq%&Y0je%AH3OSjW(v+r&AAd^kA9CN@P4-l6 zrB14vX@)$C=KFPD`0ixFm?k1%|8^s6EriP6EJq+5hqH2*Vqf%Hfchi1A?5A&8AOs3 z+=o?M9n?&-hn&VU|Eq~DEf?*-{Z z1vomfs_hPqk87oU3<^phRs!D}nph1x$IJ5v-LDO4*5XZgEz^bR%TGFTbM7X4qfod> z{>#%ZBwP?0-ILX33PdmB+tOYd^dnW58(XCpYr4B~n4S6b3cV+0{mi7-nipS4oo-MB z>wDH;jkoni#~E9MCr?oa|FFP$YIo@sihGU>SFiPczZ;@-gcUrR15-Us!Pu1tQSom>Nz{(?ER?pvoBwB^!~qQ@?a=|r^&YZkraTJDQr z5_Nw`W~d{g=xeC6oWrSscMP8QB&(TWWeh)su0}tAR*KrhxAf(>BRy=MsCvX++F@U|#4`W$^c<3k_PFCzyWCOFQpe|wCH_X0o!cp6iSh-$J z@K7sSj&#Q0*cYPsN{CfNa(lIorLh3Te)3gygdCOyds<2^<3!97ucW**#?d_}64|?#Ycpv(|qHK@u zLXkJand`$lD3L+9!M}FAm28Std5h!jV0>??+OtczE>A`ZuNjr zDvDG}Nc*iX?x?o1e)7i)3weU>4<09U@|yQAu1qYLz>K2{RW8bp`Y9LC==kVa4nNv! zzj$bP@8Q}{YgC`wA(=ufQj^3ugtFtVLJ9jJDn+9ylt*~C0Q4pR!@hAq< zosy!VS(!2fhbQ;t>!V*3vO^aKQ+UdIqGF5!G@dwq9j*B-)`619qsZtop%b5;V~*g{ zOE-pbg%=t#+PL_e5_Coq#|6GZp+{B2R4=w0l&*=ZW%8s69FNj}jZp9Q^1L7%y#X54 z0pfBlIXzayp9a1e>?P0#o72t5DE632)4q~(GiZqrFcP$LuY`G)zlN&ec0Ja&bzI0tM36nmBM+@hR`46^5ir;?u25uQm)3lF8)3|+`)5ROKy zRi%^I)>{tnd_sunjZZ4-$tTRHI5U{Pc{fM@JyfJyLBiUE#I|^8YFs_I%A@YV*}J?~ zoM&qf(bmw`9A*ba*JECwj83KdIizr0aI?0Y)~nz_pF6RyQ5iVjx)Bg!28ZtOT3W#Xzy1;BM-0e<^LB4eZ2z)CcW;Ei9hdS9d8Tqc0!=k_Kg@Eo& zZ>DPOPe7cIG7^;XJ7lBN$RZ5L6CG1xuuOk8iT+&6y($Au$uji0{w3B3= zaR2bqyaMJ~oL>}I6wOqbyeQuza;IMA8@^jqjPGzW>x5xP$@_FH+ilm1?|0OB4Zjc6 zVhvyo%+|c|7`o1imQx}CpK2W<@RNbxm^^&FYk-%C+fhDhJ#o9Phk%;q+qMyN>~mTG4(@1dwW&rWA^thbjlQi%*z5OnQ)KSaoKkYmibLWsAxmrRG_PtoMI5Xr9W@= znxy>3Gbj2tKwyJQGXGSMS5^ALu=>*2lM)2;@v}xA%f%tQ2OFXfD?ZpgE@F5Rs^^x> z;i`i&{&u25WB%UJB;OE0V+yYvwP+h9N)EjRYabd*9wY9TJ#q8m4jNUu0FO--=mR~w zd++)vq?)%|#a)8L;HuSg(+Nrsu6vO7cCBzas@O0(0o%PFM(`(JIpuxLuWsg>;^IoU z<%d!t9o0%nYj=-+Nc(gzcsBKp7%qDhgnIkK4NchBPITYzlj)%RnjwArVL4?f*%w2A>Wy*gqw6CP7}ib4zSOd#a&UL0GQovtKH+6KZ&7eC6-@>83I^nYdv$Qy794%jrf^EWj7gZ4z zQ__Jk;lz4vtrhVD1*Vo)PQd{WU!lG^q*gla0^F-sOlTX8R-8~jWZ6BXXuOq0zF+e0 zR9sCcIOzj#GD_%DoIKB#oUc&WnOwe|kXF}wZ$s@7&1A>PZqZrhWkXM2E?0fs z;S^B8De_>qh89~HC3Ns&D$qWoQaceCww>jRAC|oBea&QKsYRW5vzl32Xx3zosj*BD zg-y42kS{7KcsdoH9^EWZg~%(hp2vVuLu^IoQWBOqzB@4EE~$HH)sV;{AhHW%H1K#(9noo{w2j?Z_MYzFR=!@jaOkE?JY!^=1aR$4&(99zci(t_2r;V z#Ny%raqnbWS0X&4(&pzvyhttUhOO%@448vWb7tRkSvp*=r}4mkCv(nrs58OMTspd5 zUsaZ_ku1i=SRr{cXbn7H!tjlAu*h*b4{Edoub=UpCxE7A=)r0FzE;?Z`9?R30sp89o zE#GFwK%YvB64b5g;^mJfYU6Kb#@a*&vxp1g-JCc}<@xmPV*NpHyOF} zH`C%y8Z71VyuQI%^RfWbuibC1L0zq`cQfYF*01yD?(%Iq+wTFpf83_U9B=I7@Z1yJ zG(M@bWbA@^MJqfN2|T^-9e{uMtyl_i2pGe6LngD9X07cX`K%i0t0yI4D&B1f|I{3) zlXw6ooE-NwvrpPvRF{y$=q<#XI5E^)bH+3Js=e<8&UQL`KV!7c-a6)AQx z6j{b1dSI4G(6mJ(;t%RgMzWLh?G#H5a;<5o01f^d3%ALtb*;&Lwy1<>CrQg9mdjEj*glt z{F*PsUII9b_-_CkKk__i(xMTOx(b-GJK0VVGQe`{who%>DQzW6%?~-lmxp1oBvzih z#xo)8KB>x^S+qM9o)B`FWq2t69vp9Sw&|}mq(Z?Q#qQwtnQY*{wMABabft%2h6{b; z3b1Ga?q^k4G5phqCWK6lQ>70uS}I;yqy^|%)J9KWDt>?YUURQKW$8S6@D*&Oqgn`7 zNv=0ze^vF`p~C%E`f~!no&N{7;U{NBUj&Ye%>^RRp?Dv<%7RoyO_@G0+1Cf^Zn^-Rw6dfdq1OM zQ4GQL9kB7xP1P1j0Do^N(F$fD%X4w&ID^l3YvLob>})%o8sm%dqU0zTEt_2zz+-={ zISwm&6gL0{SO(6o*8FeZ&}%Dl&qVXujm-KVSjH$lQ?b9P^^vpZW%E5hqUA)}^=jXk zs@YcD+3up-vVg*pH1Urp!DR^HKRcLyUy?UiwRVJF_3`d5XLpvx=FJ;smgGF3B|uBr zo-a}HR&?_4HylGjgx%qmcF>hL2yPqViI3ZRKLOa6F9%;Q&u1C-ag+-_nC`}5JZ79c z8z94>h;F^bNPDIy70kUjA&!@6@@cv!Z}#)_9S+ZUa|_&FY?%OIU?n4ip#GPG$Y2)! zPg&!)#eMROw&{q(W%6uBe5Sm7-C-RRkAxcJr74Bc66Z4!ZVnRZ9drbSMjedTI&x;S z*scO~EJ8s8&NfLQ$z zPN5W$6PE`OctowSIc<;2k^h4aQ?mRAF^aa!vy73;m^mIf-jAsxDeq|s=9uGMjeSMC z#qY6RrpEv;e2d=_tOGh!5G!-qbSF1c{IVIj=s0%z8<@Z%T1-%Y;Kmml#0bIDM*f8vW%9A=H3}4#;WAidtx&IJhtA0s+%px4$`bsM z&59TC)cAR(t5=7oS4RgW|{drLb~xg8qF%`tBm?_8zwy;8e_ogDJ+tShIcMeQ^MEiu%`D2On+>#|%| z6JD!l`||XrI%i9$gYmq6cuZN|4GXjE{Kn^3d(3b^G*9=pSsX zArEcj$=wJidd@|zRuwa@3PPN_8{Y(3ji&c&2ib?gjPUCw-3E@4E+j&pGeyxHH!TJ0 zRX?_eFb3d6V-xhuiN^@9JwLO|{gCmYu(-N_GxK$yg#+{IJwvqktEyjo=x$SN4`J4T z3EmJzcbl zk$OULT)f4KhNb|2`>J>gb#QQ2FGee;#>hrUa5M1Yb9~59wQV>eF_Zm@eboh_Fzg(R z6H!5{L9F)7Z3Ua(fli|$OsQr3>wMolp2aAXCFn7mXIA+Q&4k-B48XV~0X!yNFe%%H zES0MwN4O@2u`*q`{{C)hi*tWp4H`wC_>=>9j`SFE#r+BUr`^YuQ&ftK*1!A$NpMv% zFNI4RdhkrKtt9W5d&3hEs6&;$Vej3MNPp(F$GY@1!grad)9a@tCz|AdM>B{Is*R(L zhZMzCx}n4G<1I!Vwd99XMf$|=gF_$+hU5brHTVPVVXp|p#O6U8dv*d~!?rwGmzM%MmJf?2_n z-%&6N{!~gmc<57jw@MSEkgYetM(Eb9KENR=!)yDDemQeY+%3m;=7pYMb$z?ats4g5 z&mD#G1gL|*gK}Lg-F5>E)l+v$a*qlCsdub>2eWRq1WAM`*T?W%ra_*pQ5-E{FT7dY z-To-EG(^5(Oa<$HoyjOkUuz^fDW)lO#!!A zoWC^u#muIV5H3jqz|2oCMCZOQypqZQPkzl6%muBUd0!pj#1vooI-bX#@UEOt(yCvp zd5JjHJb0w?oS{4Qan*ayq_pZ{nxdRwBO7wT&DNoXgxgu)3Y_2!atfA$z85-+E7DC2 z-}VcOe(jlQ)NtO=wp=_ON2Y4j(UAo0EuQ={w4OV?@BA!tn}bejt0$fgB>FHBCb}}u z1@=Zh-fukLF`ozZAD@7(+xKzJdpt2Q2Llo1^qklAj7#mermY$&^na zgjYI_Th46jXIRmmBO;e0#pv+2>J2weLJK`y9$gp}`8o`geymf(9+j_sc>Fz(cA_xD zyGLzuJ)(bfNVg`X|Fhg=lAB{>0IyJQAOwF(4%7e>Sb3%TPe1B)?Xu~TZCX(6z~s`h zOHPzZ|JUqZ`>H*AXi$H z+t^=a0*ZjUucL0>&f0il<4n%om-2EiGyh#F!1MXCB`DKPk{2p*OJJS0|KxEy`Mtn- z>Coy3U^ZNo#dhw~?XXD!3%5rBwm&{zbU>PtQ#Ba8_=i#{I z&dluzpOS9w(U%8i223;$i1&XJ#TaoytI3}%;BPGRfGw@_tjo)q8pVy&IRi%T|Q7jI?Xp0Oq? z-f@rXc|Xr?hU$6R!1%Si8+`0nT>nb%MM=-f2j6Vuthy!v zeZK9N?z)w#+g9bin>$g^WcIWv0v^_jIQP1H-B`$$4P-Y`QZ$IycnrH0R8J zmzUf*JXLmj74O-9r=I){^{(%zvb}mGz&(9k`_x04lb!asvdk$uroiys2Dl|+0bgc~Hkpbc9qO3LIm@wd$(=)y?kRi?y9>XEtKV96>yOjL zckdOqbzP1LpXJ)?GfVW5hRTD~SqdW6lN)1!jjreNA~lZLwGY?&9~O9dYwp>zx81X~ z*Yy^g1iHOh_%uA^)=|N39=TQQQMb4JXkP5`A=*82eO}VWm9=ai#ceIsbQs@NtlQMZ z@VwMt`el{fQr+IG>o%%vOfHVj_#S+$i1Fbiqvg#vK2*HY@&wi!w_j}AwPf0@mD_if zxwu@)iwba5c-Nu!RYop?=i@8wDq!lkY?Hd|)#;+#+^r$Mb=1;-`%Nz93n`0zVQ&6g zd-B^*-G7QNzJ~`o%Ff#*7tXQFm+K?2C45?hW7!-toW!Phr_TbT#UxVK(>+cgL1hNhP@lRdu7o<1dELb;p3u9ANW#-KBp_+~%W zH4p82=bfD!%DO}?ll9o-V$M|A306#RkKc`%pS3#sBe(nRJ#DwNeGB6<#Y~Md!aEjB zZk(3U5ctlIwG`NgkbRUdaWuD5Y;y9F_$=}J`CEIZ`D#6Udo?QLuKMiF=_i(Ku->8l SHntbBT@lpv7)Z?i|0Vz?#t9Pu literal 0 HcmV?d00001 diff --git a/doxygen/examples/H5.format.1.0.html b/doxygen/examples/H5.format.1.0.html new file mode 100644 index 00000000000..2d3ffbe5ca7 --- /dev/null +++ b/doxygen/examples/H5.format.1.0.html @@ -0,0 +1,4050 @@ + + + + HDF5 File Format Specification + + + + +
+ + + +
+
    +
  1. Introduction +
  2. Disk Format Level 0 - File Signature and Super Block +
  3. Disk Format Level 1 - File Infrastructure + +
      +
    1. Disk Format Level 1A - B-link Trees and B-tree Nodes +
    2. Disk Format Level 1B - Group +
    3. Disk Format Level 1C - Group Entry +
    4. Disk Format Level 1D - Local Heaps +
    5. Disk Format Level 1E - Global Heap +
    6. Disk Format Level 1F - Free-space Index +
    +
    +
  4. Disk Format Level 2 - Data Objects + +
      +
    1. Disk Format Level 2a - Data Object Headers +
        +
      1. Name: NIL +
      2. Name: Simple Dataspace + +
      3. Name: Datatype +
      4. Name: Data Storage - Fill Value +
      5. Name: Reserved - not assigned yet +
      +
    +
    +
+
   +
    + +
  1. Disk Format Level 2 - Data Objects + (Continued) +
      +
    1. Disk Format Level 2a - Data Object Headers(Continued) +
        +
      1. Name: Data Storage - Compact +
      2. Name: Data Storage - External Data Files +
      3. Name: Data Storage - Layout +
      4. Name: Reserved - not assigned yet +
      5. Name: Reserved - not assigned yet +
      6. Name: Data Storage - Filter Pipeline +
      7. Name: Attribute +
      8. Name: Object Name +
      9. Name: Object Modification Date and Time +
      10. Name: Shared Object Message +
      11. Name: Object Header Continuation +
      12. Name: Group Message +
      +
    2. Disk Format: Level 2b - Shared Data Object Headers +
    3. Disk Format: Level 2c - Data Object Data Storage +
    +
    +
+
+
+ +

+ + +

Introduction

+ + + + + + + +
  +
+ HDF5 Groups +
 
  + Figure 1: Relationships among the HDF5 root group, other groups, and objects +
+
 
  + HDF5 Objects +  
  + Figure 2: HDF5 objects -- datasets, datatypes, or dataspaces +
+
 
+ + +

The format of an HDF5 file on disk encompasses several + key ideas of the HDF4 and AIO file formats as well as + addressing some shortcomings therein. The new format is + more self-describing than the HDF4 format and is more + uniformly applied to data objects in the file. + +

An HDF5 file appears to the user as a directed graph. + The nodes of this graph are the higher-level HDF5 objects + that are exposed by the HDF5 APIs: + +

    +
  • Groups +
  • Datasets +
  • Datatypes +
  • Dataspaces +
+ +

At the lowest level, as information is actually written to the disk, + an HDF5 file is made up of the following objects: +

    +
  • A super block +
  • B-tree nodes (containing either symbol nodes or raw data chunks) +
  • Object headers + +
  • Collections +
  • Local heaps +
  • Free space +
+ + The HDF5 library uses these lower-level objects to represent the + higher-level objects that are then presented to the user or + to applications through the APIs. + For instance, a group is an object header that contains a message that + points to a local heap and to a B-tree which points to symbol nodes. + A dataset is an object header that contains messages that describe + datatype, space, layout, filters, external files, fill value, etc + with the layout message pointing to either a raw data chunk or to a + B-tree that points to raw data chunks. + + +

This Document

+ +

This document describes the lower-level data objects; + the higher-level objects and their properties are described + in the HDF5 User's Guide. + + + + + + +

Three levels of information comprise the file format. + Level 0 contains basic information for identifying and + defining information about the file. Level 1 information contains + the group information (stored as a B-tree) and is used as the + index for all the objects in the file. Level 2 is the rest + of the file and contains all of the data objects, with each object + partitioned into header information, also known as + meta information, and data. + +

The sizes of various fields in the following layout tables are + determined by looking at the number of columns the field spans + in the table. There are three exceptions: (1) The size may be + overridden by specifying a size in parentheses, (2) the size of + addresses is determined by the Size of Offsets field + in the super block, and (3) the size of size fields is determined + by the Size of Lengths field in the super block. + + + +

+

+ + +

+ Disk Format: Level 0 - File Signature and Super Block

+ +

The super block may begin at certain predefined offsets within + the HDF5 file, allowing a block of unspecified content for + users to place additional information at the beginning (and + end) of the HDF5 file without limiting the HDF5 library's + ability to manage the objects within the file itself. This + feature was designed to accommodate wrapping an HDF5 file in + another file format or adding descriptive information to the + file without requiring the modification of the actual file's + information. The super block is located by searching for the + HDF5 file signature at byte offset 0, byte offset 512 and at + successive locations in the file, each a multiple of two of + the previous location, i.e. 0, 512, 1024, 2048, etc. + +

The super block is composed of a file signature, followed by + super block and group version numbers, information + about the sizes of offset and length values used to describe + items within the file, the size of each group page, + and a group entry for the root object in the file. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ HDF5 Super Block Layout +
bytebytebytebyte

HDF5 File Signature (8 bytes)

Version # of Super BlockVersion # of Global Free-space StorageVersion # of GroupReserved
Version # of Shared Header Message FormatSize of OffsetsSize of LengthsReserved (zero)
Group Leaf Node KGroup Internal Node K
File Consistency Flags
Base Address*
Address of Global Free-space Heap*
End of File Address*
Driver Information Block Address*
Root Group Address*
+ + + +
+
+ (Items marked with an asterisk (*) in the above table +
+ are of the size specified in "Size of Offsets.") +
+
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
File SignatureThis field contains a constant value and can be used to + quickly identify a file as being an HDF5 file. The + constant value is designed to allow easy identification of + an HDF5 file and to allow certain types of data corruption + to be detected. The file signature of an HDF5 file always + contains the following values: + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
decimal13772687013102610
hexadecimal894844460d0a1a0a
ASCII C Notation\211HDF\r\n\032\n
+
+
+ + This signature both identifies the file as an HDF5 file + and provides for immediate detection of common + file-transfer problems. The first two bytes distinguish + HDF5 files on systems that expect the first two bytes to + identify the file type uniquely. The first byte is + chosen as a non-ASCII value to reduce the probability + that a text file may be misrecognized as an HDF5 file; + also, it catches bad file transfers that clear bit + 7. Bytes two through four name the format. The CR-LF + sequence catches bad file transfers that alter newline + sequences. The control-Z character stops file display + under MS-DOS. The final line feed checks for the inverse + of the CR-LF translation problem. (This is a direct + descendent of the PNG file signature.)
Version Number of the Super BlockThis value is used to determine the format of the + information in the super block. When the format of the + information in the super block is changed, the version number + is incremented to the next integer and can be used to + determine how the information in the super block is + formatted.
Version Number of the Global Free-space HeapThis value is used to determine the format of the + information in the Global Free-space Heap.
Version Number of the GroupThis value is used to determine the format of the + information in the Group. When the format of + the information in the Group is changed, the + version number is incremented to the next integer and can be + used to determine how the information in the Group + is formatted.
Version Number of the Shared Header Message FormatThis value is used to determine the format of the + information in a shared object header message, which is + stored in the global small-data heap. Since the format + of the shared header messages differs from the private + header messages, a version number is used to identify changes + in the format.
Size of OffsetsThis value contains the number of bytes used to store + addresses in the file. The values for the addresses of + objects in the file are offsets relative to a base address, + usually the address of the super block signature. This + allows a wrapper to be added after the file is created + without invalidating the internal offset locations.
Size of LengthsThis value contains the number of bytes used to store + the size of an object.
Group Leaf Node KEach leaf node of a group B-tree will have at + least this many entries but not more than twice this + many. If a group has a single leaf node then it + may have fewer entries.
Group Internal Node KEach internal node of a group B-tree will have + at least K pointers to other nodes but not more than 2K + pointers. If the group has only one internal + node then it might have fewer than K pointers.
Bytes per B-tree PageThis value contains the number of bytes used for symbol + pairs per page of the B-trees used in the file. All + B-tree pages will have the same size per page. +
+ For 32-bit file offsets, 340 objects is the maximum + per 4KB page; for 64-bit file offset, 254 objects will fit + per 4KB page. In general, the equation is: +
+    <number of objects> = +
       + FLOOR((<page size> - <offset size>) / +
          + (<Symbol size> + <offset size>)) + - 1
File Consistency FlagsThis value contains flags to indicate information + about the consistency of the information contained + within the file. Currently, the following bit flags are + defined: +
    +
  • Bit 0 set indicates that the file is opened for + write-access. +
  • Bit 1 set indicates that the file has + been verified for consistency and is guaranteed to be + consistent with the format defined in this document. +
  • Bits 2-31 are reserved for future use. +
+ Bit 0 should be + set as the first action when a file is opened for write + access and should be cleared only as the final action + when closing a file. Bit 1 should be cleared during + normal access to a file and only set after the file's + consistency is guaranteed by the library or a + consistency utility.
Base AddressThis is the absolute file address of the first byte of + the HDF5 data within the file. The library currently + constrains this value to be the absolute file address + of the super block itself when creating new files; + future versions of the library may provide greater + flexibility. Unless otherwise noted, + all other file addresses are relative to this base + address.
Address of Global Free-space HeapFree-space management is not yet defined in the HDF5 + file format and is not handled by the library. + Currently this field always contains the + undefined address 0xfff...ff. + +
End of File AddressThis is the relative file address of the first byte past + the end of all HDF5 data. It is used to determine whether a + file has been accidently truncated and as an address where + file data allocation can occur if the free list is not + used.
Driver Information Block AddressThis is the relative file address of the file driver + information block which contains driver-specific + information needed to reopen the file. If there is no + driver information block then this entry should be the + undefined address (all bits set).
Root Group AddressThis is the address of the root group (described later + in this document), which serves as the entry point into + the group graph.
+
+ + +

The file driver information block is an optional region of the + file which contains information needed by the file driver in + order to reopen a file. The format of the file driver information + block is: + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Driver Information Block +
bytebytebytebyte
VersionReserved (zero)
Driver Information Size (4 bytes)

Driver Identification (8 bytes)



Driver Information


+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
VersionThe version number of the driver information block. The + file format documented here is version zero.
Driver Information SizeThe size in bytes of the Driver Information part of this + structure.
Driver IdentificationThis is an eight-byte ASCII string without null + termination which identifies the driver and version number + of the Driver Information block. The predefined drivers + supplied with the HDF5 library are identified by the + letters NCSA followed by the first four characters of + the driver name. If the Driver Information block is not + the original version then the last letter(s) of the + identification will be replaced by a version number in + ASCII. + For example, the various versions of the family driver + will be identified by NCSAfami, NCSAfam0, + NCSAfam1, etc. + (NCSAfami is simply NCSAfamily truncated + to eight characters. Subsequent identifiers will be created by + substituting sequential numerical values for the final character, + starting with zero.) +

+ Identification for user-defined drivers + is arbitrary but should be unique.

Driver InformationDriver information is stored in a format defined by the + file driver and encoded/decoded by the driver callbacks + invoked from the H5FD_sb_encode and + H5FD_sb_decode functions.
+
+ + +

+

+ + +

+ Disk Format: Level 1 - File Infrastructure

+

Disk Format: Level 1A - B-link Trees and B-tree Nodes

+ +

B-link trees allow flexible storage for objects which tend to grow + in ways that cause the object to be stored discontiguously. B-trees + are described in various algorithms books including "Introduction to + Algorithms" by Thomas H. Cormen, Charles E. Leiserson, and Ronald + L. Rivest. The B-link tree, in which the sibling nodes at a + particular level in the tree are stored in a doubly-linked list, + is described in the "Efficient Locking for Concurrent Operations + on B-trees" paper by Phillip Lehman and S. Bing Yao as published + in the ACM Transactions on Database Systems, Vol. 6, + No. 4, December 1981. + +

The B-link trees implemented by the file format contain one more + key than the number of children. In other words, each child + pointer out of a B-tree node has a left key and a right key. + The pointers out of internal nodes point to sub-trees while + the pointers out of leaf nodes point to symbol nodes and + raw data chunks. + Aside from that difference, internal nodes and leaf nodes + are identical. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ B-tree Nodes +
bytebytebytebyte
Node Signature
Node TypeNode LevelEntries Used
Address of Left Sibling
Address of Right Sibling
Key 0 (variable size)
Address of Child 0
Key 1 (variable size)
Address of Child 1
...
Key 2K (variable size)
Address of Child 2K
Key 2K+1 (variable size)
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Node SignatureThe ASCII character string TREE is + used to indicate the + beginning of a B-link tree node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file.
Node TypeEach B-link tree points to a particular type of data. + This field indicates the type of data as well as + implying the maximum degree K of the tree and + the size of each Key field. +
+
+
0 +
This tree points to group nodes. +
1 +
This tree points to a new data chunk. +
+
Node LevelThe node level indicates the level at which this node + appears in the tree (leaf nodes are at level zero). Not + only does the level indicate whether child pointers + point to sub-trees or to data, but it can also be used + to help file consistency checking utilities reconstruct + damanged trees.
Entries UsedThis determines the number of children to which this + node points. All nodes of a particular type of tree + have the same maximum degree, but most nodes will point + to less than that number of children. The valid child + pointers and keys appear at the beginning of the node + and the unused pointers and keys appear at the end of + the node. The unused pointers and keys have undefined + values.
Address of Left SiblingThis is the file address of the left sibling of the + current node relative to the super block. If the current + node is the left-most node at this level then this field + is the undefined address (all bits set).
Address of Right SiblingThis is the file address of the right sibling of the + current node relative to the super block. If the current + node is the right-most node at this level then this + field is the undefined address (all bits set).
Keys and Child PointersEach tree has 2K+1 keys with 2K + child pointers interleaved between the keys. The number + of keys and child pointers actually containing valid + values is determined by the Entries Used field. If + that field is N then the B-link tree contains + N child pointers and N+1 keys.
KeyThe format and size of the key values is determined by + the type of data to which this tree points. The keys are + ordered and are boundaries for the contents of the child + pointer; that is, the key values represented by child + N fall between Key N and Key + N+1. Whether the interval is open or closed on + each end is determined by the type of data to which the + tree points. +

+ The format of the key depends on the node type. + For nodes of node type 1, the key is formatted as follows: +

+ + + + + + + + + + + +
Bytes 1-4Size of chunk in bytes.
Bytes 4-8Filter mask, a 32-bit bitfield indicating which + filters have been applied to that chunk.
N fields of 8 bytes eachA 64-bit index indicating the offset of the + chunk within the dataset where N is the number + of dimensions of the dataset. For example, if + a chunk in a 3-dimensional dataset begins at the + position [5,5,5], there will be three + such 8-bit indices, each with the value of + 5.
+
+

+ For nodes of node type 0, the key is formatted as follows: +

+ + + + + +
A single field of Size of Lengths + bytesIndicates the byte offset into the local heap + for the first object name in the subtree which + that key describes.
+
+
Child PointersThe tree node contains file addresses of subtrees or + data depending on the node level. Nodes at Level 0 point + to data addresses, either data chunk or group nodes. + Nodes at non-zero levels point to other nodes of the + same B-tree.
+
+ +

+ Each B-tree node looks like this: + +

+ + + + + + + + + + + + + +
key[0]  child[0]  key[1]  child[1]  key[2]  ...  ...  key[N-1]  child[N-1]  key[N]
+
+ + where child[i] is a pointer to a sub-tree (at a level + above Level 0) or to data (at Level 0). + Each key[i] describes an item stored by the B-tree + (a chunk or an object of a group node). The range of values + represented by child[i] are indicated by key[i] + and key[i+1]. + + +

The following question must next be answered: + "Is the value described by key[i] contained in + child[i-1] or in child[i]?" + The answer depends on the type of tree. + In trees for groups (node type 0) the object described by + key[i] is the greatest object contained in + child[i-1] while in chunk trees (node type 1) the + chunk described by key[i] is the least chunk in + child[i]. + +

That means that key[0] for group trees is sometimes unused; + it points to offset zero in the heap, which is always the + empty string and compares as "less-than" any valid object name. + +

And key[N] for chunk trees is sometimes unused; + it contains a chunk offset which compares as "greater-than" + any other chunk offset and has a chunk byte size of zero + to indicate that it is not actually allocated. + + +

Disk Format: Level 1B - Group and Symbol Nodes

+ +

A group is an object internal to the file that allows + arbitrary nesting of objects (including other groups). + A group maps a set of names to a set of file + address relative to the base address. Certain meta data + for an object to which the group points can be duplicated + in the group symbol table in addition to the object header. + +

An HDF5 object name space can be stored hierarchically by + partitioning the name into components and storing each + component in a group. The group entry for a + non-ultimate component points to the group containing + the next component. The group entry for the last + component points to the object being named. + +

A group is a collection of group nodes pointed + to by a B-link tree. Each group node contains entries + for one or more symbols. If an attempt is made to add a + symbol to an already full group node containing + 2K entries, then the node is split and one node + contains K symbols and the other contains + K+1 symbols. + +

+

+ + + + + + + + + + + + + + + + + + + +
+ Group Node (A Leaf of a B-tree) +
bytebytebytebyte
Node Signature
Version NumberReserved for Future UseNumber of Symbols


Group Entries


+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Node SignatureThe ASCII character string SNOD is + used to indicate the + beginning of a group node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file.
Version NumberThe version number for the group node. This + document describes version 1.
Number of SymbolsAlthough all group nodes have the same length, + most contain fewer than the maximum possible number of + symbol entries. This field indicates how many entries + contain valid data. The valid entries are packed at the + beginning of the group node while the remaining + entries contain undefined values.
Group EntriesEach symbol has an entry in the group node. + The format of the entry is described below.
+
+ +

+ Disk Format: Level 1C - Group Entry

+ +

Each group entry in a group node is designed + to allow for very fast browsing of stored objects. + Toward that design goal, the group entries + include space for caching certain constant meta data from the + object header. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Group Entry +
bytebytebytebyte
Name Offset (<size> bytes)
Object Header Address
Cache Type
Reserved


Scratch-pad Space (16 bytes)


+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name OffsetThis is the byte offset into the group local + heap for the name of the object. The name is null + terminated.
Object Header AddressEvery object has an object header which serves as a + permanent location for the object's meta data. In addition + to appearing in the object header, some meta data can be + cached in the scratch-pad space.
Cache TypeThe cache type is determined from the object header. + It also determines the format for the scratch-pad space. +
+
+
0 +
No data is cached by the group entry. This + is guaranteed to be the case when an object header + has a link count greater than one. + +
1 +
Object header meta data is cached in the group + entry. This implies that the group + entry refers to another group. + +
2 +
The entry is a symbolic link. The first four bytes + of the scratch-pad space are the offset into the local + heap for the link value. The object header address + will be undefined. + +
N +
Other cache values can be defined later and + libraries that do not understand the new values will + still work properly. +
+
ReservedThese four bytes are present so that the scratch-pad + space is aligned on an eight-byte boundary. They are + always set to zero.
Scratch-pad SpaceThis space is used for different purposes, depending + on the value of the Cache Type field. Any meta-data + about a dataset object represented in the scratch-pad + space is duplicated in the object header for that + dataset. This meta data can include the datatype + and the size of the dataspace for a dataset whose datatype + is atomic and whose dataspace is fixed and less than + four dimensions. + Furthermore, no data is cached in the group + entry scratch-pad space if the object header for + the group entry has a link count greater than + one.
+
+ +

Format of the Scratch-pad Space

+ +

The group entry scratch-pad space is formatted + according to the value in the Cache Type field. + +

If the Cache Type field contains the value zero + (0) then no information is + stored in the scratch-pad space. + +

If the Cache Type field contains the value one + (1), then the scratch-pad space + contains cached meta data for another object header + in the following format: + +

+

+ + + + + + + + + + + + + + +
+ Object Header Scratch-pad Format +
bytebytebytebyte
Address of B-tree
Address of Name Heap
+
+ +

+

+ + + + + + + + + + + + + + + +
Field NameDescription
Address of B-treeThis is the file address for the root of the + group's B-tree.
Address of Name HeapThis is the file address for the group's local + heap, in which are stored the symbol names.
+
+ + +

If the Cache Type field contains the value two + (2), then the scratch-pad space + contains cached meta data for another symbolic link + in the following format: + +

+

+ + + + + + + + + + + + + +
+ Symbolic Link Scratch-pad Format +
bytebytebytebyte
Offset to Link Value
+
+ +

+

+ + + + + + + + + + +
Field NameDescription
Offset to Link ValueThe value of a symbolic link (that is, the name of the + thing to which it points) is stored in the local heap. + This field is the 4-byte offset into the local heap for + the start of the link value, which is null terminated.
+
+ +

Disk Format: Level 1D - Local Heaps

+ +

A heap is a collection of small heap objects. Objects can be + inserted and removed from the heap at any time. + The address of a heap does not change once the heap is created. + References to objects are stored in the group table; + the names of those objects are stored in the local heap. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Local Heaps +
bytebytebytebyte
Heap Signature
Reserved (zero)
Data Segment Size
Offset to Head of Free-list (<size> bytes)
Address of Data Segment
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Heap SignatureThe ASCII character string HEAP + is used to indicate the + beginning of a heap. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file.
Data Segment SizeThe total amount of disk memory allocated for the heap + data. This may be larger than the amount of space + required by the object stored in the heap. The extra + unused space holds a linked list of free blocks.
Offset to Head of Free-listThis is the offset within the heap data segment of the + first free block (or all 0xff bytes if there is no free + block). The free block contains <size> bytes that + are the offset of the next free chunk (or all 0xff bytes + if this is the last free chunk) followed by <size> + bytes that store the size of this free chunk.
Address of Data SegmentThe data segment originally starts immediately after + the heap header, but if the data segment must grow as a + result of adding more objects, then the data segment may + be relocated, in its entirety, to another part of the + file.
+
+ +

Objects within the heap should be aligned on an 8-byte boundary. + +

Disk Format: Level 1E - Global Heap

+ +

Each HDF5 file has a global heap which stores various types of + information which is typically shared between datasets. The + global heap was designed to satisfy these goals: + +

    +
  1. Repeated access to a heap object must be efficient without + resulting in repeated file I/O requests. Since global heap + objects will typically be shared among several datasets, it is + probable that the object will be accessed repeatedly. + +

    +
  2. Collections of related global heap objects should result in + fewer and larger I/O requests. For instance, a dataset of + void pointers will have a global heap object for each + pointer. Reading the entire set of void pointer objects + should result in a few large I/O requests instead of one small + I/O request for each object. + +

    +
  3. It should be possible to remove objects from the global heap + and the resulting file hole should be eligible to be reclaimed + for other uses. +

    +
+ +

The implementation of the heap makes use of the memory + management already available at the file level and combines that + with a new top-level object called a collection to + achieve Goal B. The global heap is the set of all collections. + Each global heap object belongs to exactly one collection and + each collection contains one or more global heap objects. For + the purposes of disk I/O and caching, a collection is treated as + an atomic object. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ A Global Heap Collection +
bytebytebytebyte
Magic Number
VersionReserved
Collection Size

Global Heap Object 1 + (described below)


Global Heap Object 2


...


Global Heap Object N


Global Heap Object 0 (free space)

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Magic NumberThe magic number for global heap collections are the + four bytes G, C, O, + and L.
VersionEach collection has its own version number so that new + collections can be added to old files. This document + describes version zero of the collections. +
Collection Data SizeThis is the size in bytes of the entire collection + including this field. The default (and minimum) + collection size is 4096 bytes which is a typical file + system block size and which allows for 170 16-byte heap + objects plus their overhead.
Object 1 through NThe objects are stored in any order with no + intervening unused space.
Object 0Object 0 (zero), when present, represents the free space in + the collection. Free space always appears at the end of + the collection. If the free space is too small to store + the header for Object 0 (described below) then the + header is implied and the collection contains no free space. +
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Global Heap Object +
bytebytebytebyte
Object IDReference Count
Reserved
Object Data Size

Object Data

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Object IDEach object has a unique identification number within a + collection. The identification numbers are chosen so that + new objects have the smallest value possible with the + exception that the identifier 0 always refers to the + object which represents all free space within the + collection.
Reference CountAll heap objects have a reference count field. An + object which is referenced from some other part of the + file will have a positive reference count. The reference + count for Object 0 is always zero.
ReservedZero padding to align next field on an 8-byte + boundary.
Object Size This is the size of the the fields + above plus the object data stored for the object. The + actual storage size is rounded up to a multiple of + eight.
Object DataThe object data is treated as a one-dimensional array + of bytes to be interpreted by the caller.
+
+ +

Disk Format: Level 1F - Free-space Heap

+ +

The Free-space Index is a collection of blocks of data, + dispersed throughout the file, which are currently not used by + any file objects. + +

The super block contains a pointer to root of the free-space description; + that pointer is currently (i.e., in HDF5 Release 1.2) required + to be the undefined address 0xfff...ff. + +

The free-sapce index is not otherwise publicly defined at this time. + + + + + +

+

+ + +

Disk Format: Level 2 - Data Objects

+ +

Data objects contain the real information in the file. These + objects compose the scientific data and other information which + are generally thought of as "data" by the end-user. All the + other information in the file is provided as a framework for + these data objects. + +

A data object is composed of header information and data + information. The header information contains the information + needed to interpret the data information for the data object as + well as additional "meta-data" or pointers to additional + "meta-data" used to describe or annotate each data object. + +

+ Disk Format: Level 2a - Data Object Headers

+ +

The header information of an object is designed to encompass + all the information about an object which would be desired to be + known, except for the data itself. This information includes + the dimensionality, number-type, information about how the data + is stored on disk (in external files, compressed, broken up in + blocks, etc.), as well as other information used by the library + to speed up access to the data objects or maintain a file's + integrity. The header of each object is not necessarily located + immediately prior to the object's data in the file and in fact + may be located in any position in the file. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Object Headers +
bytebytebytebyte
Version # of Object HeaderReservedNumber of Header Messages
Object Reference Count

Total Object Header Size

Header Message Type #1Size of Header Message Data #1
FlagsReserved

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #n
FlagsReserved

Header Message Data #n

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version number of the object headerThis value is used to determine the format of the + information in the object header. When the format of the + information in the object header is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted.
ReservedAlways set to zero.
Number of header messagesThis value determines the number of messages listed in + this object header. This provides a fast way for software + to prepare storage for the messages in the header.
Object Reference CountThis value specifies the number of references to this + object within the current file. References to the + data object from external files are not tracked.
Total Object Header SizeThis value specifies the total number of bytes of header + message data following this length field for the current + message as well as any continuation data located elsewhere + in the file.
Header Message TypeThe header message type specifies the type of + information included in the header message data following + the type along with a small amount of other information. + Bit 15 of the message type is set if the message is + constant (constant messages cannot be changed since they + may be cached in group entries throughout the + file). The header message types for the pre-defined + header messages will be included in further discussion + below.
Size of Header Message DataThis value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size includes + padding bytes to make the message a multiple of eight + bytes.
FlagsThis is a bit field with the following definition: +
+
0 +
If set, the message data is constant. This is used + for messages like the datatype message of a dataset. +
1 +
If set, the message is stored in the global heap and + the Header Message Data field contains a Shared Object + message and the Size of Header Message Data field + contains the size of that Shared Object message. +
2-7 +
Reserved +
+
Header Message DataThe format and length of this field is determined by the + header message type and size respectively. Some header + message types do not require any data and this information + can be eliminated by setting the length of the message to + zero. The data is padded with enough zeros to make the + size a multiple of eight.
+
+ +

The header message types and the message data associated with + them compose the critical "meta-data" about each object. Some + header messages are required for each object while others are + optional. Some optional header messages may also be repeated + several times in the header itself, the requirements and number + of times allowed in the header will be noted in each header + message description below. + +

The following is a list of currently defined header messages: + +


+

Name: NIL

+ Type: 0x0000
+ Length: varies
+ Status: Optional, may be repeated.
+ Purpose and Description: The NIL message is used to + indicate a message + which is to be ignored when reading the header messages for a data object. + [Probably one which has been deleted for some reason.]
+ Format of Data: Unspecified.
+ + + + +
+

Name: Simple Dataspace

+ + Type: 0x0001
+ Length: Varies according to the number of dimensions, + as described in the following table
+ Status: The Simple Dataspace message is required + and may not be repeated. This message is currently used with + datasets and named dataspaces.
+ +

The Simple Dataspace message describes the number + of dimensions and size of each dimension that the data object + has. This message is only used for datasets which have a + simple, rectilinear grid layout; datasets requiring a more + complex layout (irregularly structured or unstructured grids, etc.) + must use the Complex Dataspace message for expressing + the space the dataset inhabits. + (Note: The Complex Dataspace functionality is + not yet implemented (as of HDF5 Release 1.2). It is not described + in this document.) + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Simple Dataspace Message +
bytebytebytebyte
VersionDimensionalityFlagsReserved
Reserved
Dimension Size #1 (<size> bytes)
.
.
.
Dimension Size #n (<size> bytes)
Dimension Maximum #1 (<size> bytes)
.
.
.
Dimension Maximum #n (<size> bytes)
Permutation Index #1
.
.
.
Permutation Index #n
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version This value is used to determine the format of the + Simple Dataspace Message. When the format of the + information in the message is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted.
DimensionalityThis value is the number of dimensions that the data + object has.
FlagsThis field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. Bit 1 is used to indicate that + permutation indices are present for each dimension.
Dimension Size #n (<size> bytes)This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension.
Dimension Maximum #n (<size> bytes)This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + value <UNLIMITED> (all bits set) which indicates + that the data may expand along this dimension + indefinitely. If these values are not stored, the maximum + value of each dimension is assumed to be the same as the + current size value.
Permutation Index #n (4 bytes)This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. If these values are + not stored, the first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension.
+
+ + + + + + + +
+

Name: Datatype

+ + Type: 0x0003
+ Length: variable
+ Status: One required per dataset or named datatype
+ +

The datatype message defines the datatype for each data point + of a dataset. A datatype can describe an atomic type like a + fixed- or floating-point type or a compound type like a C + struct. A datatype does not, however, describe how data points + are combined to produce a dataset. Datatypes are stored on disk + as a datatype message, which is a list of datatype classes and + their associated properties. + +

+

+ + + + + + + + + + + + + + + + + + + + + + +
+ Datatype Message +
bytebytebytebyte
Type Class and VersionClass Bit Field
Size in Bytes (4 bytes)


Properties


+
+ +

The Class Bit Field and Properties fields vary depending + on the Type Class, which is the low-order four bits of the Type + Class and Version field (the high-order four bits are the + version, which should be set to the value one). The type class + is one of 0 (fixed-point number), 1 (floating-point number), + 2 (date and time), 3 (text string), 4 (bit field), 5 (opaque), + 6 (compound), 7 (reference), 8 (enumeration), or 9 (variable-length). + The Class Bit Field is zero and the size of the + Properties field is zero except for the cases noted here. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field for Fixed-point Numbers (Class 0) +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.
3Signed. If this bit is set then the fixed-point + number is in 2's complement form.
4-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + +
+ Properties for Fixed-point Numbers (Class 0) +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field for Floating-point Numbers (Class 1) +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2, 3Padding type. Bit 1 is the low bits pad type, bit 2 + is the high bits pad type, and bit 3 is the internal bits + pad type. If a datum has unused bits at either or between + the sign bit, exponent, or mantissa, then the value of bit + 1, 2, or 3 is copied to those locations.
4-5Normalization. The value can be 0 if there is no + normalization, 1 if the most significant bit of the + mantissa is always set (except for 0.0), and 2 if the most + signficant bit of the mantissa is not stored but is + implied to be set. The value 3 is reserved and will not + appear in this field.
6-7Reserved (zero).
8-15Sign. This is the bit position of the sign + bit.
16-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Properties for Floating-point Numbers (Class 1) +
ByteByteByteByte
Bit OffsetBit Precision
Exponent LocationExponent Size in BitsMantissa LocationMantissa Size in Bits
Exponent Bias
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + +
+ Bit Field for Strings (Class 3) +
BitsMeaning
0-3Padding type. This four-bit value determines the + type of padding to use for the string. The values are: + +
+
0 Null terminate. +
A zero byte marks the end of the string and is + guaranteed to be present after converting a long + string to a short string. When converting a short + string to a long string the value is padded with + additional null characters as necessary. + +

+
1 Null pad. +
Null characters are added to the end of the value + during conversions from short values to long values + but conversion in the opposite direction simply + truncates the value. + +

+
2 Space pad. +
Space characters are added to the end of the value + during conversions from short values to long values + but conversion in the opposite direction simply + truncates the value. This is the Fortran + representation of the string. + +

+
3-15 Reserved. +
These values are reserved for future use. +
+
4-7Character Set. The character set to use for + encoding the string. The only character set supported is + the 8-bit ASCII (zero) so no translations have been defined + yet.
8-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field for Bitfield Types (Class 4) +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.
3-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + +
+ Properties for Bitfield Types (Class 4) +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +

+

+ + + + + + + + + + + + +
+ Bit Field for Opaque Types (Class 5) +
BitsMeaning
0-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + +
+ Properties for Opaque Types (Class 5) +
ByteByteByteByte

Null-terminated ASCII Tag
+ (multiple of 8 bytes)

+
+ +

+

+ + + + + + + + + + + + + + + + +
+ Bit Field for Compound Types (Class 6) +
BitsMeaning
0-15Number of Members. This field contains the number + of members defined for the compound datatype. The member + definitions are listed in the Properties field of the data + type message. +
15-23Reserved (zero).
+
+ +

The Properties field of a compound datatype is a list of the + member definitions of the compound datatype. The member + definitions appear one after another with no intervening bytes. + The member types are described with a recursive datatype + message. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Properties for Compound Types (Class 6) +
ByteByteByteByte


Name (null terminated, multiple of + eight bytes)


Byte Offset of Member in Compound Instance
Dimensionalityreserved
Dimension Permutation
Reserved
Size of Dimension 0 (required)
Size of Dimension 1 (required)
Size of Dimension 2 (required)
Size of Dimension 3 (required)


Member Type Message


+
+ +

+

+ + + + + + + + + + + + + + + + + +
+ Bit Field for Enumeration Types (Class 8) +
BitsMeaning
0-15Number of Members. The number of name/value + pairs defined for the enumeration type.
16-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + +
+ Properties for Enumeration Types (Class 8) +
ByteByteByteByte

Parent Type


Names


Values

+
+ +
+ + + + + + + + + + + +
Parent Type:Each enumeration type is based on some parent type, + usually an integer. The information for that parent type is + described recursively by this field.
Names:The name for each name/value pair. Each name is + stored as a null terminated ASCII string in a multiple of + eight bytes. The names are in no particular order.
Values:The list of values in the same order as the names. + The values are packed (no inter-value padding) and the + size of each value is determined by the parent type.
+
+ + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field for Variable-length Types (Class 9) +
BitsMeaning
0-3
Type
+
0 Variable-length sequence
+
This variable-length datatype can be of any sequence + of data. Variable-length sequences do not have padding + or character set information.
+
1 Variable-length string
+
This variable-length datatype is composed of a series of + characters. Variable-length strings have padding and + character set information.
+
4-7
Padding type (variable-length string only)
+
This four-bit value determines the type of padding + used for variable-length strings. The values are the same + as for the string padding type, as follows:
+
0 Null terminate
+
A zero byte marks the end of a string and is guaranteed + to be present after converting a long string to a short + string. When converting a short string to a long string, + the value is padded with additional null characters + as necessary. +
1 Null pad
+
Null characters are added to the end of the value + during conversion from a short string to a longer string. + Conversion from a long string to a shorter string + simply truncates the value.
+
2 Space pad
+
Space characters are added to the end of the value + during conversion from a short string to a longer string. + Conversion from a long string to a shorter string simply + truncates the value. + This is the Fortran representation of the string. +
+
3-15 Reserved
+
These values are reserved for future use.
+
8-11
Character set (variable-length string only)
+
This four-bit value specifies the character set + to be used for encoding the string.
+
0 8-bit ASCII
+
As of this writing (July 2002, Release 1.4.4), + 8-bit ASCII is the only character set supported. + Therefore, no translations have been defined.
+
12-23Reserved (zero).
+
+ +

+

+ + + + + + + + + + + + + + +
+ Properties for Variable-length Types (Class 9) +
ByteByteByteByte

Parent Type

+
+ +
+ + + + + +
Parent Type:Each variable-length type is based on + some parent type. The information for that parent type is + described recursively by this field.
+
+ + + +

+ + + + +


+

Name: Data Storage - Fill Value

+ Type: 0x0004
+ Length: varies
+ Status: Optional, may not be repeated.
+ +

The fill value message stores a single data point value which + is returned to the application when an uninitialized data point + is read from the dataset. The fill value is interpretted with + the same datatype as the dataset. If no fill value message is + present then a fill value of all zero is assumed. + +

+

+ + + + + + + + + + + + + + + + + +
+ Fill Value Message +
bytebytebytebyte
Size (4 bytes)

Fill Value

+
+ +

+

+ + + + + + + + + + + + + + + +
Field NameDescription
Size (4 bytes)This is the size of the Fill Value field in bytes.
Fill ValueThe fill value. The bytes of the fill value are + interpreted using the same datatype as for the dataset.
+
+ +
+

Name: Reserved - Not Assigned Yet

+ Type: 0x0005
+ Length: N/A
+ Status: N/A
+ + + +
+

Name: Data Storage - Compact

+ + Type: 0x0006
+ Length: varies
+ Status: Optional, may not be repeated.
+ +

This message indicates that the data for the data object is + stored within the current HDF file by including the actual + data as the header data for this message. The data is + stored internally in + the normal format, i.e. in one chunk, uncompressed, etc. + +

Note that one and only one of the Data Storage headers can be + stored for each data object. + +

Format of Data: The message data is actually composed + of dataset data, so the format will be determined by the dataset + format. + + + +


+

Name: Data Storage - + External Data Files

+ Type: 0x0007
+ Length: varies
+ Status: Optional, may not be repeated.
+ +

Purpose and Description: The external object message + indicates that the data for an object is stored outside the HDF5 + file. The filename of the object is stored as a Universal + Resource Location (URL) of the actual filename containing the + data. An external file list record also contains the byte offset + of the start of the data within the file and the amount of space + reserved in the file for that data. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ External File List Message +
bytebytebytebyte
VersionReserved
Allocated SlotsUsed Slots

Heap Address


Slot Definitions...

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version This value is used to determine the format of the + External File List Message. When the format of the + information in the message is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted.
ReservedThis field is reserved for future use.
Allocated SlotsThe total number of slots allocated in the message. Its + value must be at least as large as the value contained in + the Used Slots field.
Used SlotsThe number of initial slots which contain valid + information. The remaining slots are zero filled.
Heap AddressThis is the address of a local name heap which contains + the names for the external files. The name at offset zero + in the heap is always the empty string.
Slot DefinitionsThe slot definitions are stored in order according to + the array addresses they represent. If more slots have + been allocated than what has been used then the defined + slots are all at the beginning of the list.
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + +
+ External File List Slot +
bytebytebytebyte

Name Offset (<size> bytes)


File Offset (<size> bytes)


Size

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name Offset (<size> bytes)The byte offset within the local name heap for the name + of the file. File names are stored as a URL which has a + protocol name, a host name, a port number, and a file + name: + protocol:port//host/file. + If the protocol is omitted then "file:" is assumed. If + the port number is omitted then a default port for that + protocol is used. If both the protocol and the port + number are omitted then the colon can also be omitted. If + the double slash and host name are omitted then + "localhost" is assumed. The file name is the only + mandatory part, and if the leading slash is missing then + it is relative to the application's current working + directory (the use of relative names is not + recommended).
File Offset (<size> bytes)This is the byte offset to the start of the data in the + specified file. For files that contain data for a single + dataset this will usually be zero.
SizeThis is the total number of bytes reserved in the + specified file for raw data storage. For a file that + contains exactly one complete dataset which is not + extendable, the size will usually be the exact size of the + dataset. However, by making the size larger one allows + HDF5 to extend the dataset. The size can be set to a value + larger than the entire file since HDF5 will read zeros + past the end of the file without failing.
+
+ + +
+

Name: Data Storage - Layout

+ + Type: 0x0008
+ Length: varies
+ Status: Required for datasets, may not be repeated. + +

Purpose and Description: Data layout describes how the + elements of a multi-dimensional array are arranged in the linear + address space of the file. Two types of data layout are + supported: + +

    +
  1. The array can be stored in one contiguous area of the file. + The layout requires that the size of the array be constant and + does not permit chunking, compression, checksums, encryption, + etc. The message stores the total size of the array and the + offset of an element from the beginning of the storage area is + computed as in C. + +
  2. The array domain can be regularly decomposed into chunks and + each chunk is allocated separately. This layout supports + arbitrary element traversals, compression, encryption, and + checksums, and the chunks can be distributed across external + raw data files (these features are described in other + messages). The message stores the size of a chunk instead of + the size of the entire array; the size of the entire array can + be calculated by traversing the B-tree that stores the chunk + addresses. +
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Data Layout Message +
bytebytebytebyte
VersionDimensionalityLayout ClassReserved
Reserved

Address

Dimension 0 (4-bytes)
Dimension 1 (4-bytes)
...
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
VersionA version number for the layout message. This + documentation describes version one.
DimensionalityAn array has a fixed dimensionality. This field + specifies the number of dimension size fields later in the + message.
Layout ClassThe layout class specifies how the other fields of the + layout message are to be interpreted. A value of one + indicates contiguous storage while a value of two + indicates chunked storage. Other values will be defined + in the future.
AddressFor contiguous storage, this is the address of the first + byte of storage. For chunked storage this is the address + of the B-tree that is used to look up the addresses of the + chunks.
DimensionsFor contiguous storage the dimensions define the entire + size of the array while for chunked storage they define + the size of a single chunk.
+
+ + +
+

Name: Reserved - Not Assigned Yet

+ Type: 0x0009
+ Length: N/A
+ Status: N/A
+ Purpose and Description: N/A
+ Format of Data: N/A + +
+

Name: Reserved - Not Assigned Yet

+ Type: 0x000A
+ Length: N/A
+ Status: N/A
+ Purpose and Description: N/A
+ Format of Data: N/A + +
+

Name: Data Storage - Filter Pipeline

+ Type: 0x000B
+ Length: varies
+ Status: Optional, may not be repeated. + +

Purpose and Description: This message describes the + filter pipeline which should be applied to the data stream by + providing filter identification numbers, flags, a name, an + client data. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Pipeline Message +
bytebytebytebyte
VersionNumber of FiltersReserved
Reserved

Filter List

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
VersionThe version number for this message. This document + describes version one.
Number of FiltersThe total number of filters described by this + message. The maximum possible number of filters in a + message is 32.
Filter ListA description of each filter. A filter description + appears in the next table.
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Pipeline Message +
bytebytebytebyte
Filter IdentificationName Length
FlagsClient Data Number of Values

Name


Client Data

Padding
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Filter IdentificationThis is a unique (except in the case of testing) + identifier for the filter. Values from zero through 255 + are reserved for filters defined by the NCSA HDF5 + library. Values 256 through 511 have been set aside for + use when developing/testing new filters. The remaining + values are allocated to specific filters by contacting the + HDF5 Development + Team.
Name LengthEach filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.
FlagsThe flags indicate certain properties for a filter. The + bit values defined so far are: + +
+
bit 1 +
If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently removed from the pipeline. +
+
Client Data Number of ValuesEach filter can store a few integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.
NameIf the Name Length field is non-zero then it will + contain the size of this field, a multiple of eight. This + field contains a null-terminated, ASCII character + string to serve as a comment/name for the filter.
Client DataThis is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the + array.
PaddingFour bytes of zeros are added to the message at this + point if the Client Data Number of Values field contains + an odd number.
+
+ +
+

Name: Attribute

+ Type: 0x000C
+ Length: varies
+ Status: Optional, may be repeated.
+ +

Purpose and Description: The Attribute + message is used to list objects in the HDF file which are used + as attributes, or "meta-data" about the current object. An + attribute is a small dataset; it has a name, a datatype, a data + space, and raw data. Since attributes are stored in the object + header they must be relatively small (<64kb) and can be + associated with any type of object which has an object header + (groups, datasets, named types and spaces, etc.). + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message +
bytebytebytebyte
VersionReservedName Size
Type SizeSpace Size

Name


Type


Space


Data

+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
VersionVersion number for the message. This document describes + version 1 of attribute messages.
ReservedThis field is reserved for later use and is set to + zero.
Name SizeThe length of the attribute name in bytes including the + null terminator. Note that the Name field below may + contain additional padding not represented by this + field.
Type SizeThe length of the datatype description in the Type + field below. Note that the Type field may contain + additional padding not represented by this field.
Space SizeThe length of the dataspace description in the Space + field below. Note that the Space field may contain + additional padding not represented by this field.
NameThe null-terminated attribute name. This field is + padded with additional null characters to make it a + multiple of eight bytes.
TypeThe datatype description follows the same format as + described for the datatype object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.
SpaceThe dataspace description follows the same format as + described for the dataspace object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.
DataThe raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. This + field is not padded with additional zero + bytes.
+
+ +
+

Name: Object Name

+ +

Type: 0x000D
+ Length: varies
+ Status: Optional, may not be repeated. + +

Purpose and Description: The object name or comment is + designed to be a short description of an object. An object name + is a sequence of non-zero (\0) ASCII characters with no other + formatting included by the library. + +

+

+ + + + + + + + + + + + + +
+ Name Message +
bytebytebytebyte

Name

+
+ +

+

+ + + + + + + + + + +
Field NameDescription
NameA null terminated ASCII character string.
+
+ +
+

Name: Object Modification Date & Time

+ +

Type: 0x000E
+ Length: fixed
+ Status: Optional, may not be repeated. + +

Purpose and Description: The object modification date + and time is a timestamp which indicates (using ISO-8601 date and + time format) the last modification of an object. The time is + updated when any object header message changes according to the + system clock where the change was posted. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
Year
MonthDay of Month
HourMinute
SecondReserved
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
YearThe four-digit year as an ASCII string. For example, + 1998. All fields of this message should be interpreted + as coordinated universal time (UTC)
MonthThe month number as a two digit ASCII string where + January is 01 and December is 12.
Day of MonthThe day number within the month as a two digit ASCII + string. The first day of the month is 01.
HourThe hour of the day as a two digit ASCII string where + midnight is 00 and 11:00pm is 23.
MinuteThe minute of the hour as a two digit ASCII string where + the first minute of the hour is 00 and + the last is 59.
SecondThe second of the minute as a two digit ASCII string + where the first second of the minute is 00 + and the last is 59.
ReservedThis field is reserved and should always be zero.
+
+ +
+

Name: Shared Object Message

+ Type: 0x000F
+ Length: 4 Bytes
+ Status: Optional, may be repeated. + +

A constant message can be shared among several object headers + by writing that message in the global heap and having the object + headers all point to it. The pointing is accomplished with a + Shared Object message which is understood directly by the object + header layer of the library. It is also possible to have a + message of one object header point to a message in some other + object header, but care must be exercised to prevent cycles. + +

If a message is shared, then the message appears in the global + heap and its message ID appears in the Header Message Type + field of the object header. Also, the Flags field in the object + header for that message will have bit two set (the + H5O_FLAG_SHARED bit). The message body in the + object header will be that of a Shared Object message defined + here and not that of the pointed-to message. + +

+

+ + + + + + + + + + + + + + + + + + + +
+ Shared Message Message +
byte + byte + byte + byte +
VersionFlagsReserved
Reserved

Pointer

+
+ +

+

+ + + + + + + + + + + + + + + + + + + +
Field NameDescription
VersionThe version number for the message. This document + describes version one of shared messages.
FlagsThe Shared Message message points to a message which is + shared among multiple object headers. The Flags field + describes the type of sharing: + +
+
Bit 0 +
If this bit is clear then the actual message is the + first message in some other object header; otherwise + the actual message is stored in the global heap. + +
Bits 2-7 +
Reserved (always zero) +
+
PointerThis field points to the actual message. The format of + the pointer depends on the value of the Flags field. If + the actual message is in the global heap then the pointer + is the file address of the global heap collection that + holds the message, and a four-byte index into that + collection. Otherwise the pointer is a group entry + that points to some other object header.
+
+ + +
+

Name: Object Header Continuation

+Type: 0x0010
+Length: fixed
+Status: Optional, may be repeated.
+Purpose and Description: The object header continuation is the location +in the file of more header messages for the current data object. This can be +used when header blocks are large, or likely to change over time.
+Format of Data:

+ The object header continuation is formatted as follows (assuming a 4-byte +length & offset are being used in the current file): + +

+

+ + + + + + + + + + + + + +
+HDF5 Object Header Continuation Message Layout +
bytebytebytebyte
Header Continuation Offset
Header Continuation Length
+
+ +

+

+
The elements of the Header Continuation Message are described below: +
+
+
Header Continuation Offset: (<offset> bytes) +
This value is the offset in bytes from the beginning of the file where the +header continuation information is located. +
Header Continuation Length: (<length> bytes) +
This value is the length in bytes of the header continuation information in +the file. +
+
+ + + +
+

Name: Group Message

+Type: 0x0011
+Length: fixed
+Status: Required for groups, may not be repeated.
+Purpose and Description: Each group has a B-tree and a +name heap which are pointed to by this message.
+Format of data: +

The group message is formatted as follows: + +

+

+ + + + + + + + + + + + + + +
+HDF5 Object Header Group Message Layout +
bytebytebytebyte
B-tree Address
Heap Address
+
+ +

+

+
The elements of the Group Message are described below: +
+
+
B-tree Address (<offset> bytes) +
This value is the offset in bytes from the beginning of the file +where the B-tree is located. +
Heap Address (<offset> bytes) +
This value is the offset in bytes from the beginning of the file +where the group name heap is located. +
+
+ +

Disk Format: Level 2b - Shared Data Object Headers

+

In order to share header messages between several dataset objects, object +header messages may be placed into the global heap. Since these +messages require additional information beyond the basic object header message +information, the format of the shared message is detailed below. + +

+

+ + + + + + + + + + + + + +
+HDF5 Shared Object Header Message +
bytebytebytebyte
Reference Count of Shared Header Message

Shared Object Header Message

+
+ +

+

+
The elements of the shared object header message are described below: +
+
+
Reference Count of Shared Header Message: (32-bit unsigned integer) +
This value is used to keep a count of the number of dataset objects which +refer to this message from their dataset headers. When this count reaches zero, +the shared message header may be removed from the global heap. +
Shared Object Header Message: (various lengths) +
The data stored for the shared object header message is formatted in the +same way as the private object header messages described in the object header +description earlier in this document and begins with the header message Type. +
+
+ + +

Disk Format: Level 2c - Data Object Data Storage

+

The data for an object is stored separately from the header +information in the file and may not actually be located in the HDF5 file +itself if the header indicates that the data is stored externally. The +information for each record in the object is stored according to the +dimensionality of the object (indicated in the dimensionality header message). +Multi-dimensional data is stored in C order [same as current scheme], i.e. the +"last" dimension changes fastest. +

Data whose elements are composed of simple number-types are stored in +native-endian IEEE format, unless they are specifically defined as being stored +in a different machine format with the architecture-type information from the +number-type header message. This means that each architecture will need to +[potentially] byte-swap data values into the internal representation for that +particular machine. +

Data with a "variable" sized number-type is stored in a data heap +internal to the HDF5 file. Global heap identifiers are stored in the +data object storage. +

Data whose elements are composed of pointer number-types are stored in several +different ways depending on the particular pointer type involved. Simple +pointers are just stored as the dataset offset of the object being pointed to with the +size of the pointer being the same number of bytes as offsets in the file. +Partial-object pointers are stored as a heap-ID which points to the following +information within the file-heap: an offset of the object pointed to, number-type +information (same format as header message), dimensionality information (same +format as header message), sub-set start and end information (i.e. a coordinate +location for each), and field start and end names (i.e. a [pointer to the] +string indicating the first field included and a [pointer to the] string name +for the last field). + +

Data of a compound datatype is stored as a contiguous stream of the items +in the structure, with each item formatted according to its datatype. + + + diff --git a/doxygen/examples/H5.format.1.1.html b/doxygen/examples/H5.format.1.1.html new file mode 100644 index 00000000000..ebbbe8ee23a --- /dev/null +++ b/doxygen/examples/H5.format.1.1.html @@ -0,0 +1,6439 @@ + + + + HDF5 File Format Specification Version 1.1 + + + + + + +

+ + + +
+
    +
  1. Introduction +
  2. Disk Format Level 0 - File Metadata + +
      +
    1. Disk Format Level 0A - File Signature and Super Block +
    2. Disk Format Level 0B - File Driver Info +
    +
    +
  3. Disk Format Level 1 - File Infrastructure + +
      +
    1. Disk Format Level 1A - B-link Trees and B-tree Nodes +
    2. Disk Format Level 1B - Group +
    3. Disk Format Level 1C - Group Entry +
    4. Disk Format Level 1D - Local Heaps +
    5. Disk Format Level 1E - Global Heap +
    6. Disk Format Level 1F - Free-space Index +
    +
    +
  4. Disk Format Level 2 - Data Objects + +
      +
    1. Disk Format Level 2a - Data Object Headers +
        +
      1. Name: NIL +
      2. Name: Simple Dataspace + +
      3. Name: Reserved - not assigned yet +
      4. Name: Datatype +
      5. Name: Data Storage - Fill Value (Old) +
      6. Name: Data Storage - Fill Value +
      +
    +
    +
+
   +
    + +
  1. Disk Format Level 2 - Data Objects + (Continued) +
      +
    1. Disk Format Level 2a - Data Object Headers(Continued) +
        + +
      1. Name: Reserved - not assigned yet +
      2. Name: Data Storage - External Data Files +
      3. Name: Data Storage - Layout +
      4. Name: Reserved - not assigned yet +
      5. Name: Reserved - not assigned yet +
      6. Name: Data Storage - Filter Pipeline +
      7. Name: Attribute +
      8. Name: Object Comment +
      9. Name: Object Modification Date and Time (Old) +
      10. Name: Shared Object Message +
      11. Name: Object Header Continuation +
      12. Name: Group Message +
      13. Name: Object Modification Date and Time +
      +
    2. Disk Format: Level 2b - Data Object Data Storage +
    +
    +
  2. Appendix +
+
+
+ +
+
+ + +

Introduction

+ + + + + + + +
  +
+ HDF5 Groups +
 
  + Figure 1: Relationships among the HDF5 root group, other groups, and objects +
+
 
  + HDF5 Objects +  
  + Figure 2: HDF5 objects -- datasets, datatypes, or dataspaces +
+
 
+ + +

The format of an HDF5 file on disk encompasses several + key ideas of the HDF4 and AIO file formats as well as + addressing some shortcomings therein. The new format is + more self-describing than the HDF4 format and is more + uniformly applied to data objects in the file. + +

An HDF5 file appears to the user as a directed graph. + The nodes of this graph are the higher-level HDF5 objects + that are exposed by the HDF5 APIs: + +

    +
  • Groups +
  • Datasets +
  • Named datatypes +
+ +

At the lowest level, as information is actually written to the disk, + an HDF5 file is made up of the following objects: +

    +
  • A super block +
  • B-tree nodes (containing either symbol nodes or raw data chunks) +
  • Object headers +
  • A global heap +
  • Local heaps +
  • Free space +
+ +

The HDF5 library uses these low-level objects to represent the + higher-level objects that are then presented to the user or + to applications through the APIs. + For instance, a group is an object header that contains a message that + points to a local heap and to a B-tree which points to symbol nodes. + A dataset is an object header that contains messages that describe + datatype, space, layout, filters, external files, fill value, etc + with the layout message pointing to either a raw data chunk or to a + B-tree that points to raw data chunks. + + +

This Document

+ +

This document describes the lower-level data objects; + the higher-level objects and their properties are described + in the HDF5 User's Guide. + +

Three levels of information comprise the file format. + Level 0 contains basic information for identifying and + defining information about the file. Level 1 information contains + the information about the pieces of a file shared by many objects + in the file (such as a B-trees and heaps). Level 2 is the rest + of the file and contains all of the data objects, with each object + partitioned into header information, also known as + metadata, and data. + +

The sizes of various fields in the following layout tables are + determined by looking at the number of columns the field spans + in the table. There are three exceptions: (1) The size may be + overridden by specifying a size in parentheses, (2) the size of + addresses is determined by the Size of Offsets field + in the super block and is indicated in this document with a + superscripted 'O', and (3) the size of length fields is determined + by the Size of Lengths field in the super block and is + indicated in this document with a superscripted 'L'. + +

Values for all fields in this document should be treated as unsigned + integers, unless otherwise noted in the description of a field. + Additionally, all metadata fields are stored in little-endian byte + order. +

+ +
+
+ +

+ Disk Format: Level 0 - File Metadata

+ +

+ Disk Format: Level 0A - File Signature and Super Block

+ +

The super block may begin at certain predefined offsets within + the HDF5 file, allowing a block of unspecified content for + users to place additional information at the beginning (and + end) of the HDF5 file without limiting the HDF5 library's + ability to manage the objects within the file itself. This + feature was designed to accommodate wrapping an HDF5 file in + another file format or adding descriptive information to the + file without requiring the modification of the actual file's + information. The super block is located by searching for the + HDF5 file signature at byte offset 0, byte offset 512 and at + successive locations in the file, each a multiple of two of + the previous location, i.e. 0, 512, 1024, 2048, etc. + +

The super block is composed of a file signature, followed by + super block and group version numbers, information + about the sizes of offset and length values used to describe + items within the file, the size of each group page, + and a group entry for the root object in the file. + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ HDF5 Super Block Layout +
bytebytebytebyte

HDF5 File Signature (8 bytes)

Version # of Super BlockVersion # of Global Free-space StorageVersion # of Root Group Symbol Table EntryReserved (zero)
Version # of Shared Header Message FormatSize of OffsetsSize of LengthsReserved (zero)
Group Leaf Node KGroup Internal Node K
File Consistency Flags
Indexed Storage Internal Node K1Reserved (zero)1
Base AddressO
Address of Global Free-space HeapO
End of File AddressO
Driver Information Block AddressO
Root Group Symbol Table Entry
+ + + + +
+ (Items marked with an 'O' the above table are +
+ of the size specified in "Size of Offsets.") +
+ (Items marked with an '1' the above table are +
+ new in version 1 of the superblock) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
HDF5 File Signature +

This field contains a constant value and can be used to + quickly identify a file as being an HDF5 file. The + constant value is designed to allow easy identification of + an HDF5 file and to allow certain types of data corruption + to be detected. The file signature of an HDF5 file always + contains the following values: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Decimal:13772687013102610
Hexadecimal:894844460d0a1a0a
ASCII C Notation:\211HDF\r\n\032\n
+
+
+ +

This signature both identifies the file as an HDF5 file + and provides for immediate detection of common + file-transfer problems. The first two bytes distinguish + HDF5 files on systems that expect the first two bytes to + identify the file type uniquely. The first byte is + chosen as a non-ASCII value to reduce the probability + that a text file may be misrecognized as an HDF5 file; + also, it catches bad file transfers that clear bit + 7. Bytes two through four name the format. The CR-LF + sequence catches bad file transfers that alter newline + sequences. The control-Z character stops file display + under MS-DOS. The final line feed checks for the inverse + of the CR-LF translation problem. (This is a direct + descendent of the PNG file + signature.) +

+ +

This field is present in version 0+ of the superblock. +

+
Version Number of the Super Block +

This value is used to determine the format of the + information in the super block. When the format of the + information in the super block is changed, the version number + is incremented to the next integer and can be used to + determine how the information in the super block is + formatted. +

+ +

Values of 0 and 1 are defined for this field. +

+ +

This field is present in version 0+ of the superblock. +

+
Version Number of the File Free-space Information +

This value is used to determine the format of the + information in the File Free-space Information. +

+

The only value currently valid in this field is '0', which + indicates that the free space index is formatted as described + below. +

+ +

This field is present in version 0+ of the superblock. +

+
Version Number of the Root Group Symbol Table Entry +

This value is used to determine the format of the + information in the Root Group Symbol Table Entry. When the + format of the information in that field is changed, the + version number is incremented to the next integer and can be + used to determine how the information in the field + is formatted. +

+

The only value currently valid in this field is '0', which + indicates that the root group symbol table entry is formatted as + described below. +

+ +

This field is present in version 0+ of the superblock. +

+
Version Number of the Shared Header Message Format +

This value is used to determine the format of the + information in a shared object header message. Since the format + of the shared header messages differs from the other private + header messages, a version number is used to identify changes + in the format. +

+

The only value currently valid in this field is '0', which + indicates that shared header messages are formatted as + described below. +

+ +

This field is present in version 0+ of the superblock. +

+
Size of Offsets +

This value contains the number of bytes used to store + addresses in the file. The values for the addresses of + objects in the file are offsets relative to a base address, + usually the address of the super block signature. This + allows a wrapper to be added after the file is created + without invalidating the internal offset locations. +

+ +

This field is present in version 0+ of the superblock. +

+
Size of Lengths +

This value contains the number of bytes used to store + the size of an object. +

+ +

This field is present in version 0+ of the superblock. +

+
Group Leaf Node K +

Each leaf node of a group B-tree will have at + least this many entries but not more than twice this + many. If a group has a single leaf node then it + may have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0+ of the superblock. +

+
Group Internal Node K +

Each internal node of a group B-tree will have at + least this many entries but not more than twice this + many. If the group has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0+ of the superblock. +

+
File Consistency Flags +

This value contains flags to indicate information + about the consistency of the information contained + within the file. Currently, the following bit flags are + defined: +

    +
  • Bit 0 set indicates that the file is opened for + write-access. +
  • Bit 1 set indicates that the file has + been verified for consistency and is guaranteed to be + consistent with the format defined in this document. +
  • Bits 2-31 are reserved for future use. +
+ Bit 0 should be + set as the first action when a file is opened for write + access and should be cleared only as the final action + when closing a file. Bit 1 should be cleared during + normal access to a file and only set after the file's + consistency is guaranteed by the library or a + consistency utility. +

+ +

This field is present in version 0+ of the superblock. +

+
Indexed Storage Internal Node K +

Each internal node of a indexed storage B-tree will have at + least this many entries but not more than twice this + many. If the group has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 1+ of the superblock. +

+
Base Address +

This is the absolute file address of the first byte of + the HDF5 data within the file. The library currently + constrains this value to be the absolute file address + of the super block itself when creating new files; + future versions of the library may provide greater + flexibility. When opening an existing file and this address does + not match the offset of the superblock, the library assumes + that the entire contents of the HDF5 file have been adjusted in + the file and adjusts the base address and end of file address to + reflect their new positions in the file. Unless otherwise noted, + all other file addresses are relative to this base + address. +

+ +

This field is present in version 0+ of the superblock. +

+
Address of Global Free-space Index +

Free-space management is not yet defined in the HDF5 + file format and is not handled by the library. + Currently this field always contains the + undefined address. +

+ +

This field is present in version 0+ of the superblock. +

+
End of File Address +

This is the absolute file address of the first byte past + the end of all HDF5 data. It is used to determine whether a + file has been accidently truncated and as an address where + file data allocation can occur if space from the free list is + not used. +

+ +

This field is present in version 0+ of the superblock. +

+
Driver Information Block Address +

This is the relative file address of the file driver + information block which contains driver-specific + information needed to reopen the file. If there is no + driver information block then this entry should be the + undefined address. +

+ +

This field is present in version 0+ of the superblock. +

+
Root Group Symbol Table Entry +

This is the symbol table entry + of the root group, which serves as the entry point into + the group graph for the file. +

+ +

This field is present in version 0+ of the superblock. +

+
+
+ +

+ Disk Format: Level 0B - File Driver Info

+ +

The file driver information block is an optional region of the + file which contains information needed by the file driver in + order to reopen a file. The format of the file driver information + block is: + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Driver Information Block +
bytebytebytebyte
VersionReserved (zero)
Driver Information Size (4 bytes)

Driver Identification (8 bytes)



Driver Information (n bytes)


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

The version number of the driver information block. The + file format documented here is version zero. +

+
Driver Information Size +

The size in bytes of the Driver Information part of this + structure. +

+
Driver Identification +

This is an eight-byte ASCII string without null + termination which identifies the driver and version number + of the Driver Information block. The predefined drivers + supplied with the HDF5 library are identified by the + letters NCSA followed by the first four characters of + the driver name. If the Driver Information block is not + the original version then the last letter(s) of the + identification will be replaced by a version number in + ASCII. +

+

+ For example, the various versions of the multi driver + will be identified by NCSAmult. + (NCSAmult is simply NCSAmulti truncated + to eight characters. Subsequent identifiers will be created by + substituting sequential numerical values for the final character, + starting with zero.) multi driver is the only default driver that + is encoded in this field. +

+

+ Identification for user-defined drivers + is eight-byte long and arbitrary but should be unique and avoid + the four character prefix "NCSA". +

+
Driver InformationDriver information is encoded/decoded in a format defined by the + file driver. multi driver is the only default driver that has driver + information stored in this field. Its format is explained in the + following block.
+
+ +
+

Multi driver has the following format:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Multi Driver Message +
bytebytebytebyte
Member MappingMember MappingMember MappingMember Mapping
Member MappingMember MappingReservedReserved

Address of Member File 1


End of Address for Member File 1


Address of Member File 2


End of Address for Member File 2


... ...


Name of Member File 1


Name of Member File 2


... ...

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Member Mapping

Multi driver enables different types of HDF5 data and + metadata to be written to separate files. These files are viewed by the + library as a single virtual HDF5 file with a single file address. + It allows maximal 6 files to be created. + In sequence, these Member Mapping fields are for super block, + B-tree, raw data, global heap, local heap, + and object header. More than one type of data can be written to the + same file.

+

These Member Mapping fields are integer values from 1 to 6 + indicating how the data can be mapped to or merged with another type of + data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Member MappingDescription
1The super block data.
2The B-tree data.
3The raw data.
4The global heap data.
5The local heap data.
6The object header data.

+ For example, if the third field has the value 3 and all the rest have the + value 1, it means there are two files, one for raw data, one for super block, + B-tree, global heap, local heap, and object header. +
Reserved

These fields are reserved and should always be zero.

Address of Member File

Specifies the virtual address. A normally eight-byte integer with + the value from 0 (zero) to maximal value, + at which the member file starts.

End of Address for Member File

The end of allocated address for the member file. A normally eight-byte + integer value.

Name of Member File

The null-terminated name of member file. Its length should be multiples of + 8 bytes. Additional bytes will be padded with NULLs. The default naming + convention is %%s-X.h5, where X is one of the letters + s (for super block), b (for B-tree), r (for raw data), + g (for global heap), l (for local heap), and o (for + object header). The name for the whole HDF5 file will substitute the %s + in the string. +

+
+
+ +
+
+ +

+ Disk Format: Level 1 - File Infrastructure

+

Disk Format: Level 1A - B-link Trees and B-tree Nodes

+ +

B-link trees allow flexible storage for objects which tend to grow + in ways that cause the object to be stored discontiguously. B-trees + are described in various algorithms books including "Introduction to + Algorithms" by Thomas H. Cormen, Charles E. Leiserson, and Ronald + L. Rivest. The B-link tree, in which the sibling nodes at a + particular level in the tree are stored in a doubly-linked list, + is described in the "Efficient Locking for Concurrent Operations + on B-trees" paper by Phillip Lehman and S. Bing Yao as published + in the ACM Transactions on Database Systems, Vol. 6, + No. 4, December 1981. + +

The B-link trees implemented by the file format contain one more + key than the number of children. In other words, each child + pointer out of a B-tree node has a left key and a right key. + The pointers out of internal nodes point to sub-trees while + the pointers out of leaf nodes point to symbol nodes and + raw data chunks. + Aside from that difference, internal nodes and leaf nodes + are identical. + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ B-tree Nodes +
bytebytebytebyte
Signature
Node TypeNode LevelEntries Used
Address of Left SiblingO
Address of Right SiblingO
Key 0 (variable size)
Address of Child 0O
Key 1 (variable size)
Address of Child 1O
...
Key 2K (variable size)
Address of Child 2KO
Key 2K+1 (variable size)
+ + + +
+ (Items marked with an 'O' the above table are +
+ of the size specified in "Size of Offsets.") +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Signature +

The ASCII character string "TREE" is + used to indicate the + beginning of a B-link tree node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file. +

+
Node Type +

Each B-link tree points to a particular type of data. + This field indicates the type of data as well as + implying the maximum degree K of the tree and + the size of each Key field. +

+ + + + + + + + + + + + + + +
Node TypeDescription
0This tree points to group nodes.
1This tree points to raw data chunk nodes.
+
Node Level +

The node level indicates the level at which this node + appears in the tree (leaf nodes are at level zero). Not + only does the level indicate whether child pointers + point to sub-trees or to data, but it can also be used + to help file consistency checking utilities reconstruct + damanged trees. +

+
Entries Used +

This determines the number of children to which this + node points. All nodes of a particular type of tree + have the same maximum degree, but most nodes will point + to less than that number of children. The valid child + pointers and keys appear at the beginning of the node + and the unused pointers and keys appear at the end of + the node. The unused pointers and keys have undefined + values. +

+
Address of Left Sibling +

This is the relative file address of the left sibling of + the current node. If the current + node is the left-most node at this level then this field + is the undefined address. +

+
Address of Right Sibling +

This is the relative file address of the right sibling of + the current node. If the current + node is the right-most node at this level then this + field is the undefined address. +

+
Keys and Child Pointers +

Each tree has 2K+1 keys with 2K + child pointers interleaved between the keys. The number + of keys and child pointers actually containing valid + values is determined by the node's Entries Used field. + If that field is N then the B-link tree contains + N child pointers and N+1 keys. +

+
Key +

The format and size of the key values is determined by + the type of data to which this tree points. The keys are + ordered and are boundaries for the contents of the child + pointer; that is, the key values represented by child + N fall between Key N and Key + N+1. Whether the interval is open or closed on + each end is determined by the type of data to which the + tree points. +

+ +

+ The format of the key depends on the node type. + For nodes of node type 0 (group nodes), the key is formatted as + follows: +

+ + + + + +
A single field of Size of Lengths + bytes:Indicates the byte offset into the local heap + for the first object name in the subtree which + that key describes. +
+
+

+ +

+ For nodes of node type 1 (chunked raw data nodes), the key is + formatted as follows: +

+ + + + + + + + + + + + + +
Bytes 1-4:Size of chunk in bytes.
Bytes 4-8:Filter mask, a 32-bit bitfield indicating which + filters have been skipped for this chunk. Each filter + has an index number in the pipeline (starting at 0, with + the first filter to apply) and if that filter is skipped, + the bit corresponding to it's index is set.
N 64-bit fields:A 64-bit index indicating the offset of the + chunk within the dataset where N is the number + of dimensions of the dataset. For example, if + a chunk in a 3-dimensional dataset begins at the + position [5,5,5], there will be three + such 64-bit indices, each with the value of + 5.
+
+

+
Child Pointer +

The tree node contains file addresses of subtrees or + data depending on the node level. Nodes at Level 0 point + to data addresses, either raw data chunk or group nodes. + Nodes at non-zero levels point to other nodes of the + same B-tree. +

+

For raw data chunk nodes, the child pointer is the address + of a single raw data chunk. For group nodes, the child pointer + points to a symbol table, which contains + information for multiple symbol table entries. +

+
+
+ +

+ Conceptually, each B-tree node looks like this: +

+ + + + + + + + + + + + + +
key[0] child[0] key[1] child[1] key[2] ... ... key[N-1] child[N-1] key[N]
+
+
+ + where child[i] is a pointer to a sub-tree (at a level + above Level 0) or to data (at Level 0). + Each key[i] describes an item stored by the B-tree + (a chunk or an object of a group node). The range of values + represented by child[i] is indicated by key[i] + and key[i+1]. + + +

The following question must next be answered: + "Is the value described by key[i] contained in + child[i-1] or in child[i]?" + The answer depends on the type of tree. + In trees for groups (node type 0) the object described by + key[i] is the greatest object contained in + child[i-1] while in chunk trees (node type 1) the + chunk described by key[i] is the least chunk in + child[i]. + +

That means that key[0] for group trees is sometimes unused; + it points to offset zero in the heap, which is always the + empty string and compares as "less-than" any valid object name. + +

And key[N] for chunk trees is sometimes unused; + it contains a chunk offset which compares as "greater-than" + any other chunk offset and has a chunk byte size of zero + to indicate that it is not actually allocated. + + +

Disk Format: Level 1B - Group and Symbol Nodes

+ +

A group is an object internal to the file that allows + arbitrary nesting of objects within the file (including other groups). + A group maps a set of names in the group to a set of relative + file addresses where objects with those names are located in + the file. Certain metadata for an object to which the group points + can be cached in the group's symbol table in addition to the + object's header. + +

An HDF5 object name space can be stored hierarchically by + partitioning the name into components and storing each + component in a group. The group entry for a + non-ultimate component points to the group containing + the next component. The group entry for the last + component points to the object being named. + +

A group is a collection of group nodes pointed + to by a B-link tree. Each group node contains entries + for one or more symbols. If an attempt is made to add a + symbol to an already full group node containing + 2K entries, then the node is split and one node + contains K symbols and the other contains + K+1 symbols. + +
+

+ + + + + + + + + + + + + + + + + + + +
+ Group Node (A Leaf of a B-tree) +
bytebytebytebyte
Signature
Version NumberReserved (0)Number of Symbols


Group Entries


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Signature +

The ASCII character string "SNOD" is + used to indicate the + beginning of a group node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file. +

+
Version Number +

The version number for the group node. This + document describes version 1. (There is no version '0' + of the group node) +

+
Number of Symbols +

Although all group nodes have the same length, + most contain fewer than the maximum possible number of + symbol entries. This field indicates how many entries + contain valid data. The valid entries are packed at the + beginning of the group node while the remaining + entries contain undefined values. +

+
Group Entries +

Each symbol has an entry in the group node. + The format of the entry is described below. + There are 2K entries in each group node, where + K is the "Group Leaf Node K" value from the + super block. +

+
+
+ +

+ Disk Format: Level 1C - Group Entry

+ +

Each group entry in a group node is designed + to allow for very fast browsing of stored objects. + Toward that design goal, the group entries + include space for caching certain constant metadata from the + object header. + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Group Entry +
bytebytebytebyte
Name OffsetO
Object Header AddressO
Cache Type
Reserved


Scratch-pad Space (16 bytes)


+ + + +
+ (Items marked with an 'O' the above table are +
+ of the size specified in "Size of Offsets.") +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name Offset +

This is the byte offset into the group local + heap for the name of the object. The name is null + terminated. +

+
Object Header Address +

Every object has an object header which serves as a + permanent location for the object's metadata. In addition + to appearing in the object header, some metadata can be + cached in the scratch-pad space. +

+
Cache Type +

The cache type is determined from the object header. + It also determines the format for the scratch-pad space: +
+ + + + + + + + + + + + + + + + + + + + + +
Type:Description:
0No data is cached by the group entry. This + is guaranteed to be the case when an object header + has a link count greater than one. +
1Object header metadata is cached in the group + entry. This implies that the group + entry refers to another group. +
2The entry is a symbolic link. The first four bytes + of the scratch-pad space are the offset into the local + heap for the link value. The object header address + will be undefined. +
NOther cache values can be defined later and + libraries that do not understand the new values will + still work properly. +
+

+
Reserved +

These four bytes are present so that the scratch-pad + space is aligned on an eight-byte boundary. They are + always set to zero. +

+
Scratch-pad Space +

This space is used for different purposes, depending + on the value of the Cache Type field. Any metadata + about a dataset object represented in the scratch-pad + space is duplicated in the object header for that + dataset. This metadata can include the datatype + and the size of the dataspace for a dataset whose datatype + is atomic and whose dataspace is fixed and less than + four dimensions. +

+

+ Furthermore, no data is cached in the group + entry scratch-pad space if the object header for + the group entry has a link count greater than + one. +

+
+
+ +

Format of the Scratch-pad Space

+ +

The group entry scratch-pad space is formatted + according to the value in the Cache Type field. + +

If the Cache Type field contains the value zero + (0) then no information is + stored in the scratch-pad space. + +

If the Cache Type field contains the value one + (1), then the scratch-pad space + contains cached metadata for another object header + in the following format: + +
+

+ + + + + + + + + + + + + + +
+ Object Header Scratch-pad Format +
bytebytebytebyte
Address of B-treeO
Address of Name HeapO
+ + + +
+ (Items marked with an 'O' the above table are +
+ of the size specified in "Size of Offsets.") +
+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Address of B-tree +

This is the file address for the root of the + group's B-tree. +

+
Address of Name Heap +

This is the file address for the group's local + heap, in which are stored the group's symbol names. +

+
+
+ + +

If the Cache Type field contains the value two + (2), then the scratch-pad space + contains cached metadata for another symbolic link + in the following format: + +
+

+ + + + + + + + + + + + + +
+ Symbolic Link Scratch-pad Format +
bytebytebytebyte
Offset to Link Value
+
+ +
+
+ + + + + + + + + + +
Field NameDescription
Offset to Link Value +

The value of a symbolic link (that is, the name of the + thing to which it points) is stored in the local heap. + This field is the 4-byte offset into the local heap for + the start of the link value, which is null terminated. +

+
+
+ +

Disk Format: Level 1D - Local Heaps

+ +

A heap is a collection of small heap objects. Objects can be + inserted and removed from the heap at any time. + The address of a heap does not change once the heap is created. + References to objects are stored in the group table; + the names of those objects are stored in the local heap. +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Local Heap +
bytebytebytebyte
Signature
VersionReserved (zero)
Data Segment SizeL
Offset to Head of Free-listL
Address of Data SegmentO
+ + + + +
+ (Items marked with an 'L' the above table are +
+ of the size specified in "Size of Lengths.") +
+ (Items marked with an 'O' the above table are +
+ of the size specified in "Size of Offsets.") +
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Signature +

The ASCII character string "HEAP" + is used to indicate the + beginning of a heap. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+
Version +

Each local heap has its own version number so that new + heaps can be added to old files. This document + describes version zero (0) of the local heap. +

+
Data Segment Size +

The total amount of disk memory allocated for the heap + data. This may be larger than the amount of space + required by the objects stored in the heap. The extra + unused space in the heap holds a linked list of free blocks. +

+
Offset to Head of Free-list +

This is the offset within the heap data segment of the + first free block (or the + undefined address if there is no + free block). The free block contains "Size of Lengths" bytes that + are the offset of the next free block (or the + value '1' if this is the + last free block) followed by "Size of Lengths" bytes that store + the size of this free block. The size of the free block includes + the space used to store the offset of the next free block and + the of the current block, making the minimum size of a free block + 2 * "Size of Lengths". +

+
Address of Data Segment +

The data segment originally starts immediately after + the heap header, but if the data segment must grow as a + result of adding more objects, then the data segment may + be relocated, in its entirety, to another part of the + file. +

+
+
+ +

Objects within the heap should be aligned on an 8-byte boundary. + +

Disk Format: Level 1E - Global Heap

+ +

Each HDF5 file has a global heap which stores various types of + information which is typically shared between datasets. The + global heap was designed to satisfy these goals: + +

    +
  1. Repeated access to a heap object must be efficient without + resulting in repeated file I/O requests. Since global heap + objects will typically be shared among several datasets, it is + probable that the object will be accessed repeatedly. +
  2. Collections of related global heap objects should result in + fewer and larger I/O requests. For instance, a dataset of + object references will have a global heap object for each + reference. Reading the entire set of object references + should result in a few large I/O requests instead of one small + I/O request for each reference. +
  3. It should be possible to remove objects from the global heap + and the resulting file hole should be eligible to be reclaimed + for other uses. +
+

+ +

The implementation of the heap makes use of the memory + management already available at the file level and combines that + with a new top-level object called a collection to + achieve Goal B. The global heap is the set of all collections. + Each global heap object belongs to exactly one collection and + each collection contains one or more global heap objects. For + the purposes of disk I/O and caching, a collection is treated as + an atomic object. +

+ +

The HDF5 library creates global heap collections as needed, so there may + be multiple collections throughout the file. The set of all of them is + abstractly called the "global heap", although they don't actually link + to each other, and there is no global place in the file where you can + discover all of the collections. The collections are found simply by + finding a reference to one through another object in the file (eg. + variable-length datatype elements, etc). +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ A Global Heap Collection +
bytebytebytebyte
Signature
VersionReserved (zero)
Collection SizeL

Global Heap Object 1


Global Heap Object 2


...


Global Heap Object N


Global Heap Object 0 (free space)

+ + + +
+ (Items marked with an 'L' the above table are +
+ of the size specified in "Size of Lengths.") +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Signature +

The ASCII character string "GCOL" + is used to indicate the + beginning of a collection. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+
Version +

Each collection has its own version number so that new + collections can be added to old files. This document + describes version one (1) of the collections (there is no + version zero (0)). +

+
Collection Size +

This is the size in bytes of the entire collection + including this field. The default (and minimum) + collection size is 4096 bytes which is a typical file + system block size. This allows for 127 16-byte heap + objects plus their overhead (the collection header of 16 bytes + and the 16 bytes of information about each heap object). +

+
Global Heap Object 1 through N +

The objects are stored in any order with no + intervening unused space. +

+
Global Heap Object 0 +

Global Heap Object 0 (zero), when present, represents the free + space in the collection. Free space always appears at the end of + the collection. If the free space is too small to store the header + for Object 0 (described below) then the header is implied and the + collection contains no free space. +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Global Heap Object +
bytebytebytebyte
Heap Object IDReference Count
Reserved
Object SizeL

Object Data

+ + + +
+ (Items marked with an 'L' the above table are +
+ of the size specified in "Size of Lengths.") +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Heap Object ID +

Each object has a unique identification number within a + collection. The identification numbers are chosen so that + new objects have the smallest value possible with the + exception that the identifier 0 always refers to the + object which represents all free space within the + collection. +

+
Reference Count +

All heap objects have a reference count field. An + object which is referenced from some other part of the + file will have a positive reference count. The reference + count for Object 0 is always zero. +

+
Reserved +

Zero padding to align next field on an 8-byte boundary. +

+
Object Size +

This is the size of the object data stored for the object. + The actual storage space allocated for the object data is rounded + up to a multiple of eight. +

+
Object Data +

The object data is treated as a one-dimensional array + of bytes to be interpreted by the caller. +

+
+
+ +

Disk Format: Level 1F - Free-space Index

+ +

The free-space index is a collection of blocks of data, + dispersed throughout the file, which are currently not used by + any file objects. + +

The super block contains a pointer to root of the free-space description; + that pointer is currently required to be the + undefined address. + +

The format of the free-space index is not defined at this time. + + + +
+


+ +

Disk Format: Level 2 - Data Objects

+ +

Data objects contain the real information in the file. These + objects compose the scientific data and other information which + are generally thought of as "data" by the end-user. All the + other information in the file is provided as a framework for + these data objects. +

+ +

A data object is composed of header information and data + information. The header information contains the information + needed to interpret the data information for the data object as + well as additional "metadata" or pointers to additional + "metadata" used to describe or annotate each data object. +

+ +

+ Disk Format: Level 2A - Data Object Headers

+ +

The header information of an object is designed to encompass + all the information about an object, except for the data itself. + This information includes + the dataspace, datatype, information about how the data + is stored on disk (in external files, compressed, broken up in + blocks, etc.), as well as other information used by the library + to speed up access to the data objects or maintain a file's + integrity. Information stored by user applications as attributes + is also stored in the object's header. The header of each object is + not necessarily located immediately prior to the object's data in the + file and in fact may be located in any position in the file. The order + of the messages in an object header is not significant. +

+ +

Header messages are aligned on 8-byte boundaries. +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Object Headers +
bytebytebytebyte
VersionReserved (zero)Number of Header Messages
Object Reference Count
Object Header Size
Header Message Type #1Size of Header Message Data #1
Header Message #1 FlagsReserved (zero)

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #n
Header Message #n FlagsReserved (zero)

Header Message Data #n

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

This value is used to determine the format of the + information in the object header. When the format of the + information in the object header is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + document describes version one (1) (there was no version + zero (0)). +

+
Number of Header Messages +

This value determines the number of messages listed in + object headers for this object. This value includes the messages + in continuation messages for this object. +

+
Object Reference Count +

This value specifies the number of "hard links" to this object + within the current file. References to the object from external + files, "soft links" in this file and object references in this + file are not tracked. +

+
Object Header Size +

This value specifies the number of bytes of header message data + following this length field that contain object header messages + for this object header. This value does not include the size of + object header continuation blocks for this object elsewhere in the + file. +

+
Header Message Type +

This value specifies the type of information included in the + following header message data. The header message types for the + pre-defined header messages are included in sections below. +

+
Size of Header Message Data +

This value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size includes + padding bytes to make the message a multiple of eight + bytes. +

+
Header Message Flags +

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, the message data is constant. This is used + for messages like the datatype message of a dataset. +
1If set, the message is stored in the global heap. + The Header Message Data field contains a Shared Object + message and the Size of Header Message Data field + contains the size of that Shared Object message. +
2-7Reserved
+

+
Header Message Data +

The format and length of this field is determined by the + header message type and size respectively. Some header + message types do not require any data and this information + can be eliminated by setting the length of the message to + zero. The data is padded with enough zeros to make the + size a multiple of eight. +

+
+
+ +

The header message types and the message data associated with + them compose the critical "metadata" about each object. Some + header messages are required for each object while others are + optional. Some optional header messages may also be repeated + several times in the header itself, the requirements and number + of times allowed in the header will be noted in each header + message description below. +

+ +

The following is a list of currently defined header messages: +

+ +
+

Name: NIL

+ +

Header Message Type: 0x0000 +

+

Length: varies +

+

Status: Optional, may be repeated. +

+

Purpose and Description: The NIL message is used to indicate a + message which is to be ignored when reading the header messages for a + data object. [Possibly one which has been deleted for some reason.] +

+

Format of Data: Unspecified. +

+ +
+

Name: Simple Dataspace

+ +

Header Message Type: 0x0001 +

+

Length: Varies according to the number of dimensions, + as described in the following table. +

+

Status: Required for dataset objects, may not be + repeated. +

+

Description: The simple dataspace message describes the + number of dimensions (i.e. "rank") and size of each dimension that the + data object has. This message is only used for datasets which have a + simple, rectilinear grid layout; datasets requiring a more complex + layout (irregularly structured or unstructured grids, etc.) must use + the Complex Dataspace message for expressing the space the + dataset inhabits. (Note: The Complex Dataspace + functionality is not yet implemented and it is not described in this + document.) +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Simple Dataspace Message +
bytebytebytebyte
VersionDimensionalityFlagsReserved
Reserved
Dimension #1 SizeL
.
.
.
Dimension #n SizeL
Dimension #1 Maximum SizeL
.
.
.
Dimension #n Maximum SizeL
Permutation Index #1L
.
.
.
Permutation Index #nL
+ + + +
+ (Items marked with an 'L' the above table are +
+ of the size specified in "Size of Lengths.") +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

This value is used to determine the format of the + Simple Dataspace Message. When the format of the + information in the message is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + document describes version one (1) (there was no version + zero (0)). +

+
Dimensionality +

This value is the number of dimensions that the data + object has. +

+
Flags +

This field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. Bit 1 is used to indicate that + permutation indices are present. +

+
Dimension #n Size +

This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+
Dimension #n Maximum Size +

This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + "unlimited" size which indicates + that the data may expand along this dimension indefinitely. + If these values are not stored, the maximum size of each + dimension is assumed to be the dimension's current size. +

+
Permutation Index #n +

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. If these values are + not stored, the first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+
+
+ +

+ + + +
+

Name: Reserved - Not Assigned Yet

+ Header Message Type: 0x0002
+ Length: N/A
+ Status: N/A
+ Format of Data: N/A
+ +

Purpose and Description: This message type was skipped during + the initial specification of the file format and may be used in a + future expansion to the format. + + +


+

Name: Datatype

+ +

Header Message Type: 0x0003 +

+

Length: variable +

+

Status: Required for dataset or named datatype objects, + may not be repeated. +

+ +

Description: The datatype message defines the datatype + for each element of a dataset. A datatype can describe an atomic type + like a fixed- or floating-point type or a compound type like a C + struct. + Datatypes messages are stored + as a list of datatype classes and + their associated properties. +

+ +

Datatype messages that are part of a dataset object, + do not describe how elements are related to one another, the dataspace + message is used for that purpose. Datatype messages that are part of + a named datatype message describe an "abstract" datatype that can be + used by other objects in the file. +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Datatype Message +
bytebytebytebyte
Class and VersionClass Bit Field, Bits 0-7Class Bit Field, Bits 8-15Class Bit Field, Bits 16-23
Size


Properties


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Class and Version +

The version of the datatype message and the datatype's class + information are packed together in this field. The version + number is packed in the top 4 bits of the field and the class + is contained in the bottom 4 bits. +

+

The version number information is used for changes in the + format of the datatype message and is described here: + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Used by early versions of the library to encode + compound datatypes with explicit array fields. + See the compound datatype description below for + further details. +
2The current version used by the library. +
+

+

The class of the datatype determines the format for the class + bit field and properties portion of the datatype message, which + are described below. The + following classes are currently defined: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Fixed-Point
1Floating-Point
2Time
3String
4Bitfield
5Opaque
6Compound
7Reference
8Enumerated
9Variable-Length
10Array
+

+
Class Bit Fields +

The information in these bit fields is specific to each datatype + class and is described below. All bits not defined for a + datatype class are set to zero. +

+
Size +

The size of the datatype in bytes. +

+
Properties +

This variable-sized field encodes information specific to each + datatype class and is described below. If there is no + property information specified for a datatype class, the size + of this field is zero. +

+
+
+

+ +

Class specific information for Fixed-Point Numbers (Class 0): + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.
3Signed. If this bit is set then the fixed-point + number is in 2's complement form.
4-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + + +
+ Property Descriptions +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription
Bit Offset +

The bit offset of the first significant bit of the fixed-point + value within the datatype. The bit offset specifies the number + of bits "to the right of" the value. +

+
Bit Precision +

The number of bits of precision of the fixed-point value + within the datatype. +

+
+
+

+ +

Class specific information for Floating-Point Numbers (Class 1): + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2, 3Padding type. Bit 1 is the low bits pad type, bit 2 + is the high bits pad type, and bit 3 is the internal bits + pad type. If a datum has unused bits at either end or between + the sign bit, exponent, or mantissa, then the value of bit + 1, 2, or 3 is copied to those locations.
4-5Normalization. The value can be 0 if there is no + normalization, 1 if the most significant bit of the + mantissa is always set (except for 0.0), and 2 if the most + signficant bit of the mantissa is not stored but is + implied to be set. The value 3 is reserved and will not + appear in this field.
6-7Reserved (zero).
8-15Sign Location. This is the bit position of the sign + bit. Bits are numbered with the least significant bit zero.
16-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Property Descriptions +
ByteByteByteByte
Bit OffsetBit Precision
Exponent LocationExponent SizeMantissa LocationMantissa Size
Exponent Bias
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Bit Offset +

The bit offset of the first significant bit of the floating-point + value within the datatype. The bit offset specifies the number + of bits "to the right of" the value. +

+
Bit Precision +

The number of bits of precision of the floating-point value + within the datatype. +

+
Exponent Location +

The bit position of the exponent field. Bits are numbered with + the least significant bit number zero. +

+
Exponent Size +

The size of the exponent field in bits. +

+
Mantissa Location +

The bit position of the mantissa field. Bits are numbered with + the least significant bit number zero. +

+
Mantissa Size +

The size of the mantissa field in bits. +

+
Exponent Bias +

The bias of the exponent field. +

+
+
+

+ +

Class specific information for Time (Class 2): + +
+

+ + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + +
+ Property Descriptions +
ByteByte
Bit Precision
+
+ +
+
+ + + + + + + + + + + +
Field NameDescription
Bit Precision +

The number of bits of precision of the time value. +

+
+
+

+ +

Class specific information for Strings (Class 3): + +
+

+ + + + + + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-3Padding type. This four-bit value determines the + type of padding to use for the string. The values are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null Terminate: A zero byte marks the end of the + string and is guaranteed to be present after + converting a long string to a short string. When + converting a short string to a long string the value is + padded with additional null characters as necessary. +
1Null Pad: Null characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. +
2Space Pad: Space characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +
+
4-7Character Set. The character set to use for + encoding the string. The only character set supported is + the 8-bit ASCII (zero) so no translations have been defined + yet.
8-23Reserved (zero).
+
+ +

There are no properties defined for the string class. +

+

+ +

Class specific information for Bitfields (Class 4): + +
+

+ + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.
1, 2Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.
3-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + + +
+ Property Description +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Bit Offset +

The bit offset of the first significant bit of the bitfield + within the datatype. The bit offset specifies the number + of bits "to the right of" the value. +

+
Bit Precision +

The number of bits of precision of the bitfield + within the datatype. +

+
+
+

+ +

Class specific information for Opaque (Class 5): + +
+

+ + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-7Length of ASCII tag in bytes.
8-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + +
+ Property Description +
ByteByteByteByte

ASCII Tag
+
+
+ +
+
+ + + + + + + + + + +
Field NameDescription
ASCII Tag +

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+
+
+

+ +

Class specific information for Compound (Class 6): + +
+

+ + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-15Number of Members. This field contains the number + of members defined for the compound datatype. The member + definitions are listed in the Properties field of the data + type message. +
15-23Reserved (zero).
+
+

+ +

The Properties field of a compound datatype is a list of the + member definitions of the compound datatype. The member + definitions appear one after another with no intervening bytes. + The member types are described with a recursive datatype + message. + +

Note that the property descriptions are different for different + versions of the datatype version. Additionally note that the version + 0 properties are deprecated and have been replaced with the version + 1 properties in versions of the HDF5 library from the 1.4 release + onward. + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Properties Description for Datatype Version 1 +
ByteByteByteByte

Name

Byte Offset of Member
DimensionalityReserved (zero)
Dimension Permutation
Reserved (zero)
Dimension #1 Size (required)
Dimension #2 Size (required)
Dimension #3 Size (required)
Dimension #4 Size (required)

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name +

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+
Byte Offset of Member +

This is the byte offset of the member within the datatype. +

+
Dimensionality +

If set to zero, this field indicates a scalar member. If set + to a value greater than zero, this field indicates that the + member is an array of values. For array members, the size of + the array is indicated by the 'Size of Dimension n' field in + this message. +

+
Dimension Permutation +

This field was intended to allow an array field to have + it's dimensions permuted, but this was never implemented. + This field should always be set to zero. +

+
Dimension #n Size +

This field is the size of a dimension of the array field as + stored in the file. The first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+
Member Type Message +

This field is a datatype message describing the datatype of + the member. +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Properties Description for Datatype Version 2 +
ByteByteByteByte

Name

Byte Offset of Member

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name +

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+
Byte Offset of Member +

This is the byte offset of the member within the datatype. +

+
Member Type Message +

This field is a datatype message describing the datatype of + the member. +

+
+
+

+ +

Class specific information for Reference (Class 7): + +
+

+ + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-3Type. This four-bit value contains the type of reference + described. The values defined are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Object Reference: A reference to another object in this + HDF5 file. +
1Dataset Region Reference: A reference to a region within + a dataset in this HDF5 file. +
2Internal Reference: A reference to a region within the + current dataset. (Not currently implemented) +
3-15Reserved +
+ +
15-23Reserved (zero).
+
+ +

There are no properties defined for the reference class. +

+

+ +

Class specific information for Enumeration (Class 8): + +
+

+ + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-15Number of Members. The number of name/value + pairs defined for the enumeration type.
16-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Property Description +
ByteByteByteByte

Base Type


Names


Values

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Base Type +

Each enumeration type is based on some parent type, usually an + integer. The information for that parent type is described + recursively by this field. +

+
Names +

The name for each name/value pair. Each name is stored as a null + terminated ASCII string in a multiple of eight bytes. The names + are in no particular order. +

+
Values +

The list of values in the same order as the names. The values + are packed (no inter-value padding) and the size of each value + is determined by the parent type. +

+
+
+

+ + +

Class specific information for Variable-Length (Class 9): + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bit Field Description +
BitsMeaning
0-3Type. This four-bit value contains the type of + variable-length datatype described. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Sequence: A variable-length sequence of any sequence of + data. Variable-length sequences do not have padding or + character set information. +
1String: A variable-length sequence of characters. + Variable-length strings have padding and character set + information. +
2-15Reserved +
+ +
4-7Padding type. (variable-length string only) + This four-bit value determines the type of padding + used for variable-length strings. The values are the same + as for the string padding type, as follows: + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null terminate: A zero byte marks the end of a string + and is guaranteed to be present after converting a long + string to a short string. When converting a short string + to a long string, the value is padded with additional null + characters as necessary. +
1Null pad: Null characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. +
2Space pad: Space characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +
+ + This value is set to zero for variable-length sequences. + +
8-11Character Set. (variable-length string only) + This four-bit value specifies the character set + to be used for encoding the string: + + + + + + + + + + + + + + + +
ValueDescription
0ASCII: As of this writing (July 2003, Release 1.6.0), + 8-bit ASCII is the only character set supported. Therefore, + no translations have been defined. +
1-15Reserved +
+ + This value is set to zero for variable-length sequences. + +
12-23Reserved (zero).
+
+ +
+
+ + + + + + + + + + + + + + +
+ Property Description +
ByteByteByteByte

Base Type

+
+ +
+
+ + + + + + + + + + + +
Field NameDescription
Base Type +

Each variable-length type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+

+ +

Class specific information for Array (Class 10): + +

There are no bit fields defined for the array class. +

+ +

Note that the dimension information defined in the property for this + datatype class is independent of dataspace information for a dataset. + The dimension information here describes the dimensionality of the + information within a data element (or a component of an element, if the + array datatype is nested within another datatype) and the dataspace for a + dataset describes the location of the elements in a dataset. +

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Property Description +
ByteByteByteByte
DimensionalityReserved (zero)
Dimension #1 Size
.
.
.
Dimension #n Size
Permutation Index #1
.
.
.
Permutation Index #n

Base Type

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Dimensionality +

This value is the number of dimensions that the array has. +

+
Dimension #n Size +

This value is the size of the dimension of the array + as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+
Permutation Index #n +

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. Currently, dimension + permutations are not supported and these indices should be set + to the index position minus one (i.e. the first dimension should + be set to 0, the second dimension should be set to 1, etc.) +

+
Base Type +

Each array type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ +

+ +
+

Name: Data Storage - Fill Value (Old)

+ +

Header Message Type: 0x0004 +

+

Length: varies +

+

Status: Optional, may not be repeated. +

+ +

Description: The fill value message stores a single + data value which is returned to the application when an uninitialized + data element is read from a dataset. The fill value is interpreted + with the same datatype as the dataset. If no fill value message is + present then a fill value of all zero bytes is assumed. +

+ +

This fill value message is deprecated in favor of the "new" + fill value message (Message Type 0x0005) and is only written to the + file for forward compatibility with versions of the HDF5 library before + the 1.6.0 version. Additionally, it only appears for datasets with a + user defined fill value (as opposed to the library default fill value + or an explicitly set "undefined" fill value). +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + +
+ Fill Value Message (Old) +
bytebytebytebyte
Size

Fill Value

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Size +

This is the size of the Fill Value field in bytes. +

+
Fill Value +

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. +

+
+
+

+ +
+

Name: Data Storage - Fill Value

+ +

Header Message Type: 0x0005 +

+

Length: varies +

+

Status: Required for dataset objects, may not be repeated. +

+ +

Description: The fill value message stores a single + data value which is returned to the application when an uninitialized + data element is read from a dataset. The fill value is interpreted + with the same datatype as the dataset. +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Fill Value Message +
bytebytebytebyte
VersionSpace Allocation TimeFill Value Write TimeFill Value Defined
Size

Fill Value

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

The version number information is used for changes in the + format of the fill value message and is described here: + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Used by version 1.6.x of the library to encode + fill values. In this version, the Size field is + always present. +
2The current version used by the library (version + 1.7.3 or later). In this version, the Size and + Fill Value fields are + only present if the Fill Value Defined field is set + to 1. +
+

+
Space Allocation Time +

When the storage space for the dataset's raw data will be + allocated. The allowed values are: + + + + + + + + + + + + + + + + + + +
ValueDescription
1Early allocation. Storage space for the entire dataset + should be allocated in the file when the dataset is + created. +
2Late allocation. Storage space for the entire dataset + should not be allocated until the dataset is written + to. +
3Incremental allocation. Storage space for the + dataset should not be allocated until the portion + of the dataset is written to. This is currently + used in conjunction with chunked data storage for + datasets. +
+

+
Fill Value Write Time +

At the time that storage space for the dataset's raw data is + allocated, this value indicates whether the fill value should + be written to the raw data storage elements. The allowed values + are: + + + + + + + + + + + + + + + + + + +
ValueDescription
0On allocation. The fill value is always written to + the raw data storage when the storage space is allocated. +
1Never. The fill value should never be written to + the raw data storage. +
2Fill value written if set by user. The fill value + will be written to the raw data storage when the storage + space is allocated only if the user explicitly set + the fill value. If the fill value is the library + default or is undefined, it will not be written to + the raw data storage. +
+

+
Fill Value Defined +

This value indicates if a fill value is defined for this + dataset. If this value is 0, the fill value is undefined. + If this value is 1, a fill value is defined for this dataset. + For version 2 or later of the fill value message, this value + controls the presence of the Size field. +

+
Size +

This is the size of the Fill Value field in bytes. This field + is not present if the Version field is >1 and the Fill Value + Defined field is set to 0. +

+
Fill Value +

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. This field is + not present if the Version field is >1 and the Fill Value + Defined field is set to 0. +

+
+
+

+ + + +
+

Name: Reserved - Not Assigned Yet

+

Header Message Type: 0x0006

+

Length: N/A

+

Status: N/A

+

Format of Data: N/A

+ +

Purpose and Description: This message type was skipped during + the initial specification of the file format and may be used in a + future expansion to the format.

+ +
+

Name: Data Storage - + External Data Files

+

Header Message Type: 0x0007

+

Length: varies

+

Status: Optional, may not be repeated.

+ +

Purpose and Description: The external object message + indicates that the data for an object is stored outside the HDF5 + file. The filename of the object is stored as a Universal + Resource Location (URL) of the actual filename containing the + data. An external file list record also contains the byte offset + of the start of the data within the file and the amount of space + reserved in the file for that data.

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ External File List Message +
bytebytebytebyte
VersionReserved
Allocated SlotsUsed Slots

Heap Address


Slot Definitions...

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

The version number information is used for changes in the format of External File + List Message and is described here: + + + + + + + + + + + +
VersionDescription
0Never used. +
1The current version used by the library. +
+

+
Reserved +

This field is reserved for future use.

+
Allocated Slots +

The total number of slots allocated in the message. Its value must be at least as + large as the value contained in the Used Slots field. (The current library simply + uses the number of Used Slots for this message)

+
Used Slots +

The number of initial slots which contains valid information.

+
Heap Address +

This is the address of a local heap which contains the names for the external + files (The local heap information can be found in Disk Format Level 1D in this + document). The name at offset zero in the heap is always the empty string.

+
Slot Definitions +

The slot definitions are stored in order according to the array addresses they + represent.

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ External File List Slot +
bytebytebytebyte

Name Offset(<size> bytes)


File Offset(<size> bytes)


Size

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Name Offset(<size> bytes) +

The byte offset within the local name heap for the name + of the file. File names are stored as a URL which has a + protocol name, a host name, a port number, and a file + name: + protocol:port//host/file. + If the protocol is omitted then "file:" is assumed. If + the port number is omitted then a default port for that + protocol is used. If both the protocol and the port + number are omitted then the colon can also be omitted. If + the double slash and host name are omitted then + "localhost" is assumed. The file name is the only + mandatory part, and if the leading slash is missing then + it is relative to the application's current working + directory (the use of relative names is not + recommended).

+
File Offset(<size> bytes) +

This is the byte offset to the start of the data in the + specified file. For files that contain data for a single + dataset this will usually be zero.

+
Size +

This is the total number of bytes reserved in the + specified file for raw data storage. For a file that + contains exactly one complete dataset which is not + extendable, the size will usually be the exact size of the + dataset. However, by making the size larger one allows + HDF5 to extend the dataset. The size can be set to a value + larger than the entire file since HDF5 will read zeros + past the end of the file without failing.

+
+
+ + +
+

Name: Data Storage - Layout

+ +

Header Message Type: 0x0008

+

Length: varies

+

Status: Required for datasets, may not be repeated.

+ +

Purpose and Description: Data layout describes how the + elements of a multi-dimensional array are arranged in the linear + address space of the file. Three types of data layout are + supported: + +

    +
  1. Contiguous: The array can be stored in one contiguous area of the file. + The layout requires that the size of the array be constant and + does not permit chunking, compression, checksums, encryption, + etc. The message stores the total size of the array and the + offset of an element from the beginning of the storage area is + computed as in C. + +
  2. Chunked: The array domain can be regularly decomposed into chunks and + each chunk is allocated separately. This layout supports + arbitrary element traversals, compression, encryption, and + checksums, and the chunks can be distributed across external + raw data files (these features are described in other + messages). The message stores the size of a chunk instead of + the size of the entire array; the size of the entire array can + be calculated by traversing the B-tree that stores the chunk + addresses. + +
  3. Compact: The array can be stored in one contiguous block, as part of + this object header message (this is called "compact" storage below). +
+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Data Layout Message (Versions 1 and 2) +
bytebytebytebyte
VersionDimensionalityLayout ClassReserved
Reserved

Address

Dimension 0 (4-bytes)
Dimension 1 (4-bytes)
...
Dataset Element Size (optional)
Compact Data Size (4-bytes)

Compact Data...

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

The version number information is used for changes in the format of the data + layout message and is described here:

+ + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by version 1.4 and before of the library to encode layout information. + Data space is always allocated when the data set is created.
2Used by version 1.6.x of the library to encode layout information. + Data space is allocated only when it is necessary.
+
Dimensionality

An array has a fixed dimensionality. This field + specifies the number of dimension size fields later in the + message.

Layout Class

The layout class specifies how the other fields of the + layout message are to be interpreted. A value of one + indicates contiguous storage, a value of two indicates chunked storage, + while a value of zero indicates compact storage. Other values will be defined + in the future.

Address

For contiguous storage, this is the address of the first + byte of storage. For chunked storage this is the address + of the B-tree that is used to look up the addresses of the + chunks. This field is not present for compact storage. + If the version for this message is set to 2, the address + may have the "undefined address" value, to indicate that + storage has not yet been allocated for this array.

Dimensions

For contiguous and compact storage the dimensions define + the entire size of the array while for chunked storage they define + the size of a single chunk. In all cases, they are in units of + array elements (not bytes). The first dimension stored in the list + of dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+
Dataset Element Size

The size of a dataset element, in bytes. This field is only + present for chunked storage. +

+
Compact Data Size

This field is only present for compact data storage. + It contains the size of the raw data for the dataset array.

Compact Data

This field is only present for compact data storage. + It contains the raw data for the dataset array.

+
+ +
+

Version 3 of this message re-structured the format into specific + properties that are required for each layout class. + +
+

+ + + + + + + + + + + + + + + + + + + +
+ Data Layout Message (Version 3) +
bytebytebytebyte
VersionLayout Class 

Properties

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version +

The version number information is used for changes in the format of layout message + and is described here:

+ + + + + + + + + + +
VersionDescription
3Used by the version 1.6.3 and later of the library to store properties + for each layout class.
+
Layout Class

The layout class specifies how the other fields of the layout message are to be + interpreted. A value of one indicates contiguous storage, a value of two + indicates chunked storage, while a value of zero indicates compact storage.

Properties

This variable-sized field encodes information specific to each + layout class and is described below. If there is no property + information specified for a layout class, the size of this field + is zero bytes.

+
+ +
+

Class-specific information for compact layout (Class 0): (Note: The dimensionality information + is in the Dataspace message) + +
+

+ + + + + + + + + + + + + + + + + + +
+ Property Descriptions +
bytebytebytebyte
Size 

Raw Data...

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Size

This field contains the size of the raw data for the dataset array.

Raw Data

This field contains the raw data for the dataset array.

+
+ +
+

Class-specific information for contiguous layout (Class 1): (Note: The dimensionality information + is in the Dataspace message) + +
+

+ + + + + + + + + + + + + + + + + +
+ Property Descriptions +
bytebytebytebyte

Address


Size

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Address

This is the address of the first byte of raw data storage. + The address may have the "undefined address" value, to indicate + that storage has not yet been allocated for this array.

Size

This field contains the size allocated to store the raw data.

+
+ +
+

Class-specific information for chunked layout (Class 2): + +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Property Descriptions +
bytebytebytebyte
Dimensionality 

Address

Dimension 0 (4-bytes)
Dimension 1 (4-bytes)
...
Dataset Element Size
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Dimensionality

A chunk has a fixed dimensionality. This field specifies + the number of dimension size fields later in the message.

Address

This is the address of the B-tree that is used to look up the addresses of the + chunks. The address may have the "undefined address" value, to indicate that + storage has not yet been allocated for this array.

Dimensions

These values define the dimension size of a single chunk, in + units of array elements (not bytes). The first dimension stored in + the list of dimensions is the slowest changing dimension and the + last dimension stored is the fastest changing dimension. +

+
Dataset Element Size

The size of a dataset element, in bytes. +

+
+
+ +
+

Name: Reserved - Not Assigned Yet

+

Header Message Type: 0x0009

+

Length: N/A

+

Status: N/A

+

Format of Data: N/A

+ +

Purpose and Description: This message type was skipped during the initial + specification of the file format and may be used in a future expansion to the format. + +


+

Name: Reserved - Not Assigned Yet

+

Header Message Type: 0x0009

+

Length: N/A

+

Status: N/A

+

Format of Data: N/A

+ +

Purpose and Description: This message type was skipped during the initial + specification of the file format and may be used in a future expansion to the format. + +


+

Name: Data Storage - Filter Pipeline

+

Header Message Type: 0x000B

+

Length: varies

+

Status: Optional, may not be repeated.

+ +

Description: This message describes the + filter pipeline which should be applied to the data stream by + providing filter identification numbers, flags, a name, and + client data.

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Pipeline Message +
bytebytebytebyte
VersionNumber of FiltersReserved
Reserved

Filter List

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number for this message. This document + describes version 1.

Number of Filters

The total number of filters described by this + message. The maximum possible number of filters in a + message is 32.

Filter List

A description of each filter. A filter description + appears in the next table.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Description +
bytebytebytebyte
Filter IdentificationName Length
FlagsNumber of Values for Client Data

Name


Client Data

Padding
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Filter Identification +

+ This value, often referred to as a filter identifier, + is designed to be a unique identifier for the filter. + Values from zero through 32,767 are reserved for filters + supported by The HDF Group in the HDF5 library and for + filters requested and supported by third parties. + Filters supported by The HDF Group are documented immediately + below. Information on 3rd-party filters can be found at + + https://support.hdfgroup.org/services/contributions.html#filters. + 1 +

+ To request a filter identifier, please contact + The HDF Group’s Help Desk at + . + You will be asked to provide the following information: +

    +
  1. Contact information for the developer requesting the + new identifier +
  2. A short description of the new filter +
  3. Links to any relevant information, including licensing + information +
+

+ Values from 32768 to 65535 are reserved for non-distributed uses + (for example, internal company usage) or for application usage + when testing a feature. The HDF Group does not track or document + the use of the filters with identifiers from this range. + +

+ The filters currently in library version 1.6.5 are + listed below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentificationNameDescription
1deflateGZIP deflate compression
2shuffleData element shuffling
3fletcher32Fletcher32 checksum
4szipSZIP compression
+

Name Length

Each filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.

Flags

The flags indicate certain properties for a filter. The + bit values defined so far are:

+ + + + + + + + + + +
ValueDescription
bit 1If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently removed from the pipeline.
+
Client Data Number of Values

Each filter can store a few integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.

Name

If the Name Length field is non-zero then it will + contain the size of this field, a multiple of eight. This + field contains a null-terminated, ASCII character + string to serve as a comment/name for the filter.

Client Data

This is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the array.

Padding

Four bytes of zeros are added to the message at this + point if the Client Data Number of Values field contains + an odd number.

+
+

+


+ 1If you are reading + an earlier version of this document, this link may have changed. + If the link does not work, use the latest version of this document + on The HDF Group’s website, + + https://support.hdfgroup.org/HDF5/doc/H5.format.html; + the link there will always be correct. + (Return) +

+ +
+

Name: Attribute

+

Header Message Type: 0x000C +

Length: varies +

Status: Optional, may be repeated. + +

Description: The Attribute + message is used to list objects in the HDF file which are used + as attributes, or "metadata" about the current object. An + attribute is a small dataset; it has a name, a datatype, a data + space, and raw data. Since attributes are stored in the object + header they must be relatively small (<64KB) and can be + associated with any type of object which has an object header + (groups, datasets, named types and spaces, etc.). + +

Note: Attributes on an object must have unique names. (The HDF5 library + currently enforces this by causing the creation of an attribute with + a duplicate name to fail). Attributes on different objects may have the + same name, however. + +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message (Version 1) +
bytebytebytebyte
VersionReservedName Size
Datatype SizeDataspace Size

Name


Datatype


Dataspace


Data

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number information is used for changes in the format of the + attribute message and is described here:

+ + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6 to encode attribute message. + This version does not support shared data type.
+
Reserved

This field is reserved for later use and is set to + zero.

Name Size

The length of the attribute name in bytes including the + null terminator. Note that the Name field below may + contain additional padding not represented by this + field.

Datatype Size

The length of the datatype description in the Datatype + field below. Note that the Datatype field may contain + additional padding not represented by this field.

Dataspace Size

The length of the dataspace description in the Dataspace + field below. Note that the Dataspace field may contain + additional padding not represented by this field.

Name

The null-terminated attribute name. This field is + padded with additional null characters to make it a + multiple of eight bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. This + field is not padded with additional bytes.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message (Version 2) +
bytebytebytebyte
VersionFlagName Size
Type SizeSpace Size

Name


Type


Space


Data

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number information is used for changes in the format of the + attribute message and is described here:

+ + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.x and after to encode attribute message. + This version supports shared data type. The fields of name, type, and space + are not padded with additional bytes of zero.
+
Flag

This field indicates whether the data type of this attribute is shared:

+ + + + + + + + + + + + + + + +
ValueDescription
0Datatype is not shared.
1Datatype is shared.
+
Name Size

The length of the attribute name in bytes including the + null terminator.

Datatype Size

The length of the datatype description in the Datatype + field below.

Dataspace Size

The length of the dataspace description in the Dataspace + field below.

Name

The null-terminated attribute name. This field is not + padded with additional bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. This + field is not padded with additional bytes.

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. This + field is not padded with additional bytes.

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. This + field is not padded with additional zero + bytes.

+
+ +
+

Name: Object Comment

+ +

Header Message Type: 0x000D

+

Length: varies

+

Status: Optional, may not be repeated.

+ +

Description: The object comment is + designed to be a short description of an object. An object comment + is a sequence of non-zero (\0) ASCII characters with no other + formatting included by the library.

+ +

Format of Data: +
+

+ + + + + + + + + + + + + +
+ Name Message +
bytebytebytebyte

Comment

+
+ +
+
+ + + + + + + + + + +
Field NameDescription
NameA null terminated ASCII character string.
+
+ +
+

Name: Object Modification Date & Time (Old)

+ +

Header Message Type: 0x000E

+

Length: fixed

+

Status: Optional, may not be repeated.

+ +

Description: The object modification date + and time is a timestamp which indicates (using ISO-8601 date and + time format) the last modification of an object. The time is + updated when any object header message changes according to the + system clock where the change was posted. + +

This modification time message is deprecated in favor of the "new" + modification time message (Message Type 0x0012) and is no longer written + to the file in versions of the HDF5 library after the 1.6.0 version. +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
Year
MonthDay of Month
HourMinute
SecondReserved
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Year

The four-digit year as an ASCII string. For example, + 1998. All fields of this message should be interpreted + as coordinated universal time (UTC)

Month

The month number as a two digit ASCII string where + January is 01 and December is 12.

Day of Month

The day number within the month as a two digit ASCII + string. The first day of the month is 01.

Hour

The hour of the day as a two digit ASCII string where + midnight is 00 and 11:00pm is 23.

Minute

The minute of the hour as a two digit ASCII string where + the first minute of the hour is 00 and + the last is 59.

Second

The second of the minute as a two digit ASCII string + where the first second of the minute is 00 + and the last is 59.

Reserved

This field is reserved and should always be zero.

+
+ +
+

Name: Shared Object Message

+

Header Message Type: 0x000F

+

Length: Fixed

+

Status: Optional, may be repeated.

+ +

Description: A constant message can be shared among + several object headers. A Shared Object Message contains the address of + the object message to be shared. Care must be exercised to prevent cycles when a + message of one object header points to a message in some other object header. + Starting from Version 2 of the Shared Object Message, the Flags + field becomes unused. +

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + + + +
+ Shared Object Message (Version 1) +
byte + byte + byte + byte +
VersionFlagsReserved
Reserved

Pointer

+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number is used when there are changes in the format + of a shared object message and is described here:

+ + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6.1. In this version, + the Flags field is used to indicate whether the actual message is + stored in the global heap (never implemented). The Pointer field + either contains the the header message address in the global heap + (never implemented) or the address of the shared object header.
+
Flags

The Shared Message message points to a message which is + shared among multiple object headers. The Flags field + describes the type of sharing:

+ + + + + + + + + + + + + + + +
BitDescription
0If this bit is clear then the actual message is the + first message in some other object header; otherwise + the actual message is stored in the global heap (never + implemented).
2-7Reserved (always zero)
+
Pointer

The address of the object header + containing the message to be shared.

+
+ +
+
+ + + + + + + + + + + + + + + +
+ Shared Object Message (Version 2) +
byte + byte + byte + byte +
VersionFlags 

Pointer

+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number is used when there are changes in the format + of a shared object message and is described here:

+ + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.1 and after. In this version, + The Flags field is not used and the Pointer field contains the address + of the object header containing the message to be shared.
+
Flags

Unused.

Pointer

The address of the object header + containing the message to be shared.

+
+ + +
+

Name: Object Header Continuation

+

Header Message Type: 0x0010

+

Length: fixed

+

Status: Optional, may be repeated.

+

Description: The object header continuation is the location + in the file of more header messages for the current data object. This can be + used when header blocks become too large or are likely to change over time.

+ +

Format of Data: +
+

+ + + + + + + + + + + + + + + + + +
+ Object Header Continuation Message +
bytebytebytebyte

Offset


Length

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
Offset

This value is the offset in bytes from the beginning of the file where the + header continuation information is located.

Length

This value is the length in bytes of the header continuation information in + the file.

+
+ +
+

Name: Group Message

+

Header Message Type: 0x0011

+

Length: fixed

+

Status: Required for groups, may not be repeated.

+

Description: Each group has a B-tree and a + name heap which are pointed to by this message.

+

Format of data: + +
+

+ + + + + + + + + + + + + + + + + +
+ Group Message +
bytebytebytebyte

B-tree Address


Heap Address

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription
B-tree Address

This value is the offset in bytes from the beginning of the file + where the B-tree is located.

Heap Address

This value is the offset in bytes from the beginning of the file + where the group name heap is located.

+
+ +
+

Name: Object Modification Date & Time

+ +

Header Message Type: 0x0012

+

Length: Fixed

+

Status: Optional, may not be repeated.

+ +

Description: The object modification date + and time is a timestamp which indicates the last modification of an object. + The time is updated when any object header message changes according to the + system clock where the change was posted. +

+ +

Format of Data: +

+ + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
VersionReserved
Seconds After Epoch
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription
Version

The version number is used for changes in the format of Object Modification Time + and is described here:

+ + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by Version 1.6.1 and after of the library to encode time. In + this version, the time is the seconds after Epoch.
+
Reserved

This field is reserved and should always be zero.

Seconds After Epoch

The number of seconds since 0 hours, 0 minutes, 0 seconds, + January 1, 1970, Coordinated Universal Time.

+
+ +
+

Disk Format: Level 2b - Data Object Data Storage

+

The data for an object is stored separately from the header +information in the file and may not actually be located in the HDF5 file +itself if the header indicates that the data is stored externally. The +information for each record in the object is stored according to the +dimensionality of the object (indicated in the dimensionality header message). +Multi-dimensional data is stored in C order [same as current scheme], i.e. the +"last" dimension changes fastest. +

Data whose elements are composed of simple number-types are stored in +native-endian IEEE format, unless they are specifically defined as being stored +in a different machine format with the architecture-type information from the +number-type header message. This means that each architecture will need to +[potentially] byte-swap data values into the internal representation for that +particular machine. +

Data with a variable-length datatype is stored in the global heap +of the HDF5 file. Global heap identifiers are stored in the +data object storage. +

Data whose elements are composed of pointer number-types are stored in several +different ways depending on the particular pointer type involved. Simple +pointers are just stored as the dataset offset of the object being pointed to with the +size of the pointer being the same number of bytes as offsets in the file. +Dataset region references are stored as a heap-ID which points to the following +information within the file-heap: an offset of the object pointed to, number-type +information (same format as header message), dimensionality information (same +format as header message), sub-set start and end information (i.e. a coordinate +location for each), and field start and end names (i.e. a [pointer to the] +string indicating the first field included and a [pointer to the] string name +for the last field). + +

Data of a compound datatype is stored as a contiguous stream of the items +in the structure, with each item formatted according to its datatype.

+ +
+

Appendix

+

Definitions of various terms used in this document. +

+

The "undefined address" for a file is a +file address with all bits set, i.e. 0xffff...ff. +

The "unlimited size" for a size is a +value with all bits set, i.e. 0xffff...ff. + + + diff --git a/doxygen/examples/H5.format.2.0.html b/doxygen/examples/H5.format.2.0.html new file mode 100644 index 00000000000..3653489d5b0 --- /dev/null +++ b/doxygen/examples/H5.format.2.0.html @@ -0,0 +1,14902 @@ + + + + + HDF5 File Format Specification Version 2.0 + + + + +

+ + + + + + + +
+
    +
  1. Introduction
  2. + +
      +
    1. This Document
    2. +
    3. Changes for HDF5 1.10
    4. +
    +
    + +
  3. Disk Format: Level 0 - File Metadata
  4. + +
      +
    1. Disk Format: Level 0A - Format Signature and Superblock
    2. +
    3. Disk Format: Level 0B - File Driver Info
    4. +
    5. Disk Format: Level 0C - Superblock Extension
    6. +
    +
    +
  5. Disk Format: Level 1 - File Infrastructure
  6. + +
      +
    1. Disk Format: Level 1A - B-trees and B-tree + Nodes
    2. +
        +
      1. Disk Format: Level 1A1 - Version 1 + B-trees (B-link Trees)
      2. +
      3. Disk Format: Level 1A2 - Version 2 + B-trees
      4. +
      +
    3. Disk Format: Level 1B - Group Symbol Table Nodes
    4. +
    5. Disk Format: Level 1C - Symbol Table Entry
    6. +
    7. Disk Format: Level 1D - Local Heaps
    8. +
    9. Disk Format: Level 1E - Global Heap
    10. +
    11. Disk Format: Level 1F - Fractal Heap
    12. +
    13. Disk Format: Level 1G - Free-space Manager
    14. +
    15. Disk Format: Level 1H - Shared Object Header Message Table
    16. +
    +
    +
  7. Disk Format: Level 2 - Data Objects
  8. + +
      +
    1. Disk Format: Level 2A - Data Object Headers
    2. +
        +
      1. Disk Format: Level 2A1 - Data Object Header Prefix
      2. +
          +
        1. Version 1 Data Object Header Prefix
        2. +
        3. Version 2 Data Object Header Prefix
        4. +
        +
      3. Disk Format: Level 2A2 - Data Object Header Messages
      4. +
          +
        1. The NIL Message
        2. +
        3. The Dataspace Message
        4. +
        5. The Link Info Message
        6. +
        +
      +
    +
    +
+
  +
    +
  1. Disk Format: Level 2 - Data + Objects (Continued)
  2. +
      +
    1. Disk Format: Level 2A - Data Object + Headers (Continued)
    2. +
        +
      1. Disk Format: Level 2A2 - + Data Object Header Messages (Continued)
      2. +
          +
        1. The Datatype Message
        2. +
        3. The Data Storage - + Fill Value (Old) Message
        4. +
        5. The Data Storage - + Fill Value Message
        6. +
        7. The Link Message
        8. +
        9. The Data Storage - + External Data Files Message
        10. +
        11. The Data Storage - + Layout Message
        12. +
        13. The Bogus Message
        14. +
        15. The Group Info + Message
        16. +
        17. The Data Storage - + Filter Pipeline Message
        18. +
        19. The Attribute + Message
        20. +
        21. The Object Comment + Message
        22. +
        23. The Object + Modification Time (Old) Message
        24. +
        25. The Shared Message + Table Message
        26. +
        27. The Object Header + Continuation Message
        28. +
        29. The Symbol + Table Message
        30. +
        31. The Object + Modification Time Message
        32. +
        33. The B-tree + ‘K’ Values Message
        34. +
        35. The Driver Info + Message
        36. +
        37. The Attribute Info + Message
        38. +
        39. The Object Reference + Count Message
        40. +
        41. The File Space Info + Message
        42. +
        +
      +
    3. Disk Format: Level 2B - Data Object Data Storage
    4. +
    +
    +
  3. Appendix A: Definitions
  4. +
  5. Appendix B: File Memory Allocation Types
  6. +
+
+
+ + + +
+
+
+

I. Introduction

+ + + + + + + +
  +
+ HDF5 Groups +
 
  + Figure 1: Relationships among the HDF5 root group, other groups, and objects +
+
 
  + HDF5 Objects +  
  + Figure 2: HDF5 objects -- datasets, datatypes, or dataspaces +
+
 
+ + +

The format of an HDF5 file on disk encompasses several + key ideas of the HDF4 and AIO file formats as well as + addressing some shortcomings therein. The new format is + more self-describing than the HDF4 format and is more + uniformly applied to data objects in the file.

+ +

An HDF5 file appears to the user as a directed graph. + The nodes of this graph are the higher-level HDF5 objects + that are exposed by the HDF5 APIs:

+ +
    +
  • Groups
  • +
  • Datasets
  • +
  • Committed (formerly Named) datatypes
  • +
+ +

At the lowest level, as information is actually written to the disk, + an HDF5 file is made up of the following objects:

+
    +
  • A superblock
  • +
  • B-tree nodes
  • +
  • Heap blocks
  • +
  • Object headers
  • +
  • Object data
  • +
  • Free space
  • +
+ +

The HDF5 Library uses these low-level objects to represent the + higher-level objects that are then presented to the user or + to applications through the APIs. For instance, a group is an + object header that contains a message that points to a local + heap (for storing the links to objects in the group) and to a + B-tree (which indexes the links). A dataset is an object header + that contains messages that describe datatype, dataspace, layout, + filters, external files, fill value, and other elements with the + layout message pointing to either a raw data chunk or to a + B-tree that points to raw data chunks.

+ + +
+

I.A. This Document

+ +

This document describes the lower-level data objects; + the higher-level objects and their properties are described + in the HDF5 User’s Guide.

+ +

Three levels of information comprise the file format. + Level 0 contains basic information for identifying and + defining information about the file. Level 1 information contains + the information about the pieces of a file shared by many objects + in the file (such as a B-trees and heaps). Level 2 is the rest + of the file and contains all of the data objects, with each object + partitioned into header information, also known as + metadata, and data.

+ +

The sizes of various fields in the following layout tables are + determined by looking at the number of columns the field spans + in the table. There are three exceptions: (1) The size may be + overridden by specifying a size in parentheses, (2) the size of + addresses is determined by the Size of Offsets field + in the superblock and is indicated in this document with a + superscripted ‘O’, and (3) the size of length fields is determined + by the Size of Lengths field in the superblock and is + indicated in this document with a superscripted ‘L’.

+ +

Values for all fields in this document should be treated as unsigned + integers, unless otherwise noted in the description of a field. + Additionally, all metadata fields are stored in little-endian byte + order. +

+ +

All checksums used in the format are computed with the + Jenkins’ + lookup3 algorithm. +

+ +

Whenever a bit flag or field is mentioned for an entry, bits are + numbered from the lowest bit position in the entry. +

+ +

Various tables in this document aligned with “This space inserted + only to align table nicely”. These entries in the table are just + to make the table presentation nicer and do not represent any values + or padding in the file. +

+ + +
+

I.B. Changes for HDF5 1.10

+ +

As of October 2015, changes in the file format for HDF5 1.10 + have not yet been finalized.

+ + + +
+
+
+

+II. Disk Format: Level 0 - File Metadata

+ +
+

+II.A. Disk Format: Level 0A - Format Signature and Superblock

+ +

The superblock may begin at certain predefined offsets within + the HDF5 file, allowing a block of unspecified content for + users to place additional information at the beginning (and + end) of the HDF5 file without limiting the HDF5 Library’s + ability to manage the objects within the file itself. This + feature was designed to accommodate wrapping an HDF5 file in + another file format or adding descriptive information to an HDF5 + file without requiring the modification of the actual file’s + information. The superblock is located by searching for the + HDF5 format signature at byte offset 0, byte offset 512, and at + successive locations in the file, each a multiple of two of + the previous location; in other words, at these byte offsets: + 0, 512, 1024, 2048, and so on.

+ +

The superblock is composed of the format signature, followed by a + superblock version number and information that is specific to each + version of the superblock. + Currently, there are three versions of the superblock format. + Version 0 is the default format, while version 1 is basically the same + as version 0 with additional information when a non-default B-tree ‘K’ + value is stored. Version 2 is the latest format, with some fields + eliminated or compressed and with superblock extension and checksum + support.

+ +

Version 0 and 1 of the superblock are described below:

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Superblock (Versions 0 and 1) +
bytebytebytebyte

Format Signature (8 bytes)

Version # of SuperblockVersion # of File’s Free Space StorageVersion # of Root Group Symbol Table EntryReserved (zero)
Version # of Shared Header Message FormatSize of OffsetsSize of LengthsReserved (zero)
Group Leaf Node KGroup Internal Node K
File Consistency Flags
Indexed Storage Internal Node K1Reserved (zero)1

Base AddressO


Address of File Free space InfoO


End of File AddressO


Driver Information Block AddressO

Root Group Symbol Table Entry
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in “Size of Offsets.”) +
  + (Items marked with a ‘1’ in the above table are + new in version 1 of the superblock) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Format Signature

This field contains a constant value and can be used to + quickly identify a file as being an HDF5 file. The + constant value is designed to allow easy identification of + an HDF5 file and to allow certain types of data corruption + to be detected. The file signature of an HDF5 file always + contains the following values:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Decimal:13772687013102610
Hexadecimal:894844460d0a1a0a
ASCII C Notation:\211HDF\r\n\032\n
+
+

This signature both identifies the file as an HDF5 file + and provides for immediate detection of common + file-transfer problems. The first two bytes distinguish + HDF5 files on systems that expect the first two bytes to + identify the file type uniquely. The first byte is + chosen as a non-ASCII value to reduce the probability + that a text file may be misrecognized as an HDF5 file; + also, it catches bad file transfers that clear bit + 7. Bytes two through four name the format. The CR-LF + sequence catches bad file transfers that alter newline + sequences. The control-Z character stops file display + under MS-DOS. The final line feed checks for the inverse + of the CR-LF translation problem. (This is a direct + descendent of the + PNG file + signature.)

+

This field is present in version 0+ of the superblock. +

Version Number of the Superblock

This value is used to determine the format of the + information in the superblock. When the format of the + information in the superblock is changed, the version number + is incremented to the next integer and can be used to + determine how the information in the superblock is + formatted.

+ +

Values of 0, 1 and 2 are defined for this field. (The format + of version 2 is described below, not here) +

+ +

This field is present in version 0+ of the superblock. +

+

Version Number of the File’s Free Space + Information

+

This value is used to determine the format of the + file’s free space information. +

+

The only value currently valid in this field is ‘0’, which + indicates that the file’s free space is as described + below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Version Number of the Root Group Symbol Table + Entry

This value is used to determine the format of the + information in the Root Group Symbol Table Entry. When the + format of the information in that field is changed, the + version number is incremented to the next integer and can be + used to determine how the information in the field + is formatted.

+

The only value currently valid in this field is ‘0’, + which indicates that the root group symbol table entry is + formatted as described below.

+

This field is present in version 0 and 1 of the + superblock.

+

Version Number of the Shared Header Message Format

This value is used to determine the format of the + information in a shared object header message. Since the format + of the shared header messages differs from the other private + header messages, a version number is used to identify changes + in the format. +

+

The only value currently valid in this field is ‘0’, which + indicates that shared header messages are formatted as + described below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Size of Offsets

This value contains the number of bytes used to store + addresses in the file. The values for the addresses of + objects in the file are offsets relative to a base address, + usually the address of the superblock signature. This + allows a wrapper to be added after the file is created + without invalidating the internal offset locations. +

+ +

This field is present in version 0+ of the superblock. +

+

Size of Lengths

This value contains the number of bytes used to store + the size of an object. +

+

This field is present in version 0+ of the superblock. +

+

Group Leaf Node K

+

Each leaf node of a group B-tree will have at + least this many entries but not more than twice this + many. If a group has a single leaf node then it + may have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Group Internal Node K

+

Each internal node of a group B-tree will have at + least this many entries but not more than twice this + many. If the group has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

File Consistency Flags

+

This value contains flags to indicate information + about the consistency of the information contained + within the file. Currently, the following bit flags are + defined: +

    +
  • Bit 0 set indicates that the file is opened for + write-access.
  • +
  • Bit 1 set indicates that the file has + been verified for consistency and is guaranteed to be + consistent with the format defined in this document.
  • +
  • Bits 2-31 are reserved for future use.
  • +
+ Bit 0 should be + set as the first action when a file is opened for write + access and should be cleared only as the final action + when closing a file. Bit 1 should be cleared during + normal access to a file and only set after the file’s + consistency is guaranteed by the library or a + consistency utility. +

+ +

This field is present in version 0+ of the superblock. +

+

Indexed Storage Internal Node K

+

Each internal node of an indexed storage B-tree will have at + least this many entries but not more than twice this + many. If the index storage B-tree has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 1 of the superblock. +

+

Base Address

+

This is the absolute file address of the first byte of + the HDF5 data within the file. The library currently + constrains this value to be the absolute file address + of the superblock itself when creating new files; + future versions of the library may provide greater + flexibility. When opening an existing file and this address does + not match the offset of the superblock, the library assumes + that the entire contents of the HDF5 file have been adjusted in + the file and adjusts the base address and end of file address to + reflect their new positions in the file. Unless otherwise noted, + all other file addresses are relative to this base + address. +

+ +

This field is present in version 0+ of the superblock. +

+

Address of Global Free-space Index

+

The file’s free space is not persistent for version 0 and 1 of + the superblock. + Currently this field always contains the + undefined address. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

End of File Address

+

This is the absolute file address of the first byte past + the end of all HDF5 data. It is used to determine whether a + file has been accidently truncated and as an address where + file data allocation can occur if space from the free list is + not used. +

+ +

This field is present in version 0+ of the superblock. +

+

Driver Information Block Address

+

This is the relative file address of the file driver + information block which contains driver-specific + information needed to reopen the file. If there is no + driver information block then this entry should be the + undefined address. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Root Group Symbol Table Entry

+

This is the symbol table entry + of the root group, which serves as the entry point into + the group graph for the file. +

+ +

This field is present in version 0 and 1 of the superblock. +

+
+
+ +
+

Version 2 of the superblock is described below:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Superblock (Version 2) +
bytebytebytebyte

Format Signature (8 bytes)

Version # of SuperblockSize of OffsetsSize of LengthsFile Consistency Flags

Base AddressO


Superblock Extension AddressO


End of File AddressO


Root Group Object Header AddressO

Superblock Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in “Size of Offsets.”) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Format Signature

+

This field is the same as described for versions 0 and 1 of the + superblock. +

Version Number of the Superblock

+

This field has a value of 2 and has the same meaning as for + versions 0 and 1. +

+

Size of Offsets

+

This field is the same as described for versions 0 and 1 of the + superblock. +

+

Size of Lengths

+

This field is the same as described for versions 0 and 1 of the + superblock. +

+

File Consistency Flags

+

This field is the same as described for versions 0 and 1 except + that it is smaller (the number of reserved bits has been reduced + from 30 to 6). +

+

Base Address

+

This field is the same as described for versions 0 and 1 of the + superblock. +

+

Superblock Extension Address

+

The field is the address of the object header for the + superblock extension. + If there is no extension then this entry should be the + undefined address. +

+

End of File Address

+

This field is the same as described for versions 0 and 1 of the + superblock. +

+

Root Group Object Header Address

+

This is the address of + the root group object header, + which serves as the entry point into the group graph for the file. +

+

Superblock Checksum

+

The checksum for the superblock. +

+
+
+ +
+

+II.B. Disk Format: Level 0B - File Driver Info

+ +

The driver information block is an optional region of the + file which contains information needed by the file driver + to reopen a file. The format is described below:

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Driver Information Block +
bytebytebytebyte
VersionReserved
Driver Information Size

Driver Identification (8 bytes)



Driver Information (variable size)


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number of the Driver Information Block. + This document describes version 0. +

+

Driver Information Size

+

The size in bytes of the Driver Information field. +

+

Driver Identification

+

This is an eight-byte ASCII string without null + termination which identifies the driver and/or version number + of the Driver Information Block. The predefined driver encoded + in this field by the HDF5 Library is identified by the + letters NCSA followed by the first four characters of + the driver name. If the Driver Information block is not + the original version then the last letter(s) of the + identification will be replaced by a version number in + ASCII, starting with 0. +

+

+ Identification for user-defined drivers is also eight-byte long. + It can be arbitrary but should be unique to avoid + the four character prefix “NCSA”. +

+

Driver Information

Driver information is stored in a format defined by the + file driver (see description below).
+
+ +
+ The two drivers encoded in the Driver Identification field are as follows: +
    +
  • + Multi driver: +

    + The identifier for this driver is “NCSAmulti”. + This driver provides a mechanism for segregating raw data and different types of metadata + into multiple files. + These files are viewed by the library as a single virtual HDF5 file with a single file address. + A maximum of 6 files will be created for the following data: + superblock, B-tree, raw data, global heap, local heap, and object header. + More than one type of data can be written to the same file. +

  • +
  • + Family driver +

    + The identifier for this driver is “NCSAfami” and is encoded in this field for library version 1.8 and after. + This driver is designed for systems that do not support files larger than 2 gigabytes + by splitting the HDF5 file address space across several smaller files. + It does nothing to segregate metadata and raw data; + they are mixed in the address space just as they would be in a single contiguous file. +

  • +
+

The format of the Driver Information field for the + above two drivers are described below:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Multi Driver Information +
bytebytebytebyte
Member MappingMember MappingMember MappingMember Mapping
Member MappingMember MappingReservedReserved

Address of Member File 1


End of Address for Member File 1


Address of Member File 2


End of Address for Member File 2


... ...


Address of Member File N


End of Address for Member File N


Name of Member File 1 (variable size)


Name of Member File 2 (variable size)


... ...


Name of Member File N (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Member Mapping

These fields are integer values from 1 to 6 + indicating how the data can be mapped to or merged with another type of + data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Member MappingDescription
1The superblock data.
2The B-tree data.
3The raw data.
4The global heap data.
5The local heap data.
6The object header data.

+

For example, if the third field has the value 3 and all the rest have the + value 1, it means there are two files: one for raw data, and one for superblock, + B-tree, global heap, local heap, and object header.

+

Reserved

These fields are reserved and should always be zero.

Address of Member File N

This field Specifies the virtual address at which the member file starts.

+

N is the number of member files.

+

End of Address for Member File N

This field is the end of the allocated address for the member file. +

Name of Member File N

This field is the null-terminated name of the member file and + its length should be multiples of 8 bytes. + Additional bytes will be padded with NULLs. The default naming + convention is %s-X.h5, where X is one of the letters + s (for superblock), b (for B-tree), r (for raw data), + g (for global heap), l (for local heap), and o (for + object header). The name of the whole HDF5 file will substitute the %s + in the string. +

+
+
+ +
+
+ + + + + + + + + + + + + + +
+ Family Driver Information +
bytebytebytebyte

Size of Member File

+
+ +
+
+ + + + + + + + + + +
Field NameDescription

Size of Member File

This field is the size of the member file in the family of files.

+
+ +
+

+II.C. Disk Format: Level 0C - Superblock Extension

+ +

The superblock extension is used to store superblock metadata + which is either optional, or added after the version of the superblock + was defined. Superblock extensions may only exist when version 2+ of + superblock is used. A superblock extension is an object header which may + hold the following messages:

+ + + + +
+
+
+

+III. Disk Format: Level 1 - File Infrastructure

+ +
+

+III.A. Disk Format: Level 1A - B-trees and B-tree Nodes

+ +

B-trees allow flexible storage for objects which tend to grow + in ways that cause the object to be stored discontiguously. B-trees + are described in various algorithms books including “Introduction to + Algorithms” by Thomas H. Cormen, Charles E. Leiserson, and Ronald + L. Rivest. B-trees are used in several places in the HDF5 file format, + when an index is needed for another data structure.

+ +

The version 1 B-tree structure described below is the original index + structure, but are limited by some bugs in our implementation (mainly in + how they handle deleting records). The version 1 B-trees are being phased + out in favor of the version 2 B-trees described below, although both + types of structures may be found in the same file, depending on + application settings when creating the file.

+ +
+

+III.A.1. Disk Format: Level 1A1 - Version 1 B-trees (B-link Trees)

+ +

Version 1 B-trees in HDF5 files an implementation of the B-link tree, + in which the sibling nodes at a particular level in the tree are stored + in a doubly-linked list, is described in the “Efficient Locking for + Concurrent Operations on B-trees” paper by Phillip Lehman and S. Bing Yao + as published in the ACM Transactions on Database Systems, + Vol. 6, No. 4, December 1981.

+ +

The B-link trees implemented by the file format contain one more + key than the number of children. In other words, each child + pointer out of a B-tree node has a left key and a right key. + The pointers out of internal nodes point to sub-trees while + the pointers out of leaf nodes point to symbol nodes and + raw data chunks. + Aside from that difference, internal nodes and leaf nodes + are identical.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ B-link Tree Nodes +
bytebytebytebyte
Signature
Node TypeNode LevelEntries Used

Address of Left SiblingO


Address of Right SiblingO

Key 0 (variable size)

Address of Child 0O

Key 1 (variable size)

Address of Child 1O

...
Key 2K (variable size)

Address of Child 2KO

Key 2K+1 (variable size)
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “TREE” is + used to indicate the + beginning of a B-link tree node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Node Type

+

Each B-link tree points to a particular type of data. + This field indicates the type of data as well as + implying the maximum degree K of the tree and + the size of each Key field. + + + + + + + + + + + + + + + +
Node TypeDescription
0This tree points to group nodes.
1This tree points to raw data chunk nodes.

+

Node Level

+

The node level indicates the level at which this node + appears in the tree (leaf nodes are at level zero). Not + only does the level indicate whether child pointers + point to sub-trees or to data, but it can also be used + to help file consistency checking utilities reconstruct + damaged trees. +

+

Entries Used

+

This determines the number of children to which this + node points. All nodes of a particular type of tree + have the same maximum degree, but most nodes will point + to less than that number of children. The valid child + pointers and keys appear at the beginning of the node + and the unused pointers and keys appear at the end of + the node. The unused pointers and keys have undefined + values. +

+

Address of Left Sibling

+

This is the relative file address of the left sibling of + the current node. If the current + node is the left-most node at this level then this field + is the undefined address. +

+

Address of Right Sibling

+

This is the relative file address of the right sibling of + the current node. If the current + node is the right-most node at this level then this + field is the undefined address. +

+

Keys and Child Pointers

+

Each tree has 2K+1 keys with 2K + child pointers interleaved between the keys. The number + of keys and child pointers actually containing valid + values is determined by the node’s Entries Used field. + If that field is N then the B-link tree contains + N child pointers and N+1 keys. +

+

Key

+

The format and size of the key values is determined by + the type of data to which this tree points. The keys are + ordered and are boundaries for the contents of the child + pointer; that is, the key values represented by child + N fall between Key N and Key + N+1. Whether the interval is open or closed on + each end is determined by the type of data to which the + tree points. +

+ +

+ The format of the key depends on the node type. + For nodes of node type 0 (group nodes), the key is formatted as + follows: + + + + + + +
A single field of Size of Lengths + bytes:Indicates the byte offset into the local heap + for the first object name in the subtree which + that key describes. +
+

+ + +

+ For nodes of node type 1 (chunked raw data nodes), the key is + formatted as follows: + + + + + + + + + + + + + + +
Bytes 1-4:Size of chunk in bytes.
Bytes 4-8:Filter mask, a 32-bit bit field indicating which + filters have been skipped for this chunk. Each filter + has an index number in the pipeline (starting at 0, with + the first filter to apply) and if that filter is skipped, + the bit corresponding to its index is set.
(D + 1) 64-bit fields:The offset of the + chunk within the dataset where D is the number + of dimensions of the dataset, and the last value is the + offset within the dataset’s datatype and should always be + zero. For example, if + a chunk in a 3-dimensional dataset begins at the + position [5,5,5], there will be three + such 64-bit values, each with the value of + 5, followed by a 0 value.
+

+ +

Child Pointer

+

The tree node contains file addresses of subtrees or + data depending on the node level. Nodes at Level 0 point + to data addresses, either raw data chunks or group nodes. + Nodes at non-zero levels point to other nodes of the + same B-tree. +

+

For raw data chunk nodes, the child pointer is the address + of a single raw data chunk. For group nodes, the child pointer + points to a symbol table, which contains + information for multiple symbol table entries. +

+
+
+ +

+ Conceptually, each B-tree node looks like this:

+
+ + + + + + + + + + + + + +
key[0] child[0] key[1] child[1] key[2] ... ... key[N-1] child[N-1] key[N]
+
+
+ + where child[i] is a pointer to a sub-tree (at a level + above Level 0) or to data (at Level 0). + Each key[i] describes an item stored by the B-tree + (a chunk or an object of a group node). The range of values + represented by child[i] is indicated by key[i] + and key[i+1]. + + +

The following question must next be answered: + “Is the value described by key[i] contained in + child[i-1] or in child[i]?” + The answer depends on the type of tree. + In trees for groups (node type 0) the object described by + key[i] is the greatest object contained in + child[i-1] while in chunk trees (node type 1) the + chunk described by key[i] is the least chunk in + child[i].

+ +

That means that key[0] for group trees is sometimes unused; + it points to offset zero in the heap, which is always the + empty string and compares as “less-than” any valid object name.

+ +

And key[N] for chunk trees is sometimes unused; + it contains a chunk offset which compares as “greater-than” + any other chunk offset and has a chunk byte size of zero + to indicate that it is not actually allocated.

+ +
+

+III.A.2. Disk Format: Level 1A2 - Version 2 B-trees

+ +

Version 2 B-trees are “traditional” B-trees, with one major difference. + Instead of just using a simple pointer (or address in the file) to a + child of an internal node, the pointer to the child node contains two + additional pieces of information: the number of records in the child + node itself, and the total number of records in the child node and + all its descendants. Storing this additional information allows fast + array-like indexing to locate the nth record in the B-tree.

+ +

The entry into a version 2 B-tree is a header which contains global + information about the structure of the B-tree. The root node + address + field in the header points to the B-tree root node, which is either an + internal or leaf node, depending on the value in the header’s + depth field. An internal node consists of records plus + pointers to further leaf or internal nodes in the tree. A leaf node + consists of solely of records. The format of the records depends on + the B-tree type (stored in the header).

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree Header +
bytebytebytebyte
Signature
VersionTypeThis space inserted only to align table nicely
Node Size
Record SizeDepth
Split PercentMerge PercentThis space inserted only to align table nicely

Root Node AddressO

Number of Records in Root NodeThis space inserted only to align table nicely

Total Number of Records in B-treeL

Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “BTHD” is + used to indicate the header of a version 2 B-link tree node. +

+

Version

+

The version number for this B-tree header. This document + describes version 0. +

+

Type

+

This field indicates the type of B-tree: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0A “testing” B-tree, this value should not be + used for storing records in actual HDF5 files. +
1This B-tree is used for indexing indirectly accessed, + non-filtered ‘huge’ fractal heap objects. +
2This B-tree is used for indexing indirectly accessed, + filtered ‘huge’ fractal heap objects. +
3This B-tree is used for indexing directly accessed, + non-filtered ‘huge’ fractal heap objects. +
4This B-tree is used for indexing directly accessed, + filtered ‘huge’ fractal heap objects. +
5This B-tree is used for indexing the ‘name’ field for + links in indexed groups. +
6This B-tree is used for indexing the ‘creation order’ + field for links in indexed groups. +
7This B-tree is used for indexing shared object header + messages. +
8This B-tree is used for indexing the ‘name’ field for + indexed attributes. +
9This B-tree is used for indexing the ‘creation order’ + field for indexed attributes. +

+

The format of records for each type is described below.

+

Node Size

+

This is the size in bytes of all B-tree nodes. +

+

Record Size

+

This field is the size in bytes of the B-tree record. +

+

Depth

+

This is the depth of the B-tree. +

+

Split Percent

+

The percent full that a node needs to increase above before it + is split. +

+

Merge Percent

+

The percent full that a node needs to be decrease below before it + is split. +

+

Root Node Address

+

This is the address of the root B-tree node. A B-tree with + no records will have the undefined + address in this field. +

+

Number of Records in Root Node

+

This is the number of records in the root node. +

+

Total Number of Records in B-tree

+

This is the total number of records in the entire B-tree. +

+

Checksum

+

This is the checksum for the B-tree header. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree Internal Node +
bytebytebytebyte
Signature
VersionTypeRecords 0, 1, 2...N-1 (variable size)

Child Node Pointer 0O


Number of Records N0 for Child Node 0 (variable size)

Total Number of Records for Child Node 0 (optional, variable size)

Child Node Pointer 1O


Number of Records N1 for Child Node 1 (variable size)

Total Number of Records for Child Node 1 (optional, variable size)
...

Child Node Pointer NO


Number of Records Nn for Child Node N (variable size)

Total Number of Records for Child Node N (optional, variable size)
Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “BTIN” is + used to indicate the internal node of a B-link tree. +

+

Version

+

The version number for this B-tree internal node. + This document describes version 0. +

+

Type

+

This field is the type of the B-tree node. It should always + be the same as the B-tree type in the header. +

+

Records

+

The size of this field is determined by the number of records + for this node and the record size (from the header). The format + of records depends on the type of B-tree. +

+

Child Node Pointer

+

This field is the address of the child node pointed to by the + internal node. +

+

Number of Records in Child Node

+

This is the number of records in the child node pointed to by + the corresponding Node Pointer. +

+

The number of bytes used to store this field is determined by + the maximum possible number of records able to be stored in the + child node. +

+

+ The maximum number of records in a child node is computed + in the following way: + +

    +
  • Subtract the fixed size overhead for + the child node (for example, its signature, version, + checksum, and so on and one pointer triplet + of information for the child node (because there is one + more pointer triplet than records in each internal node)) + from the size of nodes for the B-tree.
  • +
  • Divide that result by the size of a record plus the + pointer triplet of information stored to reach each + child node from this node. +
+ +

+

+ Note that leaf nodes do not encode any + child pointer triplets, so the maximum number of records in a + leaf node is just the node size minus the leaf node overhead, + divided by the record size. +

+

+ Also note that the first level of internal nodes above the + leaf nodes do not encode the Total Number of Records in Child + Node value in the child pointer triplets (since it is the + same as the Number of Records in Child Node), so the + maximum number of records in these nodes is computed with the + equation above, but using (Child Pointer, Number of + Records in Child Node) pairs instead of triplets. +

+

+ The number of + bytes used to encode this field is the least number of bytes + required to encode the maximum number of records in a child + node value for the child nodes below this level + in the B-tree. +

+

+ For example, if the maximum number of child records is + 123, one byte will be used to encode these values in this + node; if the maximum number of child records is + 20000, two bytes will be used to encode these values in this + node; and so on. The maximum number of bytes used to + encode these values is 8 (in other words, an unsigned + 64-bit integer). +

+

Total Number of Records in Child Node

+

This is the total number of records for the node pointed to by + the corresponding Node Pointer and all its children. + This field exists only in nodes whose depth in the B-tree node + is greater than 1 (in other words, the “twig” + internal nodes, just above leaf nodes, do not store this + field in their child node pointers). +

+

The number of bytes used to store this field is determined by + the maximum possible number of records able to be stored in the + child node and its descendants. +

+

+ The maximum possible number of records able to be stored in a + child node and its descendants is computed iteratively, in the + following way: The maximum number of records in a leaf node + is computed, then that value is used to compute the maximum + possible number of records in the first level of internal nodes + above the leaf nodes. Multiplying these two values together + determines the maximum possible number of records in child node + pointers for the level of nodes two levels above leaf nodes. + This process is continued up to any level in the B-tree. +

+

+ The number of bytes used to encode this value is computed in + the same way as for the Number of Records in Child Node + field. +

+

Checksum

+

This is the checksum for this node. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree Leaf Node +
bytebytebytebyte
Signature
VersionTypeRecord 0, 1, 2...N-1 (variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “BTLF“ is + used to indicate the leaf node of a version 2 B-link tree. +

+

Version

+

The version number for this B-tree leaf node. + This document describes version 0. +

+

Type

+

This field is the type of the B-tree node. It should always + be the same as the B-tree type in the header. +

+

Records

+

The size of this field is determined by the number of records + for this node and the record size (from the header). The format + of records depends on the type of B-tree. +

+

Checksum

+

This is the checksum for this node. +

+
+
+ +
+

The record layout for each stored (in other words, non-testing) + B-tree type is as follows:

+ +
+ + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 1 Record Layout - Indirectly Accessed, Non-Filtered, + ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Huge Object AddressO


Huge Object LengthL


Huge Object IDL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Huge Object Address

+

The address of the huge object in the file. +

+

Huge Object Length

+

The length of the huge object in the file. +

+

Huge Object ID

+

The heap ID for the huge object. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 2 Record Layout - Indirectly Accessed, Filtered, + ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Filtered Huge Object AddressO


Filtered Huge Object LengthL

Filter Mask

Filtered Huge Object Memory SizeL


Huge Object IDL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Filtered Huge Object Address

+

The address of the filtered huge object in the file. +

+

Filtered Huge Object Length

+

The length of the filtered huge object in the file. +

+

Filter Mask

+

A 32-bit bit field indicating which filters have been skipped for + this chunk. Each filter has an index number in the pipeline + (starting at 0, with the first filter to apply) and if that + filter is skipped, the bit corresponding to its index is set. +

+

Filtered Huge Object Memory Size

+

The size of the de-filtered huge object in memory. +

+

Huge Object ID

+

The heap ID for the huge object. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 3 Record Layout - Directly Accessed, Non-Filtered, + ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Huge Object AddressO


Huge Object LengthL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Huge Object Address

+

The address of the huge object in the file. +

+

Huge Object Length

+

The length of the huge object in the file. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 4 Record Layout - Directly Accessed, Filtered, + ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Filtered Huge Object AddressO


Filtered Huge Object LengthL

Filter Mask

Filtered Huge Object Memory SizeL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Filtered Huge Object Address

+

The address of the filtered huge object in the file. +

+

Filtered Huge Object Length

+

The length of the filtered huge object in the file. +

+

Filter Mask

+

A 32-bit bit field indicating which filters have been skipped for + this chunk. Each filter has an index number in the pipeline + (starting at 0, with the first filter to apply) and if that + filter is skipped, the bit corresponding to its index is set. +

+

Filtered Huge Object Memory Size

+

The size of the de-filtered huge object in memory. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 5 Record Layout - Link Name for Indexed Group +
bytebytebytebyte
Hash of Name
ID (bytes 1-4)
ID (bytes 5-7)
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Hash

+

This field is hash value of the name for the link. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the link’s name. +

+

ID

+

This is a 7-byte sequence of bytes and is the heap ID for the + link record in the group’s fractal heap.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 6 Record Layout - Creation Order for Indexed Group +
bytebytebytebyte

Creation Order (8 bytes)

ID (bytes 1-4)
ID (bytes 5-7)
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Creation Order

+

This field is the creation order value for the link. +

+

ID

+

This is a 7-byte sequence of bytes and is the heap ID for the + link record in the group’s fractal heap.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 7 Record Layout - Shared Object Header Messages (Sub-Type 0 - Message in Heap) +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash
Reference Count

Heap ID (8 bytes)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Message Location

+

This field Indicates the location where the message is stored: + + + + + + + + + + + + + +
ValueDescription
0Shared message is stored in shared message index heap. +
1Shared message is stored in object header. +

+

Hash

+

This field is hash value of the shared message. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the shared message.

+

Reference Count

+

The number of objects which reference this message.

+

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + shared message in the shared message index’s fractal heap.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 7 Record Layout - Shared Object Header Messages (Sub-Type 1 - Message in Object Header) +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash
Reserved (zero)Message TypeObject Header Index

Object Header AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Message Location

+

This field Indicates the location where the message is stored: + + + + + + + + + + + + + +
ValueDescription
0Shared message is stored in shared message index heap. +
1Shared message is stored in object header. +

+

Hash

+

This field is hash value of the shared message. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the shared message.

+

Message Type

+

The object header message type of the shared message.

+

Object Header Index

+

This field indicates that the shared message is the nth message + of its type in the specified object header.

+

Object Header Address

+

The address of the object header containing the shared message.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 8 Record Layout - Attribute Name for Indexed Attributes +
bytebytebytebyte

Heap ID (8 bytes)

Message FlagsThis space inserted only to align table nicely
Creation Order
Hash of Name
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + attribute in the object’s attribute fractal heap.

+

Message Flags

The object header message flags for the attribute message.

+

Creation Order

+

This field is the creation order value for the attribute. +

+

Hash

+

This field is hash value of the name for the attribute. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the attribute’s name. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ Version 2 B-tree, Type 9 Record Layout- Creation Order for Indexed Attributes +
bytebytebytebyte

Heap ID (8 bytes)

Message FlagsThis space inserted only to align table nicely
Creation Order
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + attribute in the object’s attribute fractal heap.

+

Message Flags

+

The object header message flags for the attribute message.

+

Creation Order

+

This field is the creation order value for the attribute. +

+
+
+ + +
+

+III.B. Disk Format: Level 1B - Group Symbol Table Nodes

+ +

A group is an object internal to the file that allows + arbitrary nesting of objects within the file (including other groups). + A group maps a set of link names in the group to a set of relative + file addresses of objects in the file. Certain metadata for an object to + which the group points can be cached in the group’s symbol table entry in + addition to being in the object’s header.

+ +

An HDF5 object name space can be stored hierarchically by + partitioning the name into components and storing each + component as a link in a group. The link for a + non-ultimate component points to the group containing + the next component. The link for the last + component points to the object being named.

+ +

One implementation of a group is a collection of symbol table nodes + indexed by a B-link tree. Each symbol table node contains entries + for one or more links. If an attempt is made to add a link to an already + full symbol table node containing 2K entries, then the node is + split and one node contains K symbols and the other contains + K+1 symbols.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Symbol Table Node (A Leaf of a B-link tree) +
bytebytebytebyte
Signature
Version NumberReserved (zero)Number of Symbols


Group Entries


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “SNOD” is + used to indicate the + beginning of a symbol table node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version Number

+

The version number for the symbol table node. This + document describes version 1. (There is no version ‘0’ + of the symbol table node) +

+

Number of Entries

+

Although all symbol table nodes have the same length, + most contain fewer than the maximum possible number of + link entries. This field indicates how many entries + contain valid data. The valid entries are packed at the + beginning of the symbol table node while the remaining + entries contain undefined values. +

+

Symbol Table Entries

+

Each link has an entry in the symbol table node. + The format of the entry is described below. + There are 2K entries in each group node, where + K is the “Group Leaf Node K” value from the + superblock. +

+
+
+ +
+

+III.C. Disk Format: Level 1C - Symbol Table Entry

+ +

Each symbol table entry in a symbol table node is designed + to allow for very fast browsing of stored objects. + Toward that design goal, the symbol table entries + include space for caching certain constant metadata from the + object header.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Symbol Table Entry +
bytebytebytebyte

Link Name OffsetO


Object Header AddressO

Cache Type
Reserved (zero)


Scratch-pad Space (16 bytes)


+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Link Name Offset

+

This is the byte offset into the group’s local + heap for the name of the link. The name is null + terminated. +

+

Object Header Address

+

Every object has an object header which serves as a + permanent location for the object’s metadata. In addition + to appearing in the object header, some of the object’s metadata + can be cached in the scratch-pad space. +

+

Cache Type

+

The cache type is determined from the object header. + It also determines the format for the scratch-pad space: + + + + + + + + + + + + + + + + + + +
TypeDescription
0No data is cached by the group entry. This + is guaranteed to be the case when an object header + has a link count greater than one. +
1Group object header metadata is cached in the + scratch-pad space. This implies that the symbol table + entry refers to another group. +
2The entry is a symbolic link. The first four bytes + of the scratch-pad space are the offset into the local + heap for the link value. The object header address + will be undefined. +

+ +

Reserved

+

These four bytes are present so that the scratch-pad + space is aligned on an eight-byte boundary. They are + always set to zero. +

+

Scratch-pad Space

+

This space is used for different purposes, depending + on the value of the Cache Type field. Any metadata + about an object represented in the scratch-pad + space is duplicated in the object header for that + object. +

+

+ Furthermore, no data is cached in the group + entry scratch-pad space if the object header for + the object has a link count greater than one. +

+
+
+ +
+

Format of the Scratch-pad Space

+ +

The symbol table entry scratch-pad space is formatted + according to the value in the Cache Type field.

+ +

If the Cache Type field contains the value zero + (0) then no information is + stored in the scratch-pad space.

+ +

If the Cache Type field contains the value one + (1), then the scratch-pad space + contains cached metadata for another object header + in the following format:

+ +
+ + + + + + + + + + + + + + + + + +
+ Object Header Scratch-pad Format +
bytebytebytebyte

Address of B-treeO


Address of Name HeapO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Address of B-tree

+

This is the file address for the root of the + group’s B-tree. +

+

Address of Name Heap

+

This is the file address for the group’s local + heap, in which are stored the group’s symbol names. +

+
+
+ + +
+

If the Cache Type field contains the value two + (2), then the scratch-pad space + contains cached metadata for a symbolic link + in the following format:

+ +
+ + + + + + + + + + + + + +
+ Symbolic Link Scratch-pad Format +
bytebytebytebyte
Offset to Link Value
+
+ +
+
+ + + + + + + + + + +
Field NameDescription

Offset to Link Value

+

The value of a symbolic link (that is, the name of the + thing to which it points) is stored in the local heap. + This field is the 4-byte offset into the local heap for + the start of the link value, which is null terminated. +

+
+
+ +
+

+III.D. Disk Format: Level 1D - Local Heaps

+ +

A local heap is a collection of small pieces of data that are particular + to a single object in the HDF5 file. Objects can be + inserted and removed from the heap at any time. + The address of a heap does not change once the heap is created. + For example, a group stores addresses of objects in symbol table nodes + with the names of links stored in the group’s local heap. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Local Heap +
bytebytebytebyte
Signature
VersionReserved (zero)

Data Segment SizeL


Offset to Head of Free-listL


Address of Data SegmentO

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “HEAP” + is used to indicate the + beginning of a heap. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

Each local heap has its own version number so that new + heaps can be added to old files. This document + describes version zero (0) of the local heap. +

+

Data Segment Size

+

The total amount of disk memory allocated for the heap + data. This may be larger than the amount of space + required by the objects stored in the heap. The extra + unused space in the heap holds a linked list of free blocks. +

+

Offset to Head of Free-list

+

This is the offset within the heap data segment of the + first free block (or the + undefined address if there is no + free block). The free block contains “Size of Lengths” bytes that + are the offset of the next free block (or the + value ‘1’ if this is the + last free block) followed by “Size of Lengths” bytes that store + the size of this free block. The size of the free block includes + the space used to store the offset of the next free block and + the size of the current block, making the minimum size of a free + block 2 * “Size of Lengths”. +

+

Address of Data Segment

+

The data segment originally starts immediately after + the heap header, but if the data segment must grow as a + result of adding more objects, then the data segment may + be relocated, in its entirety, to another part of the + file. +

+
+
+ +

Objects within a local heap should be aligned on an 8-byte boundary.

+ +
+

+III.E. Disk Format: Level 1E - Global Heap

+ +

Each HDF5 file has a global heap which stores various types of + information which is typically shared between datasets. The + global heap was designed to satisfy these goals:

+ +
    +
  1. Repeated access to a heap object must be efficient without + resulting in repeated file I/O requests. Since global heap + objects will typically be shared among several datasets, it is + probable that the object will be accessed repeatedly.
  2. +
  3. Collections of related global heap objects should result in + fewer and larger I/O requests. For instance, a dataset of + object references will have a global heap object for each + reference. Reading the entire set of object references + should result in a few large I/O requests instead of one small + I/O request for each reference.
  4. +
  5. It should be possible to remove objects from the global heap + and the resulting file hole should be eligible to be reclaimed + for other uses.
  6. +
+ + +

The implementation of the heap makes use of the memory management + already available at the file level and combines that with a new + object called a collection to achieve goal B. The global heap + is the set of all collections. Each global heap object belongs to + exactly one collection and each collection contains one or more global + heap objects. For the purposes of disk I/O and caching, a collection is + treated as an atomic object, addressing goal A. +

+ +

When a global heap object is deleted from a collection (which occurs + when its reference count falls to zero), objects located after the + deleted object in the collection are packed down toward the beginning + of the collection and the collection’s global heap object 0 is created + (if possible) or its size is increased to account for the recently + freed space. There are no gaps between objects in each collection, + with the possible exception of the final space in the collection, if + it is not large enough to hold the header for the collection’s global + heap object 0. These features address goal C. +

+ +

The HDF5 Library creates global heap collections as needed, so there may + be multiple collections throughout the file. The set of all of them is + abstractly called the “global heap”, although they do not actually link + to each other, and there is no global place in the file where you can + discover all of the collections. The collections are found simply by + finding a reference to one through another object in the file. For + example, data of variable-length datatype elements is stored in the + global heap and is accessed via a global heap ID. The format for + global heap IDs is described at the end of this section. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ A Global Heap Collection +
bytebytebytebyte
Signature
VersionReserved (zero)

Collection SizeL


Global Heap Object 1


Global Heap Object 2


...


Global Heap Object N


Global Heap Object 0 (free space)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “GCOL” + is used to indicate the + beginning of a collection. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

Each collection has its own version number so that new + collections can be added to old files. This document + describes version one (1) of the collections (there is no + version zero (0)). +

+

Collection Size

+

This is the size in bytes of the entire collection + including this field. The default (and minimum) + collection size is 4096 bytes which is a typical file + system block size. This allows for 127 16-byte heap + objects plus their overhead (the collection header of 16 bytes + and the 16 bytes of information about each heap object). +

+

Global Heap Object 1 through N

+

The objects are stored in any order with no + intervening unused space. +

+

Global Heap Object 0

+

Global Heap Object 0 (zero), when present, represents the free + space in the collection. Free space always appears at the end of + the collection. If the free space is too small to store the header + for Object 0 (described below) then the header is implied and the + collection contains no free space. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Global Heap Object +
bytebytebytebyte
Heap Object IndexReference Count
Reserved (zero)

Object SizeL


Object Data

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Heap Object Index

+

Each object has a unique identification number within a + collection. The identification numbers are chosen so that + new objects have the smallest value possible with the + exception that the identifier 0 always refers to the + object which represents all free space within the + collection. +

+

Reference Count

+

All heap objects have a reference count field. An + object which is referenced from some other part of the + file will have a positive reference count. The reference + count for Object 0 is always zero. +

+

Reserved

+

Zero padding to align next field on an 8-byte boundary. +

+

Object Size

+

This is the size of the object data stored for the object. + The actual storage space allocated for the object data is rounded + up to a multiple of eight. +

+

Object Data

+

The object data is treated as a one-dimensional array + of bytes to be interpreted by the caller. +

+
+ +
+ +
+

+ The format for the ID used to locate an object in the global heap is + described here:

+ +
+ + + + + + + + + + + + + + + + + +
+ Global Heap ID +
bytebytebytebyte

Collection AddressO

Object Index
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Collection Address

+

This field is the address of the global heap collection + where the data object is stored. +

+

ID

+

This field is the index of the data object within the + global heap collection. +

+
+
+ + +
+

+III.F. Disk Format: Level 1F - Fractal Heap

+ +

+ Each fractal heap consists of a header and zero or more direct and + indirect blocks (described below). The header contains general + information as well as + initialization parameters for the doubling table. The Root + Block Address in the header points to the first direct or + indirect block in the heap. +

+ +

+ Fractal heaps are based on a data structure called a doubling + table. A doubling table provides a mechanism for quickly + extending an array-like data structure that minimizes the number of + empty blocks in the heap, while retaining very fast lookup of any + element within the array. More information on fractal heaps and + doubling tables can be found in the RFC + “Private + Heaps in HDF5.” +

+ +

+ The fractal heap implements the doubling table structure with + indirect and direct blocks. + Indirect blocks in the heap do not actually contain data for + objects in the heap, their “size” is abstract - + they represent the indexing structure for locating the + direct blocks in the doubling table. + Direct blocks + contain the actual data for objects stored in the heap. +

+ +

+ All indirect blocks have a constant number of block entries in each + row, called the width of the doubling table (stored in + the heap header). + + The number + of rows for each indirect block in the heap is determined by the + size of the block that the indirect block represents in the + doubling table (calculation of this is shown below) and is + constant, except for the “root” + indirect block, which expands and shrinks its number of rows as + needed. +

+ +

+ Blocks in the first two rows of an indirect block + are Starting Block Size number of bytes in size, + and the blocks in each subsequent row are twice the size of + the blocks in the previous row. In other words, blocks in + the third row are twice the Starting Block Size, + blocks in the fourth row are four times the + Starting Block Size, and so on. Entries for + blocks up to the Maximum Direct Block Size point to + direct blocks, and entries for blocks greater than that size + point to further indirect blocks (which have their own + entries for direct and indirect blocks). +

+ +

+ The number of rows of blocks, nrows, in an + indirect block of size iblock_size is given by the + following expression: +

+ nrows = (log2(iblock_size) - + log2(<Starting Block Size> * + <Width>)) + 1 +

+ +

+ The maximum number of rows of direct blocks, max_dblock_rows, + in any indirect block of a fractal heap is given by the + following expression: +

+ max_dblock_rows = + (log2(<Max. Direct Block Size>) - + log2(<Starting Block Size>)) + 2 +

+ +

+ Using the computed values for nrows and + max_dblock_rows, along with the Width of the + doubling table, the number of direct and indirect block entries + (K and N in the indirect block description, below) + in an indirect block can be computed: +

+ K = MIN(nrows, max_dblock_rows) * + Width + +

+ If nrows is less than or equal to max_dblock_rows, + N is 0. Otherwise, N is simply computed: +

+ N = K - (max_dblock_rows * + Width) +

+ +

+ The size indirect blocks on disk is determined by the number + of rows in the indirect block (computed above). The size of direct + blocks on disk is exactly the size of the block in the doubling + table. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fractal Heap Header +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely
Heap ID LengthI/O Filters’ Encoded Length
FlagsThis space inserted only to align table nicely
Maximum Size of Managed Objects

Next Huge Object IDL


v2 B-tree Address of Huge ObjectsO


Amount of Free Space in Managed BlocksL


Address of Managed Block Free Space ManagerO


Amount of Managed Space in HeapL


Amount of Allocated Managed Space in HeapL


Offset of Direct Block Allocation Iterator in Managed SpaceL


Number of Managed Objects in HeapL


Size of Huge Objects in HeapL


Number of Huge Objects in HeapL


Size of Tiny Objects in HeapL


Number of Tiny Objects in HeapL

Table WidthThis space inserted only to align table nicely

Starting Block SizeL


Maximum Direct Block SizeL

Maximum Heap SizeStarting # of Rows in Root Indirect Block

Address of Root BlockO

Current # of Rows in Root Indirect BlockThis space inserted only to align table nicely

Size of Filtered Root Direct Block (optional)L

I/O Filter Mask (optional)
I/O Filter Information (optional, variable size)
Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “FRHP” + is used to indicate the + beginning of a fractal heap header. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

This document describes version 0.

+

Heap ID Length

+

This is the length in bytes of heap object IDs for this heap.

+

I/O Filters’ Encoded Length

+

This is the size in bytes of the encoded I/O Filter Information. +

+

Flags

+

This field is the heap status flag and is a bit field + indicating additional information about the fractal heap. + + + + + + + + + + + + + + + + + + +
Bit(s)Description
0If set, the ID value to use for huge object has wrapped + around. If the value for the Next Huge Object ID + has wrapped around, each new huge object inserted into the + heap will require a search for an ID value. +
1If set, the direct blocks in the heap are checksummed. +
2-7Reserved

+ +

Maximum Size of Managed Objects

+

This is the maximum size of managed objects allowed in the heap. + Objects greater than this this are ‘huge’ objects and will be + stored in the file directly, rather than in a direct block for + the heap. +

+

Next Huge Object ID

+

This is the next ID value to use for a huge object in the heap. +

+

v2 B-tree Address of Huge Objects

+

This is the address of the v2 B-tree + used to track huge objects in the heap. The type of records + stored in the v2 B-tree will + be determined by whether the address & length of a huge object + can fit into a heap ID (if yes, it is a “directly” accessed + huge object) and whether there is a filter used on objects + in the heap. +

+

Amount of Free Space in Managed Blocks

+

This is the total amount of free space in managed direct blocks + (in bytes). +

+

Address of Managed Block Free Space Manager

+

This is the address of the + Free-space Manager for + managed blocks. +

+

Amount of Managed Space in Heap

+

This is the total amount of managed space in the heap (in bytes), + essentially the upper bound of the heap’s linear address space. +

+

Amount of Allocated Managed Space in Heap

+

This is the total amount of managed space (in bytes) actually + allocated in + the heap. This can be less than the Amount of Managed Space + in Heap field, if some direct blocks in the heap’s linear + address space are not allocated. +

+

Offset of Direct Block Allocation Iterator in Managed Space

+

This is the linear heap offset where the next direct + block should be allocated at (in bytes). This may be less than + the Amount of Managed Space in Heap value because the + heap’s address space is increased by a “row” of direct blocks + at a time, rather than by single direct block increments. +

+

Number of Managed Objects in Heap

+

This is the number of managed objects in the heap. +

+

Size of Huge Objects in Heap

+

This is the total size of huge objects in the heap (in bytes). +

+

Number of Huge Objects in Heap

+

This is the number of huge objects in the heap. +

+

Size of Tiny Objects in Heap

+

This is the total size of tiny objects that are packed in heap + IDs (in bytes). +

+

Number of Tiny Objects in Heap

+

This is the number of tiny objects that are packed in heap IDs. +

+

Table Width

+

This is the number of columns in the doubling table for managed + blocks. This value must be a power of two. +

+

Starting Block Size

+

This is the starting block size to use in the doubling table for + managed blocks (in bytes). This value must be a power of two. +

+

Maximum Direct Block Size

+

This is the maximum size allowed for a managed direct block. + Objects inserted into the heap that are larger than this value + (less the # of bytes of direct block prefix/suffix) + are stored as ‘huge’ objects. This value must be a power of + two. +

+

Maximum Heap Size

+

This is the maximum size of the heap’s linear address space for + managed objects (in bytes). The value stored is the log2 of + the actual value, that is: the # of bits of the address space. + ‘Huge’ and ‘tiny’ objects are not counted in this value, since + they do not store objects in the linear address space of the + heap. +

+

Starting # of Rows in Root Indirect Block

+

This is the starting number of rows for the root indirect block. + A value of 0 indicates that the root indirect block will have + the maximum number of rows needed to address the heap’s Maximum + Heap Size. +

+

Address of Root Block

+

This is the address of the root block for the heap. It can + be the undefined address if + there is no data in the heap. It either points to a direct + block (if the Current # of Rows in the Root Indirect Block + value is 0), or an indirect block. +

+

Current # of Rows in Root Indirect Block

+

This is the current number of rows in the root indirect block. + A value of 0 indicates that Address of Root Block + points to direct block instead of indirect block. +

+

Size of Filtered Root Direct Block

+

This is the size of the root direct block, if filters are + applied to heap objects (in bytes). This field is only + stored in the header if the I/O Filters’ Encoded Length + is greater than 0. +

+

I/O Filter Mask

+

This is the filter mask for the root direct block, if filters + are applied to heap objects. This mask has the same format as + that used for the filter mask in chunked raw data records in a + v1 B-tree. + This field is only + stored in the header if the I/O Filters’ Encoded Length + is greater than 0. +

+

I/O Filter Information

+

This is the I/O filter information encoding direct blocks and + huge objects, if filters are applied to heap objects. This + field is encoded as a Filter Pipeline + message. + The size of this field is determined by I/O Filters’ + Encoded Length. +

+

Checksum

+

This is the checksum for the header.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fractal Heap Direct Block +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Heap Header AddressO

Block Offset (variable size)
Checksum (optional)

Object Data (variable size)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “FHDB” + is used to indicate the + beginning of a fractal heap direct block. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

This document describes version 0.

+

Heap Header Address

+

This is the address for the fractal heap header that this + block belongs to. This field is principally used for file + integrity checking. +

+

Block Offset

+

This is the offset of the block within the fractal heap’s + address space (in bytes). The number of bytes used to encode + this field is the Maximum Heap Size (in the heap’s + header) divided by 8 and rounded up to the next highest integer, + for values that are not a multiple of 8. This value is + principally used for file integrity checking. +

+

Checksum

+

This is the checksum for the direct block.

+

This field is only present if bit 1 of Flags in the + heap’s header is set.

+

Object Data

+

This section of the direct block stores the actual data for + objects in the heap. The size of this section is determined by + the direct block’s size minus the size of the other fields + stored in the direct block (for example, the Signature, + Version, and others including the Checksum if it is + present). +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fractal Heap Indirect Block +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Heap Header AddressO

Block Offset (variable size)

Child Direct Block #0 AddressO


Size of Filtered Direct Block #0 (optional) L

Filter Mask for Direct Block #0 (optional)

Child Direct Block #1 AddressO


Size of Filtered Direct Block #1 (optional)L

Filter Mask for Direct Block #1 (optional)
...

Child Direct Block #K-1 AddressO


Size of Filtered Direct Block #K-1 (optional)L

Filter Mask for Direct Block #K-1 (optional)

Child Indirect Block #0 AddressO


Child Indirect Block #1 AddressO

...

Child Indirect Block #N-1 AddressO

Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “FHIB” is used to + indicate the beginning of a fractal heap indirect block. This + gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Heap Header Address

+

This is the address for the fractal heap header that this + block belongs to. This field is principally used for file + integrity checking. +

+

Block Offset

+

This is the offset of the block within the fractal heap’s + address space (in bytes). The number of bytes used to encode + this field is the Maximum Heap Size (in the heap’s + header) divided by 8 and rounded up to the next highest integer, + for values that are not a multiple of 8. This value is + principally used for file integrity checking. +

+

Child Direct Block #K Address

+

This field is the address of the child direct block. + The size of the [uncompressed] direct block can be computed by + its offset in the heap’s linear address space. +

+

Size of Filtered Direct Block #K

+

This is the size of the child direct block after passing through + the I/O filters defined for this heap (in bytes). If no I/O + filters are present for this heap, this field is not present. +

+

Filter Mask for Direct Block #K

+

This is the I/O filter mask for the filtered direct block. + This mask has the same format as that used for the filter mask + in chunked raw data records in a v1 B-tree. + If no I/O filters are present for this heap, this field is not + present. +

+

Child Indirect Block #N Address

+

This field is the address of the child indirect block. + The size of the indirect block can be computed by + its offset in the heap’s linear address space. +

+

Checksum

+

This is the checksum for the indirect block.

+
+ +
+ +
+

An object in the fractal heap is identified by means of a fractal heap ID, + which encodes information to locate the object in the heap. + Currently, the fractal heap stores an object in one of three ways, + depending on the object’s size:

+ +
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
Tiny +

When an object is small enough to be encoded in the heap ID, the + object’s data is embedded in the fractal heap ID itself. There are + 2 sub-types for this type of object: normal and extended. The + sub-type for tiny heap IDs depends on whether the heap ID is large + enough to store objects greater than 16 bytes or not. If the + heap ID length is 18 bytes or smaller, the ‘normal’ tiny heap ID + form is used. If the heap ID length is greater than 18 bytes in + length, the “extented” form is used. See format description below + for both sub-types. +

+
Huge +

When the size of an object is larger than Maximum Size of + Managed Objects in the Fractal Heap Header, the + object’s data is stored on its own in the file and the object + is tracked/indexed via a version 2 B-tree. All huge objects + for a particular fractal heap use the same v2 B-tree. All huge + objects for a particular fractal heap use the same format for + their huge object IDs. +

+ +

Depending on whether the IDs for a heap are large enough to hold + the object’s retrieval information and whether I/O pipeline filters + are applied to the heap’s objects, 4 sub-types are derived for + huge object IDs for this heap:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Sub-typeDescription
Directly accessed, non-filtered +

The object’s address and length are embedded in the + fractal heap ID itself and the object is directly accessed + from them. This allows the object to be accessed without + resorting to the B-tree. +

+
Directly accessed, filtered +

The filtered object’s address, length, filter mask and + de-filtered size are embedded in the fractal heap ID itself + and the object is accessed directly with them. This allows + the object to be accessed without resorting to the B-tree. +

+
Indirectly accessed, non-filtered +

The object is located by using a B-tree key embedded in + the fractal heap ID to retrieve the address and length from + the version 2 B-tree for huge objects. Then, the address + and length are used to access the object. +

+
Indirectly accessed, filtered +

The object is located by using a B-tree key embedded in + the fractal heap ID to retrieve the filtered object’s + address, length, filter mask and de-filtered size from the + version 2 B-tree for huge objects. Then, this information + is used to access the object. +

+
+
+ +
Managed +

When the size of an object does not meet the above two + conditions, the object is stored and managed via the direct and + indirect blocks based on the doubling table. +

+
+
+ + +

The specific format for each type of heap ID is described below: +

+ +
+ + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Tiny Objects (sub-type 1 - ‘Normal’) +
bytebytebytebyte
Version, Type & LengthThis space inserted only to align table nicely

Data (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Version, Type & Length

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Tiny objects have a value of 2. +
0-3The length of the tiny object. The value stored + is one less than the actual length (since zero-length + objects are not allowed to be stored in the heap). + For example, an object of actual length 1 has an + encoded length of 0, an object of actual length 2 + has an encoded length of 1, and so on. +

+ +

Data

+

This is the data for the object. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Tiny Objects (sub-type 2 - ‘Extended’) +
bytebytebytebyte
Version, Type & LengthExtended LengthThis space inserted only to align table nicely
Data (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version, Type & Length

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Tiny objects have a value of 2. +
0-3These 4 bits, together with the next byte, form an + unsigned 12-bit integer for holding the length of the + object. These 4-bits are bits 8-11 of the 12-bit integer. + See description for the Extended Length field below. +

+ +

Extended Length

+

This byte, together with the 4 bits in the previous byte, + forms an unsigned 12-bit integer for holding the length of + the tiny object. These 8 bits are bits 0-7 of the 12-bit + integer formed. The value stored is one less than the actual + length (since zero-length objects are not allowed to be + stored in the heap). For example, an object of actual length + 1 has an encoded length of 0, an object of actual length + 2 has an encoded length of 1, and so on. +

+

Data

+

This is the data for the object. +

+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Huge Objects (sub-type 1 & 2): indirectly accessed, non-filtered/filtered +
bytebytebytebyte
Version & TypeThis space inserted only to align table nicely

v2 B-tree KeyL (variable size)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Version & Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

v2 B-tree Key

This field is the B-tree key for retrieving the information + from the version 2 B-tree for huge objects needed to access the + object. See the description of v2 B-tree + records sub-type 1 & 2 for a description of the fields. New key + values are derived from Next Huge Object ID in the + Fractal Heap Header.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Huge Objects (sub-type 3): directly accessed, non-filtered +
bytebytebytebyte
Version & TypeThis space inserted only to align table nicely

Address O


Length L

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version & Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

Address

This field is the address of the object in the file.

+

Length

This field is the length of the object in the file.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Huge Objects (sub-type 4): directly accessed, filtered +
bytebytebytebyte
Version & TypeThis space inserted only to align table nicely

Address O


Length L

Filter Mask

De-filtered Size L

+ + + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
 (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version & Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

Address

This field is the address of the filtered object in the file.

+

Length

This field is the length of the filtered object in the file.

+

Filter Mask

This field is the I/O pipeline filter mask for the + filtered object in the file.

+

Filtered Size

This field is the size of the de-filtered object in the file.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + +
Fractal Heap ID for Managed Objects +
bytebytebytebyte
Version & TypeThis space inserted only to align table nicely
Offset (variable size)
Length (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version & Type

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Managed objects have a value of 0. +
0-3Reserved. +

+

Offset

This field is the offset of the object in the heap. + This field’s size is the minimum number of bytes + necessary to encode the Maximum Heap Size value + (from the Fractal Heap Header). For example, if the + value of the Maximum Heap Size is less than 256 bytes, + this field is 1 byte in length, a Maximum Heap Size + of 256-65535 bytes uses a 2 byte length, and so on.

Length

This field is the length of the object in the heap. It + is determined by taking the minimum value of Maximum + Direct Block Size and Maximum Size of Managed + Objects in the Fractal Heap Header. Again, + the minimum number of bytes needed to encode that value is + used for the size of this field.

+
+ +
+

+III.G. Disk Format: Level 1G - Free-space Manager

+ +

+ Free-space managers are used to describe space within a heap or + the entire HDF5 file that is not currently used for that heap or + file. +

+ +

+ The free-space manager header contains metadata information + about the space being tracked, along with the address of the list + of free space sections which actually describes the free + space. The header records information about free-space sections being + tracked, creation parameters for handling free-space sections of a + client, and section information used to locate the collection of + free-space sections. +

+ +

+ The free-space section list stores a collection of + free-space sections that is specific to each client of the + free-space manager. + + For example, the fractal heap is a client of the free space manager + and uses it to track unused space within the heap. There are 4 + types of section records for the fractal heap, each of which has + its own format, listed below. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Free-space Manager Header +
bytebytebytebyte
Signature
VersionClient IDThis space inserted only to align table nicely

Total Space TrackedL


Total Number of SectionsL


Number of Serialized SectionsL


Number of Un-Serialized SectionsL

Number of Section ClassesThis space inserted only to align table nicely
Shrink PercentExpand Percent
Size of Address SpaceThis space inserted only to align table nicely

Maximum Section Size L


Address of Serialized Section ListO


Size of Serialized Section List UsedL


Allocated Size of Serialized Section ListL

Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “FSHD” is used to + indicate the beginning of the Free-space Manager Header. + This gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version

+

This is the version number for the Free-space Manager Header + and this document describes version 0.

+

Client ID

+

This is the client ID for identifying the user of this + free-space manager: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Fractal heap +
1File +
2+Reserved. +

+ +

Total Space Tracked

+

This is the total amount of free space being tracked, in bytes. +

+

Total Number of Sections

+

This is the total number of free-space sections being tracked. +

+

Number of Serialized Sections

+

This is the number of serialized free-space sections being + tracked. +

+

Number of Un-Serialized Sections

+

This is the number of un-serialized free-space sections being + managed. Un-serialized sections are created by the free-space + client when the list of sections is read in. +

+

Number of Section Classes

+

This is the number of section classes handled by this free space + manager for the free-space client. +

+

Shrink Percent

+

This is the percent of current size to shrink the allocated + serialized free-space section list. +

+

Expand Percent

+

This is the percent of current size to expand the allocated + serialized free-space section list. +

+

Size of Address Space

+

This is the size of the address space that free-space sections + are within. This is stored as the log2 of the + actual value (in other words, the number of bits required + to store values within that address space). +

+

Maximum Section Size

+

This is the maximum size of a section to be tracked. +

+

Address of Serialized Section List

+

This is the address where the serialized free-space section + list is stored. +

+

Size of Serialized Section List Used

+

This is the size of the serialized free-space section + list used (in bytes). This value must be less than + or equal to the allocated size of serialized section + list, below. +

+

Allocated Size of Serialized Section List

+

This is the size of serialized free-space section list + actually allocated (in bytes). +

+

Checksum

+

This is the checksum for the free-space manager header.

+
+
+ +
+

The free-space sections being managed are stored in a + free-space section list, described below. The sections + in the free-space section list are stored in the following way: + a count of the number of sections describing a particular size of + free space and the size of the free-space described (in bytes), + followed by a list of section description records; then another + section count and size, followed by the list of section + descriptions for that size; and so on.

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Free-space Section List +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Free-space Manager Header AddressO

Number of Section Records in Set #0 (variable size)
Size of Free-space Section Described in Record Set #0 (variable size)
Record Set #0 Section Record #0 Offset(variable size)
Record Set #0 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #0 Section Record #0 Data (variable size)
...
Record Set #0 Section Record #K-1 Offset(variable size)
Record Set #0 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #0 Section Record #K-1 Data (variable size)
Number of Section Records in Set #1 (variable size)
Size of Free-space Section Described in Record Set #1 (variable size)
Record Set #1 Section Record #0 Offset(variable size)
Record Set #1 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #1 Section Record #0 Data (variable size)
...
Record Set #1 Section Record #K-1 Offset(variable size)
Record Set #1 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #1 Section Record #K-1 Data (variable size)
...
...
Number of Section Records in Set #N-1 (variable size)
Size of Free-space Section Described in Record Set #N-1 (variable size)
Record Set #N-1 Section Record #0 Offset(variable size)
Record Set #N-1 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #N-1 Section Record #0 Data (variable size)
...
Record Set #N-1 Section Record #K-1 Offset(variable size)
Record Set #N-1 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #N-1 Section Record #K-1 Data (variable size)
Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “FSSE” is used to + indicate the beginning of the Free-space Section Information. + This gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version

+

This is the version number for the Free-space Section List + and this document describes version 0.

+

Free-space Manager Header Address

+

This is the address of the Free-space Manager Header. + This field is principally used for file + integrity checking. +

+

Number of Section Records for Set #N

+

This is the number of free-space section records for set #N. + The length of this field is the minimum number of bytes needed + to store the number of serialized sections (from the + free-space manager header). +

+ +

+ The number of sets of free-space section records is + determined by the size of serialized section list in + the free-space manager header. +

+

Section Size for Record Set #N

+

This is the size (in bytes) of the free-space section described + for all the section records in set #N. +

+ +

+ The length of this field is the minimum number of bytes needed + to store the maximum section size (from the + free-space manager header). +

+

Record Set #N Section #K Offset

+

This is the offset (in bytes) of the free-space section within + the client for the free-space manager. +

+ +

+ The length of this field is the minimum number of bytes needed + to store the size of address space (from the + free-space manager header). +

+

Record Set #N Section #K Type

+

This is the type of the section record, used to decode the + record set #N section #K data information. The defined + record type for file client is: + + + + + + + + + + + + + + + +
TypeDescription
0File’s section (a range of actual bytes in file) +
1+Reserved. +

+ +

The defined record types for a fractal heap client are: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
0Fractal heap “single” section +
1Fractal heap “first row” section +
2Fractal heap “normal row” section +
3Fractal heap “indirect” section +
4+Reserved. +

+ +

Record Set #N Section #K Data

+

This is the section-type specific information for each record + in the record set, described below. +

+

Checksum

+

This is the checksum for the Free-space Section List. +

+
+
+ +
+

+ The section-type specific data for each free-space section record is + described below: +

+ +
+ + + + + + +
+ File’s Section Data Record +
No additional record data stored
+
+ +
+
+
+ + + + + + +
+ Fractal Heap “Single” Section Data Record +
No additional record data stored
+
+ +
+
+
+ + + + + + +
+ Fractal Heap “First Row” Section Data Record +
Same format as “indirect” section data
+
+ +
+
+
+ + + + + + +
+ Fractal Heap “Normal Row” Section Data Record +
No additional record data stored
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Fractal Heap “Indirect” Section Data Record +
bytebytebytebyte
Fractal Heap Indirect Block Offset (variable size)
Block Start RowBlock Start Column
Number of BlocksThis space inserted only to align table nicely
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Fractal Heap Block Offset

+

The offset of the indirect block in the fractal heap’s address + space containing the empty blocks. +

+

+ The number of bytes used to encode this field is the minimum + number of bytes needed to encode values for the Maximum + Heap Size (in the fractal heap’s header). +

+

Block Start Row

+

This is the row that the empty blocks start in. +

+

Block Start Column

+

This is the column that the empty blocks start in. +

+

Number of Blocks

+

This is the number of empty blocks covered by the section. +

+
+
+ +
+

+III.H. Disk Format: Level 1H - Shared Object Header Message Table

+ +

+ The shared object header message table is used to locate + object + header messages that are shared between two or more object headers + in the file. Shared object header messages are stored and indexed + in the file in one of two ways: indexed sequentially in a + shared header message list or indexed with a v2 B-tree. + The shared messages themselves are either stored in a fractal + heap (when two or more objects share the message), or remain in an + object’s header (when only one object uses the message currently, + but the message can be shared in the future). +

+ +

+ The shared object header message table + contains a list of shared message index headers. Each index header + records information about the version of the index format, the index + storage type, flags for the message types indexed, the number of + messages in the index, the address where the index resides, + and the fractal heap address if shared messages are stored there. +

+ +

+ Each index can be either a list or a v2 B-tree and may transition + between those two forms as the number of messages in the index + varies. Each shared message record contains information used to + locate the shared message from either a fractal heap or an object + header. The types of messages that can be shared are: Dataspace, + Datatype, Fill Value, Filter Pipeline and Attribute. +

+ +

+ The shared object header message table is pointed to + from a shared message table message + in the superblock extension for a file. This message stores the + version of the table format, along with the number of index headers + in the table. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Object Header Message Table +
bytebytebytebyte
Signature
Version for index #0Index Type for index #0Message Type Flags for index #0
Minimum Message Size for index #0
List Cutoff for index #0v2 B-tree Cutoff for index #0
Number of Messages for index #0This space inserted only to align table nicely

Index AddressO for index #0


Fractal Heap AddressO for index #0

...
...
Version for index #N-1Index Type for index #N-1Message Type Flags for index #N-1
Minimum Message Size for index #N-1
List Cutoff for index #N-1v2 B-tree Cutoff for index #N-1
Number of Messages for index #N-1This space inserted only to align table nicely

Index AddressO for index #N-1


Fractal Heap AddressO for index #N-1

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “SMTB” is used to + indicate the beginning of the Shared Object Header Message table. + This gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version for index #N

+

This is the version number for the list of shared object header message + indexes and this document describes version 0.

+

Index Type for index #N

+

The type of index can be an unsorted list or a v2 B-tree. +

+

Message Type Flags for index #N

+

This field indicates the type of messages tracked in the index, + as follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0If set, the index tracks Dataspace Messages. +
1If set, the message tracks Datatype Messages. +
2If set, the message tracks Fill Value Messages. +
3If set, the message tracks Filter Pipeline Messages. +
4If set, the message tracks Attribute Messages. +
5-15Reserved (zero). +

+ + +

+ An index can track more than one type of message, but each type + of message can only by in one index. +

+

Minimum Message Size for index #N

+

This is the message size sharing threshold for the index. + If the encoded size of the message is less than this value, the + message is not shared. +

+

List Cutoff for index #N

+

This is the cutoff value for the indexing of messages to + switch from a list to a v2 B-tree. If the number of messages + is greater than this value, the index should be a v2 B-tree. +

+

v2 B-tree Cutoff for index #N

+

This is is the cutoff value for the indexing of messages to + switch from a v2 B-tree back to a list. If the number of + messages is less than this value, the index should be a list. +

+

Number of Messages for index #N

+

The number of shared messages being tracked for the index. +

+

Index Address for index #N

+

This field is the address of the list or v2 B-tree where the + index nodes reside. +

+

Fractal Heap Address for index #N

+

This field is the address of the fractal heap if shared messages + are stored there. +

+

Checksum

+

This is the checksum for the table.

+
+
+ +
+

+ Shared messages are indexed either with a shared message record + list, described below, or using a v2 B-tree (using record type 7). + The number of records in the shared message record list is + determined in the index’s entry in the shared object header message + table. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Message Record List +
bytebytebytebyte
Signature
Shared Message Record #0
Shared Message Record #1
...
Shared Message Record #N-1
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “SMLI” is used to + indicate the beginning of a list of index nodes. + This gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Shared Message Record #N

+

The record for locating the shared message, either in the + fractal heap for the index, or an object header (see format for + index nodes below). +

+

Checksum

+

This is the checksum for the list. +

+
+
+ +
+

+ The record for each shared message in an index is stored in one of the + following forms: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Message Record, for messages stored in a fractal heap +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash Value
Reference Count

Fractal Heap ID

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Message Location

+

This has a value of 0 indicating that the message is stored in + the heap. +

+

Hash Value

+

This is the hash value for the message. +

+

Reference Count

+

This is the number of times the message is used in the file. +

+

Fractal Heap ID

+

This is an 8-byte fractal heap ID for the message as stored in + the fractal heap for the index. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Message Record, for messages stored in an object header +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash Value
ReservedMessage TypeCreation Index

Object Header AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Message Location

+

This has a value of 1 indicating that the message is stored in + an object header. +

+

Hash Value

+

This is the hash value for the message. +

+

Message Type

+

This is the message type in the object header. +

+

Creation Index

+

This is the creation index of the message within the object + header. +

+

Object Header Address

+

This is the address of the object header where the message is + located. +

+
+
+ + + +
+
+
+

+IV. Disk Format: Level 2 - Data Objects

+ +

Data objects contain the “real” user-visible information in the file. + These objects compose the scientific data and other information which + are generally thought of as “data” by the end-user. All the + other information in the file is provided as a framework for + storing and accessing these data objects. +

+ +

A data object is composed of header and data + information. The header information contains the information + needed to interpret the data information for the object as + well as additional “metadata” or pointers to additional + “metadata” used to describe or annotate each object. +

+ +
+

+IV.A. Disk Format: Level 2A - Data Object Headers

+ +

The header information of an object is designed to encompass + all of the information about an object, except for the data itself. + This information includes the dataspace, the datatype, information + about how the data is stored on disk (in external files, compressed, + broken up in blocks, and so on), as well as other information used + by the library to speed up access to the data objects or maintain + a file’s integrity. Information stored by user applications + as attributes is also stored in the object’s header. The header + of each object is not necessarily located immediately prior to the + object’s data in the file and in fact may be located in any + position in the file. The order of the messages in an object header + is not significant.

+ +

Object headers are composed of a prefix and a set of messages. The + prefix contains the information needed to interpret the messages and + a small amount of metadata about the object, and the messages contain + the majority of the metadata about the object. +

+ +
+

+IV.A.1. Disk Format: Level 2A1 - Data Object Header Prefix

+ +
+

+IV.A.1.a. Version 1 Data Object Header Prefix

+ +

Header messages are aligned on 8-byte boundaries for version 1 + object headers. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 1 Object Header +
bytebytebytebyte
VersionReserved (zero)Total Number of Header Messages
Object Reference Count
Object Header Size
Header Message Type #1Size of Header Message Data #1
Header Message #1 FlagsReserved (zero)

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #n
Header Message #n FlagsReserved (zero)

Header Message Data #n

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

This value is used to determine the format of the + information in the object header. When the format of the + object header is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + is version one (1) (there was no version zero (0)) of the + object header. +

+

Total Number of Header Messages

+

This value determines the total number of messages listed in + object headers for this object. This value includes the messages + in continuation messages for this object. +

+

Object Reference Count

+

This value specifies the number of “hard links” to this object + within the current file. References to the object from external + files, “soft links” in this file and object references in this + file are not tracked. +

+

Object Header Size

+

This value specifies the number of bytes of header message data + following this length field that contain object header messages + for this object header. This value does not include the size of + object header continuation blocks for this object elsewhere in the + file. +

+

Header Message #n Type

+

This value specifies the type of information included in the + following header message data. The message types for + header messages are defined in sections below. +

+

Size of Header Message #n Data

+

This value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size includes + padding bytes to make the message a multiple of eight + bytes. +

+

Header Message #n Flags

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, the message data is constant. This is used + for messages like the datatype message of a dataset. +
1If set, the message is shared and stored + in another location than the object header. The Header + Message Data field contains a Shared Message + (described in the Data Object Header Messages + section below) + and the Size of Header Message Data field + contains the size of that Shared Message. +
2If set, the message should not be shared. +
3If set, the HDF5 decoder should fail to open this object + if it does not understand the message’s type and the file + is open with permissions allowing write access to the file. + (Normally, unknown messages can just be ignored by HDF5 + decoders) +
4If set, the HDF5 decoder should set bit 5 of this + message’s flags (in other words, this bit field) + if it does not understand the message’s type + and the object is modified in any way. (Normally, + unknown messages can just be ignored by HDF5 + decoders) +
5If set, this object was modified by software that did not + understand this message. + (Normally, unknown messages should just be ignored by HDF5 + decoders) (Can be used to invalidate an index or a similar + feature) +
6If set, this message is shareable. +
7If set, the HDF5 decoder should always fail to open this + object if it does not understand the message’s type (whether + it is open for read-only or read-write access). (Normally, + unknown messages can just be ignored by HDF5 decoders) +

+ +

Header Message #n Data

+

The format and length of this field is determined by the + header message type and size respectively. Some header + message types do not require any data and this information + can be eliminated by setting the length of the message to + zero. The data is padded with enough zeroes to make the + size a multiple of eight. +

+
+
+ +
+

+IV.A.1.b. Version 2 Data Object Header Prefix

+ +

Note that the “total number of messages” field has been dropped from + the data object header prefix in this version. The number of messages + in the data object header is just determined by the messages encountered + in all the object header blocks.

+ +

Note also that the fields and messages in this version of data object + headers have no alignment or padding bytes inserted - they are + stored packed together.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 Object Header +
bytebytebytebyte
Signature
VersionFlagsThis space inserted only to align table nicely
Access time (optional)
Modification Time (optional)
Change Time (optional)
Birth Time (optional)
Maximum # of compact attributes (optional)Minimum # of dense attributes (optional)
Size of Chunk #0 (variable size)This space inserted only to align table nicely
Header Message Type #1Size of Header Message Data #1Header Message #1 Flags
Header Message #1 Creation Order (optional)This space inserted only to align table nicely

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #nHeader Message #n Flags
Header Message #n Creation Order (optional)This space inserted only to align table nicely

Header Message Data #n

Gap (optional, variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “OHDR” + is used to indicate the + beginning of an object header. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

This field has a value of 2 indicating version 2 of the object header. +

+

Flags

+

This field is a bit field indicating additional information + about the object header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bit(s)Description
0-1This two bit field determines the size of the + Size of Chunk #0 field. The values are: + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0The Size of Chunk #0 field is 1 byte. +
1The Size of Chunk #0 field is 2 bytes. +
2The Size of Chunk #0 field is 4 bytes. +
3The Size of Chunk #0 field is 8 bytes. +

+
2If set, attribute creation order is tracked.
3If set, attribute creation order is indexed.
4If set, non-default attribute storage phase change + values are stored.
5If set, access, modification, change and birth times + are stored.
6-7Reserved

+ +

Access Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object’s raw data was last accessed + (in other words, read or written). +

+

This field is present if bit 5 of flags is set. +

+

Modification Time

+

This 32-bit value represents the number of seconds after + the UNIX epoch when the object’s raw data was last + modified (in other words, written). +

+

This field is present if bit 5 of flags is set. +

+

Change Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object’s metadata was last changed. +

+

This field is present if bit 5 of flags is set. +

+

Birth Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object was created. +

+

This field is present if bit 5 of flags is set. +

+

Maximum # of compact attributes

+

This is the maximum number of attributes to store in the compact + format before switching to the indexed format. +

+

This field is present if bit 4 of flags is set. +

+

Minimum # of dense attributes

+

This is the minimum number of attributes to store in the indexed + format before switching to the compact format. +

+

This field is present if bit 4 of flags is set. +

+

Size of Chunk #0

+

+ This unsigned value specifies the number of bytes of header + message data following this field that contain object header + information. +

+

+ This value does not include the size of object header + continuation blocks for this object elsewhere in the file. +

+

+ The length of this field varies depending on bits 0 and 1 of + the flags field. +

+

Header Message #n Type

+

Same format as version 1 of the object header, described above. +

+

Size of Header Message #n Data

+

This value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size of messages + in this version does not include any padding bytes. +

+

Header Message #n Flags

+

Same format as version 1 of the object header, described above. +

+

Header Message #n Creation Order

+

This field stores the order that a message of a given type + was created in. +

+

This field is present if bit 2 of flags is set. +

+

Header Message #n Data

+

Same format as version 1 of the object header, described above. +

+

Gap

+

A gap in an object header chunk is inferred by the end of the + messages for the chunk before the beginning of the chunk’s + checksum. Gaps are always smaller than the size of an + object header message prefix (message type + message size + + message flags). +

+

Gaps are formed when a message (typically an attribute message) + in an earlier chunk is deleted and a message from a later + chunk that does not quite fit into the free space is moved + into the earlier chunk. +

+

Checksum

+

This is the checksum for the object header chunk. +

+
+
+ +

The header message types and the message data associated with + them compose the critical “metadata” about each object. Some + header messages are required for each object while others are + optional. Some optional header messages may also be repeated + several times in the header itself, the requirements and number + of times allowed in the header will be noted in each header + message description below. +

+ + +
+

+IV.A.2. Disk Format: Level 2A2 - Data Object Header Messages

+ +

Data object header messages are small pieces of metadata that are + stored in the data object header for each object in an HDF5 file. + Data object header messages provide the metadata required to describe + an object and its contents, as well as optional pieces of metadata + that annotate the meaning or purpose of the object. +

+ +

Data object header messages are either stored directly in the data + object header for the object or are shared between multiple objects + in the file. When a message is shared, a flag in the Message Flags + indicates that the actual Message Data + portion of that message is stored in another location (such as another + data object header, or a heap in the file) and the Message Data + field contains the information needed to locate the actual information + for the message. +

+ +

+ The format of shared message data is described here:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Message (Version 1) +
bytebytebytebyte
VersionTypeReserved (zero)
Reserved (zero)

AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number is used when there are changes in the format + of a shared object message and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6.1. +

+

Type

The type of shared message location: + + + + + + + + + + +
ValueDescription
0Message stored in another object’s header (a committed + message). +

+

Address

The address of the object header + containing the message to be shared.

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Shared Message (Version 2) +
bytebytebytebyte
VersionTypeThis space inserted only to align table nicely

AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number is used when there are changes in the format + of a shared object message and is described here: + + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.1 and after. +

+

Type

The type of shared message location: + + + + + + + + + + +
ValueDescription
0Message stored in another object’s header (a committed + message). +

+

Address

The address of the object header + containing the message to be shared.

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Shared Message (Version 3) +
bytebytebytebyte
VersionTypeThis space inserted only to align table nicely
Location (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number indicates changes in the format of shared + object message and is described here: + + + + + + + + + + +
VersionDescription
3Used by the library of version 1.8 and after. In this + version, the Type field can indicate that + the message is stored in the fractal heap. +

+

Type

The type of shared message location: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Message is not shared and is not shareable. +
1Message stored in file’s shared object header message + heap (a shared message). +
2Message stored in another object’s header (a committed + message). +
3Message stored is not shared, but is sharable. +

+

Location

This field contains either a Size of Offsets-bytes + address of the object header + containing the message to be shared, or an 8-byte fractal heap ID + for the message in the file’s shared object header message + heap. +

+
+
+ + +

The following is a list of currently defined header messages: +

+ +
+

IV.A.2.a. The NIL Message

+ + +
+ + + + + + + + +
Header Message Name: NIL
Header Message Type: 0x0000
Length: Varies
Status: Optional; may be repeated.
Description:The NIL message is used to indicate a message which is to be + ignored when reading the header messages for a data object. + [Possibly one which has been deleted for some reason.] +
Format of Data: Unspecified
+ + + +
+

IV.A.2.b. The Dataspace Message

+ + +
+ + + + + + + + + + +
Header Message Name: Dataspace
Header Message Type: 0x0001
Length: Varies according to the number of + dimensions, as described in the following table.
Status: Required for dataset objects; + may not be repeated.
Description:The dataspace message describes the number of dimensions (in + other words, “rank”) and size of each dimension that + the data object has. This message is only used for datasets which + have a simple, rectilinear, array-like layout; datasets requiring + a more complex layout are not yet supported. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Dataspace Message - Version 1 +
bytebytebytebyte
VersionDimensionalityFlagsReserved
Reserved

Dimension #1 SizeL

.
.
.

Dimension #n SizeL


Dimension #1 Maximum SizeL (optional)

.
.
.

Dimension #n Maximum SizeL (optional)


Permutation Index #1L (optional)

.
.
.

Permutation Index #nL (optional)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

This value is used to determine the format of the + Dataspace Message. When the format of the + information in the message is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + document describes version one (1) (there was no version + zero (0)). +

+

Dimensionality

+

This value is the number of dimensions that the data + object has. +

+

Flags

+

This field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. Bit 1 is used to indicate that + permutation indices are present. +

+

Dimension #n Size

+

This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Dimension #n Maximum Size

+

This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + “unlimited” size which indicates + that the data may expand along this dimension indefinitely. + If these values are not stored, the maximum size of each + dimension is assumed to be the dimension’s current size. +

+

Permutation Index #n

+

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. If these values are + not stored, the first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+
+
+ + + +
+

Version 2 of the dataspace message dropped the optional + permutation index value support, as it was never implemented in the + HDF5 Library:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Dataspace Message - Version 2 +
bytebytebytebyte
VersionDimensionalityFlagsType

Dimension #1 SizeL

.
.
.

Dimension #n SizeL


Dimension #1 Maximum SizeL (optional)

.
.
.

Dimension #n Maximum SizeL (optional)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

This value is used to determine the format of the + Dataspace Message. This field should be ‘2’ for version 2 + format messages. +

+

Dimensionality

+

This value is the number of dimensions that the data object has. +

+

Flags

+

This field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. +

+

Type

+

This field indicates the type of the dataspace: + + + + + + + + + + + + + + + + + + +
ValueDescription
0A scalar dataspace; in other words, + a dataspace with a single, dimensionless element. +
1A simple dataspace; in other words, + a dataspace with a rank > 0 and an appropriate # of + dimensions. +
2A null dataspace; in other words, + a dataspace with no elements. +

+

Dimension #n Size

+

This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Dimension #n Maximum Size

+

This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + “unlimited” size which indicates + that the data may expand along this dimension indefinitely. + If these values are not stored, the maximum size of each + dimension is assumed to be the dimension’s current size. +

+
+
+ + + + + +
+

IV.A.2.c. The Link Info Message

+ + +
+ + + + + + + + +
Header Message Name: Link Info
Header Message Type: 0x002
Length: Varies
Status: Optional; may not be + repeated.
Description:The link info message tracks variable information about the + current state of the links for a “new style” + group’s behavior. Variable information will be stored in + this message and constant information will be stored in the + Group Info message. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Link Info +
bytebytebytebyte
VersionFlagsThis space inserted only to align table nicely

Maximum Creation Index (8 bytes, optional)


Fractal Heap AddressO


Address of v2 B-tree for Name IndexO


Address of v2 B-tree for Creation Order IndexO (optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number for this message. This document describes + version 0.

+

Flags

This field determines various optional aspects of the link + info message: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, creation order for the links is tracked. +
1If set, creation order for the links is indexed. +
2-7Reserved

+ +

Maximum Creation Index

This 64-bit value is the maximum creation order index value + stored for a link in this group.

+

This field is present if bit 0 of flags is set.

+

Fractal Heap Address

+

+ This is the address of the fractal heap to store dense links. + Each link stored in the fractal heap is stored as a + Link Message. +

+

+ If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

Address of v2 B-tree for Name Index

This is the address of the version 2 B-tree to index names of links.

+

If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

Address of v2 B-tree for Creation Order Index

This is the address of the version 2 B-tree to index creation order of links.

+

If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

This field exists if bit 1 of flags is set.

+
+
+ + +
+

IV.A.2.d. The Datatype Message

+ + +
+ + + + + + + + +
Header Message Name: Datatype
Header Message Type: 0x0003 +
Length: Variable
Status: Required for dataset or committed + datatype (formerly named datatype) objects; may not be repeated. +
Description:

The datatype message defines the datatype for each element + of a dataset or a common datatype for sharing between multiple + datasets. A datatype can describe an atomic type like a fixed- + or floating-point type or more complex types like a C struct + (compound datatype), array (array datatype) or C++ vector + (variable-length datatype).

+

Datatype messages that are part of a dataset object do not + describe how elements are related to one another; the dataspace + message is used for that purpose. Datatype messages that are part of + a committed datatype (formerly named datatype) message describe + a common datatype that can be shared by multiple datasets in the + file.

+
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Datatype Message +
bytebytebytebyte
Class and VersionClass Bit Field, Bits 0-7Class Bit Field, Bits 8-15Class Bit Field, Bits 16-23
Size


Properties


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Class and Version

+

The version of the datatype message and the datatype’s class + information are packed together in this field. The version + number is packed in the top 4 bits of the field and the class + is contained in the bottom 4 bits. +

+

The version number information is used for changes in the + format of the datatype message and is described here: + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Used by early versions of the library to encode + compound datatypes with explicit array fields. + See the compound datatype description below for + further details. +
2Used when an array datatype needs to be encoded. +
3Used when a VAX byte-ordered type needs to be + encoded. Packs various other datatype classes more + efficiently also. +

+ +

The class of the datatype determines the format for the class + bit field and properties portion of the datatype message, which + are described below. The + following classes are currently defined: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Fixed-Point
1Floating-Point
2Time
3String
4Bit field
5Opaque
6Compound
7Reference
8Enumerated
9Variable-Length
10Array

+ +

Class Bit Fields

+

The information in these bit fields is specific to each datatype + class and is described below. All bits not defined for a + datatype class are set to zero. +

+

Size

+

The size of a datatype element in bytes. +

+

Properties

+

This variable-sized sequence of bytes encodes information + specific to each datatype class and is described for each class + below. If there is no property information specified for a + datatype class, the size of this field is zero bytes. +

+
+
+ + +
+

Class specific information for Fixed-Point Numbers (Class 0):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fixed-point Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1, 2

Padding type. Bit 1 is the lo_pad bit and bit 2 + is the hi_pad bit. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.

3

Signed. If this bit is set then the fixed-point + number is in 2’s complement form.

4-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + +
+ Fixed-Point Property Description +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the fixed-point + value within the datatype. The bit offset specifies the number + of bits “to the right of” the value (which are set to the + lo_pad bit value). +

+

Bit Precision

+

The number of bits of precision of the fixed-point value + within the datatype. This value, combined with the datatype + element’s size and the Bit Offset field specifies the number + of bits “to the left of” the value (which are set to the + hi_pad bit value). +

+
+
+ + +
+

Class specific information for Floating-Point Numbers (Class 1):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Floating-Point Bit Field Description +
BitsMeaning

0, 6

Byte Order. These two non-contiguous bits specify the + “endianness” of the bytes in the datatype element. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bit 6Bit 0Description
00Byte order is little-endian +
01Byte order is big-endian +
10Reserved +
11Byte order is VAX-endian +

+

1, 2, 3

Padding type. Bit 1 is the low bits pad type, bit 2 + is the high bits pad type, and bit 3 is the internal bits + pad type. If a datum has unused bits at either end or between + the sign bit, exponent, or mantissa, then the value of bit + 1, 2, or 3 is copied to those locations.

4-5

Mantissa Normalization. This 2-bit bit field specifies + how the most significant bit of the mantissa is managed. + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0No normalization +
1The most significant bit of the mantissa is always set + (except for 0.0). +
2The most significant bit of the mantissa is not stored, + but is implied to be set. +
3Reserved. +

+

7

Reserved (zero).

8-15

Sign Location. This is the bit position of the sign + bit. Bits are numbered with the least significant bit zero.

16-23

Reserved (zero).

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Floating-Point Property Description +
ByteByteByteByte
Bit OffsetBit Precision
Exponent LocationExponent SizeMantissa LocationMantissa Size
Exponent Bias
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the floating-point + value within the datatype. The bit offset specifies the number + of bits “to the right of” the value. +

+

Bit Precision

+

The number of bits of precision of the floating-point value + within the datatype. +

+

Exponent Location

+

The bit position of the exponent field. Bits are numbered with + the least significant bit number zero. +

+

Exponent Size

+

The size of the exponent field in bits. +

+

Mantissa Location

+

The bit position of the mantissa field. Bits are numbered with + the least significant bit number zero. +

+

Mantissa Size

+

The size of the mantissa field in bits. +

+

Exponent Bias

+

The bias of the exponent field. +

+
+
+ + +
+

Class specific information for Time (Class 2):

+ + +
+ + + + + + + + + + + + + + + + + +
+ Time Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + +
+ Time Property Description +
ByteByte
Bit Precision
+
+ +
+
+ + + + + + + + + + + +
Field NameDescription

Bit Precision

+

The number of bits of precision of the time value. +

+
+
+ + +
+

Class specific information for Strings (Class 3):

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ String Bit Field Description +
BitsMeaning

0-3

Padding type. This four-bit value determines the + type of padding to use for the string. The values are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null Terminate: A zero byte marks the end of the + string and is guaranteed to be present after + converting a long string to a short string. When + converting a short string to a long string the value is + padded with additional null characters as necessary. +
1Null Pad: Null characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. +
2Space Pad: Space characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +

+

4-7

Character Set. The character set used to + encode the string. + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
2-15Reserved +

+

8-23

Reserved (zero).

+
+ +

There are no properties defined for the string class. +

+ + +

Class specific information for bit fields (Class 4):

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Bitfield Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1, 2

Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.

3-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + +
+ Bit Field Property Description +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the bit field + within the datatype. The bit offset specifies the number + of bits “to the right of” the value. +

+

Bit Precision

+

The number of bits of precision of the bit field + within the datatype. +

+
+
+ + +
+

Class specific information for Opaque (Class 5):

+ +
+ + + + + + + + + + + + + + + + + +
+ Opaque Bit Field Description +
BitsMeaning

0-7

Length of ASCII tag in bytes.

8-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + +
+ Opaque Property Description +
ByteByteByteByte

ASCII Tag
+
+
+ +
+
+ + + + + + + + + + +
Field NameDescription

ASCII Tag

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+
+
+ + +
+

Class specific information for Compound (Class 6):

+ +
+ + + + + + + + + + + + + + + + + +
+ Compound Bit Field Description +
BitsMeaning

0-15

Number of Members. This field contains the number + of members defined for the compound datatype. The member + definitions are listed in the Properties field of the data + type message.

16-23

Reserved (zero).

+
+ + +

The Properties field of a compound datatype is a list of the + member definitions of the compound datatype. The member + definitions appear one after another with no intervening bytes. + The member types are described with a (recursively) encoded datatype + message.

+ +

Note that the property descriptions are different for different + versions of the datatype version. Additionally note that the version + 0 datatype encoding is deprecated and has been replaced with later + encodings in versions of the HDF5 Library from the 1.4 release + onward.

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Compound Properties Description for Datatype Version 1 +
ByteByteByteByte

Name

Byte Offset of Member
DimensionalityReserved (zero)
Dimension Permutation
Reserved (zero)
Dimension #1 Size (required)
Dimension #2 Size (required)
Dimension #3 Size (required)
Dimension #4 Size (required)

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Name

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+

Byte Offset of Member

+

This is the byte offset of the member within the datatype. +

+

Dimensionality

+

If set to zero, this field indicates a scalar member. If set + to a value greater than zero, this field indicates that the + member is an array of values. For array members, the size of + the array is indicated by the ‘Size of Dimension n’ field in + this message. +

+

Dimension Permutation

+

This field was intended to allow an array field to have + its dimensions permuted, but this was never implemented. + This field should always be set to zero. +

+

Dimension #n Size

+

This field is the size of a dimension of the array field as + stored in the file. The first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+

Member Type Message

+

This field is a datatype message describing the datatype of + the member. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Compound Properties Description for Datatype Version 2 +
ByteByteByteByte

Name

Byte Offset of Member

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Name

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+

Byte Offset of Member

+

This is the byte offset of the member within the datatype. +

+

Member Type Message

+

This field is a datatype message describing the datatype of + the member. +

+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Compound Properties Description for Datatype Version 3 +
ByteByteByteByte

Name

Byte Offset of Member (variable size)

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Name

This NUL-terminated string provides a description for the + opaque type. It is not NUL-padded to a multiple of 8 + bytes.

Byte Offset of Member

This is the byte offset of the member within the datatype. + The field size is the minimum number of bytes necessary, + based on the size of the datatype element. For example, a + datatype element size of less than 256 bytes uses a 1 byte + length, a datatype element size of 256-65535 bytes uses a + 2 byte length, and so on.

Member Type Message

This field is a datatype message describing the datatype of + the member.

+
+ + +
+

Class specific information for Reference (Class 7):

+ +
+ + + + + + + + + + + + + + + + + +
+ Reference Bit Field Description +
BitsMeaning

0-3

Type. This four-bit value contains the type of reference + described. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Object Reference: A reference to another object in this + HDF5 file. +
1Dataset Region Reference: A reference to a region within + a dataset in this HDF5 file. +
2-15Reserved +

+ +

4-23

Reserved (zero).

+
+ +

There are no properties defined for the reference class. +

+ + +
+

Class specific information for Enumeration (Class 8):

+ +
+ + + + + + + + + + + + + + + + + +
+ Enumeration Bit Field Description +
BitsMeaning

0-15

Number of Members. The number of name/value + pairs defined for the enumeration type.

16-23

Reserved (zero).

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Enumeration Property Description for Datatype Versions 1 & 2 +
ByteByteByteByte

Base Type


Names


Values

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Base Type

+

Each enumeration type is based on some parent type, usually an + integer. The information for that parent type is described + recursively by this field. +

+

Names

+

The name for each name/value pair. Each name is stored as a null + terminated ASCII string in a multiple of eight bytes. The names + are in no particular order. +

+

Values

+

The list of values in the same order as the names. The values + are packed (no inter-value padding) and the size of each value + is determined by the parent type. +

+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Enumeration Property Description for Datatype Version 3 +
ByteByteByteByte

Base Type


Names


Values

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Base Type

+

Each enumeration type is based on some parent type, usually an + integer. The information for that parent type is described + recursively by this field. +

+

Names

+

The name for each name/value pair. Each name is stored as a null + terminated ASCII string, not padded to a multiple of + eight bytes. The names are in no particular order. +

+

Values

+

The list of values in the same order as the names. The values + are packed (no inter-value padding) and the size of each value + is determined by the parent type. +

+
+
+ + + +
+

Class specific information for Variable-Length (Class 9):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Variable-Length Bit Field Description +
BitsMeaning

0-3

Type. This four-bit value contains the type of + variable-length datatype described. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Sequence: A variable-length sequence of any datatype. + Variable-length sequences do not have padding or + character set information. +
1String: A variable-length sequence of characters. + Variable-length strings have padding and character set + information. +
2-15Reserved +

+ +

4-7

Padding type. (variable-length string only) + This four-bit value determines the type of padding + used for variable-length strings. The values are the same + as for the string padding type, as follows: + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null terminate: A zero byte marks the end of a string + and is guaranteed to be present after converting a long + string to a short string. When converting a short string + to a long string, the value is padded with additional null + characters as necessary. +
1Null pad: Null characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. +
2Space pad: Space characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +

+ +

This value is set to zero for variable-length sequences.

+ +

8-11

Character Set. (variable-length string only) + This four-bit value specifies the character set + to be used for encoding the string: + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
2-15Reserved +

+ +

This value is set to zero for variable-length sequences.

+ +

12-23

Reserved (zero).

+
+ +
+
+
+ + + + + + + + + + + + + + +
+ Variable-Length Property Description +
ByteByteByteByte

Base Type

+
+ +
+
+ + + + + + + + + + + +
Field NameDescription

Base Type

+

Each variable-length type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ + +
+

Class specific information for Array (Class 10):

+ +

There are no bit fields defined for the array class. +

+ +

Note that the dimension information defined in the property for this + datatype class is independent of dataspace information for a dataset. + The dimension information here describes the dimensionality of the + information within a data element (or a component of an element, if the + array datatype is nested within another datatype) and the dataspace for a + dataset describes the size and locations of the elements in a dataset. +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Array Property Description for Datatype Version 2 +
ByteByteByteByte
DimensionalityReserved (zero)
Dimension #1 Size
.
.
.
Dimension #n Size
Permutation Index #1
.
.
.
Permutation Index #n

Base Type

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Dimensionality

+

This value is the number of dimensions that the array has. +

+

Dimension #n Size

+

This value is the size of the dimension of the array + as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Permutation Index #n

+

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. Currently, dimension + permutations are not supported, and these indices should + be set to the index position minus one. In other words, + the first dimension should be set to 0, the second dimension + should be set to 1, and so on. +

+

Base Type

+

Each array type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Array Property Description for Datatype Version 3 +
ByteByteByteByte
DimensionalityThis space inserted only to align table nicely
Dimension #1 Size
.
.
.
Dimension #n Size

Base Type

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Dimensionality

+

This value is the number of dimensions that the array has. +

+

Dimension #n Size

+

This value is the size of the dimension of the array + as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Base Type

+

Each array type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ + + +
+

IV.A.2.e. The Data Storage - +Fill Value (Old) Message

+ + +
+ + + + + + + + +
Header Message Name: Fill Value + (old)
Header Message Type: 0x0004
Length: Varies
Status: Optional; may not be + repeated.
Description:

The fill value message stores a single data value which + is returned to the application when an uninitialized data element + is read from a dataset. The fill value is interpreted with the + same datatype as the dataset. If no fill value message is present + then a fill value of all zero bytes is assumed.

+

This fill value message is deprecated in favor of the + “new” fill value message (Message Type 0x0005) and + is only written to the file for forward compatibility with + versions of the HDF5 Library before the 1.6.0 version. + Additionally, it only appears for datasets with a user-defined + fill value (as opposed to the library default fill value or an + explicitly set “undefined” fill value).

+
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Fill Value Message (Old) +
bytebytebytebyte
Size

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Size

+

This is the size of the Fill Value field in bytes. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. +

+
+
+ + +
+

IV.A.2.f. The Data Storage - +Fill Value Message

+ + +
+ + + + + + + + +
Header Message Name: Fill + Value
Header Message Type: 0x0005
Length: Varies
Status: Required for dataset objects; + may not be repeated.
Description:The fill value message stores a single data value which is + returned to the application when an uninitialized data element + is read from a dataset. The fill value is interpreted with the + same datatype as the dataset.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Fill Value Message - Versions 1 & 2 +
bytebytebytebyte
VersionSpace Allocation TimeFill Value Write TimeFill Value Defined
Size (optional)

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number information is used for changes in the + format of the fill value message and is described here: + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Initial version of this message. +
2In this version, the Size and Fill Value fields are + only present if the Fill Value Defined field is set + to 1. +
3This version packs the other fields in the message + more efficiently than version 2. +

+

+

Space Allocation Time

+

When the storage space for the dataset’s raw data will be + allocated. The allowed values are: + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Not used. +
1Early allocation. Storage space for the entire dataset + should be allocated in the file when the dataset is + created. +
2Late allocation. Storage space for the entire dataset + should not be allocated until the dataset is written + to. +
3Incremental allocation. Storage space for the + dataset should not be allocated until the portion + of the dataset is written to. This is currently + used in conjunction with chunked data storage for + datasets. +

+ +

Fill Value Write Time

+

At the time that storage space for the dataset’s raw data is + allocated, this value indicates whether the fill value should + be written to the raw data storage elements. The allowed values + are: + + + + + + + + + + + + + + + + + + +
ValueDescription
0On allocation. The fill value is always written to + the raw data storage when the storage space is allocated. +
1Never. The fill value should never be written to + the raw data storage. +
2Fill value written if set by user. The fill value + will be written to the raw data storage when the storage + space is allocated only if the user explicitly set + the fill value. If the fill value is the library + default or is undefined, it will not be written to + the raw data storage. +

+ +

Fill Value Defined

+

This value indicates if a fill value is defined for this + dataset. If this value is 0, the fill value is undefined. + If this value is 1, a fill value is defined for this dataset. + For version 2 or later of the fill value message, this value + controls the presence of the Size and Fill Value fields. +

+

Size

+

This is the size of the Fill Value field in bytes. This field + is not present if the Version field is greater than 1, + and the Fill Value Defined field is set to 0. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. This field is + not present if the Version field is greater than 1, + and the Fill Value Defined field is set to 0. +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Fill Value Message - Version 3 +
bytebytebytebyte
VersionFlagsThis space inserted only to align table nicely
Size (optional)

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number information is used for changes in the + format of the fill value message and is described here: + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Initial version of this message. +
2In this version, the Size and Fill Value fields are + only present if the Fill Value Defined field is set + to 1. +
3This version packs the other fields in the message + more efficiently than version 2. +

+ +

Flags

+

When the storage space for the dataset’s raw data will be + allocated. The allowed values are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0-1Space Allocation Time, with the same + values as versions 1 and 2 of the message. +
2-3Fill Value Write Time, with the same + values as versions 1 and 2 of the message. +
4Fill Value Undefined, indicating that the fill + value has been marked as “undefined” for this dataset. + Bits 4 and 5 cannot both be set. +
5Fill Value Defined, with the same values as + versions 1 and 2 of the message. + Bits 4 and 5 cannot both be set. +
6-7Reserved (zero). +

+ +

Size

+

This is the size of the Fill Value field in bytes. This field + is not present if the Version field is greater than 1, + and the Fill Value Defined flag is set to 0. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. This field is + not present if the Version field is greater than 1, + and the Fill Value Defined flag is set to 0. +

+
+
+ + +
+

IV.A.2.g. The Link Message

+ + +
+ + + + + + + + +
Header Message Name: Link
Header Message Type: 0x0006
Length: Varies
Status: Optional; may be + repeated.
Description:

This message encodes the information for a link in a + group’s object header, when the group is storing its links + “compactly”, or in the group’s fractal heap, + when the group is storing its links “densely”.

+

A group is storing its links compactly when the fractal heap + address in the Link Info + Message is set to the “undefined address” + value.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Link Message +
bytebytebytebyte
VersionFlagsLink type (optional)This space inserted only to align table nicely

Creation Order (8 bytes, optional)

Link Name Character Set (optional)Length of Link Name (variable size)This space inserted only to align table nicely
Link Name (variable size)

Link Information (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes version 1.

+

Flags

This field contains information about the link and controls + the presence of other fields below. + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0-1Determines the size of the Length of Link Name + field. + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0The size of the Length of Link Name + field is 1 byte. +
1The size of the Length of Link Name + field is 2 bytes. +
2The size of the Length of Link Name + field is 4 bytes. +
3The size of the Length of Link Name + field is 8 bytes. +
+
2Creation Order Field Present: if set, the Creation + Order field is present. If not set, creation order + information is not stored for links in this group. +
3Link Type Field Present: if set, the link is not + a hard link and the Link Type field is present. + If not set, the link is a hard link. +
4Link Name Character Set Field Present: if set, the + link name is not represented with the ASCII character + set and the Link Name Character Set field is + present. If not set, the link name is represented with + the ASCII character set. +
5-7Reserved (zero). +

+ +

Link type

This is the link class type and can be one of the following + values: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0A hard link (should never be stored in the file) +
1A soft link. +
2-63Reserved for future HDF5 internal use. +
64An external link. +
65-255Reserved, but available for user-defined link types. +

+ +

This field is present if bit 3 of Flags is set.

+

Creation Order

This 64-bit value is an index of the link’s creation time within + the group. Values start at 0 when the group is created an increment + by one for each link added to the group. Removing a link from a + group does not change existing links’ creation order field. +

+

This field is present if bit 2 of Flags is set.

+

Link Name Character Set

This is the character set for encoding the link’s name: + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding (this should never be stored + in the file) +
1UTF-8 character set encoding +

+ +

This field is present if bit 4 of Flags is set.

+

Length of link name

This is the length of the link’s name. The size of this field + depends on bits 0 and 1 of Flags.

+

Link name

This is the name of the link, non-NULL terminated.

+

Link information

The format of this field depends on the link type.

+

For hard links, the field is formatted as follows: + + + + + + +
Size of Offsets bytes:The address of the object header for the object that the + link points to. +
+

+ +

+ For soft links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of soft link value.
Length of soft link value bytes:A non-NULL-terminated string storing the value of the + soft link. +
+

+ +

+ For external links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of external link value.
Length of external link value bytes:The first byte contains the version number in the + upper 4 bits and flags in the lower 4 bits for the external + link. Both version and flags are defined to be zero in + this document. The remaining bytes consist of two + NULL-terminated strings, with no padding between them. + The first string is the name of the HDF5 file containing + the object linked to and the second string is the full path + to the object linked to, within the HDF5 file’s + group hierarchy. +
+

+ +

+ For user-defined links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of user-defined data.
Length of user-defined link value bytes:The data supplied for the user-defined link type.
+

+ +
+
+ +
+

IV.A.2.h. The Data Storage - +External Data Files Message

+ + +
+ + + + + + + + +
Header Message Name: External + Data Files
Header Message Type: 0x0007
Length: Varies
Status: Optional; may not be + repeated.
Description:The external data storage message indicates that the data + for an object is stored outside the HDF5 file. The filename of + the object is stored as a Universal Resource Location (URL) of + the actual filename containing the data. An external file list + record also contains the byte offset of the start of the data + within the file and the amount of space reserved in the file + for that data.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ External File List Message +
bytebytebytebyte
VersionReserved (zero)
Allocated SlotsUsed Slots

Heap AddressO


Slot Definitions...

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number information is used for changes in the format of + External Data Storage Message and is described here: + + + + + + + + + + + + + +
VersionDescription
0Never used.
1The current version used by the library.

+ +

Allocated Slots

+

The total number of slots allocated in the message. Its value must be at least as + large as the value contained in the Used Slots field. (The current library simply + uses the number of Used Slots for this message)

+

Used Slots

+

The number of initial slots which contains valid information.

+

Heap Address

+

This is the address of a local heap which contains the names for the external + files (The local heap information can be found in Disk Format Level 1D in this + document). The name at offset zero in the heap is always the empty string.

+

Slot Definitions

+

The slot definitions are stored in order according to the array addresses they + represent.

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ External File List Slot +
bytebytebytebyte

Name Offset in Local HeapL


Offset in External Data FileL


Data Size in External FileL

+ + + + + +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Name Offset in Local Heap

+

The byte offset within the local name heap for the name + of the file. File names are stored as a URL which has a + protocol name, a host name, a port number, and a file + name: + protocol:port//host/file. + If the protocol is omitted then “file:” is assumed. If + the port number is omitted then a default port for that + protocol is used. If both the protocol and the port + number are omitted then the colon can also be omitted. If + the double slash and host name are omitted then + “localhost” is assumed. The file name is the only + mandatory part, and if the leading slash is missing then + it is relative to the application’s current working + directory (the use of relative names is not + recommended). +

+

Offset in External Data File

+

This is the byte offset to the start of the data in the + specified file. For files that contain data for a single + dataset this will usually be zero.

+

Data Size in External File

+

This is the total number of bytes reserved in the + specified file for raw data storage. For a file that + contains exactly one complete dataset which is not + extendable, the size will usually be the exact size of the + dataset. However, by making the size larger one allows + HDF5 to extend the dataset. The size can be set to a value + larger than the entire file since HDF5 will read zeroes + past the end of the file without failing.

+
+
+ + +
+

IV.A.2.i. The Data Storage - Layout +Message

+ + +
+ + + + + + + + +
Header Message Name: Data Storage - + Layout
Header Message Type: 0x0008
Length: Varies
Status: Required for datasets; may not + be repeated.
Description:Data layout describes how the elements of a multi-dimensional + array are stored in the HDF5 file. Three types of data layout + are supported: +
    +
  1. Contiguous: The array is stored in one contiguous area of + the file. This layout requires that the size of the array be + constant: data manipulations such as chunking, compression, + checksums, or encryption are not permitted. The message stores + the total storage size of the array. The offset of an element + from the beginning of the storage area is computed as in a C + array.
  2. +
  3. Chunked: The array domain is regularly decomposed into + chunks, and each chunk is allocated and stored separately. This + layout supports arbitrary element traversals, compression, + encryption, and checksums. (these features are described + in other messages). The message stores the size of a chunk + instead of the size of the entire array; the storage size of + the entire array can be calculated by traversing the B-tree + that stores the chunk addresses.
  4. +
  5. Compact: The array is stored in one contiguous block, as + part of this object header message.
  6. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Data Layout Message (Versions 1 and 2) +
bytebytebytebyte
VersionDimensionalityLayout ClassReserved (zero)
Reserved (zero)

Data AddressO (optional)

Dimension 0 Size
Dimension 1 Size
...
Dimension #n Size
Dataset Element Size (optional)
Compact Data Size (optional)

Compact Data... (variable size, optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number information is used for changes in the format of the data + layout message and is described here: + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by version 1.4 and before of the library to encode layout information. + Data space is always allocated when the data set is created.
2Used by version 1.6.x of the library to encode layout information. + Data space is allocated only when it is necessary.

+

Dimensionality

An array has a fixed dimensionality. This field + specifies the number of dimension size fields later in the + message. The value stored for chunked storage is 1 greater than + the number of dimensions in the dataset’s dataspace. + For example, 2 is stored for a 1 dimensional dataset. +

+

Layout Class

The layout class specifies the type of storage for the data + and how the other fields of the layout message are to be + interpreted. + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Compact Storage +
1Contiguous Storage +
2Chunked Storage +
+

+

Data Address

For contiguous storage, this is the address of the raw + data in the file. For chunked storage this is the address + of the v1 B-tree that is used to look up the addresses of the + chunks. This field is not present for compact storage. + If the version for this message is greater than 1, the address + may have the “undefined address” value, to indicate that + storage has not yet been allocated for this array.

+

Dimension #n Size

For contiguous and compact storage the dimensions define + the entire size of the array while for chunked storage they define + the size of a single chunk. In all cases, they are in units of + array elements (not bytes). The first dimension stored in the list + of dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+

Dataset Element Size

The size of a dataset element, in bytes. This field is only + present for chunked storage. +

+

Compact Data Size

This field is only present for compact data storage. + It contains the size of the raw data for the dataset array, in + bytes.

+

Compact Data

This field is only present for compact data storage. + It contains the raw data for the dataset array.

+
+
+ +
+

Version 3 of this message re-structured the format into specific + properties that are required for each layout class.

+ + +
+ + + + + + + + + + + + + + + + + + + +
+ Data Layout Message (Version 3) +
bytebytebytebyte
VersionLayout ClassThis space inserted only to align table nicely

Properties (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

+

The version number information is used for changes in the format of layout message + and is described here: + + + + + + + + + + +
VersionDescription
3Used by the version 1.6.3 and later of the library to store properties + for each layout class.

+

Layout Class

The layout class specifies the type of storage for the data + and how the other fields of the layout message are to be + interpreted. + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Compact Storage +
1Contiguous Storage +
2Chunked Storage +
+

+

Properties

This variable-sized field encodes information specific to each + layout class and is described below. If there is no property + information specified for a layout class, the size of this field + is zero bytes.

+
+ +
+

Class-specific information for compact layout (Class 0): (Note: The dimensionality information + is in the Dataspace message)

+ + +
+ + + + + + + + + + + + + + + + + + +
+ Compact Storage Property Description +
bytebytebytebyte
SizeThis space inserted only to align table nicely

Raw Data... (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Size

This field contains the size of the raw data for the dataset + array, in bytes. +

+

Raw Data

This field contains the raw data for the dataset array.

+
+ + +
+

Class-specific information for contiguous layout (Class 1): (Note: The dimensionality information + is in the Dataspace message)

+ + +
+ + + + + + + + + + + + + + + + + +
+ Contiguous Storage Property Description +
bytebytebytebyte

AddressO


SizeL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Address

This is the address of the raw data in the file. + The address may have the “undefined address” value, to indicate + that storage has not yet been allocated for this array.

Size

This field contains the size allocated to store the raw data, + in bytes. +

+
+
+ + +
+

Class-specific information for chunked layout (Class 2):

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Chunked Storage Property Description +
bytebytebytebyte
DimensionalityThis space inserted only to align table nicely

AddressO

Dimension 0 Size
Dimension 1 Size
...
Dimension #n Size
Dataset Element Size
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Dimensionality

A chunk has a fixed dimensionality. This field specifies + the number of dimension size fields later in the message.

Address

This is the address of the v1 B-tree that is used to look up the + addresses of the chunks that actually store portions of the array + data. The address may have the “undefined address” value, to + indicate that storage has not yet been allocated for this array.

Dimension #n Size

These values define the dimension size of a single chunk, in + units of array elements (not bytes). The first dimension stored in + the list of dimensions is the slowest changing dimension and the + last dimension stored is the fastest changing dimension. +

+

Dataset Element Size

The size of a dataset element, in bytes. +

+
+
+ +
+

IV.A.2.j. The Bogus Message

+ + +
+ + + + + + + + +
Header Message Name: Bogus
Header Message Type: 0x0009
Length: 4 bytes
Status: For testing only; should never + be stored in a valid file.
Description:This message is used for testing the HDF5 Library’s + response to an “unknown” message type and should + never be encountered in a valid HDF5 file.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + +
+ Bogus Message +
bytebytebytebyte
Bogus Value
+
+ +
+
+ + + + + + + + + + +
Field NameDescription

Bogus Value

+

This value should always be: 0xdeadbeef.

+
+
+ +
+

IV.A.2.k. The Group Info Message +

+ + +
+ + + + + + + + +
Header Message Name: Group Info
Header Message Type: 0x000A
Length: Varies
Status: Optional; may not be + repeated.
Description:

This message stores information for the constants defining + a “new style” group’s behavior. Constant + information will be stored in this message and variable + information will be stored in the + Link Info message.

+

Note: the “estimated entry” information below is + used when determining the size of the object header for the + group when it is created.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Group Info Message +
bytebytebytebyte
VersionFlagsLink Phase Change: Maximum Compact Value (optional)
Link Phase Change: Minimum Dense Value (optional)Estimated Number of Entries (optional)
Estimated Link Name Length of Entries (optional)This space inserted only to align table nicely
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes version 0.

+

Flags

This is the group information flag with the following definition: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, link phase change values are stored. +
1If set, the estimated entry information is non-default + and is stored. +
2-7Reserved

+

Link Phase Change: Maximum Compact Value

The is the maximum number of links to store “compactly” (in + the group’s object header).

+

This field is present if bit 0 of Flags is set.

+

Link Phase Change: Minimum Dense Value

This is the minimum number of links to store “densely” (in + the group’s fractal heap). The fractal heap’s address is + located in the Link Info + message.

+

This field is present if bit 0 of Flags is set.

+

Estimated Number of Entries

This is the estimated number of entries in groups.

+

If this field is not present, the default value of 4 + will be used for the estimated number of group entries.

+

This field is present if bit 1 of Flags is set.

+

Estimated Link Name Length of Entries

This is the estimated length of entry name.

+

If this field is not present, the default value of 8 + will be used for the estimated link name length of group entries.

+

This field is present if bit 1 of Flags is set.

+
+
+

+ +
+

IV.A.2.l. The Data Storage - Filter +Pipeline Message

+ + +
+ + + + + + + + +
Header Message Name: + Data Storage - Filter Pipeline
Header Message Type: 0x000B
Length: Varies
Status: Optional; may not be + repeated.
Description:

This message describes the filter pipeline which should + be applied to the data stream by providing filter identification + numbers, flags, a name, and client data.

+

This message may be present in the object headers of both + dataset and group objects. For datasets, it specifies the + filters to apply to raw data. For groups, it specifies the + filters to apply to the group’s fractal heap. Currently, + only datasets using chunked data storage use the filter + pipeline on their raw data.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Pipeline Message - Version 1 +
bytebytebytebyte
VersionNumber of FiltersReserved (zero)
Reserved (zero)

Filter Description List (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This table + describes version 1.

Number of Filters

The total number of filters described in this + message. The maximum possible number of filters in a + message is 32.

Filter Description List

A description of each filter. A filter description + appears in the next table.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Description +
bytebytebytebyte
Filter Identification ValueName Length
FlagsNumber Client Data Values

Name (variable size, optional)


Client Data (variable size, optional)

Padding (variable size, optional)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Filter Identification Value

+

+ This value, often referred to as a filter identifier, + is designed to be a unique identifier for the filter. + Values from zero through 32,767 are reserved for filters + supported by The HDF Group in the HDF5 Library and for + filters requested and supported by third parties. + Filters supported by The HDF Group are documented immediately + below. Information on 3rd-party filters can be found at + The HDF Group’s + + Contributions page.

+ +

+ To request a filter identifier, please contact + The HDF Group’s Help Desk at + The HDF Group Help Desk. + You will be asked to provide the following information:

+
    +
  1. Contact information for the developer requesting the + new identifier
  2. +
  3. A short description of the new filter
  4. +
  5. Links to any relevant information, including licensing + information
  6. +
+

+ Values from 32768 to 65535 are reserved for non-distributed uses + (for example, internal company usage) or for application usage + when testing a feature. The HDF Group does not track or document + the use of the filters with identifiers from this range.

+ +

+ The filters currently in library version 1.8.0 are + listed below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentificationNameDescription
0N/AReserved
1deflateGZIP deflate compression
2shuffleData element shuffling
3fletcher32Fletcher32 checksum
4szipSZIP compression
5nbitN-bit packing
6scaleoffsetScale and offset encoded values
+

Name Length

Each filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.

Flags

The flags indicate certain properties for a filter. The + bit values defined so far are: + + + + + + + + + + + + + + + +
BitDescription
0If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently skipped in the pipeline.
1-15Reserved (zero)

+

Number of Client Data Values

Each filter can store integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.

Name

If the Name Length field is non-zero then it will + contain the size of this field, padded to a multiple of eight. This + field contains a null-terminated, ASCII character + string to serve as a comment/name for the filter.

Client Data

This is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the array.

Padding

Four bytes of zeroes are added to the message at this + point if the Client Data Number of Values field contains + an odd number.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ Filter Pipeline Message - Version 2 +
bytebytebytebyte
VersionNumber of FiltersThis space inserted only to align table nicely

Filter Description List (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This table + describes version 2.

Number of Filters

The total number of filters described in this + message. The maximum possible number of filters in a + message is 32.

Filter Description List

A description of each filter. A filter description + appears in the next table.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Filter Description +
bytebytebytebyte
Filter Identification ValueName Length (optional)
FlagsNumber Client Data Values

Name (variable size, optional)


Client Data (variable size, optional)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Filter Identification Value

+

+ This value, often referred to as a filter identifier, + is designed to be a unique identifier for the filter. + Values from zero through 32,767 are reserved for filters + supported by The HDF Group in the HDF5 Library and for + filters requested and supported by third parties. + Filters supported by The HDF Group are documented immediately + below. Information on 3rd-party filters can be found at + The HDF Group’s + + Contributions page.

+ +

+ To request a filter identifier, please contact + The HDF Group’s Help Desk at + The HDF Group Help Desk. + You will be asked to provide the following information:

+
    +
  1. Contact information for the developer requesting the + new identifier
  2. +
  3. A short description of the new filter
  4. +
  5. Links to any relevant information, including licensing + information
  6. +
+

+ Values from 32768 to 65535 are reserved for non-distributed uses + (for example, internal company usage) or for application usage + when testing a feature. The HDF Group does not track or document + the use of the filters with identifiers from this range.

+ +

+ The filters currently in library version 1.8.0 are + listed below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentificationNameDescription
0N/AReserved
1deflateGZIP deflate compression
2shuffleData element shuffling
3fletcher32Fletcher32 checksum
4szipSZIP compression
5nbitN-bit packing
6scaleoffsetScale and offset encoded values
+

Name Length

Each filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.

+

Filters with IDs less than 256 (in other words, filters + that are defined in this format documentation) do not store + the Name Length or Name fields. +

+

Flags

The flags indicate certain properties for a filter. The + bit values defined so far are: + + + + + + + + + + + + + + + +
BitDescription
0If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently skipped in the pipeline.
1-15Reserved (zero)

+

Number of Client Data Values

Each filter can store integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.

Name

If the Name Length field is non-zero then it will + contain the size of this field, not padded to a multiple + of eight. This field contains a non-null-terminated, + ASCII character string to serve as a comment/name for the filter. +

+

Filters that are defined in this format documentation + such as deflate and shuffle do not store the Name + Length or Name fields. +

+

Client Data

This is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the array.

+
+
+ +
+

IV.A.2.m. The Attribute Message

+ + +
+ + + + + + + + +
Header Message Name: Attribute
Header Message Type: 0x000C
Length: Varies
Status: Optional; may be + repeated.
Description:

The Attribute message is used to store objects + in the HDF5 file which are used as attributes, or + “metadata” about the current object. An attribute + is a small dataset; it has a name, a datatype, a dataspace, and + raw data. Since attributes are stored in the object header, they + should be relatively small (in other words, less than 64KB). + They can be associated with any type of object which has an + object header (groups, datasets, or committed (named) + datatypes).

+

In 1.8.x versions of the library, attributes can be larger + than 64KB. See the + + “Special Issues” section of the Attributes chapter + in the HDF5 User’s Guide for more information.

+

Note: Attributes on an object must have unique names: + the HDF5 Library currently enforces this by causing the + creation of an attribute with a duplicate name to fail. + Attributes on different objects may have the same name, + however.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message (Version 1) +
bytebytebytebyte
VersionReserved (zero)Name Size
Datatype SizeDataspace Size

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number information is used for changes in the format of the + attribute message and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6 to encode attribute message. + This version does not support shared datatypes.

+

Name Size

The length of the attribute name in bytes including the + null terminator. Note that the Name field below may + contain additional padding not represented by this + field.

Datatype Size

The length of the datatype description in the Datatype + field below. Note that the Datatype field may contain + additional padding not represented by this field.

Dataspace Size

The length of the dataspace description in the Dataspace + field below. Note that the Dataspace field may contain + additional padding not represented by this field.

Name

The null-terminated attribute name. This field is + padded with additional null characters to make it a + multiple of eight bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. This + field is not padded with additional bytes.

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message (Version 2) +
bytebytebytebyte
VersionFlagsName Size
Datatype SizeDataspace Size

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number information is used for changes in the + format of the attribute message and is described here: + + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.x and after to encode + attribute messages. + This version supports shared datatypes. The fields of + name, datatype, and dataspace are not padded with + additional bytes of zero. +

+

Flags

This bit field contains extra information about + interpreting the attribute message: + + + + + + + + + + + + + + + + +
BitDescription
0If set, datatype is shared.
1If set, dataspace is shared.

+

Name Size

The length of the attribute name in bytes including the + null terminator.

Datatype Size

The length of the datatype description in the Datatype + field below.

Dataspace Size

The length of the dataspace description in the Dataspace + field below.

Name

The null-terminated attribute name. This field is not + padded with additional bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. +

+

If the + Flag field indicates this attribute’s datatype is + shared, this field will contain a “shared message” encoding + instead of the datatype encoding. +

+

This field is not padded with additional bytes. +

+

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. +

+

If the + Flag field indicates this attribute’s dataspace is + shared, this field will contain a “shared message” encoding + instead of the dataspace encoding. +

+

This field is not padded with additional bytes.

+

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. +

+

This field is not padded with additional zero bytes. +

+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Message (Version 3) +
bytebytebytebyte
VersionFlagsName Size
Datatype SizeDataspace Size
Name Character Set EncodingThis space inserted only to align table nicely

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number information is used for changes in the + format of the attribute message and is described here: + + + + + + + + + + +
VersionDescription
3Used by the library of version 1.8.x and after to + encode attribute messages. + This version supports attributes with non-ASCII names. +

+

Flags

This bit field contains extra information about + interpreting the attribute message: + + + + + + + + + + + + + + + + +
BitDescription
0If set, datatype is shared.
1If set, dataspace is shared.

+

Name Size

The length of the attribute name in bytes including the + null terminator.

Datatype Size

The length of the datatype description in the Datatype + field below.

Dataspace Size

The length of the dataspace description in the Dataspace + field below.

Name Character Set Encoding

The character set encoding for the attribute’s name: + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
+

+

Name

The null-terminated attribute name. This field is not + padded with additional bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. +

+

If the + Flag field indicates this attribute’s datatype is + shared, this field will contain a “shared message” encoding + instead of the datatype encoding. +

+

This field is not padded with additional bytes. +

+

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. +

+

If the + Flag field indicates this attribute’s dataspace is + shared, this field will contain a “shared message” encoding + instead of the dataspace encoding. +

+

This field is not padded with additional bytes.

+

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. +

+

This field is not padded with additional zero bytes. +

+
+
+ +
+

IV.A.2.n. The Object Comment +Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Comment
Header Message Type: 0x000D
Length: Varies
Status: Optional; may not be + repeated.
Description:The object comment is designed to be a short description of + an object. An object comment is a sequence of non-zero + (\0) ASCII characters with no other formatting + included by the library.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + +
+ Name Message +
bytebytebytebyte

Comment (variable size)

+
+ +
+
+ + + + + + + + + + +
Field NameDescription

Name

A null terminated ASCII character string.

+
+ +
+

IV.A.2.o. The Object +Modification Time (Old) Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Modification Time (Old)
Header Message Type: 0x000E
Length: Fixed
Status: Optional; may not be + repeated.
Description:

The object modification date and time is a timestamp + which indicates (using ISO-8601 date and time format) the last + modification of an object. The time is updated when any object + header message changes according to the system clock where the + change was posted. All fields of this message should be + interpreted as coordinated universal time (UTC).

+

This modification time message is deprecated in favor of + the “new” Object + Modification Time message and is no longer written to the + file in versions of the HDF5 Library after the 1.6.0 + version.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
Year
MonthDay of Month
HourMinute
SecondReserved
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Year

The four-digit year as an ASCII string. For example, + 1998. +

Month

The month number as a two digit ASCII string where + January is 01 and December is 12.

Day of Month

The day number within the month as a two digit ASCII + string. The first day of the month is 01.

Hour

The hour of the day as a two digit ASCII string where + midnight is 00 and 11:00pm is 23.

Minute

The minute of the hour as a two digit ASCII string where + the first minute of the hour is 00 and + the last is 59.

Second

The second of the minute as a two digit ASCII string + where the first second of the minute is 00 + and the last is 59.

Reserved

This field is reserved and should always be zero.

+
+ +
+

IV.A.2.p. The Shared Message Table +Message

+ + +
+ + + + + + + + +
Header Message Name: Shared Message + Table
Header Message Type: 0x000F
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message is used to locate the table of shared object + header message (SOHM) indexes. Each index consists of information + to find the shared messages from either the heap or object header. + This message is only found in the superblock + extension.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Shared Message Table Message +
bytebytebytebyte
VersionThis space inserted only to align table nicely

Shared Object Header Message Table AddressO

Number of IndicesThis space inserted only to align table nicely
+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes version 0.

Shared Object Header Message Table Address

This field is the address of the master table for shared + object header message indexes.

+

Number of Indices

This field is the number of indices in the master table. +

+
+ +
+

IV.A.2.q. The Object Header +Continuation Message

+ + +
+ + + + + + + + +
Header Message Name: Object Header + Continuation
Header Message Type: 0x0010
Length: Fixed
Status: Optional; may be + repeated.
Description:The object header continuation is the location in the file + of a block containing more header messages for the current data + object. This can be used when header blocks become too large or + are likely to change over time.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Object Header Continuation Message +
bytebytebytebyte

OffsetO


LengthL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Offset

This value is the address in the file where the + header continuation block is located.

Length

This value is the length in bytes of the header continuation + block in the file.

+
+
+ +

The format of the header continuation block that this message points + to depends on the version of the object header that the message is + contained within. +

+ +

+ Continuation blocks for version 1 object headers have no special + formatting information; they are merely a list of object header + message info sequences (type, size, flags, reserved bytes and data + for each message sequence). See the description + of Version 1 Data Object Header Prefix. +

+ +

Continuation blocks for version 2 object headers do have + special formatting information as described here + (see also the description of + Version 2 Data Object Header Prefix.): +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Version 2 Object Header Continuation Block +
bytebytebytebyte
Signature
Header Message Type #1Size of Header Message Data #1Header Message #1 Flags
Header Message #1 Creation Order (optional)This space inserted only to align table nicely

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #nHeader Message #n Flags
Header Message #n Creation Order (optional)This space inserted only to align table nicely

Header Message Data #n

Gap (optional, variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Signature

+

The ASCII character string “OCHK” + is used to indicate the + beginning of an object header continuation block. This gives file + consistency checking utilities a better chance of reconstructing a + damaged file. +

+

Header Message #n Type

+

Same format as version 1 of the object header, described above. +

Size of Header Message #n Data

+

Same format as version 1 of the object header, described above. +

Header Message #n Flags

+

Same format as version 1 of the object header, described above. +

Header Message #n Creation Order

+

This field stores the order that a message of a given type + was created in.

+

This field is present if bit 2 of flags is set.

+

Header Message #n Data

+

Same format as version 1 of the object header, described above. +

Gap

+

A gap in an object header chunk is inferred by the end of the + messages for the chunk before the beginning of the chunk’s + checksum. Gaps are always smaller than the size of an + object header message prefix (message type + message size + + message flags).

+

Gaps are formed when a message (typically an attribute message) + in an earlier chunk is deleted and a message from a later + chunk that does not quite fit into the free space is moved + into the earlier chunk.

+

Checksum

+

This is the checksum for the object header chunk. +

+
+
+ +
+

IV.A.2.r. The Symbol Table +Message

+ + +
+ + + + + + + + +
Header Message Name: Symbol Table + Message
Header Message Type: 0x0011
Length: Fixed
Status: Required for + “old style” groups; may not be repeated.
Description:Each “old style” group has a v1 B-tree and a + local heap for storing symbol table entries, which are located + with this message.
Format of data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Symbol Table Message +
bytebytebytebyte

v1 B-tree AddressO


Local Heap AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

v1 B-tree Address

This value is the address of the v1 B-tree containing the + symbol table entries for the group.

Local Heap Address

This value is the address of the local heap containing + the link names for the symbol table entries for the group.

+
+ +
+

IV.A.2.s. The Object +Modification Time Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Modification Time
Header Message Type: 0x0012
Length: Fixed
Status: Optional; may not be + repeated.
Description:The object modification time is a timestamp which indicates + the time of the last modification of an object. The time is + updated when any object header message changes according to + the system clock where the change was posted.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
VersionReserved (zero)
Seconds After UNIX Epoch
+
+ +
+
+ + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number is used for changes in the format of Object Modification Time + and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by Version 1.6.1 and after of the library to encode time. In + this version, the time is the seconds after Epoch.

+

Seconds After UNIX Epoch

A 32-bit unsigned integer value that stores the number of + seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, + Coordinated Universal Time.

+
+ +
+

IV.A.2.t. The B-tree +‘K’ Values Message

+ + +
+ + + + + + + + +
Header Message Name: B-tree + ‘K’ Values
Header Message Type: 0x0013
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message retrieves non-default ‘K’ values + for internal and leaf nodes of a group or indexed storage v1 + B-trees. This message is only found in the superblock + extension.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ B-tree ‘K’ Values Message +
bytebytebytebyte
VersionIndexed Storage Internal Node KThis space inserted only to align table nicely
Group Internal Node KGroup Leaf Node K
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Indexed Storage Internal Node K

This is the node ‘K’ value for each internal node of an + indexed storage v1 B-tree. See the description of this field + in version 0 and 1 of the superblock as well the section on + v1 B-trees. +

+

Group Internal Node K

This is the node ‘K’ value for each internal node of a group + v1 B-tree. See the description of this field in version 0 and + 1 of the superblock as well as the section on v1 B-trees. +

+

Group Leaf Node K

This is the node ‘K’ value for each leaf node of a group v1 + B-tree. See the description of this field in version 0 and 1 + of the superblock as well as the section on v1 B-trees. +

+
+
+ +
+

IV.A.2.u. The Driver Info +Message

+ + +
+ + + + + + + + + +
Header Message Name: Driver + Info
Header Message Type: 0x0014
Length: Varies
Status: Optional; may not be + repeated.
+ Description:This message contains information needed by the file driver + to reopen a file. This message is only found in the + superblock extension: see the + “Disk Format: Level 0C - Superblock Extension” + section for more information. For more information on the fields + in the driver info message, see the + “Disk Format : Level 0B - File Driver Info” + section; those who use the multi and family file drivers will + find this section particularly helpful.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Driver Info Message +
bytebytebytebyte
VersionThis space inserted only to align table nicely

Driver Identification
Driver Information SizeThis space inserted only to align table nicely


Driver Information (variable size)


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Driver Identification

This is an eight-byte ASCII string without null termination which + identifies the driver. +

+

Driver Information Size

The size in bytes of the Driver Information field of this + message.

+

Driver Information

Driver information is stored in a format defined by the file driver.

+
+
+ +
+

IV.A.2.v. The Attribute Info +Message

+ + +
+ + + + + + + + +
Header Message Name: Attribute + Info
Header Message Type: 0x0015
Length: Varies
Status: Optional; may not be + repeated.
Description:This message stores information about the attributes on an + object, such as the maximum creation index for the attributes + created and the location of the attribute storage when the + attributes are stored “densely”.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Attribute Info Message +
bytebytebytebyte
VersionFlagsMaximum Creation Index (optional)

Fractal Heap AddressO


Attribute Name v2 B-tree AddressO


Attribute Creation Order v2 B-tree AddressO (optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Flags

This is the attribute index information flag with the + following definition: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, creation order for attributes is tracked. +
1If set, creation order for attributes is indexed. +
2-7Reserved

+ +

Maximum Creation Index

The is the maximum creation order index value for the + attributes on the object.

+

This field is present if bit 0 of Flags is set.

+

Fractal Heap Address

This is the address of the fractal heap to store dense + attributes.

+

Attribute Name v2 B-tree Address

This is the address of the version 2 B-tree to index the + names of densely stored attributes.

+

Attribute Creation Order v2 B-tree Address

This is the address of the version 2 B-tree to index the + creation order of densely stored attributes.

+

This field is present if bit 1 of Flags is set.

+
+
+ +
+

IV.A.2.w. The Object Reference +Count Message

+ + +
+ + + + + + + + +
Header Message Name: Object Reference + Count
Header Message Type: 0x0016
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message stores the number of hard links (in groups or + objects) pointing to an object: in other words, its + reference count.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + +
+ Object Reference Count +
bytebytebytebyte
VersionThis space inserted only to align table nicely
Reference count
+
+ +
+
+ + + + + + + + + + + + + + + + +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Reference Count

The unsigned 32-bit integer is the reference count for the + object. This message is only present in “version 2” + (or later) object headers, and if not present those object + header versions, the reference count for the object is assumed + to be 1.

+
+
+ +
+

IV.A.2.x. The File Space Info +Message

+ + +
+ + + + + + + + +
Header Message Name: File Space + Info
Header Message Type: 0x0018
Length: Fixed
Status: Optional; may not be + repeated.
+ Description:This message stores the file space management strategy (see + description below) that the library uses in handling file space + request for the file. It also contains the free-space section + threshold used by the library’s free-space managers for + the file. If the strategy is 1, this message also contains the + addresses of the file’s free-space managers which track + free space for each type of file space allocation. There are + six basic types of file space allocation: superblock, B-tree, + raw data, global heap, local heap, and object header. See the + description of Free-space + Manager as well the description of allocation types in + Appendix B.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ File Space Info +
bytebytebytebyte
VersionStrategyThresholdL
Super-block Free-space Manager AddressO
B-tree Free-space Manager AddressO
Raw Data Free-space Manager AddressO
Global Heap Free-space Manager AddressO
Local Heap Free-space Manager AddressO
Object Header Free-space Manager AddressO
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are of the size + specified in “Size of Offsets” field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are of the size + specified in “Size of Lengths” field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription

Version

This is the version number of this message. This document describes + version 0.

+

Strategy

This is the file space management strategy for the file. + There are four types of strategies: + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
1With this strategy, the HDF5 Library’s free-space managers track the + free space that results from the manipulation of HDF5 objects + in the HDF5 file. The free space information is saved when the + file is closed, and reloaded when the file is reopened. +
+ When space is needed for file metadata or raw data, + the HDF5 Library first requests space from the library’s free-space + managers. If the request is not satisfied, the library requests space + from the aggregators. If the request is still not satisfied, + the library requests space from the virtual file driver. + That is, the library will use all of the mechanisms for allocating + space. +
2This is the HDF5 Library’s default file space management strategy. + With this strategy, the library’s free-space managers track the free space + that results from the manipulation of HDF5 objects in the HDF5 file. + The free space information is NOT saved when the file is closed and + the free space that exists upon file closing becomes unaccounted + space in the file. +
+ As with strategy #1, the library will try all of the mechanisms + for allocating space. When space is needed for file metadata or + raw data, the library first requests space from the free-space + managers. If the request is not satisfied, the library requests + space from the aggregators. If the request is still not satisfied, + the library requests space from the virtual file driver. +
3With this strategy, the HDF5 Library does not track free space that results + from the manipulation of HDF5 objects in the HDF5 file and + the free space becomes unaccounted space in the file. +
+ When space is needed for file metadata or raw data, + the library first requests space from the aggregators. + If the request is not satisfied, the library requests space from + the virtual file driver. +
4With this strategy, the HDF5 Library does not track free space that results + from the manipulation of HDF5 objects in the HDF5 file and + the free space becomes unaccounted space in the file. +
+ When space is needed for file metadata or raw data, + the library requests space from the virtual file driver. +

+

Threshold

This is the free-space section threshold. + The library’s free-space managers will track only + free-space sections with size greater than or equal to + threshold. The default is to track free-space + sections of all sizes.

+

Superblock Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_SUPER allocation type. +

+

B-tree Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_BTREE allocation type. +

+

Raw Data Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_DRAW allocation type. +

+

Global Heap Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_GHEAP allocation type. +

+

Local Heap Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_LHEAP allocation type. +

+

Object Header Free-space Manager Address

This is the address of the free-space manager for + H5FD_MEM_OHDR allocation type. +

+
+
+
+ + +
+

+IV.B. Disk Format: Level 2B - Data Object Data Storage

+ +

The data for an object is stored separately from its header + information in the file and may not actually be located in the HDF5 file + itself if the header indicates that the data is stored externally. The + information for each record in the object is stored according to the + dimensionality of the object (indicated in the dataspace header message). + Multi-dimensional array data is stored in C order; in other words, the + “last” dimension changes fastest.

+ +

Data whose elements are composed of atomic datatypes are stored in IEEE + format, unless they are specifically defined as being stored in a different + machine format with the architecture-type information from the datatype + header message. This means that each architecture will need to [potentially] + byte-swap data values into the internal representation for that particular + machine.

+ +

Data with a variable-length datatype is stored in the global heap + of the HDF5 file. Global heap identifiers are stored in the + data object storage.

+ +

Data whose elements are composed of reference datatypes are stored in + several different ways depending on the particular reference type involved. + Object pointers are just stored as the offset of the object header being + pointed to with the size of the pointer being the same number of bytes as + offsets in the file.

+ +

Dataset region references are stored as a heap-ID which points to +the following information within the file-heap: an offset of the object +pointed to, number-type information (same format as header message), +dimensionality information (same format as header message), sub-set start +and end information (in other words, a coordinate location for each), +and field start and end names (in other words, a [pointer to the] string +indicating the first field included and a [pointer to the] string name +for the last field).

+ +

Data of a compound datatype is stored as a contiguous stream of the items + in the structure, with each item formatted according to its datatype.

+ + + +
+
+
+

+V. Appendix A: Definitions

+ +

Definitions of various terms used in this document are included in +this section.

+ +
+ + + + + + + + + + + + + + + + +
TermDefinition
Undefined AddressThe undefined + address for a file is a file address with all bits + set: in other words, 0xffff...ff.
Unlimited SizeThe unlimited size + for a size is a value with all bits set: in other words, + 0xffff...ff.
+
+ + + +
+
+
+

+VI. Appendix B: File Memory Allocation Types

+ +

There are six basic types of file memory allocation as follows: +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Basic Allocation TypeDescription
H5FD_MEM_SUPERFile memory allocated for Superblock.
H5FD_MEM_BTREEFile memory allocated for B-tree.
H5FD_MEM_DRAWFile memory allocated for raw data.
H5FD_MEM_GHEAPFile memory allocated for Global Heap.
H5FD_MEM_LHEAPFile memory allocated for Local Heap.
H5FD_MEM_OHDRFile memory allocated for Object Header.
+
+ +

There are other file memory allocation types that are mapped to the +above six basic allocation types because they are similar in nature. +The mapping is listed in the following table: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Basic Allocation TypeMapping of Allocation Types to Basic Allocation Types
H5FD_MEM_SUPERnone
H5FD_MEM_BTREEH5FD_MEM_SOHM_INDEX
H5FD_MEM_DRAWH5FD_MEM_FHEAP_HUGE_OBJ
H5FD_MEM_GHEAPnone
H5FD_MEM_LHEAPH5FD_MEM_FHEAP_DBLOCK, H5FD_MEM_FSPACE_SINFO
H5FD_MEM_OHDRH5FD_MEM_FHEAP_HDR, H5FD_MEM_FHEAP_IBLOCK, H5FD_MEM_FSPACE_HDR, H5FD_MEM_SOHM_TABLE
+
+ +

Allocation types that are mapped to basic allocation types are described below: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Allocation TypeDescription
H5FD_MEM_FHEAP_HDRFile memory allocated for Fractal Heap Header.
H5FD_MEM_FHEAP_DBLOCKFile memory allocated for Fractal Heap Direct Blocks.
H5FD_MEM_FHEAP_IBLOCKFile memory allocated for Fractal Heap Indirect Blocks.
H5FD_MEM_FHEAP_HUGE_OBJFile memory allocated for huge objects in the fractal heap.
H5FD_MEM_FSPACE_HDRFile memory allocated for Free-space Manager Header.
H5FD_MEM_FSPACE_SINFOFile memory allocated for Free-space Section List of the free-space manager.
H5FD_MEM_SOHM_TABLEFile memory allocated for Shared Object Header Message Table.
H5FD_MEM_SOHM_INDEXFile memory allocated for Shared Message Record List.
+
+ + diff --git a/doxygen/examples/H5.format.html b/doxygen/examples/H5.format.html new file mode 100644 index 00000000000..e16805f0ef0 --- /dev/null +++ b/doxygen/examples/H5.format.html @@ -0,0 +1,20400 @@ + + + + HDF5 File Format Specification Version 3.0 + + + + + + + + + + + +
+ + + + + + + +
+
    +
  1. Introduction
  2. + +
      +
    1. This Document
    2. +
    3. Changes for HDF5 1.12
    4. +
    5. Changes for HDF5 1.10
    6. +
    +
    + +
  3. Disk Format: Level 0 - File Metadata
  4. + +
      +
    1. Disk Format: Level 0A - Format Signature + and Superblock
    2. +
    3. Disk Format: Level 0B - File Driver + Info
    4. +
    5. Disk Format: Level 0C - Superblock + Extension
    6. +
    +
    +
  5. Disk Format: Level 1 - File Infrastructure
  6. + +
      +
    1. Disk Format: Level 1A - B-trees and B-tree + Nodes +
        +
      1. Disk Format: Level 1A1 - Version 1 + B-trees
      2. +
      3. Disk Format: Level 1A2 - Version 2 + B-trees
      4. +
      +
    2. +
    3. Disk Format: Level 1B - Group Symbol + Table Nodes
    4. +
    5. Disk Format: Level 1C - Symbol + Table Entry
    6. +
    7. Disk Format: Level 1D - Local Heaps
    8. +
    9. Disk Format: Level 1E - Global Heap
    10. +
    11. Disk Format: Level 1F - Global Heap + Block for Virtual Datasets
    12. +
    13. Disk Format: Level 1G - Fractal Heap
    14. +
    15. Disk Format: Level 1H - Free-space + Manager
    16. +
    17. Disk Format: Level 1I - Shared Object + Header Message Table
    18. +
    +
    +
  7. Disk Format: Level 2 - Data Objects
  8. + +
      +
    1. Disk Format: Level 2A - Data Object Headers
    2. +
        +
      1. Disk Format: Level 2A1 - + Data Object Header Prefix +
          +
        1. Version 1 Data + Object Header Prefix
        2. +
        3. Version 2 Data + Object Header Prefix
        4. +
        +
      2. +
      3. Disk Format: Level 2A2 - + Data Object Header Messages
      4. +
          +
        1. The NIL Message
        2. +
        3. The Dataspace Message
        4. +
        5. The Link Info Message
        6. +
        7. The Datatype Message
        8. +
        9. The Data Storage - + Fill Value (Old) Message
        10. +
        +
      +
    +
    +
+
  +
    +
  1. Disk Format: Level 2 - Data + Objects (Continued)
  2. +
      +
    1. Disk Format: Level 2A - Data Object + Headers (Continued) +
        +
      1. Disk Format: Level 2A2 - + Data Object Header Messages (Continued)
      2. +
          +
        1. The Data Storage - + Fill Value Message
        2. +
        3. The Link Message
        4. +
        5. The Data Storage - + External Data Files Message
        6. +
        7. The Data Layout Message
        8. +
        9. The Bogus Message
        10. +
        11. The Group Info + Message
        12. +
        13. The Data Storage - + Filter Pipeline Message
        14. +
        15. The Attribute + Message
        16. +
        17. The Object Comment + Message
        18. +
        19. The Object + Modification Time (Old) Message
        20. +
        21. The Shared Message + Table Message
        22. +
        23. The Object Header + Continuation Message
        24. +
        25. The Symbol + Table Message
        26. +
        27. The Object + Modification Time Message
        28. +
        29. The B-tree + ‘K’ Values Message
        30. +
        31. The Driver Info + Message
        32. +
        33. The Attribute Info + Message
        34. +
        35. The Object Reference + Count Message
        36. +
        37. The File Space Info + Message
        38. +
        +
      +
    2. +
    3. Disk Format: Level 2B - Data Object Data Storage
    4. +
    +
    +
  3. Appendix A: Definitions
  4. +
  5. Appendix B: File Space Allocation + Types
  6. +
  7. + Appendix C: Types of Indexes for Dataset Chunks
  8. + +
      +
    1. The Single Chunk Index
    2. +
    3. The Implicit Index
    4. +
    5. The Fixed Array Index
    6. +
    7. The Extensible Array Index
    8. +
    9. The Version 2 B-trees Index
    10. +
    +
    +
  9. + Appendix D: Encoding for Dataspace and Reference
  10. + +
      +
    1. Dataspace Encoding
    2. +
    3. Reference Encoding (Revised)
    4. +
    5. Reference Encoding (Backward Compatibility)
    6. +
    +
    +
+
+
+ + +

I. Introduction

+ + + + + + + +
  +
+ HDF5 Groups +
 
  + Figure 1: Relationships among the HDF5 root group, other groups, and objects +
+
 
  + HDF5 Objects +  
  + Figure 2: HDF5 objects -- datasets, datatypes, or dataspaces +
+
 
+ + +

The format of an HDF5 file on disk encompasses several + key ideas of the HDF4 and AIO file formats as well as + addressing some shortcomings therein. The new format is + more self-describing than the HDF4 format and is more + uniformly applied to data objects in the file.

+ +

An HDF5 file appears to the user as a directed graph. + The nodes of this graph are the higher-level HDF5 objects + that are exposed by the HDF5 APIs:

+ +
    +
  • Groups
  • +
  • Datasets
  • +
  • Committed (formerly Named) datatypes
  • +
+ +

At the lowest level, as information is actually written to the disk, + an HDF5 file is made up of the following objects:

+
    +
  • A superblock
  • +
  • B-tree nodes
  • +
  • Heap blocks
  • +
  • Object headers
  • +
  • Object data
  • +
  • Free space
  • +
+ +

The HDF5 Library uses these low-level objects to represent the + higher-level objects that are then presented to the user or + to applications through the APIs. For instance, a group is an + object header that contains a message that points to a local + heap (for storing the links to objects in the group) and to a + B-tree (which indexes the links). A dataset is an object header + that contains messages that describe the datatype, dataspace, + layout, filters, external files, fill value, and other elements + with the layout message pointing to either a raw data chunk or + to a B-tree that points to raw data chunks.

+ + +

I.A. This Document

+ +

This document describes the lower-level data objects; + the higher-level objects and their properties are described + in the HDF5 User’s Guide.

+ +

Three levels of information comprise the file format. + Level 0 contains basic information for identifying and + defining information about the file. Level 1 information contains + the information about the pieces of a file shared by many objects + in the file (such as B-trees and heaps). Level 2 is the rest + of the file and contains all of the data objects with each object + partitioned into header information, also known as + metadata, and data.

+ +

The various components of the lower-level data objects are + described in pairs of tables. The first table shows the format + layout, and the second table describes the fields. The titles + of format layout tables begin with “Layout”. The + titles of the tables where the fields are described begin with + “Fields”. For example, the table that describes the + format of the version 2 B-tree header has + a title of “Layout: Version 2 B-tree Header”, and the + fields in the version 2 B-tree header are described in the table + titled “Fields: Version 2 B-tree Header”. + +

The sizes of various fields in the following layout tables are + determined by looking at the number of columns the field spans + in the table. There are exceptions:

+
    +
  • The size may be overridden by specifying a size in + parentheses
  • +
  • The size of addresses is determined by the + Size of Offsets field + in the superblock and is indicated in this document with a + superscripted ‘O’
  • +
  • The size of length fields is determined by the + Size of Lengths field in + the superblock and is indicated in this document with a + superscripted ‘L’
  • +
+ +

Values for all fields in this document should be treated as unsigned + integers, unless otherwise noted in the description of a field. + Additionally, all metadata fields are stored in little-endian byte + order. +

+ +

All checksums used in the format are computed with the + Jenkins’ + lookup3 algorithm. +

+ +

Whenever a bit flag or field is mentioned for an entry, bits are + numbered from the lowest bit position in the entry. +

+ +

Various format tables in this document have cells with + “This space inserted only to align table nicely”. These + entries in the table are just to make the table presentation nicer + and do not represent any values or padding in the file. +

+ + +

I.B. Changes for HDF5 1.12

+

The following sections have been + changed or added for the 1.12 release:

+ + + + +

I.C. Changes for HDF5 1.10

+ +

The following sections have been + changed or added for the 1.10 release:

+ + + + +

+ II. Disk Format: Level 0 - File Metadata

+ + + +

+ II.A. Disk Format: Level 0A - Format Signature and Superblock

+ +

The superblock may begin at certain predefined offsets within + the HDF5 file, allowing a block of unspecified content for + users to place additional information at the beginning (and + end) of the HDF5 file without limiting the HDF5 Library’s + ability to manage the objects within the file itself. This + feature was designed to accommodate wrapping an HDF5 file in + another file format or adding descriptive information to an HDF5 + file without requiring the modification of the actual file’s + information. The superblock is located by searching for the + HDF5 format signature at byte offset 0, byte offset 512, and at + successive locations in the file, each a multiple of two of + the previous location; in other words, at these byte offsets: + 0, 512, 1024, 2048, and so on.

+ +

The superblock is composed of the format signature, followed by a + superblock version number and information that is specific to each + version of the superblock. + +

Currently, there are four versions of the superblock format: +

    +
  • Version 0 is the default format.
  • +
  • Version 1 is the same as version 0 but with the + “Indexed Storage Internal Node K” field + for storing non-default B-tree ‘K’ value.
  • +
  • Version 2 has some fields eliminated and compressed from + superblock format versions 0 and 1. It has added checksum support + and superblock extension to store additional superblock + metadata.
  • +
  • Version 3 is the same as version 2 except that the field + “File Consistency Flags” is used for file + locking. This format version will enable support for the latest + version.
  • +
+ +

Versions 0 and 1 of the superblock are described below:

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Superblock (Versions 0 and 1) +
bytebytebytebyte

Format Signature + (8 bytes)

Version # of SuperblockVersion # of File’s Free Space StorageVersion # of Root Group Symbol Table EntryReserved (zero)
Version Number of Shared Header Message FormatSize of OffsetsSize of LengthsReserved (zero)
Group Leaf Node KGroup Internal Node K
File Consistency Flags
Indexed Storage Internal Node K1Reserved + (zero)1

Base AddressO


Address of File Free space InfoO


End of File AddressO


Driver Information Block AddressO

Root Group Symbol Table Entry
+ + + + + + + + +
  + (Items marked with a ‘1’ in the above table are + new in version 1 of the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Superblock (Versions 0 and 1) +
Field NameDescription

Format Signature

This field contains a constant value and can be used to + quickly identify a file as being an HDF5 file. The + constant value is designed to allow easy identification of + an HDF5 file and to allow certain types of data corruption + to be detected. The file signature of an HDF5 file always + contains the following values:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Decimal:13772687013102610
Hexadecimal:894844460d0a1a0a
ASCII C Notation:\211HDF\r\n\032\n
+
+

This signature both identifies the file as an HDF5 file + and provides for immediate detection of common + file-transfer problems. The first two bytes distinguish + HDF5 files on systems that expect the first two bytes to + identify the file type uniquely. The first byte is + chosen as a non-ASCII value to reduce the probability + that a text file may be misrecognized as an HDF5 file; + also, it catches bad file transfers that clear bit + 7. Bytes two through four name the format. The CR-LF + sequence catches bad file transfers that alter newline + sequences. The control-Z character stops file display + under MS-DOS. The final line feed checks for the inverse + of the CR-LF translation problem. (This is a direct + descendent of the + PNG file + signature.)

+

This field is present in version 0+ of the superblock. +

Version Number of the Superblock

This value is used to determine the format of the + information in the superblock. When the format of the + information in the superblock is changed, the version number + is incremented to the next integer and can be used to + determine how the information in the superblock is + formatted.

+ +

Values of 0, 1 and 2 are defined for this field (the + format of version 2 is described below, not here). +

+ +

This field is present in version 0+ of the superblock. +

+

Version Number of the File’s Free Space + Information

+

This value is used to determine the format of the + file’s free space information. +

+

The only value currently valid in this field is ‘0’, which + indicates that the file’s free space is as described + below. +

+ +

This field is present in versions 0 and 1 of the + superblock. +

+

Version Number of the Root Group Symbol Table + Entry

This value is used to determine the format of the + information in the Root Group Symbol Table Entry. When the + format of the information in that field is changed, the + version number is incremented to the next integer and can be + used to determine how the information in the field + is formatted.

+

The only value currently valid in this field is ‘0’, + which indicates that the root group symbol table entry is + formatted as described below.

+

This field is present in version 0 and 1 of the + superblock.

+

Version Number of the Shared Header Message Format

This value is used to determine the format of the + information in a shared object header message. Since the format + of the shared header messages differs from the other private + header messages, a version number is used to identify changes + in the format. +

+

The only value currently valid in this field is ‘0’, which + indicates that shared header messages are formatted as + described below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Size of Offsets

This value contains the number of bytes used to store + addresses in the file. The values for the addresses of + objects in the file are offsets relative to a base address, + usually the address of the superblock signature. This + allows a wrapper to be added after the file is created + without invalidating the internal offset locations. +

+ +

This field is present in version 0+ of the superblock. +

+

Size of Lengths

This value contains the number of bytes used to store + the size of an object. +

+

This field is present in version 0+ of the superblock. +

+

Group Leaf Node K

+

Each leaf node of a group B-tree will have at + least this many entries but not more than twice this + many. If a group has a single leaf node then it + may have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Group Internal Node K

+

Each internal node of a group B-tree will have at + least this many entries but not more than twice this + many. If the group has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

File Consistency Flags

+

This field is unused and should be ignored. +

+

This field is present in version 0+ of the superblock. +

+

Indexed Storage Internal Node K

+

Each internal node of an indexed storage B-tree will have at + least this many entries but not more than twice this + many. If the index storage B-tree has only one internal + node then it might have fewer entries. +

+

This value must be greater than zero. +

+

See the description of B-trees below. +

+ +

This field is present in version 1 of the superblock. +

+

Base Address

+

This is the absolute file address of the first byte of + the HDF5 data within the file. The library currently + constrains this value to be the absolute file address + of the superblock itself when creating new files; + future versions of the library may provide greater + flexibility. When opening an existing file and this address does + not match the offset of the superblock, the library assumes + that the entire contents of the HDF5 file have been adjusted in + the file and adjusts the base address and end of file address to + reflect their new positions in the file. Unless otherwise noted, + all other file addresses are relative to this base + address. +

+ +

This field is present in version 0+ of the superblock. +

+

Address of Global Free-space Index

+

The file’s free space is not persistent for version 0 and 1 of + the superblock. + Currently this field always contains the + undefined address. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

End of File Address

+

This is the absolute file address of the first byte past + the end of all HDF5 data. It is used to determine whether a + file has been accidently truncated and as an address where + file data allocation can occur if space from the free list is + not used. +

+ +

This field is present in version 0+ of the superblock. +

+

Driver Information Block Address

+

This is the relative file address of the file driver + information block which contains driver-specific + information needed to reopen the file. If there is no + driver information block then this entry should be the + undefined address. +

+ +

This field is present in version 0 and 1 of the superblock. +

+

Root Group Symbol Table Entry

+

This is the symbol table entry + of the root group, which serves as the entry point into + the group graph for the file. +

+ +

This field is present in version 0 and 1 of the superblock. +

+
+
+ +
+
+
+

Versions 2 and 3 of the superblock are described below:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Superblock (Versions 2 and 3) +
bytebytebytebyte

Format Signature + (8 bytes)

Version # of SuperblockSize of OffsetsSize of LengthsFile Consistency Flags

Base AddressO


Superblock Extension AddressO


End of File AddressO


Root Group Object Header AddressO

Superblock Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Superblock (Versions 2 and 3) +
Field NameDescription

Format Signature

+

This field is the same as described for versions 0 and 1 of the + superblock. +

Version Number of the Superblock

+

This field has a value of 2 and has the same meaning as for + versions 0 and 1. +

+

Size of Offsets

+

This field is the same as described for + versions 0 and 1 of the + superblock. +

+

Size of Lengths

+

This field is the same as described for + versions 0 and 1 of the + superblock. +

+

File Consistency Flags

+

For superblock version + 2: This field is unused and should be ignored.

+

For superblock version + 3: This value contains flags to ensure file consistency for + file locking. Currently, the following bit flags are defined: +

    +
  • Bit 0 if set indicates that the file has been opened for + write access.
  • +
  • Bit 1 is reserved for future use.
  • +
  • Bit 2 if set indicates that the file has been opened for + single-writer/multiple-reader (SWMR) write access.
  • +
  • Bits 3-7 are reserved for future use.
  • +
+

+ Bit 0 should be set as the first action when a file has been + opened for write access. Bit 2 should be set when a file + has been opened for SWMR write access. These two bits should + be cleared only as the final action when closing a file. +

+

This field is present in version 0+ of the superblock. +

+

The size of this + field has been reduced from 4 bytes in superblock format + versions 0 and 1 to 1 byte. +

+

Base Address

+

This field is the same as described for versions 0 and + 1 of the superblock. +

+

Superblock Extension Address

+

The field is the address of the object header for the + superblock extension. + If there is no extension then this entry should be the + undefined address. +

+

End of File Address

+

This field is the same as described for versions 0 and 1 of the + superblock. +

+

Root Group Object Header Address

+

This is the address of + the root group object header, + which serves as the entry point into the group graph for the file. +

+

Superblock Checksum

+

The checksum for the superblock. +

+
+
+ +
+ +

+ II.B. Disk Format: Level 0B - File Driver Info

+ +

The driver information block is an optional region of the + file which contains information needed by the file driver + to reopen a file. The format is described below:

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Driver Information Block +
bytebytebytebyte
VersionReserved
Driver Information Size

Driver Identification + (8 bytes)



Driver Information + (variable size)


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Driver Information Block +
Field NameDescription

Version

+

The version number of the Driver Information Block. + This document describes version 0. +

+

Driver Information Size

+

The size in bytes of the Driver Information field. +

+

Driver Identification

+

This is an eight-byte ASCII string without null + termination which identifies the driver and/or version number + of the Driver Information Block. The predefined driver encoded + in this field by the HDF5 Library is identified by the + letters NCSA followed by the first four characters of + the driver name. If the Driver Information block is not + the original version then the last letter(s) of the + identification will be replaced by a version number in + ASCII, starting with 0. +

+

+ Identification for user-defined drivers is also eight-byte long. + It can be arbitrary but should be unique to avoid + the four character prefix “NCSA”. +

+

Driver Information

Driver information is stored in a format defined by the + file driver (see description below).
+
+ +
+

The two drivers encoded in the Driver Identification + field are as follows:

+
    +
  • + Multi driver: +

    + The identifier for this driver is “NCSAmulti”. + This driver provides a mechanism for segregating raw data and different types of metadata + into multiple files. + These files are viewed by the library as a single virtual HDF5 file with a single file address. + A maximum of 6 files will be created for the following data: + superblock, B-tree, raw data, global heap, local heap, and object header. + More than one type of data can be written to the same file. +

  • +
  • + Family driver +

    + The identifier for this driver is “NCSAfami” and is encoded in this field for library version 1.8 and after. + This driver is designed for systems that do not support files larger than 2 gigabytes + by splitting the HDF5 file address space across several smaller files. + It does nothing to segregate metadata and raw data; + they are mixed in the address space just as they would be in a single contiguous file. +

  • +
+

The format of the Driver Information field for the + above two drivers are described below:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Multi Driver Information +
bytebytebytebyte
Member MappingMember MappingMember MappingMember Mapping
Member MappingMember MappingReservedReserved

Address of Member File 1


End of Address for Member File 1


Address of Member File 2


End of Address for Member File 2


... ...


Address of Member File N


End of Address for Member File N


Name of Member File 1 + (variable size)


Name of Member File 2 + (variable size)


... ...


Name of Member File N + (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Multi Driver Information +
Field NameDescription

Member Mapping

These fields are integer values from 1 to 6 + indicating how the data can be mapped to or merged with another type of + data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Member MappingDescription
1The superblock data.
2The B-tree data.
3The raw data.
4The global heap data.
5The local heap data.
6The object header data.

+

For example, if the third field has the value 3 and all the rest have the + value 1, it means there are two files: one for raw data, and one for superblock, + B-tree, global heap, local heap, and object header.

+

Reserved

These fields are reserved and should always be zero.

Address of Member File N

This field Specifies the virtual address at which the member file starts.

+

N is the number of member files.

+

End of Address for Member File N

This field is the end of the allocated address for the member file. +

Name of Member File N

This field is the null-terminated name of the member file and + its length should be multiples of 8 bytes. + Additional bytes will be padded with NULLs. The default naming + convention is %s-X.h5, where X is one of the letters + s (for superblock), b (for B-tree), r (for raw data), + g (for global heap), l (for local heap), and o (for + object header). The name of the whole HDF5 file will substitute the %s + in the string. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + +
+ Layout: Family Driver Information +
bytebytebytebyte

Size of Member File

+
+ +
+
+ + + + + + + + + + + +
+ Fields: Family Driver Information +
Field NameDescription

Size of Member File

This field is the size of the member file in the family of files.

+
+ +

+ II.C. Disk Format: Level 0C - Superblock Extension

+ +

The superblock extension is used to store superblock metadata + which is either optional, or added after the version of the superblock + was defined. Superblock extensions may only exist when version 2 + or later of the superblock is used. A superblock extension is an object + header which may hold the following messages:

+ + + + +

+ III. Disk Format: Level 1 - File Infrastructure

+ +

+ III.A. Disk Format: Level 1A - B-trees and B-tree Nodes

+ +

B-trees allow flexible storage for objects which tend to grow + in ways that cause the object to be stored discontiguously. B-trees + are described in various algorithms books including “Introduction to + Algorithms” by Thomas H. Cormen, Charles E. Leiserson, and Ronald + L. Rivest. B-trees are used in several places in the HDF5 file format, + when an index is needed for another data structure.

+ +

The version 1 B-tree structure described below is the original + index structure. The version 1 B-trees are being phased out in + favor of the version 2 B-trees described below. Note that both + types of structures may be found in the same file depending on + the application settings when creating the file.

+ +

+ III.A.1. Disk Format: Level 1A1 - Version 1 B-trees

+ +

Version 1 B-trees in HDF5 files are an implementation of the + B-link tree. The sibling nodes at a particular level in + the tree are stored in a doubly-linked list. See the + “Efficient Locking for Concurrent Operations on B-trees” + paper by Phillip Lehman and S. Bing Yao as published in the + ACM Transactions on Database Systems, Vol. 6, No. 4, + December 1981.

+ +

The B-trees implemented by the file format contain one more + key than the number of children. In other words, each child + pointer out of a B-tree node has a left key and a right key. + The pointers out of internal nodes point to sub-trees while + the pointers out of leaf nodes point to symbol nodes and + raw data chunks. + Aside from that difference, internal nodes and leaf nodes + are identical.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: B-tree Nodes +
bytebytebytebyte
Signature
Node TypeNode LevelEntries Used

Address of Left SiblingO


Address of Right SiblingO

Key 1 (variable size)

Address of Child 1O

Key 2 (variable size)

Address of Child 2O

...
Key 2K (variable size)

Address of Child 2KO

Key 2K+1 + (variable size)
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: B-tree Nodes +
Field NameDescription

Signature

+

The ASCII character string “TREE” + is used to indicate the beginning of a B-tree node. This + gives file consistency checking utilities a better chance + of reconstructing a damaged file. +

+

Node Type

+

Each B-tree points to a particular type of data. + This field indicates the type of data as well as + implying the maximum degree K of the tree and + the size of each Key field. + + + + + + + + + + + + + + + +
Node TypeDescription
0This tree points to group nodes.
1This tree points to raw data chunk nodes.

+

Node Level

+

The node level indicates the level at which this node + appears in the tree (leaf nodes are at level zero). Not + only does the level indicate whether child pointers + point to sub-trees or to data, but it can also be used + to help file consistency checking utilities reconstruct + damaged trees. +

+

Entries Used

+

This determines the number of children to which this + node points. All nodes of a particular type of tree + have the same maximum degree, but most nodes will point + to less than that number of children. The valid child + pointers and keys appear at the beginning of the node + and the unused pointers and keys appear at the end of + the node. The unused pointers and keys have undefined + values. +

+

Address of Left Sibling

+

This is the relative file address of the left sibling of + the current node. If the current + node is the left-most node at this level then this field + is the undefined address. +

+

Address of Right Sibling

+

This is the relative file address of the right sibling of + the current node. If the current + node is the right-most node at this level then this + field is the undefined address. +

+

Keys and Child Pointers

+

Each tree has 2K+1 keys with 2K + child pointers interleaved between the keys. The number + of keys and child pointers actually containing valid + values is determined by the node’s Entries + Used field. If that field is N, then the + B-tree contains N child pointers and + N+1 keys. +

+

Key

+

The format and size of the key values is determined by + the type of data to which this tree points. The keys are + ordered and are boundaries for the contents of the child + pointer; that is, the key values represented by child + N fall between Key N and Key + N+1. Whether the interval is open or closed on + each end is determined by the type of data to which the + tree points. +

+ +

+ The format of the key depends on the node type. + For nodes of node type 0 (group nodes), the key is formatted as + follows: + + + + + + +
A single field of + Size of Lengths + bytes:Indicates the byte offset into the local heap + for the first object name in the subtree which + that key describes. +
+

+ + +

+ For nodes of node type 1 (chunked raw data nodes), the key is + formatted as follows: + + + + + + + + + + + + + + +
Bytes 1-4:Size of chunk in bytes.
Bytes 4-8:Filter mask, a 32-bit bit field indicating which + filters have been skipped for this chunk. Each filter + has an index number in the pipeline (starting at 0, with + the first filter to apply) and if that filter is skipped, + the bit corresponding to its index is set.
(D + 1) 64-bit fields:The offset of the + chunk within the dataset where D is the number + of dimensions of the dataset, and the last value is the + offset within the dataset’s datatype and should + always be zero. For example, if + a chunk in a 3-dimensional dataset begins at the + position [5,5,5], there will be three + such 64-bit values, each with the value of + 5, followed by a 0 value.
+

+ +

Child Pointer

+

The tree node contains file addresses of subtrees or + data depending on the node level. Nodes at Level 0 point + to data addresses, either raw data chunks or group nodes. + Nodes at non-zero levels point to other nodes of the + same B-tree. +

+

For raw data chunk nodes, the child pointer is the address + of a single raw data chunk. For group nodes, the child pointer + points to a symbol table, which contains + information for multiple symbol table entries. +

+
+
+ +

+ Conceptually, each B-tree node looks like this:

+
+ + + + + + + + + + + + + +
key[0] child[0] key[1] child[1] key[2] ... ... key[N-1] child[N-1] key[N]
+
+
+ + where child[i] is a pointer to a sub-tree (at a level + above Level 0) or to data (at Level 0). + Each key[i] describes an item stored by the B-tree + (a chunk or an object of a group node). The range of values + represented by child[i] is indicated by key[i] + and key[i+1]. + + +

The following question must next be answered: + “Is the value described by key[i] contained in + child[i-1] or in child[i]?” + The answer depends on the type of tree. + In trees for groups (node type 0), the object described by + key[i] is the greatest object contained in + child[i-1] while in chunk trees (node type 1) the + chunk described by key[i] is the least chunk in + child[i].

+ +

That means that key[0] for group trees is sometimes unused; + it points to offset zero in the heap, which is always the + empty string and compares as “less-than” any valid + object name.

+ +

And key[N] for chunk trees is sometimes unused; + it contains a chunk offset which compares as “greater-than” + any other chunk offset and has a chunk byte size of zero + to indicate that it is not actually allocated.

+ +

+ III.A.2. Disk Format: Level 1A2 - Version 2 B-trees

+ +

Version 2 (v2) B-trees are “traditional” B-trees + with one major difference. Instead of just using a simple pointer + (or address in the file) to a child of an internal node, the pointer + to the child node contains two additional pieces of information: + the number of records in the child node itself, and the total number + of records in the child node and all its descendants. Storing this + additional information allows fast array-like indexing to locate + the nth record in the B-tree.

+ +

The entry into a version 2 B-tree is a header which contains global + information about the structure of the B-tree. The root node + address + field in the header points to the B-tree root node, which is either an + internal or leaf node, depending on the value in the header’s + depth field. An internal node consists of records plus + pointers to further leaf or internal nodes in the tree. A leaf node + consists of solely of records. The format of the records depends on + the B-tree type (stored in the header).

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree Header +
bytebytebytebyte
Signature
VersionTypeThis space inserted only to align table nicely
Node Size
Record SizeDepth
Split PercentMerge PercentThis space inserted only to align table nicely

Root Node AddressO

Number of Records in Root NodeThis space inserted only to align table nicely

Total Number of Records in B-treeL

Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree Header +
Field NameDescription

Signature

+

The ASCII character string “BTHD” + is used to indicate the header of a version 2 (v2) B-tree + node. +

+

Version

+

The version number for this B-tree header. This document + describes version 0. +

+

Type

+

This field indicates the type of B-tree: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0This B-tree is used for testing only. This + value should not be used for storing + records in actual HDF5 files. +
1This B-tree is used for indexing indirectly accessed, + non-filtered ‘huge’ fractal heap objects. +
2This B-tree is used for indexing indirectly accessed, + filtered ‘huge’ fractal heap objects. +
3This B-tree is used for indexing directly accessed, + non-filtered ‘huge’ fractal heap objects. +
4This B-tree is used for indexing directly accessed, + filtered ‘huge’ fractal heap objects. +
5This B-tree is used for indexing the ‘name’ field for + links in indexed groups. +
6This B-tree is used for indexing the ‘creation order’ + field for links in indexed groups. +
7This B-tree is used for indexing shared object header + messages. +
8This B-tree is used for indexing the ‘name’ field for + indexed attributes. +
9This B-tree is used for indexing the ‘creation order’ + field for indexed attributes. +
10This B-tree is used for indexing chunks of + datasets with no filters and with more than one + dimension of unlimited extent. +
11This B-tree is used for indexing chunks of + datasets with filters and more than one dimension + of unlimited extent. +

+

The format of records for each type is described below.

+

Node Size

+

This is the size in bytes of all B-tree nodes. +

+

Record Size

+

This field is the size in bytes of the B-tree record. +

+

Depth

+

This is the depth of the B-tree. +

+

Split Percent

+

The percent full that a node needs to increase above before it + is split. +

+

Merge Percent

+

The percent full that a node needs to be decrease below before it + is split. +

+

Root Node Address

+

This is the address of the root B-tree node. A B-tree with + no records will have the undefined + address in this field. +

+

Number of Records in Root Node

+

This is the number of records in the root node. +

+

Total Number of Records in B-tree

+

This is the total number of records in the entire B-tree. +

+

Checksum

+

This is the checksum for the B-tree header. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree Internal Node +
bytebytebytebyte
Signature
VersionTypeRecords 0, 1, 2...N-1 (variable size)

Child Node Pointer 0O


Number of Records N0 for Child + Node 0 (variable size)

Total Number of Records for Child Node 0 + (optional, variable size)

Child Node Pointer 1O


Number of Records N1 for + Child Node 1 (variable size)

Total Number of Records for Child Node 1 + (optional, variable size)
...

Child Node Pointer NO


Number of Records Nn for + Child Node N (variable size)

Total Number of Records for Child Node N + (optional, variable size)
Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree Internal Node +
Field NameDescription

Signature

+

The ASCII character string “BTIN” is + used to indicate the internal node of a B-tree. +

+

Version

+

The version number for this B-tree internal node. + This document describes version 0. +

+

Type

+

This field is the type of the B-tree node. It should always + be the same as the B-tree type in the header. +

+

Records

+

The size of this field is determined by the number of records + for this node and the record size (from the header). The format + of records depends on the type of B-tree. +

+

Child Node Pointer

+

This field is the address of the child node pointed to by the + internal node. +

+

Number of Records in Child Node

+

This is the number of records in the child node pointed to by + the corresponding Node Pointer. +

+

The number of bytes used to store this field is determined by + the maximum possible number of records able to be stored in the + child node. +

+

+ The maximum number of records in a child node is computed + in the following way: + +

    +
  • Subtract the fixed size overhead for + the child node (for example, its signature, version, + checksum, and so on and one pointer triplet + of information for the child node (because there is one + more pointer triplet than records in each internal node)) + from the size of nodes for the B-tree.
  • +
  • Divide that result by the size of a record plus the + pointer triplet of information stored to reach each + child node from this node.
  • +
+ +

+

+ Note that leaf nodes do not encode any + child pointer triplets, so the maximum number of records in a + leaf node is just the node size minus the leaf node overhead, + divided by the record size. +

+

+ Also note that the first level of internal nodes above the + leaf nodes do not encode the Total Number of Records in Child + Node value in the child pointer triplets (since it is the + same as the Number of Records in Child Node), so the + maximum number of records in these nodes is computed with the + equation above, but using (Child Pointer, Number of + Records in Child Node) pairs instead of triplets. +

+

+ The number of + bytes used to encode this field is the least number of bytes + required to encode the maximum number of records in a child + node value for the child nodes below this level + in the B-tree. +

+

+ For example, if the maximum number of child records is + 123, one byte will be used to encode these values in this + node; if the maximum number of child records is + 20000, two bytes will be used to encode these values in this + node; and so on. The maximum number of bytes used to + encode these values is 8 (in other words, an unsigned + 64-bit integer). +

+

Total Number of Records in Child Node

+

This is the total number of records for the node pointed to by + the corresponding Node Pointer and all its children. + This field exists only in nodes whose depth in the B-tree node + is greater than 1 (in other words, the “twig” + internal nodes, just above leaf nodes, do not store this + field in their child node pointers). +

+

The number of bytes used to store this field is determined by + the maximum possible number of records able to be stored in the + child node and its descendants. +

+

+ The maximum possible number of records able to be stored in a + child node and its descendants is computed iteratively, in the + following way: The maximum number of records in a leaf node + is computed, then that value is used to compute the maximum + possible number of records in the first level of internal nodes + above the leaf nodes. Multiplying these two values together + determines the maximum possible number of records in child node + pointers for the level of nodes two levels above leaf nodes. + This process is continued up to any level in the B-tree. +

+

+ The number of bytes used to encode this value is computed in + the same way as for the Number of Records in Child Node + field. +

+

Checksum

+

This is the checksum for this node. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree Leaf Node +
bytebytebytebyte
Signature
VersionTypeRecord 0, 1, 2...N-1 (variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree Leaf Node +
Field NameDescription

Signature

+

The ASCII character string “BTLF“ + is used to indicate the leaf node of a version 2 (v2) B-tree. +

+

Version

+

The version number for this B-tree leaf node. + This document describes version 0. +

+

Type

+

This field is the type of the B-tree node. It should always + be the same as the B-tree type in the header. +

+

Records

+

The size of this field is determined by the number of records + for this node and the record size (from the header). The format + of records depends on the type of B-tree. +

+

Checksum

+

This is the checksum for this node. +

+
+
+ +
+
+
+

The record layout for each stored (in other words, non-testing) + B-tree type is as follows:

+ +
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 1 Record Layout - Indirectly + Accessed, Non-filtered, ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Huge Object AddressO


Huge Object LengthL


Huge Object IDL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 1 Record Layout - Indirectly + Accessed, Non-filtered, ‘Huge’ Fractal Heap Objects +
Field NameDescription

Huge Object Address

+

The address of the huge object in the file. +

+

Huge Object Length

+

The length of the huge object in the file. +

+

Huge Object ID

+

The heap ID for the huge object. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 2 Record Layout - Indirectly + Accessed, Filtered, ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Filtered Huge Object AddressO


Filtered Huge Object LengthL

Filter Mask

Filtered Huge Object Memory SizeL


Huge Object IDL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 2 Record Layout - Indirectly + Accessed, Filtered, ‘Huge’ Fractal Heap Objects +
Field NameDescription

Filtered Huge Object Address

+

The address of the filtered huge object in the file. +

+

Filtered Huge Object Length

+

The length of the filtered huge object in the file. +

+

Filter Mask

+

A 32-bit bit field indicating which filters have been skipped for + this chunk. Each filter has an index number in the pipeline + (starting at 0, with the first filter to apply) and if that + filter is skipped, the bit corresponding to its index is set. +

+

Filtered Huge Object Memory Size

+

The size of the de-filtered huge object in memory. +

+

Huge Object ID

+

The heap ID for the huge object. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 3 Record Layout - Directly + Accessed, Non-filtered, ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Huge Object AddressO


Huge Object LengthL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 3 Record Layout - Directly + Accessed, Non-filtered, ‘Huge’ Fractal Heap Objects +
Field NameDescription

Huge Object Address

+

The address of the huge object in the file. +

+

Huge Object Length

+

The length of the huge object in the file. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 4 Record Layout - Directly + Accessed, Filtered, ‘Huge’ Fractal Heap Objects +
bytebytebytebyte

Filtered Huge Object AddressO


Filtered Huge Object LengthL

Filter Mask

Filtered Huge Object Memory SizeL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 4 Record Layout - Directly + Accessed, Filtered, ‘Huge’ Fractal Heap Objects +
Field NameDescription

Filtered Huge Object Address

+

The address of the filtered huge object in the file. +

+

Filtered Huge Object Length

+

The length of the filtered huge object in the file. +

+

Filter Mask

+

A 32-bit bit field indicating which filters have been skipped for + this chunk. Each filter has an index number in the pipeline + (starting at 0, with the first filter to apply) and if that + filter is skipped, the bit corresponding to its index is set. +

+

Filtered Huge Object Memory Size

+

The size of the de-filtered huge object in memory. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 5 Record Layout - Link Name + for Indexed Group +
bytebytebytebyte
Hash of Name
ID (bytes 1-4)
ID (bytes 5-7)
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 5 Record Layout - Link Name + for Indexed Group +
Field NameDescription

Hash

+

This field is hash value of the name for the link. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the link’s name. +

+

ID

+

This is a 7-byte sequence of bytes and is the heap ID for the + link record in the group’s fractal heap.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 6 Record Layout - Creation + Order for Indexed Group +
bytebytebytebyte

Creation Order + (8 bytes)

ID (bytes 1-4)
ID (bytes 5-7)
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 6 Record Layout - Creation + Order for Indexed Group +
Field NameDescription

Creation Order

+

This field is the creation order value for the link. +

+

ID

+

This is a 7-byte sequence of bytes and is the heap ID for the + link record in the group’s fractal heap.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 7 Record Layout - Shared + Object Header Messages (Sub-type 0 - Message in Heap) +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash
Reference Count

Heap ID (8 bytes)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 7 Record Layout - Shared + Object Header Messages (Sub-type 0 - Message in Heap) +
Field NameDescription

Message Location

+

This field Indicates the location where the message is stored: + + + + + + + + + + + + + +
ValueDescription
0Shared message is stored in shared message index heap. +
1Shared message is stored in object header. +

+

Hash

+

This field is hash value of the shared message. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the shared message.

+

Reference Count

+

The number of objects which reference this message.

+

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + shared message in the shared message index’s fractal heap.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 7 Record Layout - Shared + Object Header Messages (Sub-type 1 - Message in Object Header) +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash
Reserved (zero)Message TypeObject Header Index

Object Header AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 7 Record Layout - Shared + Object Header Messages (Sub-type 1 - Message in Object Header) +
Field NameDescription

Message Location

+

This field Indicates the location where the message is stored: + + + + + + + + + + + + + +
ValueDescription
0Shared message is stored in shared message index heap. +
1Shared message is stored in object header. +

+

Hash

+

This field is hash value of the shared message. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the shared message.

+

Message Type

+

The object header message type of the shared message.

+

Object Header Index

+

This field indicates that the shared message is the nth message + of its type in the specified object header.

+

Object Header Address

+

The address of the object header containing the shared message.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 8 Record Layout - Attribute + Name for Indexed Attributes +
bytebytebytebyte

Heap ID (8 bytes)

Message FlagsThis space inserted only to align table nicely
Creation Order
Hash of Name
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 8 Record Layout - Attribute + Name for Indexed Attributes +
Field NameDescription

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + attribute in the object’s attribute fractal heap.

+

Message Flags

The object header message flags for the attribute message.

+

Creation Order

+

This field is the creation order value for the attribute. +

+

Hash

+

This field is hash value of the name for the attribute. The hash + value is the Jenkins’ lookup3 checksum algorithm applied to + the attribute’s name. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 B-tree, Type 9 Record Layout - Creation + Order for Indexed Attributes +
bytebytebytebyte

Heap ID (8 bytes)

Message Flags + This space inserted only to align table nicely
Creation Order
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 9 Record Layout - Creation + Order for Indexed Attributes +
Field NameDescription

Heap ID

+

This is an 8-byte sequence of bytes and is the heap ID for the + attribute in the object’s attribute fractal heap.

+

Message Flags

+

The object header message flags for the attribute message.

+

Creation Order

+

This field is the creation order value for the attribute. +

+
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Layout: Version 2 B-tree, Type 10 Record Layout - + Non-filtered Dataset Chunks +
bytebytebytebyte

AddressO


Dimension 0 Scaled Offset + (8 bytes)


Dimension 1 Scaled Offset + (8 bytes)


...


Dimension #n Scaled Offset + (8 bytes)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 10 Record Layout - + Non-filtered Dataset Chunks +
Field NameDescription

Address

+

This field is the address of the dataset chunk in the file.

+

Dimension #n Scaled Offset

+

This field is the scaled offset of the chunk within the + dataset. n is the number of dimensions for the + dataset. The first scaled offset stored in the list is for + the slowest changing dimension, and the last scaled offset + stored is for the fastest changing dimension. Scaled offset + is calculated by dividing the chunk dimension sizes into + the chunk offsets.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Layout: Version 2 B-tree, Type 11 Record Layout - Filtered + Dataset Chunks +
bytebytebytebyte

AddressO


Chunk Size + (variable size; at most 8 bytes)

Filter Mask

Dimension 0 Scaled Offset + (8 bytes)


Dimension 1 Scaled Offset + (8 bytes)


...


Dimension #n Scaled Offset + (8 bytes)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 B-tree, Type 11 Record Layout - Filtered + Dataset Chunks +
Field NameDescription

Address

+

This field is the address of the dataset chunk in the file.

+

Chunk Size

+

This field is the size of the dataset chunk in bytes.

+

Filter Mask

+

This field is the filter mask which indicates the filter + to skip for the dataset chunk. Each filter has an index + number in the pipeline and if that filter is skipped, + the bit corresponding to its index is set.

+

Dimension #n Scaled Offset

+

This field is the scaled offset of the chunk within + the dataset. n is the number of dimensions for + the dataset. The first scaled offset stored in the list + is for the slowest changing dimension, and the last scaled + offset stored is for the fastest changing dimension.

+
+
+ +

+ III.B. Disk Format: Level 1B - Group Symbol Table Nodes

+ +

A group is an object internal to the file that allows + arbitrary nesting of objects within the file (including other + groups). A group maps a set of link names in the group to a set + of relative file addresses of objects in the file. Certain metadata + for an object to which the group points can be cached in the + group’s symbol table entry in addition to being in the + object’s header.

+ +

An HDF5 object name space can be stored hierarchically by + partitioning the name into components and storing each + component as a link in a group. The link for a + non-ultimate component points to the group containing + the next component. The link for the last + component points to the object being named.

+ +

One implementation of a group is a collection of symbol table + nodes indexed by a B-tree. Each symbol table node contains entries + for one or more links. If an attempt is made to add a link to an + already full symbol table node containing 2K entries, then + the node is split and one node contains K symbols and the + other contains K+1 symbols.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Symbol Table Node (A Leaf of a B-tree) +
bytebytebytebyte
Signature
Version NumberReserved (zero)Number of Symbols


Group Entries


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Symbol Table Node (A Leaf of a B-tree) +
Field NameDescription

Signature

+

The ASCII character string “SNOD” is + used to indicate the + beginning of a symbol table node. This gives file + consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version Number

+

The version number for the symbol table node. This + document describes version 1. (There is no version ‘0’ + of the symbol table node) +

+

Number of Entries

+

Although all symbol table nodes have the same length, + most contain fewer than the maximum possible number of + link entries. This field indicates how many entries + contain valid data. The valid entries are packed at the + beginning of the symbol table node while the remaining + entries contain undefined values. +

+

Symbol Table Entries

+

Each link has an entry in the symbol table node. + The format of the entry is described below. + There are 2K entries in each group node, where + K is the “Group Leaf Node K” value from the + superblock. +

+
+
+ +

+ III.C. Disk Format: Level 1C - Symbol Table Entry

+ +

Each symbol table entry in a symbol table node is designed + to allow for very fast browsing of stored objects. + Toward that design goal, the symbol table entries + include space for caching certain constant metadata from the + object header.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Symbol Table Entry +
bytebytebytebyte

Link Name OffsetO


Object Header AddressO

Cache Type
Reserved (zero)


Scratch-pad Space + (16 bytes)


+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Symbol Table Entry +
Field NameDescription

Link Name Offset

+

This is the byte offset into the group’s local + heap for the name of the link. The name is null + terminated. +

+

Object Header Address

+

Every object has an object header which serves as a + permanent location for the object’s metadata. In addition + to appearing in the object header, some of the object’s metadata + can be cached in the scratch-pad space. +

+

Cache Type

+

The cache type is determined from the object header. + It also determines the format for the scratch-pad space: + + + + + + + + + + + + + + + + + + +
TypeDescription
0No data is cached by the group entry. This + is guaranteed to be the case when an object header + has a link count greater than one. +
1Group object header metadata is cached in the + scratch-pad space. This implies that the symbol table + entry refers to another group. +
2The entry is a symbolic link. The first four bytes + of the scratch-pad space are the offset into the local + heap for the link value. The object header address + will be undefined. +

+ +

Reserved

+

These four bytes are present so that the scratch-pad + space is aligned on an eight-byte boundary. They are + always set to zero. +

+

Scratch-pad Space

+

This space is used for different purposes, depending + on the value of the Cache Type field. Any metadata + about an object represented in the scratch-pad + space is duplicated in the object header for that + object. +

+

+ Furthermore, no data is cached in the group + entry scratch-pad space if the object header for + the object has a link count greater than one. +

+
+
+ +

Format of the Scratch-pad Space

+ +

The symbol table entry scratch-pad space is formatted + according to the value in the Cache Type field.

+ +

If the Cache Type field contains the value zero + (0) then no information is + stored in the scratch-pad space.

+ +

If the Cache Type field contains the value one + (1), then the scratch-pad space + contains cached metadata for another object header + in the following format:

+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Object Header Scratch-pad Format +
bytebytebytebyte

Address of B-treeO


Address of Name HeapO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Object Header Scratch-pad Format +
Field NameDescription

Address of B-tree

+

This is the file address for the root of the + group’s B-tree. +

+

Address of Name Heap

+

This is the file address for the group’s local + heap, in which are stored the group’s symbol names. +

+
+
+ + +
+
+
+

If the Cache Type field contains the value two + (2), then the scratch-pad space + contains cached metadata for a symbolic link + in the following format:

+ +
+ + + + + + + + + + + + + +
+ Layout: Symbolic Link Scratch-pad Format +
bytebytebytebyte
Offset to Link Value
+
+ +
+
+ + + + + + + + + + + +
+ Fields: Symbolic Link Scratch-pad Format +
Field NameDescription

Offset to Link Value

+

The value of a symbolic link (that is, the name of the + thing to which it points) is stored in the local heap. + This field is the 4-byte offset into the local heap for + the start of the link value, which is null terminated. +

+
+
+ +

+ III.D. Disk Format: Level 1D - Local Heaps

+ +

A local heap is a collection of small pieces of data that are particular + to a single object in the HDF5 file. Objects can be + inserted and removed from the heap at any time. + The address of a heap does not change once the heap is created. + For example, a group stores addresses of objects in symbol table nodes + with the names of links stored in the group’s local heap. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Local Heap +
bytebytebytebyte
Signature
VersionReserved (zero)

Data Segment SizeL


Offset to Head of Free-listL


Address of Data SegmentO

+ + + + + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Local Heap +
Field NameDescription

Signature

+

The ASCII character string “HEAP” + is used to indicate the + beginning of a heap. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

Each local heap has its own version number so that new + heaps can be added to old files. This document + describes version zero (0) of the local heap. +

+

Data Segment Size

+

The total amount of disk memory allocated for the heap + data. This may be larger than the amount of space + required by the objects stored in the heap. The extra + unused space in the heap holds a linked list of free blocks. +

+

Offset to Head of Free-list

+

This is the offset within the heap data segment of the + first free block (or the + undefined address if there is no + free block). The free block contains + Size of Lengths bytes that + are the offset of the next free block (or the + value ‘1’ if this is the + last free block) followed by Size of Lengths bytes that store + the size of this free block. The size of the free block includes + the space used to store the offset of the next free block and + the size of the current block, making the minimum size of a free + block 2 * Size of Lengths. +

+

Address of Data Segment

+

The data segment originally starts immediately after + the heap header, but if the data segment must grow as a + result of adding more objects, then the data segment may + be relocated, in its entirety, to another part of the + file. +

+
+
+ +

Objects within a local heap should be aligned on an 8-byte boundary.

+ +

+ III.E. Disk Format: Level 1E - Global Heap

+ +

Each HDF5 file has a global heap which stores various types of + information which is typically shared between datasets. The + global heap was designed to satisfy these goals:

+ +
    +
  1. Repeated access to a heap object must be efficient without + resulting in repeated file I/O requests. Since global heap + objects will typically be shared among several datasets, it is + probable that the object will be accessed repeatedly.
  2. +
  3. Collections of related global heap objects should result in + fewer and larger I/O requests. For instance, a dataset of + object references will have a global heap object for each + reference. Reading the entire set of object references + should result in a few large I/O requests instead of one small + I/O request for each reference.
  4. +
  5. It should be possible to remove objects from the global heap + and the resulting file hole should be eligible to be reclaimed + for other uses.
  6. +
+ + +

The implementation of the heap makes use of the memory management + already available at the file level and combines that with a new + object called a collection to achieve goal B. The global heap + is the set of all collections. Each global heap object belongs to + exactly one collection, and each collection contains one or more global + heap objects. For the purposes of disk I/O and caching, a collection is + treated as an atomic object, addressing goal A. +

+ +

When a global heap object is deleted from a collection (which + occurs when its reference count falls to zero), objects located + after the deleted object in the collection are packed down toward + the beginning of the collection, and the collection’s + global heap object 0 is created (if possible), or its size is + increased to account for the recently freed space. There are + no gaps between objects in each collection, with the possible + exception of the final space in the collection, if it is not + large enough to hold the header for the collection’s + global heap object 0. These features address goal C. +

+ +

The HDF5 Library creates global heap collections as needed, so there may + be multiple collections throughout the file. The set of all of them is + abstractly called the “global heap”, although they do not actually link + to each other, and there is no global place in the file where you can + discover all of the collections. The collections are found simply by + finding a reference to one through another object in the file. For + example, data of variable-length datatype elements is stored in the + global heap and is accessed via a global heap ID. The format for + global heap IDs is described at the end of this section. +

+ +

For more information on global heaps for virtual datasets, see + “Disk Format: Level 1F - Global Heap + Block for Virtual Datasets.”

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: A Global Heap Collection +
bytebytebytebyte
Signature
VersionReserved (zero)

Collection SizeL


Global Heap Object 1


Global Heap Object 2


...


Global Heap Object N


Global Heap Object 0 (free space)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: A Global Heap Collection +
Field NameDescription

Signature

+

The ASCII character string “GCOL” + is used to indicate the + beginning of a collection. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

Each collection has its own version number so that new + collections can be added to old files. This document + describes version one (1) of the collections (there is no + version zero (0)). +

+

Collection Size

+

This is the size in bytes of the entire collection + including this field. The default (and minimum) + collection size is 4096 bytes which is a typical file + system block size. This allows for 127 16-byte heap + objects plus their overhead (the collection header of 16 bytes + and the 16 bytes of information about each heap object). +

+

Global Heap Object 1 through N

+

The objects are stored in any order with no + intervening unused space. +

+

Global Heap Object 0

+

Global Heap Object 0 (zero), when present, represents the free + space in the collection. Free space always appears at the end of + the collection. If the free space is too small to store the header + for Object 0 (described below) then the header is implied and is not + written. +

+ The field Object Size for Object 0 indicates the + amount of possible free space in the collection including the 16-byte + header size of Object 0. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Global Heap Object +
bytebytebytebyte
Heap Object IndexReference Count
Reserved (zero)

Object SizeL


Object Data

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Global Heap Object +
Field NameDescription

Heap Object Index

+

Each object has a unique identification number within a + collection. The identification numbers are chosen so that + new objects have the smallest value possible with the + exception that the identifier 0 always refers to the + object which represents all free space within the + collection. +

+

Reference Count

+

All heap objects have a reference count field. An + object which is referenced from some other part of the + file will have a positive reference count. The reference + count for Object 0 is always zero. +

+

Reserved

+

Zero padding to align next field on an 8-byte boundary. +

+

Object Size

+

This is the size of the object data stored for the object. + The actual storage space allocated for the object data is rounded + up to a multiple of eight. +

+

Object Data

+

The object data is treated as a one-dimensional array + of bytes to be interpreted by the caller. +

+
+ +
+ +
+
+
+

+ + The format for the ID used to locate an object in the global heap is + described here:

+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Global Heap ID +
bytebytebytebyte

Collection AddressO

Object Index
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Global Heap ID +
Field NameDescription

Collection Address

+

This field is the address of the global heap collection + where the data object is stored. +

+

ID

+

This field is the index of the data object within the + global heap collection. +

+
+
+ + + +

III.F. Disk Format: Level 1F - Global + Heap Block for Virtual Datasets

+ +

The layout for the global heap block used with virtual datasets is + described below. For more information on global heaps, see + “Disk Format: Level 1E - Global Heap.”

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Global Heap Block for Virtual Dataset +
bytebytebytebyte
VersionThis space inserted + only to align table nicely

Num EntriesL


Source Filename #1 (variable size)


Source Dataset #1 (variable + size)


Source Selection #1 (variable + size)


Virtual Selection #1 (variable + size)

.
.
.

Source Filename #n (variable + size)


Source Dataset #n (variable + size)


Source Selection #n (variable + size)


Virtual Selection #n (variable + size)

Checksum
+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Global Heap Block for Virtual Dataset +
Field NameDescription

Version

+

The version number for the block; the value is 0.

+

Num Entries

The number of entries in the block.

+

Source Filename #n

+

The source file name where the source dataset is located. +

+

Source Dataset #n

The source dataset name that is mapped to the + virtual dataset.

Source Selection #n

+

The dataspace selection in the + source dataset that is mapped to the virtual selection. +

+

Virtual Selection #n

+

This is the dataspace selection in the virtual dataset that is + mapped to the source selection. +

+

Checksum

+

This is the checksum for the block.

+
+
+
+ +

+ III.G. Disk Format: Level 1G - Fractal Heap

+ +

+ Each fractal heap consists of a header and zero or more direct and + indirect blocks (described below). The header contains general + information as well as + initialization parameters for the doubling table. The Address + of Root Block field in the header points to the first direct or + indirect block in the heap. +

+ +

+ Fractal heaps are based on a data structure called a doubling + table. A doubling table provides a mechanism for quickly + extending an array-like data structure that minimizes the number of + empty blocks in the heap, while retaining very fast lookup of any + element within the array. More information on fractal heaps and + doubling tables can be found in the RFC + “Private + Heaps in HDF5.” +

+ +

+ The fractal heap implements the doubling table structure with + indirect and direct blocks. + Indirect blocks in the heap do not actually contain data for + objects in the heap, their “size” is abstract - + they represent the indexing structure for locating the + direct blocks in the doubling table. + Direct blocks + contain the actual data for objects stored in the heap. +

+ +

+ All indirect blocks have a constant number of block entries in each + row, called the width of the doubling table + (see Table Width field in the header). + + The number + of rows for each indirect block in the heap is determined by the + size of the block that the indirect block represents in the + doubling table (calculation of this is shown below) and is + constant, except for the “root” + indirect block, which expands and shrinks its number of rows as + needed. +

+ +

+ Blocks in the first two rows of an indirect block + are Starting Block Size number of bytes in size. + For example, if the row width of the doubling table is 4, + then the first eight block entries in the + indirect block are Starting Block Size number of bytes in size. + The blocks in each subsequent row are twice the size of + the blocks in the previous row. In other words, blocks in + the third row are twice the Starting Block Size, + blocks in the fourth row are four times the + Starting Block Size, and so on. Entries for + blocks up to the Maximum Direct Block Size point to + direct blocks, and entries for blocks greater than that size + point to further indirect blocks (which have their own + entries for direct and indirect blocks). + Starting Block Size and + Maximum Direct Block Size are fields + stored in the header. +

+ +

+ The number of rows of blocks, nrows, in an + indirect block is calculated by the following expression: +

+ nrows = (log2(block_size) - + log2(<Starting Block Size>)) + 1 +

+where block_size is the size of the block that the indirect block +represents in the doubling table. +For example, to represent a block with block_size equals to 1024, +and Starting Block Size equals to 256, +three rows are needed. +

+ The maximum number of rows of direct blocks, max_dblock_rows, + in any indirect block of a fractal heap is given by the + following expression: +

+ max_dblock_rows = + (log2(<Maximum Direct Block Size>) - + log2(<Starting Block Size>)) + 2 +

+

+ Using the computed values for nrows and + max_dblock_rows, along with the width of the + doubling table, the number of direct and indirect block entries + (K and N in the indirect block description, below) + in an indirect block can be computed: +

+ K = MIN(nrows, max_dblock_rows) * + <Table Width> + +

+ If nrows is less than or equal to max_dblock_rows, + N is 0. Otherwise, N is simply computed: +

+ N = K - (max_dblock_rows * + <Table Width>) +

+ +

+ The size of indirect blocks on disk is determined by the number + of rows in the indirect block (computed above). The size of direct + blocks on disk is exactly the size of the block in the doubling + table. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap Header +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely
Heap ID LengthI/O Filters’ Encoded Length
FlagsThis space inserted only to align table nicely
Maximum Size of Managed Objects

Next Huge Object IDL


v2 B-tree Address of Huge ObjectsO


Amount of Free Space in Managed BlocksL


Address of Managed Block Free Space ManagerO


Amount of Managed Space in HeapL


Amount of Allocated Managed Space in HeapL


Offset of Direct Block Allocation Iterator in Managed SpaceL


Number of Managed Objects in HeapL


Size of Huge Objects in HeapL


Number of Huge Objects in HeapL


Size of Tiny Objects in HeapL


Number of Tiny Objects in HeapL

Table WidthThis space inserted only to align table nicely

Starting Block SizeL


Maximum Direct Block SizeL

Maximum Heap SizeStarting # of Rows in Root Indirect Block

Address of Root BlockO

Current # of Rows in Root Indirect BlockThis space inserted only to align table nicely

Size of Filtered Root Direct Block (optional)L

I/O Filter Mask (optional)
I/O Filter Information (optional, variable size)
Checksum
+ + + + + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap Header +
Field NameDescription

Signature

+

The ASCII character string “FRHP” + is used to indicate the + beginning of a fractal heap header. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

This document describes version 0.

+

Heap ID Length

+

This is the length in bytes of heap object IDs for this heap.

+

I/O Filters’ Encoded Length

+

This is the size in bytes of the encoded I/O Filter Information. +

+

Flags

+

This field is the heap status flag and is a bit field + indicating additional information about the fractal heap. + + + + + + + + + + + + + + + + + + +
Bit(s)Description
0If set, the ID value to use for huge object has wrapped + around. If the value for the Next Huge Object ID + has wrapped around, each new huge object inserted into the + heap will require a search for an ID value. +
1If set, the direct blocks in the heap are checksummed. +
2-7Reserved

+ +

Maximum Size of Managed Objects

+

This is the maximum size of managed objects allowed in the heap. + Objects greater than this this are ‘huge’ objects and will be + stored in the file directly, rather than in a direct block for + the heap. +

+

Next Huge Object ID

+

This is the next ID value to use for a huge object in the heap. +

+

v2 B-tree Address of Huge Objects

+

This is the address of the v2 B-tree + used to track huge objects in the heap. The type of records + stored in the v2 B-tree will + be determined by whether the address and length of a huge object + can fit into a heap ID (if yes, it is a “directly” accessed + huge object) and whether there is a filter used on objects + in the heap. +

+

Amount of Free Space in Managed Blocks

+

This is the total amount of free space in managed direct blocks + (in bytes). +

+

Address of Managed Block Free Space Manager

+

This is the address of the + Free-space Manager for + managed blocks. +

+

Amount of Managed Space in Heap

+

This is the total amount of managed space in the heap (in bytes), + essentially the upper bound of the heap’s linear address space. +

+

Amount of Allocated Managed Space in Heap

+

This is the total amount of managed space (in bytes) actually + allocated in + the heap. This can be less than the Amount of Managed Space + in Heap field, if some direct blocks in the heap’s linear + address space are not allocated. +

+

Offset of Direct Block Allocation Iterator in Managed Space

+

This is the linear heap offset where the next direct + block should be allocated at (in bytes). This may be less than + the Amount of Managed Space in Heap value because the + heap’s address space is increased by a “row” of direct blocks + at a time, rather than by single direct block increments. +

+

Number of Managed Objects in Heap

+

This is the number of managed objects in the heap. +

+

Size of Huge Objects in Heap

+

This is the total size of huge objects in the heap (in bytes). +

+

Number of Huge Objects in Heap

+

This is the number of huge objects in the heap. +

+

Size of Tiny Objects in Heap

+

This is the total size of tiny objects that are packed in heap + IDs (in bytes). +

+

Number of Tiny Objects in Heap

+

This is the number of tiny objects that are packed in heap IDs. +

+

Table Width

+

This is the number of columns in the doubling table for managed + blocks. This value must be a power of two. +

+

Starting Block Size

+

This is the starting block size to use in the doubling table for + managed blocks (in bytes). This value must be a power of two. +

+

Maximum Direct Block Size

+

This is the maximum size allowed for a managed direct block. + Objects inserted into the heap that are larger than this value + (less the number of bytes of direct block prefix/suffix) + are stored as ‘huge’ objects. This value must be a power of + two. +

+

Maximum Heap Size

+

This is the maximum size of the heap’s linear address space for + managed objects (in bytes). The value stored is the log2 of + the actual value, that is: the number of bits of the address space. + ‘Huge’ and ‘tiny’ objects are not counted in this value, since + they do not store objects in the linear address space of the + heap. +

+

Starting # of Rows in Root Indirect Block

+

This is the starting number of rows for the root indirect block. + A value of 0 indicates that the root indirect block will have + the maximum number of rows needed to address the heap’s Maximum + Heap Size. +

+

Address of Root Block

+

This is the address of the root block for the heap. It can + be the undefined address if + there is no data in the heap. It either points to a direct + block (if the Current # of Rows in the Root Indirect + Block value is 0), or an indirect block. +

+

Current # of Rows in Root Indirect Block

+

This is the current number of rows in the root indirect block. + A value of 0 indicates that Address of Root Block + points to direct block instead of indirect block. +

+

Size of Filtered Root Direct Block

+

This is the size of the root direct block, if filters are + applied to heap objects (in bytes). This field is only + stored in the header if the I/O Filters’ Encoded Length + is greater than 0. +

+

I/O Filter Mask

+

This is the filter mask for the root direct block, if filters + are applied to heap objects. This mask has the same format as + that used for the filter mask in chunked raw data records in a + v1 B-tree. + This field is only + stored in the header if the I/O Filters’ Encoded Length + is greater than 0. +

+

I/O Filter Information

+

This is the I/O filter information encoding direct blocks and + huge objects, if filters are applied to heap objects. This + field is encoded as a Filter Pipeline + message. + The size of this field is determined by I/O Filters’ + Encoded Length. +

+

Checksum

+

This is the checksum for the header.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap Direct Block +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Heap Header AddressO

Block Offset (variable size)
Checksum (optional)

Object Data (variable size)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap Direct Block +
Field NameDescription

Signature

+

The ASCII character string “FHDB” + is used to indicate the + beginning of a fractal heap direct block. This gives file consistency + checking utilities a better chance of reconstructing a + damaged file. +

+

Version

+

This document describes version 0.

+

Heap Header Address

+

This is the address for the fractal heap header that this + block belongs to. This field is principally used for file + integrity checking. +

+

Block Offset

+

This is the offset of the block within the fractal heap’s + address space (in bytes). The number of bytes used to encode + this field is the Maximum Heap Size (in the heap’s + header) divided by 8 and rounded up to the next highest integer, + for values that are not a multiple of 8. This value is + principally used for file integrity checking. +

+

Checksum

+

This is the checksum for the direct block.

+

This field is only present if bit 1 of Flags in the + heap’s header is set.

+

Object Data

+

This section of the direct block stores the actual data for + objects in the heap. The size of this section is determined by + the direct block’s size minus the size of the other fields + stored in the direct block (for example, the Signature, + Version, and others including the Checksum if it is + present). +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap Indirect Block +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Heap Header AddressO

Block Offset (variable size)

Child Direct Block #0 AddressO


Size of Filtered Direct Block #0 (optional) L

Filter Mask for Direct Block #0 (optional)

Child Direct Block #1 AddressO


Size of Filtered Direct Block #1 (optional)L

Filter Mask for Direct Block #1 (optional)
...

Child Direct Block #K-1 AddressO


Size of Filtered Direct Block #K-1 (optional)L

Filter Mask for Direct Block #K-1 (optional)

Child Indirect Block #0 AddressO


Child Indirect Block #1 AddressO

...

Child Indirect Block #N-1 AddressO

Checksum
+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap Indirect Block +
Field NameDescription

Signature

+

The ASCII character string “FHIB” is used to + indicate the beginning of a fractal heap indirect block. This + gives file consistency checking utilities a better chance of + reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Heap Header Address

+

This is the address for the fractal heap header that this + block belongs to. This field is principally used for file + integrity checking. +

+

Block Offset

+

This is the offset of the block within the fractal heap’s + address space (in bytes). The number of bytes used to encode + this field is the Maximum Heap Size (in the heap’s + header) divided by 8 and rounded up to the next highest integer, + for values that are not a multiple of 8. This value is + principally used for file integrity checking. +

+

Child Direct Block #K Address

+

This field is the address of the child direct block. + The size of the [uncompressed] direct block can be computed by + its offset in the heap’s linear address space. +

+

Size of Filtered Direct Block #K

+

This is the size of the child direct block after passing through + the I/O filters defined for this heap (in bytes). If no I/O + filters are present for this heap, this field is not present. +

+

Filter Mask for Direct Block #K

+

This is the I/O filter mask for the filtered direct block. + This mask has the same format as that used for the filter mask + in chunked raw data records in a v1 B-tree. + If no I/O filters are present for this heap, this field is not + present. +

+

Child Indirect Block #N Address

+

This field is the address of the child indirect block. + The size of the indirect block can be computed by + its offset in the heap’s linear address space. +

+

Checksum

+

This is the checksum for the indirect block.

+
+ +
+ +
+

An object in the fractal heap is identified by means of a fractal heap ID, + which encodes information to locate the object in the heap. + Currently, the fractal heap stores an object in one of three ways, + depending on the object’s size:

+ +
+ + + + + + + + + + + + + + + + + + + + +
TypeDescription
Tiny +

When an object is small enough to be encoded in the + heap ID, the object’s data is embedded in the fractal + heap ID itself. There are two sub-types for this type of + object: normal and extended. The sub-type for tiny heap + IDs depends on whether the heap ID is large enough to + store objects greater than 16 bytes or not. If the + heap ID length is 18 bytes or smaller, the + ‘normal’ tiny heap ID form is used. If the + heap ID length is greater than 18 bytes in length, the + “extended” form is used. See the format + description below for both sub-types. +

+
Huge +

When the size of an object is larger than Maximum Size of + Managed Objects in the Fractal Heap Header, the + object’s data is stored on its own in the file and the object + is tracked/indexed via a version 2 B-tree. All huge objects + for a particular fractal heap use the same v2 B-tree. All huge + objects for a particular fractal heap use the same format for + their huge object IDs. +

+ +

Depending on whether the IDs for a heap are large enough to hold + the object’s retrieval information and whether I/O pipeline filters + are applied to the heap’s objects, 4 sub-types are derived for + huge object IDs for this heap:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Sub-typeDescription
Directly accessed, non-filtered +

The object’s address and length are embedded in the + fractal heap ID itself and the object is directly accessed + from them. This allows the object to be accessed without + resorting to the B-tree. +

+
Directly accessed, filtered +

The filtered object’s address, length, filter mask and + de-filtered size are embedded in the fractal heap ID itself + and the object is accessed directly with them. This allows + the object to be accessed without resorting to the B-tree. +

+
Indirectly accessed, non-filtered +

The object is located by using a B-tree key embedded in + the fractal heap ID to retrieve the address and length from + the version 2 B-tree for huge objects. Then, the address + and length are used to access the object. +

+
Indirectly accessed, filtered +

The object is located by using a B-tree key embedded in + the fractal heap ID to retrieve the filtered object’s + address, length, filter mask and de-filtered size from the + version 2 B-tree for huge objects. Then, this information + is used to access the object. +

+
+
+ +
Managed +

When the size of an object does not meet the above two + conditions, the object is stored and managed via the direct and + indirect blocks based on the doubling table. +

+
+
+ + +
+

The specific format for each type of heap ID is described below: +

+ +
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Tiny Objects (Sub-type 1 - + ‘Normal’) +
bytebytebytebyte
Version, Type, and LengthThis space inserted only to align table nicely

Data (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Tiny Objects (Sub-type 1 - + ‘Normal’) +
Field NameDescription

Version, Type, and Length

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Tiny objects have a value of 2. +
0-3The length of the tiny object. The value stored + is one less than the actual length (since zero-length + objects are not allowed to be stored in the heap). + For example, an object of actual length 1 has an + encoded length of 0, an object of actual length 2 + has an encoded length of 1, and so on. +

+ +

Data

+

This is the data for the object. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Tiny Objects (Sub-type 2 - + ‘Extended’) +
bytebytebytebyte
Version, Type, and LengthExtended LengthThis space inserted only to align table nicely
Data (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Tiny Objects (Sub-type 2 - + ‘Extended’) +
Field NameDescription

Version, Type, and Length

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Tiny objects have a value of 2. +
0-3These 4 bits, together with the next byte, form an + unsigned 12-bit integer for holding the length of the + object. These 4-bits are bits 8-11 of the 12-bit integer. + See description for the Extended Length field below. +

+ +

Extended Length

+

This byte, together with the 4 bits in the previous byte, + forms an unsigned 12-bit integer for holding the length of + the tiny object. These 8 bits are bits 0-7 of the 12-bit + integer formed. The value stored is one less than the actual + length (since zero-length objects are not allowed to be + stored in the heap). For example, an object of actual length + 1 has an encoded length of 0, an object of actual length + 2 has an encoded length of 1, and so on. +

+

Data

+

This is the data for the object. +

+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Huge Objects (Sub-types 1 and 2): + Indirectly Accessed, Non-filtered/Filtered +
bytebytebytebyte
Version and TypeThis space inserted + only to align table nicely

v2 B-tree KeyL (variable size)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Huge Objects (Sub-types 1 and 2): + Indirectly Accessed, Non-filtered/Filtered +
Field NameDescription

Version and Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

v2 B-tree Key

This field is the B-tree key for retrieving the information + from the version 2 B-tree for huge objects needed to access the + object. See the description of v2 B-tree + records sub-types 1 and 2 for a description of the fields. New key + values are derived from Next Huge Object ID in the + Fractal Heap Header.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Huge Objects (Sub-type 3): + Directly Accessed, Non-filtered +
bytebytebytebyte
Version and TypeThis space inserted only to align table nicely

Address O


Length L

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Huge Objects (Sub-type 3): + Directly Accessed, Non-filtered +
Field NameDescription

Version and Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

Address

This field is the address of the object in the file.

+

Length

This field is the length of the object in the file.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Huge Objects (Sub-type 4): + Directly Accessed, Filtered +
bytebytebytebyte
Version and TypeThis space inserted only to align table nicely

Address O


Length L

Filter Mask

De-filtered Size L

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Huge Objects (Sub-type 4): + Directly Accessed, Filtered +
Field NameDescription

Version and Type

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Huge objects have a value of 1. +
0-3Reserved. +

+ +

Address

This field is the address of the filtered object in the file.

+

Length

This field is the length of the filtered object in the file.

+

Filter Mask

This field is the I/O pipeline filter mask for the + filtered object in the file.

+

Filtered Size

This field is the size of the de-filtered object in the file.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap ID for Managed Objects +
bytebytebytebyte
Version and TypeThis space inserted only to align table nicely
Offset (variable size)
Length (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap ID for Managed Objects +
Field NameDescription

Version and Type

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + +
BitDescription
6-7The current version of ID format. This document + describes version 0. +
4-5The ID type. Managed objects have a value of 0. +
0-3Reserved. +

+

Offset

This field is the offset of the object in the heap. + This field’s size is the minimum number of bytes + necessary to encode the Maximum Heap Size value + (from the Fractal Heap Header). For example, if the + value of the Maximum Heap Size is less than 256 bytes, + this field is 1 byte in length, a Maximum Heap Size + of 256-65535 bytes uses a 2 byte length, and so on.

Length

This field is the length of the object in the heap. It + is determined by taking the minimum value of Maximum + Direct Block Size and Maximum Size of Managed + Objects in the Fractal Heap Header. Again, + the minimum number of bytes needed to encode that value is + used for the size of this field.

+
+ +

+ III.H. Disk Format: Level 1H - Free-space Manager

+ +

+ Free-space managers are used to describe space within a heap or + the entire HDF5 file that is not currently used for that heap or + file. +

+ +

+ The free-space manager header contains metadata information + about the space being tracked, along with the address of the list + of free space sections which actually describes the free + space. The header records information about free-space sections being + tracked, creation parameters for handling free-space sections of a + client, and section information used to locate the collection of + free-space sections. +

+ +

+ The free-space section list stores a collection of + free-space sections that is specific to each client of the + free-space manager. + + For example, the fractal heap is a client of the free space manager + and uses it to track unused space within the heap. There are 4 + types of section records for the fractal heap, each of which has + its own format, listed below. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Free-space Manager Header +
bytebytebytebyte
Signature
VersionClient IDThis space inserted only to align table nicely

Total Space TrackedL


Total Number of SectionsL


Number of Serialized SectionsL


Number of Un-Serialized SectionsL

Number of Section ClassesThis space inserted only to align table nicely
Shrink PercentExpand Percent
Size of Address SpaceThis space inserted only to align table nicely

Maximum Section Size L


Address of Serialized Section ListO


Size of Serialized Section List UsedL


Allocated Size of Serialized Section ListL

Checksum
+ + + + + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Free-space Manager Header +
Field NameDescription

Signature

+

The ASCII character string “FSHD” + is used to indicate the beginning of the Free-space Manager + Header. This gives file consistency checking utilities a + better chance of reconstructing a damaged file. +

+

Version

+

This is the version number for the Free-space Manager Header + and this document describes version 0.

+

Client ID

+

This is the client ID for identifying the user of this + free-space manager: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Fractal heap +
1File +
2+Reserved. +

+ +

Total Space Tracked

+

This is the total amount of free space being tracked, in bytes. +

+

Total Number of Sections

+

This is the total number of free-space sections being tracked. +

+

Number of Serialized Sections

+

This is the number of serialized free-space sections being + tracked. +

+

Number of Un-Serialized Sections

+

This is the number of un-serialized free-space sections being + managed. Un-serialized sections are created by the free-space + client when the list of sections is read in. +

+

Number of Section Classes

+

This is the number of section classes handled by this free space + manager for the free-space client. +

+

Shrink Percent

+

This is the percent of current size to shrink the allocated + serialized free-space section list. +

+

Expand Percent

+

This is the percent of current size to expand the allocated + serialized free-space section list. +

+

Size of Address Space

+

This is the size of the address space that free-space sections + are within. This is stored as the log2 of the + actual value (in other words, the number of bits required + to store values within that address space). +

+

Maximum Section Size

+

This is the maximum size of a section to be tracked. +

+

Address of Serialized Section List

+

This is the address where the serialized free-space section + list is stored. +

+

Size of Serialized Section List Used

+

This is the size of the serialized free-space section + list used (in bytes). This value must be less than + or equal to the allocated size of serialized section + list, below. +

+

Allocated Size of Serialized Section List

+

This is the size of serialized free-space section list + actually allocated (in bytes). +

+

Checksum

+

This is the checksum for the free-space manager header.

+
+
+ +
+

The free-space sections being managed are stored in a + free-space section list, described below. The sections + in the free-space section list are stored in the following way: + a count of the number of sections describing a particular size of + free space and the size of the free-space described (in bytes), + followed by a list of section description records; then another + section count and size, followed by the list of section + descriptions for that size; and so on.

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Free-space Section List +
bytebytebytebyte
Signature
VersionThis space inserted only to align table nicely

Free-space Manager Header AddressO

Number of Section Records in Set #0 (variable size)
Size of Free-space Section Described in Record Set #0 (variable size)
Record Set #0 Section Record #0 Offset(variable size)
Record Set #0 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #0 Section Record #0 Data (variable size)
...
Record Set #0 Section Record #K-1 Offset(variable size)
Record Set #0 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #0 Section Record #K-1 Data (variable size)
Number of Section Records in Set #1 (variable size)
Size of Free-space Section Described in Record Set #1 (variable size)
Record Set #1 Section Record #0 Offset(variable size)
Record Set #1 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #1 Section Record #0 Data (variable size)
...
Record Set #1 Section Record #K-1 Offset(variable size)
Record Set #1 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #1 Section Record #K-1 Data (variable size)
...
...
Number of Section Records in Set #N-1 (variable size)
Size of Free-space Section Described in Record Set #N-1 (variable size)
Record Set #N-1 Section Record #0 Offset(variable size)
Record Set #N-1 Section Record #0 TypeThis space inserted only to align table nicely
Record Set #N-1 Section Record #0 Data (variable size)
...
Record Set #N-1 Section Record #K-1 Offset(variable size)
Record Set #N-1 Section Record #K-1 TypeThis space inserted only to align table nicely
Record Set #N-1 Section Record #K-1 Data (variable size)
Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Free-space Section List +
Field NameDescription

Signature

+

The ASCII character string “FSSE” + is used to indicate the beginning of the Free-space Section + Information. This gives file consistency checking utilities + a better chance of reconstructing a damaged file. +

+

Version

+

This is the version number for the Free-space Section List + and this document describes version 0.

+

Free-space Manager Header Address

+

This is the address of the Free-space Manager Header. + This field is principally used for file + integrity checking. +

+

Number of Section Records for Set #N

+

This is the number of free-space section records for set #N. + The length of this field is the minimum number of bytes needed + to store the number of serialized sections (from the + free-space manager header). +

+ +

+ The number of sets of free-space section records is + determined by the size of serialized section list in + the free-space manager header. +

+

Section Size for Record Set #N

+

This is the size (in bytes) of the free-space section described + for all the section records in set #N. +

+ +

+ The length of this field is the minimum number of bytes needed + to store the maximum section size (from the + free-space manager header). +

+

Record Set #N Section #K Offset

+

This is the offset (in bytes) of the free-space section within + the client for the free-space manager. +

+ +

+ The length of this field is the minimum number of bytes needed + to store the size of address space (from the + free-space manager header). +

+

Record Set #N Section #K Type

+

This is the type of the section record, used to decode the + record set #N section #K data information. The defined + record type for file client is: + + + + + + + + + + + + + + + +
TypeDescription
0File’s section (a range of actual bytes in file) +
1+Reserved. +

+ +

The defined record types for a fractal heap client are: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
0Fractal heap “single” section +
1Fractal heap “first row” section +
2Fractal heap “normal row” section +
3Fractal heap “indirect” section +
4+Reserved. +

+ +

Record Set #N Section #K Data

+

This is the section-type specific information for each record + in the record set, described below. +

+

Checksum

+

This is the checksum for the Free-space Section List. +

+
+
+ +
+

+ The section-type specific data for each free-space section record is + described below: +

+ +
+ + + + + + +
+ Layout: File’s Section Data Record +
No additional record data stored
+
+ +
+
+
+
+ + + + + + +
+ Layout: Fractal Heap “Single” Section Data Record +
No additional record data stored
+
+ +
+
+
+
+ + + + + + +
+ Layout: Fractal Heap “First Row” Section Data + Record +
Same format as “indirect” + section data
+
+ +
+
+
+
+ + + + + + +
+ Layout: Fractal Heap “Normal Row” Section Data + Record +
No additional record data stored
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fractal Heap “Indirect” Section + Data Record +
bytebytebytebyte
Fractal Heap Indirect Block Offset (variable size)
Block Start RowBlock Start Column
Number of BlocksThis space inserted only to align table nicely
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fractal Heap “Indirect” Section + Data Record +
Field NameDescription

Fractal Heap Block Offset

+

The offset of the indirect block in the fractal heap’s address + space containing the empty blocks. +

+

+ The number of bytes used to encode this field is the minimum + number of bytes needed to encode values for the Maximum + Heap Size (in the fractal heap’s header). +

+

Block Start Row

+

This is the row that the empty blocks start in. +

+

Block Start Column

+

This is the column that the empty blocks start in. +

+

Number of Blocks

+

This is the number of empty blocks covered by the section. +

+
+
+ +

+ III.I. Disk Format: Level 1I - Shared Object Header Message Table

+ +

+ The shared object header message table is used to locate + object + header messages that are shared between two or more object headers + in the file. Shared object header messages are stored and indexed + in the file in one of two ways: indexed sequentially in a + shared header message list or indexed with a v2 B-tree. + The shared messages themselves are either stored in a fractal + heap (when two or more objects share the message), or remain in an + object’s header (when only one object uses the message currently, + but the message can be shared in the future). +

+ +

+ The shared object header message table + contains a list of shared message index headers. Each index header + records information about the version of the index format, the index + storage type, flags for the message types indexed, the number of + messages in the index, the address where the index resides, + and the fractal heap address if shared messages are stored there. +

+ +

+ Each index can be either a list or a v2 B-tree and may transition + between those two forms as the number of messages in the index + varies. Each shared message record contains information used to + locate the shared message from either a fractal heap or an object + header. The types of messages that can be shared are: Dataspace, + Datatype, Fill Value, Filter Pipeline and Attribute. +

+ +

+ The shared object header message table is pointed to + from a shared message table message + in the superblock extension for a file. This message stores the + version of the table format, along with the number of index headers + in the table. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Object Header Message Table +
bytebytebytebyte
Signature
Version for index #0Index Type for index #0Message Type Flags for index #0
Minimum Message Size for index #0
List Cutoff for index #0v2 B-tree Cutoff for index #0
Number of Messages for index #0This space inserted only to align table nicely

Index AddressO for index #0


Fractal Heap AddressO for index #0

...
...
Version for index #N-1Index Type for index #N-1Message Type Flags for index #N-1
Minimum Message Size for index #N-1
List Cutoff for index #N-1v2 B-tree Cutoff for index #N-1
Number of Messages for index #N-1This space inserted only to align table nicely

Index AddressO for index #N-1


Fractal Heap AddressO for index #N-1

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Object Header Message Table +
Field NameDescription

Signature

+

The ASCII character string “SMTB” + is used to indicate the beginning of the Shared Object + Header Message table. This gives file consistency checking + utilities a better chance of reconstructing a damaged file. +

+

Version for index #N

+

This is the version number for the list of shared object header message + indexes and this document describes version 0.

+

Index Type for index #N

+

The type of index can be an unsorted list or a v2 B-tree. +

+

Message Type Flags for index #N

+

This field indicates the type of messages tracked in the index, + as follows: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0If set, the index tracks Dataspace Messages. +
1If set, the message tracks Datatype Messages. +
2If set, the message tracks Fill Value Messages. +
3If set, the message tracks Filter Pipeline Messages. +
4If set, the message tracks Attribute Messages. +
5-15Reserved (zero). +

+ + +

+ An index can track more than one type of message, but each type + of message can only by in one index. +

+

Minimum Message Size for index #N

+

This is the message size sharing threshold for the index. + If the encoded size of the message is less than this value, the + message is not shared. +

+

List Cutoff for index #N

+

This is the cutoff value for the indexing of messages to + switch from a list to a v2 B-tree. If the number of messages + is greater than this value, the index should be a v2 B-tree. +

+

v2 B-tree Cutoff for index #N

+

This is the cutoff value for the indexing of messages + to switch from a v2 B-tree back to a list. If the number + of messages is less than this value, the index should be + a list. +

+

Number of Messages for index #N

+

The number of shared messages being tracked for the index. +

+

Index Address for index #N

+

This field is the address of the list or v2 B-tree where the + index nodes reside. +

+

Fractal Heap Address for index #N

+

This field is the address of the fractal heap if shared messages + are stored there. +

+

Checksum

+

This is the checksum for the table.

+
+
+ +
+

+ Shared messages are indexed either with a shared message record + list, described below, or using a v2 B-tree (using record type 7). + The number of records in the shared message record list is + determined in the index’s entry in the shared object header message + table. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message Record List +
bytebytebytebyte
Signature
Shared Message Record #0
Shared Message Record #1
...
Shared Message Record #N-1
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message Record List +
Field NameDescription

Signature

+

The ASCII character string “SMLI” + is used to indicate the beginning of a list of index nodes. + This gives file consistency checking utilities a better + chance of reconstructing a damaged file. +

+

Shared Message Record #N

+

The record for locating the shared message, either in the + fractal heap for the index, or an object header (see format for + index nodes below). +

+

Checksum

+

This is the checksum for the list. +

+
+
+ +
+

+ The record for each shared message in an index is stored in one + of the following forms: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message Record for Messages Stored in a + Fractal Heap +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash Value
Reference Count

Fractal Heap ID

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message Record for Messages Stored in a + Fractal Heap +
Field NameDescription

Message Location

+

This has a value of 0 indicating that the message is stored in + the heap. +

+

Hash Value

+

This is the hash value for the message. +

+

Reference Count

+

This is the number of times the message is used in the file. +

+

Fractal Heap ID

+

This is an 8-byte fractal heap ID for the message as stored in + the fractal heap for the index. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message Record for Messages Stored in an + Object Header +
bytebytebytebyte
Message LocationThis space inserted only to align table nicely
Hash Value
ReservedMessage TypeCreation Index

Object Header AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message Record for Messages Stored in an + Object Header +
Field NameDescription

Message Location

+

This has a value of 1 indicating that the message is stored in + an object header. +

+

Hash Value

+

This is the hash value for the message. +

+

Message Type

+

This is the message type in the object header. +

+

Creation Index

+

This is the creation index of the message within the object + header. +

+

Object Header Address

+

This is the address of the object header where the message is + located. +

+
+
+ +

+ IV. Disk Format: Level 2 - Data Objects

+ +

Data objects contain the “real” user-visible information in the file. + These objects compose the scientific data and other information which + are generally thought of as “data” by the end-user. All the + other information in the file is provided as a framework for + storing and accessing these data objects. +

+ +

A data object is composed of header and data + information. The header information contains the information + needed to interpret the data information for the object as + well as additional “metadata” or pointers to additional + “metadata” used to describe or annotate each object. +

+ +

+ IV.A. Disk Format: Level 2A - Data Object Headers

+ +

The header information of an object is designed to encompass + all of the information about an object, except for the data itself. + This information includes the dataspace, the datatype, information + about how the data is stored on disk (in external files, compressed, + broken up in blocks, and so on), as well as other information used + by the library to speed up access to the data objects or maintain + a file’s integrity. Information stored by user applications + as attributes is also stored in the object’s header. The header + of each object is not necessarily located immediately prior to the + object’s data in the file and in fact may be located in any + position in the file. The order of the messages in an object header + is not significant.

+ +

Object headers are composed of a prefix and a set of messages. The + prefix contains the information needed to interpret the messages and + a small amount of metadata about the object, and the messages contain + the majority of the metadata about the object. +

+ +

+ IV.A.1. Disk Format: Level 2A1 - Data Object Header Prefix

+ + + +

+ IV.A.1.a. Version 1 Data Object Header Prefix

+ +

Header messages are aligned on 8-byte boundaries for version 1 + object headers. +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 1 Object Header +
bytebytebytebyte
VersionReserved (zero)Total Number of Header Messages
Object Reference Count
Object Header Size
Reserved (zero)
Header Message Type #1Size of Header Message Data #1
Header Message #1 FlagsReserved (zero)

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #n
Header Message #n FlagsReserved (zero)

Header Message Data #n

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 1 Object Header +
Field NameDescription

Version

+

This value is used to determine the format of the + information in the object header. When the format of the + object header is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + is version one (1) (there was no version zero (0)) of the + object header. +

+

Total Number of Header Messages

+

This value determines the total number of messages listed in + object headers for this object. This value includes the messages + in continuation messages for this object. +

+

Object Reference Count

+

This value specifies the number of “hard links” to this object + within the current file. References to the object from external + files, “soft links” in this file and object references in this + file are not tracked. +

+

Object Header Size

+

This value specifies the number of bytes of header message data + following this length field that contain object header messages + for this object header. This value does not include the size of + object header continuation blocks for this object elsewhere in the + file. +

+

Header Message #n Type

+

This value specifies the type of information included in the + following header message data. The message types for + header messages are defined in sections below. +

+

Size of Header Message #n Data

+

This value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size includes + padding bytes to make the message a multiple of eight + bytes. +

+

Header Message #n Flags

+

This is a bit field with the following definition: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, the message data is constant. This is used + for messages like the datatype message of a dataset. +
1If set, the message is shared and stored + in another location than the object header. The Header + Message Data field contains a Shared Message + (described in the Data Object Header Messages + section below) + and the Size of Header Message Data field + contains the size of that Shared Message. +
2If set, the message should not be shared. +
3If set, the HDF5 decoder should fail to open this object + if it does not understand the message’s type and the file + is open with permissions allowing write access to the file. + (Normally, unknown messages can just be ignored by HDF5 + decoders) +
4If set, the HDF5 decoder should set bit 5 of this + message’s flags (in other words, this bit field) + if it does not understand the message’s type + and the object is modified in any way. (Normally, + unknown messages can just be ignored by HDF5 + decoders) +
5If set, this object was modified by software that did not + understand this message. + (Normally, unknown messages should just be ignored by HDF5 + decoders) (Can be used to invalidate an index or a similar + feature) +
6If set, this message is shareable. +
7If set, the HDF5 decoder should always fail to open this + object if it does not understand the message’s type (whether + it is open for read-only or read-write access). (Normally, + unknown messages can just be ignored by HDF5 decoders) +

+ +

Header Message #n Data

+

The format and length of this field is determined by the + header message type and size respectively. Some header + message types do not require any data and this information + can be eliminated by setting the length of the message to + zero. The data is padded with enough zeroes to make the + size a multiple of eight. +

+
+
+ +

+ IV.A.1.b. Version 2 Data Object Header Prefix

+ +

Note that the “total number of messages” field has been dropped from + the data object header prefix in this version. The number of messages + in the data object header is just determined by the messages encountered + in all the object header blocks.

+ +

Note also that the fields and messages in this version of data object + headers have no alignment or padding bytes inserted - they are + stored packed together.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 Object Header +
bytebytebytebyte
Signature
VersionFlagsThis space inserted only to align table nicely
Access time (optional)
Modification Time (optional)
Change Time (optional)
Birth Time (optional)
Maximum # of compact attributes (optional)Minimum # of dense attributes (optional)
Size of Chunk #0 (variable size)This space inserted only to align table nicely
Header Message Type #1Size of Header Message Data #1Header Message #1 Flags
Header Message #1 Creation Order (optional)This space inserted only to align table nicely

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #nHeader Message #n Flags
Header Message #n Creation Order (optional)This space inserted only to align table nicely

Header Message Data #n

Gap (optional, variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 Object Header +
Field NameDescription

Signature

+

The ASCII character string “OHDR” + is used to indicate the beginning of an object header. This + gives file consistency checking utilities a better chance + of reconstructing a damaged file. +

+

Version

+

This field has a value of 2 indicating version 2 of the object header. +

+

Flags

+

This field is a bit field indicating additional information + about the object header. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bit(s)Description
0-1This two bit field determines the size of the + Size of Chunk #0 field. The values are: + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0The Size of Chunk #0 field is 1 byte. +
1The Size of Chunk #0 field is 2 bytes. +
2The Size of Chunk #0 field is 4 bytes. +
3The Size of Chunk #0 field is 8 bytes. +
+
2If set, attribute creation order is tracked.
3If set, attribute creation order is indexed.
4If set, non-default attribute storage phase change + values are stored.
5If set, access, modification, change and birth times + are stored.
6-7Reserved

+ +

Access Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object’s raw data was last accessed + (in other words, read or written). +

+

This field is present if bit 5 of flags is set. +

+

Modification Time

+

This 32-bit value represents the number of seconds after + the UNIX epoch when the object’s raw data was last + modified (in other words, written). +

+

This field is present if bit 5 of flags is set. +

+

Change Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object’s metadata was last changed. +

+

This field is present if bit 5 of flags is set. +

+

Birth Time

+

This 32-bit value represents the number of seconds after the + UNIX epoch when the object was created. +

+

This field is present if bit 5 of flags is set. +

+

Maximum # of compact attributes

+

This is the maximum number of attributes to store in the compact + format before switching to the indexed format. +

+

This field is present if bit 4 of flags is set. +

+

Minimum # of dense attributes

+

This is the minimum number of attributes to store in the indexed + format before switching to the compact format. +

+

This field is present if bit 4 of flags is set. +

+

Size of Chunk #0

+

+ This unsigned value specifies the number of bytes of header + message data following this field that contain object header + information. +

+

+ This value does not include the size of object header + continuation blocks for this object elsewhere in the file. +

+

+ The length of this field varies depending on bits 0 and 1 of + the flags field. +

+

Header Message #n Type

+

Same format as version 1 of the object header, described above. +

+

Size of Header Message #n Data

+

This value specifies the number of bytes of header + message data following the header message type and length + information for the current message. The size of messages + in this version does not include any padding bytes. +

+

Header Message #n Flags

+

Same format as version 1 of the object header, described above. +

+

Header Message #n Creation Order

+

This field stores the order that a message of a given type + was created in. +

+

This field is present if bit 2 of flags is set. +

+

Header Message #n Data

+

Same format as version 1 of the object header, described above. +

+

Gap

+

A gap in an object header chunk is inferred by the end of the + messages for the chunk before the beginning of the chunk’s + checksum. Gaps are always smaller than the size of an + object header message prefix (message type + message size + + message flags). +

+

Gaps are formed when a message (typically an attribute message) + in an earlier chunk is deleted and a message from a later + chunk that does not quite fit into the free space is moved + into the earlier chunk. +

+

Checksum

+

This is the checksum for the object header chunk. +

+
+
+ +

The header message types and the message data associated with + them compose the critical “metadata” about each object. Some + header messages are required for each object while others are + optional. Some optional header messages may also be repeated + several times in the header itself, the requirements and number + of times allowed in the header will be noted in each header + message description below. +

+ + +

+ IV.A.2. Disk Format: Level 2A2 - Data Object Header Messages

+ +

Data object header messages are small pieces of metadata that are + stored in the data object header for each object in an HDF5 file. + Data object header messages provide the metadata required to describe + an object and its contents, as well as optional pieces of metadata + that annotate the meaning or purpose of the object. +

+ +

Data object header messages are either stored directly in the data + object header for the object or are shared between multiple objects + in the file. When a message is shared, a flag in the Message Flags + indicates that the actual Message Data + portion of that message is stored in another location (such as another + data object header, or a heap in the file) and the Message Data + field contains the information needed to locate the actual information + for the message. +

+ +

+ The format of shared message data is described here:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message (Version 1) +
bytebytebytebyte
VersionTypeReserved (zero)
Reserved (zero)

AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message (Version 1) +
Field NameDescription

Version

The version number is used when there are changes in the format + of a shared object message and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6.1. +

+

Type

The type of shared message location: + + + + + + + + + + +
ValueDescription
0Message stored in another object’s header (a committed + message). +

+

Address

The address of the object header + containing the message to be shared.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message (Version 2) +
bytebytebytebyte
VersionTypeThis space inserted only to align table nicely

AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message (Version 2) +
Field NameDescription

Version

The version number is used when there are changes in the format + of a shared object message and is described here: + + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.1 and after. +

+

Type

The type of shared message location: + + + + + + + + + + +
ValueDescription
0Message stored in another object’s header (a committed + message). +

+

Address

The address of the object header + containing the message to be shared.

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message (Version 3) +
bytebytebytebyte
VersionTypeThis space inserted only to align table nicely
Location (variable size)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message (Version 3) +
Field NameDescription

Version

The version number indicates changes in the format of shared + object message and is described here: + + + + + + + + + + +
VersionDescription
3Used by the library of version 1.8 and after. In this + version, the Type field can indicate that + the message is stored in the fractal heap. +

+

Type

The type of shared message location: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Message is not shared and is not shareable. +
1Message stored in file’s shared object header message + heap (a shared message). +
2Message stored in another object’s header (a committed + message). +
3Message stored is not shared, but is sharable. +

+

Location

This field contains either a + Size of Offsets-bytes address of the object header + containing the message to be shared, or an 8-byte fractal heap + ID for the message in the file’s shared object header + message heap. +

+
+
+ + +

The following is a list of currently defined header messages: +

+ +

IV.A.2.a. The NIL Message

+ + +
+ + + + + + + + +
Header Message Name: NIL
Header Message Type: 0x0000
Length: Varies
Status: Optional; may be repeated.
Description:The NIL message is used to indicate a message which is to be + ignored when reading the header messages for a data object. + [Possibly one which has been deleted for some reason.] +
Format of Data: Unspecified
+ + + +

IV.A.2.b. The Dataspace Message

+ + +
+ + + + + + + + + + +
Header Message Name: Dataspace
Header Message Type: 0x0001
Length: Varies according to the number of + dimensions, as described in the following table.
Status: Required for dataset objects; + may not be repeated.
Description:The dataspace message describes the number of dimensions (in + other words, “rank”) and size of each dimension that + the data object has. This message is only used for datasets which + have a simple, rectilinear, array-like layout; datasets requiring + a more complex layout are not yet supported. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Dataspace Message - Version 1 +
bytebytebytebyte
VersionDimensionalityFlagsReserved
Reserved

Dimension #1 SizeL

.
.
.

Dimension #n SizeL


Dimension #1 Maximum SizeL (optional)

.
.
.

Dimension #n Maximum SizeL (optional)


Permutation Index #1L (optional)

.
.
.

Permutation Index #nL (optional)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Dataspace Message - Version 1 +
Field NameDescription

Version

+

This value is used to determine the format of the + Dataspace Message. When the format of the + information in the message is changed, the version number + is incremented and can be used to determine how the + information in the object header is formatted. This + document describes version one (1) (there was no version + zero (0)). +

+

Dimensionality

+

This value is the number of dimensions that the data + object has. +

+

Flags

+

This field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. Bit 1 is used to indicate that + permutation indices are present. +

+

Dimension #n Size

+

This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Dimension #n Maximum Size

+

This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + “unlimited” size which indicates + that the data may expand along this dimension indefinitely. + If these values are not stored, the maximum size of each + dimension is assumed to be the dimension’s current size. +

+

Permutation Index #n

+

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. If these values are + not stored, the first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+
+
+ + + +
+

Version 2 of the dataspace message dropped the optional + permutation index value support, as it was never implemented in the + HDF5 Library:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Dataspace Message - Version 2 +
bytebytebytebyte
VersionDimensionalityFlagsType

Dimension #1 SizeL

.
.
.

Dimension #n SizeL


Dimension #1 Maximum SizeL (optional)

.
.
.

Dimension #n Maximum SizeL (optional)

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Dataspace Message - Version 2 +
Field NameDescription

Version

+

This value is used to determine the format of the + Dataspace Message. This field should be ‘2’ for version 2 + format messages. +

+

Dimensionality

+

This value is the number of dimensions that the data object has. +

+

Flags

+

This field is used to store flags to indicate the + presence of parts of this message. Bit 0 (the least + significant bit) is used to indicate that maximum + dimensions are present. +

+

Type

+

This field indicates the type of the dataspace: + + + + + + + + + + + + + + + + + + +
ValueDescription
0A scalar dataspace; in other words, + a dataspace with a single, dimensionless element. +
1A simple dataspace; in other words, + a dataspace with a rank greater than 0 and an + appropriate number of dimensions. +
2A null dataspace; in other words, + a dataspace with no elements. +

+

Dimension #n Size

+

This value is the current size of the dimension of the + data as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Dimension #n Maximum Size

+

This value is the maximum size of the dimension of the + data as stored in the file. This value may be the special + “unlimited” size which indicates + that the data may expand along this dimension indefinitely. + If these values are not stored, the maximum size of each + dimension is assumed to be the dimension’s current size. +

+
+
+ + + + + +

IV.A.2.c. The Link Info Message

+ + +
+ + + + + + + + +
Header Message Name: Link Info
Header Message Type: 0x002
Length: Varies
Status: Optional; may not be + repeated.
Description:The link info message tracks variable information about the + current state of the links for a “new style” + group’s behavior. Variable information will be stored in + this message and constant information will be stored in the + Group Info message. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Link Info +
bytebytebytebyte
VersionFlagsThis space inserted only to align table nicely

Maximum Creation Index (8 bytes, optional)


Fractal Heap AddressO


Address of v2 B-tree for Name IndexO


Address of v2 B-tree for Creation Order IndexO (optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Link Info +
Field NameDescription

Version

+

The version number for this message. This document describes + version 0.

+

Flags

This field determines various optional aspects of the link + info message: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, creation order for the links is tracked. +
1If set, creation order for the links is indexed. +
2-7Reserved

+ +

Maximum Creation Index

This 64-bit value is the maximum creation order index value + stored for a link in this group.

+

This field is present if bit 0 of flags is set.

+

Fractal Heap Address

+

+ This is the address of the fractal heap to store dense links. + Each link stored in the fractal heap is stored as a + Link Message. +

+

+ If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

Address of v2 B-tree for Name Index

This is the address of the version 2 B-tree to index names of links.

+

If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

Address of v2 B-tree for Creation Order Index

This is the address of the version 2 B-tree to index creation order of links.

+

If there are no links in the group, or the group’s links + are stored “compactly” (as object header messages), this + value will be the undefined + address. +

+

This field exists if bit 1 of flags is set.

+
+
+ + +

IV.A.2.d. The Datatype Message

+ + +
+ + + + + + + + +
Header Message Name: Datatype
Header Message Type: 0x0003 +
Length: Variable
Status: Required for dataset or committed + datatype (formerly named datatype) objects; may not be repeated. +
Description:

The datatype message defines the datatype for each element + of a dataset or a common datatype for sharing between multiple + datasets. A datatype can describe an atomic type like a fixed- + or floating-point type or more complex types like a C struct + (compound datatype), array (array datatype), or C++ vector + (variable-length datatype).

+

Datatype messages that are part of a dataset object do not + describe how elements are related to one another; the dataspace + message is used for that purpose. Datatype messages that are part of + a committed datatype (formerly named datatype) message describe + a common datatype that can be shared by multiple datasets in the + file.

+
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Datatype Message +
bytebytebytebyte
Class and VersionClass Bit Field, Bits 0-7Class Bit Field, Bits 8-15Class Bit Field, Bits 16-23
Size


Properties


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Datatype Message +
Field NameDescription

Class and Version

+

The version of the datatype message and the datatype’s class + information are packed together in this field. The version + number is packed in the top 4 bits of the field and the class + is contained in the bottom 4 bits. +

+

The version number information is used for changes in the + format of the datatype message and is described here: + + + + + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Used by early versions of the library to encode + compound datatypes with explicit array fields. + See the compound datatype description below for + further details. +
2Used when an array datatype needs to be encoded. +
3Used when a VAX byte-ordered type needs to be + encoded. Packs various other datatype classes more + efficiently also. +
4Used to encode the revised reference datatype. +

+ +

The class of the datatype determines the format for the class + bit field and properties portion of the datatype message, which + are described below. The + following classes are currently defined: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Fixed-Point
1Floating-Point
2 Time
3String
4Bit field
5Opaque
6Compound
7Reference
8Enumerated
9Variable-Length
10Array

+ +

Class Bit Fields

+

The information in these bit fields is specific to each datatype + class and is described below. All bits not defined for a + datatype class are set to zero. +

+

Size

+

The size of a datatype element in bytes. +

+

Properties

+

This variable-sized sequence of bytes encodes information + specific to each datatype class and is described for each class + below. If there is no property information specified for a + datatype class, the size of this field is zero bytes. +

+
+
+ + +
+
+ +

Class specific information for the Fixed-point Numbers class + (Class 0):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bits: Fixed-point Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1, 2

Padding type. Bit 1 is the lo_pad bit and bit 2 + is the hi_pad bit. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.

3

Signed. If this bit is set then the fixed-point + number is in 2’s complement form.

4-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + +
+ Layout: Fixed-point Property Description +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Fixed-point Property Description +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the fixed-point + value within the datatype. The bit offset specifies the number + of bits “to the right of” the value (which are set to the + lo_pad bit value). +

+

Bit Precision

+

The number of bits of precision of the fixed-point value + within the datatype. This value, combined with the datatype + element’s size and the Bit Offset field specifies the number + of bits “to the left of” the value (which are set to the + hi_pad bit value). +

+
+
+ + +
+
+ +

Class specific information for the Floating-point Numbers class + (Class 1):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bits: Floating-point Bit Field Description +
BitsMeaning

0, 6

Byte Order. These two non-contiguous bits specify the + “endianness” of the bytes in the datatype element. + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Bit 6Bit 0Description
00Byte order is little-endian +
01Byte order is big-endian +
10Reserved +
11Byte order is VAX-endian +

+

1, 2, 3

Padding type. Bit 1 is the low bits pad type, bit 2 + is the high bits pad type, and bit 3 is the internal bits + pad type. If a datum has unused bits at either end or between + the sign bit, exponent, or mantissa, then the value of bit + 1, 2, or 3 is copied to those locations.

4-5

Mantissa Normalization. This 2-bit bit field specifies + how the most significant bit of the mantissa is managed. + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0No normalization +
1The most significant bit of the mantissa is always set + (except for 0.0). +
2The most significant bit of the mantissa is not stored, + but is implied to be set. +
3Reserved. +

+

7

Reserved (zero).

8-15

Sign Location. This is the bit position of the sign + bit. Bits are numbered with the least significant bit zero.

16-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Floating-point Property Description +
ByteByteByteByte
Bit OffsetBit Precision
Exponent LocationExponent SizeMantissa LocationMantissa Size
Exponent Bias
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Floating-point Property Description +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the floating-point + value within the datatype. The bit offset specifies the number + of bits “to the right of” the value. +

+

Bit Precision

+

The number of bits of precision of the floating-point value + within the datatype. +

+

Exponent Location

+

The bit position of the exponent field. Bits are numbered with + the least significant bit number zero. +

+

Exponent Size

+

The size of the exponent field in bits. +

+

Mantissa Location

+

The bit position of the mantissa field. Bits are numbered with + the least significant bit number zero. +

+

Mantissa Size

+

The size of the mantissa field in bits. +

+

Exponent Bias

+

The bias of the exponent field. +

+
+
+ + +
+
+ +

Class specific information for the Time class (Class 2):

+ + +
+ + + + + + + + + + + + + + + + + +
+ Bits: Time Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + +
+ Layout: Time Property Description +
ByteByte
Bit Precision
+
+ +
+
+ + + + + + + + + + + + +
+ Fields: Time Property Description +
Field NameDescription

Bit Precision

+

The number of bits of precision of the time value. +

+
+
+ + +
+ +

Class specific information for the Strings class (Class 3):

+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Bits: String Bit Field Description +
BitsMeaning

0-3

Padding type. This four-bit value determines the + type of padding to use for the string. The values are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null Terminate: A zero byte marks the end of the + string and is guaranteed to be present after + converting a long string to a short string. When + converting a short string to a long string the value is + padded with additional null characters as necessary. +
1Null Pad: Null characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. +
2Space Pad: Space characters are added to the end of + the value during conversions from short values to long + values but conversion in the opposite direction simply + truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +

+

4-7

Character Set. The character set used to + encode the string. + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
2-15Reserved +

+

8-23

Reserved (zero).

+
+ +

There are no properties defined for the string class. +

+ +
+
+ +

Class specific information for the Bit Fields class (Class 4):

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Bits: Bitfield Bit Field Description +
BitsMeaning

0

Byte Order. If zero, byte order is little-endian; + otherwise, byte order is big endian.

1, 2

Padding type. Bit 1 is the lo_pad type and bit 2 + is the hi_pad type. If a datum has unused bits at either + end, then the lo_pad or hi_pad bit is copied to those + locations.

3-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + +
+ Layout: Bit Field Property Description +
ByteByteByteByte
Bit OffsetBit Precision
+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Bit Field Property Description +
Field NameDescription

Bit Offset

+

The bit offset of the first significant bit of the bit field + within the datatype. The bit offset specifies the number + of bits “to the right of” the value. +

+

Bit Precision

+

The number of bits of precision of the bit field + within the datatype. +

+
+
+ + +
+
+ +

Class specific information for the Opaque class (Class 5):

+ +
+ + + + + + + + + + + + + + + + + +
+ Bits: Opaque Bit Field Description +
BitsMeaning

0-7

Length of ASCII tag in bytes.

8-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + +
+ Layout: Opaque Property Description +
ByteByteByteByte

ASCII Tag
+
+
+ +
+
+ + + + + + + + + + + +
+ Fields: Opaque Property Description +
Field NameDescription

ASCII Tag

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+
+
+ + +
+
+ +

Class specific information for the Compound class (Class 6):

+ +
+ + + + + + + + + + + + + + + + + +
+ Bits: Compound Bit Field Description +
BitsMeaning

0-15

Number of Members. This field contains the number + of members defined for the compound datatype. The member + definitions are listed in the Properties field of the data + type message.

16-23

Reserved (zero).

+
+ + +

The Properties field of a compound datatype is a list of the + member definitions of the compound datatype. The member + definitions appear one after another with no intervening bytes. + The member types are described with a (recursively) encoded datatype + message.

+ +

Note that the property descriptions are different for different + versions of the datatype version. Additionally note that the version + 0 datatype encoding is deprecated and has been replaced with later + encodings in versions of the HDF5 Library from the 1.4 release + onward.

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Compound Properties Description for Datatype Version 1 +
ByteByteByteByte

Name

Byte Offset of Member
DimensionalityReserved (zero)
Dimension Permutation
Reserved (zero)
Dimension #1 Size (required)
Dimension #2 Size (required)
Dimension #3 Size (required)
Dimension #4 Size (required)

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Compound Properties Description for Datatype Version 1 +
Field NameDescription

Name

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+

Byte Offset of Member

+

This is the byte offset of the member within the datatype. +

+

Dimensionality

+

If set to zero, this field indicates a scalar member. If set + to a value greater than zero, this field indicates that the + member is an array of values. For array members, the size of + the array is indicated by the ‘Size of Dimension n’ field in + this message. +

+

Dimension Permutation

+

This field was intended to allow an array field to have + its dimensions permuted, but this was never implemented. + This field should always be set to zero. +

+

Dimension #n Size

+

This field is the size of a dimension of the array field as + stored in the file. The first dimension stored in the list of + dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+

Member Type Message

+

This field is a datatype message describing the datatype of + the member. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Compound Properties Description for Datatype Version 2 +
ByteByteByteByte

Name

Byte Offset of Member

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Compound Properties Description for Datatype Version 2 +
Field NameDescription

Name

+

This NUL-terminated string provides a description for the + opaque type. It is NUL-padded to a multiple of 8 bytes. +

+

Byte Offset of Member

+

This is the byte offset of the member within the datatype. +

+

Member Type Message

+

This field is a datatype message describing the datatype of + the member. +

+
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Compound Properties Description for Datatype Version 3 +
ByteByteByteByte

Name

Byte Offset of Member (variable size)

Member Type Message

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Compound Properties Description for Datatype Version 3 +
Field NameDescription

Name

This NUL-terminated string provides a description for the + opaque type. It is not NUL-padded to a multiple of 8 + bytes.

Byte Offset of Member

This is the byte offset of the member within the datatype. + The field size is the minimum number of bytes necessary, + based on the size of the datatype element. For example, a + datatype element size of less than 256 bytes uses a 1 byte + length, a datatype element size of 256-65535 bytes uses a + 2 byte length, and so on.

Member Type Message

This field is a datatype message describing the datatype of + the member.

+
+ + +
+
+ +

Class specific information for the Reference class (Class 7):

+ +
+ + + + + + + + + + + + + + + + + +
+ Bits: Reference Bit Field Description for Datatype Version < 4 +
BitsMeaning

0-3

Type. This four-bit value contains the reference types which are supported for + backward compatibility. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Object Reference (H5R_OBJECT1): A reference to another object in this + HDF5 file. +
1Dataset Region Reference (H5R_DATASET_REGION1): A reference to a region within + a dataset in this HDF5 file. +
2-15Reserved +

+ +

4-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Bits: Reference Bit Field Description for Datatype Version 4 +
BitsMeaning

0-3

Type. This four-bit value contains the revised reference types. + The values defined are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
2Object Reference (H5R_OBJECT2): A reference to another object + in this file or an external file. +
3Dataset Region Reference (H5R_DATASET_REGION2): A reference to a region within + a dataset in this file or an external file. +
4Attribute Reference (H5R_ATTR): A reference to an attribute attached to an + object in this file or an external file. +
5-15Reserved +

+ +

4-7

Version. This four-bit value contains the version for encoding + the revised reference types. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Unused +
1The version for encoding the revised reference types: Object Reference (2), + Dataset Region Reference (3) and Attribute Reference (4). +
2-15Reserved +

+ +

8-23

Reserved (zero).

+
+ +

There are no properties defined for the reference class. +

+ + +
+
+ +

Class specific information for the Enumeration class (Class 8):

+ +
+ + + + + + + + + + + + + + + + + +
+ Bits: Enumeration Bit Field Description +
BitsMeaning

0-15

Number of Members. The number of name/value + pairs defined for the enumeration type.

16-23

Reserved (zero).

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Enumeration Property Description for Datatype Versions + 1 and 2 +
ByteByteByteByte

Base Type


Names


Values

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Enumeration Property Description for Datatype Versions + 1 and 2 +
Field NameDescription

Base Type

+

Each enumeration type is based on some parent type, usually an + integer. The information for that parent type is described + recursively by this field. +

+

Names

+

The name for each name/value pair. Each name is stored as a null + terminated ASCII string in a multiple of eight bytes. The names + are in no particular order. +

+

Values

+

The list of values in the same order as the names. The values + are packed (no inter-value padding) and the size of each value + is determined by the parent type. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Enumeration Property Description for Datatype Version 3 +
ByteByteByteByte

Base Type


Names


Values

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Enumeration Property Description for Datatype Version 3 +
Field NameDescription

Base Type

+

Each enumeration type is based on some parent type, usually an + integer. The information for that parent type is described + recursively by this field. +

+

Names

+

The name for each name/value pair. Each name is stored as a null + terminated ASCII string, not padded to a multiple of + eight bytes. The names are in no particular order. +

+

Values

+

The list of values in the same order as the names. The values + are packed (no inter-value padding) and the size of each value + is determined by the parent type. +

+
+
+ + + +
+ +

Class specific information for the Variable-length class (Class 9):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Bits: Variable-length Bit Field Description +
BitsMeaning

0-3

Type. This four-bit value contains the type of + variable-length datatype described. The values defined are: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Sequence: A variable-length sequence of any datatype. + Variable-length sequences do not have padding or + character set information. +
1String: A variable-length sequence of characters. + Variable-length strings have padding and character set + information. +
2-15Reserved +

+ +

4-7

Padding type. (variable-length string only) + This four-bit value determines the type of padding + used for variable-length strings. The values are the same + as for the string padding type, as follows: + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Null terminate: A zero byte marks the end of a string + and is guaranteed to be present after converting a long + string to a short string. When converting a short string + to a long string, the value is padded with additional null + characters as necessary. +
1Null pad: Null characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. +
2Space pad: Space characters are added to the end of the + value during conversion from a short string to a longer + string. Conversion from a long string to a shorter string + simply truncates the value. This is the Fortran + representation of the string. +
3-15Reserved +

+ +

This value is set to zero for variable-length sequences.

+ +

8-11

Character Set. (variable-length string only) + This four-bit value specifies the character set + to be used for encoding the string: + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
2-15Reserved +

+ +

This value is set to zero for variable-length sequences.

+ +

12-23

Reserved (zero).

+
+ +
+
+ + + + + + + + + + + + + + +
+ Layout: Variable-length Property Description +
ByteByteByteByte

Base Type

+
+ +
+
+ + + + + + + + + + + + +
+ Fields: Variable-length Property Description +
Field NameDescription

Base Type

+

Each variable-length type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ + +
+
+ +

Class specific information for the Array class (Class 10):

+ +

There are no bit fields defined for the array class. +

+ +

Note that the dimension information defined in the property for this + datatype class is independent of dataspace information for a dataset. + The dimension information here describes the dimensionality of the + information within a data element (or a component of an element, if the + array datatype is nested within another datatype) and the dataspace for a + dataset describes the size and locations of the elements in a dataset. +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Array Property Description for Datatype Version 2 +
ByteByteByteByte
DimensionalityReserved (zero)
Dimension #1 Size
.
.
.
Dimension #n Size
Permutation Index #1
.
.
.
Permutation Index #n

Base Type

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Array Property Description for Datatype Version 2 +
Field NameDescription

Dimensionality

+

This value is the number of dimensions that the array has. +

+

Dimension #n Size

+

This value is the size of the dimension of the array + as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Permutation Index #n

+

This value is the index permutation used to map + each dimension from the canonical representation to an + alternate axis for each dimension. Currently, dimension + permutations are not supported, and these indices should + be set to the index position minus one. In other words, + the first dimension should be set to 0, the second dimension + should be set to 1, and so on. +

+

Base Type

+

Each array type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Array Property Description for Datatype Version 3 +
ByteByteByteByte
DimensionalityThis space inserted only to align table nicely
Dimension #1 Size
.
.
.
Dimension #n Size

Base Type

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Array Property Description for Datatype Version 3 +
Field NameDescription

Dimensionality

+

This value is the number of dimensions that the array has. +

+

Dimension #n Size

+

This value is the size of the dimension of the array + as stored in the file. The first dimension stored in + the list of dimensions is the slowest changing dimension + and the last dimension stored is the fastest changing + dimension. +

+

Base Type

+

Each array type is based on some parent type. The + information for that parent type is described recursively by + this field. +

+
+
+ + + +

IV.A.2.e. The Data Storage - + Fill Value (Old) Message

+ + +
+ + + + + + + + +
Header Message Name: Fill Value + (old)
Header Message Type: 0x0004
Length: Varies
Status: Optional; may not be + repeated.
Description:

The fill value message stores a single data value which + is returned to the application when an uninitialized data element + is read from a dataset. The fill value is interpreted with the + same datatype as the dataset. If no fill value message is present + then a fill value of all zero bytes is assumed.

+

This fill value message is deprecated in favor of the + “new” fill value message (Message Type 0x0005) and + is only written to the file for forward compatibility with + versions of the HDF5 Library before the 1.6.0 version. + Additionally, it only appears for datasets with a user-defined + fill value (as opposed to the library default fill value or an + explicitly set “undefined” fill value).

+
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Layout: Fill Value Message (Old) +
bytebytebytebyte
Size

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Fill Value Message (Old) +
Field NameDescription

Size

+

This is the size of the Fill Value field in bytes. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. +

+
+
+ + +

IV.A.2.f. The Data Storage - + Fill Value Message

+ + +
+ + + + + + + + +
Header Message Name: Fill + Value
Header Message Type: 0x0005
Length: Varies
Status: Required for dataset objects; + may not be repeated.
Description:The fill value message stores a single data value which is + returned to the application when an uninitialized data element + is read from a dataset. The fill value is interpreted with the + same datatype as the dataset.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fill Value Message - Versions 1 and 2 +
bytebytebytebyte
VersionSpace Allocation TimeFill Value Write TimeFill Value Defined
Size (optional)

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fill Value Message - Versions 1 and 2 +
Field NameDescription

Version

+

The version number information is used for changes in the + format of the fill value message and is described here: + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Initial version of this message. +
2In this version, the Size and Fill Value fields are + only present if the Fill Value Defined field is set + to 1. +
3This version packs the other fields in the message + more efficiently than version 2. +

+ +

Space Allocation Time

+

When the storage space for the dataset’s raw data will be + allocated. The allowed values are: + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Not used. +
1Early allocation. Storage space for the entire dataset + should be allocated in the file when the dataset is + created. +
2Late allocation. Storage space for the entire dataset + should not be allocated until the dataset is written + to. +
3Incremental allocation. Storage space for the + dataset should not be allocated until the portion + of the dataset is written to. This is currently + used in conjunction with chunked data storage for + datasets. +

+ +

Fill Value Write Time

+

At the time that storage space for the dataset’s raw data is + allocated, this value indicates whether the fill value should + be written to the raw data storage elements. The allowed values + are: + + + + + + + + + + + + + + + + + + +
ValueDescription
0On allocation. The fill value is always written to + the raw data storage when the storage space is allocated. +
1Never. The fill value should never be written to + the raw data storage. +
2Fill value written if set by user. The fill value + will be written to the raw data storage when the storage + space is allocated only if the user explicitly set + the fill value. If the fill value is the library + default or is undefined, it will not be written to + the raw data storage. +

+ +

Fill Value Defined

+

This value indicates if a fill value is defined for this + dataset. If this value is 0, the fill value is undefined. + If this value is 1, a fill value is defined for this dataset. + For version 2 or later of the fill value message, this value + controls the presence of the Size and Fill Value fields. +

+

Size

+

This is the size of the Fill Value field in bytes. This field + is not present if the Version field is greater than 1, + and the Fill Value Defined field is set to 0. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. This field is + not present if the Version field is greater than 1, + and the Fill Value Defined field is set to 0. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fill Value Message - Version 3 +
bytebytebytebyte
VersionFlagsThis space inserted only to align table nicely
Size (optional)

Fill Value (optional, variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fill Value Message - Version 3 +
Field NameDescription

Version

+

The version number information is used for changes in the + format of the fill value message and is described here: + + + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used +
1Initial version of this message. +
2In this version, the Size and Fill Value fields are + only present if the Fill Value Defined field is set + to 1. +
3This version packs the other fields in the message + more efficiently than version 2. +

+ +

Flags

+

When the storage space for the dataset’s raw data will be + allocated. The allowed values are: + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0-1Space Allocation Time, with the same + values as versions 1 and 2 of the message. +
2-3Fill Value Write Time, with the same + values as versions 1 and 2 of the message. +
4Fill Value Undefined, indicating that the fill + value has been marked as “undefined” for this dataset. + Bits 4 and 5 cannot both be set. +
5Fill Value Defined, with the same values as + versions 1 and 2 of the message. + Bits 4 and 5 cannot both be set. +
6-7Reserved (zero). +

+ +

Size

+

This is the size of the Fill Value field in bytes. This field + is not present if the Version field is greater than 1, + and the Fill Value Defined flag is set to 0. +

+

Fill Value

+

The fill value. The bytes of the fill value are interpreted + using the same datatype as for the dataset. This field is + not present if the Version field is greater than 1, + and the Fill Value Defined flag is set to 0. +

+
+
+ + +

IV.A.2.g. The Link Message

+ + +
+ + + + + + + + +
Header Message Name: Link
Header Message Type: 0x0006
Length: Varies
Status: Optional; may be + repeated.
Description:

This message encodes the information for a link in a + group’s object header, when the group is storing its links + “compactly”, or in the group’s fractal heap, + when the group is storing its links “densely”.

+

A group is storing its links compactly when the fractal heap + address in the Link Info + Message is set to the “undefined address” + value.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Link Message +
bytebytebytebyte
VersionFlagsLink type (optional)This space inserted only to align table nicely

Creation Order (8 bytes, optional)

Link Name Character Set (optional)Length of Link Name (variable size)This space inserted only to align table nicely
Link Name (variable size)

Link Information (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Link Message +
Field NameDescription

Version

The version number for this message. This document describes version 1.

+

Flags

This field contains information about the link and controls + the presence of other fields below. + + + + + + + + + + + + + + + + + + + + + + + + + + +
BitsDescription
0-1Determines the size of the Length of Link Name + field. + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0The size of the Length of Link Name + field is 1 byte. +
1The size of the Length of Link Name + field is 2 bytes. +
2The size of the Length of Link Name + field is 4 bytes. +
3The size of the Length of Link Name + field is 8 bytes. +
+
2Creation Order Field Present: if set, the Creation + Order field is present. If not set, creation order + information is not stored for links in this group. +
3Link Type Field Present: if set, the link is not + a hard link and the Link Type field is present. + If not set, the link is a hard link. +
4Link Name Character Set Field Present: if set, the + link name is not represented with the ASCII character + set and the Link Name Character Set field is + present. If not set, the link name is represented with + the ASCII character set. +
5-7Reserved (zero). +

+ +

Link type

This is the link class type and can be one of the following + values: + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0A hard link (should never be stored in the file) +
1A soft link. +
2-63Reserved for future HDF5 internal use. +
64An external link. +
65-255Reserved, but available for user-defined link types. +

+ +

This field is present if bit 3 of Flags is set.

+

Creation Order

This 64-bit value is an index of the link’s creation time within + the group. Values start at 0 when the group is created an increment + by one for each link added to the group. Removing a link from a + group does not change existing links’ creation order field. +

+

This field is present if bit 2 of Flags is set.

+

Link Name Character Set

This is the character set for encoding the link’s name: + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding (this should never be stored + in the file) +
1UTF-8 character set encoding +

+ +

This field is present if bit 4 of Flags is set.

+

Length of link name

This is the length of the link’s name. The size of this field + depends on bits 0 and 1 of Flags.

+

Link name

This is the name of the link, non-NULL terminated.

+

Link information

The format of this field depends on the link type.

+

For hard links, the field is formatted as follows: + + + + + + +
+ Size of Offsets bytes:The address of the object header for the object that the + link points to. +
+

+ +

+ For soft links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of soft link value.
Length of soft link value bytes:A non-NULL-terminated string storing the value of the + soft link. +
+

+ +

+ For external links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of external link value.
Length of external link value bytes:The first byte contains the version number in the + upper 4 bits and flags in the lower 4 bits for the external + link. Both version and flags are defined to be zero in + this document. The remaining bytes consist of two + NULL-terminated strings, with no padding between them. + The first string is the name of the HDF5 file containing + the object linked to and the second string is the full path + to the object linked to, within the HDF5 file’s + group hierarchy. +
+

+ +

+ For user-defined links, the field is formatted as follows: + + + + + + + + + + +
Bytes 1-2:Length of user-defined data.
Length of user-defined link value bytes:The data supplied for the user-defined link type.
+

+ +
+
+ +

IV.A.2.h. The Data Storage - + External Data Files Message

+ + +
+ + + + + + + + +
Header Message Name: External + Data Files
Header Message Type: 0x0007
Length: Varies
Status: Optional; may not be + repeated.
Description:The external data storage message indicates that the data + for an object is stored outside the HDF5 file. The filename of + the object is stored as a Universal Resource Location (URL) of + the actual filename containing the data. An external file list + record also contains the byte offset of the start of the data + within the file and the amount of space reserved in the file + for that data.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: External File List Message +
bytebytebytebyte
VersionReserved (zero)
Allocated SlotsUsed Slots

Heap AddressO


Slot Definitions...

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: External File List Message +
Field NameDescription

Version

+

The version number information is used for changes in the format of + External Data Storage Message and is described here: + + + + + + + + + + + + + +
VersionDescription
0Never used.
1The current version used by the library.

+ +

Allocated Slots

+

The total number of slots allocated in the message. Its value must be at least as + large as the value contained in the Used Slots field. (The current library simply + uses the number of Used Slots for this message)

+

Used Slots

+

The number of initial slots which contains valid information.

+

Heap Address

+

This is the address of a local heap which contains the names for the external + files (The local heap information can be found in Disk Format Level 1D in this + document). The name at offset zero in the heap is always the empty string.

+

Slot Definitions

+

The slot definitions are stored in order according to the array addresses they + represent.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Layout: External File List Slot +
bytebytebytebyte

Name Offset in Local HeapL


Offset in External Data FileL


Data Size in External FileL

+ + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: External File List Slot +
Field NameDescription

Name Offset in Local Heap

+

The byte offset within the local name heap for the name + of the file. File names are stored as a URL which has a + protocol name, a host name, a port number, and a file + name: + protocol:port//host/file. + If the protocol is omitted then “file:” is assumed. If + the port number is omitted then a default port for that + protocol is used. If both the protocol and the port + number are omitted then the colon can also be omitted. If + the double slash and host name are omitted then + “localhost” is assumed. The file name is the only + mandatory part, and if the leading slash is missing then + it is relative to the application’s current working + directory (the use of relative names is not + recommended). +

+

Offset in External Data File

+

This is the byte offset to the start of the data in the + specified file. For files that contain data for a single + dataset this will usually be zero.

+

Data Size in External File

+

This is the total number of bytes reserved in the + specified file for raw data storage. For a file that + contains exactly one complete dataset which is not + extendable, the size will usually be the exact size of the + dataset. However, by making the size larger one allows + HDF5 to extend the dataset. The size can be set to a value + larger than the entire file since HDF5 will read zeroes + past the end of the file without failing.

+
+
+ + +

IV.A.2.i. The Data Layout Message

+ + +
+ + + + + + + + +
Header Message Name: Data Layout
Header Message Type: 0x0008
Length: Varies
Status: Required for datasets; may not + be repeated.
Description:The Data Layout message + describes how the elements of a multi-dimensional array are stored + in the HDF5 file. Four types of data layout are supported: +
    +
  1. Contiguous: The array is stored in one contiguous area of + the file. This layout requires that the size of the array be + constant: data manipulations such as chunking, compression, + checksums, or encryption are not permitted. The message stores + the total storage size of the array. The offset of an element + from the beginning of the storage area is computed as in a C + array.
  2. +
  3. Chunked: The array domain is regularly decomposed into + chunks, and each chunk is allocated and stored separately. This + layout supports arbitrary element traversals, compression, + encryption, and checksums (these features are described + in other messages). The message stores the size of a chunk + instead of the size of the entire array; the storage size of + the entire array can be calculated by traversing the chunk index + that stores the chunk addresses.
  4. +
  5. Compact: The array is stored in one contiguous block as + part of this object header message.
  6. +
  7. Virtual: This is only supported for version 4 of the Data + Layout message. The message stores information that is used to + locate the global heap collection containing the Virtual Dataset + (VDS) mapping information. The mapping associates the VDS to + the source dataset elements that are stored across a collection + of HDF5 files.
  8. +
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Data Layout Message (Versions 1 and 2) +
bytebytebytebyte
VersionDimensionalityLayout ClassReserved (zero)
Reserved (zero)

Data AddressO (optional)

Dimension 1 Size
Dimension 2 Size
...
Dimension #n Size
Dataset Element Size (optional)
Compact Data Size (optional)

Compact Data... (variable size, optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Data Layout Message (Versions 1 and 2) +
Field NameDescription

Version

+

The version number information is used for changes in the format of the data + layout message and is described here: + + + + + + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by version 1.4 and before of the library to encode layout information. + Data space is always allocated when the data set is created.
2Used by version 1.6.[0,1,2] of the library to encode layout information. + Data space is allocated only when it is necessary.

+

Dimensionality

An array has a fixed dimensionality. This field + specifies the number of dimension size fields later in the + message. The value stored for chunked storage is 1 greater than + the number of dimensions in the dataset’s dataspace. + For example, 2 is stored for a 1 dimensional dataset. +

+

Layout Class

The layout class specifies the type of storage for the data + and how the other fields of the layout message are to be + interpreted. + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Compact Storage +
1Contiguous Storage +
2Chunked Storage +
+

+

Data Address

For contiguous storage, this is the address of the raw + data in the file. For chunked storage this is the address + of the v1 B-tree that is used to look up the addresses of the + chunks. This field is not present for compact storage. + If the version for this message is greater than 1, the address + may have the “undefined address” value, to indicate that + storage has not yet been allocated for this array.

+

Dimension #n Size

For contiguous and compact storage the dimensions define + the entire size of the array while for chunked storage they define + the size of a single chunk. In all cases, they are in units of + array elements (not bytes). The first dimension stored in the list + of dimensions is the slowest changing dimension and the last + dimension stored is the fastest changing dimension. +

+

Dataset Element Size

The size of a dataset element, in bytes. This field is only + present for chunked storage. +

+

Compact Data Size

This field is only present for compact data storage. + It contains the size of the raw data for the dataset array, in + bytes.

+

Compact Data

This field is only present for compact data storage. + It contains the raw data for the dataset array.

+
+
+ +
+

Version 3 of this message re-structured the format into specific + properties that are required for each layout class.

+ + +
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Data Layout Message (Version 3) +
bytebytebytebyte
VersionLayout ClassThis space inserted only to align table nicely

Properties (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Data Layout Message (Version 3) +
Field NameDescription

Version

+

The version number information is used for changes in the format of layout message + and is described here: + + + + + + + + + + +
VersionDescription
3Used by the version 1.6.3 and later of the library to store properties + for each layout class.

+

Layout Class

The layout class specifies the type of storage for the data + and how the other fields of the layout message are to be + interpreted. + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Compact Storage +
1Contiguous Storage +
2Chunked Storage +
+

+

Properties

This variable-sized field encodes information specific to each + layout class and is described below. If there is no property + information specified for a layout class, the size of this field + is zero bytes.

+
+ +
+ +

Class-specific information for compact storage (layout class 0): (Note: The dimensionality information + is in the Dataspace message)

+ + +
+ + + + + + + + + + + + + + + + + + +
+ Layout: Compact Storage Property Description +
bytebytebytebyte
SizeThis space inserted only to align table nicely

Raw Data... (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Compact Storage Property Description +
Field NameDescription

Size

This field contains the size of the raw data for the dataset + array, in bytes. +

+

Raw Data

This field contains the raw data for the dataset array.

+
+ + +
+ +

Class-specific information for contiguous storage (layout class 1): + (Note: The dimensionality information is in the Dataspace message)

+ + +
+ + + + + + + + + + + + + + + + + +
+ Layout: Contiguous Storage Property Description +
bytebytebytebyte

AddressO


SizeL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Contiguous Storage Property Description +
Field NameDescription

Address

This is the address of the raw data in the file. + The address may have the “undefined address” value, to indicate + that storage has not yet been allocated for this array.

Size

This field contains the size allocated to store the raw data, + in bytes. +

+
+
+ + +
+

Class-specific information for chunked storage (layout class 2):

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Chunked Storage Property Description +
bytebytebytebyte
DimensionalityThis space inserted only to align table nicely

AddressO

Dimension 0 Size
Dimension 1 Size
...
Dimension #n Size
Dataset Element Size
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Chunked Storage Property Description +
Field NameDescription

Dimensionality

A chunk has a fixed dimensionality. This field specifies + the number of dimension size fields later in the message.

Address

This is the address of the v1 B-tree + that is used to look up the + addresses of the chunks that actually store portions of the array + data. The address may have the “undefined address” value, to + indicate that storage has not yet been allocated for this array.

Dimension #n Size

These values define the dimension size of a single chunk, in + units of array elements (not bytes). The first dimension stored in + the list of dimensions is the slowest changing dimension and the + last dimension stored is the fastest changing dimension. +

+

Dataset Element Size

The size of a dataset element, in bytes. +

+
+
+ + +
+ +

+ Version 4 of this message is similar to version 3 but has + additional information for the virtual layout class as well as + indexing information for the chunked layout class.

+ +
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Data Layout Message (Version 4) +
bytebytebytebyte
VersionLayout ClassThis space inserted + only to align table nicely

Properties (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Data Layout Message (Version 4) +
Field NameDescription

Version

+

The value for this field is 4 and is used by version 1.10.0 + and later of the library to store properties for each layout + class and indexing information for the chunked layout. +

+

Layout Class

The layout class specifies the type of storage for the data + and how the other fields of the layout message are to be + interpreted. + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Compact Storage +
1Contiguous Storage +
2Chunked Storage +
3Virtual Storage +
+

+

Properties

This variable-sized field encodes information specific to a + layout class as follows: + + + + + + + + + + + + + + + + + + + + + + + + + +
Layout ClassDescription
Compact StorageSee Compact Storage + Property Description for the version 3 +Data Layout message. +
Contiguous StorageSee Contiguous Storage + Property Description for the version 3 +Data Layout message. +
Chunked StorageSee Chunked Storage + Property Description below. +
Virtual StorageSee Virtual Storage + Property Description below. +
+ +

+
+ +
+ +

Class-specific information for chunked storage (layout + class 2):

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Chunked Storage Property Description +
bytebytebytebyte
FlagsDimensionalityDimension Size Encoded LengthThis space inserted to align table nicely
Dimension 0 Size (variable size)
Dimension 1 Size (variable size)
...
Dimension #n Size (variable size)
Chunk Indexing TypeThis space inserted only to align table nicely
Indexing Type Information (variable size)

AddressO

+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Chunked Storage Property Description +
Field NameDescription

Flags

This is the chunked layout feature flag:

+ + + + + + + + + + + + + + + + + +
ValueDescription
DONT_FILTER_PARTIAL_BOUND_CHUNKS (bit 0)Do not apply filter to a partial edge chunk. + +
SINGLE_INDEX_WITH_FILTER (bit 1)A filtered chunk for Single Chunk indexing. +
+ +

Dimensionality

A chunk has fixed dimension. This field specifies + the number of Dimension Size fields later in the message.

Dimension Size Encoded Length

+

This is the size in bytes used to encode Dimension Size. +

+

Dimension #n Size

These values define the dimension size of a single chunk, in + units of array elements (not bytes). The first dimension stored in + the list of dimensions is the slowest changing dimension and the + last dimension stored is the fastest changing dimension. +

+

Chunk Indexing Type

There are five indexing types used to look up addresses + of the chunks. For more information on each type, see + “Appendix C: Types of Indexes for + Dataset Chunks.” + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
1Single Chunk indexing type. +
2Implicit indexing type. +
3Fixed Array indexing type. +
4Extensible Array indexing type. +
5Version 2 B-tree indexing type. +
+

+

Indexing Type Information

This variable-sized field encodes information specific to + an indexing type. More information on what is encoded with + each type can be found below this table. +

+

+

Address

This is the address specific to an indexing type. + The address may be undefined if the chunk or index storage is not allocated yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
Single Chunk indexAddress of the single chunk.
Implicit indexAddress of the array of dataset chunks.
Fixed Array indexAddress of the index.
Extensible Array indexAddress of the index.
Version 2 B-tree indexAddress of the index.
+ +

+
+
+ +
+ +
    +
  1. + + Index-specific information for Single Chunk: +
  2. + +

    The following information exists only when the chunk is filtered. + In other words, when DONT_FILTER_PARTIAL_BOUND_CHUNKS + (bit 0) is enabled in the field flags.

    + +
    + + + + + + + + + + + + + + + + + + +
    + Layout: Single Chunk Indexing Information +
    bytebytebytebyte

    Size of filtered chunkL

    Filters for chunk
    + + + + + +
      + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
    +
    + +
    +
    + + + + + + + + + + + + + + + + +
    + Fields: Single Chunk Indexing Information +
    Field NameDescription

    Size of filtered chunk

    This field is the size of a filtered chunk.

    Filters for chunk

    This field contains filters for the chunk.

    +
    +

    + +
    + +
  3. + + Index-specific information for Implicit: +
  4. + +
    + + + + + + + + + + + + + + +
    + Layout: Implicit Indexing Information +
    bytebytebytebyte
    + No specific indexing information
    +
    + +
    +
  5. + + Index-specific information for Fixed Array: +
  6. + +
    + + + + + + + + + + + + + + + +
    + Layout: Fixed Array Indexing Information +
    bytebytebytebyte
    Page BitsThis space inserted only to align table nicely
    +
    + +
    +
    + + + + + + + + + + + + +
    + Fields: Fixed Array Indexing Information +
    Field NameDescription

    Page Bits

    This field contains the number of bits needed to store the + maximum number of elements in a data block page.

    +
    +

    + +
    +
  7. + + Index-specific information for Extensible Array: +
  8. + +
    + + + + + + + + + + + + + + + + + + + + + +
    + Layout: Extensible Array Indexing Information +
    bytebytebytebyte
    Max BitsIndex ElementsMin PointersMin Elements
    Page BitsThis space inserted only to align table nicely
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Fields: Extensible Array Indexing Information +
    Field NameDescription

    Max Bits

    This field contains the number of bits needed to store the maximum number of elements + in the array. +

    +

    Index Elements

    This field contains the number of elements to store in the + index block. +

    +

    Min Pointers

    This field contains the minimum number of data block pointers + for a superblock. +

    +

    Min Elements

    This field contains the minimum number of elements per data block. +

    +

    Page Bits

    This field contains the number of bits needed to store the + maximum number of elements in a data block page. +

    +
    +
    +

    +
    + +
  9. + + Index-specific information for Version 2 B-tree: +
  10. + +
    + + + + + + + + + + + + + + + + + + + +
    + Layout: Version 2 B-tree Indexing Information +
    bytebytebytebyte
    Node Size
    Split PercentMerge Percent + This space inserted only to align table nicely
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + Fields: Version 2 B-tree Indexing Information +
    Field NameDescription

    Node Size

    This field is the size in bytes of a B-tree node. +

    +

    Split Percent

    This field is the percentage full of a B-tree node at which to split the node.

    Merge Percent

    This field is the percentage full of a B-tree node at which to merge the node.

    +
    +
+ + + +
+ +

+ Class-specific information for virtual storage (layout class 3):

+ +
+ + + + + + + + + + + + + + + + + + +
+ Layout: Virtual Storage Property Description +
bytebytebytebyte

AddressO

Index
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Virtual Storage Property Description +
Field NameDescription

Address

This is the address of the global heap collection where + the VDS mapping entries are stored. + See “Disk Format: Level 1F - + Global Heap Block for Virtual Datasets.” +

Index

This is the index of the data object within the global heap collection. +

+
+
+ +

IV.A.2.j. The Bogus Message

+ + +
+ + + + + + + + +
Header Message Name: Bogus
Header Message Type: 0x0009
Length: 4 bytes
Status: For testing only; should never + be stored in a valid file.
Description:This message is used for testing the HDF5 Library’s + response to an “unknown” message type and should + never be encountered in a valid HDF5 file.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + +
+ Layout: Bogus Message +
bytebytebytebyte
Bogus Value
+
+ +
+
+ + + + + + + + + + + +
+ Fields: Bogus Message +
Field NameDescription

Bogus Value

+

This value should always be: 0xdeadbeef.

+
+
+ +

IV.A.2.k. The Group Info Message +

+ + +
+ + + + + + + + +
Header Message Name: Group Info
Header Message Type: 0x000A
Length: Varies
Status: Optional; may not be + repeated.
Description:

This message stores information for the constants defining + a “new style” group’s behavior. Constant + information will be stored in this message and variable + information will be stored in the + Link Info message.

+

Note: the “estimated entry” information below is + used when determining the size of the object header for the + group when it is created.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Group Info Message +
bytebytebytebyte
VersionFlagsLink Phase Change: Maximum Compact Value (optional)
Link Phase Change: Minimum Dense Value (optional)Estimated Number of Entries (optional)
Estimated Link Name Length of Entries (optional)This space inserted only to align table nicely
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Group Info Message +
Field NameDescription

Version

The version number for this message. This document describes version 0.

+

Flags

This is the group information flag with the following definition: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, link phase change values are stored. +
1If set, the estimated entry information is non-default + and is stored. +
2-7Reserved

+

Link Phase Change: Maximum Compact Value

The is the maximum number of links to store “compactly” (in + the group’s object header).

+

This field is present if bit 0 of Flags is set.

+

Link Phase Change: Minimum Dense Value

This is the minimum number of links to store “densely” (in + the group’s fractal heap). The fractal heap’s address is + located in the Link Info + message.

+

This field is present if bit 0 of Flags is set.

+

Estimated Number of Entries

This is the estimated number of entries in groups.

+

If this field is not present, the default value of 4 + will be used for the estimated number of group entries.

+

This field is present if bit 1 of Flags is set.

+

Estimated Link Name Length of Entries

This is the estimated length of entry name.

+

If this field is not present, the default value of 8 + will be used for the estimated link name length of group entries.

+

This field is present if bit 1 of Flags is set.

+
+
+ + +

IV.A.2.l. The Data Storage - Filter + Pipeline Message

+ + +
+ + + + + + + + +
Header Message Name: + Data Storage - Filter Pipeline
Header Message Type: 0x000B
Length: Varies
Status: Optional; may not be + repeated.
Description:

This message describes the filter pipeline which should + be applied to the data stream by providing filter identification + numbers, flags, a name, and client data.

+

This message may be present in the object headers of both + dataset and group objects. For datasets, it specifies the + filters to apply to raw data. For groups, it specifies the + filters to apply to the group’s fractal heap. Currently, + only datasets using chunked data storage use the filter + pipeline on their raw data.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Filter Pipeline Message - Version 1 +
bytebytebytebyte
VersionNumber of FiltersReserved (zero)
Reserved (zero)

Filter Description List (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Filter Pipeline Message - Version 1 +
Field NameDescription

Version

The version number for this message. This table + describes version 1.

Number of Filters

The total number of filters described in this + message. The maximum possible number of filters in a + message is 32.

Filter Description List

A description of each filter. A filter description + appears in the next table.

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Filter Description - Version 1 +
bytebytebytebyte
Filter Identification ValueName Length
FlagsNumber Client Data Values

Name (variable size, optional)


Client Data (variable size, optional)

Padding (variable size, optional)
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Filter Description - Version 1 +
Field NameDescription

Filter Identification Value

+

+ This value, often referred to as a filter identifier, + is designed to be a unique identifier for the filter. + Values from zero through 32,767 are reserved for filters + supported by The HDF Group in the HDF5 Library and for + filters requested and supported by third parties. + Filters supported by The HDF Group are documented immediately + below. Information on 3rd-party filters can be found at + The HDF Group’s + + Contributions page.

+ +

+ To request a filter identifier, please contact + The HDF Group’s Help Desk at + The HDF Group Help Desk. + You will be asked to provide the following information:

+
    +
  1. Contact information for the developer requesting the + new identifier
  2. +
  3. A short description of the new filter
  4. +
  5. Links to any relevant information, including licensing + information
  6. +
+

+ Values from 32768 to 65535 are reserved for non-distributed uses + (for example, internal company usage) or for application usage + when testing a feature. The HDF Group does not track or document + the use of the filters with identifiers from this range.

+ +

+ The filters currently in library version 1.8.0 are + listed below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentificationNameDescription
0N/AReserved
1deflateGZIP deflate compression
2shuffleData element shuffling
3fletcher32Fletcher32 checksum
4szipSZIP compression
5nbitN-bit packing
6scaleoffsetScale and offset encoded values
+

Name Length

Each filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.

Flags

The flags indicate certain properties for a filter. The + bit values defined so far are: + + + + + + + + + + + + + + + +
BitDescription
0If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently skipped in the pipeline.
1-15Reserved (zero)

+

Number of Client Data Values

Each filter can store integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.

Name

If the Name Length field is non-zero then it will + contain the size of this field, padded to a multiple of eight. This + field contains a null-terminated, ASCII character string to serve + as a comment/name for the filter.

Client Data

This is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the array.

Padding

Four bytes of zeroes are added to the message at this + point if the Client Data Number of Values field contains + an odd number.

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
+ Layout: Filter Pipeline Message - Version 2 +
bytebytebytebyte
VersionNumber of FiltersThis space inserted only to align table nicely

Filter Description List (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ Fields: Filter Pipeline Message - Version 2 +
Field NameDescription

Version

The version number for this message. This table + describes version 2.

Number of Filters

The total number of filters described in this + message. The maximum possible number of filters in a + message is 32.

Filter Description List

A description of each filter. A filter description + appears in the next table.

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Filter Description - Version 2 +
bytebytebytebyte
Filter Identification ValueName Length (optional)
FlagsNumber Client Data Values

Name (variable size, optional)


Client Data (variable size, optional)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Filter Description - Version 2 +
Field NameDescription

Filter Identification Value

+

+ This value, often referred to as a filter identifier, + is designed to be a unique identifier for the filter. + Values from zero through 32,767 are reserved for filters + supported by The HDF Group in the HDF5 Library and for + filters requested and supported by third parties. + Filters supported by The HDF Group are documented immediately + below. Information on 3rd-party filters can be found at + The HDF Group’s + + Contributions page.

+ +

+ To request a filter identifier, please contact + The HDF Group’s Help Desk at + The HDF Group Help Desk. + You will be asked to provide the following information:

+
    +
  1. Contact information for the developer requesting the + new identifier
  2. +
  3. A short description of the new filter
  4. +
  5. Links to any relevant information, including licensing + information
  6. +
+

+ Values from 32768 to 65535 are reserved for non-distributed uses + (for example, internal company usage) or for application usage + when testing a feature. The HDF Group does not track or document + the use of the filters with identifiers from this range.

+ +

+ The filters currently in library version 1.8.0 are + listed below: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IdentificationNameDescription
0N/AReserved
1deflateGZIP deflate compression
2shuffleData element shuffling
3fletcher32Fletcher32 checksum
4szipSZIP compression
5nbitN-bit packing
6scaleoffsetScale and offset encoded values
+

Name Length

Each filter has an optional null-terminated ASCII name + and this field holds the length of the name including the + null termination padded with nulls to be a multiple of + eight. If the filter has no name then a value of zero is + stored in this field.

+

Filters with IDs less than 256 (in other words, filters + that are defined in this format documentation) do not store + the Name Length or Name fields. +

+

Flags

The flags indicate certain properties for a filter. The + bit values defined so far are: + + + + + + + + + + + + + + + +
BitDescription
0If set then the filter is an optional filter. + During output, if an optional filter fails it will be + silently skipped in the pipeline.
1-15Reserved (zero)

+

Number of Client Data Values

Each filter can store integer values to control + how the filter operates. The number of entries in the + Client Data array is stored in this field.

Name

If the Name Length field is non-zero, then it will + contain the size of this field, not padded to a multiple + of eight. This field contains a non-null-terminated, + ASCII character string to serve as a comment/name for the filter. +

+

Filters that are defined in this format documentation + such as deflate and shuffle do not store the Name + Length or Name fields. +

+

Client Data

This is an array of four-byte integers which will be + passed to the filter function. The Client Data Number of + Values determines the number of elements in the array.

+
+
+ +

IV.A.2.m. The Attribute Message

+ + +
+ + + + + + + + +
Header Message Name: Attribute
Header Message Type: 0x000C
Length: Varies
Status: Optional; may be + repeated.
Description:

The Attribute message is used to store objects + in the HDF5 file which are used as attributes, or + “metadata” about the current object. An attribute + is a small dataset; it has a name, a datatype, a dataspace, and + raw data. Since attributes are stored in the object header, they + should be relatively small (in other words, less than 64KB). + They can be associated with any type of object which has an + object header (groups, datasets, or committed (named) + datatypes).

+

In 1.8.x versions of the library, attributes can be larger + than 64KB. See the + + “Special Issues” section of the Attributes chapter + in the HDF5 User’s Guide for more information.

+

Note: Attributes on an object must have unique names: + the HDF5 Library currently enforces this by causing the + creation of an attribute with a duplicate name to fail. + Attributes on different objects may have the same name, + however.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Attribute Message (Version 1) +
bytebytebytebyte
VersionReserved (zero)Name Size
Datatype SizeDataspace Size

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Attribute Message (Version 1) +
Field NameDescription

Version

The version number information is used for changes in the format of the + attribute message and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by the library before version 1.6 to encode attribute message. + This version does not support shared datatypes.

+

Name Size

The length of the attribute name in bytes including the + null terminator. Note that the Name field below may + contain additional padding not represented by this + field.

Datatype Size

The length of the datatype description in the Datatype + field below. Note that the Datatype field may contain + additional padding not represented by this field.

Dataspace Size

The length of the dataspace description in the Dataspace + field below. Note that the Dataspace field may contain + additional padding not represented by this field.

Name

The null-terminated attribute name. This field is + padded with additional null characters to make it a + multiple of eight bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. This + field is padded with additional zero bytes to make it a + multiple of eight bytes.

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. This + field is not padded with additional bytes.

+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Attribute Message (Version 2) +
bytebytebytebyte
VersionFlagsName Size
Datatype SizeDataspace Size

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Attribute Message (Version 2) +
Field NameDescription

Version

The version number information is used for changes in the + format of the attribute message and is described here: + + + + + + + + + + +
VersionDescription
2Used by the library of version 1.6.x and after to encode + attribute messages. + This version supports shared datatypes. The fields of + name, datatype, and dataspace are not padded with + additional bytes of zero. +

+

Flags

This bit field contains extra information about + interpreting the attribute message: + + + + + + + + + + + + + + + + +
BitDescription
0If set, datatype is shared.
1If set, dataspace is shared.

+

Name Size

The length of the attribute name in bytes including the + null terminator.

Datatype Size

The length of the datatype description in the Datatype + field below.

Dataspace Size

The length of the dataspace description in the Dataspace + field below.

Name

The null-terminated attribute name. This field is not + padded with additional bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. +

+

If the + Flag field indicates this attribute’s datatype is + shared, this field will contain a “shared message” encoding + instead of the datatype encoding. +

+

This field is not padded with additional bytes. +

+

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. +

+

If the + Flag field indicates this attribute’s dataspace is + shared, this field will contain a “shared message” encoding + instead of the dataspace encoding. +

+

This field is not padded with additional bytes.

+

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. +

+

This field is not padded with additional zero bytes. +

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Attribute Message (Version 3) +
bytebytebytebyte
VersionFlagsName Size
Datatype SizeDataspace Size
Name Character Set EncodingThis space inserted only to align table nicely

Name (variable size)


Datatype (variable size)


Dataspace (variable size)


Data (variable size)

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Attribute Message (Version 3) +
Field NameDescription

Version

The version number information is used for changes in the + format of the attribute message and is described here: + + + + + + + + + + +
VersionDescription
3Used by the library of version 1.8.x and after to + encode attribute messages. + This version supports attributes with non-ASCII names. +

+

Flags

This bit field contains extra information about + interpreting the attribute message: + + + + + + + + + + + + + + + + +
BitDescription
0If set, datatype is shared.
1If set, dataspace is shared.

+

Name Size

The length of the attribute name in bytes including the + null terminator.

Datatype Size

The length of the datatype description in the Datatype + field below.

Dataspace Size

The length of the dataspace description in the Dataspace + field below.

Name Character Set Encoding

The character set encoding for the attribute’s name: + + + + + + + + + + + + + + + +
ValueDescription
0ASCII character set encoding +
1UTF-8 character set encoding +
+

+

Name

The null-terminated attribute name. This field is not + padded with additional bytes.

Datatype

The datatype description follows the same format as + described for the datatype object header message. +

+

If the + Flag field indicates this attribute’s datatype is + shared, this field will contain a “shared message” encoding + instead of the datatype encoding. +

+

This field is not padded with additional bytes. +

+

Dataspace

The dataspace description follows the same format as + described for the dataspace object header message. +

+

If the + Flag field indicates this attribute’s dataspace is + shared, this field will contain a “shared message” encoding + instead of the dataspace encoding. +

+

This field is not padded with additional bytes.

+

Data

The raw data for the attribute. The size is determined + from the datatype and dataspace descriptions. +

+

This field is not padded with additional zero bytes. +

+
+
+ +

IV.A.2.n. The Object Comment + Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Comment
Header Message Type: 0x000D
Length: Varies
Status: Optional; may not be + repeated.
Description:The object comment is designed to be a short description of + an object. An object comment is a sequence of non-zero + (\0) ASCII characters with no other formatting + included by the library.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + +
+ Layout: Object Comment Message +
bytebytebytebyte

Comment (variable size)

+
+ +
+
+ + + + + + + + + + + +
+ Fields: Object Comment Message +
Field NameDescription

Name

A null terminated ASCII character string.

+
+ +

IV.A.2.o. The Object + Modification Time (Old) Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Modification Time (Old)
Header Message Type: 0x000E
Length: Fixed
Status: Optional; may not be + repeated.
Description:

The object modification date and time is a timestamp + which indicates (using ISO-8601 date and time format) the last + modification of an object. The time is updated when any object + header message changes according to the system clock where the + change was posted. All fields of this message should be + interpreted as coordinated universal time (UTC).

+

This modification time message is deprecated in favor of + the “new” Object + Modification Time message and is no longer written to the + file in versions of the HDF5 Library after the 1.6.0 + version.

Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Modification Time Message (Old) +
bytebytebytebyte
Year
MonthDay of Month
HourMinute
SecondReserved
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Modification Time Message (Old) +
Field NameDescription

Year

The four-digit year as an ASCII string. For example, + 1998. +

Month

The month number as a two digit ASCII string where + January is 01 and December is 12.

Day of Month

The day number within the month as a two digit ASCII + string. The first day of the month is 01.

Hour

The hour of the day as a two digit ASCII string where + midnight is 00 and 11:00pm is 23.

Minute

The minute of the hour as a two digit ASCII string where + the first minute of the hour is 00 and + the last is 59.

Second

The second of the minute as a two digit ASCII string + where the first second of the minute is 00 + and the last is 59.

Reserved

This field is reserved and should always be zero.

+
+ +

IV.A.2.p. The Shared Message Table + Message

+ + +
+ + + + + + + + +
Header Message Name: Shared Message + Table
Header Message Type: 0x000F
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message is used to locate the table of shared object + header message (SOHM) indexes. Each index consists of information + to find the shared messages from either the heap or object header. + This message is only found in the superblock + extension.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Shared Message Table Message +
bytebytebytebyte
VersionThis space inserted only to align table nicely

Shared Object Header Message Table AddressO

Number of IndicesThis space inserted only to align table nicely
+ + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Shared Message Table Message +
Field NameDescription

Version

The version number for this message. This document describes version 0.

Shared Object Header Message Table Address

This field is the address of the master table for shared + object header message indexes.

+

Number of Indices

This field is the number of indices in the master table. +

+
+ +

IV.A.2.q. The Object Header + Continuation Message

+ + +
+ + + + + + + + +
Header Message Name: Object Header + Continuation
Header Message Type: 0x0010
Length: Fixed
Status: Optional; may be + repeated.
Description:The object header continuation is the location in the file + of a block containing more header messages for the current data + object. This can be used when header blocks become too large or + are likely to change over time.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Layout: Object Header Continuation Message +
bytebytebytebyte

OffsetO


LengthL

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Object Header Continuation Message +
Field NameDescription

Offset

This value is the address in the file where the + header continuation block is located.

Length

This value is the length in bytes of the header continuation + block in the file.

+
+
+ +

The format of the header continuation block that this message points + to depends on the version of the object header that the message is + contained within. +

+ +

+ Continuation blocks for version 1 object headers have no special + formatting information; they are merely a list of object header + message info sequences (type, size, flags, reserved bytes and data + for each message sequence). See the description + of Version 1 Data Object Header Prefix. +

+ +

Continuation blocks for version 2 object headers do have + special formatting information as described here + (see also the description of + Version 2 Data Object Header Prefix.): +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 Object Header Continuation Block +
bytebytebytebyte
Signature
Header Message Type #1Size of Header Message Data #1Header Message #1 Flags
Header Message #1 Creation Order (optional)This space inserted only to align table nicely

Header Message Data #1

.
.
.
Header Message Type #nSize of Header Message Data #nHeader Message #n Flags
Header Message #n Creation Order (optional)This space inserted only to align table nicely

Header Message Data #n

Gap (optional, variable size)
Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 Object Header Continuation Block +
Field NameDescription

Signature

+

The ASCII character string “OCHK” + is used to indicate the beginning of an object header + continuation block. This gives file consistency checking + utilities a better chance of reconstructing a damaged file. +

+

Header Message #n Type

+

Same format as version 1 of the object header, described above. +

Size of Header Message #n Data

+

Same format as version 1 of the object header, described above. +

Header Message #n Flags

+

Same format as version 1 of the object header, described above. +

Header Message #n Creation Order

+

This field stores the order that a message of a given type + was created in.

+

This field is present if bit 2 of flags is set.

+

Header Message #n Data

+

Same format as version 1 of the object header, described above. +

Gap

+

A gap in an object header chunk is inferred by the end of the + messages for the chunk before the beginning of the chunk’s + checksum. Gaps are always smaller than the size of an + object header message prefix (message type + message size + + message flags).

+

Gaps are formed when a message (typically an attribute message) + in an earlier chunk is deleted and a message from a later + chunk that does not quite fit into the free space is moved + into the earlier chunk.

+

Checksum

+

This is the checksum for the object header chunk. +

+
+
+ +

IV.A.2.r. The Symbol Table + Message

+ + +
+ + + + + + + + +
Header Message Name: Symbol Table + Message
Header Message Type: 0x0011
Length: Fixed
Status: Required for + “old style” groups; may not be repeated.
Description:Each “old style” group has a v1 B-tree and a + local heap for storing symbol table entries, which are located + with this message.
Format of data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + +
+ Layout: Symbol Table Message +
bytebytebytebyte

v1 B-tree AddressO


Local Heap AddressO

+ + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Symbol Table Message +
Field NameDescription

v1 B-tree Address

This value is the address of the v1 B-tree containing the + symbol table entries for the group.

Local Heap Address

This value is the address of the local heap containing + the link names for the symbol table entries for the group.

+
+ +

IV.A.2.s. The Object + Modification Time Message

+ + +
+ + + + + + + + +
Header Message Name: Object + Modification Time
Header Message Type: 0x0012
Length: Fixed
Status: Optional; may not be + repeated.
Description:The object modification time is a timestamp which indicates + the time of the last modification of an object. The time is + updated when any object header message changes according to + the system clock where the change was posted.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + +
+ Layout: Modification Time Message +
bytebytebytebyte
VersionReserved (zero)
Seconds After UNIX Epoch
+
+ +
+
+ + + + + + + + + + + + + + + + +
+ Fields: Modification Time Message +
Field NameDescription

Version

The version number is used for changes in the format of Object Modification Time + and is described here: + + + + + + + + + + + + + + + +
VersionDescription
0Never used.
1Used by Version 1.6.1 and after of the library to encode time. In + this version, the time is the seconds after Epoch.

+

Seconds After UNIX Epoch

A 32-bit unsigned integer value that stores the number of + seconds since 0 hours, 0 minutes, 0 seconds, January 1, 1970, + Coordinated Universal Time.

+
+ +

IV.A.2.t. The B-tree + ‘K’ Values Message

+ + +
+ + + + + + + + +
Header Message Name: B-tree + ‘K’ Values
Header Message Type: 0x0013
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message retrieves non-default ‘K’ values + for internal and leaf nodes of a group or indexed storage v1 + B-trees. This message is only found in the superblock + extension.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ Layout: B-tree ‘K’ Values Message +
bytebytebytebyte
VersionIndexed Storage Internal Node KThis space inserted only to align table nicely
Group Internal Node KGroup Leaf Node K
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: B-tree ‘K’ Values Message +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Indexed Storage Internal Node K

This is the node ‘K’ value for each internal node of an + indexed storage v1 B-tree. See the description of this field + in version 0 and 1 of the superblock as well the section on + v1 B-trees. +

+

Group Internal Node K

This is the node ‘K’ value for each internal node of a group + v1 B-tree. See the description of this field in version 0 and + 1 of the superblock as well as the section on v1 B-trees. +

+

Group Leaf Node K

This is the node ‘K’ value for each leaf node of a group v1 + B-tree. See the description of this field in version 0 and 1 + of the superblock as well as the section on v1 B-trees. +

+
+
+ +

IV.A.2.u. The Driver Info + Message

+ + +
+ + + + + + + + + +
Header Message Name: Driver + Info
Header Message Type: 0x0014
Length: Varies
Status: Optional; may not be + repeated.
+ Description:This message contains information needed by the file driver + to reopen a file. This message is only found in the + superblock extension: see the + “Disk Format: Level 0C - Superblock Extension” + section for more information. For more information on the fields + in the driver info message, see the + “Disk Format: Level 0B - File Driver Info” + section; those who use the multi and family file drivers will + find this section particularly helpful.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Driver Info Message +
bytebytebytebyte
VersionThis space inserted only to align table nicely

Driver Identification
Driver Information SizeThis space inserted only to align table nicely


Driver Information (variable size)


+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Driver Info Message +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Driver Identification

This is an eight-byte ASCII string without null termination which + identifies the driver. +

+

Driver Information Size

The size in bytes of the Driver Information field of this + message.

+

Driver Information

Driver information is stored in a format defined by the file driver.

+
+
+ +

IV.A.2.v. The Attribute Info + Message

+ + +
+ + + + + + + + +
Header Message Name: Attribute + Info
Header Message Type: 0x0015
Length: Varies
Status: Optional; may not be + repeated.
Description:This message stores information about the attributes on an + object, such as the maximum creation index for the attributes + created and the location of the attribute storage when the + attributes are stored “densely”.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Attribute Info Message +
bytebytebytebyte
VersionFlagsMaximum Creation Index (optional)

Fractal Heap AddressO


Attribute Name v2 B-tree AddressO


Attribute Creation Order v2 B-tree AddressO (optional)

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Attribute Info Message +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Flags

This is the attribute index information flag with the + following definition: + + + + + + + + + + + + + + + + + + + +
BitDescription
0If set, creation order for attributes is tracked. +
1If set, creation order for attributes is indexed. +
2-7Reserved

+ +

Maximum Creation Index

The is the maximum creation order index value for the + attributes on the object.

+

This field is present if bit 0 of Flags is set.

+

Fractal Heap Address

This is the address of the fractal heap to store dense + attributes. + Each attribute stored in the fractal heap is described by + the Attribute Message. +

+

Attribute Name v2 B-tree Address

This is the address of the version 2 B-tree to index the + names of densely stored attributes.

+

Attribute Creation Order v2 B-tree Address

This is the address of the version 2 B-tree to index the + creation order of densely stored attributes.

+

This field is present if bit 1 of Flags is set.

+
+
+ +

IV.A.2.w. The Object Reference + Count Message

+ + +
+ + + + + + + + +
Header Message Name: Object Reference + Count
Header Message Type: 0x0016
Length: Fixed
Status: Optional; may not be + repeated.
Description:This message stores the number of hard links (in groups or + objects) pointing to an object: in other words, its + reference count.
Format of Data: See the tables + below.
+ + +
+ + + + + + + + + + + + + + + + + + +
+ Layout: Object Reference Count +
bytebytebytebyte
VersionThis space inserted only to align table nicely
Reference count
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Object Reference Count +
Field NameDescription

Version

The version number for this message. This document describes + version 0.

+

Reference Count

The unsigned 32-bit integer is the reference count for the + object. This message is only present in “version 2” + (or later) object headers, and if not present those object + header versions, the reference count for the object is assumed + to be 1.

+
+
+ +
+ +

IV.A.2.x. The File Space Info + Message

+ +
+ + + + + + + +

+

+
Header Message Name: File Space + Info
Header Message Type: 0x0017
Length: Fixed
Status: Optional; may not be + repeated.
+ Description:This message stores the file space management information + that the library uses in handling file space + requests for the file. Version 0 of the message is used for release 1.10.0 only. + Version 1 of the message is used for release 1.10.1+. + There is no File Space Info message before release 1.10 as the library does + not track file space across multiple file opens. +

+ Note that version 0 is deprecated starting release 1.10.1. + That means when the 1.10.1+ library opens an HDF5 file with a version 0 message, + the library will decode and map the message to version 1. + On file close, it will encode the message as a version 1 message. +

+ The library uses the following three mechanisms to manage file space in an HDF5 file: +

    +
  • Free-space managers +
    They track free-space sections of various sizes in the file that are not currently + allocated. Each free-space manager corresponds to a file space type. + There are two main groups of file space types: metadata and raw data. + Metadata is further divided into five types: superblock, B-tree, global heap, + local heap, and object header. + See the description of Free-space + Manager as well the description of file space allocation types in + Appendix B +
  • +
  • Aggregators +
    The library manages two aggregators, one for metadata and one for raw data. + Aggregator is a contiguous block of free-space in the file. + The size of each aggregator is tunable via public routines + H5Pset_meta_block_size and H5Pset_small_data_block_size respectively. +
  • +
  • Virtual file drivers +
    The library's virtual file driver interface dispatches requests for additional + space to the allocation routine of the file driver associated with the file. + For example, if the sec2 file driver is being used, its allocation routine will + increase the size of the file to service the requests. +
  • +
+

+ For release 1.10.0, the library derives the following four file space strategies + based on the mechanisms: +

    +
  • H5F_FILE_SPACE_ALL +
      +
    • Mechanisms used: free-space managers, aggregators, and virtual file drivers
    • +
    • Does not persist free-space across file opens
    • +
    • This strategy is the library default
    • +
    +
  • +
  • H5F_FILE_SPACE_ALL_PERSIST
  • +
      +
    • Mechanisms used: free-space managers, aggregators, and virtual file drivers
    • +
    • Persist free-space across file opens
    • +
    +
  • H5F_FILE_SPACE_AGGR_VFD
  • +
      +
    • Mechanisms used: aggregators and virtual file drivers
    • +
    • Does not persist free-space across file opens
    • +
    +
  • H5F_FILE_SPACE_VFD
  • +
      +
    • Mechanisms used: virtual file drivers
    • +
    • Does not persist free-space across file opens
    • +
    +
+ For release 1.10.1+, the free-space manager mechanism is modified to handle paged aggregation + which aggregates small metadata and raw data allocations into constant-sized well-aligned pages + to allow efficient I/O accesses. + With the support of this feature, the library derives the following four file space strategies: +
    +
  • H5F_FSPACE_STRATEGY_FSM_AGGR
  • +
      +
    • Mechanisms used: free-space managers, aggregators, and virtual file drivers
    • +
    • This strategy is the library default
    • +
    +
  • H5F_FSPACE_STRATEGY_PAGE
  • +
      +
    • Mechanisms used: free-space managers with embedded paged aggregation and virtual file drivers
    • +
    +
  • H5F_FSPACE_STRATEGY_AGGR
  • +
      +
    • Mechanisms used: aggregators and virtual file drivers
    • +
    +
  • H5F_FSPACE_STRATEGY_NONE
  • +
      +
    • Mechanisms used: virtual file drivers
    • +
    +
+ The default is not persisting free-space across file opens for the above four strategies. + User can use the public routine H5Pset_file_space_strategy to request + persisting free-space. +
Format of Data: See the tables + below.
+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: File Space Info - Version 0 +
bytebytebytebyte
VersionStrategyThresholdL

Free-space manager addressO for H5FD_MEM_SUPER


Free-space manager address0 for H5FD_MEM_BTREE


Free-space manager address0 for H5FD_MEM_DRAW


Free-space manager address0 for H5FD_MEM_GHEAP


Free-space manager address0 for H5FD_MEM_LHEAP


Free-space manager address0 for H5FD_MEM_OHDR

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: File Space Info +
Field NameDescription

Version

This is version 0 of this message.

+

Strategy

This is the file space strategy used to manage file space. + There are four types: + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
1H5F_FILE_SPACE_ALL_PERSIST
2H5F_FILE_SPACE_ALL
3H5F_FILE_SPACE_AGGR_VFD
4H5F_FILE_SPACE_VFD

+

Threshold

This is the smallest free-space section size that the + free-space manager will track. +

Free-space manager addresses

These are the six free-space manager addresses for the + six file space allocation types: +

    +
  • H5FD_MEM_SUPER
  • +
  • H5FD_MEM_BTREE
  • +
  • H5FD_MEM_DRAW
  • +
  • H5FD_MEM_GHEAP
  • +
  • H5FD_MEM_LHEAP
  • +
  • H5FD_MEM_OHDR
  • +
+ Note that these six fields exist only if the value for the field + “Strategy” is H5F_FILE_SPACE_ALL_PERSIST. +

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: File Space Info - Version 1 +
bytebytebytebyte
VersionStrategyPersisting free-spaceThis space inserted only to align table nicely
Free-space Section ThresholdL
File Space Page Size
Page-end Metadata thresholdThis space inserted only to align table nicely

EOA0


AddressO of small-sized free-space manager for H5FD_MEM_SUPER


AddressO of small-sized free-space manager for H5FD_MEM_BTREE


AddressO of small-sized free-space manager for H5FM_MEM_DRAW


AddressO of small-sized free-space manager for H5FD_MEM_GHEAP


AddressO of small-sized free-space manager for H5FD_MEM_LHEAP


AddressO of small-sized free-space manager for H5FD_MEM_OHDR


AddressO of large-sized free-space manager for H5FD_MEM_SUPER


AddressO of large-sized free-space manager for H5FD_MEM_BTREE


AddressO of large-sized free-space manager for H5FM_MEM_DRAW


AddressO of large-sized free-space manager for H5FD_MEM_GHEAP


AddressO of large-sized free-space manager for H5FD_MEM_LHEAP


AddressO of large-sized free-space manager for H5FD_MEM_OHDR

+ + + + + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: File Space Info +
Field NameDescription

Version

This is version 1 of this message.

+

Strategy

This is the file space strategy used to manage file space. + There are four types: + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0H5F_FSPACE_STRATEGY_FSM_AGGR
1H5F_FSPACE_STRATEGY_PAGE
2H5F_FSPACE_STRATEGY_AGGR
3H5F_FSPACE_STRATEGY_NONE

+

Persisting free-space

True or false in persisting free-space. +

Free-space Section Threshold

This is the smallest free-space section size that the + free-space manager will track. +

File space page size

This is the file space page size, which is used when the paged aggregation feature + is enabled. +

Page-end metadata threshold

This is the smallest free-space section size at the end of a page that + the free-space manager will track. This is used when the paged aggregation feature + is enabled. +

EOA

The EOA before the allocation of free-space manager header and section info for the + self-referential free-space managers when persisting free-space. +
+ Note that self-referential free-space managers are managers that involve file space + allocation for the managers' free-space header and section info. +

Addresses of small-sized free-space managers

These are the addresses of the six small-sized free-space managers for + the six file space allocation types: +

+
    +
  • H5FD_MEM_SUPER
  • +
  • H5FD_MEM_BTREE
  • +
  • H5FD_MEM_DRAW
  • +
  • H5FD_MEM_GHEAP
  • +
  • H5FD_MEM_LHEAP
  • +
  • H5FD_MEM_OHDR
  • +
+ Note that these six fields exist only if the value for the field + “Persisting free-space” is true. + +

Addresses of large-sized free-space managers

These are the addresses of the six large-sized free-space managers for + the six file space allocation types: +

+
    +
  • H5FD_MEM_SUPER
  • +
  • H5FD_MEM_BTREE
  • +
  • H5FD_MEM_DRAW
  • +
  • H5FD_MEM_GHEAP
  • +
  • H5FD_MEM_LHEAP
  • +
  • H5FD_MEM_OHDR
  • +
+ Note that these six fields exist only if the value for the field + “Persisting free-space” is true. + +
+
+ +

+ IV.B. Disk Format: Level 2B - Data Object Data Storage

+ +

The data for an object is stored separately from its header + information in the file and may not actually be located in the HDF5 file + itself if the header indicates that the data is stored externally. The + information for each record in the object is stored according to the + dimensionality of the object (indicated in the dataspace header message). + Multi-dimensional array data is stored in C order; in other words, the + “last” dimension changes fastest.

+ +

Data whose elements are composed of atomic datatypes are stored in IEEE + format, unless they are specifically defined as being stored in a different + machine format with the architecture-type information from the datatype + header message. This means that each architecture will need to [potentially] + byte-swap data values into the internal representation for that particular + machine.

+ +

Data with a variable-length datatype is stored in the global heap + of the HDF5 file. Global heap identifiers are stored in the + data object storage.

+ +

Data whose elements are composed of reference datatypes are stored in + several different ways depending on the particular reference type involved. + Object pointers are just stored as the offset of the object header being + pointed to with the size of the pointer being the same number of bytes as + offsets in the file.

+ +

Dataset region references are stored as a heap-ID which points to + the following information within the file-heap: an offset of the object + pointed to, number-type information (same format as header message), + dimensionality information (same format as header message), sub-set start + and end information (in other words, a coordinate location for each), + and field start and end names (in other words, a [pointer to the] string + indicating the first field included and a [pointer to the] string name + for the last field).

+ +

Data of a compound datatype is stored as a contiguous stream of the items + in the structure, with each item formatted according to its datatype. +

+ Description of datatypes for variable-length, references and compound classes can be found + in Datatype Message. +

+ Information about global heap and heap ID can be found in Global Heap. +

+ For reference datatype, + see also the encoding description for Reference Encoding (Revised) and + Reference Encoding (Backward Compatibility) in Appendix D. +

+ +

+ V. Appendix A: Definitions

+ +

Definitions of various terms used in this document are included in + this section.

+ +
+ + + + + + + + + + + + + + + + +
TermDefinition
Undefined AddressThe undefined + address for a file is a file address with all bits + set: in other words, 0xffff...ff.
Unlimited SizeThe unlimited size + for a size is a value with all bits set: in other words, + 0xffff...ff.
+
+ + +

+ VI. Appendix B: File Space Allocation Types

+ +

There are six basic types of file space allocation as follows: +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Basic Allocation TypeDescription
H5FD_MEM_SUPERFile space allocated for Superblock.
H5FD_MEM_BTREEFile space allocated for B-tree.
H5FD_MEM_DRAWFile space allocated for raw data.
H5FD_MEM_GHEAPFile space allocated for Global Heap.
H5FD_MEM_LHEAPFile space allocated for Local Heap.
H5FD_MEM_OHDRFile space allocated for Object Header.
+
+ +
+

There are other file space allocation types that are mapped to the + above six basic types because they are similar in nature. + The mapping and the corresponding description are listed in the following two tables: +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Basic Allocation TypeMapping of Allocation Types to Basic Allocation Types
H5FD_MEM_SUPERnone
H5FD_MEM_BTREEH5FD_MEM_SOHM_INDEX
H5FD_MEM_DRAWH5FD_MEM_FHEAP_HUGE_OBJ
H5FD_MEM_GHEAPnone
H5FD_MEM_LHEAPH5FD_MEM_FHEAP_DBLOCK, H5FD_MEM_FSPACE_SINFO
H5FD_MEM_OHDRH5FD_MEM_FHEAP_HDR, H5FD_MEM_FHEAP_IBLOCK, H5FD_MEM_FSPACE_HDR, H5FD_MEM_SOHM_TABLE
+
+ +
+

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Allocation TypeDescription
H5FD_MEM_FHEAP_HDRFile space allocated for Fractal Heap Header.
H5FD_MEM_FHEAP_DBLOCKFile space allocated for Fractal Heap Direct Blocks.
H5FD_MEM_FHEAP_IBLOCKFile space allocated for Fractal Heap Indirect Blocks.
H5FD_MEM_FHEAP_HUGE_OBJFile space allocated for huge objects in the fractal heap.
H5FD_MEM_FSPACE_HDRFile space allocated for Free-space Manager Header.
H5FD_MEM_FSPACE_SINFOFile space allocated for Free-space Section List of the free-space manager.
H5FD_MEM_SOHM_TABLEFile space allocated for Shared Object Header Message Table.
H5FD_MEM_SOHM_INDEXFile space allocated for Shared Message Record List.
+
+ +

VII. Appendix C: + Types of Indexes for Dataset Chunks

+ +

For an HDF5 file without the latest format enabled, the library + uses the Version 1 B-tree to index dataset + chunks.

+ +

For an HDF5 file with the latest format enabled, the library uses + one of the following five indexing types depending on a chunked + dataset’s dimension specification and the way it is extended. +

+ + +

VII.A. The Single Chunk Index

+ +

The Single Chunk index can be used when the dataset fulfills + the following condition:

+ +
    +
  • the current, maximum, and chunk dimension sizes are all the same
  • +
+ +

The dataset has only one chunk, and the address of the single + chunk is stored in the version 4 Data Layout message. + See the Chunked Storage Property + Description layout and field description tables.

+ + +

VII.B. The Implicit Index

+ +

The Implicit index can be used when the dataset fulfills + the following conditions:

+ +
    +
  • fixed maximum dimension sizes
  • +
  • no filter applied to the dataset
  • +
  • the timing for the space allocation of the dataset chunks is + H5P_ALLOC_TIME_EARLY
  • +
+ +

Since the dataset’s dimension sizes are known and storage space + is to be allocated early, an array of dataset chunks are allocated + based on the maximum dimension sizes when the dataset is created. + The base address of the array is stored in the version 4 + Data Layout message. See the + Chunked Storage Property + Description layout and field description tables. +

+ +

When accessing a dataset chunk with a specified offset, the + address of the chunk in the array is computed as below:

+ +

base address + (size of a chunk in bytes * chunk index + associated with the offset)

+ +

A chunk index starts at 0 and increases according to the + fastest changing dimension, then the next fastest, and so on. + + The chunk index for a dataset chunk offset is computed as below: +

    +
  1. Calculate the scaled offset for each dimension in + scaled_offset: +
    +
    +        scaled_offset = chunk_offset/chunk_dims
    +    
  2. +
  3. Calculate the # of chunks for each dimension in + nchunks: +
    +
    +        nchunks = (curr_dims + chunk_dims - 1)/chunk_dims
    +    
  4. + +
  5. Calculate the down chunks for each dimension in + down_chunks: +
    +
    +        /* n is the # of dimensions */
    +        for(i = (int)(n-1), acc = 1; i >= 0; i--) {
    +        down_chunks[i] = acc;
    +        acc *= nchunks[i];
    +        }
    +      
    +
  6. + +
  7. Calculate the chunk index in chunk_index: +
    +
    +        /* n is the # of dimensions */
    +        for(u = 0, chunk_index = 0; u < n; u++)
    +                                        chunk_index += down_chunks[u] * scaled_offset[u];
    +                                        
    +
  8. +
+

+ For example, for a 2-dimensional dataset with + curr_dims[4,5] and chunk_dims[3,2], + there will be a total of 6 chunks, with 3 chunks in the fastest + changing dimension and 2 chunks in the slowest changing dimension. + See the figure below. + The chunk index for the chunk offset [3,4] + is computed as below: +

    + +
  1. scaled_offset[0] = 1, scaled_offset[1] = 2
  2. +
  3. nchunks[0] = 2, nchunks[1] = 3
  4. +
  5. down_chunks[0] = 3, down_chunks[1] = 1
  6. +
  7. chunk_index = 5
  8. +
    +
+ + + + + + + + + +
+
+ Chunk Diagram
+
+ Figure 3. Implicit index chunk diagram +
+ + + + + + +

VII.C. The Fixed Array Index

+ +

The Fixed Array index can be used when the dataset fulfills + the following condition:

+
    +
  • fixed maximum dimension sizes
  • +
+ +

Since the maximum number of chunks is known, an array of + in-file-on-disk addresses based on the maximum number of chunks is + allocated when data is written to the dataset. To access a dataset + chunk with a specified offset, the + chunk index associated with the offset +is calculated. The index is mapped into the array to locate the +disk address for the chunk.

+ +

The Fixed Array (FA) index structure provides space and speed + improvements in locating chunks over index structures that handle + more dynamic data accesses like a + Version 2 B-tree index. + The entry into the Fixed Array is the Fixed Array header which + contains metadata about the entries stored in the array. The + header contains a pointer to a data block which stores the array + of entries that describe the dataset chunks. For greater efficiency, + the array will be divided into multiple pages if the number of + entries exceeds a threshold value. The space for the data block + and possibly data block pages are allocated as a single contiguous + block of space.

+ +

The content of the data block depends on whether paging is + activated or not. When paging is not used, elements that describe + the chunks are stored in the data block. If paging is turned on, + the data block contains a bitmap indicating which pages are + initialized. Then subsequent data block pages will contain the + entries that describe the chunks.

+ +

An entry describes either a filtered or non-filtered dataset + chunk. The formats for both element types are described below. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fixed Array Header +
bytebytebytebyte
Signature
VersionClient IDEntry SizePage Bits

Max Num + EntriesL


Data Block + AddressO

Checksum
+ + + + + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fixed Array Header +
Field NameDescription

Signature

+

The ASCII character string “FAHD” + is used to indicate the beginning of a Fixed Array header. + This gives file consistency checking utilities a better + chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The ID for identifying the client of the + Fixed Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved +
+

+

Entry Size

+

The size in bytes of an entry in the Fixed Array. +

+

Page Bits

+

The number of bits needed to store the maximum + number of entries in a + data block page.

+

Max Num Entries

+

The maximum number of entries in the Fixed + Array.

+

Data Block Address

+

The address of the data block in the Fixed Array. +

+

Checksum

+

The checksum for the header.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Fixed Array Data Block +
bytebytebytebyte
Signature
VersionClient IDThis space inserted + only to align table nicely

Header AddressO


Page Bitmap (variable size and + optional)


Elements (variable size and + optional)

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Fixed Array Data Block +
Field NameDescription

Signature

+

The ASCII character string “FADB” + is used to indicate the beginning of a Fixed Array data + block. This gives file consistency checking utilities a + better chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The ID for identifying the client of the + Fixed Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved. +
+

+

Header Address

+

The address of the Fixed Array header. Principally used + for file integrity checking. +

+

Page Bitmap

A bitmap indicating which data block pages are initialized.

+

Exists only if the data block is paged.

Elements

+

Contains the elements stored in the data block + and exists only if the data block is not paged. + There are two element types: + + + + + + + + + + + + + + +
IDDescription
0Non-filtered + dataset chunks +
1Filtered dataset + chunks +
+

+

Checksum

+

The checksum for the Fixed Array data block.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ Layout: Fixed Array Data Block Page +
bytebytebytebyte

Elements (variable + size)

Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Fixed Array Data Block Page +
Field NameDescription

Elements

+

Contains the elements stored in the data block page. + There are two element types: + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
+

+

Checksum

+

The checksum for a Fixed Array data block page.

+
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + +
+ Layout: Data Block Element for Non-filtered Dataset Chunk +
bytebytebytebyte

AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + +
+ Fields: Data Block Element for Non-filtered Dataset Chunk +
Field NameDescription

Address

The address of the dataset chunk in the file. +

+
+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Data Block Element for Filtered Dataset Chunk +
bytebytebytebyte

AddressO


Chunk Size (variable size; at most + 8 bytes)

Filter Mask
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Data Block Element for Filtered Dataset Chunk +
Field NameDescription

Address

The address of the dataset chunk in the file. +

+

Chunk Size

The size of the dataset chunk in bytes. +

+

Filter Mask

Indicates the filter to skip for the dataset chunk. Each + filter has an index number in the pipeline; if that filter is + skipped, the bit corresponding to its index is set. +

+
+
+ + +

VII.D. The Extensible Array Index

+ +

The Extensible Array index can be used when the dataset + fulfills the following condition:

+ +
    +
  • only one dimension of unlimited extent
  • +
+ +

The Extensible Array (EA) is a data structure that is used as a + chunk index in datasets where the dataspace has a single + unlimited dimension. In other words, one dimension is set to + H5S_UNLIMITED, and the other dimensions are any number + of fixed-size dimensions. The idea behind the extensible array is + that a particular data object can be located via a lightweight + indexing structure of fixed depth for a given address space. This + indexing structure requires only a few (2-3) file operations per + element lookup and gives good cache performance. Unlike the B-tree + structure, the extensible array is optimized for appends. Where a + B-tree would always add at the rightmost node under these + circumstances, either creating a deep tree (version 1) or requiring + expensive rebalances to correct (version 2), the extensible array + has already mapped out a pre-balanced internal structure. This + optimized internal structure is instantiated as needed when chunk + records are inserted into the structure.

+ + + + + + + +

An Extensible Array consists of a header, an index block, + secondary blocks, data blocks, and (optional) data block pages. The + general scheme is that the index block is used to reference a + secondary block, which is, in turn, used to reference the data block + page where the chunk information is stored. The data blocks will + be paged for efficiency when their size passes a threshold value. + These pages are laid out contiguously on the disk after the data + block, are initialized as needed, and are tracked via bitmaps + stored in the secondary block. The number of secondary and data + blocks/pages in a chunk index varies as they are allocated as + needed and the first few are (conceptually) stored in parent + elements as an optimization.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Extensible Array Header +
bytebytebytebyte
Signature
VersionClient IDElement SizeMax Nelmts Bits
Index Blk ElmtsData Blk Min ElmtsSecondary Blk Min Data PtrsMax Data Blk Page Nelmts Bits

Num Secondary BlksL


Secondary Blk SizeL


Num Data BlksL


Data Blk SizeL


Max Index SetL


Num ElementsL


Index Block AddressO

Checksum
+ + + + + + + + +
  + (Items marked with an ‘L’ in the above table are + of the size specified in the Size + of Lengths field in the superblock.) +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Extensible Array Header +
Field NameDescription

Signature

+

The ASCII character string “EAHD” + is used to indicate the beginning of an Extensible Array + header. This gives file consistency checking utilities a + better chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The ID for identifying the client of the + Fixed Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved. +
+

+

Element Size

+

The size in bytes of an element in the Extensible Array. +

+

Max Nelmts Bits

+

The number of bits needed to store the + maximum number of elements in the Extensible Array.

+

Index Blk Elmts

+

The number of elements to store in the index block. +

+

Data Blk Min Elmts

+

The minimum number of elements per data block. +

+

Secondary Blk Min Data Ptrs

+

The minimum number of data block pointers for a + secondary block. +

+

Max Dblk Page Nelmts Bits

+

The number of bits needed to store the maximum number + of elements in a data block page. +

+

Num Secondary Blks

+

The number of secondary blocks created. +

+

Secondary Blk Size

+

The size of the secondary blocks created. +

+

Num Data Blks

+

The number of data blocks created. +

+

Data Blk Size

+

The size of the data blocks created. +

+

Max Index Set

+

The maximum index set. +

+

Num Elmts

+

The number of elements realized. +

+

Index Block Address

+

The address of the index block. +

+

Checksum

+

The checksum for the header.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Extensible Array Index Block +
bytebytebytebyte
Signature
VersionClient IDThis space inserted + only to align table nicely

Header AddressO


Elements (variable size and + optional)


Data Block Addresses (variable + size and optional)


Secondary Block Addresses (variable + size and optional)

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Extensible Array Index Block +
Field NameDescription

Signature

+

The ASCII character string “EAIB” + is used to indicate the beginning of an Extensible Array + Index Block. This gives file consistency checking utilities + a better chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The client ID for identifying the user of the + Extensible Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved. +
+

+

Header Address

+

The address of the Extensible Array header. Principally + used for file integrity checking.

+

Elements

+

Contains the elements that are stored directly in + the index block. An optimization to avoid unnecessary + secondary blocks. +
+
+ There are two element types: + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
+

+

Data Block Addresses

+

Contains the addresses of the data blocks + that are stored directly in the Index Block. An + optimization to avoid unnecessary secondary blocks.

+

Secondary Block Addresses

+

Contains the addresses of the secondary + blocks.

+

Checksum

+

The checksum for the Extensible Array Index Block.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Extensible Array Secondary Block +
bytebytebytebyte
Signature
VersionClient IDThis space inserted + only to align table nicely

Header AddressO


Block Offset (variable + size)


Page Bitmap (variable size and + optional)


Data Block Addresses (variable + size and optional)

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Extensible Array Secondary Block +
Field NameDescription

Signature

+

The ASCII character string “EASB” + is used to indicate the beginning of an Extensible Array + Secondary Block. This gives file consistency checking utilities + a better chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The ID for identifying the client of the + Extensible Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved. +
+

+

Header Address

+

The address of the Extensible Array header. Principally + used for file integrity checking.

+

Block Offset

+

Stores the offset of the block in the array. +

+

Page Bitmap

+

A bitmap indicating which + data block pages are initialized. +

+ Exists only if the data block is paged. +

Data Block Addresses

+

Contains the addresses of the data blocks + referenced by this secondary block.

+

Checksum

+

The checksum for the Extensible Array + Secondary Block.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Extensible Array Data Block +
bytebytebytebyte
Signature
VersionClient IDThis space inserted + only to align table nicely

Header AddressO


Block Offset (variable + size)


Elements (variable size and + optional)

Checksum
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Extensible Array Data Block +
Field NameDescription

Signature

+

The ASCII character string “EADB” + is used to indicate the beginning of an Extensible Array + data block. This gives file consistency checking utilities + a better chance of reconstructing a damaged file. +

+

Version

+

This document describes version 0.

+

Client ID

+

The ID for identifying the client of the + Extensible Array: + + + + + + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
2+Reserved. +
+

+

Header Address

+

The address of the Extensible Array header. Principally + used for file integrity checking. +

+

Block Offset

+

The offset of the block in the array. +

Elements

+

Contains the elements stored in the data block and + exists only if the data block is not paged. +
+
+ There are two element types: + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
+

+

Checksum

+

The checksum for the Extensible Array data block.

+
+
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ Layout: Extensible Array Data Block Page +
bytebytebytebyte

Elements (variable + size)

Checksum
+
+ +
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Extensible Array Data Block Page +
Field NameDescription

Elements

+

Contains the elements stored in the data block + page.

+

+ There are two element types: + + + + + + + + + + + + + + +
IDDescription
0Non-filtered dataset chunks +
1Filtered dataset chunks +
+

+

Checksum

+

The checksum for an Extensible Array data block + page.

+
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + +
+ Layout: Data Block Element for Non-filtered Dataset Chunk +
bytebytebytebyte

AddressO

+ + + + + +
+
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + +
+ Fields: Data Block Element for Non-filtered Dataset Chunk +
Field NameDescription

Address

The address of the dataset chunk in the file. +

+
+
+

+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Data Block Element for Filtered Dataset Chunk +
bytebytebytebyte

AddressO


Chunk Size (variable size; at + most 8 bytes)

Filter Mask
+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Data Block Element for Filtered Dataset Chunk +
Field NameDescription

Address

The address of the dataset chunk in the file. +

+

Chunk Size

The size of the dataset chunk in bytes. +

+

Filter Mask

Indicates the filter to skip for the dataset chunk. + Each filter has an index number in the pipeline; if that + filter is skipped, the bit corresponding to its index is set. +

+
+
+ + +

VII.E. The Version 2 B-trees Index

+ +

The Version 2 B-trees index can be used when the dataset + fulfills the following condition:

+ +
    +
  • more than one dimension of unlimited extent
  • +
+ +

Version 2 B-trees can be used to index various objects in the + library. See “Version 2 B-trees” + for more information. The B-tree types 10 + and 11 record layouts are for + indexing dataset chunks.

+ +

VIII. Appendix D: + Encoding for dataspace and reference

+ + +

VIII.A. Dataspace Encoding

+H5Sencode is a public routine that encodes a dataspace description into a buffer while +H5Sdecode is the corresponding routine that decodes the description encoded in the buffer. +

+ See the reference manual description for these two public routines. + +
+
+
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Dataspace Description for H5Sencode/H5Sdecode +
bytebytebytebyte
Dataspace IDEncode VersionSize of SizeThis space inserted + only to align table nicely

Size of Extent +



Dataspace Message + (variable size) +



Dataspace Selection + (variable size) +

+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Dataspace Description for H5Sencode/H5Sdecode +
Field NameDescription

Dataspace ID

+

The datspace message ID which is 1.

+

Encode Version

+

H5S_ENCODE_VERSION which is 0. +

+

Size of Size

+

The number of bytes used to store the size of an object. +

+

Size of Extent

+

Size of the dataspace message. +

+

Dataspace Message

+

The dataspace message information. See + Dataspace Message.

+

+

Dataspace Selection

+

The dataspace selection information. See + Dataspace Selection.

+
+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Dataspace Selection +
bytebytebytebyte
Selection Type

Selection Info (variable + size)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + +
+ Fields: Dataspace Selection +
Field NameDescription

Selection Type

+

There are 4 types of selection: + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0H5S_SEL_NONE: Nothing selected +
1H5S_SEL_POINTS: Sequence of points selected +
2H5S_SEL_HYPER: Hyperslab selected +
3H5S_SEL_ALL: Entire extent selected +
+

Selection Info

+

There are 4 types of selection info: + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
0Selection info for H5S_SEL_NONE +
1Selection info for H5S_SEL_POINTS +
2Selection info for H5S_SEL_HYPER +
3Selection for H5S_SEL_ALL +
+

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Selection Info for H5S_SEL_NONE +
bytebytebytebyte
Version

Reserved (zero, 8 bytes)

+
+ +
+
+
+ + + + + + + + + + + +
+ Fields: Selection Info for H5S_SEL_NONE +
Field NameDescription

Version

The version number for the H5S_SEL_NONE Selection Info. + The value is 1.

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Selection Info for H5S_SEL_POINTS +
bytebytebytebyte
Version


Points Selection Info (variable size) +


+
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Selection Info for H5S_SEL_POINTS +
Field NameDescription

Version

The version number for the H5S_SEL_POINTS Selection Info. + The value is either 1 or 2.

Points Selection Info

Depending on version: + + + + + + + + + + + + + + + + +
VersionDescription
1See Version 1 Points Selection Info +
2See Version 2 Points Selection Info +
+

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 1 Points Selection Info +
bytebytebytebyte
Reserved (zero)
Length
Rank
Num Points
Point #1: coordinate #1
.
.
.
Point #1: coordinate #u
.
.
.
Point #n: coordinate #1
.
.
.
Point #n: coordinate #u
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 1 Points Selection Info +
Field NameDescription

Length

The size in bytes from Length to the end of the + selection info.

Rank

The number of dimensions.

Num Points

The number of points in the selection.

Point #n: coordinate #u

The array of points in the selection. +

The points selected are #1 to #n where n is Num Points. +

The list of coordinates for each point are #1 to #u where u is + Rank.

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 Points Selection Info +
bytebytebytebyte
Encode SizeThis space inserted only to align table nicely +
Rank
Num Points

(2, 4 or 8 bytes)

Point #1: coordinate #1

(2, 4 or 8 bytes)

.
.
.
Point #1: coordinate #u

(2, 4 or 8 bytes)

.
.
.
Point #n: coordinate #1

(2, 4 or 8 bytes)

.
.
.
Point #n: coordinate #u

(2, 4 or 8 bytes)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 Points Selection Info +
Field NameDescription

Encode Size

The size for encoding the points selection info which can be 2, 4 or 8 bytes. +

Rank

The number of dimensions.

Num Points

The number of points in the selection. +

The field Encode Size indicates the size of this field

Point #n: coordinate #u

The array of points in the selection. +

The points selected are #1 to #n where n is Num Points. +

The list of coordinates for each point are #1 to #u where u is + Rank. +

The field Encode Size indicates the size of this field

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Selection Info for H5S_SEL_HYPER +
bytebytebytebyte
Version

Hyperslab Selection Info + (variable size)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Selection Info for H5S_SEL_HYPER +
Field NameDescription

Version

The version number for the H5S_SEL_HYPER selection info. + The value is 1, 2 or 3.

Hyperslab Selection Info

Depending on version: + + + + + + + + + + + + + + + + + + + + +
VersionDescription
1See Version 1 Hyperslab Selection Info. +
2See Version 2 Hyperslab Selection Info +
3See Version 3 Hyperslab Selection Info +
+

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 1 Hyperslab Selection Info +
bytebytebytebyte
Reserved
Length
Rank
Num Blocks
Starting Offset #1 for Block #1
.
.
.
Starting Offset #n for Block #1
Ending Offset #1 for Block #1
.
.
.
Ending Offset #n for Block #1
.
.
.
.
.
.
.
.
.
Starting Offset #1 for Block #u
.
.
.
Starting Offset #n for Block #u
Ending Offset #1 for Block #u
.
.
.
Ending Offset #n for Block #u
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 1 Hyperslab Selection Info +
Field NameDescription

Length

The size in bytes from the field Rank to the + end of the Selection Info.

Rank

The number of dimensions in the dataspace.

Num Blocks

The number of blocks in the selection.

Starting Offset #n for Block #u

The offset #n of the starting element in block #u. +

#n is from 1 to Rank. +

#u is from 1 to Num Blocks moving from the fastest + changing dimension to the slowest changing dimension. +

Ending Offset #n for Block #u

The offset #n of the ending element in block #u. +

#n is from 1 to Rank. +

#u is from 1 to Num Blocks moving from the fastest + changing dimension to the slowest changing dimension. +

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 2 Hyperslab Selection Info +
bytebytebytebyte
FlagsThis space inserted + only to align table nicely
Length
Rank
Start #1 (8 bytes)

Stride #1 (8 bytes)

Count #1 (8 bytes)

Block #1 (8 bytes)

.
.
.
Start #n (8 bytes)

Stride #n (8 bytes)

Count #n (8 bytes)

Block #n (8 bytes)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 2 Hyperslab Selection Info +
Field NameDescription

Flags

This is a bit field with the following definition. + Currently, this is always set to 0x1. +

+ + + + + + + + + + +
BitDescription
0If set, it a a regular hyperslab, otherwise, irregular. +
+

Length

The size in bytes from the field Rank to the + end of the Selection Info.

Rank

The number of dimensions in the dataspace.

Start #n

The offset of the starting element in the block. +

#n is from 1 to Rank. +

Stride #n

The number of elements to move in each dimension. +

#n is from 1 to Rank. +

Count #n

The number of blocks to select in each dimension. +

#n is from 1 to Rank. +

Block #n

The size (in elements) of each block in each dimension. +

#n is from 1 to Rank. +

+
+ + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 3 Hyperslab Selection Info +
bytebytebytebyte
FlagsEncode SizeThis space inserted + only to align table nicely
Rank

Regular/Irregular Hyperslab Selection Info +

(variable size)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 3 Hyperslab Selection Info +
Field NameDescription

Flags

This is a bit field with the following definition: +

+ + + + + + + + + + +
BitDescription
0If set, it is a regular hyperslab, otherwise, irregular. +
+

Encode Size

The size for encoding hyperslab selection info, which can 2, 4 or 8 bytes.

Rank

The number of dimensions in the dataspace.

Regular/Irregular Hyperslab Selection Info

This is the selection info for version 3 hyperslab which can be regular or irregular. +

If bit 0 of the field Flags is set, + See Version 3 Regular Hyperslab Selection Info +

Otherwise, see Version 3 Irregular Hyperslab Selection Info +

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 3 Regular Hyperslab Selection Info +
bytebytebytebyte
Start #1

(2, 4 or 8 bytes)

Stride #1

(2, 4 or 8 bytes)

Count #1

(2, 4 or 8 bytes)

Block #1

(2, 4 or 8 bytes)

.
.
.
Start #n

(2, 4 or 8 bytes)

Stride #n

(2, 4 or 8 bytes)

Count #n

(2, 4 or 8 bytes)

Block #n

(2, 4 or 8 bytes)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Version 3 Regular Hyperslab Selection Info +
Field NameDescription

Start #n

The offset of the starting element in the block. +

#n is from 1 to Rank. +

The field Encode Size indicates the size of this field. +

Stride #n

The number of elements to move in each dimension. +

#n is from 1 to Rank. +

The field Encode Size indicates the size of this field. +

Count #n

The number of blocks to select in each dimension. +

#n is from 1 to Rank. +

The field Encode Size indicates the size of this field. +

Block #n

The size (in elements) of each block in each dimension. +

#n is from 1 to Rank. +

The field Encode Size indicates the size of this field. +

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Version 3 Irregular Hyperslab Selection Info +
bytebytebytebyte
Num Blocks

(2, 4 or 8 bytes)

Starting Offset #1 for Block #1

(2, 4 or 8 bytes)

.
.
.
Starting Offset #n for Block #1

(2, 4 or 8 bytes)

Ending Offset #1 for Block #1

(2, 4 or 8 bytes)

.
.
.
Ending Offset #n for Block #1

(2, 4 or 8 bytes)

.
.
.
.
.
.
.
.
.
Starting Offset #1 for Block #u

(2, 4 or 8 bytes)

.
.
.
Starting Offset #n for Block #u

(2, 4 or 8 bytes)

Ending Offset #1 for Block #u

(2, 4 or 8 bytes)

.
.
.
Ending Offset #n for Block #u

(2, 4 or 8 bytes)

+
+ +
+
+
+ + + + + + + + + + + + + + + + + + +
+ Fields: Version 3 Irregular Hyperslab Selection Info +

Num Blocks

The number of blocks in the selection. +

The field Encode Size indicates the size of this field

Starting Offset #n for Block #u

The offset #n of the starting element in block #u. +

#n is from 1 to Rank. +

#u is from 1 to Num Blocks moving from the fastest + changing dimension to the slowest changing dimension. +

The field Encode Size indicates the size of this field +

Ending Offset #n for Block #u

The offset #n of the ending element in block #u. +

#n is from 1 to Rank. +

#u is from 1 to Num Blocks moving from the fastest + changing dimension to the slowest changing dimension. +

The field Encode Size indicates the size of this field +

+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ Layout: Selection Info for H5S_SEL_ALL +
bytebytebytebyte
Version

Reserved (zero, + 8 bytes)

+
+ +
+
+
+ + + + + + + + + + + +
+ Fields: Selection Info for H5S_SEL_ALL +
Field NameDescription

Version

The version number for the H5S_SEL_ALL Selection Info; + the value is 1.

+
+ + +

VIII.B. Reference Encoding (Revised)

+

+
+ For the following reference type, + the Reference Header and Reference Block are stored together as the dataset's raw data: +

    +
  • Object Reference (H5R_OBJECT2) (without reference to an external file)
  • +
+

+ For the following reference types, + the Reference Header plus the Global Heap ID are stored + as the dataset's raw data in the file. + The global heap ID is used to locate the Reference Block stored in the global heap: +

    +
  • Object Reference (H5R_OBJECT2) (with reference to an external file)
  • +
  • Dataset Region Reference (H5R_DATASET_REGION2) (with/without reference to an external file)
  • +
  • Attribute Reference (H5R_ATTR) (with/without reference to an external file)
  • +
+
+
+ +
+ + + + + + + + + + + + + + + + +
+ Layout: Reference Header +
bytebytebytebyte
Reference TypeFlagsThis space inserted + only to align table nicely
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Reference Header +
Field NameDescription

Reference Type

+

There are 3 types of references: + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
2H5R_OBJECT2: Object Reference +
3H5R_DATASET_REGION2: Dataset Region Reference +
4H5R_ATTR: Attribute Reference +
+ +

Flags

This field describes the reference: + + + + + + + + + + + + + + +
BitDescription
0If set, the reference is to an external file. +
1-7Reserved

+ +
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Layout: Reference Block +
bytebytebytebyte
Token SizeThis space inserted + only to align table nicely


Token + (variable size)


Length of External File NameThis space inserted + only to align table nicely


External File Name + (variable size)


Size of Dataspace Selection
Rank of Dataspace Selection


Dataspace Selection Information + (variable size)


Length of Attribute Name This space inserted + only to align table nicely


Attribute Name + (variable size)


+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Fields: Reference Block +
Field NameDescription

Token size

This is the size of the token for the object. +

Token

+

+ This is the token for the object. +

+

Length fo External File Name

This is the length for the external file name. +

This field exists if bit 0 of flags is set.

+

+

External File Name

This is the name of the external file being referenced.

+

+

This field exists if bit 0 of flags is set.

+

Dataspace Selection Information

See Dataspace Selection.

+

+

This field exists if the Reference Type is H5R_DATASET_REGION2.

+

Length of Attribute Name

This is the length of the attribute name. +

This field exists if the Reference Type is H5R_ATTRIBUTE.

+

Attribute Name

This is the name of the attribute being referenced. +

This field exists if the Reference Type is H5R_ATTRIBUTE.

+
+
+ +
+
+
+ + + +

VIII.C. Reference Encoding (Backward Compatibility)

+

+
+ The two references described below are maintained to preserve compatibility with previous versions of the library. +

+ For the following reference type, + the reference encoding is stored as the dataset's raw data in the file: +

    +
  • Object Reference (H5R_OBJECT1)
  • +
+

+ For the following reference type, + the Global Heap ID is stored as the dataset's raw data in the file. + The global heap ID is used to locate the reference encoding + stored in the global heap: +

    +
  • Dataset Region Reference (H5R_DATASET_REGION1)
  • +
+ +
+
+
+ + + + + + + + + + + + + + +
+ Layout: Reference for H5R_OBJECT1 +
bytebytebytebyte

Object AddressO

+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+
+ + + + + + + + + + + + +
+ Fields: Reference for H5R_OBJECT1 +
Field NameDescription

Object Address

+

Address of the object being referenced +

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + +
+ Layout: Reference for H5R_DATASET_REGION1 +
bytebytebytebyte

Object AddressO



Dataspace Selection Information + (variable size)


+ + + + + +
  + (Items marked with an ‘O’ in the above table are + of the size specified in the Size + of Offsets field in the superblock.) +
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ Fields: Reference for H5R_DATASET_REGION1 +
Field NameDescription

Object Address

This is the address of the object being referenced. +

Dataspace Selection Information

This is the dataspace selection for the object being referenced. + See Dataspace Selection.

+

+
+
+ +
+
+
+ + + + diff --git a/doxygen/examples/H5A_examples.c b/doxygen/examples/H5A_examples.c new file mode 100644 index 00000000000..f332efac8cd --- /dev/null +++ b/doxygen/examples/H5A_examples.c @@ -0,0 +1,145 @@ +/* -*- c-file-style: "stroustrup" -*- */ + +#include "hdf5.h" + +#include +#include + +int +main(void) +{ + int ret_val = EXIT_SUCCESS; + + //! + { + __label__ fail_acpl, fail_attr, fail_file; + hid_t file, acpl, fspace, attr; + + unsigned mode = H5F_ACC_TRUNC; + char file_name[] = "f1.h5"; + // attribute names can be arbitrary Unicode strings + char attr_name[] = "Χαρακτηριστικό"; + + if ((file = H5Fcreate(file_name, mode, H5P_DEFAULT, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((acpl = H5Pcreate(H5P_ATTRIBUTE_CREATE)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_acpl; + } + // use UTF-8 encoding for the attribute name + if (H5Pset_char_encoding(acpl, H5T_CSET_UTF8) < 0) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // create a scalar (singleton) attribute + if ((fspace = H5Screate(H5S_SCALAR)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // create an attribute on the root group + if ((attr = H5Acreate2(file, attr_name, H5T_STD_I32LE, fspace, acpl, H5P_DEFAULT)) == + H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_attr; + } + + H5Aclose(attr); +fail_attr: + H5Sclose(fspace); +fail_fspace: + H5Pclose(acpl); +fail_acpl: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_attr, fail_file; + hid_t file, attr; + + unsigned mode = H5F_ACC_RDONLY; + char file_name[] = "f1.h5"; + char attr_name[] = "Χαρακτηριστικό"; + int value; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((attr = H5Aopen(file, attr_name, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_attr; + } + // read the attribute value + if (H5Aread(attr, H5T_NATIVE_INT, &value) < 0) + ret_val = EXIT_FAILURE; + + // do something w/ the attribute value + + H5Aclose(attr); +fail_attr: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_attr, fail_file; + hid_t file, attr; + + unsigned mode = H5F_ACC_RDWR; + char file_name[] = "f1.h5"; + char attr_name[] = "Χαρακτηριστικό"; + int value = 1234; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((attr = H5Aopen(file, attr_name, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_attr; + } + // update the attribute value + if (H5Awrite(attr, H5T_NATIVE_INT, &value) < 0) + ret_val = EXIT_FAILURE; + + H5Aclose(attr); +fail_attr: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_attr, fail_file; + hid_t file; + + unsigned mode = H5F_ACC_RDWR; + char file_name[] = "f1.h5"; + char attr_name[] = "Χαρακτηριστικό"; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + // delete the attribute + if (H5Adelete(file, attr_name) < 0) { + ret_val = EXIT_FAILURE; + goto fail_attr; + } + +fail_attr: + H5Fclose(file); +fail_file:; + } + //! + + return ret_val; +} diff --git a/doxygen/examples/H5D_examples.c b/doxygen/examples/H5D_examples.c new file mode 100644 index 00000000000..aad057df1e3 --- /dev/null +++ b/doxygen/examples/H5D_examples.c @@ -0,0 +1,173 @@ +/* -*- c-file-style: "stroustrup" -*- */ + +#include "hdf5.h" + +#include +#include + +int +main(void) +{ + int ret_val = EXIT_SUCCESS; + + //! + { + __label__ fail_lcpl, fail_dset, fail_file; + hid_t file, lcpl, fspace, dset; + + unsigned mode = H5F_ACC_TRUNC; + char file_name[] = "d1.h5"; + // link names can be arbitrary Unicode strings + char dset_name[] = "σύνολο/δεδομένων"; + + if ((file = H5Fcreate(file_name, mode, H5P_DEFAULT, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((lcpl = H5Pcreate(H5P_LINK_CREATE)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_lcpl; + } + // use UTF-8 encoding for link names + if (H5Pset_char_encoding(lcpl, H5T_CSET_UTF8) < 0) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // create intermediate groups as needed + if (H5Pset_create_intermediate_group(lcpl, 1) < 0) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // create a 1D dataspace + if ((fspace = H5Screate_simple(1, (hsize_t[]){10}, NULL)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // create a 32-bit integer dataset + if ((dset = H5Dcreate2(file, dset_name, H5T_STD_I32LE, fspace, lcpl, H5P_DEFAULT, H5P_DEFAULT)) == + H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_dset; + } + + H5Dclose(dset); +fail_dset: + H5Sclose(fspace); +fail_fspace: + H5Pclose(lcpl); +fail_lcpl: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_dset, fail_file; + hid_t file, dset; + + unsigned mode = H5F_ACC_RDONLY; + char file_name[] = "d1.h5"; + // assume a priori knowledge of dataset name and size + char dset_name[] = "σύνολο/δεδομένων"; + int elts[10]; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((dset = H5Dopen2(file, dset_name, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_dset; + } + // read all dataset elements + if (H5Dread(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, elts) < 0) + ret_val = EXIT_FAILURE; + + // do something w/ the dataset elements + + H5Dclose(dset); +fail_dset: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_update, fail_fspace, fail_dset, fail_file; + hid_t file, dset, fspace; + + unsigned mode = H5F_ACC_RDWR; + char file_name[] = "d1.h5"; + char dset_name[] = "σύνολο/δεδομένων"; + int new_elts[6][2] = {{-1, 1}, {-2, 2}, {-3, 3}, {-4, 4}, {-5, 5}, {-6, 6}}; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + if ((dset = H5Dopen2(file, dset_name, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_dset; + } + // get the dataset's dataspace + if ((fspace = H5Dget_space(dset)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fspace; + } + // select the first 5 elements in odd positions + if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, (hsize_t[]){1}, (hsize_t[]){2}, (hsize_t[]){5}, + NULL) < 0) { + ret_val = EXIT_FAILURE; + goto fail_update; + } + + // (implicitly) select and write the first 5 elements of the second column of NEW_ELTS + if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, fspace, H5P_DEFAULT, new_elts) < 0) + ret_val = EXIT_FAILURE; + +fail_update: + H5Sclose(fspace); +fail_fspace: + H5Dclose(dset); +fail_dset: + H5Fclose(file); +fail_file:; + } + //! + + //! + { + __label__ fail_delete, fail_file; + hid_t file; + + unsigned mode = H5F_ACC_RDWR; + char file_name[] = "d1.h5"; + char group_name[] = "σύνολο"; + char dset_name[] = "σύνολο/δεδομένων"; + + if ((file = H5Fopen(file_name, mode, H5P_DEFAULT)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + // delete (unlink) the dataset + if (H5Ldelete(file, dset_name, H5P_DEFAULT) < 0) { + ret_val = EXIT_FAILURE; + goto fail_delete; + } + // the previous call deletes (unlinks) only the dataset + if (H5Ldelete(file, group_name, H5P_DEFAULT) < 0) { + ret_val = EXIT_FAILURE; + goto fail_delete; + } + +fail_delete: + H5Fclose(file); +fail_file:; + } + + //! + + return ret_val; +} diff --git a/doxygen/examples/H5F_examples.c b/doxygen/examples/H5F_examples.c new file mode 100644 index 00000000000..a7ce6fb36e1 --- /dev/null +++ b/doxygen/examples/H5F_examples.c @@ -0,0 +1,187 @@ +/* -*- c-file-style: "stroustrup" -*- */ + +#include "hdf5.h" + +#include +#include + +int +main(void) +{ + int ret_val = EXIT_SUCCESS; + + //! + { + __label__ fail_fapl, fail_fcpl, fail_file; + hid_t fcpl, fapl, file; + + if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fcpl; + } + else { + // adjust the file creation properties + } + + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fapl; + } + else { + // adjust the file access properties + } + + unsigned mode = H5F_ACC_EXCL; + char name[] = "f1.h5"; + + if ((file = H5Fcreate(name, mode, fcpl, fapl)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + + // do something useful with FILE + + H5Fclose(file); +fail_file: + H5Pclose(fapl); +fail_fapl: + H5Pclose(fcpl); +fail_fcpl:; + } + //! + + //! + { + __label__ fail_fapl, fail_file; + hid_t fapl, file; + + if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_fapl; + } + else { + // adjust the file access properties + } + + unsigned mode = H5F_ACC_RDWR; + char name[] = "f1.h5"; + + if ((file = H5Fopen(name, mode, fapl)) == H5I_INVALID_HID) { + ret_val = EXIT_FAILURE; + goto fail_file; + } + + // do something useful with FILE + + H5Fclose(file); +fail_file: + H5Pclose(fapl); +fail_fapl:; + } + //! + + //! + { + unsigned mode = H5F_ACC_TRUNC; + char name[] = "f11.h5"; + + hid_t file = H5Fcreate(name, mode, H5P_DEFAULT, H5P_DEFAULT); + if (file != H5I_INVALID_HID) + H5Fclose(file); + else + ret_val = EXIT_FAILURE; + } + //! + + //! + { + unsigned mode = H5F_ACC_RDONLY; + char name[] = "f11.h5"; + + hid_t file = H5Fopen(name, mode, H5P_DEFAULT); + if (file != H5I_INVALID_HID) + H5Fclose(file); + else + ret_val = EXIT_FAILURE; + } + //! + + //! + { + unsigned mode = H5F_ACC_RDWR; + char name[] = "f11.h5"; + + hid_t file = H5Fopen(name, mode, H5P_DEFAULT); + if (file != H5I_INVALID_HID) { + int step; + for (step = 0; step < 1000; ++step) { + + // do important work & flush every 20 steps + + if (step % 20 == 0) { + if (H5Fflush(file, H5F_SCOPE_LOCAL) < 0) { + perror("H5Fflush failed."); + ret_val = EXIT_FAILURE; + break; + } + } + } + + if (H5Fclose(file) < 0) + perror("H5Fclose failed."); + } + else + ret_val = EXIT_FAILURE; + } + //! + + //! + { + unsigned mode = H5F_ACC_RDWR; + char name[] = "f11.h5"; + + hid_t file = H5Fopen(name, mode, H5P_DEFAULT); + if (file != H5I_INVALID_HID) { + if (H5Fset_libver_bounds(file, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18) >= 0) { + + // object creation will not exceed HDF5 version 1.8.x + } + else + perror("H5Fset_libver_bounds failed."); + + if (H5Fclose(file) < 0) + perror("H5Fclose failed."); + } + else + ret_val = EXIT_FAILURE; + } + //! + + //! + { + hid_t file = H5Fopen("f11.h5", H5F_ACC_RDWR, H5P_DEFAULT); + if (file != H5I_INVALID_HID) { + hid_t group, child; + if ((group = H5Gcreate1(file, "mount_point", H5P_DEFAULT)) != H5I_INVALID_HID) { + if ((child = H5Fopen("f1.h5", H5F_ACC_RDONLY, H5P_DEFAULT)) != H5I_INVALID_HID) { + if (H5Fmount(group, ".", child, H5P_DEFAULT) >= 0) { + + // do something useful w/ the mounted file + } + else { + ret_val = EXIT_FAILURE; + perror("H5Fmount failed."); + } + H5Fclose(child); + } + H5Gclose(group); + } + H5Fclose(file); + } + else + ret_val = EXIT_FAILURE; + } + //! + + return ret_val; +} diff --git a/doxygen/examples/H5Pget_metadata_read_attempts.1.c b/doxygen/examples/H5Pget_metadata_read_attempts.1.c new file mode 100644 index 00000000000..da325c04b71 --- /dev/null +++ b/doxygen/examples/H5Pget_metadata_read_attempts.1.c @@ -0,0 +1,22 @@ +/* Get a copy of file access property list */ +fapl = H5Pcreate(H5P_FILE_ACCESS); + +/* Retrieve the # of read attempts from the file access property list */ +H5Pget_metadata_read_attempts(fapl, &attempts); + +/* + * The value returned in "attempts" will be 1 (default for non-SWMR access). + */ + +/* Set the # of read attempts to 20 */ +H5Pset_metadata_read_attempts(fapl, 20); + +/* Retrieve the # of read attempts from the file access property list */ +H5Pget_metadata_read_attempts(fapl, &attempts); + +/* + * The value returned in "attempts" will be 20 as set. + */ + +/* Close the property list */ +H5Pclose(fapl); diff --git a/doxygen/examples/H5Pget_metadata_read_attempts.2.c b/doxygen/examples/H5Pget_metadata_read_attempts.2.c new file mode 100644 index 00000000000..2cd12dbca57 --- /dev/null +++ b/doxygen/examples/H5Pget_metadata_read_attempts.2.c @@ -0,0 +1,44 @@ +/* Open the file with SWMR access and default file access property list */ +fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), H5P_DEFAULT); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 100 (default for SWMR access). + */ + +/* Close the property list */ +H5Pclose(file_fapl); + +/* Close the file */ +H5Fclose(fid); + +/* Create a copy of file access property list */ +fapl = H5Pcreate(H5P_FILE_ACCESS); + +/* Set the # of read attempts */ +H5Pset_metadata_read_attempts(fapl, 20); + +/* Open the file with SWMR access and the non-default file access property list */ +fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 20. + */ + +/* Close the property lists */ +H5Pclose(file_fapl); +H5Pclose(fapl); + +/* Close the file */ +H5Fclose(fid); diff --git a/doxygen/examples/H5Pget_metadata_read_attempts.3.c b/doxygen/examples/H5Pget_metadata_read_attempts.3.c new file mode 100644 index 00000000000..4b5ea3a6208 --- /dev/null +++ b/doxygen/examples/H5Pget_metadata_read_attempts.3.c @@ -0,0 +1,44 @@ +/* Open the file with non-SWMR access and default file access property list */ +fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 1 (default for non-SWMR access). + */ + +/* Close the property list */ +H5Pclose(file_fapl); + +/* Close the file */ +H5Fclose(fid); + +/* Create a copy of file access property list */ +fapl = H5Pcreate(H5P_FILE_ACCESS); + +/* Set the # of read attempts */ +H5Pset_metadata_read_attempts(fapl, 20); + +/* Open the file with non-SWMR access and the non-default file access property list */ +fid = H5Fopen(FILE, H5F_ACC_RDONLY, fapl); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 1 (default for non-SWMR access). + */ + +/* Close the property lists */ +H5Pclose(file_fapl); +H5Pclose(fapl); + +/* Close the file */ +H5Fclose(fid); diff --git a/doxygen/examples/H5Pget_object_flush_cb.c b/doxygen/examples/H5Pget_object_flush_cb.c new file mode 100644 index 00000000000..d18f3dfac32 --- /dev/null +++ b/doxygen/examples/H5Pget_object_flush_cb.c @@ -0,0 +1,41 @@ +hid_t fapl_id; +unsigned counter; +H5F_object_flush_t *ret_cb; +unsigned * ret_counter; + +/* Create a copy of the file access property list */ +fapl_id = H5Pcreate(H5P_FILE_ACCESS); + +/* Set up the object flush property values */ +/* flush_cb: callback function to invoke when an object flushes (see below) */ +/* counter: user data to pass along to the callback function */ +H5Pset_object_flush_cb(fapl_id, flush_cb, &counter); + +/* Open the file */ +file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT); + +/* Get the file access property list for the file */ +fapl = H5Fget_access_plist(file_id); + +/* Retrieve the object flush property values for the file */ +H5Pget_object_flush_cb(fapl, &ret_cb, &ret_counter); +/* ret_cb will point to flush_cb() */ +/* ret_counter will point to counter */ + +/* +. +. +. +. +. +. +*/ + +/* The callback function for the object flush property */ +static herr_t +flush_cb(hid_t obj_id, void *_udata) +{ + unsigned *flush_ct = (unsigned *)_udata; + ++(*flush_ct); + return 0; +} diff --git a/doxygen/examples/H5Pset_metadata_read_attempts.c b/doxygen/examples/H5Pset_metadata_read_attempts.c new file mode 100644 index 00000000000..7c2f65d3208 --- /dev/null +++ b/doxygen/examples/H5Pset_metadata_read_attempts.c @@ -0,0 +1,59 @@ +//! [SWMR Access] +/* Create a copy of file access property list */ +fapl = H5Pcreate(H5P_FILE_ACCESS); + +/* Set the # of read attempts */ +H5Pset_metadata_read_attempts(fapl, 20); + +/* Open the file with SWMR access and the non-default file access property list */ +fid = H5Fopen(FILE, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 20. + * The library will use 20 as the number of read attempts + * when reading checksummed metadata in the file + */ + +/* Close the property list */ +H5Pclose(fapl); +H5Pclose(file_fapl); + +/* Close the file */ +H5Fclose(fid); +//! [SWMR Access] + +//! [non-SWMR Access] +/* Create a copy of file access property list */ +fapl = H5Pcreate(H5P_FILE_ACCESS); + +/* Set the # of read attempts */ +H5Pset_metadata_read_attempts(fapl, 20); + +/* Open the file with SWMR access and the non-default file access property list */ +fid = H5Fopen(FILE, H5F_ACC_RDONLY, fapl); + +/* Get the file's file access roperty list */ +file_fapl = H5Fget_access_plist(fid); + +/* Retrieve the # of read attempts from the file's file access property list */ +H5Pget_metadata_read_attempts(file_fapl, &attempts); + +/* + * The value returned in "attempts" will be 1 (default for non-SWMR access). + * The library will use 1 as the number of read attempts + * when reading checksummed metadata in the file + */ + +/* Close the property lists */ +H5Pclose(fapl); +H5Pclose(file_fapl); + +/* Close the file */ +H5Fclose(fid); +//! [non-SWMR Access] diff --git a/doxygen/examples/H5Pset_object_flush_cb.c b/doxygen/examples/H5Pset_object_flush_cb.c new file mode 100644 index 00000000000..1dfa90d7393 --- /dev/null +++ b/doxygen/examples/H5Pset_object_flush_cb.c @@ -0,0 +1,41 @@ +hid_t file_id, fapl_id; +hid_t dataset_id, dapl_id; +unsigned counter; + +/* Create a copy of the file access property list */ +fapl_id = H5Pcreate(H5P_FILE_ACCESS); + +/* Set up the object flush property values */ +/* flush_cb: callback function to invoke when an object flushes (see below) */ +/* counter: user data to pass along to the callback function */ +H5Pset_object_flush_cb(fapl_id, flush_cb, &counter); + +/* Open the file */ +file_id = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT); + +/* Create a group */ +gid = H5Gcreate2(fid, “group”, H5P_DEFAULT, H5P_DEFAULT_H5P_DEFAULT); + +/* Open a dataset */ +dataset_id = H5Dopen2(file_id, DATASET, H5P_DEFAULT); + +/* The flush will invoke flush_cb() with counter */ +H5Dflush(dataset_id); +/* counter will be equal to 1 */ + +/* ... */ + +/* The flush will invoke flush_cb() with counter */ +H5Gflush(gid); +/* counter will be equal to 2 */ + +/* ... */ + +/* The callback function for object flush property */ +static herr_t +flush_cb(hid_t obj_id, void *_udata) +{ + unsigned *flush_ct = (unsigned *)_udata; + ++(*flush_ct); + return 0; +} diff --git a/doxygen/examples/ImageSpec.html b/doxygen/examples/ImageSpec.html new file mode 100644 index 00000000000..1b700ff7a93 --- /dev/null +++ b/doxygen/examples/ImageSpec.html @@ -0,0 +1,1203 @@ + + + + + + Image Specification + +The HDF5 specification defines the standard objects and storage for the +standard HDF5 objects. (For information about the HDF5 library, model and +specification, see the HDF documentation.)  This document is an additional +specification do define a standard profile for how to store image data +in HDF5. Image data in HDF5 is stored as HDF5 datasets with standard attributes +to define the properties of the image. +

This specification is primarily concerned with two dimensional raster +data similar to HDF4 Raster Images.  Specifications for storing other +types of imagery will be covered in other documents. +

This specification defines: +

    +
  • +Standard storage and attributes for an Image dataset (Section +1)
  • + +
  • +Standard storage and attributes for Palettes (Section +2)
  • + +
  • +Standard for associating Palettes with Images. (Section +3)
  • +
+ +

+1. HDF5 Image Specification

+ +

+1.1 Overview

+Image data is stored as an HDF5 dataset with values of HDF5 class Integer +or Float.  A common example would be a two dimensional dataset, with +elements of class Integer, e.g., a two dimensional array of unsigned 8 +bit integers.  However, this specification does not limit the dimensions +or number type that may be used for an Image. +

The dataset for an image is distinguished from other datasets by giving +it an attribute "CLASS=IMAGE".  In addition, the Image dataset may +have an optional attribute "PALETTE" that is an array of object references +for zero or more palettes. The Image dataset may have additional attributes +to describe the image data, as defined in Section 1.2. +

A Palette is an HDF5 dataset which contains color map information.  +A Pallet dataset has an attribute "CLASS=PALETTE" and other attributes +indicating the type and size of the palette, as defined in Section +2.1.  A Palette is an independent object, which can be shared +among several Image datasets. +

+1.2  Image Attributes

+The attributes for the Image are scalars unless otherwise noted.  +The length of String valued attributes should be at least the number of +characters. Optionally, String valued attributes may be stored in a String +longer than the minimum, in which case it must be zero terminated or null +padded.  "Required" attributes must always be used. "Optional" attributes +must be used when required. +
  +

+Attributes

+ +
+
+Attribute name="CLASS" (Required)
+ +
+This attribute is type H5T_C_S1, with size 5.
+ +
+For all Images, the value of this attribute is "IMAGE".
+ +
+
+ +
+This attribute identifies this data set as intended to be interpreted as +an image that conforms to the specifications on this page.
+
+ +
+Attribute name="PALETTE"
+ +
+
+A Image dataset within an HDF5 file may optionally specify an array of +palettes to be viewed with. The dataset will have an attribute field called +"PALETTE" which contains a one-dimensional array of object reference +pointers (HDF5 datatype H5T_STD_REF_OBJ) which refer to palettes in the +file. The palette datasets must conform to the Palette specification in +section +2 below. The first palette in this array will be the default palette +that the data may be viewed with.
+
+ +
+
+
+ +
+Attribute name="IMAGE_SUBCLASS"
+ +
+If present, the value of this attribute indicates the type of Palette that +should be used with the Image.  This attribute is a scalar of type +H5T_C_S1, with size according to the string plus one.  The values +are:
+ +
+
+"IMAGE_GRAYSCALE" (length 15)
+ +
+A grayscale image
+ +
+"IMAGE_BITMAP" (length 12)
+ +
+A bit map image
+ +
+"IMAGE_TRUECOLOR" (length 15)
+ +
+A truecolor image
+ +
+"IMAGE_INDEXED" (length 13)
+ +
+An indexed image
+ +
+
+
+ +
+Attribute name="INTERLACE_MODE"
+ +
+For images with more than one component for each pixel, this optional attribute +specifies the layout of the data. The values are type H5T_C_S1 of length +15. See section 1.3 for information about the +storage layout for data.
+ +
+"INTERLACE_PIXEL" (default): the component value for a pixel are contiguous.
+ +
+"INTERLACE_PLANE": each component is stored as a plane.
+ +
+
+ +
+Attribute name="DISPLAY_ORIGIN"
+ +
+This optional attribute indicates the intended orientation of the data +on a two-dimensional raster display.  The value indicates which corner +the pixel at (0, 0) should be viewed.  The values are type H5T_C_S1 +of length 2. If DISPLAY_ORIGIN is not set, the orientation is undefined.
+ +
+"UL": (0,0) is at the upper left.
+ +
+"LL": (0,0) is at the lower left.
+ +
+"UR": (0,0) is at the upper right.
+ +
+"LR": (0,0) is at the lower right.
+
+ +
+Attribute name="IMAGE_WHITE_IS_ZERO"
+ +
+
+This attribute is of type H5T_NATIVE_UCHAR.  0 = false, 1 = true .  +This is used for images with IMAGE_SUBCLASS="IMAGE_GRAYSCALE" or "IMAGE_BITMAP".
+
+ +
+
+Attribute name="IMAGE_MINMAXRANGE"
+ +
+If present, this attribute is an array of two numbers, of the same HDF5 +datatype as the data.  The first element is the minimum value of the +data, and the second is the maximum.  This is used for images with +IMAGE_SUBCLASS="IMAGE_GRAYSCALE", "IMAGE_BITMAP" or "IMAGE_INDEXED".
+
+ +
+Attribute name="IMAGE_BACKGROUNDINDEX"
+ +
+
+If set, this attribute indicates the index value that should be interpreted +as the "background color".  This attribute is HDF5 type H5T_NATIVE_UINT.
+
+ +
+Attribute name="IMAGE_TRANSPARENCY"
+ +
+
+If set, this attribute indicates the index value that should be interpreted +as the "transparent color".  This attribute is HDF5 type H5T_NATIVE_UINT.  +This attribute may not be used for IMAGE_SUBCLASS="IMAGE_TRUE_COLOR".
+
+ +
+Attribute name="IMAGE_ASPECTRATIO"
+ +
+
+If set, this attribute indicates the aspect ratio.
+
+ +
+Attribute name="IMAGE_COLORMODEL"
+ +
+
+If set, this attribute indicates the color model of Palette that should +be used with the Image.  This attribute is of type H5T_C_S1, with +size 3, 4, or 5.  The value is one of the color models described in +the Palette specification in section 2.2 below.  +This attribute may be used only for IMAGE_SUBCLASS="IMAGE_TRUECOLOR" or +"IMAGE_INDEXED".
+
+ +
+Attribute name="IMAGE_GAMMACORRECTION"
+ +
+
+If set, this attribute gives the Gamma correction.  The attribute +is type H5T_NATIVE_FLOAT.  This attribute may be used only for IMAGE_SUBCLASS="IMAGE_TRUECOLOR" +or "IMAGE_INDEXED".
+
+Attribute name="IMAGE_VERSION" (Required) +
+
+This attribute is of type H5T_C_S1, with size corresponding to the length +of the version string.  This attribute identifies the version number +of this specification to which it conforms.  The current version number +is "1.2".
+ +
  +

  +
  +
  +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1. Attributes of an Image Dataset
Attribute Name(R = Required +
O= Optional)
TypeString SizeValue
CLASSRString5"IMAGE"
PALETTEOArray Object References<references to Palette datasets>1
IMAGE_SUBCLASSO2String15,  +
12,  +
15, +
13
+
+"IMAGE_GRAYSCALE",
+ +
+"IMAGE_BITMAP",
+ +
+"IMAGE_TRUECOLOR",
+ +
+"IMAGE_INDEXED"
+
INTERLACE_MODEO3,6String15The layout of components if more than one component per pixel.
DISPLAY_ORIGINOString2If set, indicates the intended location of the pixel (0,0).
IMAGE_WHITE_IS_ZEROO3,4Unsigned Integer0 = false, 1 = true
IMAGE_MINMAXRANGEO3,5Array [2] <same datatype as data values>The (<minimum>, <maximum>) value of the data.
IMAGE_BACKGROUNDINDEXO3Unsigned IntegerThe index of the background color.
IMAGE_TRANSPARENCYO3,5Unsigned IntegerThe index of the transparent color.
IMAGE_ASPECTRATIOO3,4Unsigned IntegerThe aspect ratio.
IMAGE_COLORMODELO3,6String3, 4, or 5The color model, as defined below in the Palette specification for +attribute PAL_COLORMODEL.
IMAGE_GAMMACORRECTIONO3,6FloatThe gamma correction.
IMAGE_VERSIONRString3"1.2"
+ +
1.  The first element of the array is the default +Palette. +
2.  This attribute is required for images +that use one of the standard color map types listed. +
3. This attribute is required if set for the source +image, in the case that the image is translated from another file into +HDF5. +
4.  This applies to:  IMAGE_SUBCLASS="IMAGE_GRAYSCALE" +or "IMAGE_BITMAP". +
5.  This applies to:  IMAGE_SUBCLASS="IMAGE_GRAYSCALE", +"IMAGE_BITMAP", or "IMAGE_INDEXED". +
6.  This applies to: IMAGE_SUBCLASS="IMAGE_TRUECOLOR", +or "IMAGE_INDEXED".
+
+Table 2 summarizes the standard attributes for an Image datasets using +the common sub-classes. R means that the attribute listed on the leftmost +column is Required for the image subclass on the first row, O means that +the attribute is Optional for that subclass and N that the attribute cannot +be applied to that subclass. The two first rows show the only required +attributes +for all subclasses. +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2a. Applicability of Attributes to IMAGE sub-classes
IMAGE_SUBCLASS1IMAGE_GRAYSCALEIMAGE_BITMAP
CLASSRR
IMAGE_VERSIONRR
INTERLACE_MODENN
IMAGE_WHITE_IS_ZERORR
IMAGE_MINMAXRANGEOO
IMAGE_BACKGROUNDINDEXOO
IMAGE_TRANSPARENCYOO
IMAGE_ASPECTRATIOOO
IMAGE_COLORMODELNN
IMAGE_GAMMACORRECTIONNN
PALETTEOO
DISPLAY_ORIGINOO
+ +
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2b. Applicability of Attributes to IMAGE sub-classes
IMAGE_SUBCLASSIMAGE_TRUECOLORIMAGE_INDEXED
CLASSRR
IMAGE_VERSIONRR
INTERLACE_MODERN
IMAGE_WHITE_IS_ZERONN
IMAGE_MINMAXRANGENO
IMAGE_BACKGROUNDINDEXNO
IMAGE_TRANSPARENCYNO
IMAGE_ASPECTRATIOOO
IMAGE_COLORMODELOO
IMAGE_GAMMACORRECTIONOO
PALETTEOO
DISPLAY_ORIGINOO
+ +

+1.3 Storage Layout and Properties for Images

+In the case of an image with more than one component per pixel (e.g., Red, +Green, and Blue), the data may be arranged in one of two ways.  Following +HDF4 terminology, the data may be interlaced by pixel or by plane, which +should be indicated by the INTERLACE_MODE  attribute.  In both +cases, the dataset will have a dataspace with three dimensions, height, +width, and components.  The interlace modes specify different orders +for the dimensions. +
  + + + + + + + + + + + + + + + + + + + + +
Table 3. Storage of multiple component image data.
Interlace ModeDimensions in the Dataspace
INTERLACE_PIXEL[height][width][pixel components]
INTERLACE_PLANE[pixel components][height][width]
+ +

For example, consider a 5 (rows) by 10 (column) image, with Red, Green, +and Blue components.  Each component is an unsigned byte. In HDF5, +the datatype would be declared as an unsigned 8 bit integer.  For +pixel interlace, the dataspace would be a three dimensional array, with +dimensions: [10][5][3].  For plane interleave, the dataspace would +be three dimensions: [3][10][5]. +

In the case of images with only one component, the dataspace may be +either a two dimensional array, or a three dimensional array with the third +dimension of size 1.  For example, a 5 by 10 image with 8 bit color +indexes would be an HDF5 dataset with type unsigned 8 bit integer.  +The dataspace could be either a two dimensional array, with dimensions +[10][5], or three dimensions, with dimensions either [10][5][1] or [1][10][5]. +

Image datasets may be stored with any chunking or compression properties +supported by HDF5. +

A note concerning compatibility with HDF5 GR interface: An Image +dataset is stored as an HDF5 dataset.  It is important to note that +the order of the dimensions is the same as for any other HDF5 dataset.  +For a two dimensional image that is to be stored as a series of horizontal +scan lines, with the scan lines contiguous (i.e., the fastest changing +dimension is 'width'), the image will have a dataspace with dim[0] = +height and dim[1] = width.  This is completely consistent +with all other HDF5 datasets. +

Users familiar with HDF4 should be cautioned that this is not the +same as HDF4, and specifically is not consistent with what the HDF4 +GR interface does. +
  +

+2.  HDF5 Palette Specification

+ +

+2.1 Overview

+A palette is the means by which color is applied to an image and is also +referred to as a color lookup table. It is a table in which every row contains +the numerical representation of a particular color. In the example of an +8 bit standard RGB color model palette, this numerical representation of +a color is presented as a triplet specifying the intensity of red, green, +and blue components that make up each color. +
+

+ +

In this example, the color component numeric type is an 8 bit unsigned +integer. While this is most common and recommended for general use, other +component color numeric datatypes, such as a 16 bit unsigned integer , +may be used. This type is specified as the type attribute of the palette +dataset. (see H5Tget_type(), H5Tset_type()) +

The minimum and maximum values of the component color numeric are specified +as attribute of the palette dataset. See below (attribute PAL_MINMAXNUMERIC). +If these attributes do not exist, it is assumed that the range of values +will fill the space of the color numeric type. i.e. with an 8 bit unsigned +integer, the valid range would be 0 to 255 for each color component. +

The HDF5 palette specification additionally allows for color models +beyond RGB. YUV, HSV, CMY, CMYK, YCbCr color models are supported, and +may be specified as a color model attribute of the palette dataset. (see +"Palette Attributes" for details). +

In HDF 4 and earlier, palettes were limited to 256 colors. The HDF5 +palette specification allows for palettes of varying length. The length +is specified as the number of rows of the palette dataset. +
  +
  + + + + +
Important Note: The specification of the Indexed +Palette will change substantially in the next version.  The Palette +described here is denigrated and is not supported.
+ +
  + + + + +
Denigrated +

In a standard palette, the color entries are indexed directly. HDF5 +supports the notion of a range index table. Such a table defines an ascending +ordered list of ranges that map dataset values to the palette. If a range +index table exists for the palette, the PAL_TYPE attribute will be set +to "RANGEINDEX", and the PAL_RANGEINDEX attribute will contain an object +reference to a range index table array. If not, the PAL_TYPE attribute +either does not exist, or will be set to "STANDARD". +

The range index table array consists of a one dimensional array with +the same length as the palette dataset - 1. Ideally, the range index would +be of the same type as the dataset it refers to, however this is not a +requirement. +

Example 2: A range index array of type floating point +

+

+ +

The range index array attribute defines the "to" of the range. +Notice that the range index array attribute is one less entry in size than +the palette. The first entry of 0.1259, specifies that all values below +and up to 0.1259 inclusive, will map to the first palette entry. The second +entry signifies that all values greater than 0.1259 up to 0.3278 inclusive, +will map to the second palette entry, etc. All value greater than the last +range index array attribute (100000) map to the last entry in the palette.

+ +

+2.2. Palette Attributes

+A palette exists in an HDF file as an independent data set with accompanying +attributes.  The Palette attributes are scalars except where noted +otherwise.  String values should have size the length of the string +value plus one.  "Required" attributes must be used.  "Optional" +attributes must be used when required. +

These attributes are defined as follows: +

+
+Attribute name="CLASS" (Required)
+ +
+This attribute is of type H5T_C_S1, with size 7.
+ +
+For all palettes, the value of this attribute is "PALETTE". This attribute +identifies this palette data set as a palette that conforms to the specifications +on this page.
+ +
+Attribute name="PAL_COLORMODEL" (Required)
+ +
+This attribute is of type H5T_C_S1, with size 3, 4, or 5.
+ +
+Possible values for this are "RGB", "YUV", "CMY", "CMYK", "YCbCr", "HSV".
+ +
+This defines the color model that the entries in the palette data set represent.
+ +
+
+"RGB"
+ +
+Each color index contains a triplet where the the first value defines the +red component, second defines the green component, and the third the blue +component.
+ +
+"CMY"
+ +
+Each color index contains a triplet where the the first value defines the +cyan component, second defines the magenta component, and the third the +yellow component.
+ +
+"CMYK"
+ +
+Each color index contains a quadruplet where the the first value defines +the cyan component, second defines the magenta component, the third the +yellow component, and the forth the black component.
+ +
+"YCbCr"
+ +
+Class Y encoding model. Each color index contains a triplet where the the +first value defines the luminance, second defines the Cb Chromonance, and +the third the Cr Chromonance.
+ +
+"YUV"
+ +
+Composite encoding color model. Each color index contains a triplet where +the the first value defines the luminance component, second defines the +chromonance component, and the third the value component.
+ +
+"HSV"
+ +
+Each color index contains a triplet where the the first value defines the +hue component, second defines the saturation component, and the third the +value component. The hue component defines the hue spectrum with a low +value representing magenta/red progressing to a high value which would +represent blue/magenta, passing through yellow, green, cyan. A low value +for the saturation component means less color saturation than a high value. +A low value for value will be darker than a high value.
+ +
+
+
+ +
+Attribute name="PAL_TYPE" (Required)
+ +
+This attribute is of type H5T_C_S1, with size 9 or 10.
+ +
+The current supported values for this attribute are : "STANDARD8" or "RANGEINDEX"
+ +
+A PAL_TYPE of "STANDARD8" defines a palette dataset such that the first +entry defines index 0, the second entry defines index 1, etc. up until +the length of the palette - 1. This assumes an image dataset with direct +indexes into the palette.
+
+ +
  + + + + +
Denigrated +

If the PAL_TYPE is set to "RANGEINDEX", there will be an additional +attribute with a name of "PAL_RANGEINDEX",  (See example 2 +for more details)

+ + + + + +
+
+Attribute name="PAL_RANGEINDEX"   (Denigrated)
+ +
+
+The PAL_RANGEINDEX attribute contains an HDF object reference (HDF5 +datatype H5T_STD_REF_OBJ) pointer which specifies a range index array in +the file to be used for color lookups for the palette.  (Only for +PAL_TYPE="RANGEINDEX")
+
+
+ +
+Attribute name="PAL_MINMAXNUMERIC"
+ +
+
+If present, this attribute is an array of two numbers, of the same HDF5 +datatype as the palette elements or color numerics.
+ +
They specify the minimum and maximum values of the color numeric components. +For example, if the palette was an RGB of type Float, the color numeric +range for Red, Green, and Blue could be set to be between 0.0 and 1.0. +The intensity of the color guns would then be scaled accordingly to be +between this minimum and maximum attribute.
+Attribute name="PAL_VERSION"  (Required) +
This attribute is of type H5T_C_S1, with size corresponding to the +length of the version string.  This attribute identifies the version +number of this specification to which it conforms.  The current version +is "1.2".
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 4. Attributes of a Palette Dataset
Attribute Name(R = Required, +
O = Optional)
TypeString SizeValue
CLASSRString +
7
+
"PALETTE"
PAL_COLORMODELRString +
3, 4, or 5
+
Color Model:  "RGB", YUV", "CMY", "CMYK", "YCbCr", or "HSV"
PAL_TYPERString +
9
+ +


+ + + + +
or 10
+

"STANDARD8"  + + + + +
or "RANGEINDEX" (Denigrated)
+
+ + + + +
Denigrated +
RANGE_INDEX
+
+ + + + +
Object Reference 
+
+ + + + +
<Object Reference to Dataset of range index values>
+
PAL_MINMAXNUMERICOArray[2] of <same datatype as palette>The first value is the <Minimum value for color values>, the second +value is <Maximum value for color values>2
PAL_VERSIONRString4"1.2"
+ +
  + + + + +
1.  The RANGE_INDEX attribute is required if the +PAL_TYPE is "RANGEINDEX".  Otherwise, the RANGE_INDEX attribute should +be omitted. (Range index is denigrated.)
+2.  The minimum and maximum are optional.  If not +set, the range is assumed to the maximum range of the number type.  +If one of these attributes is set, then both should be set.  The value +of the minimum must be less than or equal to the value of the maximum.
+
+Table 5 summarized the uses of the standard attributes for a palette dataset. +R means that the attribute listed on the leftmost column is Required for +the palette type on the first row, O means that the attribute is Optional +for that type and N that the attribute cannot be applied to that type. +The four first rows show the attributes that are always required  +for the two palette types. +
  +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 5. Applicability of Attributes
PAL_TYPESTANDARD8RANGEINDEX
CLASSRR
PAL_VERSIONRR
PAL_COLORMODELRR
RANGE_INDEXNR
PAL_MINMAXNUMERICOO
+ +

+2.3. Storage Layout for Palettes

+The values of the Palette are stored as a dataset.  The datatype can +be any HDF 5 atomic numeric type.  The dataset will have dimensions +(nentries  by  ncomponents), where 'nentries' +is the number of colors (usually 256) and 'ncomponents' is the +number of values per color (3 for RGB, 4 for CMYK, etc.) +
  +

+3.  Consistency and Correlation of Image and Palette +Attributes

+The objects in this specification are an extension to the base HDF5 specification +and library.  They are accessible with the standard HDF5 library, +but the semantics of the objects are not enforced by the base library.  +For example, it is perfectly possible to add an attribute called IMAGE +to any dataset, or to include an object reference to any +HDF5 dataset in a PALETTE attribute.  This would be a valid +HDF5 file, but not conformant to this specification.  The rules defined +in this specification must be implemented with appropriate software, and +applications must use conforming software to assure correctness. +

The Image and Palette specifications include several redundant standard +attributes, such as the IMAGE_COLORMODEL and the PAL_COLORMODEL.  +These attributes are informative not normative, in that it is acceptable +to attach a Palette to an Image dataset even if their attributes do not +match.  Software is not required to enforce consistency, and files +may contain mismatched associations of Images and Palettes.  In all +cases, it is up to applications to determine what kinds of images and color +models can be supported. +

For example, an Image that was created from a file with an "RGB" may +have a "YUV" Palette in its PALETTE attribute array.  This +would be a legal HDF5 file and also conforms to this specification, although +it may or may not be correct for a given application.

+ + + diff --git a/doxygen/examples/PaletteExample1.gif b/doxygen/examples/PaletteExample1.gif new file mode 100644 index 0000000000000000000000000000000000000000..8694d9dfd38719f587d602b63dccd11b1a4b40f5 GIT binary patch literal 2731 zcmV;c3RLw+Nk%w1VPXN$0Du4h00030|NkNR1OWg50RSuj0001D0nh*d0{)DTsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K}1KLp^cF+voiLG&=)6Pf=vnU zm0+$(_7P@_GN@s~b*F|Me76R?HxKn_YZXw|!mUcn8u@BeZq1i(>Hh6W6>`5Dh()t5 zb zTfd$!JEu&mzneD}5|`9X-p{*#4?n*A`Sk1Czh4Hf{{8&^`}-HE!+!z}NML~m9>^ah z2rjsw4-7sCVT2MgH_TovP)GxYA6U4CI2?BLVG0`J6(R*Cn&_c|CyumY2_rHiPKt@V z2m_6LwFm)@Im(ELjV}0zk&ZRR2$PWA83_WA7a~a+Ogy5X9Bo~-S7dr)kyB1+8YuZB zR8Uc=z*t#g=~#GU64w@!O}_IOa2ry%-B5cU$~Ujn&|mWpQOB%yzLy4HknH5$;PnyF{$1hARf zAaqS`3RI_LqM2Brv=$mFqK+QAXr-_Ls}f*QnrQy$Xu`4?l&Cw-Dr&8|M$4;+#15J& zL3slEs7-FIk?cp?h7@MAZEaNUwR453YOUe^$!B@*j;0v2)0QZyh#Gx+Zokg1o9n;y z78&VLPG!i-ah>URYXkqJ#6=*(;P?_VKW`9*0cO$b6K{ z;>p&c-13Yc_cU|0BE#%r%@XPCD$i-+Ooz&Iz)JMS?i7u5(h+vt1IsxBJ;J z=|UHJz|cQj{1nN%9@C+*TYY0QdQDHb;7L`Fx%YsgeMp?Xclyee`oBN>y}j|; z9~|TB4X&_>(X4K_%FD$xm9bnH4sius9`kxMzy4hfY;V(Ag$Nj+yHPMn5mZJ8%?Aw) zstscPD-H%-gf|lE&2A?Q+6DtBv)nE1YBH>$4fj(*9AwWJB21eKA=tv#ywC$;%b^e_ zI6}GQ4Twl&VG>7TK{f1f15=dW{t#g_Hzqo9i%RsN$ySIfFR|w`A*y2O3MViW@hwSc z6yN~CSf{d#Cv{eAp7{8cM&YHVf`WR^?Ti>Y%xDgKrgL8J6m=qg>F8VA0~r`?mpMiL z4R<#@ou#mY9&WL*kJb6yBN26#M*8k&c05*O(B~3!EwW;hsiPL3m#*NcOLlf--}x$~ zMnbLfUOY6Su8gB9$z_n2RE#Ab>qoo~{$M*+0U%2bNJ}n8DUqx^X2VA5$yW}uiCyew z%(Q7jZbI>jz5JvOmAN|?KJjVhJR%pzxz0uTQZnd-B|N?O&GuC?R(9K`KWjKogat8d zDf}Wh&pA+QdXt?8b!Q0v$yv-S>NBANjc3%NmX*QAfTLg%EY+M9HTY zgFO$L4}2)O(Bwcdk*Y)Kxn@l3InvUMu2}oyUr1|8zsg02f%C{;`p82%cjd5MJbhm_ zC$}v9kxq~0>K;w)HC0j`G?=ey$}EFgs(+@FCgqFeVp7REdxGzzqLZngtg6&fVr6{Z zi|H>}nm%eV<*6X0x=u1`NlnK% zmaTQQjaCfU%4oXOOkTxn{d7q@R!YZ>f57QzU%O3wl5~ljjV)|vD_eQC(*{2kCT*P`AAmV8ZpQ&cIVC&r@kjo~w8#7-+c zWWtzp(Mcvoex*vXDlMJ%cGHD%!nGlRH3 zQEQPAnEpqpmUyEn{A`o4@!tdnn7@WTBRAjNX0NU)Q+zY+oQ0cS@0K^e!4)q;HGR?L z5*pJL&1tCR%R%=x5562WZ+p>OYVw|1yRU{|kab7HTkD!Zs=g7cvn*YvwXL%|nB>vK7kd^OD-S)}}SKoxQRv?e((;X6>b6YiYzbFtZ4z z)n=33xeMpns4bD^wDWUomugsnUmUvxyRt4f$>vr!{E+8{_a1!=b9`Snj3eK;zfcq-B# zw^9DXVK4jIV0ZO=dp)^mTixubhBdde)z^)qlavtyX1+W_`L7=@}Hr6wrkD#w7j@sc3nDyD@#T% zhu-nBlGoaI8g%_-EA|aueGomB^`$#G-! lJII4Q=z~89gh42TLr8>0XoN?Igh{A`OUQ&xcmo9h06Q45V&nh- literal 0 HcmV?d00001 diff --git a/doxygen/examples/Palettes.fm.anc.gif b/doxygen/examples/Palettes.fm.anc.gif new file mode 100644 index 0000000000000000000000000000000000000000..d344c03ddf5112a77e7ec01a9de05e77980d3e0b GIT binary patch literal 4748 zcmV;75_9cGNk%w1VXpzK0OJ4v0001ge}7d~Rp#dAs;a90|Nl%(O!xQq8X6k2v$FsI z00000000000000000000A^8LW000F5EC2ui0Ivb8000F3u*gZPy*TU5yZ;~ujAUt^ zXsWJk>%MR-&ve~}c&_h!@Bcaga3~QHf5u}ksoXJ}(5Q4ur97*h>ruPmVliG%IQT7_ z&uD9|bQx!tBrwixF*WH$c2S8>`~QG%a}`M=dt^LDTzwOa1%`wgj*NU_N%Y9#p?UA(9)AC z+`EGa5lxw->(;`C2_s4jc&C&@DHo$;gg3FH$4LGVb8Wm6@}o(KBT0%ZsVSu?8wF3w zYy`8W&6_xL>f9+q<-M6e*KKl1gy;~XK#(5#8C0fHBrG#M9d?OoQ>VLpjSIE46*sRm zwOl#X)t}jcVC%dz`>$WqS4FRJZ8x(UZ5gA1qjU)ml*o_;250hxrPoi8!!g z!;brb+~VVI-7ywr5+(1k|FW_`5s<&&A0isP&e zbZ^&rQ0pFkT6OH=u zR!r+v7#4*Fo~2K88hU6UTzEy-9$gM1WSKWBwK$YdET$OIiVC$96)!N>DC0piPUE7D zKTe0@j_vel(1jhoRTf^0tc7G+N?OPsb|FT&;gcp#>7I{7@~DwRtR&_aVPXO%pLCEF zHfCdLo~ad^eYN@6eNE04W0&q&1}1OmiN{@Qa`5I{f9i$iW@&?Zhu&;;Qnn?Y)aY4b zqU2RN+mybXrzxSo9V+N}lv3*H76+7S>Zz!vYO0ZtJ}Ts9<@i~ste2X{X`i?<8fdJc zf;!%)MX4(6u&lOvr=5B2*CCzC{sstaf(QCnpk|Hsr{A;)4p{9`!*+{mvBq-A2Zr-W zcqNJG>hocSNml9ZR&6+$?ubi*wjj6O<{KtY{Pqh|j#Awi2)Nndn{T)K`m6B5Hy|5u zkT^n&#KGQ%DZs@TXRPtY9B)j(#~_C+^2j8YZ1Tw{f7~&~>z??c#DEZ7E~yj~JJ`xN z=bUlMJooH#&pEf;V36~kTkpQ{64LI{P|7Bjyh|3%>(hMHY%@(iXH9?rTX)U%*ItJW z_Sj;VP4?MlhmEq(t|Gy#TUk zS~u=E%0WLxqeXl!x@kK8fZD3)<*Q*%C8ECm`CYArCvv!|i7&1?#*eq|y2?1eeJsE; zYiIebx@PV-=e=f5I-0zPK01hZoStf!ub+(e@@X^geDlz+E%`$R^*-zHx+{14=C=Yv z{HLPR3QmT_8-FVD$(MYw*Xw`X{?_la?*7>E*H8cb>~npx>^eGHJ%HK5mgnlGJpo<| zLBLQ@0RzZD{3MWkRWskJZnnA#rtgA2iyZBeLM~32OGHMKQoZhFB@mj>S}hw3(>T<$ zB$04p5-e5fD!4cd+7NQFo1Va8w!=S2E`~B3%nd~*KltHqe)&rx5|?O1B{mUk`_m!J zeAq)j{1AvUq@n)KhR8)C=5T{NoT3%0=ma1hAd6bWSr^x6#E$V#TtIr69OGD&0od`5 zc+8_7?})xGKJSmv1Ee6k7DX^pQH*JjnFqJ9$3{A`k3$@!Bm+rF=1I?x{78!1UgZR$ zq~whhNs1#!nMX9Hk#TI~q6Qrnu{l1>m7*l2EFl@mC)%=zxU`=Wb9qEt7Lt_%BO@9V z2{%5-a+X5$VKaLrL>Q=2>E z<_%Zrzi@(+j<2j^IU7k!8{$%I@x!O{^4ZI?<@1u?Jfu4X3eQ;1Q;+9F=laxXPj9xf zpyC|p82*iUP=r!Yp{Qi&1=-0UYF@*mn7KnmEs8Z|I#Yi9WTr|1`p|f~w3QI8%t%X_ zOjYJgpEYFSJ@vQC_x-Y^oz!GyJh@4s!hw?po#_A)s!+%Al!>Y2C{khi(ul@%2}&X3kLq!i66Q_-0+Bq~pz zAoC~del}K@U3H>mon~H@x>s#x&|^GR-$F^&)xJ8Eu8FPYS+O9w1bFtdpbf2PKU+_G z;?%7)%->B#2F<)2)~t6$>m5c*+uD}aq&ejn>~dCskfrl}Y6MwpceB|l5HkbE-BnR) z{>$9ZHdc#-)Y=6I&|3+NY_cG;Ky-1qvf+l3s^GP1RV&ln@+RQ6gvGAb()rl1dUde7 z-Qvf*Td?sG)V_#au6db@UZ4e5Z9MC(7gx63!NT{tlbxUb5)4K9*6yf=4FXYzI@LK$ zcnkaG?^aQ(-t1Cfx3Jr8$pkF24~LAz?*+icRJ<_^1Sj6In>m;z;);lJtU(%< zroC(Su;NN3oHn_r)|#jt&4tOJ^&@(1YML-Q(TR4WstuiE5feDlksWXwV+~o9zPf`- zlf<=u0wriK=rnV}+uZn5kHN`JOnK{@iT15Gg#T?Z-dz^}$nDu*t1i23cD0W)&gzsE zV8QKMnSd4SHGE4bh5L?Ct^8eZUJ0*LzvK1*bMqbH1vmR;UA`t#s1mNdD54zBY z4)iE*G^1PIGK=8~#W}ZF*cw;a8&mL_(#fK35&E~w!)LqiMH^7t6CZ7E4tCDrD%z7s z0nyjac8fDTy3^gUjz28-p7mCL68Lh*x2CYMN3$^~N_p5t74xKdkLxdw?BoY76_{kr6%3pl% zzgKA(5Mo(FWZm^iopWotW`AWSZu`f7Yv+3zlyStTe&}aG6xd>$rhY8r62?Gg7y*Lu zK{$y3fo*4gzlT$mgjyFkYi|ZW@b_P@)@jfOTMBr8A|VZxVS*8OYO5B26^K$5cwNXg zU~Xg-qLze8xP*JQ1w2S}{#Qed<5!fWTJcsgMTlSrSP@LvgbY&=MmUT*I^Hybpd|}mPSSUqu7=jE)h)!6CMdyQD z)mM0ULGPD`M~F!_2#1aoW6*hj@hC6eHAtP>nCtl(8PWa^nuo#Pqh*26PT(IU;m&J9J zm|nEFhw)d0wTL#QsEY9TjLukzTQHF%DUcO8fg5Ry$hK1#`BmyDh|oA=F)3UASdunr zknQ$53As+o=#dVojXybwM`4pUIgfnRILK%Ijbhc45tfSi=#)>niawc1Q<(@vS&}E| zUy^iXEqRe{$c#eyks>*h;&7EDiIaNgGb4bE$Jm0LmW^Q6)ZTn5G$!m-%^_xtP1;m7m#~p&6T_iEE`f zoBvpwwz-11*-zr=k|eW^&GwMa36v078NykRsF_BpxtiDrRJ{qDWVwLBDV%7Te%JXp zemOf(`Il4)n(4`#>&cK#FrCARf~Nk(lH}NxDY={O8JE%docg&0@M!=E1BL>sgJ21n z`w5-=83YKhpbXle4*H-B8lVF@ppO}tu*sdjDFzU_p&XiA;qqb@wk-73dMO7yQ^St( zQKBjee!oL|u19tSmw<{_85~-p4(g#FDrO3ids>oYE%&28x;J4Ub1Mp@W-_FPw|FlK z9RxI^OJJi=iU2s8qe;pl1(9_?s-&)WDM-p6MGB+X6MbN+rC^#nVu}P&YNJz1rM>7{ z;8tH>YNCht9cLP+UuvdRI;M6SE2SejXZned2!Gn4f@+C6+I%(#ss2IAc$vDSoT@E8nx&yiEu)$gmAavUdZ`(~7jFuu&sTNu z!X)#@ebUDq&xag}H>y-Fb3xfu)A3JuhlzArq=PD9K`XS%+6DPgqRxh^TD!HdSEs(( zt6Yn3V)3=STDI)Ug*8F7RcoLL%B@2ywP~xiY}>Yyxv+CcgK;ajb!)eV7_N5ud^i5hS{#hdTz2JFt-JcRj1QUAhG~ zLAkH#BUR#BoBMTHs<@9Er;W?Ai~G3-E4hJdx_^5lyqdM1n<3tjNw=pvRFliU6}q=?>$U*giUUl* z|C_)V%D4S%y*9wW+3LS<2*DLB!8Jg^1suQ*th^b@!5%T8BwWHuD8eY5!YaJNEZo8_ z{K7CC!!kU>G+e_re8V`L!#cdfJlw-R{KG&T#6mp8L|nv1e8fnc#7exxOx(myTn)?j z#4{Ylc$;tCr!+IGsJ2SFwdQ+c2iBee9HWK#tGN8D1^#ye5AlUtB{-^hq1_ZBg~TV za0BPc5K_$QE6tIC7`}YW(A>&nvc~kw%bIK$fy~IW9LC0#%w4?9a*Q`o;>PBT$K|{X z&m1?(T(I{H&XFO`%fQb1%voCD&ITQD0KLzwTo~ib%mOmbLK?@6Va(n<&-wPr_G}vA ze9G{=&l7!c!A#Err$Qaw&(rM7sq7dPoyZTZg9OcdVNuTOe9+tc(JW2QYaA0VjZ1qJ zoyhN^Bzji3H~kflycR!g%s`#gzpBw#yfg*fZ*c<64~H26nm7MkgAWq2E3C))`^CBI a!#4}VVx1?FV#Hp}!fo9YZ~dVW0028(Fj*%6 literal 0 HcmV?d00001 diff --git a/doxygen/examples/TableSpec.html b/doxygen/examples/TableSpec.html new file mode 100644 index 00000000000..474176e14d5 --- /dev/null +++ b/doxygen/examples/TableSpec.html @@ -0,0 +1,193 @@ + + + HDF5 Table Specification + + +The HDF5 specification defines the standard objects and storage for the +standard HDF5 objects. (For information about the HDF5 library, model and +specification, see the HDF documentation.)  This document is an additional +specification do define a standard profile for how to store tables in HDF5. +Table data in HDF5 is stored as HDF5 datasets with standard attributes to define +the properties of the tables. + +

+1. Overview

+A generic table is a sequence of records, each record has a name and a type. +Table data is stored as an HDF5 one dimensional compound dataset.  A table +is defined as a collection of records whose values are stored in fixed-length +fields. All records have the same structure and all values in each field have +the same data type. +

The dataset for a table is distinguished from other datasets by giving +it an attribute "CLASS=TABLE".   +Optional attributes allow the storage of a title for the Table and for +each column, and a fill value for each column. +

+2.  Table Attributes

+The attributes for the Table are strings. They are written with the H5LTset_attribute_string +Lite API function.  "Required" attributes must always be used. "Optional" attributes +must be used when required. +
  +

+Attributes

+ +
+
+Attribute name="CLASS" (Required)
+ +
+This attribute is type H5T_C_S1, with size 5.
+ +
+For all Tables, the value of this attribute is "TABLE".
+ +
+This attribute identifies this data set as intended to be interpreted as Table that conforms to the specifications on this page.
+
+ +
+Attribute name="VERSION" (Required) + +
+This attribute is of type H5T_C_S1, with size corresponding to the length +of the version string.  This attribute identifies the version number +of this specification to which it conforms.  The current version number +is "0.2".
+ +
+ +
+
+Attribute name="TITLE" (Optional)
+ +
+The TITLE is an optional String that is to be used as the +informative title of the whole table. +The TITLE is set with the parameter table_title of the function + H5TBmake_table
+
+ +
+
+Attribute name="FIELD_(n)_NAME" (Required)
+ +
+The FIELD_(n)_NAME is an optional String that is to be used as the +informative title of column n of the table. +For each of the fields the word FIELD_ is concatenated with + the zero based field (n) index together with the name of the field.
+ +
+
+
+Attribute name="FIELD_(n)_FILL" (Optional)
+ +
+The FIELD_(n)_FILL is an optional String that is the fill value for +column n of the table. +For each of the fields the word FIELD_ is concatenated with + the zero based field (n) index together with the fill value, if present. +This value is written only when a fill value is defined for the table.
+ +
+ +
+ +
  +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1. Attributes of an Image Dataset
Attribute Name(R = Required +
O= Optional)
TypeString SizeValue
CLASSRString5"TABLE"
VERSIONRString3"0.2"
TITLEOString  + +
FIELD_(n)_NAMERString  +  + +
FIELD_(n)_FILLO*String  +  +
+
+ +
+

+

+  +
+* The attribute FIELD_(n)_FILL is written to the table if a fill value is +specified on the creation of the Table. Otherwise, it is not.

The following +section of code shows the calls necessary to the creation of a table. + +

/* Create a new HDF5 file using default properties. */
+ file_id = H5Fcreate( "my_table.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT );

+ +

/* Call the make table function */
+
H5TBmake_table( "Table Title", file_id, "Table1", NFIELDS, NRECORDS, dst_size, 
+ field_names, dst_offset, field_type, 
+ chunk_size, fill_data, compress, p_data ) 

+ +

/* Close the file. */
+ status = H5Fclose( file_id );

+ + diff --git a/doxygen/examples/ThreadSafeLibrary.html b/doxygen/examples/ThreadSafeLibrary.html new file mode 100644 index 00000000000..8daf38675f6 --- /dev/null +++ b/doxygen/examples/ThreadSafeLibrary.html @@ -0,0 +1,787 @@ + + + + Thread Safe Library + + +

1. Library header files and conditional compilation

+ +

+The following code is placed at the beginning of H5private.h: +

+ +
+
+  #ifdef H5_HAVE_THREADSAFE
+  #include <pthread.h>
+  #endif
+  
+
+ +

+H5_HAVE_THREADSAFE is defined when the HDF-5 library is +compiled with the --enable-threadsafe configuration option. In general, +code for the non-threadsafe version of HDF-5 library are placed within +the #else part of the conditional compilation. The exception +to this rule are the changes to the FUNC_ENTER (in +H5private.h), HRETURN and HRETURN_ERROR (in +H5Eprivate.h) macros (see section 3.2). +

+ + +

2. Global variables/structures

+ +

2.1 Global library initialization variable

+ +

+In the threadsafe implementation, the global library initialization +variable H5_libinit_g is changed to a global structure +consisting of the variable with its associated lock (locks are explained +in section 4.1): +

+ +
+
+    hbool_t  H5_libinit_g = FALSE;
+  
+
+ +

+becomes +

+ +
+
+    H5_api_t H5_g;
+  
+
+ +

+where H5_api_t is +

+ +
+
+    typedef struct H5_api_struct {
+      H5_mutex_t init_lock;           /* API entrance mutex */
+      hbool_t H5_libinit_g;
+    } H5_api_t;
+  
+
+ +

+All former references to H5_libinit_g in the library are now +made using the macro H5_INIT_GLOBAL. If the threadsafe +library is to be used, the macro is set to H5_g.H5_libinit_g +instead. +

+ +

2.2 Global serialization variable

+ +

+A new global boolean variable H5_allow_concurrent_g is used +to determine if multiple threads are allowed to an API call +simultaneously. This is set to FALSE. +

+ +

+All APIs that are allowed to do so have their own local variable that +shadows the global variable and is set to TRUE. In phase 1, +no such APIs exist. +

+ +

+It is defined in H5.c as follows: +

+ +
+
+    hbool_t H5_allow_concurrent_g = FALSE;
+  
+
+ +

2.3 Global thread initialization variable

+ +

+The global variable H5_first_init_g of type +pthread_once_t is used to allow only the first thread in the +application process to call an initialization function using +pthread_once. All subsequent calls to +pthread_once by any thread are disregarded. +

+ +

+The call sets up the mutex in the global structure H5_g (see +section 3.1) via an initialization function +H5_first_thread_init. The first thread initialization +function is described in section 4.2. +

+ +

+H5_first_init_g is defined in H5.c as follows: +

+ +
+
+    pthread_once_t H5_first_init_g = PTHREAD_ONCE_INIT;
+  
+
+ +

2.4 Global key for per-thread error stacks

+ +

+A global pthread-managed key H5_errstk_key_g is used to +allow pthreads to maintain a separate error stack (of type +H5E_t) for each thread. This is defined in H5.c +as: +

+ +
+
+    pthread_key_t H5_errstk_key_g;
+  
+
+ +

+Error stack management is described in section 4.3. +

+ +

2.5 Global structure and key for thread cancellation prevention

+ +

+We need to preserve the thread cancellation status of each thread +individually by using a key H5_cancel_key_g. The status is +preserved using a structure (of type H5_cancel_t) which +maintains the cancellability state of the thread before it entered the +library and a count (which works very much like the recursive lock +counter) which keeps track of the number of API calls the thread makes +within the library. +

+ +

+The structure is defined in H5private.h as: +

+ +
+
+    /* cancelability structure */
+    typedef struct H5_cancel_struct {
+      int previous_state;
+      unsigned int cancel_count;
+    } H5_cancel_t;
+  
+
+ +

+Thread cancellation is described in section 4.4. +

+ + +

3. Changes to Macro expansions

+ +

3.1 Changes to FUNC_ENTER

+ +

+The FUNC_ENTER macro is now extended to include macro calls +to initialize first threads, disable cancellability and wraps a lock +operation around the checking of the global initialization flag. It +should be noted that the cancellability should be disabled before +acquiring the lock on the library. Doing so otherwise would allow the +possibility that the thread be cancelled just after it has acquired the +lock on the library and in that scenario, if the cleanup routines are not +properly set, the library would be permanently locked out. +

+ +

+The additional macro code and new macro definitions can be found in +Appendix E.1 to E.5. The changes are made in H5private.h. +

+ +

3.2 Changes to HRETURN and HRETURN_ERROR

+ +

+The HRETURN and HRETURN_ERROR macros are the +counterparts to the FUNC_ENTER macro described in section +3.1. FUNC_LEAVE makes a macro call to HRETURN, +so it is also covered here. +

+ +

+The basic changes to these two macros involve adding macro calls to call +an unlock operation and re-enable cancellability if necessary. It should +be noted that the cancellability should be re-enabled only after the +thread has released the lock to the library. The consequence of doing +otherwise would be similar to that described in section 3.1. +

+ +

+The additional macro code and new macro definitions can be found in +Appendix E.9 to E.9. The changes are made in H5Eprivate.h. +

+ +

4. Implementation of threadsafe functionality

+ +

4.1 Recursive Locks

+ +

+A recursive mutex lock m allows a thread t1 to successfully lock m more +than once without blocking t1. Another thread t2 will block if t2 tries +to lock m while t1 holds the lock to m. If t1 makes k lock calls on m, +then it also needs to make k unlock calls on m before it releases the +lock. +

+ +

+Our implementation of recursive locks is built on top of a pthread mutex +lock (which is not recursive). It makes use of a pthread condition +variable to have unsuccessful threads wait on the mutex. Waiting threads +are awaken by a signal from the final unlock call made by the thread +holding the lock. +

+ +

+Recursive locks are defined to be the following type +(H5private.h): +

+ +
+
+    typedef struct H5_mutex_struct {
+      pthread_t owner_thread;         /* current lock owner */
+      pthread_mutex_t atomic_lock;    /* lock for atomicity of new mechanism */
+      pthread_cond_t cond_var;        /* condition variable */
+      unsigned int lock_count;
+    } H5_mutex_t;
+  
+
+ +

+Detailed implementation code can be found in Appendix A. The +implementation changes are made in H5TS.c. +

+ +

4.2 First thread initialization

+ +

+Because the mutex lock associated with a recursive lock cannot be +statically initialized, a mechanism is required to initialize the +recursive lock associated with H5_g so that it can be used +for the first time. +

+ +

+The pthreads library allows this through the pthread_once call which as +described in section 3.3 allows only the first thread accessing the +library in an application to initialize H5_g. +

+ +

+In addition to initializing H5_g, it also initializes the +key (see section 3.4) for use with per-thread error stacks (see section +4.3). +

+ +

+The first thread initialization mechanism is implemented as the function +call H5_first_thread_init() in H5TS.c. This is +described in appendix B. +

+ +

4.3 Per-thread error stack management

+ +

+Pthreads allows individual threads to access dynamic and persistent +per-thread data through the use of keys. Each key is associated with +a table that maps threads to data items. Keys can be initialized by +pthread_key_create() in pthreads (see sections 3.4 and 4.2). +Per-thread data items are accessed using a key through the +pthread_getspecific() and pthread_setspecific() +calls to read and write to the association table respectively. +

+ +

+Per-thread error stacks are accessed through the key +H5_errstk_key_g which is initialized by the first thread +initialization call (see section 4.2). +

+ +

+In the non-threadsafe version of the library, there is a global stack +variable H5E_stack_g[1] which is no longer defined in the +threadsafe version. At the same time, the macro call to gain access to +the error stack H5E_get_my_stack is changed from: +

+ +
+
+    #define H5E_get_my_stack() (H5E_stack_g+0)
+  
+
+ +

+to: +

+ +
+
+    #define H5E_get_my_stack() H5E_get_stack()
+  
+
+ +

+where H5E_get_stack() is a surrogate function that does the +following operations: +

+ +
    +
  1. if a thread is attempting to get an error stack for the first + time, the error stack is dynamically allocated for the thread and + associated with H5_errstk_key_g using + pthread_setspecific(). The way we detect if it is the + first time is through pthread_getspecific() which + returns NULL if no previous value is associated with + the thread using the key.
  2. + +
  3. if pthread_getspecific() returns a non-null value, + then that is the pointer to the error stack associated with the + thread and the stack can be used as usual.
  4. +
+ +

+A final change to the error reporting routines is as follows; the current +implementation reports errors to always be detected at thread 0. In the +threadsafe implementation, this is changed to report the number returned +by a call to pthread_self(). +

+ +

+The change in code (reflected in H5Eprint of file +H5E.c) is as follows: +

+ +
+
+    #ifdef H5_HAVE_THREADSAFE
+      fprintf (stream, "HDF5-DIAG: Error detected in thread %d."
+               ,pthread_self());
+    #else
+      fprintf (stream, "HDF5-DIAG: Error detected in thread 0.");
+    #endif
+  
+
+ +

+Code for H5E_get_stack() can be found in Appendix C. All the +above changes were made in H5E.c. +

+ +

4.4 Thread Cancellation safety

+ +

+To prevent thread cancellations from killing a thread while it is in the +library, we maintain per-thread information about the cancellability +status of the thread before it entered the library so that we can restore +that same status when the thread leaves the library. +

+ +

+By enter and leave the library, we mean the points when a +thread makes an API call from a user application and the time that API +call returns. Other API or callback function calls made from within that +API call are considered within the library. +

+ +

+Because other API calls may be made from within the first API call, we +need to maintain a counter to determine which was the first and +correspondingly the last return. +

+ +

+When a thread makes an API call, the macro H5_API_SET_CANCEL +calls the worker function H5_cancel_count_inc() which does +the following: +

+ +
    +
  1. if this is the first time the thread has entered the library, + a new cancellability structure needs to be assigned to it.
  2. +
  3. if the thread is already within the library when the API call is + made, then cancel_count is simply incremented. Otherwise, we set + the cancellability state to PTHREAD_CANCEL_DISABLE + while storing the previous state into the cancellability structure. + cancel_count is also incremented in this case.
  4. +
+ +

+When a thread leaves an API call, the macro +H5_API_UNSET_CANCEL calls the worker function +H5_cancel_count_dec() which does the following: +

+ +
    +
  1. if cancel_count is greater than 1, indicating that the + thread is not yet about to leave the library, then + cancel_count is simply decremented.
  2. +
  3. otherwise, we reset the cancellability state back to its original + state before it entered the library and decrement the count (back + to zero).
  4. +
+ +

+H5_cancel_count_inc and H5_cancel_count_dec are +described in Appendix D and may be found in H5TS.c. +

+ +

5. Test programs

+ +

+Except where stated, all tests involve 16 simultaneous threads that make +use of HDF-5 API calls without any explicit synchronization typically +required in a non-threadsafe environment. +

+ +

5.1 Data set create and write

+ +

+The test program sets up 16 threads to simultaneously create 16 +different datasets named from zero to fifteen for a single +file and then writing an integer value into that dataset equal to the +dataset's named value. +

+ +

+The main thread would join with all 16 threads and attempt to match the +resulting HDF-5 file with expected results - that each dataset contains +the correct value (0 for zero, 1 for one etc ...) and all +datasets were correctly created. +

+ +

+The test is implemented in the file ttsafe_dcreate.c. +

+ +

5.2 Test on error stack

+ +

+The error stack test is one in which 16 threads simultaneously try to +create datasets with the same name. The result, when properly serialized, +should be equivalent to 16 attempts to create the dataset with the same +name. +

+ +

+The error stack implementation runs correctly if it reports 15 instances +of the dataset name conflict error and finally generates a correct HDF-5 +containing that single dataset. Each thread should report its own stack +of errors with a thread number associated with it. +

+ +

+The test is implemented in the file ttsafe_error.c. +

+ +

5.3 Test on cancellation safety

+ +

+The main idea in thread cancellation safety is as follows; a child thread +is spawned to create and write to a dataset. Following that, it makes a +H5Diterate call on that dataset which activates a callback +function. +

+ +

+A deliberate barrier is invoked at the callback function which waits for +both the main and child thread to arrive at that point. After that +happens, the main thread proceeds to make a thread cancel call on the +child thread while the latter sleeps for 3 seconds before proceeding to +write a new value to the dataset. +

+ +

+After the iterate call, the child thread logically proceeds to wait +another 3 seconds before writing another newer value to the dataset. +

+ +

+The test is correct if the main thread manages to read the second value +at the end of the test. This means that cancellation did not take place +until the end of the iteration call despite of the 3 second wait within +the iteration callback and the extra dataset write operation. +Furthermore, the cancellation should occur before the child can proceed +to write the last value into the dataset. +

+ +

5.4 Test on attribute creation

+ +

+A main thread makes 16 threaded calls to H5Acreate with a +generated name for each attribute. Sixteen attributes should be created +for the single dataset in random (chronological) order and receive values +depending on its generated attribute name (e.g. attrib010 would +receive the value 10). +

+ +

+After joining with all child threads, the main thread proceeds to read +each attribute by generated name to see if the value tallies. Failure is +detected if the attribute name does not exist (meaning they were never +created) or if the wrong values were read back. +

+ +

A. Recursive Lock implementation code

+ +
+
+  void H5_mutex_init(H5_mutex_t *H5_mutex)
+  {
+    H5_mutex->owner_thread = NULL;
+    pthread_mutex_init(&H5_mutex->atomic_lock, NULL);
+    pthread_cond_init(&H5_mutex->cond_var, NULL);
+    H5_mutex->lock_count = 0;
+  }
+
+  void H5_mutex_lock(H5_mutex_t *H5_mutex)
+  {
+    pthread_mutex_lock(&H5_mutex->atomic_lock);
+
+    if (pthread_equal(pthread_self(), H5_mutex->owner_thread)) {
+    	/* already owned by self - increment count */
+    	H5_mutex->lock_count++;
+    } else {
+    	if (H5_mutex->owner_thread == NULL) {
+    		/* no one else has locked it - set owner and grab lock */
+    		H5_mutex->owner_thread = pthread_self();
+    		H5_mutex->lock_count = 1;
+    	} else {
+    		/* if already locked by someone else */
+    		while (1) {
+    			pthread_cond_wait(&H5_mutex->cond_var, &H5_mutex->atomic_lock);
+
+    			if (H5_mutex->owner_thread == NULL) {
+    				H5_mutex->owner_thread = pthread_self();
+    				H5_mutex->lock_count = 1;
+    				break;
+    			} /* else do nothing and loop back to wait on condition*/
+    		}
+    	}
+    }
+
+    pthread_mutex_unlock(&H5_mutex->atomic_lock);
+  }
+
+  void H5_mutex_unlock(H5_mutex_t *H5_mutex)
+  {
+    pthread_mutex_lock(&H5_mutex->atomic_lock);
+    H5_mutex->lock_count--;
+
+    if (H5_mutex->lock_count == 0) {
+    	H5_mutex->owner_thread = NULL;
+    	pthread_cond_signal(&H5_mutex->cond_var);
+    }
+    pthread_mutex_unlock(&H5_mutex->atomic_lock);
+  }
+  
+
+ +

B. First thread initialization

+ +
+
+  void H5_first_thread_init(void)
+  {
+    /* initialize global API mutex lock                      */
+    H5_g.H5_libinit_g = FALSE;
+    H5_g.init_lock.owner_thread = NULL;
+    pthread_mutex_init(&H5_g.init_lock.atomic_lock, NULL);
+    pthread_cond_init(&H5_g.init_lock.cond_var, NULL);
+    H5_g.init_lock.lock_count = 0;
+
+    /* initialize key for thread-specific error stacks       */
+    pthread_key_create(&H5_errstk_key_g, NULL);
+
+    /* initialize key for thread cancellability mechanism    */
+    pthread_key_create(&H5_cancel_key_g, NULL);
+  }
+  
+
+ + +

C. Per-thread error stack acquisition

+ +
+
+  H5E_t *H5E_get_stack(void)
+  {
+    H5E_t *estack;
+
+    if (estack = pthread_getspecific(H5_errstk_key_g)) {
+    	return estack;
+    } else {
+    	/* no associated value with current thread - create one */
+    	estack = (H5E_t *)malloc(sizeof(H5E_t));
+    	pthread_setspecific(H5_errstk_key_g, (void *)estack);
+    	return estack;
+    }
+  }
+  
+
+ +

D. Thread cancellation mechanisms

+ +
+
+  void H5_cancel_count_inc(void)
+  {
+    H5_cancel_t *cancel_counter;
+
+    if (cancel_counter = pthread_getspecific(H5_cancel_key_g)) {
+      /* do nothing here */
+    } else {
+      /*
+       * first time thread calls library - create new counter and
+       * associate with key
+       */
+      cancel_counter = (H5_cancel_t *)malloc(sizeof(H5_cancel_t));
+      cancel_counter->cancel_count = 0;
+      pthread_setspecific(H5_cancel_key_g, (void *)cancel_counter);
+    }
+
+    if (cancel_counter->cancel_count == 0) {
+      /* thread entering library */
+      pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,
+                             &(cancel_counter->previous_state));
+    }
+
+    cancel_counter->cancel_count++;
+  }
+
+  void H5_cancel_count_dec(void)
+  {
+    H5_cancel_t *cancel_counter = pthread_getspecific(H5_cancel_key_g);
+
+    if (cancel_counter->cancel_count == 1)
+      pthread_setcancelstate(cancel_counter->previous_state, NULL);
+
+    cancel_counter->cancel_count--;
+  }
+  
+
+ +

E. Macro expansion codes

+ +

E.1 FUNC_ENTER

+ +
+
+  /* Initialize the library */                                \
+  H5_FIRST_THREAD_INIT                                        \
+  H5_API_UNSET_CANCEL                                         \
+  H5_API_LOCK_BEGIN                                           \
+    if (!(H5_INIT_GLOBAL)) {                                  \
+      H5_INIT_GLOBAL = TRUE;                                  \
+        if (H5_init_library() < 0) {                          \
+          HRETURN_ERROR (H5E_FUNC, H5E_CANTINIT, err,         \
+                        "library initialization failed");     \
+        }                                                     \
+    }                                                         \
+    H5_API_LOCK_END                                           \
+             :
+             :
+             :
+  
+
+ +

E.2 H5_FIRST_THREAD_INIT

+ +
+
+  /* Macro for first thread initialization */
+  #define H5_FIRST_THREAD_INIT                                \
+    pthread_once(&H5_first_init_g, H5_first_thread_init);
+  
+
+ + +

E.3 H5_API_UNSET_CANCEL

+ +
+
+  #define H5_API_UNSET_CANCEL                                 \
+    if (H5_IS_API(FUNC)) {                                    \
+      H5_cancel_count_inc();                                  \
+    }
+  
+
+ + +

E.4 H5_API_LOCK_BEGIN

+ +
+
+  #define H5_API_LOCK_BEGIN                                   \
+     if (H5_IS_API(FUNC)) {                                   \
+       H5_mutex_lock(&H5_g.init_lock);
+  
+
+ + +

E.5 H5_API_LOCK_END

+ +
+
+  #define H5_API_LOCK_END }
+  
+
+ + +

E.6 HRETURN and HRETURN_ERROR

+ +
+
+            :
+            :
+    H5_API_UNLOCK_BEGIN                                       \
+    H5_API_UNLOCK_END                                         \
+    H5_API_SET_CANCEL                                         \
+    return ret_val;                                           \
+  }
+  
+
+ +

E.7 H5_API_UNLOCK_BEGIN

+ +
+
+  #define H5_API_UNLOCK_BEGIN                                 \
+    if (H5_IS_API(FUNC)) {                                    \
+      H5_mutex_unlock(&H5_g.init_lock);
+  
+
+ +

E.8 H5_API_UNLOCK_END

+ +
+
+  #define H5_API_UNLOCK_END }
+  
+
+ + +

E.9 H5_API_SET_CANCEL

+ +
+
+  #define H5_API_SET_CANCEL                                   \
+    if (H5_IS_API(FUNC)) {                                    \
+      H5_cancel_count_dec();                                  \
+    }
+  
+
+ +

By Chee Wai Lee

+

By Bill Wendling

+ + + diff --git a/doxygen/examples/VFL.html b/doxygen/examples/VFL.html new file mode 100644 index 00000000000..9776f9672e1 --- /dev/null +++ b/doxygen/examples/VFL.html @@ -0,0 +1,1601 @@ + + + + +HDF5 Virtual File Layer + + + + + + + + +Revision History +

Initial document, 18 November 1999.

+ +

Updated on 10/24/00, Quincey Koziol

+ +

Added the section “Programming Note for C++ Developers Using C +Functions,” 08/23/2012, Mark Evans + + + +

+


+

Table of Contents

+ +


+ + +

Introduction

+ +

+The HDF5 file format describes how HDF5 data structures and dataset raw +data are mapped to a linear format address space and the HDF5 +library implements that bidirectional mapping in terms of an +API. However, the HDF5 format specifications do not indicate how +the format address space is mapped onto storage and HDF (version 5 and +earlier) simply mapped the format address space directly onto a single +file by convention. + +

+

+Since early versions of HDF5 it became apparent that users want the ability to +map the format address space onto different types of storage (a single file, +multiple files, local memory, global memory, network distributed global +memory, a network protocol, etc.) with various types of maps. For +instance, some users want to be able to handle very large format address +spaces on operating systems that support only 2GB files by partitioning the +format address space into equal-sized parts each served by a separate +file. Other users want the same multi-file storage capability but want to +partition the address space according to purpose (raw data in one file, object +headers in another, global heap in a third, etc.) in order to improve I/O +speeds. + +

+

+In fact, the number of storage variations is probably larger than the +number of methods that the HDF5 team is capable of implementing and +supporting. Therefore, a Virtual File Layer API is being +implemented which will allow application teams or departments to design +and implement their own mapping between the HDF5 format address space +and storage, with each mapping being a separate file driver +(possibly written in terms of other file drivers). The HDF5 team will +provide a small set of useful file drivers which will also serve as +examples for those who which to write their own: + +

+
+ +
H5FD_SEC2 +
+This is the default driver which uses Posix file-system functions like +read and write to perform I/O to a single file. All I/O +requests are unbuffered although the driver does optimize file seeking +operations to some extent. + +
H5FD_STDIO +
+This driver uses functions from `stdio.h' to perform buffered I/O +to a single file. + +
H5FD_CORE +
+This driver performs I/O directly to memory and can be used to create small +temporary files that never exist on permanent storage. This type of storage is +generally very fast since the I/O consists only of memory-to-memory copy +operations. + +
H5FD_MPIIO +
+This is the driver of choice for accessing files in parallel using MPI and +MPI-IO. It is only predefined if the library is compiled with parallel I/O +support. + +
H5FD_FAMILY +
+Large format address spaces are partitioned into more manageable pieces and +sent to separate storage locations using an underlying driver of the user's +choice. The h5repart tool can be used to change the sizes of the +family members when stored as files or to convert a family of files to a +single file or vice versa. + +
H5FD_SPLIT +
+The format address space is split into meta data and raw data and each is +mapped onto separate storage using underlying drivers of the user's +choice. The meta data storage can be read by itself (for limited +functionality) or both files can be accessed together. +
+ + + +

Using a File Driver

+ +

+Most application writers will use a driver defined by the HDF5 library or +contributed by another programming team. This chapter describes how existing +drivers are used. + +

+ + + +

Driver Header Files

+ +

+Each file driver is defined in its own public header file which should +be included by any application which plans to use that driver. The +predefined drivers are in header files whose names begin with +`H5FD' followed by the driver name and `.h'. The `hdf5.h' +header file includes all the predefined driver header files. + +

+

+Once the appropriate header file is included a symbol of the form +`H5FD_' followed by the upper-case driver name will be the driver +identification number.(1) However, the +value may change if the library is closed (e.g., by calling +H5close) and the symbol is referenced again. + +

+ + +

Creating and Opening Files

+ +

+In order to create or open a file one must define the method by which the +storage is accessed(2) and does so by creating a file access property list(3) which is passed to the H5Fcreate or +H5Fopen function. A default file access property list is created by +calling H5Pcreate and then the file driver information is inserted by +calling a driver initialization function such as H5Pset_fapl_family: + +

+ +
+hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
+size_t member_size = 100*1024*1024; /*100MB*/
+H5Pset_fapl_family(fapl, member_size, H5P_DEFAULT);
+hid_t file = H5Fcreate("foo%05d.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+H5Pclose(fapl);
+
+ +

+Each file driver will have its own initialization function +whose name is H5Pset_fapl_ followed by the driver name and which +takes a file access property list as the first argument followed by +additional driver-dependent arguments. + +

+

+An alternative to using the driver initialization function is to set the +driver directly using the H5Pset_driver function.(4) Its second argument is the file driver identifier, which may +have a different numeric value from run to run depending on the order in which +the file drivers are registered with the library. The third argument +encapsulates the additional arguments of the driver initialization +function. This method only works if the file driver writer has made the +driver-specific property list structure a public datatype, which is +often not the case. + +

+ +
+hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
+static H5FD_family_fapl_t fa = {100*1024*1024, H5P_DEFAULT};
+H5Pset_driver(fapl, H5FD_FAMILY, &fa);
+hid_t file = H5Fcreate("foo.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+H5Pclose(fapl);
+
+ +

+It is also possible to query the file driver information from a file access +property list by calling H5Pget_driver to determine the driver and then +calling a driver-defined query function to obtain the driver information: + +

+ +
+hid_t driver = H5Pget_driver(fapl);
+if (H5FD_SEC2==driver) {
+    /*nothing further to get*/
+} else if (H5FD_FAMILY==driver) {
+    hid_t member_fapl;
+    haddr_t member_size;
+    H5Pget_fapl_family(fapl, &member_size, &member_fapl);
+} else if (....) {
+    ....
+}
+
+ + + +

Performing I/O

+ +

+The H5Dread and H5Dwrite functions transfer data between +application memory and the file. They both take an optional data transfer +property list which has some general driver-independent properties and +optional driver-defined properties. An application will typically perform I/O +in one of three styles via the H5Dread or H5Dwrite function: + +

+

+Like file access properties in the previous section, data transfer properties +can be set using a driver initialization function or a general purpose +function. For example, to set the MPI-IO driver to use independent access for +I/O operations one would say: + +

+ +
+hid_t dxpl = H5Pcreate(H5P_DATA_XFER);
+H5Pset_dxpl_mpio(dxpl, H5FD_MPIO_INDEPENDENT);
+H5Dread(dataset, type, mspace, fspace, buffer, dxpl);
+H5Pclose(dxpl);
+
+ +

+The alternative is to initialize a driver defined C struct and pass it +to the H5Pset_driver function: + +

+ +
+hid_t dxpl = H5Pcreate(H5P_DATA_XFER);
+static H5FD_mpio_dxpl_t dx = {H5FD_MPIO_INDEPENDENT};
+H5Pset_driver(dxpl, H5FD_MPIO, &dx);
+H5Dread(dataset, type, mspace, fspace, buffer, dxpl);
+
+ +

+The transfer propery list can be queried in a manner similar to the file +access property list: the driver provides a function (or functions) to return +various information about the transfer property list: + +

+ +
+hid_t driver = H5Pget_driver(dxpl);
+if (H5FD_MPIO==driver) {
+    H5FD_mpio_xfer_t xfer_mode;
+    H5Pget_dxpl_mpio(dxpl, &xfer_mode);
+} else {
+    ....
+}
+
+ + + +

File Driver Interchangeability

+ +

+The HDF5 specifications describe two things: the mapping of data onto a linear +format address space and the C API which performs the mapping. +However, the mapping of the format address space onto storage intentionally +falls outside the scope of the HDF5 specs. This is a direct result of the fact +that it is not generally possible to store information about how to access +storage inside the storage itself. For instance, given only the file name +`/arborea/1225/work/f%03d' the HDF5 library is unable to tell whether the +name refers to a file on the local file system, a family of files on the local +file system, a file on host `arborea' port 1225, a family of files on a +remote system, etc. + +

+

+Two ways which library could figure out where the storage is located are: +storage access information can be provided by the user, or the library can try +all known file access methods. This implementation uses the former method. + +

+

+In general, if a file was created with one driver then it isn't possible to +open it with another driver. There are of course exceptions: a file created +with MPIO could probably be opened with the sec2 driver, any file created +by the sec2 driver could be opened as a family of files with one member, +etc. In fact, sometimes a file must not only be opened with the same +driver but also with the same driver properties. The predefined drivers are +written in such a way that specifying the correct driver is sufficient for +opening a file. + +

+ + +

Implementation of a Driver

+ +

+A driver is simply a collection of functions and data structures which are +registered with the HDF5 library at runtime. The functions fall into these +categories: + +

+ +
    +
  • Functions which operate on modes + +
  • Functions which operate on files + +
  • Functions which operate on the address space + +
  • Functions which operate on data + +
  • Functions for driver initialization + +
  • Optimization functions + +
+ + + +

Mode Functions

+ +

+Some drivers need information about file access and data transfers which are +very specific to the driver. The information is usually implemented as a pair +of pointers to C structs which are allocated and initialized as part of an +HDF5 property list and passed down to various driver functions. There are two +classes of settings: file access modes that describe how to access the file +through the driver, and data transfer modes which are settings that control +I/O operations. Each file opened by a particular driver may have a different +access mode; each dataset I/O request for a particular file may have a +different data transfer mode. + +

+

+Since each driver has its own particular requirements for various settings, +each driver is responsible for defining the mode structures that it +needs. Higher layers of the library treat the structures as opaque but must be +able to copy and free them. Thus, the driver provides either the size of the +structure or a pair of function pointers for each of the mode types. + +

+

+Example: The family driver needs to know how the format address +space is partitioned and the file access property list to use for the +family members. + +

+ +
+/* Driver-specific file access properties */
+typedef struct H5FD_family_fapl_t {
+    hsize_t     memb_size;      /*size of each member                   */
+    hid_t       memb_fapl_id;   /*file access property list of each memb*/
+} H5FD_family_fapl_t;
+
+/* Driver specific data transfer properties */
+typedef struct H5FD_family_dxpl_t {
+    hid_t       memb_dxpl_id;   /*data xfer property list of each memb  */
+} H5FD_family_dxpl_t;
+
+ +

+In order to copy or free one of these structures the member file access +or data transfer properties must also be copied or freed. This is done +by providing a copy and close function for each structure: + +

+

+Example: The file access property list copy and close functions +for the family driver: + +

+ +
+static void *
+H5FD_family_fapl_copy(const void *_old_fa)
+{
+    const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa;
+    H5FD_family_fapl_t *new_fa = malloc(sizeof(H5FD_family_fapl_t));
+    assert(new_fa);
+
+    memcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t));
+    new_fa->memb_fapl_id = H5Pcopy(old_fa->memb_fapl_id);
+    return new_fa;
+}
+
+static herr_t
+H5FD_family_fapl_free(void *_fa)
+{
+    H5FD_family_fapl_t  *fa = (H5FD_family_fapl_t*)_fa;
+    H5Pclose(fa->memb_fapl_id);
+    free(fa);
+    return 0;
+}
+
+ +

+Generally when a file is created or opened the file access properties +for the driver are copied into the file pointer which is returned and +they may be modified from their original value (for instance, the file +family driver modifies the member size property when opening an existing +family). In order to support the H5Fget_access_plist function the +driver must provide a fapl_get callback which creates a copy of +the driver-specific properties based on a particular file. + +

+

+Example: The file family driver copies the member size file +access property list into the return value: + +

+ +
+static void *
+H5FD_family_fapl_get(H5FD_t *_file)
+{
+    H5FD_family_t	*file = (H5FD_family_t*)_file;
+    H5FD_family_fapl_t	*fa = calloc(1, sizeof(H5FD_family_fapl_t*));
+
+    fa->memb_size = file->memb_size;
+    fa->memb_fapl_id = H5Pcopy(file->memb_fapl_id);
+    return fa;
+}
+
+ + + +

File Functions

+ +

+The higher layers of the library expect files to have a name and allow the +file to be accessed in various modes. The driver must be able to create a new +file, replace an existing file, or open an existing file. Opening or creating +a file should return a handle, a pointer to a specialization of the +H5FD_t struct, which allows read-only or read-write access and which +will be passed to the other driver functions as they are +called.(5) + +

+ +
+typedef struct {
+    /* Public fields */
+    H5FD_class_t *cls; /*class data defined below*/
+
+    /* Private fields -- driver-defined */
+
+} H5FD_t;
+
+ +

+Example: The family driver requires handles to the underlying +storage, the size of the members for this particular file (which might be +different than the member size specified in the file access property list if +an existing file family is being opened), the name used to open the file in +case additional members must be created, and the flags to use for creating +those additional members. The eoa member caches the size of the format +address space so the family members don't have to be queried in order to find +it. + +

+ +
+/* The description of a file belonging to this driver. */
+typedef struct H5FD_family_t {
+    H5FD_t      pub;            /*public stuff, must be first           */
+    hid_t       memb_fapl_id;   /*file access property list for members */
+    hsize_t     memb_size;      /*maximum size of each member file      */
+    int         nmembs;         /*number of family members              */
+    int         amembs;         /*number of member slots allocated      */
+    H5FD_t      **memb;         /*dynamic array of member pointers      */
+    haddr_t     eoa;            /*end of allocated addresses            */
+    char        *name;          /*name generator printf format          */
+    unsigned    flags;          /*flags for opening additional members  */
+} H5FD_family_t;
+
+ +

+Example: The sec2 driver needs to keep track of the underlying Unix +file descriptor and also the end of format address space and current Unix file +size. It also keeps track of the current file position and last operation +(read, write, or unknown) in order to optimize calls to lseek. The +device and inode fields are defined on Unix in order to uniquely +identify the file and will be discussed below. + +

+ +
+typedef struct H5FD_sec2_t {
+    H5FD_t      pub;                    /*public stuff, must be first   */
+    int         fd;                     /*the unix file                 */
+    haddr_t     eoa;                    /*end of allocated region       */
+    haddr_t     eof;                    /*end of file; current file size*/
+    haddr_t     pos;                    /*current file I/O position     */
+    int         op;                     /*last operation                */
+    dev_t       device;                 /*file device number            */
+    ino_t       inode;                  /*file i-node number            */
+} H5FD_sec2_t;
+
+ + + +

Opening Files

+ +

+All drivers must define a function for opening/creating a file. This +function should have a prototype which is: + +

+

+

+
Function: static H5FD_t * open (const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) +
+ +

+

+The file name name and file access property list fapl are +the same as were specified in the H5Fcreate or H5Fopen +call. The flags are the same as in those calls also except the +flag H5F_ACC_CREATE is also present if the call was to +H5Fcreate and they are documented in the `H5Fpublic.h' +file. The maxaddr argument is the maximum format address that the +driver should be prepared to handle (the minimum address is always +zero). +

+ +

+

+Example: The sec2 driver opens a Unix file with the requested name +and saves information which uniquely identifies the file (the Unix device +number and inode). + +

+ +
+static H5FD_t *
+H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id/*unused*/,
+               haddr_t maxaddr)
+{
+    unsigned    o_flags;
+    int         fd;
+    struct stat sb;
+    H5FD_sec2_t *file=NULL;
+
+    /* Check arguments */
+    if (!name || !*name) return NULL;
+    if (0==maxaddr || HADDR_UNDEF==maxaddr) return NULL;
+    if (ADDR_OVERFLOW(maxaddr)) return NULL;
+
+    /* Build the open flags */
+    o_flags = (H5F_ACC_RDWR & flags) ? O_RDWR : O_RDONLY;
+    if (H5F_ACC_TRUNC & flags) o_flags |= O_TRUNC;
+    if (H5F_ACC_CREAT & flags) o_flags |= O_CREAT;
+    if (H5F_ACC_EXCL & flags) o_flags |= O_EXCL;
+
+    /* Open the file */
+    if ((fd=open(name, o_flags, 0666))<0) return NULL;
+    if (fstat(fd, &sb)<0) {
+        close(fd);
+        return NULL;
+    }
+
+    /* Create the new file struct */
+    file = calloc(1, sizeof(H5FD_sec2_t));
+    file->fd = fd;
+    file->eof = sb.st_size;
+    file->pos = HADDR_UNDEF;
+    file->op = OP_UNKNOWN;
+    file->device = sb.st_dev;
+    file->inode = sb.st_ino;
+
+    return (H5FD_t*)file;
+}
+
+ + + +

Closing Files

+ +

+Closing a file simply means that all cached data should be flushed to the next +lower layer, the file should be closed at the next lower layer, and all +file-related data structures should be freed. All information needed by the +close function is already present in the file handle. + +

+

+

+
Function: static herr_t close (H5FD_t *file) +
+ +

+

+The file argument is the handle which was returned by the open +function, and the close should free only memory associated with the +driver-specific part of the handle (the public parts will have already been released by HDF5's virtual file layer). +

+ +

+

+Example: The sec2 driver just closes the underlying Unix file, +making sure that the actual file size is the same as that known to the +library by writing a zero to the last file position it hasn't been +written by some previous operation (which happens in the same code which +flushes the file contents and is shown below). + +

+ +
+static herr_t
+H5FD_sec2_close(H5FD_t *_file)
+{
+    H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+
+    if (H5FD_sec2_flush(_file)<0) return -1;
+    if (close(file->fd)<0) return -1;
+    free(file);
+    return 0;
+}
+
+ + + +

File Keys

+ +

+Occasionally an application will attempt to open a single file more than one +time in order to obtain multiple handles to the file. HDF5 allows the files to +share information(6) but in order to +accomplish this HDF5 must be able to tell when two names refer to the same +file. It does this by associating a driver-defined key with each file opened +by a driver and comparing the key for an open request with the keys for all +other files currently open by the same driver. + +

+

+

+
Function: const int cmp (const H5FD_t *f1, const H5FD_t *f2) +
+ +

+

+The driver may provide a function which compares two files f1 and +f2 belonging to the same driver and returns a negative, positive, or +zero value a la the strcmp function.(7) If this +function is not provided then HDF5 assumes that all calls to the open +callback return unique files regardless of the arguments and it is up to the +application to avoid doing this if that assumption is incorrect. +

+ +

+

+Each time a file is opened the library calls the cmp function to +compare that file with all other files currently open by the same driver and +if one of them matches (at most one can match) then the file which was just +opened is closed and the previously opened file is used instead. + +

+

+Opening a file twice with incompatible flags will result in failure. For +instance, opening a file with the truncate flag is a two step process which +first opens the file without truncation so keys can be compared, and if no +matching file is found already open then the file is closed and immediately +reopened with the truncation flag set (if a matching file is already open then +the truncating open will fail). + +

+

+Example: The sec2 driver uses the Unix device and i-node as the +key. They were initialized when the file was opened. + +

+ +
+static int
+H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
+{
+    const H5FD_sec2_t   *f1 = (const H5FD_sec2_t*)_f1;
+    const H5FD_sec2_t   *f2 = (const H5FD_sec2_t*)_f2;
+
+    if (f1->device < f2->device) return -1;
+    if (f1->device > f2->device) return 1;
+
+    if (f1->inode < f2->inode) return -1;
+    if (f1->inode > f2->inode) return 1;
+
+    return 0;
+}
+
+ + + +

Saving Modes Across Opens

+ +

+Some drivers may also need to store certain information in the file superblock +in order to be able to reliably open the file at a later date. This is done by +three functions: one to determine how much space will be necessary to store +the information in the superblock, one to encode the information, and one to +decode the information. These functions are optional, but if any one is +defined then the other two must also be defined. + +

+

+

+
Function: static hsize_t sb_size (H5FD_t *file) +
+
Function: static herr_t sb_encode (H5FD_t *file, char *name, unsigned char *buf) +
+
Function: static herr_t sb_decode (H5FD_t *file, const char *name, const unsigned char *buf) +
+ +

+

+The sb_size function returns the number of bytes necessary to encode +information needed later if the file is reopened. The sb_encode +function encodes information from the file into buffer buf +allocated by the caller. It also writes an 8-character (plus null +termination) into the name argument, which should be a unique +identification for the driver. The sb_decode function looks at +the name + +

+

+ decodes +data from the buffer buf and updates the file argument with the new information, +advancing *p in the process. +

+ +

+

+The part of this which is somewhat tricky is that the file must be readable +before the superblock information is decoded. File access modes fall outside +the scope of the HDF5 file format, but they are placed inside the boot block +for convenience.(8) + +

+

+Example: To be written later. + +

+ + +

Address Space Functions

+ +

+HDF5 does not assume that a file is a linear address space of bytes. Instead, +the library will call functions to allocate and free portions of the HDF5 +format address space, which in turn map onto functions in the file driver to +allocate and free portions of file address space. The library tells the file +driver how much format address space it wants to allocate and the driver +decides what format address to use and how that format address is mapped onto +the file address space. Usually the format address is chosen so that the file +address can be calculated in constant time for data I/O operations (which are +always specified by format addresses). + +

+ + + +

Userblock and Superblock

+ +

+The HDF5 format allows an optional userblock to appear before the actual HDF5 +data in such a way that if the userblock is sucked out of the file and +everything remaining is shifted downward in the file address space, then the +file is still a valid HDF5 file. The userblock size can be zero or any +multiple of two greater than or equal to 512 and the file superblock begins +immediately after the userblock. + +

+

+HDF5 allocates space for the userblock and superblock by calling an +allocation function defined below, which must return a chunk of memory at +format address zero on the first call. + +

+ + +

Allocation of Format Regions

+ +

+The library makes many types of allocation requests: + +

+
+ +
H5FD_MEM_SUPER +
+An allocation request for the userblock and/or superblock. +
H5FD_MEM_BTREE +
+An allocation request for a node of a B-tree. +
H5FD_MEM_DRAW +
+An allocation request for the raw data of a dataset. +
H5FD_MEM_META +
+An allocation request for the raw data of a dataset which +the user has indicated will be relatively small. +
H5FD_MEM_GROUP +
+An allocation request for a group leaf node (internal nodes of the group tree +are allocated as H5MF_BTREE). +
H5FD_MEM_GHEAP +
+An allocation request for a global heap collection. Global heaps are used to +store certain types of references such as dataset region references. The set +of all global heap collections can become quite large. +
H5FD_MEM_LHEAP +
+An allocation request for a local heap. Local heaps are used to store the +names which are members of a group. The combined size of all local heaps is a +function of the number of object names in the file. +
H5FD_MEM_OHDR +
+An allocation request for (part of) an object header. Object headers are +relatively small and include meta information about objects (like the data +space and type of a dataset) and attributes. +
+ +

+When a chunk of memory is freed the library adds it to a free list and +allocation requests are satisfied from the free list before requesting memory +from the file driver. Each type of allocation request enumerated above has its +own free list, but the file driver can specify that certain object types can +share a free list. It does so by providing an array which maps a request type +to a free list. If any value of the map is H5MF_DEFAULT (zero) then the +object's own free list is used. The special value H5MF_NOLIST indicates +that the library should not attempt to maintain a free list for that +particular object type, instead calling the file driver each time an object of +that type is freed. + +

+

+Mappings predefined in the `H5FDpublic.h' file are: +

+ +
H5FD_FLMAP_SINGLE +
+All memory usage types are mapped to a single free list. +
H5FD_FLMAP_DICHOTOMY +
+Memory usage is segregated into meta data and raw data for the purposes of +memory management. +
H5FD_FLMAP_DEFAULT +
+Each memory usage type has its own free list. +
+ +

+Example: To make a map that manages object headers on one free list +and everything else on another free list one might initialize the map with the +following code: (the use of H5FD_MEM_SUPER is arbitrary) + +

+ +
+H5FD_mem_t mt, map[H5FD_MEM_NTYPES];
+
+for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+    map[mt] = (H5FD_MEM_OHDR==mt) ? mt : H5FD_MEM_SUPER;
+}
+
+ +

+If an allocation request cannot be satisfied from the free list then one of +two things happen. If the driver defines an allocation callback then it is +used to allocate space; otherwise new memory is allocated from the end of the +format address space by incrementing the end-of-address marker. + +

+

+

+
Function: static haddr_t alloc (H5FD_t *file, H5MF_type_t type, hsize_t size) +
+ +

+

+The file argument is the file from which space is to be allocated, +type is the type of memory being requested (from the list above) without +being mapped according to the freelist map and size is the number of +bytes being requested. The library is allowed to allocate large chunks of +storage and manage them in a layer above the file driver (although the current +library doesn't do that). The allocation function should return a format +address for the first byte allocated. The allocated region extends from that +address for size bytes. If the request cannot be honored then the +undefined address value is returned (HADDR_UNDEF). The first call to +this function for a file which has never had memory allocated must +return a format address of zero or HADDR_UNDEF since this is how the +library allocates space for the userblock and/or superblock. +

+ +

+ +

+Example: To be written later. + +

+ + +

Freeing Format Regions

+ +

+When the library is finished using a certain region of the format address +space it will return the space to the free list according to the type of +memory being freed and the free list map described above. If the free list has +been disabled for a particular memory usage type (according to the free list +map) and the driver defines a free callback then it will be +invoked. The free callback is also invoked for all entries on the free +list when the file is closed. + +

+

+

+
Function: static herr_t free (H5FD_t *file, H5MF_type_t type, haddr_t addr, hsize_t size) +
+ +

+

+The file argument is the file for which space is being freed; type +is the type of object being freed (from the list above) without being mapped +according to the freelist map; addr is the first format address to free; +and size is the size in bytes of the region being freed. The region +being freed may refer to just part of the region originally allocated and/or +may cross allocation boundaries provided all regions being freed have the same +usage type. However, the library will never attempt to free regions which have +already been freed or which have never been allocated. +

+ +

+

+A driver may choose to not define the free function, in which case +format addresses will be leaked. This isn't normally a huge problem since the +library contains a simple free list of its own and freeing parts of the format +address space is not a common occurrence. + +

+

+Example: To be written later. + +

+ + +

Querying Address Range

+ +

+Each file driver must have some mechanism for setting and querying the end of +address, or EOA, marker. The EOA marker is the first format address +after the last format address ever allocated. If the last part of the +allocated address range is freed then the driver may optionally decrease the +eoa marker. + +

+

+

+
Function: static haddr_t get_eoa (H5FD_t *file) +
+ +

+

+This function returns the current value of the EOA marker for the specified +file. +

+ +

+

+Example: The sec2 driver just returns the current eoa marker value +which is cached in the file structure: + +

+ +
+static haddr_t
+H5FD_sec2_get_eoa(H5FD_t *_file)
+{
+    H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+    return file->eoa;
+}
+
+ +

+The eoa marker is initially zero when a file is opened and the library may set +it to some other value shortly after the file is opened (after the superblock +is read and the saved eoa marker is determined) or when allocating additional +memory in the absence of an alloc callback (described above). + +

+

+Example: The sec2 driver simply caches the eoa marker in the file +structure and does not extend the underlying Unix file. When the file is +flushed or closed then the Unix file size is extended to match the eoa marker. + +

+ +
+static herr_t
+H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr)
+{
+    H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+    file->eoa = addr;
+    return 0;
+}
+
+ + + +

Data Functions

+ +

+These functions operate on data, transferring a region of the format address +space between memory and files. + +

+ + + +

Contiguous I/O Functions

+ +

+A driver must specify two functions to transfer data from the library to the +file and vice versa. + +

+

+

+
Function: static herr_t read (H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, void *buf) +
+
Function: static herr_t write (H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, const void *buf) +
+ +

+

+The read function reads data from file file beginning at address +addr and continuing for size bytes into the buffer buf +supplied by the caller. The write function transfers data in the +opposite direction. Both functions take a data transfer property list +dxpl which indicates the fine points of how the data is to be +transferred and which comes directly from the H5Dread or +H5Dwrite function. Both functions receive type of +data being written, which may allow a driver to tune it's behavior for +different kinds of data. +

+ +

+

+Both functions should return a negative value if they fail to transfer the +requested data, or non-negative if they succeed. The library will never +attempt to read from unallocated regions of the format address space. + +

+

+Example: The sec2 driver just makes system calls. It tries not to +call lseek if the current operation is the same as the previous +operation and the file position is correct. It also fills the output buffer +with zeros when reading between the current EOF and EOA markers and restarts +system calls which were interrupted. + +

+ +
+static herr_t
+H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type/*unused*/, hid_t dxpl_id/*unused*/,
+        haddr_t addr, hsize_t size, void *buf/*out*/)
+{
+    H5FD_sec2_t         *file = (H5FD_sec2_t*)_file;
+    ssize_t             nbytes;
+
+    assert(file && file->pub.cls);
+    assert(buf);
+
+    /* Check for overflow conditions */
+    if (REGION_OVERFLOW(addr, size)) return -1;
+    if (addr+size>file->eoa) return -1;
+
+    /* Seek to the correct location */
+    if ((addr!=file->pos || OP_READ!=file->op) &&
+        file_seek(file->fd, (file_offset_t)addr, SEEK_SET)<0) {
+        file->pos = HADDR_UNDEF;
+        file->op = OP_UNKNOWN;
+        return -1;
+    }
+
+    /*
+     * Read data, being careful of interrupted system calls, partial results,
+     * and the end of the file.
+     */
+    while (size>0) {
+        do nbytes = read(file->fd, buf, size);
+        while (-1==nbytes && EINTR==errno);
+        if (-1==nbytes) {
+            /* error */
+            file->pos = HADDR_UNDEF;
+            file->op = OP_UNKNOWN;
+            return -1;
+        }
+        if (0==nbytes) {
+            /* end of file but not end of format address space */
+            memset(buf, 0, size);
+            size = 0;
+        }
+        assert(nbytes>=0);
+        assert((hsize_t)nbytes<=size);
+        size -= (hsize_t)nbytes;
+        addr += (haddr_t)nbytes;
+        buf = (char*)buf + nbytes;
+    }
+
+    /* Update current position */
+    file->pos = addr;
+    file->op = OP_READ;
+    return 0;
+}
+
+ +

+Example: The sec2 write callback is similar except it updates +the file EOF marker when extending the file. + +

+ + +

Flushing Cached Data

+ +

+Some drivers may desire to cache data in memory in order to make larger I/O +requests to the underlying file and thus improving bandwidth. Such drivers +should register a cache flushing function so that the library can insure that +data has been flushed out of the drivers in response to the application +calling H5Fflush. + +

+

+

+
Function: static herr_t flush (H5FD_t *file) +
+ +

+

+Flush all data for file file to storage. +

+ +

+

+Example: The sec2 driver doesn't cache any data but it also doesn't +extend the Unix file as agressively as it should. Therefore, when finalizing a +file it should write a zero to the last byte of the allocated region so that +when reopening the file later the EOF marker will be at least as large as the +EOA marker saved in the superblock (otherwise HDF5 will refuse to open the +file, claiming that the data appears to be truncated). + +

+ +
+static herr_t
+H5FD_sec2_flush(H5FD_t *_file)
+{
+    H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+
+    if (file->eoa>file->eof) {
+        if (-1==file_seek(file->fd, file->eoa-1, SEEK_SET)) return -1;
+        if (write(file->fd, "", 1)!=1) return -1;
+        file->eof = file->eoa;
+        file->pos = file->eoa;
+        file->op = OP_WRITE;
+    }
+
+    return 0;
+}
+
+ + + +

Optimization Functions

+ +

+The library is capable of performing several generic optimizations on I/O, but +these types of optimizations may not be appropriate for a given VFL driver. +

+ +

+Each driver may provide a query function to allow the library to query whether +to enable these optimizations. If a driver lacks a query function, the library +will disable all types of optimizations which can be queried. +

+ +

+

+
Function: static herr_t query (const H5FD_t *file, unsigned long *flags) +
+

+

+This function is called by the library to query which optimizations to enable +for I/O to this driver. These are the flags which are currently defined: + +

    +
    +
    H5FD_FEAT_AGGREGATE_METADATA (0x00000001) +
    Defining the H5FD_FEAT_AGGREGATE_METADATA for a VFL driver means that +the library will attempt to allocate a larger block for metadata and +then sub-allocate each metadata request from that larger block. +
    H5FD_FEAT_ACCUMULATE_METADATA (0x00000002) +
    Defining the H5FD_FEAT_ACCUMULATE_METADATA for a VFL driver means that +the library will attempt to cache metadata as it is written to the file +and build up a larger block of metadata to eventually pass to the VFL +'write' routine. +
    H5FD_FEAT_DATA_SIEVE (0x00000004) +
    Defining the H5FD_FEAT_DATA_SIEVE for a VFL driver means that +the library will attempt to cache raw data as it is read from/written to +a file in a "data sieve" buffer. See Rajeev Thakur's papers: +
      +
      +
      http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz +
      http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz +
      +
    +
    +
+

+ +
+

+ +

Registration of a Driver

+ +

+Before a driver can be used the HDF5 library needs to be told of its +existence. This is done by registering the driver, which results in a driver +identification number. Instead of passing many arguments to the registration +function, the driver information is entered into a structure and the address +of the structure is passed to the registration function where it is +copied. This allows the HDF5 API to be extended while providing backward +compatibility at the source level. + +

+

+

+
Function: hid_t H5FDregister (H5FD_class_t *cls) +
+ +

+

+The driver described by struct cls is registered with the library and an +ID number for the driver is returned. +

+ +

+

+The H5FD_class_t type is a struct with the following fields: + +

+
+ +
const char *name +
+A pointer to a constant, null-terminated driver name to be used for debugging +purposes. +
size_t fapl_size +
+The size in bytes of the file access mode structure or zero if the driver +supplies a copy function or doesn't define the structure. +
void *(*fapl_copy)(const void *fapl) +
+An optional function which copies a driver-defined file access mode structure. +This field takes precedence over fm_size when both are defined. +
void (*fapl_free)(void *fapl) +
+An optional function to free the driver-defined file access mode structure. If +null, then the library calls the C free function to free the +structure. +
size_t dxpl_size +
+The size in bytes of the data transfer mode structure or zero if the driver +supplies a copy function or doesn't define the structure. +
void *(*dxpl_copy)(const void *dxpl) +
+An optional function which copies a driver-defined data transfer mode +structure. This field takes precedence over xm_size when both are +defined. +
void (*dxpl_free)(void *dxpl) +
+An optional function to free the driver-defined data transfer mode +structure. If null, then the library calls the C free function to +free the structure. +
H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) +
+The function which opens or creates a new file. +
herr_t (*close)(H5FD_t *file) +
+The function which ends access to a file. +
int (*cmp)(const H5FD_t *f1, const H5FD_t *f2) +
+An optional function to determine whether two open files have the same key. If +this function is not present then the library assumes that two files will +never be the same. +
int (*query)(const H5FD_t *f, unsigned long *flags) +
+An optional function to determine which library optimizations a driver can +support. +
haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hsize_t size) +
+An optional function to allocate space in the file. +
herr_t (*free)(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size) +
+An optional function to free space in the file. +
haddr_t (*get_eoa)(H5FD_t *file) +
+A function to query how much of the format address space has been allocated. +
herr_t (*set_eoa)(H5FD_t *file, haddr_t) +
+A function to set the end of address space. +
haddr_t (*get_eof)(H5FD_t *file) +
+A function to return the current end-of-file marker value. +
herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, void *buffer) +
+A function to read data from a file. +
herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, const void *buffer) +
+A function to write data to a file. +
herr_t (*flush)(H5FD_t *file) +
+A function which flushes cached data to the file. +
H5FD_mem_t fl_map[H5FD_MEM_NTYPES] +
+An array which maps a file allocation request type to a free list. +
+ +

+Example: The sec2 driver would be registered as: + +

+ +
+static const H5FD_class_t H5FD_sec2_g = {
+    "sec2",                                     /*name                  */
+    MAXADDR,                                    /*maxaddr               */
+    NULL,                                       /*sb_size               */
+    NULL,                                       /*sb_encode             */
+    NULL,                                       /*sb_decode             */
+    0,                                          /*fapl_size             */
+    NULL,                                       /*fapl_get              */
+    NULL,                                       /*fapl_copy             */
+    NULL,                                       /*fapl_free             */
+    0,                                          /*dxpl_size             */
+    NULL,                                       /*dxpl_copy             */
+    NULL,                                       /*dxpl_free             */
+    H5FD_sec2_open,                             /*open                  */
+    H5FD_sec2_close,                            /*close                 */
+    H5FD_sec2_cmp,                              /*cmp                   */
+    H5FD_sec2_query,                            /*query                 */
+    NULL,                                       /*alloc                 */
+    NULL,                                       /*free                  */
+    H5FD_sec2_get_eoa,                          /*get_eoa               */
+    H5FD_sec2_set_eoa,                          /*set_eoa               */
+    H5FD_sec2_get_eof,                          /*get_eof               */
+    H5FD_sec2_read,                             /*read                  */
+    H5FD_sec2_write,                            /*write                 */
+    H5FD_sec2_flush,                            /*flush                 */
+    H5FD_FLMAP_SINGLE,                          /*fl_map                */
+};
+
+hid_t
+H5FD_sec2_init(void)
+{
+    if (!H5FD_SEC2_g) {
+        H5FD_SEC2_g = H5FDregister(&H5FD_sec2_g);
+    }
+    return H5FD_SEC2_g;
+}
+
+ +

+A driver can be removed from the library by unregistering it + +

+

+

+
Function: herr_t H5Dunregister (hid_t driver) +
+Where driver is the ID number returned when the driver was registered. +
+ +

+

+Unregistering a driver makes it unusable for creating new file access or data +transfer property lists but doesn't affect any property lists or files that +already use that driver. + +

+ + + + +

Programming Note +for C++ Developers Using C Functions

+ +

If a C routine that takes a function pointer as an argument is +called from within C++ code, the C routine should be returned from +normally.

+ +

Examples of this kind of routine include callbacks such as +H5Pset_elink_cb and H5Pset_type_conv_cb +and functions such as H5Tconvert and +H5Ewalk2.

+ +

Exiting the routine in its normal fashion allows the HDF5 C +Library to clean up its work properly. In other words, if the C++ +application jumps out of the routine back to the C++ +“catch” statement, the library is not given the +opportunity to close any temporary data structures that were set +up when the routine was called. The C++ application should save +some state as the routine is started so that any problem that +occurs might be diagnosed.

+ + + + + + + +

Querying Driver Information

+ +

+

+
Function: void * H5Pget_driver_data (hid_t fapl) +
+
Function: void * H5Pget_driver_data (hid_t fxpl) +
+ +

+

+This function is intended to be used by driver functions, not applications. +It returns a pointer directly into the file access property list +fapl which is a copy of the driver's file access mode originally +provided to the H5Pset_driver function. If its argument is a data +transfer property list fxpl then it returns a pointer to the +driver-specific data transfer information instead. +

+ +

+ + + +

Miscellaneous

+ +

+The various private H5F_low_* functions will be replaced by public +H5FD* functions so they can be called from drivers. + +

+

+All private functions H5F_addr_* which operate on addresses will be +renamed as public functions by removing the first underscore so they can be +called by drivers. + +

+

+The haddr_t address data type will be passed by value throughout the +library. The original intent was that this type would eventually be a union of +file address types for the various drivers and may become quite large, but +that was back when drivers were part of HDF5. It will become an alias for an +unsigned integer type (32 or 64 bits depending on how the library was +configured). + +

+

+The various H5F*.c driver files will be renamed H5FD*.c and each +will have a corresponding header file. All driver functions except the +initializer and API will be declared static. + +

+

+This documentation didn't cover optimization functions which would be useful +to drivers like MPI-IO. Some drivers may be able to perform data pipeline +operations more efficiently than HDF5 and need to be given a chance to +override those parts of the pipeline. The pipeline would be designed to call +various H5FD optimization functions at various points which return one of +three values: the operation is not implemented by the driver, the operation is +implemented but failed in a non-recoverable manner, the operation is +implemented and succeeded. + +

+

+Various parts of HDF5 check the only the top-level file driver and do +something special if it is the MPI-IO driver. However, we might want to be +able to put the MPI-IO driver under other drivers such as the raw part of a +split driver or under a debug driver whose sole purpose is to accumulate +statistics as it passes all requests through to the MPI-IO driver. Therefore +we will probably need a function which takes a format address and or object +type and returns the driver which would have been used at the lowest level to +process the request. + +

+ +


+

Footnotes

+

(1)

+

The driver name is by convention and might +not apply to drivers which are not distributed with HDF5. +

(2)

+

The access method also indicates how to translate +the storage name to a storage server such as a file, network protocol, or +memory. +

(3)

+

The term +"file access property list" is a misnomer since storage isn't +required to be a file. +

(4)

+

This +function is overloaded to operate on data transfer property lists also, as +described below. +

(5)

+

Read-only access is only appropriate when opening an existing +file. +

(6)

+

For instance, writing data to one handle will cause +the data to be immediately visible on the other handle. +

(7)

+

The ordering is +arbitrary as long as it's consistent within a particular file driver. +

(8)

+

File access modes do not describe data, but rather +describe how the HDF5 format address space is mapped to the underlying +file(s). Thus, in general the mapping must be known before the file superblock +can be read. However, the user usually knows enough about the mapping for the +superblock to be readable and once the superblock is read the library can fill +in the missing parts of the mapping. +


+ + + + + diff --git a/doxygen/hdf5_footer.html b/doxygen/hdf5_footer.html new file mode 100644 index 00000000000..520f3f57291 --- /dev/null +++ b/doxygen/hdf5_footer.html @@ -0,0 +1,21 @@ + + +

+ + + + + + + diff --git a/doxygen/hdf5_header.html b/doxygen/hdf5_header.html new file mode 100644 index 00000000000..4a575d6e4e0 --- /dev/null +++ b/doxygen/hdf5_header.html @@ -0,0 +1,61 @@ + + + + + + + +$projectname: $title +$title + + + +$treeview +$search +$mathjax + + + + + + + + +
Please, help us to better know about our user community by answering the following short survey: https://www.hdfgroup.org/
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+
$projectname +  $projectnumber +
+
$projectbrief
+
+
$projectbrief
+
$searchbox
+
+ + diff --git a/doxygen/hdf5_navtree_hacks.js b/doxygen/hdf5_navtree_hacks.js new file mode 100644 index 00000000000..942970cff3b --- /dev/null +++ b/doxygen/hdf5_navtree_hacks.js @@ -0,0 +1,246 @@ + +// generate a table of contents in the side-nav based on the h1/h2 tags of the current page. +function generate_autotoc() { + var headers = $("h1, h2"); + if(headers.length > 1) { + var toc = $("#side-nav").append(''); + toc = $("#nav-toc"); + var footer = $("#nav-path"); + var footerHeight = footer.height(); + toc = toc.append('
    '); + toc = toc.find('ul'); + var indices = new Array(); + indices[0] = 0; + indices[1] = 0; + + var h1counts = $("h1").length; + headers.each(function(i) { + var current = $(this); + var levelTag = current[0].tagName.charAt(1); + if(h1counts==0) + levelTag--; + var cur_id = current.attr("id"); + + indices[levelTag-1]+=1; + var prefix = indices[0]; + if (levelTag >1) { + prefix+="."+indices[1]; + } + + // Uncomment to add number prefixes + // current.html(prefix + " " + current.html()); + for(var l = levelTag; l < 2; ++l){ + indices[l] = 0; + } + + if(cur_id == undefined) { + current.attr('id', 'title' + i); + current.addClass('anchor'); + toc.append("
  • " + current.text() + "
  • "); + } else { + toc.append("
  • " + current.text() + "
  • "); + } + }); + resizeHeight(); + } +} + + +var global_navtree_object; + +// Overloaded to remove links to sections/subsections +function getNode(o, po) +{ + po.childrenVisited = true; + var l = po.childrenData.length-1; + for (var i in po.childrenData) { + var nodeData = po.childrenData[i]; + if((!nodeData[1]) || (nodeData[1].indexOf('#')==-1)) // <- we added this line + po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2], i==l); + } +} + +// Overloaded to adjust the size of the navtree wrt the toc +function resizeHeight() +{ + var header = $("#top"); + var sidenav = $("#side-nav"); + var content = $("#doc-content"); + var navtree = $("#nav-tree"); + var footer = $("#nav-path"); + var toc = $("#nav-toc"); + + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var tocHeight = toc.height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:(windowHeight-tocHeight) + "px"}); + sidenav.css({height:windowHeight + "px"}); +} + +// Overloaded to save the root node into global_navtree_object +function initNavTree(toroot,relpath) +{ + var o = new Object(); + global_navtree_object = o; // <- we added this line + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("img"); + o.node.plus_img.src = relpath+"ftv2pnode.png"; + o.node.plus_img.width = 16; + o.node.plus_img.height = 22; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + navTo(o,toroot,window.location.hash,relpath); + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath($(location).attr('pathname'))+':'+ + $(location).attr('hash').substring(1); + a=$('.item a[class$="'+clslink+'"]'); + } + if (a==null || !$(a).parent().parent().hasClass('selected')){ + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + } + var link=stripPath2($(location).attr('pathname')); + navTo(o,link,$(location).attr('hash'),relpath); + } else if (!animationInProgress) { + $('#doc-content').scrollTop(0); + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + navTo(o,toroot,window.location.hash,relpath); + } + }) + + $(window).on("load", showRoot); +} + +// return false if the the node has no children at all, or has only section/subsection children +function checkChildrenData(node) { + if (!(typeof(node.childrenData)==='string')) { + for (var i in node.childrenData) { + var url = node.childrenData[i][1]; + if(url.indexOf("#")==-1) + return true; + } + return false; + } + return (node.childrenData); +} + +// Modified to: +// 1 - remove the root node +// 2 - remove the section/subsection children +function createIndent(o,domNode,node,level) +{ + var level=-2; // <- we replaced level=-1 by level=-2 + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (checkChildrenData(node)) { // <- we modified this line to use checkChildrenData(node) instead of node.childrenData + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, false); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +// Overloaded to automatically expand the selected node +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + $('#nav-sync').css('top','30px'); + } else { + $('#nav-sync').css('top','5px'); + } + expandNode(global_navtree_object, n, true, true); // <- we added this line + showRoot(); +} + + +$(document).ready(function() { + + generate_autotoc(); + + (function (){ // wait until the first "selected" element has been created + try { + + // this line will triger an exception if there is no #selected element, i.e., before the tree structure is complete. + document.getElementById("selected").className = "item selected"; + + // ok, the default tree has been created, we can keep going... + + // expand the "Chapters" node + if(window.location.href.indexOf('unsupported')==-1) + expandNode(global_navtree_object, global_navtree_object.node.children[0].children[2], true, true); + else + expandNode(global_navtree_object, global_navtree_object.node.children[0].children[1], true, true); + + // Hide the root node "HDF5" + $(document.getElementsByClassName('index.html')[0]).parent().parent().css({display:"none"}); + + } catch (err) { + setTimeout(arguments.callee, 10); + } + })(); + + $(window).on("load", resizeHeight); +}); diff --git a/doxygen/hdf5doxy.css b/doxygen/hdf5doxy.css new file mode 100644 index 00000000000..8c0386005d5 --- /dev/null +++ b/doxygen/hdf5doxy.css @@ -0,0 +1,251 @@ + +/******** HDF5 specific CSS code ************/ + +/**** Styles removing elements ****/ + +/* remove the "modules|classes" link for module pages (they are already in the TOC) */ +div.summary { + display:none; +} + +/* remove */ +div.contents hr { + display:none; +} + +/**** ****/ + +p, dl.warning, dl.attention, dl.note +{ + max-width:60em; + text-align:justify; +} + +li { + max-width:55em; + text-align:justify; +} + +img { + border: 0; +} + +div.fragment { + display:table; /* this allows the element to be larger than its parent */ + padding: 0pt; +} +pre.fragment { + border: 1px solid #cccccc; + + margin: 2px 0px 2px 0px; + padding: 3px 5px 3px 5px; +} + +/* Common style for all HDF5's tables */ + +table.example, table.manual, table.manual-vl, table.manual-hl { + max-width:100%; + border-collapse: collapse; + border-style: solid; + border-width: 1px; + border-color: #cccccc; + font-size: 1em; + + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +table.example th, table.manual th, table.manual-vl th, table.manual-hl th { + padding: 0.5em 0.5em 0.5em 0.5em; + text-align: left; + padding-right: 1em; + color: #555555; + background-color: #F4F4E5; + + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.3,#FFFFFF), color-stop(0.30,#FFFFFF), color-stop(0.98,#F4F4E5), to(#ECECDE)); + background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 30%, #F4F4E5 98%, #ECECDE); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#F4F4E5'); +} + +table.example td, table.manual td, table.manual-vl td, table.manual-hl td { + vertical-align:top; + border-width: 1px; + border-color: #cccccc; +} + +/* header of headers */ +table th.meta { + text-align:center; + font-size: 1.2em; + background-color:#FFFFFF; +} + +/* intermediate header */ +table th.inter { + text-align:left; + background-color:#FFFFFF; + background-image:none; + border-style:solid solid solid solid; + border-width: 1px; + border-color: #cccccc; +} + +/** class for example / output tables **/ + +table.example { +} + +table.example th { +} + +table.example td { + padding: 0.5em 0.5em 0.5em 0.5em; + vertical-align:top; +} + +/* standard class for the manual */ + +table.manual, table.manual-vl, table.manual-hl { + padding: 0.2em 0em 0.5em 0em; +} + +table.manual th, table.manual-vl th, table.manual-hl th { + margin: 0em 0em 0.3em 0em; +} + +table.manual td, table.manual-vl td, table.manual-hl td { + padding: 0.3em 0.5em 0.3em 0.5em; + vertical-align:top; + border-width: 1px; +} + +table.manual td.alt, table.manual tr.alt, table.manual-vl td.alt, table.manual-vl tr.alt { + background-color: #F4F4E5; +} + +table.manual-vl th, table.manual-vl td, table.manual-vl td.alt { + border-color: #cccccc; + border-width: 1px; + border-style: none solid none solid; +} + +table.manual-vl th.inter { + border-style: solid solid solid solid; +} + +table.manual-hl td { + border-color: #cccccc; + border-width: 1px; + border-style: solid none solid none; +} + +table td.code { + font-family: monospace; +} + +h2 { + margin-top:2em; + border-style: none none solid none; + border-width: 1px; + border-color: #cccccc; +} + +/**** Table of content in the side-nav ****/ + + +div.toc { + margin:0; + padding: 0.3em 0 0 0; + width:100%; + float:none; + position:absolute; + bottom:0; + border-radius:0px; + border-style: solid none none none; + max-height:50%; + overflow-y: scroll; +} + +div.toc h3 { + margin-left: 0.5em; + margin-bottom: 0.2em; +} + +div.toc ul { + margin: 0.2em 0 0.4em 0.5em; +} + +span.cpp11,span.cpp14,span.cpp17 { + color: #119911; + font-weight: bold; +} + +.newin3x { + color: #a37c1a; + font-weight: bold; +} + +div.warningbox { + max-width:60em; + border-style: solid solid solid solid; + border-color: red; + border-width: 3px; +} + +/**** old HDF5's styles ****/ + + +table.tutorial_code td { + border-color: transparent; /* required for Firefox */ + padding: 3pt 5pt 3pt 5pt; + vertical-align: top; +} + + +/* Whenever doxygen meets a '\n' or a '
    ', it will put + * the text containing the character into a

    . + * This little hack together with table.tutorial_code td.note + * aims at fixing this issue. */ +table.tutorial_code td.note p.starttd { + margin: 0px; + border: none; + padding: 0px; +} + +div.eimainmenu { + text-align: center; +} + +/* center version number on main page */ +h3.version { + text-align: center; +} + + +td.width20em p.endtd { + width: 20em; +} + +/* needed for huge screens */ +.ui-resizable-e { + background-repeat: repeat-y; +} + +/* Style external links -- nav-tree is different */ + +#nav-tree .label a { + padding:2px 16px 2px 2px; +} + +a { + outline: none; + text-decoration: none; + padding: 2px 1px 0; +} + +a[href*="http"] { + background: url('https://mdn.mozillademos.org/files/12982/external-link-52.png') no-repeat 100% 0; + background-size: 12px 12px; + padding-right: 16px; +} diff --git a/doxygen/hdf5doxy_layout.xml b/doxygen/hdf5doxy_layout.xml new file mode 100644 index 00000000000..7f71c242122 --- /dev/null +++ b/doxygen/hdf5doxy_layout.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doxygen/img/FF-IH_FileGroup.gif b/doxygen/img/FF-IH_FileGroup.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0d76f507140eca293ac455538e3b802fcdcd834 GIT binary patch literal 3407 zcmV-V4Y2Y@Nk%w1VYmRJ0g?Xz|Ns9000960{{R30A^8LW00062EC2ui0Js370RRI3 zRF0|3?GK%pwAzca-n{!?1;9v_=82~2%Ax@X$MQ^v?TzO;`PTjql!v~&a*$&x_^J8@fZDn_c7^KNLd&y?J0W8G zTDtqYhww`4IvXm?BW#=;aggiwOME=sTb&>%JH2eJ3jJD^G-~$HWs_*|9KnYFH#|M0 zF%F@=h`s~{B*jgdNrN0~eLSOs7pEu=Uru?)a%QcXHs9#X^Uh;W5IBFvvqB8)ZW*y9Tb!kAkGl*pLlkycun zWRXTz`6H8CzT{V!e{o5qmu6b9RxRf zQ5UPN9QTAI6sxYg?)2+dAK)4+R>k6_m#fGBqSn+Hd&F_8vdaq6 zthBX4N0+QmAoEjD2hGDwOVs2uF1NUWB(1ik809Sw>vH6cxS_loFTA3~Ky146j^i%9 z3{`7vzw@>uFTLc<^6t6Gs+(>;vLvh!!vXti@4nC4D=@_hhvh57^IR$+;Pk^LyU8)Hurjp6A$yevo$?Wn;pkN3*Aq+%vXo^kQdGQ*Ni8P@72C4Bza4wzYe?0m5VOWx`>av_!@!_o>=U=AA361mru-i z@|>j3H}1~=xxC-6PyYz?m^Y8Rd&UPoeE8yzZ)){&3`PC}0BIUxpu%H8iH>MiHNR~( zQ~s$g@`pe_a2|T+w}&*kU6%;YA&RF^p*H**kb> z1qbfX5W^DU5Md%ZBd!3AL_r}A>o^*msH|KUd4;34z#|VGa7u&{N&BWin+E>ALj`k~+1|DS zly&WErO;d3zSaW4)op|>aM7zi;U6vkO0G1S%Z7<6*9lvhVlAKO0 zqzB+`owG#yZLoo5*}Mc}4Hbq!uY+w#4+IZWyn(V5ATko|};IU8P6Q9=jNSYt!+L=P=~Orfr1Q0t!}=Y~)KI z6=2B|a*lb7QM9XYI8-1Nqs;-dg6cOzlqVnQTEWwziuMIBci7+QgQcu3c)< zO|!Xflhqoy!#(bA!@Jk+?sm3aTB~_L4P#=;ce$F?8!ncW z5e{m8&=6kN2;Q{g9q_*KY~dOQ>A7cmaCvt;A!yzdZ5J#5+IJ9>?rp7%9D}bPgbgcHhS+_M0yFgr)(Cdlw=0i z{zMF}y$rwNHJ{M{_U1kECIAiTUylL;HI?e-s*mq0uM_dAUPnLx`*)@Lyn0?O! zfd$xqlb}455rGYu3lvy^&trh`Ks_JGC>N+%fiMUbD1q%|Rw%duD#(E%2nZ=SVJ7H+ zKmi#gD1qVNOgWf6AqXFd(1Jf`gB=JhLx>14_e)7}gg%IZLUe%UGz0I4gfqAt_2dB~ zn0|NzUP%}oT$qJk_=Q@~g)T@PWLSnhcpY|u7-qPJLIVSC_=aN;hgJw4pcVsmc!#i3 zhd5{+eAtG5_=mibhk`hWRYQVU_#US)g+eGFh?t0A_=v?5hD}%>lvs(1h#!?91CH1q zEt7_l_=y|;(}$OkAfyJJWjN{abfQXKnsE+ICgtFp}>Bxxj$c}`_9_O?oxj1;b*l%HD9x?P?_~HpDfr;o; zDVL%qI|3JZX(<4ydkX|#^th5bSp_rMA5WJm zp_J$U*d0yjjZFDum4ItbDV2WX2vr%C*U@7yHxcvINBu~LNjWjd);aEQc2>!iW$83~ zgbT=g87t4S(t<=mor9{KPHEGIhTSK zbE{PUC4k7ML?=bX$o|DA;pL>6+K`o6?h<$T^s|IcyKuoUaL)9ypm* zRhj&9F#5(4%H@-f(Utf!FywM}lS7`6_#5B3o4fftsQEPJ$s6AZo1{Z#v`IL_nU@kE lHxeijOMNM6oLHJpW{AfLpq}`jMYf#HBa}dSDlt$106X7}i9G-S literal 0 HcmV?d00001 diff --git a/doxygen/img/FF-IH_FileObject.gif b/doxygen/img/FF-IH_FileObject.gif new file mode 100644 index 0000000000000000000000000000000000000000..8eba623b1d3050598551eb322e95cf9081e08fc5 GIT binary patch literal 2136 zcmV-e2&eZ)Nk%w1VdVhi0FnOy|Ns9000960{{R30A^8LW00062EC2ui0ObJW06+r& zl#i*)?GK}zwAzcao*|%afC5N*pLvMeigoTQs-qcuWoV;#qRO!TVg&%iqVb4KDwoXW zQ73dJS=6d^Bt;I5+hM1;1-QW7Z8_YYrDhig1oUHs>*zElLvn&m2JZ;Sfl#{blGlL_u!%gEWKC|uJV+?T3{s7aS zJc!2wU2h)*4-1}xQWNd{?OeBR5#-g$hmeiBg-W0pgp)8Lg@+6?ITR%^BLs^76)9Z| zr7A6Xl4a3yO1M(xpr# z>1+x$>WO_)t17F>vX#}X4X|b%#Wn28uj-zPjp>!F6tiblrd8`{nvb9a@tGUP7N=c+ zJ~_~H;Vx=kxqzrD*gMo;KfvJvIt-$C@CUe}BrhO2k#Z=>Y1?!;B&HGQ(T?;?p{BVO z>MWk)yiH>HFcH(KJ+5B+B#{~2p>>-XBl?VF*vx9HZYzm(apRWKm?8!p7%zvyq?6nA zyb~bgTgf?youD%J@mETMCqL_+`g-V_zGl*%8B)MNi|%clSl~ALbo*8Ri?0e#1-W9F zHSZ|_V1l~*ryy<2Z8DZ74KDW}gp+|Zp@S8cb|Fd`YPg|r5x(@HURPmQB3dV!^v-3E z^uX9qcQsbji~-fy)_Ezmprc4V?g->mEdsb+kLL)6VCP1e*N{t)O~1{DHL9d`C}AckSW#W}FqK1|1x|C21CdSgBP8o#obBZ=W&J+Lchk z*8->o_L}Q#!T##RrK6AvoNrwJERyUZ%2AOBg~aCJ z>#3P39U&6r>F_S3+oGAztagLF?J7>^>BO@Ih-*&S#jKP$Rdy27ePE8 zMreQqsY5cD`H3@UoPL&o&kaDu90JQNPXzL?5(??AJ%0sFG<(QZDlC>>s*L8#cim~@ z&3bml;LcqIQeT^f;+b`l9sX=}j#clBG+Zu`81^Ldmisl@VVAAe*_5Q6^V)2ufDzqr zlO^{bbgOMQy?BG2_TFFhJ~#ciU+Rl;2!>+-kxs%Q?8HYeq&yFJcN(rWr1D? z+A~z8^HcPZaJFgRo9C1a^^7K;bvibbhVFWe?+jX~>t>EuJLe_}uOtayE}6Q~4ZchK zhiW$OeDKhZYq#_yFV2$nw2?8*@h-er(bc9Bs^I#?%6EiHkl3n2zwXh5yahkr-&gHw1&zwt$D zRdFy_{TR}zHw>tROzab^#+O7-QA&v9d*b;Rbs9|n2+>%r$QB?9RwbK!YKzn>7P3yI zEoKGhUOvm>7@=53Paq34Wf()Mx)nw@s)CAKbVRn$C>k|li;a0SLJ-MVEhNg1h(#!* z`{J0cD6Yeif$QTViHOB{S<;Nx>Y_!gP(?;wF_Emv4XsLrMrW1bRT~hTC@*P6+*}I= zwMyfxfa4YLfbW%+gd}WCNk`tGa+rgRm$xFv%j)?uT!RspQ~0>dX|aV`nT%vKiS?9X z$!l#ugvqn2Nv>|D1XxgNqB(~|lh9?SE2%&Q3s^ZlAOO%`Falu>X%wS+9&iD;3ZFb9 zcB6m(tA)lRMvNk`o%s=zgIoKTJ!=Ldi!q@8IsF@nNNiJ4oP08)ep!V?TiGy7FpAC7J{ei^XWAXXVj!B zb*cR$=twE`)Dik`iOFjjnPfz#fT~c38}vz5A)~XAU3G^JY#`8_Cc6t_HLOn)s$l-N zwXIIAo+^CVR^etfr|NT|AJku-T9hA?;Z3&Lo;%Qam^nyta)gDU zpH7%hn`Hy5`IPEq7)v>xK(u#-I^hj%Q8wsNWwaFh5@6MeTF@%)wSU4{L|@0+1*Vp% z`Pl6Sg=$%i0N1T;yPQ>_SzO1x4Y`v4``mF6*<9m37mmsGq28EVH|I`wl+ji0a-o}D z%H|cjfRpa^$cwbcfw#Qg9q)S6d)@cut#If?5q;&W-R;6MyzO-_b-Qcb`2Lr_o73BH z&DppD^Y${DQ}BY@c`*Avc%3ql@PuWW3rJmqv zZpBbnTw86R!>f<^-Hc)8*{ZB`dwtp~S>rmuvW^z5v?Jj2ObcWi<4}M?&aqT>oS@*Q z>BHTL-hrWfFe*Pv%ckQGmbv^L$buOrM;^0}3TtM!d^ycwW^)>@%tS38aUpAlv-j3J zV)Eu0&kvq6#;ELPngUwSeI|4%Z|y8xL-RJ!;u$ob7tH9*$XU@$jdVyIJ>UyldZQoS O^l>^3=MpBM002A2s2P9& literal 0 HcmV?d00001 diff --git a/doxygen/img/FileFormatSpecChunkDiagram.jpg b/doxygen/img/FileFormatSpecChunkDiagram.jpg new file mode 100644 index 0000000000000000000000000000000000000000..03fd90aa06a229712d2e2872b17304432aa18716 GIT binary patch literal 29237 zcmeFZ2Ut|gvM;{K85GGNphSt1b5yeAq#z(ka?S`2K|pd6P!vI;q#@^=gGf$-WF&(# zNEk`;7CRmHKKJZ<&%68G_y2!ykKb|@y?S+5RabXc{i=G9)5t~Oin6?tJb;3N0z3l$ z0m!8*J96GOj{!hc6<`AZ02@F@5d%=cJ3R0YY@AclKU48>(0B~h+iw3{~ z%kaU!CBX}z*#iH=zP$VU^S1>4mcZW<_*(*hOWmjrj5xHP ztO*j(YRHa5|LwjuA^xX(G!Y&ENJ#j{{XZ-V?3b6)``fbke^H12=J{_4{4IgMCGfWd z{+7T$B*1%{M^N-OpXhB7dLBMeULjFl5#T>61JMk?6mSLX0D3?U@C5H2flFfqxrBG! z+TGn*l$+bpjmy-+$;^_=+{uC4+titxhwC;sATH(YY-(<2=}vEEX=URm!Sc1Cg@xY6 zLV`tKK=rn&^BqfT8%1ANOKo2@9dlnha}f&`DMg!C`$tiAf-DG0D#m>P_MbFL0&Bn{Z#?E%x2nrT9HZBe>2_7B^8w~{w z+rRxmwgOkNQ7BL`(NJyzs8>gd{9u)&@nKvuyJtlzzS7Y z08|t-G*omn3=DKIZi(U#J_pdRVi4cpk-@yCX^M5zg@iXS{v9@hY*`zr)(DJ|&&)Ll z2bYYTf|81fnT7Qh8^3^{kg$m8ox5`K3W`d~+B&*=`u86gm|Ivrwz9Udb#wRd^z!!c z4Sp698umOqA|dfbQgX`6SE-p<**Up+@AC`FD=Mq1YijH2+dDeDx_f&2`bWpcCnl$+ zKg}#HudIGqTi@8+g71GjI6OK=d_TG53k5*?nXTVA`vYHBLB3GY(b3ScF8M-1^#U)n ztLPXvcrb}&G_g!wuHEDf#3qrAe^=Iq!@#EnBQ$ zjj@05H3Q(Ip@4&jb`_8UPUIt4Gf;oM3T>&PlM~IE_VRt4EN#fd`}QpFuiSfsUvUMC zk*K?9ifOrI-g~w!ZU_m`?mls09vjIq^tyG}GoVmAWD9H-l{k2?3zzV3zjWNqH5wU0 z4;<-vZ`wvG;Yy26Yn-#ZaZ{r@-mcu|#?uW>e0652-7FEw)hQE&yQkR~ht6A5kC6b7 z8NvG7mHUCiS$2P5o5m&I%1am*i!pIpyD%A%n0=?{Olo4OK6OpltTOd+3{I4p{au6t zLqZ*We0)Nd2qmT!*Zpc8ef|Vd?;NE}B~y(a0yGOslr*ZmJJ9M0);?W4V;6l3Q}bAj7Y zljqu>FDbeaLZT^+ad~M@cr>xgRvSh;X;+Lr@|rH6f5^f1F=~{QgSFnqW2G(5oycm5&Miflnc=sJf2 zio%T;X00#!Y;1cy*>Y^E#4312@%5n!cj8(P=#NRZdSKE0MhGE=RHh`|qGdqkn*3*0 zI*$N`ygUhCy)GN356n@^-!oro%8@etB$Z#K^B;U;?=eKD4U)<*p6Zi3!A&|+l1Dzz z$UxQ63ur~mhM}K~)Mc?_(VtA2_<%aihXkesFLXbiaU+2Q)g`A>3_~QaQ6_x_3A7Im zBZ2h~opcELMkKJJ1NlRN?zE;f4djetm*~Q;Q3eSF;SF5~=m^A8BD9Sw3?0<(!AZht zA~~FBBOxU5!W(@z=`9=;`{SGyH&ne2G_WvoycgQ*ncr3$JWg50ex%1CGhC9E_VUZC zS6LhbN_}QZEct~ku!>5l@B4793v6yF#Dph_1{NI>z!STJ1k$;$Ko*0(A%SSke=5;8 zl>=OaAY|eq<~E!YbIo=5SMq%r6Yn(0X^17514PBjEhPNp(tTDX<)yt0GL7`Hr-y2Y z3M9Z7)}K&1gb|EPa%1f5QGztdrRAv;2s1`m|7%YiS$h)m7&w`c87p ziF&3_Y-8AFmxaQLcFn45#?GYU+9PS~&VzlOGali;JZCfcL!%A2w`%H^Y2vB;7t^2NE!K5JLjW%Y_g;B(R$3ZFte9hXhVIG|;7fKSXrD|MNc{ zF+Hw|Wo|6HnUJc(^RP&=tx2JXTg4m#DtfwRc=(;2V3AACX zBLS+ce=32tM*z!?7aZQM-J^zu4gRhaH?;PZn8Q3HGQ1eO0Xl=Er>xdofeAwm<*&ApgOT$NrOc{tJE0zu-U^4?jk1RV!;L5P4-kY|mzNU;qqm-<-TN?=~dxaO%4T7W@CM zC}f_%@j6mNo*n6@dOc^Xsg2G|k}7qQ|6&@%%h0=c1f7piWiDzznxN6G>2xA`Fw^DW zl!pks5ke+Bb&7egB;88MbE5N4tA)1XN$Koemp{t=KhRNXkZ|>mLKl4Ej$%2+FUd?P zcN^|7u%)oo#U@rMwXR1r9gaH>q7!Kss&Eb5otx&?^}4%$0;}~mZ)bCntkgzk&8Y!sxYu~U?irP?s_-Z`z$zy z()>nPEhAOMd+!gbW1RL-F3u`_mFdRmXH=>KMOiV|HF53?$+vB98jfpV668fy&dzb| zUr;;fnpOb4<(oo0y`MJADAAxLI4o|j1mR#+8H_iY=5A`tsJJ;5)X(2# ziZa~P=OaZYq`65P_BJ|r_a_=kqWEWi^HMWLvthNQO+Q-( zkL;Q`!{nMyX+#|^3f-&M_N?v6c!%2wg{qG=`_M5c&4UA63=i9EMZ3a6B$;gM!=7`Q zS5&r)a!yX##7x95`_yzkJ74d7E*qofjhU;qFcmjBbg~uGEOzRk-LVZZWlf#jnjH+4 z85v2TzmPAzAV&gy%&?mCpkgF&a6hYc#$z%OR;XA$&fpC-8+)Nd9mQ_}^^Bj6T7hLP zLCzAK@F3G{3rIjNVpQoCf4JdwT@p>L+dr6lXmNkC>9D{4lZULRbAQnHB^i^MRQF#wd3|_jCVQiWv=m2Jwodc)@7-7>oJ&z zdUc-|t(9fW&e{xrAI;4(7voy2Rou&pA5^+ds??($BLa;Gz-7(+>AC^hO0kqkVEZ+M zZS4;#15NmLA#Q~Ppblq+@d(TO`#rF{_D!bUdeKe2#X{wb;4iVhz%FY+`b@po84{R5 z0t;WjEljG){p)umP=y3qK3wplI7Z~37v@2R&P&cOOyF6k`f8vxbZT;X*0Lf^w()Ph zTC#CUEr8f= zE`Uat9TI?~oLQsJk!t_gzrqm|R6ePrmgDb`?f}ja-QSb`@4PHx^5>R^o>iBG>>vcQ zgGR_%ab0f=me0xv>V4O&fYnlRjyYX>I$m~4^~QFNVNfw!5K*$k23lq2AIQI$7;9O- zn7Tj$+=yX}dbYeD$&cMN61#xxLcZ>UHYQ;BpS@eKPsVd{!!M#eh^GmBPWS0pGHHt}75bJVKYzvg2mN zbh&B>%rVIB^Jc~r^#D2$`|8<--K!4WZjELE%$e^DXY~g^yfnP-LeHP>Sh-NMtFd?R z4bvLcmkqP2>Yh_wh}#%1in8Nw(4NpwFKM8U>##quUAg6kM`VMNO+FcN6!~7o*C&`C zWzg^LTSEx`OjBdYwd>|;vb|kO+CEnpVmgV5ChH5<#Z93dIo3y`-N`9VTv=8?gc-%t z{WX3Ltb)DIL}nQ7?mxMfnsR2|iCr@aA!Hv;jaNCQj(KJcX5V2drKRbA(UOTG+scM+^emt9eb4Uz@kQLunUFp?P}`5 zham(!{i3dBAL{h`-3W-hAe9P$Y-o-`V5HWdrKrA0cS7QxeuiPNy^%q9=P!C{SCZK{ zwQ~G?9k$+nU9M<#e~)|4KEACDJDBj{>V~rb zP~p>0^g0U_3jqgTiTotWrYtI>tNiu&_&(R8ZeEpQyS0-IsEH;H$wWELXtx@83_UaH zCL$#EadA)#NG# z%RfUy0XlvDI~Dk1QFs- zGV)mT!CTnSf{2`=EvZjb1Q$79d=|{B6Cm84bEhQLe8EvG&|88D4OFTPH$41}dt^rT zs#Fb@IE!`}cvaaCG^Aeb0IP2?To&*oSry=tJvt4+$_}FJ)PcB8=>xp^l=$)^m8Wip zCD*2IB4Xh^_ZlXv6vM*KSWMAtJYnUf532Jm>1ilmMiH!Ii_8Yc`KEsox{!0a0-4%@ zoM7l^H`dj2kH6x7;jnNZv9~pew=Gi4ee*%_dUR$o3#Gmu1%0e6Av@?F{%%rb^TqwH zL~2PJfprmbodpS?=+&Qqrq+M!al0fxg06#>2KFUwF!qP60#=TXnO3SP#HC9UwyV z-+G)Tw$u{ro+e9u&etL8Q2d#o{#Is*Ie?a+ z{zyb1$Cwj-+9t^h|1uep>+RS%lq36*^K-g&IBKt=hH?d}Cv>IzDLmh6geyyL?xkqT zu3cW2-)6SA+S=YYO0{9(L}1_77dp;TUrYKMOu|fP&xBTHH!AB)Qxqmv>6ofI!eX=& z_j~BO)d1le>f%2%t#f74HiiJX+u1#5UUh+QCA*wU(R}SQ z7h%gLM0Zm?-}!Jvv({(?W=9p`NYiyCuO2TRZtF)`Bu*=daPnJ?QN^TL6>fgJZ<}0Z zG@~Z?0llB{p_MTG;pW5RGd3iE>M)B0u%CuUnO}&T53NUR@Hf2Tc7Gz4pJI{Nnjjj} z^@3Q+ph`72?Pccoq>=u-cJLL2G;q%Q9F|9cxQseNw;64r;o{0Uxzyq6%d;{gBa%?p zXjo0FQxrl_jdn?O>j!yv(`^PX_;p?0Eu5?h?8=z5i&J z%n@_LRvSDy)&puCXE43(3RLo*DO143{n{QP!d&MY9cn=r}JJ)wu-T$Wx(+i8t?687+Er61W8=i$OLQT*zC z_NLJOXaVL?ZONkT(s5Dop2U*Lo61)lU~BQCSWHUq&xF`pqF;d81ye4dM+Yu;lEoJ z*&sCMn7<>CY`+88O)Z$x{yh4vNAdJ?*i>>QI=DEos62P?B zdt?3$^3EL}pAZy?A{cJ@&7s9&g0o-9JyAa;ut`5LB=D#LF%PrtJ0tYl#`TRuf==r4*r_imJn zQC1dkZo92eTcY+_An4CnhXj_{>p@K0 z&Macyrpe)@rC?aHUf|NclKgmJw`~t6_!e#b2&aG zwGG|t-h7VD9R847bFD{^!HiehG;w^%Eut*bj|9FREB=764j!h#?&P>geTP?xF~dPj z*X;bWwND?G2v&@j{-}<2Oti!fOG#4qO$7(Xd}8zn#`a7u)b}(1h6^36#!m_akZCUg zWF|1`chzVD1fs!c$Q%p_oFRU~^;4wI5BuFOjzqO-Q&Uau~#sGMX-I#j_VaLZ9A zHg(K0PqswMII}eYN9@{xgwRq?SP_(?swa6tEl9}PJu>`CTma4Odsp|^^ZtA(u=>Bp zUDu4C&Txs-qpFAxMh{rx&9#}MoeOY;Da~G@z0GY=EfivbkWIy!M4L+z+w(`JJW+WC%3XJe!SG!1XCu~?k0^ea^oC${uf{56ApFv3e z$Em>jf4&+K3ZiGFn7gx?wz8_Udg7+{#q{dj=9qN0f6y0iu8eC5!Uui3M&~tMEkrrl zZ1#RKaS_5JTweAjA| zys(6EMIn49(j!{SX`yLQzmKNor%Ic?{!KCIsD?AM@@03332vin+y+2b3DLLk?fjLA zlBV9Q0 z|Hz&RZU;RL3&B=i{Ab)P>vs(e;q2@*l_pmzecZ#Vm?|fq-R>Ro zH3o}v>lS~@^Hj-__g$8DHpPtP38Z-=d*(9TK98lbmhB2M;|4jK*{s>RRAZm>5=yON zc!9CPt@%7Sp5kausMu>&%YotSe$$aX3zYj7sIt!U1wPlYNyot$PraYaD4krQ4q56@ zJWV@soyen$5_I<{ZN4JG3`?5!yZ)}`&XC~`ar}ir^J-0b{@-prbvFktpVcHN& zOm2NDE83vP&~sYS$s3hphj>`e+F4MhdaI4PK7A zD{@hd;x(N_zo31%okVLnVABYxY^Wh}{&l-q_b8$0$gv&DHLwv)F7qKMnc2HJHp%_@ zt`hG3-VGeH;t;L-yW;Lcau11O{A_HT3W;##N;d0BzRiBGNsT@nccHevABV2o>6BDD zy_4Z6@?A#l9J6?QduiOk140PR%IjyYs;~a`E)G?QolB-|RgVQ+XTLMflYvHtZp%d^ zX@0I;t|3Bp{yM6n<=D*%99x(oqkI$>3O-*$;AHt9z}12z=*~SS2epC-*6iPb?9^Q+ z1M@U6yK}jj1JavFbRJUq^_)GT_zw|vUCBRtDt#Fn z_&KWa%QsDI7ajQ=;@Z;g@pJxDZ%3P@+@`V$c*)+hEk14M_bp)#aCOBBnn<{q+B(Q^@?s=)fyDV)%m&vD3;_rjf*txx||R9 z89yx;ppgC~1#`%Q?1TIMurJX$ngwVcTn1YDNKm$Q^b?Rkhs=i50Re~$Va|Y4o>3DC z5MY7m>ad{t8MV#AS-doD)nC}ybudu@oGGAxP^t@>ceU91 zsG3=%WGAO4dUeA6ykH<3)x}v&WapOOb$Foy>}!y_1Jz#7z}xnIb{|>^L-m<~0u%-z zU?o-=I2L8^gDhnn(4AoRA%Wn_1b_r^MuY|rLpG>cE(j{WUMOY|8Duu5Tu>2#jzWfg zIzn))<@?Q8gtY|LMPNB(aTW|stVRHb1%Fjbn@|6278yG&J4I4iMcdm~N=OdKh|i=Y zhP~D)V?%u?zy9n^nXq;M%35OE0##)!A%aDI1iItbx5JTH6TduBd0y0;LCoh&D4ap$ z_CLzee@QlYe=@MA}l$$E;#b2w$}QUMY>+;w4h>kUuE923E1=U)C1NzgmKt z{ShH>+z-oKDVVRbXL}qt>y6bux)gl6qA(4;M#s40Tf0ty#+bUbc%H$}TD%fn`3tvm z|6k@7Grg-x&4ED^#xzmhJ?N)`E*xj!kRZa~)I;dOeedUQpoi*krsc_s(fR)NhylU%&4_nGr;Yk15q1|fwd+x;y;-W6QKy&f@<%}?rIq^aqyvLr8b2$ndpclO*Li!0~R(wV=D zy;6oAd+91|CB~a zqWSQmZu!)o?0fMwwU+U`(CN9)IS~xh)~@nL^V@HhN(<{^#sZa(&}{z!b0s58?Hm_y z#koGBTcojlPS9{WEic|IR20ZV;vR3nv8bsrqMuJ1yIDQU_P1iO&;eFZ`E5Fbjk3H+r-+ zrLX)&`Yi%U^K&xbL$P-Cp`-_*k}lU9%=(cZ|w{@BQK&^dReJ@p+W$^^)v;gW|w3H@F?_l z&RuJgLlk)eJaomj1V$~eQPEaF zhnBKy19(j+Z-hGrJL*LU#?h3n+>kb{Q+{g)%}mtSqw*YYg^kTA!M>^4ouZFHAr)~- z*3WfK#UwYhlr$u8dN*t@g9Sf2RinmWf(;Tl{MeG@_J?dvU8T8dWj#I70@lp9_8;5^ z!aK`DX9;v9kZD1ubIf{G_6zAFlf%9A6YN5@$eW}d_}PzwcnMf3C}?nhL*Rc!;{Rf= zDC}RZGJ0ubciFZm72D7)s5EZh7XCSH``7es@Ec{drIPL}LXYn2JQCQf-)hntyAXc_ zX5-kM74{>6f0@;YKK=)!+{J`6ix(k3z$LXRkmms=)z|hMLMP)#EFOx6QVwDd@mKy5 z*8hzJln-Yzm32+9xgtH!{m+W^)#*1BO) zMK3P6FFR2Cg|R;TI)v0rifZ$>BLb+@t*TK=K9Yv!Qp)=+VJESjtj*L2AN~cxjl>zQ z*FeyNDg_1i>D$WBV+h48rV2mS^d>%)-4*G{Wv6Qk&+S<>y2?+HPa5#2$15x}}OeD>bmL z(dNThYZsPci9)~yzY}zjtf}r4oZTCuB?n>B3qmjzXGLHZL^X6$^Exv+K7g(E_DI1+ z;=X~oCO@}&4U94MgdMNv9Sx+PnV(GAfjQfnTj|7+7vDN)>F~gm<8Z8tVS$;E`_0^N zxs+gW7D$QhgWC^!YUK&>qr7!!SL39pRI{PoiH^N9na%e{p-*|w?CaC@Mm&;-`QIBQ zUnBjT92eZJLDA+z**rA-&fVmtHA$zJVB)aga4<-vS7dq29jdB)i|4jYJ$OA0_x!kVrM){@E$slUpJ6n0)E?;YeM)4lMcjJ5ULHALVWZ* z(7+--0aMu4twO~m^=r=57^P0{YNcr}>nCSlcGD2M`$`INsaGJdkf?)r;pGI%u!jcH zxdysgl>`DFCgHC`zv3Yvl}8kX!6FDL zB3%vU73w7L@v%|zWPStMSH*?)$StK-x+N1yKVn4KvO3k7bK`6M2`8%26u_0v1A zy?u<{X^VN&SW#~ICf@bmbj?UqX#M5KOX=WfUI&9N zE-XlZ5=?mpmQ8dJ$uv9Q!1o`4((JsHW`s64P4~wyTlI1|uK=r3TvW|~Gfm4joj7Lq zf&zwEiAB8Wl{yN{g%-m3oadGxL@VOpj9ym1;4^9>L0Md&bZj(o%a|#7?(WakKk;X@a{gtr-TN1zRd_=g%NB7OH7<+X}{%&0!(t) zMN#%p4>#6e00({Ut-=peUkPMOSP^3>^A$HwjA*~-EBTY9@ofsiKF{9E; zo9VM7IK_oBdK+{SW;z2xTYHg!<}gjblNj$!BY#o`5xQNv=ThdEVfwY;qv!>u}LoPNA=qEq9W(n<0HPm0i5i+LpBq%&Y0je%AH3OSjW(v+r&AAd^kA9CN@P4-l6 zrB14vX@)$C=KFPD`0ixFm?k1%|8^s6EriP6EJq+5hqH2*Vqf%Hfchi1A?5A&8AOs3 z+=o?M9n?&-hn&VU|Eq~DEf?*-{Z z1vomfs_hPqk87oU3<^phRs!D}nph1x$IJ5v-LDO4*5XZgEz^bR%TGFTbM7X4qfod> z{>#%ZBwP?0-ILX33PdmB+tOYd^dnW58(XCpYr4B~n4S6b3cV+0{mi7-nipS4oo-MB z>wDH;jkoni#~E9MCr?oa|FFP$YIo@sihGU>SFiPczZ;@-gcUrR15-Us!Pu1tQSom>Nz{(?ER?pvoBwB^!~qQ@?a=|r^&YZkraTJDQr z5_Nw`W~d{g=xeC6oWrSscMP8QB&(TWWeh)su0}tAR*KrhxAf(>BRy=MsCvX++F@U|#4`W$^c<3k_PFCzyWCOFQpe|wCH_X0o!cp6iSh-$J z@K7sSj&#Q0*cYPsN{CfNa(lIorLh3Te)3gygdCOyds<2^<3!97ucW**#?d_}64|?#Ycpv(|qHK@u zLXkJand`$lD3L+9!M}FAm28Std5h!jV0>??+OtczE>A`ZuNjr zDvDG}Nc*iX?x?o1e)7i)3weU>4<09U@|yQAu1qYLz>K2{RW8bp`Y9LC==kVa4nNv! zzj$bP@8Q}{YgC`wA(=ufQj^3ugtFtVLJ9jJDn+9ylt*~C0Q4pR!@hAq< zosy!VS(!2fhbQ;t>!V*3vO^aKQ+UdIqGF5!G@dwq9j*B-)`619qsZtop%b5;V~*g{ zOE-pbg%=t#+PL_e5_Coq#|6GZp+{B2R4=w0l&*=ZW%8s69FNj}jZp9Q^1L7%y#X54 z0pfBlIXzayp9a1e>?P0#o72t5DE632)4q~(GiZqrFcP$LuY`G)zlN&ec0Ja&bzI0tM36nmBM+@hR`46^5ir;?u25uQm)3lF8)3|+`)5ROKy zRi%^I)>{tnd_sunjZZ4-$tTRHI5U{Pc{fM@JyfJyLBiUE#I|^8YFs_I%A@YV*}J?~ zoM&qf(bmw`9A*ba*JECwj83KdIizr0aI?0Y)~nz_pF6RyQ5iVjx)Bg!28ZtOT3W#Xzy1;BM-0e<^LB4eZ2z)CcW;Ei9hdS9d8Tqc0!=k_Kg@Eo& zZ>DPOPe7cIG7^;XJ7lBN$RZ5L6CG1xuuOk8iT+&6y($Au$uji0{w3B3= zaR2bqyaMJ~oL>}I6wOqbyeQuza;IMA8@^jqjPGzW>x5xP$@_FH+ilm1?|0OB4Zjc6 zVhvyo%+|c|7`o1imQx}CpK2W<@RNbxm^^&FYk-%C+fhDhJ#o9Phk%;q+qMyN>~mTG4(@1dwW&rWA^thbjlQi%*z5OnQ)KSaoKkYmibLWsAxmrRG_PtoMI5Xr9W@= znxy>3Gbj2tKwyJQGXGSMS5^ALu=>*2lM)2;@v}xA%f%tQ2OFXfD?ZpgE@F5Rs^^x> z;i`i&{&u25WB%UJB;OE0V+yYvwP+h9N)EjRYabd*9wY9TJ#q8m4jNUu0FO--=mR~w zd++)vq?)%|#a)8L;HuSg(+Nrsu6vO7cCBzas@O0(0o%PFM(`(JIpuxLuWsg>;^IoU z<%d!t9o0%nYj=-+Nc(gzcsBKp7%qDhgnIkK4NchBPITYzlj)%RnjwArVL4?f*%w2A>Wy*gqw6CP7}ib4zSOd#a&UL0GQovtKH+6KZ&7eC6-@>83I^nYdv$Qy794%jrf^EWj7gZ4z zQ__Jk;lz4vtrhVD1*Vo)PQd{WU!lG^q*gla0^F-sOlTX8R-8~jWZ6BXXuOq0zF+e0 zR9sCcIOzj#GD_%DoIKB#oUc&WnOwe|kXF}wZ$s@7&1A>PZqZrhWkXM2E?0fs z;S^B8De_>qh89~HC3Ns&D$qWoQaceCww>jRAC|oBea&QKsYRW5vzl32Xx3zosj*BD zg-y42kS{7KcsdoH9^EWZg~%(hp2vVuLu^IoQWBOqzB@4EE~$HH)sV;{AhHW%H1K#(9noo{w2j?Z_MYzFR=!@jaOkE?JY!^=1aR$4&(99zci(t_2r;V z#Ny%raqnbWS0X&4(&pzvyhttUhOO%@448vWb7tRkSvp*=r}4mkCv(nrs58OMTspd5 zUsaZ_ku1i=SRr{cXbn7H!tjlAu*h*b4{Edoub=UpCxE7A=)r0FzE;?Z`9?R30sp89o zE#GFwK%YvB64b5g;^mJfYU6Kb#@a*&vxp1g-JCc}<@xmPV*NpHyOF} zH`C%y8Z71VyuQI%^RfWbuibC1L0zq`cQfYF*01yD?(%Iq+wTFpf83_U9B=I7@Z1yJ zG(M@bWbA@^MJqfN2|T^-9e{uMtyl_i2pGe6LngD9X07cX`K%i0t0yI4D&B1f|I{3) zlXw6ooE-NwvrpPvRF{y$=q<#XI5E^)bH+3Js=e<8&UQL`KV!7c-a6)AQx z6j{b1dSI4G(6mJ(;t%RgMzWLh?G#H5a;<5o01f^d3%ALtb*;&Lwy1<>CrQg9mdjEj*glt z{F*PsUII9b_-_CkKk__i(xMTOx(b-GJK0VVGQe`{who%>DQzW6%?~-lmxp1oBvzih z#xo)8KB>x^S+qM9o)B`FWq2t69vp9Sw&|}mq(Z?Q#qQwtnQY*{wMABabft%2h6{b; z3b1Ga?q^k4G5phqCWK6lQ>70uS}I;yqy^|%)J9KWDt>?YUURQKW$8S6@D*&Oqgn`7 zNv=0ze^vF`p~C%E`f~!no&N{7;U{NBUj&Ye%>^RRp?Dv<%7RoyO_@G0+1Cf^Zn^-Rw6dfdq1OM zQ4GQL9kB7xP1P1j0Do^N(F$fD%X4w&ID^l3YvLob>})%o8sm%dqU0zTEt_2zz+-={ zISwm&6gL0{SO(6o*8FeZ&}%Dl&qVXujm-KVSjH$lQ?b9P^^vpZW%E5hqUA)}^=jXk zs@YcD+3up-vVg*pH1Urp!DR^HKRcLyUy?UiwRVJF_3`d5XLpvx=FJ;smgGF3B|uBr zo-a}HR&?_4HylGjgx%qmcF>hL2yPqViI3ZRKLOa6F9%;Q&u1C-ag+-_nC`}5JZ79c z8z94>h;F^bNPDIy70kUjA&!@6@@cv!Z}#)_9S+ZUa|_&FY?%OIU?n4ip#GPG$Y2)! zPg&!)#eMROw&{q(W%6uBe5Sm7-C-RRkAxcJr74Bc66Z4!ZVnRZ9drbSMjedTI&x;S z*scO~EJ8s8&NfLQ$z zPN5W$6PE`OctowSIc<;2k^h4aQ?mRAF^aa!vy73;m^mIf-jAsxDeq|s=9uGMjeSMC z#qY6RrpEv;e2d=_tOGh!5G!-qbSF1c{IVIj=s0%z8<@Z%T1-%Y;Kmml#0bIDM*f8vW%9A=H3}4#;WAidtx&IJhtA0s+%px4$`bsM z&59TC)cAR(t5=7oS4RgW|{drLb~xg8qF%`tBm?_8zwy;8e_ogDJ+tShIcMeQ^MEiu%`D2On+>#|%| z6JD!l`||XrI%i9$gYmq6cuZN|4GXjE{Kn^3d(3b^G*9=pSsX zArEcj$=wJidd@|zRuwa@3PPN_8{Y(3ji&c&2ib?gjPUCw-3E@4E+j&pGeyxHH!TJ0 zRX?_eFb3d6V-xhuiN^@9JwLO|{gCmYu(-N_GxK$yg#+{IJwvqktEyjo=x$SN4`J4T z3EmJzcbl zk$OULT)f4KhNb|2`>J>gb#QQ2FGee;#>hrUa5M1Yb9~59wQV>eF_Zm@eboh_Fzg(R z6H!5{L9F)7Z3Ua(fli|$OsQr3>wMolp2aAXCFn7mXIA+Q&4k-B48XV~0X!yNFe%%H zES0MwN4O@2u`*q`{{C)hi*tWp4H`wC_>=>9j`SFE#r+BUr`^YuQ&ftK*1!A$NpMv% zFNI4RdhkrKtt9W5d&3hEs6&;$Vej3MNPp(F$GY@1!grad)9a@tCz|AdM>B{Is*R(L zhZMzCx}n4G<1I!Vwd99XMf$|=gF_$+hU5brHTVPVVXp|p#O6U8dv*d~!?rwGmzM%MmJf?2_n z-%&6N{!~gmc<57jw@MSEkgYetM(Eb9KENR=!)yDDemQeY+%3m;=7pYMb$z?ats4g5 z&mD#G1gL|*gK}Lg-F5>E)l+v$a*qlCsdub>2eWRq1WAM`*T?W%ra_*pQ5-E{FT7dY z-To-EG(^5(Oa<$HoyjOkUuz^fDW)lO#!!A zoWC^u#muIV5H3jqz|2oCMCZOQypqZQPkzl6%muBUd0!pj#1vooI-bX#@UEOt(yCvp zd5JjHJb0w?oS{4Qan*ayq_pZ{nxdRwBO7wT&DNoXgxgu)3Y_2!atfA$z85-+E7DC2 z-}VcOe(jlQ)NtO=wp=_ON2Y4j(UAo0EuQ={w4OV?@BA!tn}bejt0$fgB>FHBCb}}u z1@=Zh-fukLF`ozZAD@7(+xKzJdpt2Q2Llo1^qklAj7#mermY$&^na zgjYI_Th46jXIRmmBO;e0#pv+2>J2weLJK`y9$gp}`8o`geymf(9+j_sc>Fz(cA_xD zyGLzuJ)(bfNVg`X|Fhg=lAB{>0IyJQAOwF(4%7e>Sb3%TPe1B)?Xu~TZCX(6z~s`h zOHPzZ|JUqZ`>H*AXi$H z+t^=a0*ZjUucL0>&f0il<4n%om-2EiGyh#F!1MXCB`DKPk{2p*OJJS0|KxEy`Mtn- z>Coy3U^ZNo#dhw~?XXD!3%5rBwm&{zbU>PtQ#Ba8_=i#{I z&dluzpOS9w(U%8i223;$i1&XJ#TaoytI3}%;BPGRfGw@_tjo)q8pVy&IRi%T|Q7jI?Xp0Oq? z-f@rXc|Xr?hU$6R!1%Si8+`0nT>nb%MM=-f2j6Vuthy!v zeZK9N?z)w#+g9bin>$g^WcIWv0v^_jIQP1H-B`$$4P-Y`QZ$IycnrH0R8J zmzUf*JXLmj74O-9r=I){^{(%zvb}mGz&(9k`_x04lb!asvdk$uroiys2Dl|+0bgc~Hkpbc9qO3LIm@wd$(=)y?kRi?y9>XEtKV96>yOjL zckdOqbzP1LpXJ)?GfVW5hRTD~SqdW6lN)1!jjreNA~lZLwGY?&9~O9dYwp>zx81X~ z*Yy^g1iHOh_%uA^)=|N39=TQQQMb4JXkP5`A=*82eO}VWm9=ai#ceIsbQs@NtlQMZ z@VwMt`el{fQr+IG>o%%vOfHVj_#S+$i1Fbiqvg#vK2*HY@&wi!w_j}AwPf0@mD_if zxwu@)iwba5c-Nu!RYop?=i@8wDq!lkY?Hd|)#;+#+^r$Mb=1;-`%Nz93n`0zVQ&6g zd-B^*-G7QNzJ~`o%Ff#*7tXQFm+K?2C45?hW7!-toW!Phr_TbT#UxVK(>+cgL1hNhP@lRdu7o<1dELb;p3u9ANW#-KBp_+~%W zH4p82=bfD!%DO}?ll9o-V$M|A306#RkKc`%pS3#sBe(nRJ#DwNeGB6<#Y~Md!aEjB zZk(3U5ctlIwG`NgkbRUdaWuD5Y;y9F_$=}J`CEIZ`D#6Udo?QLuKMiF=_i(Ku->8l SHntbBT@lpv7)Z?i|0Vz?#t9Pu literal 0 HcmV?d00001 diff --git a/doxygen/img/HDFG-logo.png b/doxygen/img/HDFG-logo.png index a2d52a9965acb1d60af250320f57a8c92e2a962a..38300ff964b6ea4d3ca33a8f9e874b4479a54754 100644 GIT binary patch literal 1689 zcmV;K24?w*P)vr(kj-r(1fHEDGvn!Tabv5P!=$S;17ZXLJF8biw1s(5hPJi zDi{+Ikpx1}pcK%62~h}|fQb?nBB-b(%Bu_8$L`MDd(EAl?#o?vrVj%4-lXY|z4zR6 zzd7go&OI{{rG%ju4@m$ZB0!{o;DBDtfe<7pR6wYJPywL=LIrv;0zw9b3nfuX;y8 zmU-;OuYTYFDD0nwT#w5*Xmk*?1u1R^Lb&A*qKy+l>|ns+@}YQZ$pm=Z8F4=)0w6Pn zVg0kT^#9X%HTj4|w5Fa`^!7A2fdf~M*4wQBgesTo@jpU0`+Zi2+j z;sm+2sstP6@kods?mrPg7`|9F1?43JZBYVGFi)mx#9z0ifX^R9K@10Q06wUxz~ai{ zB#FSopMg+{kVdeh@khLU{37mzH0Wm7y8s+qF%gyJ`H)O?N(4Y63}3CQLPhCdTL8pP zP6@#N5CKfmFVZmG^Sr_ z@?k{%;V20bhOg_YP%+{mn*c-^C@BD(dirHJ;7q~B$#&xhz826T`ECaQZZ8njP_z9c z8ZZ14G0!D4H$ycDkq<`AJxp%o{|08LkoZI!BiE(k?ABREdL;#*!6z&IGAnEA#DoVawY zJ6uRVBF#qX7%RE9E!^ZvRu=mXG-R4I!Lpg2- z&TgJ%kgFL1I&R(xf+T8k7v1o?d{BP!sX0{ELqJ`hL(0eG%aY!2?mNRcV9SFE}C{nxDE|R0Hb(q_Y&N? z^LMv_z|DInFT=!9vn^hy_$8F$z?Tg;eg3GW)9^Z?*1HA81!b1zCz}+$4Kj+g4PM;1 zeYMku5*Kn3Tr~Y zU=(eE7SwK^g%AnGMNOnJatWT_#-pHNGCGitXzZ#ZR0x{U~+gy7TG~BMJF^ErUE!n`ee#kdVaC`R%$@QQ9d1;O@uGU_GK2OKTVnr9 z0C+D@2Sd@2QY@Xl5d-=UO{qRT2mnFddkZ3k5Lbcab2g#8WRm5F=x=Mrns;V{(Aefy z^5v?MflOC62Ib_VU~n_!6i(h9s=e}DfNKlZVAVEQbf&}k7YQBdK2^A13AXGr8fKY*Z jNV@mkRzd}Oy9)dZG}SkKfLf$f00000NkvXXu0mjfi4XuM literal 4541 zcmV;u5kl^XP)hx_h@tX+*<^1Wjr*F%bQMA1KE7!$dS1duO&qL5WCWB7d|{G*Q$9 zQ4vAP&fLXBL*fr(6b+3;6N`xkV*&&*BuGHIbAc8p(C+RWbLM=#=ggToGk5N8ckQ{q z*v`!Pc+dO1-|vAy_yr0C3T$W!kPW^1u=qfMKmiCK4onazu)!%1K)k^ZFf2b%Ab>dV zK%l?|r$7Ml20y^C{6K*KV!;D5gM>0-Pyik%AOx~B>O`MnOfje)S586zC>4{TiHjH6 zGdP+Jqcg{0(f%NffY5{wPWh%PerjD}&-!J)KDit@MmCH)(PW(cgm3C85DrApr$0zI zs}}%b;OY)yHl_&@`!F!V^}GhSISij2rSXoY%*;UyNimM=CnXCIpp=@?&Egp&fh31u z5dr8?0CCe}ShM$59mF%c_rJ~F&FJ1ePpsJv8%~6^CI>S>mUh!RY)mnfRPTH>LP)5k zNsTO&CXs?feyp%a;%peDzAf1x#)5=vR%8X(5AopGG!bhHAofvz?VqnYhzkuTXAun3 z6&$NUCcRG0;9b|*k5Udl1zL$xZRMIKJTkR~VP9xU%Ov-iv;~NPnbVG+0I*>ph}W-q zkqJ!GEX2NKKjPYm^D$?L^(f6b;DpMXkk(P=v_z^>%L1&3<1m0Qa7#?tfQHH^#*Vl+ zTLY-b0uX@!rREBa@kX0}ZHba$}iefD56~u}H6EgdiISo|Bs@m?oA0=-9h0R(HVxd5jERE;v zqhlbZKoc2dm%*#HbC1K+{XzN~5I9X+b#fH#QyB&TU!?Lc)?$t0>}x%LBh2X@0x?QS zC;|(6Se*x#rpECg#|^sos|{k6rjyE5xDs^J%2}g(_qY=ZY`9=*;uJ0N3A+UKlt8sBFjQ&^X*nSeTF_Ahd@~cV}2cIHgdzoSvbDIXH?n;-z*!aN(hy}$OH$_ zM@MP=j=D3LjpwhWIl0s1k#Z`lKS&N4XTYtRZS3F70AjV^m>HyhCP3fE=fc?-cpyvT zkJhcTA0^iTg}wGWat#hEAp&SwvCz%65c9NQtItsD70G3Ml(w3tAC@p5^0_gXxwpH3G94vf>jB(aJZli7RhAtJ zvy}EE)0*0{`V#X@K(s7TZ6 zv`%w>kO>u4g6PVP;FHDi8e?8;qKXa69J`SIok6V1Lv_8iE&wwlz*6C;rK4ICRY8L4 z18gf@eTO7~OCa_K^Iri%eqa`c_)Y0L&F9c;D3WSdoS7x7W?)sMIAyf0vJ{oi$R4|_ z4Gv;bfLN8J*2Fk)8E;i~K-UpeSJ2^9zb@=IY1_g|IE2zci=hAZo8u;##iJ3t}^W%7t0$ z6q7)wujoK;N+Y@KM@aJsRfz%|&W7>UlE#)*SV&7vQaf~I%>S3~%e4T74tXj|=gyzh z9^Gx71SrWrGfL)u;W~TUts(%&7l-lYvSla0jtm&aftXj6CdTFMHMQghZiE7~1%pwq zF9I0#nqAhho0X5vK`eATlNLSFGCGa4t1rT7m^cpejUT4D>?$)ES4_$9cvX-qzU4A$ zGmg)9+BvNpBiVbpBuzx&q5_H<3=K3a}$6Y7t{E=UWPKvX(3Sv z&~_;%Y3ewLgBiot`u0I>|H56TFTJt(sLf1OggpDRKi_)FrllA0CJCj3#f7;AdyFpN zXoIP)KBcq$3I5_P#o6>Je- zSRGOS0ty#mzu5>xNrKhsDhdx}3-SBgfEdZ3axZWj1Oq@ktJ3U3+0_-=%nZ_;8Rs~#L@3$0IE?Ps55q{=FZ>IEW-t6s>$>nG)f2uO+@r^XOO2O&Mj3b~lyqDKMz*f(ZVM zK9>#W&h>)0foa?lzs2iaKpfw4+1~)*-Q&#Lb?&-3U8S|`eP>-a?iO?9qy_Rynz+PA zHANlq{0)$k+jPLaD5f|vO5<~Ctcllwz!t3O$Q0SNI3L}oK+N*QR{EmKJ#)ngoVjns z>~0IhuojR>ElJm06Ju3GimXoa=(K%BO_PWoa*RtIQP!rFERFpj z9v3N|?>d5bY=3xlK|KElpyUdnAeF1zq{xPSQ>wXknbWdCMOLuX^dZm0^EVLMyUnn$C%g;n?OcLUPx@o)k4Xe*Hc;js)AmPLEHs!Y%Z7SJMNg(fj9b4 zviD)bJ($~fX+#Mr-Rv>$+&+1B$yGOUyCILSPd8Z*A- zG8W7`-32BWFd2w}5HoMm(UkWAx#a6|MYTUmj%F7c_ zGN8=yb=jp^#Z#Rb(Kp&isjVNKa?_6%z&9nKNff%bhei7t&(P^JgtV|}Y zW}UtfHjyWEQ^=$MhZ%MfW7Y+-rdD8j|GtAS+8|kLO)NCo3d=s~Yj`-*G%=}-Vi8di zRp}E;lgo1xND~ts)6J;Zb7<~9<#;>YzcwqlwO#ULcsXytSOKWjD}J91`~0TlK`9zrg6vI z^}P?DG4=W@ua<7bG$(jE*?aIUE-mK-F{O~)^sx85eOj~bxpH^JOTIJ=dyQ8l^$scx zQ^6zB)xuZl)|Jtkm4^C`H`h0I?%L(bmC}_J{K@t-8zqlYfJ>13&IOv)ORjU-x^QX4 zJC%&s$F^O=Gjfu@YIa5Gps)8(?b|7e(c3gY2qB>AQtNtBRpe5)(b*fHj*<`dC_LzD zr|Z$)wnGbpMagLWD0v=$Y?BW5QjcyuoXj0|G2*y@t7B@{m`1wFhnVUJ`O#$W!OHSc z1!C*_)$)lEy&nf47rSog2f2u@AT2=ak-@-1P9iy7x|mIgNmfE=I&E+34TZ%f}3?b3&y{ z{apRZzK$>k0021OObe+_8Lj>>4;Aa7Ph`Wni%UWQUwkMf3GNKTO(+uNsQu3g;;MXu zBk!&|&sugdl^P(JIXy%-=h@i|oCc;PDqm z;P15yrhQ{vMaV%+Ag9Y$yfEDJU>%*`boG5Zrj}NoF>mw4W*`?X1}|4sj7eYI=wm13 zddTSyF;D9jUY2?#pC1jQd+-_?nA7PUrA-m~M3%RL1oK%M?;dB5<9u_$mw&tY$dScofIwfag;M(B=#_$uEJzr}X#a_G}p4;2O^h;x-!#?*uV z=M+W{6sV*C*2J=oB7itBOrXF9qJXM5N4er)PH&(C3`-3Z(3kY-Dv_Xx178FRY#<8g zc12x9=Bq*rDW(l{z+tI@0!=9p0$WWf72XRJSf>;SAYP{j6P6Vy(3AoJ#7!v`-U}31 brxf@fm8z@8}1KLp^cF+voiLG&=)6Pf=vnU zm0+$(_7P@_GN@s~b*F|Me76R?HxKn_YZXw|!mUcn8u@BeZq1i(>Hh6W6>`5Dh()t5 zb zTfd$!JEu&mzneD}5|`9X-p{*#4?n*A`Sk1Czh4Hf{{8&^`}-HE!+!z}NML~m9>^ah z2rjsw4-7sCVT2MgH_TovP)GxYA6U4CI2?BLVG0`J6(R*Cn&_c|CyumY2_rHiPKt@V z2m_6LwFm)@Im(ELjV}0zk&ZRR2$PWA83_WA7a~a+Ogy5X9Bo~-S7dr)kyB1+8YuZB zR8Uc=z*t#g=~#GU64w@!O}_IOa2ry%-B5cU$~Ujn&|mWpQOB%yzLy4HknH5$;PnyF{$1hARf zAaqS`3RI_LqM2Brv=$mFqK+QAXr-_Ls}f*QnrQy$Xu`4?l&Cw-Dr&8|M$4;+#15J& zL3slEs7-FIk?cp?h7@MAZEaNUwR453YOUe^$!B@*j;0v2)0QZyh#Gx+Zokg1o9n;y z78&VLPG!i-ah>URYXkqJ#6=*(;P?_VKW`9*0cO$b6K{ z;>p&c-13Yc_cU|0BE#%r%@XPCD$i-+Ooz&Iz)JMS?i7u5(h+vt1IsxBJ;J z=|UHJz|cQj{1nN%9@C+*TYY0QdQDHb;7L`Fx%YsgeMp?Xclyee`oBN>y}j|; z9~|TB4X&_>(X4K_%FD$xm9bnH4sius9`kxMzy4hfY;V(Ag$Nj+yHPMn5mZJ8%?Aw) zstscPD-H%-gf|lE&2A?Q+6DtBv)nE1YBH>$4fj(*9AwWJB21eKA=tv#ywC$;%b^e_ zI6}GQ4Twl&VG>7TK{f1f15=dW{t#g_Hzqo9i%RsN$ySIfFR|w`A*y2O3MViW@hwSc z6yN~CSf{d#Cv{eAp7{8cM&YHVf`WR^?Ti>Y%xDgKrgL8J6m=qg>F8VA0~r`?mpMiL z4R<#@ou#mY9&WL*kJb6yBN26#M*8k&c05*O(B~3!EwW;hsiPL3m#*NcOLlf--}x$~ zMnbLfUOY6Su8gB9$z_n2RE#Ab>qoo~{$M*+0U%2bNJ}n8DUqx^X2VA5$yW}uiCyew z%(Q7jZbI>jz5JvOmAN|?KJjVhJR%pzxz0uTQZnd-B|N?O&GuC?R(9K`KWjKogat8d zDf}Wh&pA+QdXt?8b!Q0v$yv-S>NBANjc3%NmX*QAfTLg%EY+M9HTY zgFO$L4}2)O(Bwcdk*Y)Kxn@l3InvUMu2}oyUr1|8zsg02f%C{;`p82%cjd5MJbhm_ zC$}v9kxq~0>K;w)HC0j`G?=ey$}EFgs(+@FCgqFeVp7REdxGzzqLZngtg6&fVr6{Z zi|H>}nm%eV<*6X0x=u1`NlnK% zmaTQQjaCfU%4oXOOkTxn{d7q@R!YZ>f57QzU%O3wl5~ljjV)|vD_eQC(*{2kCT*P`AAmV8ZpQ&cIVC&r@kjo~w8#7-+c zWWtzp(Mcvoex*vXDlMJ%cGHD%!nGlRH3 zQEQPAnEpqpmUyEn{A`o4@!tdnn7@WTBRAjNX0NU)Q+zY+oQ0cS@0K^e!4)q;HGR?L z5*pJL&1tCR%R%=x5562WZ+p>OYVw|1yRU{|kab7HTkD!Zs=g7cvn*YvwXL%|nB>vK7kd^OD-S)}}SKoxQRv?e((;X6>b6YiYzbFtZ4z z)n=33xeMpns4bD^wDWUomugsnUmUvxyRt4f$>vr!{E+8{_a1!=b9`Snj3eK;zfcq-B# zw^9DXVK4jIV0ZO=dp)^mTixubhBdde)z^)qlavtyX1+W_`L7=@}Hr6wrkD#w7j@sc3nDyD@#T% zhu-nBlGoaI8g%_-EA|aueGomB^`$#G-! lJII4Q=z~89gh42TLr8>0XoN?Igh{A`OUQ&xcmo9h06Q45V&nh- literal 0 HcmV?d00001 diff --git a/doxygen/img/Palettes.fm.anc.gif b/doxygen/img/Palettes.fm.anc.gif new file mode 100644 index 0000000000000000000000000000000000000000..d344c03ddf5112a77e7ec01a9de05e77980d3e0b GIT binary patch literal 4748 zcmV;75_9cGNk%w1VXpzK0OJ4v0001ge}7d~Rp#dAs;a90|Nl%(O!xQq8X6k2v$FsI z00000000000000000000A^8LW000F5EC2ui0Ivb8000F3u*gZPy*TU5yZ;~ujAUt^ zXsWJk>%MR-&ve~}c&_h!@Bcaga3~QHf5u}ksoXJ}(5Q4ur97*h>ruPmVliG%IQT7_ z&uD9|bQx!tBrwixF*WH$c2S8>`~QG%a}`M=dt^LDTzwOa1%`wgj*NU_N%Y9#p?UA(9)AC z+`EGa5lxw->(;`C2_s4jc&C&@DHo$;gg3FH$4LGVb8Wm6@}o(KBT0%ZsVSu?8wF3w zYy`8W&6_xL>f9+q<-M6e*KKl1gy;~XK#(5#8C0fHBrG#M9d?OoQ>VLpjSIE46*sRm zwOl#X)t}jcVC%dz`>$WqS4FRJZ8x(UZ5gA1qjU)ml*o_;250hxrPoi8!!g z!;brb+~VVI-7ywr5+(1k|FW_`5s<&&A0isP&e zbZ^&rQ0pFkT6OH=u zR!r+v7#4*Fo~2K88hU6UTzEy-9$gM1WSKWBwK$YdET$OIiVC$96)!N>DC0piPUE7D zKTe0@j_vel(1jhoRTf^0tc7G+N?OPsb|FT&;gcp#>7I{7@~DwRtR&_aVPXO%pLCEF zHfCdLo~ad^eYN@6eNE04W0&q&1}1OmiN{@Qa`5I{f9i$iW@&?Zhu&;;Qnn?Y)aY4b zqU2RN+mybXrzxSo9V+N}lv3*H76+7S>Zz!vYO0ZtJ}Ts9<@i~ste2X{X`i?<8fdJc zf;!%)MX4(6u&lOvr=5B2*CCzC{sstaf(QCnpk|Hsr{A;)4p{9`!*+{mvBq-A2Zr-W zcqNJG>hocSNml9ZR&6+$?ubi*wjj6O<{KtY{Pqh|j#Awi2)Nndn{T)K`m6B5Hy|5u zkT^n&#KGQ%DZs@TXRPtY9B)j(#~_C+^2j8YZ1Tw{f7~&~>z??c#DEZ7E~yj~JJ`xN z=bUlMJooH#&pEf;V36~kTkpQ{64LI{P|7Bjyh|3%>(hMHY%@(iXH9?rTX)U%*ItJW z_Sj;VP4?MlhmEq(t|Gy#TUk zS~u=E%0WLxqeXl!x@kK8fZD3)<*Q*%C8ECm`CYArCvv!|i7&1?#*eq|y2?1eeJsE; zYiIebx@PV-=e=f5I-0zPK01hZoStf!ub+(e@@X^geDlz+E%`$R^*-zHx+{14=C=Yv z{HLPR3QmT_8-FVD$(MYw*Xw`X{?_la?*7>E*H8cb>~npx>^eGHJ%HK5mgnlGJpo<| zLBLQ@0RzZD{3MWkRWskJZnnA#rtgA2iyZBeLM~32OGHMKQoZhFB@mj>S}hw3(>T<$ zB$04p5-e5fD!4cd+7NQFo1Va8w!=S2E`~B3%nd~*KltHqe)&rx5|?O1B{mUk`_m!J zeAq)j{1AvUq@n)KhR8)C=5T{NoT3%0=ma1hAd6bWSr^x6#E$V#TtIr69OGD&0od`5 zc+8_7?})xGKJSmv1Ee6k7DX^pQH*JjnFqJ9$3{A`k3$@!Bm+rF=1I?x{78!1UgZR$ zq~whhNs1#!nMX9Hk#TI~q6Qrnu{l1>m7*l2EFl@mC)%=zxU`=Wb9qEt7Lt_%BO@9V z2{%5-a+X5$VKaLrL>Q=2>E z<_%Zrzi@(+j<2j^IU7k!8{$%I@x!O{^4ZI?<@1u?Jfu4X3eQ;1Q;+9F=laxXPj9xf zpyC|p82*iUP=r!Yp{Qi&1=-0UYF@*mn7KnmEs8Z|I#Yi9WTr|1`p|f~w3QI8%t%X_ zOjYJgpEYFSJ@vQC_x-Y^oz!GyJh@4s!hw?po#_A)s!+%Al!>Y2C{khi(ul@%2}&X3kLq!i66Q_-0+Bq~pz zAoC~del}K@U3H>mon~H@x>s#x&|^GR-$F^&)xJ8Eu8FPYS+O9w1bFtdpbf2PKU+_G z;?%7)%->B#2F<)2)~t6$>m5c*+uD}aq&ejn>~dCskfrl}Y6MwpceB|l5HkbE-BnR) z{>$9ZHdc#-)Y=6I&|3+NY_cG;Ky-1qvf+l3s^GP1RV&ln@+RQ6gvGAb()rl1dUde7 z-Qvf*Td?sG)V_#au6db@UZ4e5Z9MC(7gx63!NT{tlbxUb5)4K9*6yf=4FXYzI@LK$ zcnkaG?^aQ(-t1Cfx3Jr8$pkF24~LAz?*+icRJ<_^1Sj6In>m;z;);lJtU(%< zroC(Su;NN3oHn_r)|#jt&4tOJ^&@(1YML-Q(TR4WstuiE5feDlksWXwV+~o9zPf`- zlf<=u0wriK=rnV}+uZn5kHN`JOnK{@iT15Gg#T?Z-dz^}$nDu*t1i23cD0W)&gzsE zV8QKMnSd4SHGE4bh5L?Ct^8eZUJ0*LzvK1*bMqbH1vmR;UA`t#s1mNdD54zBY z4)iE*G^1PIGK=8~#W}ZF*cw;a8&mL_(#fK35&E~w!)LqiMH^7t6CZ7E4tCDrD%z7s z0nyjac8fDTy3^gUjz28-p7mCL68Lh*x2CYMN3$^~N_p5t74xKdkLxdw?BoY76_{kr6%3pl% zzgKA(5Mo(FWZm^iopWotW`AWSZu`f7Yv+3zlyStTe&}aG6xd>$rhY8r62?Gg7y*Lu zK{$y3fo*4gzlT$mgjyFkYi|ZW@b_P@)@jfOTMBr8A|VZxVS*8OYO5B26^K$5cwNXg zU~Xg-qLze8xP*JQ1w2S}{#Qed<5!fWTJcsgMTlSrSP@LvgbY&=MmUT*I^Hybpd|}mPSSUqu7=jE)h)!6CMdyQD z)mM0ULGPD`M~F!_2#1aoW6*hj@hC6eHAtP>nCtl(8PWa^nuo#Pqh*26PT(IU;m&J9J zm|nEFhw)d0wTL#QsEY9TjLukzTQHF%DUcO8fg5Ry$hK1#`BmyDh|oA=F)3UASdunr zknQ$53As+o=#dVojXybwM`4pUIgfnRILK%Ijbhc45tfSi=#)>niawc1Q<(@vS&}E| zUy^iXEqRe{$c#eyks>*h;&7EDiIaNgGb4bE$Jm0LmW^Q6)ZTn5G$!m-%^_xtP1;m7m#~p&6T_iEE`f zoBvpwwz-11*-zr=k|eW^&GwMa36v078NykRsF_BpxtiDrRJ{qDWVwLBDV%7Te%JXp zemOf(`Il4)n(4`#>&cK#FrCARf~Nk(lH}NxDY={O8JE%docg&0@M!=E1BL>sgJ21n z`w5-=83YKhpbXle4*H-B8lVF@ppO}tu*sdjDFzU_p&XiA;qqb@wk-73dMO7yQ^St( zQKBjee!oL|u19tSmw<{_85~-p4(g#FDrO3ids>oYE%&28x;J4Ub1Mp@W-_FPw|FlK z9RxI^OJJi=iU2s8qe;pl1(9_?s-&)WDM-p6MGB+X6MbN+rC^#nVu}P&YNJz1rM>7{ z;8tH>YNCht9cLP+UuvdRI;M6SE2SejXZned2!Gn4f@+C6+I%(#ss2IAc$vDSoT@E8nx&yiEu)$gmAavUdZ`(~7jFuu&sTNu z!X)#@ebUDq&xag}H>y-Fb3xfu)A3JuhlzArq=PD9K`XS%+6DPgqRxh^TD!HdSEs(( zt6Yn3V)3=STDI)Ug*8F7RcoLL%B@2ywP~xiY}>Yyxv+CcgK;ajb!)eV7_N5ud^i5hS{#hdTz2JFt-JcRj1QUAhG~ zLAkH#BUR#BoBMTHs<@9Er;W?Ai~G3-E4hJdx_^5lyqdM1n<3tjNw=pvRFliU6}q=?>$U*giUUl* z|C_)V%D4S%y*9wW+3LS<2*DLB!8Jg^1suQ*th^b@!5%T8BwWHuD8eY5!YaJNEZo8_ z{K7CC!!kU>G+e_re8V`L!#cdfJlw-R{KG&T#6mp8L|nv1e8fnc#7exxOx(myTn)?j z#4{Ylc$;tCr!+IGsJ2SFwdQ+c2iBee9HWK#tGN8D1^#ye5AlUtB{-^hq1_ZBg~TV za0BPc5K_$QE6tIC7`}YW(A>&nvc~kw%bIK$fy~IW9LC0#%w4?9a*Q`o;>PBT$K|{X z&m1?(T(I{H&XFO`%fQb1%voCD&ITQD0KLzwTo~ib%mOmbLK?@6Va(n<&-wPr_G}vA ze9G{=&l7!c!A#Err$Qaw&(rM7sq7dPoyZTZg9OcdVNuTOe9+tc(JW2QYaA0VjZ1qJ zoyhN^Bzji3H~kflycR!g%s`#gzpBw#yfg*fZ*c<64~H26nm7MkgAWq2E3C))`^CBI a!#4}VVx1?FV#Hp}!fo9YZ~dVW0028(Fj*%6 literal 0 HcmV?d00001 diff --git a/doxygen/img/ftv2node.png b/doxygen/img/ftv2node.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/doxygen/img/ftv2pnode.png b/doxygen/img/ftv2pnode.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ee22f937a07d1dbfc27c669d11f8ed13e2f152 GIT binary patch literal 229 zcmV^P)R?RzRoKvklcaQ%HF6%rK2&ZgO(-ihJ_C zzrKgp4jgO( fd_(yg|3PpEQb#9`a?Pz_00000NkvXXu0mjftR`5K literal 0 HcmV?d00001 diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 1259cd217a8..b5f8f20d330 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -456,7 +456,9 @@ Bug Fixes since HDF5-1.10.7 release Documentation ------------- - - + - Updated doxygen comments with changes for release + + (ADB - 2021/05/17) F90 APIs diff --git a/src/H5.c b/src/H5.c index 1b97c72c70f..b69544f89bc 100644 --- a/src/H5.c +++ b/src/H5.c @@ -14,6 +14,7 @@ /****************/ /* Module Setup */ /****************/ +#include "H5module.h" /* This source code file is part of the H5 module */ /***********/ /* Headers */ @@ -55,6 +56,9 @@ static int H5__mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *fla /* Package Variables */ /*********************/ +/* Package initialization variable */ +hbool_t H5_PKG_INIT_VAR = FALSE; + /*****************************/ /* Library Private Variables */ /*****************************/ diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index e6cebffe6ed..f8f4f289c0d 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -442,124 +442,347 @@ extern "C" { #define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0 #define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1 +/** + * H5AC_cache_config_t is a public structure intended for use in public APIs. + * At least in its initial incarnation, it is basically a copy of \c struct + * \c H5C_auto_size_ctl_t, minus the \c report_fcn field, and plus the + * \c dirty_bytes_threshold field. + * + * The \c report_fcn field is omitted, as including it would require us to make + * \c H5C_t structure public. + * + * The \c dirty_bytes_threshold field does not appear in \c H5C_auto_size_ctl_t, + * as synchronization between caches on different processes is handled at the \c + * H5AC level, not at the level of \c H5C. Note however that there is + * considerable interaction between this value and the other fields in this + * structure. + * + * Similarly, the \c open_trace_file, \c close_trace_file, and \c + * trace_file_name fields do not appear in \c H5C_auto_size_ctl_t, as most trace + * file issues are handled at the \c H5AC level. The one exception is storage + * of the pointer to the trace file, which is handled by \c H5C. + * + * The structure is in H5ACpublic.h as we may wish to allow different + * configuration options for metadata and raw data caches. + */ + +//! typedef struct H5AC_cache_config_t { /* general configuration fields: */ + //! int version; + /**< Integer field indicating the the version of the H5AC_cache_config_t + * in use. This field should be set to #H5AC__CURR_CACHE_CONFIG_VERSION + * (defined in H5ACpublic.h). */ hbool_t rpt_fcn_enabled; + /**< Boolean flag indicating whether the adaptive cache resize report + * function is enabled. This field should almost always be set to disabled + * (0). Since resize algorithm activity is reported via stdout, it MUST be + * set to disabled (0) on Windows machines.\n + * The report function is not supported code, and can be expected to change + * between versions of the library. Use it at your own risk. */ hbool_t open_trace_file; + /**< Boolean field indicating whether the + * \ref H5AC_cache_config_t.trace_file_name "trace_file_name" + * field should be used to open a trace file for the cache.\n + * The trace file is a debugging feature that allows the capture + * of top level metadata cache requests for purposes of debugging + * and/or optimization. This field should normally be set to 0, as + * trace file collection imposes considerable overhead.\n + * This field should only be set to 1 when the + * \ref H5AC_cache_config_t.trace_file_name "trace_file_name" + * contains the full path of the desired trace file, and either + * there is no open trace file on the cache, or the + * \ref H5AC_cache_config_t.close_trace_file "close_trace_file" + * field is also 1.\n + * The trace file feature is unsupported unless used at the + * direction of The HDF Group. It is intended to allow The HDF + * Group to collect a trace of cache activity in cases of occult + * failures and/or poor performance seen in the field, so as to aid + * in reproduction in the lab. If you use it absent the direction + * of The HDF Group, you are on your own. */ + hbool_t close_trace_file; - char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; + /**< Boolean field indicating whether the current trace file + *(if any) should be closed.\n + * See the above comments on the \ref H5AC_cache_config_t.open_trace_file + * "open_trace_file" field. This field should be set to 0 unless there is + * an open trace file on the cache that you wish to close.\n + * The trace file feature is unsupported unless used at the direction of + * The HDF Group. It is intended to allow The HDF Group to collect a trace + * of cache activity in cases of occult failures and/or poor performance + * seen in the field, so as to aid in reproduction in the lab. If you use + * it absent the direction of The HDF Group, you are on your own. */ + + char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; + /**< Full path of the trace file to be opened if the + * \ref H5AC_cache_config_t.open_trace_file "open_trace_file" field is set + * to 1.\n + * In the parallel case, an ascii representation of the MPI rank of the + * process will be appended to the file name to yield a unique trace file + * name for each process.\n + * The length of the path must not exceed #H5AC__MAX_TRACE_FILE_NAME_LEN + * characters.\n + * The trace file feature is unsupported unless used at the direction of + * The HDF Group. It is intended to allow The HDF Group to collect a trace + * of cache activity in cases of occult failures and/or poor performance + * seen in the field, so as to aid in reproduction in the lab. If you use + * it absent the direction of The HDF Group, you are on your own. */ hbool_t evictions_enabled; + /**< A boolean flag indicating whether evictions from the metadata cache + * are enabled. This flag is initially set to enabled (1).\n + * In rare circumstances, the raw data throughput quirements may be so high + * that the user wishes to postpone metadata writes so as to reserve I/O + * throughput for raw data. The \p evictions_enabled field exists to allow + * this. However, this is an extreme step, and you have no business doing + * it unless you have read the User Guide section on metadata caching, and + * have considered all other options carefully.\n + * The \p evictions_enabled field may not be set to disabled (0) + * unless all adaptive cache resizing code is disabled via the + * \ref H5AC_cache_config_t.incr_mode "incr_mode", + * \ref H5AC_cache_config_t.flash_incr_mode "flash_incr_mode", + * \ref H5AC_cache_config_t.decr_mode "decr_mode" fields.\n + * When this flag is set to disabled (\c 0), the metadata cache will not + * attempt to evict entries to make space for new entries, and thus will + * grow without bound.\n + * Evictions will be re-enabled when this field is set back to \c 1. + * This should be done as soon as possible. */ hbool_t set_initial_size; - size_t initial_size; + /**< Boolean flag indicating whether the cache should be created + * with a user specified initial size. */ + + size_t initial_size; + /**< If \ref H5AC_cache_config_t.set_initial_size "set_initial_size" + * is set to 1, \p initial_size must contain he desired initial size in + * bytes. This value must lie in the closed interval + * [ \p min_size, \p max_size ]. (see below) */ double min_clean_fraction; + /**< This field specifies the minimum fraction of the cache + * that must be kept either clean or empty.\n + * The value must lie in the interval [0.0, 1.0]. 0.01 is a good place to + * start in the serial case. In the parallel case, a larger value is needed + * -- see the overview of the metadata cache in the + * “Metadata Caching in HDF5” section of the -- HDF5 User’s Guide + * for details. */ size_t max_size; + /**< Upper bound (in bytes) on the range of values that the + * adaptive cache resize code can select as the maximum cache size. */ + size_t min_size; + /**< Lower bound (in bytes) on the range of values that the + * adaptive cache resize code can select as the mininum cache * size. */ long int epoch_length; + /**< Number of cache accesses between runs of the adaptive cache resize + * code. 50,000 is a good starting number. */ + //! /* size increase control fields: */ + //! enum H5C_cache_incr_mode incr_mode; + /**< Enumerated value indicating the operational mode of the automatic + * cache size increase code. At present, only two values listed in + * #H5C_cache_incr_mode are legal. */ double lower_hr_threshold; + /**< Hit rate threshold used by the hit rate threshold cache size + * increment algorithm.\n + * When the hit rate over an epoch is below this threshold and the cache + * is full, the maximum size of the cache is multiplied by increment + * (below), and then clipped as necessary to stay within \p max_size, and + * possibly \p max_increment.\n + * This field must lie in the interval [0.0, 1.0]. 0.8 or 0.9 is a good + * place to start. */ double increment; + /**< Factor by which the hit rate threshold cache size increment + * algorithm multiplies the current cache max size to obtain a tentative + * new cache size.\n + * The actual cache size increase will be clipped to satisfy the \p max_size + * specified in the general configuration, and possibly max_increment + * below.\n + * The parameter must be greater than or equal to 1.0 -- 2.0 is a reasonable + * value.\n + * If you set it to 1.0, you will effectively disable cache size increases. + */ hbool_t apply_max_increment; - size_t max_increment; + /**< Boolean flag indicating whether an upper limit should be applied to + * the size of cache size increases. */ + + size_t max_increment; + /**< Maximum number of bytes by which cache size can be increased in a + * single step -- if applicable. */ enum H5C_cache_flash_incr_mode flash_incr_mode; - double flash_multiple; - double flash_threshold; + /**< Enumerated value indicating the operational mode of the flash cache + * size increase code. At present, only two listed values in + * #H5C_cache_flash_incr_mode are legal.*/ + + double flash_multiple; + /**< The factor by which the size of the triggering entry / entry size + * increase is multiplied to obtain the initial cache size increment. This + * increment may be reduced to reflect existing free space in the cache and + * the \p max_size field above.\n + * The parameter must lie in the interval [0.0, 1.0]. 0.1 or 0.05 is a good + * place to start.\n + * At present, this field must lie in the range [0.1, 10.0]. */ + + double flash_threshold; + /**< The factor by which the current maximum cache size is multiplied to + * obtain the minimum size entry / entry size increase which may trigger a + * flash cache size increase. \n + * At present, this value must lie in the range [0.1, 1.0]. */ + //! /* size decrease control fields: */ + //! enum H5C_cache_decr_mode decr_mode; + /**< Enumerated value indicating the operational mode of the tomatic + * cache size decrease code. At present, the values listed in + * #H5C_cache_decr_mode are legal.*/ double upper_hr_threshold; + /**< Hit rate threshold for the hit rate threshold and ageout with hit + * rate threshold cache size decrement algorithms.\n + * When \p decr_mode is #H5C_decr__threshold, and the hit rate over a given + * epoch exceeds the supplied threshold, the current maximum cache + * size is multiplied by decrement to obtain a tentative new (and smaller) + * maximum cache size.\n + * When \p decr_mode is #H5C_decr__age_out_with_threshold, there is + * no attempt to find and evict aged out entries unless the hit rate in + * the previous epoch exceeded the supplied threshold.\n + * This field must lie in the interval [0.0, 1.0].\n + * For #H5C_incr__threshold, .9995 or .99995 is a good place to start.\n + * For #H5C_decr__age_out_with_threshold, .999 might be more useful.*/ double decrement; + /**< In the hit rate threshold cache size decrease algorithm, this + * parameter contains the factor by which the current max cache size is + * multiplied to produce a tentative new cache size.\n + * The actual cache size decrease will be clipped to satisfy the + * \ref H5AC_cache_config_t.min_size "min_size" specified in the general + * configuration, and possibly \ref H5AC_cache_config_t.max_decrement + * "max_decrement".\n + * The parameter must be be in the interval [0.0, 1.0].\n + * If you set it to 1.0, you will effectively + * disable cache size decreases. 0.9 is a reasonable starting point. */ hbool_t apply_max_decrement; - size_t max_decrement; + /**< Boolean flag indicating ether an upper limit should be applied to + * the size of cache size decreases. */ + + size_t max_decrement; + /**< Maximum number of bytes by which the maximum cache size can be + * decreased in any single step -- if applicable.*/ int epochs_before_eviction; + /**< In the ageout based cache size reduction algorithms, this field + * contains the minimum number of epochs an entry must remain unaccessed in + * cache before the cache size reduction algorithm tries to evict it. 3 is a + * reasonable value. */ hbool_t apply_empty_reserve; - double empty_reserve; + /**< Boolean flag indicating whether the ageout based decrement + * algorithms will maintain a empty reserve when decreasing cache size. */ + + double empty_reserve; + /**< Empty reserve as a fraction maximum cache size if applicable.\n When + * so directed, the ageout based algorithms will not decrease the maximum + * cache size unless the empty reserve can be met.\n The parameter must lie + * in the interval [0.0, 1.0]. 0.1 or 0.05 is a good place to start. */ + //! /* parallel configuration fields: */ + //! size_t dirty_bytes_threshold; - int metadata_write_strategy; - + /**< Threshold number of bytes of dirty metadata generation for + * triggering synchronizations of the metadata caches serving the target + * file in the parallel case.\n Synchronization occurs whenever the number + * of bytes of dirty metadata created since the last synchronization exceeds + * this limit.\n This field only applies to the parallel case. While it is + * ignored elsewhere, it can still draw a value out of bounds error.\n It + * must be consistant across all caches on any given file.\n By default, + * this field is set to 256 KB. It shouldn't be more than half the current + * max cache size times the min clean fraction. */ + + int metadata_write_strategy; + /**< Desired metadata write strategy. The valid values for this field + * are:\n #H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: Specifies tha only + * process zero is allowed to write dirty metadata to disk.\n + * #H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: Specifies that process zero + * still makes the decisions as to what entries should be flushed, but the + * actual flushes are distributed across the processes in the computation to + * the extent possible.\n The src/H5ACpublic.h include file in the HDF5 + * library has detailed information on each strategy. */ + //! } H5AC_cache_config_t; - -/**************************************************************************** - * - * structure H5AC_cache_image_config_t - * - * H5AC_cache_image_ctl_t is a public structure intended for use in public - * APIs. At least in its initial incarnation, it is a copy of struct - * H5C_cache_image_ctl_t. - * - * The fields of the structure are discussed individually below: - * - * version: Integer field containing the version number of this version - * of the H5C_image_ctl_t structure. Any instance of - * H5C_image_ctl_t passed to the cache must have a known - * version number, or an error will be flagged. - * - * generate_image: Boolean flag indicating whether a cache image should - * be created on file close. - * - * save_resize_status: Boolean flag indicating whether the cache image - * should include the adaptive cache resize configuration and status. - * Note that this field is ignored at present. - * - * entry_ageout: Integer field indicating the maximum number of - * times a prefetched entry can appear in subsequent cache images. - * This field exists to allow the user to avoid the buildup of - * infrequently used entries in long sequences of cache images. - * - * The value of this field must lie in the range - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE (-1) to - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX (100). - * - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE means that no limit - * is imposed on number of times a prefeteched entry can appear - * in subsequent cache images. - * - * A value of 0 prevents prefetched entries from being included - * in cache images. - * - * Positive integers restrict prefetched entries to the specified - * number of appearances. - * - * Note that the number of subsequent cache images that a prefetched - * entry has appeared in is tracked in an 8 bit field. Thus, while - * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX can be increased from its - * current value, any value in excess of 255 will be the functional - * equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. - * - ****************************************************************************/ +//! #define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1 #define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 #define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 +//! +/** + * H5AC_cache_image_config_t is a public structure intended for use in public + * APIs. At least in its initial incarnation, it is a copy of \c struct \c + * H5C_cache_image_ctl_t. + */ + typedef struct H5AC_cache_image_config_t { - int version; + int version; + /**< Integer field containing the version number of this version of the \c + * H5C_image_ctl_t structure. Any instance of \c H5C_image_ctl_t passed + * to the cache must have a known version number, or an error will be + * flagged. + */ hbool_t generate_image; + /**< Boolean flag indicating whether a cache image should be created on file + * close. + */ hbool_t save_resize_status; - int entry_ageout; + /**< Boolean flag indicating whether the cache image should include the + * adaptive cache resize configuration and status. Note that this field + * is ignored at present. + */ + int entry_ageout; + /**< Integer field indicating the maximum number of times a + * prefetched entry can appear in subsequent cache images. This field + * exists to allow the user to avoid the buildup of infrequently used + * entries in long sequences of cache images. + * + * The value of this field must lie in the range \ref + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE (-1) to \ref + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX (100). + * + * \ref H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE means that no limit is + * imposed on number of times a prefeteched entry can appear in subsequent + * cache images. + * + * A value of 0 prevents prefetched entries from being included in cache + * images. + * + * Positive integers restrict prefetched entries to the specified number + * of appearances. + * + * Note that the number of subsequent cache images that a prefetched entry + * has appeared in is tracked in an 8 bit field. Thus, while \ref + * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX can be increased from its current + * value, any value in excess of 255 will be the functional equivalent of + * \ref H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. + */ } H5AC_cache_image_config_t; +//! + #ifdef __cplusplus } #endif diff --git a/src/H5Amodule.h b/src/H5Amodule.h index eb3a1338d34..c89c93f0d6f 100644 --- a/src/H5Amodule.h +++ b/src/H5Amodule.h @@ -29,4 +29,41 @@ #define H5_MY_PKG_ERR H5E_ATTR #define H5_MY_PKG_INIT YES +/**\defgroup H5A H5A + * + * Use the functions in this module to manage HDF5 attributes. + * + * The Attribute Interface, H5A, provides a mechanism for attaching additional + * information to a dataset, group, or named datatype. + * + * Attributes are accessed by opening the object that they are attached to and + * are not independent objects. Typically an attribute is small in size and + * contains user metadata about the object that it is attached to. + * + * Attributes look similar to HDF5 datasets in that they have a datatype and + * dataspace. However, they do not support partial I/O operations and cannot be + * compressed or extended. + * + * + * + * + * + * + * + * + * + * + * + *
    CreateRead
    + * \snippet H5A_examples.c create + * + * \snippet H5A_examples.c read + *
    UpdateDelete
    + * \snippet H5A_examples.c update + * + * \snippet H5A_examples.c delete + *
    + * + */ + #endif /* H5Amodule_H */ diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 28a0e85d5a7..01986683b77 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -22,17 +22,40 @@ #include "H5Opublic.h" /* Object Headers */ #include "H5Tpublic.h" /* Datatypes */ -/* Information struct for attribute (for H5Aget_info/H5Aget_info_by_idx) */ +//! +/** + * Information struct for H5Aget_info() / H5Aget_info_by_idx() + */ typedef struct { - hbool_t corder_valid; /* Indicate if creation order is valid */ - H5O_msg_crt_idx_t corder; /* Creation order */ - H5T_cset_t cset; /* Character set of attribute name */ - hsize_t data_size; /* Size of raw data */ + hbool_t corder_valid; /**< Indicate if creation order is valid */ + H5O_msg_crt_idx_t corder; /**< Creation order */ + H5T_cset_t cset; /**< Character set of attribute name */ + hsize_t data_size; /**< Size of raw data */ } H5A_info_t; +//! -/* Typedef for H5Aiterate2() callbacks */ +//! +/** + * Typedef for H5Aiterate2() / H5Aiterate_by_name() callbacks + * \param[in] location_id The identifier for the group, dataset + * or named datatype being iterated over + * \param[in] attr_name The name of the current object attribute + * \param[in] ainfo The attribute’s info struct + * \param[in,out] op_data A pointer to the operator data passed in to + * H5Aiterate2() or H5Aiterate_by_name() + * \returns The return values from an operator are: + * \li Zero causes the iterator to continue, returning zero when + * all attributes have been processed. + * \li Positive causes the iterator to immediately return that + * positive value, indicating short-circuit success. The + * iterator can be restarted at the next attribute. + * \li Negative causes the iterator to immediately return that value, + * indicating failure. The iterator can be restarted at the next + * attribute. + */ typedef herr_t (*H5A_operator2_t)(hid_t location_id /*in*/, const char *attr_name /*in*/, const H5A_info_t *ainfo /*in*/, void *op_data /*in,out*/); +//! /********************/ /* Public Variables */ @@ -45,45 +68,946 @@ typedef herr_t (*H5A_operator2_t)(hid_t location_id /*in*/, const char *attr_nam extern "C" { #endif -H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, - hid_t aapl_id); -H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, - hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); -H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); -H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, - hid_t lapl_id); -H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, hid_t aapl_id, hid_t lapl_id); -H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf); -H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); -H5_DLL herr_t H5Aclose(hid_t attr_id); -H5_DLL hid_t H5Aget_space(hid_t attr_id); -H5_DLL hid_t H5Aget_type(hid_t attr_id); -H5_DLL hid_t H5Aget_create_plist(hid_t attr_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Closes the specified attribute + * + * \attr_id + * + * \return \herr_t + * + * \details H5Aclose() terminates access to the attribute specified by + * \p attr_id by releasing the identifier. + * + * \attention Further use of a released attribute identifier is illegal; a + * function using such an identifier will generate an error. + * + * \since 1.0.0 + * + * \see H5Acreate(), H5Aopen() + */ +H5_DLL herr_t H5Aclose(hid_t attr_id); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Creates an attribute attached to a specified object + * + * \fgdt_loc_id + * \param[in] attr_name Name of attribute + * \param[in] type_id Attribute datatype identifier + * \space_id + * \acpl_id + * \aapl_id + * + * \return \hid_tv{attribute} + * + * \details H5Acreate2() creates an attribute, \p attr_name, which is attached + * to the object specified by the identifier \p loc_id. + * + * The attribute name, \p attr_name, must be unique for the object. + * + * The attribute is created with the specified datatype and dataspace, + * \p type_id and \p space_id, which are created with the H5T and + * H5S interfaces, respectively. + * + * If \p type_id is either a fixed-length or variable-length string, + * it is important to set the string length when defining the + * datatype. String datatypes are derived from #H5T_C_S1 (or + * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in + * size. See H5Tset_size() and Creating variable-length string + * datatypes. + * + * The access property list is currently unused, but will be used in + * the future. This property list should currently be #H5P_DEFAULT. + * + * The attribute identifier returned by this function must be released + * with H5Aclose() resource leaks will develop. + * + * \note The \p aapl parameter is currently not used; specify #H5P_DEFAULT. + * + * \note If \p loc_id is a file identifier, the attribute will be attached + * that file’s root group. + * + * \since 1.8.0 + * + * \see H5Aclose() + * + */ +H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, + hid_t aapl_id); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Creates an attribute attached to a specified object + * + * \fgdt_loc_id + * \param[in] obj_name Name, relative to \p loc_id, of object that + * attribute is to be attached to + * \param[in] attr_name Attribute name + * \param[in] type_id Attribute datatype identifier + * \space_id + * \acpl_id + * \aapl_id + * \lapl_id + * + * \return \hid_tv{attribute} + * + * \details H5Acreate_by_name() creates an attribute, \p attr_name, which is + * attached to the object specified by \p loc_id and \p obj_name. + * + * \p loc_id is a location identifier; \p obj_name is the object + * name relative to \p loc_id. If \p loc_id fully specifies the + * object to which the attribute is to be attached, \p obj_name + * should be '.' (a dot). + * + * The attribute name, \p attr_name, must be unique for the object. + * + * The attribute is created with the specified datatype and + * dataspace, \p type_id and \p space_id, which are created with + * the H5T and H5S interfaces respectively. + * + * The attribute creation and access property lists are currently + * unused, but will be used in the future for optional attribute + * creation and access properties. These property lists should + * currently be #H5P_DEFAULT. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * The attribute identifier returned by this function must be + * released with H5close() or resource leaks will develop. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, + hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Deletes an attribute from a specified location + * + * \fgdt_loc_id + * \param[in] attr_name Name of the attribute to delete + * + * \return \herr_t + * + * \details H5Adelete() removes the attribute specified by its name, + * \p attr_name, from a file, dataset, group, or named datatype. + * This function should not be used when attribute identifiers + * are open on \p loc_id as it may cause the internal indexes of + * the attributes to change and future writes to the open + * attributes to produce incorrect results. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Adelete(hid_t loc_id, const char *attr_name); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Deletes an attribute from an object according to index order + * + * \fgdt_loc_id + * \param[in] obj_name Name of object, relative to location, from which + * attribute is to be removed + * \param[in] idx_type Type of index + * \param[in] order Order in which to iterate over index + * \param[in] n Offset within index + * \lapl_id + * + * \return \herr_t + * + * \details H5Adelete_by_idx() removes an attribute, specified by its + * location in an index, from an object. + * + * The object from which the attribute is to be removed is + * specified by a location identifier and name, \p loc_id and + * \p obj_name, respectively. If \p loc_id fully specifies the + * object from which the attribute is to be removed, \p obj_name + * should be '.' (a dot). + * + * The attribute to be removed is specified by a position in an + * index, \p n. The type of index is specified by \p idx_type and + * may be #H5_INDEX_NAME, for an alpha-numeric index by name, or + * #H5_INDEX_CRT_ORDER, for an index by creation order. The order + * in which the index is to be traversed is specified by \p order + * and may be #H5_ITER_INC (increment) for top-down iteration, + * #H5_ITER_DEC (decrement) for bottom-up iteration, or + * #H5_ITER_NATIVE, in which case HDF5 will iterate in the + * fastest-available order. For example, if \p idx_type, \p order, + * and \p n are set to #H5_INDEX_NAME, #H5_ITER_INC, and 5, + * respectively, the fifth attribute by alpha-numeric order of + * attribute names will be removed. + * + * For a discussion of \p idx_type and \p order, the valid values + * of those parameters, and the use of \p n, see the description + * of H5Aiterate2(). + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, + hsize_t n, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Removes an attribute from a specified location + * + * \fgdt_loc_id + * \param[in] obj_name Name of object, relative to location, from which + * attribute is to be removed + * \param[in] attr_name Name of attribute to delete + * \lapl_id + * + * \return \herr_t + * + * \details H5Adelete_by_name() removes the attribute \p attr_name + * from an object specified by location and name, \p loc_id and + * \p obj_name, respectively. + * + * If \p loc_id fully specifies the object from which the + * attribute is to be removed, \p obj_name should be '.' (a dot). + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to + * access the object, \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Determines whether an attribute with a given name exists on an + * object + * + * \fgdt_loc_id{obj_id} + * \param[in] attr_name Attribute name + * + * \return \htri_t + * + * \details H5Aexists() determines whether the attribute \p attr_name + * exists on the object specified by \p obj_id. + * + * \since 1.8.0 + * + */ +H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Determines whether an attribute with a given name exists on an + * object + * + * \fgdt_loc_id{obj_id} + * \param[in] obj_name Object name + * \param[in] attr_name Attribute name + * \lapl_id + * + * \return \htri_t + * + * \details H5Aexists_by_name() determines whether the attribute + * \p attr_name exists on an object. That object is specified by + * its location and name, \p loc_id and \p obj_name, respectively. + * + * \p loc_id specifies a location in the file containing the object. + * \p obj_name is the name of the object to which the attribute is + * attached and can be a relative name, relative to \p loc_id, + * or an absolute name, based in the root group of the file. If + * \p loc_id fully specifies the object, \p obj_name should be '.' + * (a dot). + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *attr_name, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Gets an attribute creation property list identifier + * + * \attr_id + * + * \return \hid_tv{attribute's creation property list} + * + * \details H5Aget_create_plist() returns an identifier for the attribute + * creation property list associated with the attribute specified + * by \p attr_id. + * + * The creation property list identifier should be released with + * H5Pclose(). + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Aget_create_plist(hid_t attr_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Retrieves attribute information, by attribute identifier + * + * \attr_id + * \param[out] ainfo Attribute information struct + * + * \return \herr_t + * + * \details H5Aget_info() retrieves attribute information, locating the + * attribute with an attribute identifier, \p attr_id, which is + * the identifier returned by H5Aopen() or H5Aopen_by_idx(). The + * attribute information is returned in the \p ainfo struct. + * + * The \p ainfo struct is defined as follows: + * \snippet this H5A_info_t_snip + * + * \p corder_valid indicates whether the creation order data is + * valid for this attribute. Note that if creation order is not + * being tracked, no creation order data will be valid. Valid + * values are \c TRUE and \c FALSE. + * + * \p corder is a positive integer containing the creation + * order of the attribute. This value is 0-based, so, for + * example, the third attribute created will have a \p corder + * value of 2. + * + * \p cset indicates the character set used for the attribute’s + * name; valid values are defined in H5Tpublic.h and include + * the following: + * \csets + * This value is set with H5Pset_char_encoding(). + * + * \p data_size indicates the size, in the number of characters, + * of the attribute. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Retrieves attribute information by attribute index position + * + * \fgdt_loc_id + * \param[in] obj_name Name of object to which attribute is attached, + * relative to location + * \param[in] idx_type Type of index + * \param[in] order Index traversal order + * \param[in] n Attribute’s position in index + * \param[out] ainfo Struct containing returned attribute information + * \lapl_id + * + * \return \herr_t + * + * \details H5Aget_info_by_idx() retrieves information for an attribute + * that is attached to an object, which is specified by its + * location and name, \p loc_id and \p obj_name, respectively. + * The attribute is located by its index position and the attribute + * information is returned in the \p ainfo struct. + * + * If \p loc_id fully specifies the object to which the attribute + * is attached, \p obj_name should be '.' (a dot). + * + * The attribute is located by means of an index type, an index + * traversal order, and a position in the index, \p idx_type, + * \p order and \p n, respectively. These parameters and their + * valid values are discussed in the description of H5Aiterate2(). + * + * The \p ainfo struct, which will contain the returned attribute + * information, is described in H5Aget_info(). + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo /*out*/, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Retrieves attribute information, by attribute name + * + * \fgdt_loc_id + * + * \param[in] obj_name Name of object to which attribute is attached, + * relative to location + * \param[in] attr_name Attribute name + * \param[out] ainfo Struct containing returned attribute information + * \lapl_id + * + * \return \herr_t + * + * \details H5Aget_info_by_name() retrieves information for an attribute, + * \p attr_name, that is attached to an object specified by its + * location and name, \p loc_id and \p obj_name, respectively. + * The attribute information is returned in the \p ainfo struct. + * + * If \p loc_id fully specifies the object to which the attribute + * is attached, \p obj_name should be '.' (a dot). + * + * The \p ainfo struct is described in H5Aget_info(). + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to + * access the object, \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, + H5A_info_t *ainfo /*out*/, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Gets an attribute name + * + * \attr_id + * \param[in] buf_size The size of the buffer to store the name in + * \param[out] buf Buffer to store name in + * + * \return Returns the length of the attribute's name, which may be longer + * than \p buf_size, if successful. Otherwise returns a negative + * value. + * + * \details H5Aget_name() retrieves the name of an attribute specified by + * the identifier, \p attr_id. Up to \p buf_size characters are + * stored in \p buf followed by a \0 string terminator. If the + * name of the attribute is longer than (\p buf_size -1), the + * string terminator is stored in the last position of the buffer + * to properly terminate the string. + * + * If the user only wants to find out the size of this name, the + * values 0 and NULL can be passed in for the parameters + * \p bufsize and \p buf. + * + * \since 1.0.0 + * + */ H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Gets an attribute name, by attribute index position + * + * \fgdt_loc_id + * \param[in] obj_name Name of object to which attribute is attached, + * relative to location + * \param[in] idx_type Type of index + * \param[in] order Index traversal order + * \param[in] n Attribute’s position in index + * \param[out] name Attribute name + * \param[in] size Size, in bytes, of attribute name + * \lapl_id + * + * \return Returns attribute name size, in bytes, if successful; + * otherwise returns a negative value. + * + * \details H5Aget_name_by_idx() retrieves the name of an attribute that is + * attached to an object, which is specified by its location and + * name, \p loc_id and \p obj_name, respectively. The attribute is + * located by its index position, the size of the name is specified + * in \p size, and the attribute name is returned in \p name. + * + * If \p loc_id fully specifies the object to which the attribute + * is attached, \p obj_name should be '.' (a dot). + * + * The attribute is located by means of an index type, an index + * traversal order, and a position in the index, \p idx_type, + * \p order and \p n, respectively. These parameters and their + * valid values are discussed in the description of H5Aiterate2(). + * + * If the attribute name’s size is unknown, the values 0 and NULL + * can be passed in for the parameters \p size and \p name. The + * function’s return value will provide the correct value for + * \p size. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * \since 1.8.0 + * + */ H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name /*out*/, size_t size, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Gets a copy of the dataspace for an attribute + * + * \attr_id + * + * \return \hid_tv{attribute dataspace} + * + * \details H5Aget_space() retrieves a copy of the dataspace for an + * attribute. The dataspace identifier returned from this + * function must be released with H5Sclose() or resource leaks + * will develop. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Aget_space(hid_t attr_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Returns the amount of storage required for an attribute + * + * \attr_id + * + * \return Returns the amount of storage size allocated for the attribute; + * otherwise returns 0 (zero). + * + * \details H5Aget_storage_size() returns the amount of storage that is + * required for the specified attribute, \p attr_id. + * + * \since 1.6.0 + * + */ H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id); -H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo /*out*/); -H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, - H5A_info_t *ainfo /*out*/, hid_t lapl_id); -H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo /*out*/, hid_t lapl_id); -H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name); -H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, - const char *new_attr_name, hid_t lapl_id); -H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, - H5A_operator2_t op, void *op_data); -H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data, - hid_t lapd_id); -H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name); -H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id); -H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, hid_t lapl_id); -H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name); -H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *attr_name, hid_t lapl_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Gets an attribute datatype + * + * \attr_id + * + * \return \hid_t{datatype} + * + * \details H5Aget_type() retrieves a copy of the datatype for an attribute. + * The datatype is reopened if it is a named type before returning + * it to the application. The datatypes returned by this function + * are always read-only. If an error occurs when atomizing the + * return datatype, then the datatype is closed. + * + * The datatype identifier returned from this function must be + * released with H5Tclose() or resource leaks will develop. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Aget_type(hid_t attr_id); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Calls user-defined function for each attribute on an object + * + * \fgdt_loc_id + * \param[in] idx_type Type of index + * \param[in] order Order in which to iterate over index + * \param[in,out] idx Initial and returned offset within index + * \param[in] op User-defined function to pass each attribute to + * \param[in,out] op_data User data to pass through to and to be returned + * by iterator operator function + * + * \return \herr_t + * Further note that this function returns the return value of the + * last operator if it was non-zero, which can be a negative value, + * zero if all attributes were processed, or a positive value + * indicating short-circuit success. + * + * \details H5Aiterate2() iterates over the attributes attached to a + * dataset, named datatype, or group, as specified by \p loc_id. + * For each attribute, user-provided data, \p op_data, with + * additional information as defined below, is passed to a + * user-defined function, \p op, which operates on that + * attribute. + * + * The order of the iteration and the attributes iterated over + * are specified by three parameters: the index type, + * \p idx_type; the order in which the index is to be traversed, + * \p order; and the attribute’s position in the index, \p idx. + * + * The type of index specified by \p idx_type can be one of the + * following: + * + * \indexes + * + * The order in which the index is to be traversed, as specified + * by \p order, can be one of the following: + * + * \orders + * + * The next attribute to be operated on is specified by \p idx, + * a position in the index. + * + * For example, if \p idx_type, \p order, and \p idx are set to + * #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute + * in question is the fifth attribute from the beginning of the + * alpha-numeric index of attribute names. If \p order were set to + * #H5_ITER_DEC, it would be the fifth attribute from the end of + * the index. + * + * The parameter \p idx is passed in on an H5Aiterate2() call with + * one value and may be returned with another value. The value + * passed in identifies the parameter to be operated on first; + * the value returned identifies the parameter to be operated on + * in the next step of the iteration. + * + * \p op is a user-defined function whose prototype is defined + * as follows: + * \snippet this H5A_operator2_t_snip + * \click4more + * + * \note This function is also available through the H5Aiterate() macro. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Aiterate2(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, + H5A_operator2_t op, void *op_data); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Calls user-defined function for each attribute on an object + * + * \fgdt_loc_id + * \param[in] obj_name Name of object, relative to location + * \param[in] idx_type Type of index + * \param[in] order Order in which to iterate over index + * \param[in,out] idx Initial and returned offset within index + * \param[in] op User-defined function to pass each attribute to + * \param[in,out] op_data User data to pass through to and to be returned + * by iterator operator function + * \lapl_id + * + * \return \herr_t + * Further note that this function returns the return value of + * the last operator if it was non-zero, which can be a negative + * value, zero if all attributes were processed, or a positive value + * indicating short-circuit success. + * + * \details H5Aiterate_by_name() iterates over the attributes attached + * to the dataset or group specified with \p loc_id and \p obj_name. + * For each attribute, user-provided data, \p op_data, with + * additional information as defined below, is passed to a + * user-defined function, \p op, which operates on that attribute. + * + * If \p loc_id fully specifies the object to which these + * attributes are attached, \p obj_name should be '.' (a dot). + * + * The order of the iteration and the attributes iterated over + * are specified by three parameters: the index type, \p idx_type; + * the order in which the index is to be traversed, \p order; + * and the attribute’s position in the index, \p idx. + * + * The type of index specified by \p idx_type can be one of the + * following: + * + * \indexes + * + * The order in which the index is to be traversed, as specified + * by \p order, can be one of the following: + * + * \orders + * + * The next attribute to be operated on is specified by \p idx, + * a position in the index. + * + * For example, if \p idx_type, \p order, and \p idx are set to + * #H5_INDEX_NAME, #H5_ITER_INC, and 5, respectively, the attribute + * in question is the fifth attribute from the beginning of the + * alpha-numeric index of attribute names. If \p order were set to + * #H5_ITER_DEC, it would be the fifth attribute from the end of + * the index. + * + * The parameter \p idx is passed in on an H5Aiterate_by_name() + * call with one value and may be returned with another value. The + * value passed in identifies the parameter to be operated on first; + * the value returned identifies the parameter to be operated on in + * the next step of the iteration. + * + * \p op is a user-defined function whose prototype is defined + * as follows: + * \snippet this H5A_operator2_t_snip + * \click4more + * + * Valid return values from an operator and the resulting + * H5Aiterate_by_name() and \p op behavior are as follows: + * + * \li Zero causes the iterator to continue, returning zero when + * all attributes have been processed. + * \li A positive value causes the iterator to immediately return + * that positive value, indicating short-circuit success. + * The iterator can be restarted at the next attribute, as + * indicated by the return value of \p idx. + * \li A negative value causes the iterator to immediately return + * that value, indicating failure. The iterator can be + * restarted at the next attribute, as indicated by the return + * value of \p idx. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data, + hid_t lapl_id); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Opens an attribute for an object specified by object identifier and + * attribute name + * + * \fgdt_loc_id{obj_id} + * \param[in] attr_name Name of attribute to open + * \aapl_id + * + * \return \hid_tv{attribute} + * + * \details H5Aopen() opens an existing attribute, \p attr_name, that is + * attached to object specified by an object identifier, \p obj_id. + * + * The attribute access property list, \p aapl_id, is currently unused + * and should be #H5P_DEFAULT. + * + * This function, H5Aopen_by_idx() or H5Aopen_by_name() must be called + * before the attribute can be accessed for any further purpose, + * including reading, writing, or any modification. + * + * The attribute identifier returned by this function must be released + * with H5Aclose() or resource leaks will develop. + * + * \since 1.8.0 + * + * \see H5Aclose(), H5Acreate() + */ +H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Opens the nth attribute attached to an object + * + * \loc_id + * \param[in] obj_name Name of object to which attribute is attached, + * relative to location + * \param[in] idx_type Type of index + * \param[in] order Index traversal order + * \param[in] n Attribute’s position in index + * \aapl_id + * \lapl_id + * + * \return \hid_tv{attribute} + * + * \details H5Aopen_by_idx() opens an existing attribute that is attached + * to an object specified by location and name, \p loc_id and + * \p obj_name, respectively. If \p loc_id fully specifies the + * object to which the attribute is attached, \p obj_name, should + * be '.' (a dot). + * + * The attribute is identified by an index type, an index traversal + * order, and a position in the index, \p idx_type, \p order and + * \p n, respectively. These parameters and their valid values are + * discussed in the description of H5Aiterate2(). + * + * The attribute access property list, \p aapl_id, is currently + * unused and should currently be #H5P_DEFAULT. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * This function, H5Aopen(), or H5Aopen_by_name() must be called + * before an attribute can be accessed for any further purpose, + * including reading, writing, or any modification. + * + * The attribute identifier returned by this function must be + * released with H5Aclose() or resource leaks will develop. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, + hsize_t n, hid_t aapl_id, hid_t lapl_id); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Opens an attribute for an object by object name and attribute name + * + * \fgdt_loc_id + * \param[in] obj_name Name of object to which attribute is attached, + * relative to \p loc_id + * \param[in] attr_name Name of attribute to open + * \aapl_id + * \lapl_id + * + * \return \hid_tv{attribute} + * + * \details H5Aopen_by_name() opens an existing attribute, \p attr_name, + * that is attached to an object specified by location and name, + * \p loc_id and \p obj_name, respectively. + * + * \p loc_id specifies a location from which the target object can + * be located and \p obj_name is an object name relative to + * \p loc_id. If \p loc_id fully specifies the object to which the + * attribute is attached, \p obj_name should be '.' (a dot). + * + * The attribute access property list, \p aapl_id, is currently + * unused and should currently be #H5P_DEFAULT. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to access + * the object, \p obj_name. + * + * This function, H5Aopen(), or H5Aopen_by_idx() must be called + * before an attribute can be accessed for any further purpose, + * including reading, writing, or any modification. + * + * The attribute identifier returned by this function must be + * released with H5Aclose() or resource leaks will develop. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, + hid_t lapl_id); +/*-------------------------------------------------------------------------- */ +/** + * \ingroup H5A + * + * \brief Reads the value of an attribute + * + * \attr_id + * \mem_type_id{type_id} + * \param[out] buf Buffer for data to be read + * + * \return \herr_t + * + * \details H5Aread() reads an attribute, specified with \p attr_id. The + * attribute's in-memory datatype is specified with \p type_id. The + * entire attribute is read into \p buf from the file. + * + * Datatype conversion takes place at the time of a read or write and + * is automatic. + * + * \version 1.8.8 Fortran updated to Fortran2003. + * \version 1.4.2 The \p dims parameter was added to the Fortran API in this + * release. + * \since 1.0.0 + * + * \see H5Awrite() + * + */ +H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Renames an attribute + * + * \fgdt_loc_id + * \param[in] old_name Name of the attribute to be changed + * \param[in] new_name New name for the attribute + * + * \return \herr_t + * + * \details H5Arename() changes the name of the attribute located at + * \p loc_id. + * + * The old name, \p old_name, is changed to the new name, + * \p new_name. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name); +/*--------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Writes data to an attribute + * + * \attr_id + * \mem_type_id{type_id} + * \param[out] buf Data to be written + * + * \return \herr_t + * + * \details H5Awrite() writes an attribute, specified with \p attr_id. The + * attribute's in-memory datatype is specified with \p type_id. + * The entire attribute is written from \p buf to the file. + * + * If \p type_id is either a fixed-length or variable-length string, + * it is important to set the string length when defining the datatype. + * String datatypes are derived from #H5T_C_S1 (or #H5T_FORTRAN_S1 for + * Fortran codes), which defaults to 1 character in size. + * See H5Tset_size() and Creating variable-length string datatypes. + * + * Datatype conversion takes place at the time of a read or write and + * is automatic. + * + * \version 1.8.8 Fortran updated to Fortran2003. + * \version 1.4.2 Fortran \p dims parameter added in this release + * \since 1.0.0 + * \see H5Aread() + * + */ +H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf); +/*-------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \fgdt_loc_id + * \param[in] obj_name Name of object, relative to location, whose + * attribute is to be renamed + * \param[in] old_attr_name Prior attribute name + * \param[in] new_attr_name New attribute name + * \lapl_id + * + * \details H5Arename_by_name() changes the name of attribute that is + * attached to the object specified by \p loc_id and \p obj_name. + * The attribute named \p old_attr_name is renamed + * \p new_attr_name. + * + * The link access property list, \p lapl_id, may provide + * information regarding the properties of links required to + * access the object, \p obj_name. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, + const char *new_attr_name, hid_t lapl_id); /* Symbols defined for compatibility with previous versions of the HDF5 API. * @@ -95,16 +1019,186 @@ H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char * /* Typedefs */ -/* Typedef for H5Aiterate1() callbacks */ +//! +/** + * \brief Typedef for H5Aiterate1() callbacks + * + * \param[in] location_id The identifier for the group, dataset + * or named datatype being iterated over + * \param[in] attr_name The name of the current object attribute + * \param[in,out] operator_data A pointer to the operator data passed in to + * H5Aiterate1() + * \returns The return values from an operator are: + * \li Zero causes the iterator to continue, returning zero when + * all attributes have been processed. + * \li Positive causes the iterator to immediately return that + * positive value, indicating short-circuit success. The + * iterator can be restarted at the next attribute. + * \li Negative causes the iterator to immediately return that value, + * indicating failure. The iterator can be restarted at the next + * attribute. + */ typedef herr_t (*H5A_operator1_t)(hid_t location_id /*in*/, const char *attr_name /*in*/, void *operator_data /*in,out*/); +//! /* Function prototypes */ -H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id); -H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name); -H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); -H5_DLL int H5Aget_num_attrs(hid_t loc_id); -H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Creates an attribute attached to a specified object + * + * \fgdt_loc_id + * \param[in] name Name of attribute to locate and open + * \param[in] type_id Identifier of attribute datatype + * \space_id + * \acpl_id + * + * \return \hid_tv{attribute} + * + * \note The \p acpl parameters is currently not used; specify #H5P_DEFAULT. + * + * \deprecated Deprecated in favor of H5Acreate2() + * + * \details H5Acreate1() creates an attribute, \p name, which is attached + * to the object specified by the identifier \p loc_id. + * + * The attribute name, \p name, must be unique for the object. + * + * The attribute is created with the specified datatype and dataspace, + * \p type_id and \p space_id, which are created with the H5T and + * H5S interfaces, respectively. + * + * If \p type_id is either a fixed-length or variable-length string, + * it is important to set the string length when defining the + * datatype. String datatypes are derived from #H5T_C_S1 (or + * #H5T_FORTRAN_S1 for Fortran), which defaults to 1 character in + * size. See H5Tset_size() and Creating variable-length string + * datatypes. + * + * The attribute identifier returned by this function must be released + * with H5Aclose() resource leaks will develop. + * + * \since 1.8.0 + * + * \version 1.8.0 The function H5Acreate() was renamed to H5Acreate1() and + * deprecated in this release. + * + * \see H5Aclose() + * + */ +H5_DLL hid_t H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t acpl_id); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Determines the number of attributes attached to an object + * + * \fgdt_loc_id + * + * \return Returns the number of attributes if successful; otherwise returns + * a negative value. + * + * \deprecated This function is deprecated in favor of the functions + * H5Oget_info(), H5Oget_info_by_name(), and H5Oget_info_by_idx(). + * + * \details H5Aget_num_attrs() returns the number of attributes attached to + * the object specified by its identifier, \p loc_id. + * + * \since 1.0.0 + * + */ +H5_DLL int H5Aget_num_attrs(hid_t loc_id); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Calls a user’s function for each attribute on an object + * + * \loc_id + * \param[in,out] idx Starting (in) and ending (out) attribute index + * \param[in] op User's function to pass each attribute to + * \param[in,out] op_data User's data to pass through to iterator operator + * function + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function + * H5Aiterate2(). + * + * \details H5Aiterate1() iterates over the attributes of the object + * specified by its identifier, \p loc_id. The object can be a + * group, dataset, or named datatype. For each attribute of the + * object, the \p op_data and some additional information specified + * below are passed to the operator function \p op. The iteration + * begins with the attribute specified by its index, \p idx; the + * index for the next attribute to be processed by the operator, + * \p op, is returned in \p idx. If \p idx is the null pointer, + * then all attributes are processed. + * + * \p op is a user-defined function whose prototype is defined as follows: + * \snippet this H5A_operator1_t_snip + * \click4more + * + * \version 1.8.0 The function \p H5Aiterate was renamed to H5Aiterate1() + * and deprecated in this release. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Aiterate1(hid_t loc_id, unsigned *idx, H5A_operator1_t op, void *op_data); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Opens the attribute specified by its index + * + * \loc_id + * \param[in] idx Index of the attribute to open + * + * \return \hid_tv{attribute} + * + * \deprecated This function is deprecated in favor of the function + * H5Aopen_by_idx(). + * + * \details H5Aopen_idx() opens an attribute which is attached to the + * object specified with \p loc_id . The location object may be + * either a group, dataset, or named datatype, all of which may + * have any sort of attribute. The attribute specified by the index, + * \p idx , indicates the attribute to access. The value of \p idx + * is a 0-based, non-negative integer. The attribute identifier + * returned from this function must be released with H5Aclose() + * or resource leaks will develop. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); +/* --------------------------------------------------------------------------*/ +/** + * \ingroup H5A + * + * \brief Opens an attribute specified by name + * + * \loc_id + * \param[in] name Attribute name + * + * \return \hid_tv{attribute} + * + * \deprecated This function is deprecated in favor of the function + * H5Aopen_by_name(). + * + * \details H5Aopen_name() opens an attribute specified by its name, + * \p name, which is attached to the object specified with + * \p loc_id. The location object may be either a group, dataset, + * or named datatype, which may have any sort of attribute. The + * attribute identifier returned from this function must be + * released with H5Aclose() or resource leaks will develop. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Cpublic.h b/src/H5Cpublic.h index 0e6fb846460..79ece102944 100644 --- a/src/H5Cpublic.h +++ b/src/H5Cpublic.h @@ -31,15 +31,34 @@ extern "C" { #endif -enum H5C_cache_incr_mode { H5C_incr__off, H5C_incr__threshold }; +enum H5C_cache_incr_mode { + H5C_incr__off, + /** + * CreateRead + * + * + * \snippet H5D_examples.c create + * + * + * \snippet H5D_examples.c read + * + * UpdateDelete + * + * + * \snippet H5D_examples.c update + * + * + * \snippet H5D_examples.c delete + * + * + * + * + */ + #endif /* H5Dmodule_H */ diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index a7e231bbc8e..6c4d64589b9 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -39,30 +39,41 @@ /* Public Typedefs */ /*******************/ -/* Values for the H5D_LAYOUT property */ +//! +/** + * Values for the H5D_LAYOUT property + */ typedef enum H5D_layout_t { H5D_LAYOUT_ERROR = -1, - H5D_COMPACT = 0, /*raw data is very small */ - H5D_CONTIGUOUS = 1, /*the default */ - H5D_CHUNKED = 2, /*slow and fancy */ - H5D_VIRTUAL = 3, /*actual data is stored in other datasets */ - H5D_NLAYOUTS = 4 /*this one must be last! */ + H5D_COMPACT = 0, /**< raw data is very small */ + H5D_CONTIGUOUS = 1, /**< the default */ + H5D_CHUNKED = 2, /**< slow and fancy */ + H5D_VIRTUAL = 3, /**< actual data is stored in other datasets */ + H5D_NLAYOUTS = 4 /**< this one must be last! */ } H5D_layout_t; +//! -/* Types of chunk index data structures */ +//! +/** + * Types of chunk index data structures + */ typedef enum H5D_chunk_index_t { - H5D_CHUNK_IDX_BTREE = 0, /* v1 B-tree index (default) */ + H5D_CHUNK_IDX_BTREE = 0, /**< v1 B-tree index (default) */ H5D_CHUNK_IDX_SINGLE = - 1, /* Single Chunk index (cur dims[]=max dims[]=chunk dims[]; filtered & non-filtered) */ - H5D_CHUNK_IDX_NONE = 2, /* Implicit: No Index (H5D_ALLOC_TIME_EARLY, non-filtered, fixed dims) */ - H5D_CHUNK_IDX_FARRAY = 3, /* Fixed array (for 0 unlimited dims) */ - H5D_CHUNK_IDX_EARRAY = 4, /* Extensible array (for 1 unlimited dim) */ - H5D_CHUNK_IDX_BT2 = 5, /* v2 B-tree index (for >1 unlimited dims) */ - H5D_CHUNK_IDX_NTYPES /* This one must be last! */ + 1, /**< Single Chunk index (cur dims[]=max dims[]=chunk dims[]; filtered & non-filtered) */ + H5D_CHUNK_IDX_NONE = 2, /**< Implicit: No Index (#H5D_ALLOC_TIME_EARLY, non-filtered, fixed dims) */ + H5D_CHUNK_IDX_FARRAY = 3, /**< Fixed array (for 0 unlimited dims) */ + H5D_CHUNK_IDX_EARRAY = 4, /**< Extensible array (for 1 unlimited dim) */ + H5D_CHUNK_IDX_BT2 = 5, /**< v2 B-tree index (for >1 unlimited dims) */ + H5D_CHUNK_IDX_NTYPES /**< This one must be last! */ } H5D_chunk_index_t; +//! -/* Values for the space allocation time property */ +//! +/** + * Values for the space allocation time property + */ typedef enum H5D_alloc_time_t { H5D_ALLOC_TIME_ERROR = -1, H5D_ALLOC_TIME_DEFAULT = 0, @@ -70,51 +81,84 @@ typedef enum H5D_alloc_time_t { H5D_ALLOC_TIME_LATE = 2, H5D_ALLOC_TIME_INCR = 3 } H5D_alloc_time_t; +//! -/* Values for the status of space allocation */ +//! +/** + * Values for the status of space allocation + */ typedef enum H5D_space_status_t { H5D_SPACE_STATUS_ERROR = -1, H5D_SPACE_STATUS_NOT_ALLOCATED = 0, H5D_SPACE_STATUS_PART_ALLOCATED = 1, H5D_SPACE_STATUS_ALLOCATED = 2 } H5D_space_status_t; +//! -/* Values for time of writing fill value property */ +//! +/** + * Values for time of writing fill value property + */ typedef enum H5D_fill_time_t { H5D_FILL_TIME_ERROR = -1, H5D_FILL_TIME_ALLOC = 0, H5D_FILL_TIME_NEVER = 1, H5D_FILL_TIME_IFSET = 2 } H5D_fill_time_t; +//! -/* Values for fill value status */ +//! +/** + * Values for fill value status + */ typedef enum H5D_fill_value_t { H5D_FILL_VALUE_ERROR = -1, H5D_FILL_VALUE_UNDEFINED = 0, H5D_FILL_VALUE_DEFAULT = 1, H5D_FILL_VALUE_USER_DEFINED = 2 } H5D_fill_value_t; +//! -/* Values for VDS bounds option */ +//! +/** + * Values for VDS bounds option + */ typedef enum H5D_vds_view_t { H5D_VDS_ERROR = -1, H5D_VDS_FIRST_MISSING = 0, H5D_VDS_LAST_AVAILABLE = 1 } H5D_vds_view_t; +//! -/* Callback for H5Pset_append_flush() in a dataset access property list */ +//! +/** + * Callback for H5Pset_append_flush() in a dataset access property list + */ typedef herr_t (*H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *op_data); +//! -/* Define the operator function pointer for H5Diterate() */ +//! +/** + * Define the operator function pointer for H5Diterate() + */ typedef herr_t (*H5D_operator_t)(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *operator_data); +//! -/* Define the operator function pointer for H5Dscatter() */ +//! +/** + * Define the operator function pointer for H5Dscatter() + */ typedef herr_t (*H5D_scatter_func_t)(const void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/, void *op_data); +//! -/* Define the operator function pointer for H5Dgather() */ +//! +/** + * Define the operator function pointer for H5Dgather() + */ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_used, void *op_data); +//! /********************/ /* Public Variables */ @@ -127,46 +171,1303 @@ typedef herr_t (*H5D_gather_func_t)(const void *dst_buf, size_t dst_buf_bytes_us extern "C" { #endif -H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, - hid_t dcpl_id, hid_t dapl_id); -H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id, hid_t plist_id, hid_t dapl_id); -H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id); -H5_DLL herr_t H5Dclose(hid_t dset_id); -H5_DLL hid_t H5Dget_space(hid_t dset_id); -H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation); -H5_DLL hid_t H5Dget_type(hid_t dset_id); -H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); -H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Creates a new dataset and links it into the file + * + * \fgdta_loc_id + * \param[in] name Name of the dataset to create + * \type_id + * \space_id + * \lcpl_id + * \dcpl_id + * \dapl_id + * + * \return \hid_t{dataset} + * + * \details H5Dcreate2() creates a new dataset named \p name at + * the location specified by \p loc_id, and associates constant + * and initial persistent properties with that dataset, including + * the datatype \p dtype_id, the dataspace \p space_id, and + * other properties as specified by the dataset creation property + * list \p dcpl_id and the access property list \p dapl_id, + * respectively. Once created, the dataset is opened for access. + * + * \p loc_id may specify a file, group, dataset, named datatype, + * or attribute. If an attribute, dataset, or named datatype is + * specified then the dataset will be created at the location + * where the attribute, dataset, or named datatype is attached. + * + * \p name may be either an absolute path in the file or a relative + * path from \p loc_id naming the dataset. + * + * \p dtype_id specifies the datatype of each data element as stored + * in the file. If \p dtype_id is either a fixed-length or + * variable-length string, it is important to set the string length + * when defining the datatype. String datatypes are derived from + * #H5T_C_S1 (or #H5T_FORTRAN_S1 for Fortran codes), which defaults + * to 1 character in size. + * + * If \p dtype_id is a committed datatype, and if the file location + * associated with the committed datatype is different from the + * file location where the dataset will be created, the datatype + * is copied and converted to a transient type. + * + * The link creation property list, \p lcpl_id, governs creation + * of the link(s) by which the new dataset is accessed and the + * creation of any * intermediate groups that may be missing. + * + * The datatype and dataspace properties and the dataset creation + * and access property lists are attached to the dataset, so the + * caller may derive new datatypes, dataspaces, and creation and + * access properties from the old ones and reuse them in calls to + * create additional datasets. Once created, the dataset can be + * read from or written to. Reading data from a datatset that was + * not previously written, the HDF5 library will return default + * or user-defined fill values. + * + * To conserve and release resources, the dataset should be closed + * when access is no longer required. + * + * \since 1.8.0 + * + * \see H5Dopen2(), H5Dclose(), H5Tset_size() + * + */ +H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, + hid_t dcpl_id, hid_t dapl_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Creates a dataset in a file without linking it into the file + * structure + * + * \fgdta_loc_id + * \type_id + * \space_id + * \dcpl_id + * \dapl_id + * + * \return \hid_t{dataset} + * + * \details H5Dcreate_anon() creates a dataset in the file specified + * by \p loc_id. + * + * \p loc_id may specify a file, group, dataset, named datatype, + * or attribute. If an attribute, dataset, or named datatype is + * specified then the dataset will be created at the location + * where the attribute, dataset, or named datatype is attached. + * + * The dataset’s datatype and dataspace are specified by + * \p type_id and \p space_id, respectively. These are the + * datatype and dataspace of the dataset as it will exist in + * the file, which may differ from the datatype and dataspace + * in application memory. + * + * Dataset creation property list and dataset access creation + * property list are specified by \p dcpl_id and \p dapl_id. + * + * H5Dcreate_anon() returns a new dataset identifier. Using + * this identifier, the new dataset must be linked into the + * HDF5 file structure with H5Olink() or it will be deleted + * from the file when the file is closed. + * + * See H5Dcreate2() for further details and considerations on + * the use of H5Dcreate2() and H5Dcreate_anon(). + * + * The differences between this function and H5Dcreate2() are + * as follows: + * \li H5Dcreate_anon() explicitly includes a dataset access property + * list. H5Dcreate() always uses default dataset access properties. + * + * \li H5Dcreate_anon() neither provides the new dataset’s name nor + * links it into the HDF5 file structure; those actions must be + * performed separately through a call to H5Olink(), which offers + * greater control over linking. + * + * A dataset created with this function should be closed with + * H5Dclose() when the dataset is no longer needed so that resource + * leaks will not develop. + * + * \since 1.8.0 + * + * \see H5Olink(), H5Dcreate(), Using Identifiers + * + */ +H5_DLL hid_t H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Creates a new dataset and links it into the file + * + * \fgdta_loc_id + * \param[in] name Name of the dataset to open + * \dapl_id + * + * \return \hid_t{dataset} + * + * \details H5Dopen2() opens the existing dataset specified + * by a location identifier and name, \p loc_id and \p name, + * respectively. + * + * \p loc_id may specify a file, group, dataset, named datatype, + * or attribute. If an attribute, dataset, or named datatype is + * specified then the dataset will be opened at the location + * where the attribute, dataset, or named datatype is attached. + * + * The dataset access property list, \p dapl_id, provides + * information regarding access to the dataset. + * + * To conserve and release resources, the dataset should be closed + * when access is no longer required. + * + * \since 1.8.0 + * + * \see H5Dcreate2(), H5Dclose() + * + */ +H5_DLL hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id); + +/** + * -------------------------------------------------------------------------- + *\ingroup H5D + * + * \brief Returns an identifier for a copy of the dataspace for a dataset + * + * \dset_id + * + * \return \hid_t{dataspace} + * + * \details H5Dget_space() makes a copy of the dataspace of + * the dataset specified by \p dset_id. The function returns an + * identifier for the new copy of the dataspace. + * + * A dataspace identifier returned from this function should + * be released with H5Sclose() when the identifier is no longer + * needed so that resource leaks will not occur. + * + * \see H5Sclose() + * + */ +H5_DLL hid_t H5Dget_space(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * \todo Document this function! + */ +H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns an identifier for a copy of the datatype for a dataset + * + * \dset_id + * + * \return \hid_t{datatype} + * + * \details H5Dget_type() returns an identifier of a copy of + * the datatype for a dataset. + * + * If a dataset has a named datatype, then an identifier to the + * opened datatype is returned. Otherwise, the returned datatype + * is read-only. If atomization of the datatype fails, then the + * datatype is closed. + * + * A datatype identifier returned from this function should be + * released with H5Tclose() when the identifier is no longer + * needed to prevent resource leaks. + * + * \note Datatype Identifiers + * + * Please note that the datatype identifier is actually an object + * identifier or a handle returned from opening the datatype. It + * is not persistent and its value can be different from one HDF5 + * session to the next. + * + * H5Tequal() can be used to compare datatypes. + * + * HDF5 High Level APIs that may also be of interest are: + * + * H5LTdtype_to_text() creates a text description of a + * datatype. H5LTtext_to_dtype() creates an HDF5 datatype + * given a text description. + * + */ +H5_DLL hid_t H5Dget_type(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns an identifier for a copy of the dataset creation + * property list for a dataset + * + * \dset_id + * + * \return \hid_t{dataset creation property list} + * + * \details H5Dget_create_plist() returns an identifier for + * a copy of the dataset creation property list associated with + * the dataset specified by \p dset_id. + * + * The creation property list identifier should be released + * with H5Pclose() to prevent resource leaks. + * + */ +H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns the dataset access property list associated with + * a dataset + * + * \dset_id + * + * \return \hid_t{dataset access property list} + * + * \details H5Dget_access_plist() returns a copy of the + * dataset access property list used to open the specified + * dataset, \p dset_id. Modifications to the returned property + * list will have no effect on the dataset it was retrieved from. + * + * The chunk cache parameters in the returned property lists will + * be those used by the dataset. If the properties in the file + * access property list were used to determine the dataset's + * chunk cache configuration, then those properties will be + * present in the returned dataset access property list. If + * the dataset does not use a chunked layout, then the chunk + * cache properties will be set to the default. The chunk cache + * properties in the returned list are considered to be “set”, + * and any use of this list will override the corresponding + * properties in the file’s file access property list. + * + * All link access properties in the returned list will be set + * to the default values. + * + * The access property list identifier should be released with + * H5Pclose() when the identifier is no longer needed so that + * resource leaks will not develop. + * + * \since 1.8.3 + * + */ +H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns the amount of storage allocated for a dataset + * + * \dset_id + * + * \return Returns the amount of storage space, in bytes, or 0 (zero). + * + * \details H5Dget_storage_size() returns the amount of storage, + * in bytes, that is allocated in the file for the raw data of + * the dataset specified by \p dset_id. + * + * \note The amount of storage in this case is the storage + * allocated in the written file, which will typically differ + * from the space required to hold a dataset in working memory. + * + * \li For contiguous datasets, the returned size equals the current + * allocated size of the raw data. + * \li For unfiltered chunked datasets, the returned size is the + * number of allocated chunks times the chunk size. + * \li For filtered chunked datasets, the returned size is the + * space required to store the filtered data. For example, if a + * compression filter is in use, H5Dget_storage_size() will return + * the total space required to store the compressed chunks. + * + * H5Dget_storage_size() reports only the space required to store + * the data, not including that of any metadata. + * + * \attention H5Dget_storage_size() does not differentiate between 0 (zero), + * the value returned for the storage size of a dataset + * with no stored values, and 0 (zero), the value returned to + * indicate an error. + * + * \note Note that H5Dget_storage_size() is not generally an + * appropriate function to use when determining the amount + * of memory required to work with a dataset. In such + * circumstances, you must determine the number of data + * points in a dataset and the size of an individual data + * element. H5Sget_simple_extent_npoints() and H5Tget_size() + * can be used to get that information. + * + */ H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id); -H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); -H5_DLL herr_t H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks); -H5_DLL herr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *coord, unsigned *filter_mask, - haddr_t *addr, hsize_t *size); -H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *coord, - unsigned *filter_mask, haddr_t *addr, hsize_t *size); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns the amount of storage allocated within the file for a + * raw data chunk in a dataset + * + * \dset_id + * \param[in] offset Logical offset in the dataset for the chunk to query + * \param[out] chunk_bytes The size in bytes for the chunk + * + * \return \herr_t + * + * \details H5Dget_chunk_storage_size() returns the size in bytes + * allocated in the file for a raw data chunk as specified by + * its logical \p offset in the dataset \p dset_id. The size is + * returned in \p chunk_nbytes. It is the size of the compressed + * data if the chunk is filtered and the size may be zero if no + * storage is allocated yet for the dataset. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Retrieves number of chunks that have nonempty intersection with a + * specified selection + * + * \dset_id + * \param[in] fspace_id File dataspace selection identifier + * \param[out] nchunks Number of chunks in the selection + * + * \return \herr_t + * + * \details H5Dget_num_chunks() retrieves the number of chunks + * nchunks in a set of selected elements specified by \p fspace_id + * for a dataset specified by the identifier \p dset_id. If \p + * fspace_id is #H5S_ALL, the function will retrieve the total + * number of chunks stored for the dataset. + * + * \p fspace_id specifies the file dataspace selection. It is + * intended to take #H5S_ALL for specifying the current selection. + * + * \note Please be aware that this function currently does not + * support non-trivial selections, thus \p fspace_id has no + * effect. Also, the implementation does not handle the #H5S_ALL + * macro correctly. As a workaround, application can get + * the dataspace for the dataset using H5Dget_space() and pass that + * in for \p fspace_id. This will be fixed in coming releases. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Retrieves information about a chunk specified by its coordinates + * + * \dset_id + * \param[in] offset Logical position of the chunk’s first element + * \param[out] filter_mask Indicating filters used with the chunk when written + * \param[out] addr Chunk address in the file + * \param[out] size Chunk size in bytes, 0 if chunk doesn’t exist + * + * \return \herr_t + * + * \details H5Dget_chunk_info_by_coord() retrieves the \p filter_mask, \p size, + * and \p addr for a chunk in the dataset specified by \p dset_id, + * using the coordinates specified by \p offset. + * + * If the queried chunk does not exist in the file, \p size will + * be set to 0, \p addr to \c HADDR_UNDEF, and the buffer \p + * filter_mask will not be modified. + * + * \p offset is a pointer to a one-dimensional array with a size + * equal to the dataset’s rank. Each element is the logical + * position of the chunk’s first element in a dimension. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *offset, unsigned *filter_mask, + haddr_t *addr, hsize_t *size); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Retrieves information about a chunk specified by its index + * + * \dset_id + * \param[in] fspace_id File dataspace selection identifier (See Note below) + * \param[in] chk_idx Index of the chunk + * \param[out] offset Logical position of the chunk’s first element + * \param[out] filter_mask Indicating filters used with the chunk when written + * \param[out] addr Chunk address in the file + * \param[out] size Chunk size in bytes, 0 if chunk doesn’t exist + * + * \return \herr_t + * + * \details H5Dget_chunk_info() retrieves the offset coordinates + * offset, filter mask filter_mask, size size and address addr for + * the dataset specified by the identifier dset_id and the chunk + * specified by the index index. The chunk belongs to a set of + * chunks in the selection specified by fspace_id. If the queried + * chunk does not exist in the file, the size will be set to 0 and + * address to \c HADDR_UNDEF. The value pointed to by filter_mask will + * not be modified. NULL can be passed in for any \p out parameters. + * + * \p chk_idx is the chunk index in the selection. Index value + * may have a value of 0 up to the number of chunks stored in + * the file that have a nonempty intersection with the file + * dataspace selection + * + * \note As of 1.10.5, the dataspace intersection is not yet + * supported, hence, the index is of all the written chunks. + * + * \p fspace_id specifies the file dataspace selection. It is + * intended to take #H5S_ALL for specifying the current selection. + * + * \note Please be aware that this function currently does not + * support non-trivial selections, thus \p fspace_id has no + * effect. Also, the implementation does not handle the #H5S_ALL + * macro correctly. As a workaround, application can get + * the dataspace for the dataset using H5Dget_space() and pass that + * in for \p fspace_id. This will be fixed in coming releases. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *offset, + unsigned *filter_mask, haddr_t *addr, hsize_t *size); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Returns dataset address in file + * + * \dset_id + * + * \return Returns the offset in bytes; otherwise, returns \c HADDR_UNDEF, + * a negative value. + * + * \details H5Dget_offset() returns the address in the file of + * the dataset, \p dset_id. That address is expressed as the + * offset in bytes from the beginning of the file. + * + * \since 1.6.0 + * + */ H5_DLL haddr_t H5Dget_offset(hid_t dset_id); -H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, - hid_t plist_id, void *buf /*out*/); -H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, - hid_t plist_id, const void *buf); -H5_DLL herr_t H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, - size_t data_size, const void *buf); -H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, - void *buf); -H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *operator_data); -H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf); -H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size); -H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, hid_t buf_type, hid_t space); -H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); -H5_DLL herr_t H5Dflush(hid_t dset_id); -H5_DLL herr_t H5Drefresh(hid_t dset_id); -H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, - void *dst_buf); -H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, - void *dst_buf, H5D_gather_func_t op, void *op_data); -H5_DLL herr_t H5Ddebug(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Reads raw data from a dataset into a provided buffer + * + * \dset_id Identifier of the dataset to read from + * \param[in] mem_type_id Identifier of the memory datatype + * \param[in] mem_space_id Identifier of the memory dataspace + * \param[in] file_space_id Identifier of the dataset's dataspace in the file + * \param[in] dxpl_id Identifier of a transfer property list + * \param[out] buf Buffer to receive data read from file + * + * \return \herr_t + * + * \details H5Dread() reads a dataset, specified by its identifier + * \p dset_id, from the file into an application memory buffer \p + * buf. Data transfer properties are defined by the argument \p + * dxpl_id. The memory datatype of the (partial) dataset + * is identified by the identifier \p mem_type_id. The part + * of the dataset to read is defined by \p mem_space_id and \p + * file_space_id. + * + * \p file_space_id is used to specify only the selection within + * the file dataset's dataspace. Any dataspace specified in \p + * file_space_id is ignored by the library and the dataset's + * dataspace is always used. \p file_space_id can be the constant + * #H5S_ALL, which indicates that the entire file dataspace, + * as defined by the current dimensions of the dataset, is to + * be selected. + * + * \p mem_space_id is used to specify both the memory dataspace + * and the selection within that dataspace. \p mem_space_id can + * be the constant #H5S_ALL, in which case the file dataspace is + * used for the memory dataspace and the selection defined with \p + * file_space_id is used for the selection within that dataspace. + * + * If raw data storage space has not been allocated for the dataset + * and a fill value has been defined, the returned buffer \p buf + * is filled with the fill value. + * + * The behavior of the library for the various combinations of + * valid dataspace identifiers and #H5S_ALL for the \p mem_space_id + * and the \p file_space_id parameters is described below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    mem_space_idfile_space_idBehavior
    valid dataspace IDvalid dataspace ID\p mem_space_id specifies the memory dataspace and the + * selection within it. \p file_space_id specifies the + * selection within the file dataset's dataspace.
    #H5S_ALLvalid dataspace IDThe file dataset's dataspace is used for the memory + * dataspace and the selection specified with \p file_space_id + * specifies the selection within it. The combination of the + * file dataset's dataspace and the selection from + * \p file_space_id is used for memory also.
    valid dataspace ID#H5S_ALL\p mem_space_id specifies the memory dataspace and the + * selection within it. The selection within the file + * dataset's dataspace is set to the "all" selection.
    #H5S_ALL#H5S_ALLThe file dataset's dataspace is used for the memory + * dataspace and the selection within the memory dataspace + * is set to the "all" selection. The selection within the + * file dataset's dataspace is set to the "all" selection.
    + * + * \details Setting an #H5S_ALL selection indicates that the entire + * dataspace, as defined by the current dimensions of a dataspace, + * will be selected. The number of elements selected in the memory + * dataspace must match the number of elements selected in the + * file dataspace. + * + * \p dxpl_id can be the constant #H5P_DEFAULT, in which case the + * default data transfer properties are used. + * + */ +H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, + hid_t dxpl_id, void *buf /*out*/); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Writes raw data from a buffer to a dataset + * + * \param[in] dset_id Identifier of the dataset to read from + * \param[in] mem_type_id Identifier of the memory datatype + * \param[in] mem_space_id Identifier of the memory dataspace + * \param[in] file_space_id Identifier of the dataset's dataspace in the file + * \dxpl_id + * \param[out] buf Buffer with data to be written to the file + * + * \return \herr_t + * + * \details H5Dwrite() writes a (partial) dataset, specified by + * its identifier \p dset_id, from the application memory buffer \p + * buf into the file. Data transfer properties are defined by the + * argument \p dxpl_id. The memory datatype of the (partial) + * dataset is identified by the identifier \p mem_type_id. The + * part of the dataset to write is defined by \p mem_space_id + * and \p file_space_id. + * + * If \p mem_type_id is either a fixed-length or variable-length + * string, it is important to set the string length when defining + * the datatype. String datatypes are derived from #H5T_C_S1 + * (or #H5T_FORTRAN_S1 for Fortran codes), which defaults + * to 1 character in size. See H5Tset_size() and Creating + * variable-length string datatypes. + * + * \p file_space_id is used to specify only the selection within + * the file dataset's dataspace. Any dataspace specified in \p + * file_space_id is ignored by the library and the dataset's + * dataspace is always used. \p file_space_id can be the constant + * #H5S_ALL, which indicates that the entire file dataspace, + * as defined by the current dimensions of the dataset, is to + * be selected. + * + * \p mem_space_id is used to specify both the memory dataspace + * and the selection within that dataspace. mem_space_id can be + * the constant #H5S_ALL, in which case the file dataspace is + * used for the memory dataspace and the selection defined with \p + * file_space_id is used for the selection within that dataspace. + * + * The behavior of the library for the various combinations of + * valid dataspace IDs and #H5S_ALL for the mem_space_id and + * thefile_space_id parameters is described below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \c mem_space_id\c file_space_idBehavior
    valid dataspace IDvalid dataspace ID\p mem_space_id specifies the memory dataspace and the + * selection within it. \p file_space_id specifies the + * selection within the file dataset's dataspace.
    #H5S_ALLvalid dataspace IDThe file dataset's dataspace is used for the memory + * dataspace and the selection specified with \p file_space_id + * specifies the selection within it. The combination of the + * file dataset's dataspace and the selection from \p + * file_space_id is used for memory also. valid dataspace + * ID
    valid dataspace ID#H5S_ALL\p mem_space_id specifies the memory dataspace and the + * selection within it. The selection within the file + * dataset's dataspace is set to "all" selection.
    #H5S_ALL#H5S_ALLThe file dataset's dataspace is used for the memory + * dataspace and the selection within the memory dataspace is + * set to the "all" selection. The selection within the file + * dataset's dataspace is set to the "all" + * selection.
    + * Setting an "all" selection indicates that the entire dataspace, + * as defined by the current dimensions of a dataspace, will + * be selected. The number of elements selected in the memory + * dataspace must match the number of elements selected in the + * file dataspace. + * + * \p dxpl_id can be the constant #H5P_DEFAULT, in which + * case the default data transfer properties are used. + * + * Writing to a dataset will fail if the HDF5 file was not opened + * with write access permissions. + * + * If the dataset's space allocation time is set to + * #H5D_ALLOC_TIME_LATE or #H5D_ALLOC_TIME_INCR and the space for + * the dataset has not yet been allocated, that space is allocated + * when the first raw data is written to the dataset. Unused space + * in the dataset will be written with fill values at the same + * time if the dataset's fill time is set to #H5D_FILL_TIME_IFSET + * or #H5D_FILL_TIME_ALLOC. + * + * \attention If a dataset's storage layout is 'compact', care must be + * taken when writing data to the dataset in parallel. A compact + * dataset's raw data is cached in memory and may be flushed + * to the file from any of the parallel processes, so parallel + * applications should always attempt to write identical data to + * the dataset from all processes. + * + * \see H5Pset_fill_time(), H5Pset_alloc_time() + * + */ +H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, + hid_t dxpl_id, const void *buf); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Writes a raw data chunk from a buffer directly to a dataset in a file + * + * \dset_id + * \dxpl_id + * \param[in] filters Mask for identifying the filters in use + * \param[in] offset Logical position of the chunk’s first element in the + * dataspace + * \param[in] data_size Size of the actual data to be written in bytes + * \param[in] buf Buffer containing data to be written to the chunk + * + * \return \herr_t + * + * \details H5Dwrite_chunk() writes a raw data chunk as specified + * by its logical offset \p offset in a chunked dataset \p dset_id + * from the application memory buffer \p buf to the dataset in + * the file. Typically, the data in \p buf is preprocessed in + * memory by a custom transformation, such as compression. The + * chunk will bypass the library’s internal data transfer + * pipeline, including filters, and will be written directly to + * the file. Only one chunk can be written with this function. + * + * H5Dwrite_chunk() replaces the now deprecated H5DOwrite_chunk() + * function, which was located in the high level optimization + * library. The parameters and behavior are identical to the + * original. + * + * \p filters is a mask providing a record of which filters are + * used with the the chunk. The default value of the mask is + * zero (0), indicating that all enabled filters are applied. A + * filter is skipped if the bit corresponding to the filter’s + * position in the pipeline (0 ≤ position < 32) is turned on. + * This mask is saved with the chunk in the file. + * + * \p offset is an array specifying the logical position of the + * first element of the chunk in the dataset’s dataspace. The + * length of the offset array must equal the number of dimensions, + * or rank, of the dataspace. The values in offset must not exceed + * the dimension limits and must specify a point that falls on + * a dataset chunk boundary. + * + * \p data_size is the size in bytes of the chunk, representing + * the number of bytes to be read from the buffer \p buf. If the + * data chunk has been precompressed, \p data_size should be the + * size of the compressed data. + * + * \p buf is the memory buffer containing data to be written to + * the chunk in the file. + * + * \attention Exercise caution when using H5Dread_chunk() and + * H5Dwrite_chunk(), as they read and write data chunks directly + * in a file. H5Dwrite_chunk() bypasses hyperslab selection, the + * conversion of data from one datatype to another, and the filter + * pipeline to write the chunk. Developers should have experience + * with these processes before using this function. Please see + * Using the Direct Chunk Write Function for more information. + * + * \note H5Dread_chunk() and H5Dwrite_chunk() are not supported under + * parallel and do not support variable length types. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, + size_t data_size, const void *buf); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Reads a raw data chunk directly from a dataset in a file into + * a buffer + * + * \dset_id + * \dxpl_id + * \param[in] offset Logical position of the chunk’s first element in the + * dataspace + * \param[in,out] filters Mask for identifying the filters in use + * \param[out] buf Buffer containing data to be written to the chunk + * + * \return \herr_t + * + * \details H5Dread_chunk() reads a raw data chunk as specified by + * its logical offset \p offset in a chunked dataset \p dset_id + * from the dataset in the file into the application memory + * buffer \p buf. The data in \p buf is read directly from the + * file bypassing the library’s internal data transfer pipeline, + * including filters. + * + * \p offset is an array specifying the logical position of the + * first element of the chunk in the dataset’s dataspace. The + * length of the \p offset array must equal the number of dimensions, + * or rank, of the dataspace. The values in \p offset must not exceed + * the dimension limits and must specify a point that falls on + * a dataset chunk boundary. + * + * The mask \p filters indicates which filters are used with the + * chunk when written. A zero value indicates that all enabled + * filters are applied on the chunk. A filter is skipped if the + * bit corresponding to the filter’s position in the pipeline + * (0 ≤ position < 32) is turned on. + * + * \p buf is the memory buffer containing the chunk read from + * the dataset in the file. + * + * \attention Exercise caution when using H5Dread_chunk() and + * H5Dwrite_chunk(), as they read and write data chunks directly + * in a file. H5Dwrite_chunk() bypasses hyperslab selection, the + * conversion of data from one datatype to another, and the filter + * pipeline to write the chunk. Developers should have experience + * with these processes before using this function. Please see + * Using the Direct Chunk Write Function for more information. + * + * \note H5Dread_chunk() and H5Dwrite_chunk() are not supported under + * parallel and do not support variable length types. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, + void *buf); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Iterates over all selected elements in a dataspace + * + * \param[in,out] buf Buffer containing the elements to iterate over + * \type_id + * \space_id + * \param[in] op Function pointer + * \param[in,out] operator_data User-defined data + * + * \return \success{The return value of the first operator that returns + * non-zero, or zero if all members were processed with no + * operator returning non-zero.} + * \return \failure{Negative if an error occurs in the library, or the negative + * value returned by one of the operators.} + * + * \details H5Diterate() iterates over all the data elements + * in the memory buffer \p buf, executing the callback function + * \p op once for each such data element. + * + * The prototype of the callback function \p op is as follows + * (as defined in the source code file H5Lpublic.h): + * \snippet this H5D_operator_t_snip + * The parameters of this callback function are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \c elem[in,out]Pointer to the memory buffer containing the current + * data element
    \c type_id[in]Datatype identifier of the elements stored in elem
    \c ndim[in]Number of dimensions for the point array
    \c point[in]Array containing the location of the element within + * the original dataspace
    \c operator_data[in,out]Pointer to any user-defined data associated with the + * operation
    + * + * The possible return values from the callback function, and + * the effect ofeach,are as follows: + * + * \li Zero causes the iterator to continue, returning zero + * when all data elements have been processed. + * \li A positive value causes the iterator to immediately + * return that positive value, indicating short-circuit success. + * \li A negative value causes the iterator to immediately return + * that value, indicating failure. + * + * The \p operator_data parameter is a user-defined pointer to + * the data required to process dataset elements in the course + * of the iteration. If operator needs to pass data back to the + * application, such data can be returned in this same buffer. This + * pointer is passed back to each step of the iteration in the + * operator callback function’s operator_data parameter. + * + * Unlike other HDF5 iterators, this iteration operation cannot + * be restarted at the point of exit; a second H5Diterate() + * call will always restart at the beginning. + * + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *operator_data); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Reclaims variable-length (VL) datatype memory buffers + * + * \type_id + * \space_id + * \dxpl_id + * \param[in] buf Pointer to the buffer to be reclaimed + * + * \return \herr_t + * + * \details H5Dvlen_reclaim() reclaims memory buffers created to store VL + * datatypes. + * + * The \p type_id must be the datatype stored in the buffer. The \p + * space_id describes the selection for the memory buffer to free the + * VL datatypes within. The \p dxpl_id is the dataset transfer property + * list which was used for the I/O transfer to create the buffer. And + * \p buf is the pointer to the buffer to be reclaimed. + * + * The VL structures (\ref hvl_t) in the user's buffer are modified to + * zero out the VL information after the memory has been reclaimed. + * + * If nested VL datatypes were used to create the buffer, this routine + * frees them from the bottom up, releasing all the memory without + * creating memory leaks. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Determines the number of bytes required to store variable-length + * (VL) data + * + * \dset_id + * \type_id + * \space_id + * \param[out] size Size in bytes of the memory buffer required to store + * the VL data + * + * \return \herr_t + * + * \details H5Dvlen_get_buf_size() determines the number of bytes + * required to store the VL data from the dataset, using \p + * space_id for the selection in the dataset on disk and the \p + * type_id for the memory representation of the VL data in memory. + * \p size is returned with the number of bytes required to store + * the VL data in memory. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dset_id, hid_t type_id, hid_t space_id, hsize_t *size); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Fills dataspace elements with a fill value in a memory buffer + * + * \param[in] fill Pointer to the fill value to be used + * \param[in] fill_type_id Fill value datatype identifier + * \param[in,out] buf Pointer to the memory buffer containing the + * selection to be filled + * \param[in] buf_type_id Datatype of dataspace elements to be filled + * \space_id + * + * \return \herr_t + * + * \details H5Dfill() fills the dataspace selection in memory, \p space_id, + * with the fill value specified in \p fill. If \p fill is NULL, + * a fill value of 0 (zero) is used. + * + * \p fill_type_id specifies the datatype of the fill value. + * \p buf specifies the buffer in which the dataspace elements + * will be written. + * \p buf_type_id specifies the datatype of those data elements. + * + * \note Note that if the fill value datatype differs from the memory + * buffer datatype, the fill value will be converted to the memory + * buffer datatype before filling the selection. + * + * \note Applications sometimes write data only to portions of an + * allocated dataset. It is often useful in such cases to fill + * the unused space with a known fill value. See the following + * function for more information: + * - H5Pset_fill_value() + * - H5Pget_fill_value() + * - H5Pfill_value_defined() + * - H5Pset_fill_time() + * - H5Pget_fill_time() + * - H5Pcreate() + * - H5Pcreate_anon() + * + */ +H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_t space_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Changes the sizes of a dataset’s dimensions + * + * \dset_id + * \param[in] size[] Array containing the new magnitude of each dimension + * of the dataset + * + * \return \herr_t + * + * \details H5Dset_extent() sets the current dimensions of the + * chunked dataset \p dset_id to the sizes specified in size. + * + * \p size is a 1-dimensional array with n elements, where \p n is + * the rank of the dataset’s current dataspace. + * + * This function can be applied to the following datasets: + * - A chunked dataset with unlimited dimensions + * - A chunked dataset with fixed dimensions if the new dimension + * sizes are less than the maximum sizes set with maxdims (see + * H5Screate_simple()) + * - An external dataset with unlimited dimensions + * - An external dataset with fixed dimensions if the new dimension + * sizes are less than the maximum sizes set with \p maxdims + * + * Note that external datasets are always contiguous and can be + * extended only along the first dimension. + * + * Space on disk is immediately allocated for the new dataset extent if + * the dataset’s space allocation time is set to #H5D_ALLOC_TIME_EARLY. + * + * Fill values will be written to the dataset in either of the + * following situations, but not otherwise: + * + * - If the dataset’s fill time is set to #H5D_FILL_TIME_IFSET and a + * fill value is defined (see H5Pset_fill_time() and + * H5Pset_fill_value()) + * - If the dataset’s fill time is set to #H5D_FILL_TIME_ALLOC + * (see H5Pset_alloc_time()) + * + * \note + * \li If the sizes specified in \p size array are smaller than + * the dataset’s current dimension sizes, H5Dset_extent() will reduce + * the dataset’s dimension sizes to the specified values. It is the + * user application’s responsibility to ensure that valuable data is + * not lost as H5Dset_extent() does not check. + * + * \li Except for external datasets, H5Dset_extent() is for use with + * chunked datasets only, not contiguous datasets. + * + * \li A call to H5Dset_extent() affects the dataspace of a dataset. + * If a dataspace handle was opened for a dataset prior to a call to + * H5Dset_extent() then that dataspace handle will no longer reflect + * the correct dataspace extent of the dataset. H5Dget_space() must + * be called (after closing the previous handle) to obtain the current + * dataspace extent. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Flushes all buffers associated with a dataset to disk + * + * \dset_id + * + * \return \herr_t + * + * \details H5Dflush() causes all buffers associated with a + * dataset to be immediately flushed to disk without removing + * the data from the cache. + * + * \note HDF5 does not possess full control over buffering. + * H5Dflush() flushes the internal HDF5 buffers and then asks the + * operating system (the OS) to flush the system buffers for the + * open files. After that, the OS is responsible for ensuring + * that the data is actually flushed to disk. + * + */ +H5_DLL herr_t H5Dflush(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Refreshes all buffers associated with a dataset + * + * \dset_id + * + * \return \herr_t + * + * \details H5Drefresh() causes all buffers associated with a + * dataset to be cleared and immediately re-loaded with updated + * contents from disk. + * + * This function essentially closes the dataset, evicts all + * metadata associated with it from the cache, and then re-opens + * the dataset. The reopened dataset is automatically re-registered + * with the same identifier. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Drefresh(hid_t dset_id); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Scatters data into a selection within a memory buffer + * + * \param[in] op Callback function which provides data to be scattered + * \param[in] op_data User-defined pointer to data required by op + * \param[in] type_id Identifier for the datatype describing the data in + * both the source and destination buffers + * \param[in] dst_space_id Identifier for the dataspace for destination + * \param[out] dst_buf Destination buffer which the data will be scattered to + * + * \return \herr_t + * + * \details H5Dscatter() retrieves data from the supplied callback + * \p op and scatters it to the supplied buffer \p dst_buf in a + * manner similar to data being written to a dataset. + * + * \p dst_space_id is a dataspace which defines the extent of \p + * dst_buf and the selection within it to scatter the data to. + * + * \p type_id is the datatype of the data to be scattered in both + * the source and destination buffers. + * + * \p dst_buf must be at least as large as the number of elements + * in the extent of \p dst_space_id times the size in bytes of + * \p type_id. + * + * To retrieve the data to be scattered, H5Dscatter() repeatedly + * calls \p op, which should return a valid source buffer, until + * enough data to fill the selection has been retrieved. The + * prototype of the callback function \p op is as follows (as + * defined in the source code file H5Dpublic.h): + * \snippet this H5D_scatter_func_t_snip + * The parameters of this callback function are described below: + * + * + * + * + * + * + * + * + * + * + * + *
    \c src_buf[out]Pointer to the buffer holding the next set of elements to + * scatter. On entry, the value of where \c src_buf points to + * is undefined. The callback function should set \c src_buf + * to point to the next set of elements.
    \c src_buf_bytes_used[out]Pointer to the number of valid bytes in \c src_buf. On + * entry, the value where \c src_buf_bytes_used points to is + * undefined. The callback function should set + * \c src_buf_bytes_used to the of valid bytes in \c src_buf. + * This number must be a multiple of the datatype size. + *
    \c op_data[in,out]User-defined pointer to data required by the callback + * function. A pass-through of the \c op_data pointer provided + * with the H5Dscatter() function call.
    + * + * The callback function should always return at least one + * element in \p src_buf, and must not return more elements + * than are remaining to be scattered. This function will be + * repeatedly called until all elements to be scattered have + * been returned. The callback function should return zero (0) + * to indicate success, and a negative value to indicate failure. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hid_t dst_space_id, + void *dst_buf); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Gathers data from a selection within a memory buffer + * raw data chunk in a dataset + * + * \param[in] src_space_id Dataspace identifier for the source buffer + * \param[in] src_buf Source buffer which the data will be gathered from + * \param[in] type_id Datatype identifier for the source + * \param[in] dst_buf_size Size in bytes of \p dst_buf + * \param[out] dst_buf Destination buffer for the gathered data + * \param[in] op Callback function which handles the gathered data + * \param[in] op_data User-defined pointer to data required by \p op + * + * \return \herr_t + * + * \details H5Dgather() retrieves data from a selection within the supplied + * buffer src_buf and passes it to the supplied callback function + * \p op in a contiguous form. + * + * The dataspace \p src_space_id describes both the dimensions of + * the source buffer and the selection within the source buffer + * to gather data from. + * + * \p src_buf must be at least the size of the gathered data, that + * is, the number of elements in the extent of \p src_space_id + * times the size in bytes of \p type_id. + * + * The datatype \p type_id describes the data in both the source + * and destination buffers. This information is used to calculate + * the element size. + * + * The data is gathered into \p dst_buf, which needs to be large + * enough to hold all the data if the callback function \p op is + * not provided. + * + * \p op is a callback function which handles the gathered data. + * It is optional if \p dst_buf is large enough to hold all of the + * gathered data; required otherwise. + * + * If no callback function is provided, H5Dgather() simply gathers + * the data into \p dst_buf and returns. If a callback function is + * provided, H5Dgather() repeatedly gathers up to \p dst_buf_size + * bytes to process the serialized data. The prototype of the + * callback function \p op is as follows (as defined in the source + * code file H5Dpublic.h): + * \snippet this H5D_gather_func_t_snip + * The parameters of this callback function are described in the + * table below. + * + * + * + * + * + * + * + *
    \c dst_bufPointer to the destination buffer which has been filled + * with the next set of elements gathered. This will always be + * identical to the \p dst_buf passed to H5Dgather().
    \c dst_buf_bytes_usedPointer to the number of valid bytes in \p dst_buf. + * This number must be a multiple of the datatype + * size.
    \c op_dataUser-defined pointer to data required by the callback + * function; a pass-through of the \p op_data pointer + * provided with the H5Dgather() function call.
    + * The callback function should process, store, or otherwise, + * make use of the data returned in \p dst_buf before it returns, + * because the buffer will be overwritten unless it is the last + * call to the callback. This function will be repeatedly called + * until all gathered elements have been passed to the callback + * in \p dst_buf. The callback function should return zero (0) + * to indicate success, and a negative value to indicate failure. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, size_t dst_buf_size, + void *dst_buf, H5D_gather_func_t op, void *op_data); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Closes the specified dataset + * + * \dset_id + * + * \return \herr_t + * + * \details H5Dclose() ends access to a dataset specified by \p dset_id + * and releases resources used by it. + * + * \attention Further use of a released dataset identifier is illegal; a + * function using such an identifier will generate an error. + * + * \since 1.8.0 + * + * \see H5Dcreate2(), H5Dopen2() + * + */ +H5_DLL herr_t H5Dclose(hid_t dset_id); /* Internal API routines */ +H5_DLL herr_t H5Ddebug(hid_t dset_id); H5_DLL herr_t H5Dformat_convert(hid_t dset_id); H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); @@ -195,8 +1496,145 @@ H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); /* Typedefs */ /* Function prototypes */ -H5_DLL hid_t H5Dcreate1(hid_t file_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id); -H5_DLL hid_t H5Dopen1(hid_t file_id, const char *name); +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Creates a dataset at the specified location + * + * \fgdta_loc_id + * \param[in] name Name of the dataset to create + * \type_id + * \space_id + * \dcpl_id + * + * \return \hid_t{dataset} + * + * \deprecated This function is deprecated in favor of the function H5Dcreate2() + * or the macro H5Dcreate(). + * + * \details H5Dcreate1() creates a data set with a name, \p name, in the + * location specified by the identifier \p loc_id. \p loc_id may be a + * file, group, dataset, named datatype or attribute. If an attribute, + * dataset, or named datatype is specified for \p loc_id then the + * dataset will be created at the location where the attribute, + * dataset, or named datatype is attached. + * + * \p name can be a relative path based at \p loc_id or an absolute + * path from the root of the file. Use of this function requires that + * any intermediate groups specified in the path already exist. + * + * The dataset’s datatype and dataspace are specified by \p type_id and + * \p space_id, respectively. These are the datatype and dataspace of + * the dataset as it will exist in the file, which may differ from the + * datatype and dataspace in application memory. + * + * Names within a group are unique: H5Dcreate1() will return an error + * if a link with the name specified in name already exists at the + * location specified in \p loc_id. + * + * As is the case for any object in a group, the length of a dataset + * name is not limited. + * + * \p dcpl_id is an #H5P_DATASET_CREATE property list created with \p + * H5reate1() and initialized with various property list functions + * described in Property List Interface. + * + * H5Dcreate() and H5Dcreate_anon() return an error if the dataset’s + * datatype includes a variable-length (VL) datatype and the fill value + * is undefined, i.e., set to \c NULL in the dataset creation property + * list. Such a VL datatype may be directly included, indirectly + * included as part of a compound or array datatype, or indirectly + * included as part of a nested compound or array datatype. + * + * H5Dcreate() and H5Dcreate_anon() return a dataset identifier for + * success or a negative value for failure. The dataset identifier + * should eventually be closed by calling H5Dclose() to release + * resources it uses. + * + * See H5Dcreate_anon() for discussion of the differences between + * H5Dcreate() and H5Dcreate_anon(). + * + * The HDF5 library provides flexible means of specifying a fill value, + * of specifying when space will be allocated for a dataset, and of + * specifying when fill values will be written to a dataset. + * + * \version 1.8.0 Function H5Dcreate() renamed to H5Dcreate1() and deprecated in this release. + * \since 1.0.0 + * + * \see H5Dopen2(), H5Dclose(), H5Tset_size() + * + */ +H5_DLL hid_t H5Dcreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t dcpl_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Opens an existing dataset + * + * \fgdta_loc_id + * \param[in] name Name of the dataset to access + * + * \return \hid_t{dataset} + * + * \deprecated This function is deprecated in favor of the function H5Dopen2() + * or the macro H5Dopen(). + * + * \details H5Dopen1() opens an existing dataset for access at the location + * specified by \p loc_id. \p loc_id may be a file, group, dataset, + * named datatype or attribute. If an attribute, dataset, or named + * datatype is specified for loc_id then the dataset will be opened at + * the location where the attribute, dataset, or named datatype is + * attached. name is a dataset name and is used to identify the dataset + * in the file. + * + * A dataset opened with this function should be closed with H5Dclose() + * when the dataset is no longer needed so that resource leaks will not + * develop. + * + * \version 1.8.0 Function H5Dopen() renamed to H5Dopen1() and deprecated in this release. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Dopen1(hid_t loc_id, const char *name); +/** + * -------------------------------------------------------------------------- + * \ingroup H5D + * + * \brief Extends a dataset + * + * \dset_id + * \param[in] size Array containing the new size of each dimension + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function H5Dset_extent(). + * + * \details H5Dextend() verifies that the dataset is at least of size \p size, + * extending it if necessary. The dimensionality of size is the same as + * that of the dataspace of the dataset being changed. + * + * This function can be applied to the following datasets: + * \li Any dataset with unlimited dimensions + * \li A dataset with fixed dimensions if the current dimension sizes + * are less than the maximum sizes set with \c maxdims + * (see H5Screate_simple()) + * + * Space on disk is immediately allocated for the new dataset extent if + * the dataset’s space allocation time is set to + * #H5D_ALLOC_TIME_EARLY. Fill values will be written to the dataset if + * the dataset’s fill time is set to #H5D_FILL_TIME_IFSET or + * #H5D_FILL_TIME_ALLOC. (See H5Pset_fill_time() and + * H5Pset_alloc_time().) + * + * This function ensures that the dataset dimensions are of at least + * the sizes specified in size. The function H5Dset_extent() must be + * used if the dataset dimension sizes are are to be reduced. + * + * \version 1.8.0 Function Function deprecated in this release. Parameter size + * syntax changed to \Code{const hsize_t size[]} in this release. + * + */ H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Epublic.h b/src/H5Epublic.h index 9e53f54f6e1..2f529b330b9 100644 --- a/src/H5Epublic.h +++ b/src/H5Epublic.h @@ -26,18 +26,29 @@ /* Value for the default error stack */ #define H5E_DEFAULT (hid_t)0 -/* Different kinds of error information */ +/** + * Different kinds of error information + */ typedef enum H5E_type_t { H5E_MAJOR, H5E_MINOR } H5E_type_t; -/* Information about an error; element of error stack */ +/** + * Information about an error; element of error stack + */ typedef struct H5E_error2_t { - hid_t cls_id; /*class ID */ - hid_t maj_num; /*major error ID */ - hid_t min_num; /*minor error number */ - unsigned line; /*line in file where error occurs */ - const char *func_name; /*function in which error occurred */ - const char *file_name; /*file in which error occurred */ - const char *desc; /*optional supplied description */ + hid_t cls_id; + /**< Class ID */ + hid_t maj_num; + /**< Major error ID */ + hid_t min_num; + /**< Minor error number */ + unsigned line; + /**< Line in file where error occurs */ + const char *func_name; + /**< Function in which error occurred */ + const char *file_name; + /**< File in which error occurred */ + const char *desc; + /**< Optional supplied description */ } H5E_error2_t; /* When this header is included from a private header, don't make calls to H5open() */ @@ -138,10 +149,12 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g; goto label; \ } -/* Error stack traversal direction */ +/** + * Error stack traversal direction + */ typedef enum H5E_direction_t { - H5E_WALK_UPWARD = 0, /*begin deep, end at API function */ - H5E_WALK_DOWNWARD = 1 /*begin at API function, end deep */ + H5E_WALK_UPWARD = 0, /**< begin w/ most specific error, end at API function */ + H5E_WALK_DOWNWARD = 1 /**< begin at API function, end w/ most specific error */ } H5E_direction_t; #ifdef __cplusplus @@ -149,29 +162,478 @@ extern "C" { #endif /* Error stack traversal callback function pointers */ +//! +/** + * \brief Callback function for H5Ewalk2() + * + * \param[in] n Indexed error position in the stack + * \param[in] err_desc Pointer to a data structure describing the error + * \param[in] client_data Pointer to client data in the format expected by the + * user-defined function + * \return \herr_t + */ typedef herr_t (*H5E_walk2_t)(unsigned n, const H5E_error2_t *err_desc, void *client_data); +//! + +//! +/** + * \brief Callback function for H5Eset_auto2() + * + * \estack_id{estack} + * \param[in] client_data Pointer to client data in the format expected by the + * user-defined function + * \return \herr_t + */ typedef herr_t (*H5E_auto2_t)(hid_t estack, void *client_data); +//! /* Public API functions */ -H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name, const char *version); -H5_DLL herr_t H5Eunregister_class(hid_t class_id); -H5_DLL herr_t H5Eclose_msg(hid_t err_id); -H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg); -H5_DLL hid_t H5Ecreate_stack(void); -H5_DLL hid_t H5Eget_current_stack(void); -H5_DLL herr_t H5Eclose_stack(hid_t stack_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Registers a client library or application program to the HDF5 error API + * + * \param[in] cls_name Name of the error class + * \param[in] lib_name Name of the client library or application to which the error class belongs + * \param[in] version Version of the client library or application to which the + error class belongs. Can be \c NULL. + * \return Returns a class identifier on success; otherwise returns H5I_INVALID_ID. + * + * \details H5Eregister_class() registers a client library or application + * program to the HDF5 error API so that the client library or + * application program can report errors together with the HDF5 + * library. It receives an identifier for this error class for further + * error operations. The library name and version number will be + * printed out in the error message as a preamble. + * + * \since 1.8.0 + */ +H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name, const char *version); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Removes an error class + * + * \param[in] class_id Error class identifier. + * \return \herr_t + * + * \details H5Eunregister_class() removes the error class specified by \p + * class_id. All the major and minor errors in this class will also be + * closed. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eunregister_class(hid_t class_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Closes an error message + * + * \param[in] err_id An error message identifier + * \return \herr_t + * + * \details H5Eclose_msg() closes an error message identifier, which can be + * either a major or minor message. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eclose_msg(hid_t err_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Adds a major error message to an error class + * + * \param[in] cls An error class identifier + * \param[in] msg_type The type of the error message + * \param[in] msg Major error message + * \return \herr_t + * + * \details H5Ecreate_msg() adds an error message to an error class defined by + * client library or application program. The error message can be + * either major or minor as indicated by the parameter \p msg_type. + * + * Use H5Eclose_msg() to close the message identifier returned by this + * function. + * + * \since 1.8.0 + */ +H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Creates a new, empty error stack + * + * \return \hid_ti{error stack} + * + * \details H5Ecreate_stack() creates a new empty error stack and returns the + * new stack’s identifier. Use H5Eclose_stack() to close the error stack + * identifier returned by this function. + * + * \since 1.8.0 + */ +H5_DLL hid_t H5Ecreate_stack(void); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Returns a copy of the current error stack + * + * \return \hid_ti{error stack} + * + * \details H5Eget_current_stack() copies the current error stack and returns an + * error stack identifier for the new copy. + * + * \since 1.8.0 + */ +H5_DLL hid_t H5Eget_current_stack(void); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Closes an error stack handle + * + * \estack_id{stack_id} + * + * \return \herr_t + * + * \details H5Eclose_stack() closes the error stack handle \p stack_id + * and releases its resources. #H5E_DEFAULT cannot be closed. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eclose_stack(hid_t stack_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Retrieves error class name + * + * \param[in] class_id Error class identifier + * \param[out] name Buffer for the error class name + * \param[in] size The maximum number of characters the class name to be returned + * by this function in\p name. + * \return Returns non-negative value as on success; otherwise returns negative value. + * + * \details H5Eget_class_name() retrieves the name of the error class specified + * by the class identifier. If non-NULL pointer is passed in for \p + * name and \p size is greater than zero, the class name of \p size + * long is returned. The length of the error class name is also + * returned. If NULL is passed in as \p name, only the length of class + * name is returned. If zero is returned, it means no name. The user is + * responsible for allocating sufficient buffer space for the name. + * + * \since 1.8.0 + */ H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size); -H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id); -H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id, - hid_t maj_id, hid_t min_id, const char *msg, ...); -H5_DLL herr_t H5Epop(hid_t err_stack, size_t count); -H5_DLL herr_t H5Eprint2(hid_t err_stack, FILE *stream); -H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void *client_data); -H5_DLL herr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data); -H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data); -H5_DLL herr_t H5Eclear2(hid_t err_stack); -H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Replaces the current error stack + * + * \estack_id{err_stack_id} + * + * \return \herr_t + * + * \details H5Eset_current_stack() replaces the content of the current error + * stack with a copy of the content of the error stack specified by + * \p err_stack_id, and it closes the error stack specified by + * \p err_stack_id. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Pushes a new error record onto an error stack + * + * \estack_id{err_stack}. If the identifier is #H5E_DEFAULT, the error record + * will be pushed to the current stack. + * \param[in] file Name of the file in which the error was detected + * \param[in] func Name of the function in which the error was detected + * \param[in] line Line number in the file where the error was detected + * \param[in] cls_id Error class identifier + * \param[in] maj_id Major error identifier + * \param[in] min_id Minor error identifier + * \param[in] msg Error description string + * \return \herr_t + * + * \details H5Epush2() pushes a new error record onto the error stack specified + * by \p err_stack.\n + * The error record contains the error class identifier \p cls_id, the + * major and minor message identifiers \p maj_id and \p min_id, the + * function name \p func where the error was detected, the file name \p + * file and line number \p line in the file where the error was + * detected, and an error description \p msg.\n + * The major and minor errors must be in the same error class.\n + * The function name, filename, and error description strings must be + * statically allocated.\n + * \p msg can be a format control string with additional + * arguments. This design of appending additional arguments is similar + * to the system and C functions printf() and fprintf(). + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id, + hid_t maj_id, hid_t min_id, const char *msg, ...); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Deletes specified number of error messages from the error stack + * + * \estack_id{err_stack} + * \param[in] count The number of error messages to be deleted from the top + * of error stack + * \return \herr_t + * + * \details H5Epop() deletes the number of error records specified in \p count + * from the top of the error stack specified by \p err_stack (including + * major, minor messages and description). The number of error messages + * to be deleted is specified by \p count. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Epop(hid_t err_stack, size_t count); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Prints the specified error stack in a default manner + * + * \estack_id{err_stack} + * \param[in] stream File pointer, or \c NULL for \c stderr + * \return \herr_t + * + * \details H5Eprint2() prints the error stack specified by \p err_stack on the + * specified stream, \p stream. Even if the error stack is empty, a + * one-line message of the following form will be printed: + * \code{.unparsed} + * HDF5-DIAG: Error detected in HDF5 library version: 1.5.62 thread 0. + * \endcode + * + * A similar line will appear before the error messages of each error + * class stating the library name, library version number, and thread + * identifier. + * + * If \p err_stack is #H5E_DEFAULT, the current error stack will be + * printed. + * + * H5Eprint2() is a convenience function for H5Ewalk2() with a function + * that prints error messages. Users are encouraged to write their own + * more specific error handlers. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eprint2(hid_t err_stack, FILE *stream); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Walks the specified error stack, calling the specified function + * + * \estack_id{err_stack} + * \param[in] direction Direction in which the error stack is to be walked + * \param[in] func Function to be called for each error encountered + * \param[in] client_data Data to be passed to \p func + * \return \herr_t + * + * \details H5Ewalk2() walks the error stack specified by err_stack for the + * current thread and calls the function specified in \p func for each + * error along the way. + * + * If the value of \p err_stack is #H5E_DEFAULT, then H5Ewalk2() walks + * the current error stack. + * + * \p direction specifies whether the stack is walked from the inside + * out or the outside in. A value of #H5E_WALK_UPWARD means to begin + * with the most specific error and end at the API; a value of + * #H5E_WALK_DOWNWARD means to start at the API and end at the + * innermost function where the error was first detected. + * + * \p func, a function conforming to the #H5E_walk2_t prototype, will + * be called for each error in the error stack. Its arguments will + * include an index number \c n (beginning at zero regardless of stack + * traversal direction), an error stack entry \c err_desc, and the \c + * client_data pointer passed to H5Eprint(). The #H5E_walk2_t prototype + * is as follows: + * \snippet this H5E_walk2_t_snip + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Ewalk2(hid_t err_stack, H5E_direction_t direction, H5E_walk2_t func, void *client_data); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Returns the settings for the automatic error stack traversal + * function and its data + * + * \estack_id + * \param[out] func The function currently set to be called upon an error condition + * \param[out] client_data Data currently set to be passed to the error function + * \return \herr_t + * + * \details H5Eget_auto2() returns the settings for the automatic error stack + * traversal function, \p func, and its data, \p client_data, that are + * associated with the error stack specified by \p estack_id. + * + * Either or both of the \p func and \p client_data arguments may be + * \c NULL, in which case the value is not returned. + * + * The library initializes its default error stack traversal functions + * to H5Eprint1() and H5Eprint2(). A call to H5Eget_auto2() returns + * H5Eprint2() or the user-defined function passed in through + * H5Eset_auto2(). A call to H5Eget_auto1() returns H5Eprint1() or the + * user-defined function passed in through H5Eset_auto1(). However, if + * the application passes in a user-defined function through + * H5Eset_auto1(), it should call H5Eget_auto1() to query the traversal + * function. If the application passes in a user-defined function + * through H5Eset_auto2(), it should call H5Eget_auto2() to query the + * traversal function. + * + * Mixing the new style and the old style functions will cause a + * failure. For example, if the application sets a user-defined + * old-style traversal function through H5Eset_auto1(), a call to + * H5Eget_auto2() will fail and will indicate that the application has + * mixed H5Eset_auto1() and H5Eget_auto2(). On the other hand, mixing + * H5Eset_auto2() and H5Eget_auto1() will also cause a failure. But if + * the traversal functions are the library’s default H5Eprint1() or + * H5Eprint2(), mixing H5Eset_auto1() and H5Eget_auto2() or mixing + * H5Eset_auto2() and H5Eget_auto1() does not fail. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eget_auto2(hid_t estack_id, H5E_auto2_t *func, void **client_data); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Turns automatic error printing on or off + * + * \estack_id + * \param[in] func Function to be called upon an error condition + * \param[in] client_data Data passed to the error function + * \return \herr_t + * + * \details H5Eset_auto2() turns on or off automatic printing of errors for the + * error stack specified with \p estack_id. An \p estack_id value of + * #H5E_DEFAULT indicates the current stack. + * + * When automatic printing is turned on, by the use of a non-null \p func + * pointer, any API function which returns an error indication will + * first call \p func, passing it \p client_data as an argument. + * + * \p func, a function compliant with the #H5E_auto2_t prototype, is + * defined in the H5Epublic.h source code file as: + * \snippet this H5E_auto2_t_snip + * + * When the library is first initialized, the auto printing function is + * set to H5Eprint2() (cast appropriately) and \p client_data is the + * standard error stream pointer, \c stderr. + * + * Automatic stack traversal is always in the #H5E_WALK_DOWNWARD + * direction. + * + * Automatic error printing is turned off with a H5Eset_auto2() call + * with a \c NULL \p func pointer. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Clears the specified error stack or the error stack for the current thread + * + * \estack_id{err_stack} + * \return \herr_t + * + * \details H5Eclear2() clears the error stack specified by \p err_stack, or, if + * \p err_stack is set to #H5E_DEFAULT, the error stack for the current + * thread. + * + * \p err_stack is an error stack identifier, such as that returned by + * H5Eget_current_stack(). + * + * The current error stack is also cleared whenever an API function is + * called, with certain exceptions (for instance, H5Eprint1() or + * H5Eprint2()). + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eclear2(hid_t err_stack); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Determines the type of error stack + * + * \estack_id{err_stack} + * \param[out] is_stack A flag indicating which error stack \c typedef the + * specified error stack conforms to + * + * \return \herr_t + * + * \details H5Eauto_is_v2() determines whether the error auto reporting function + * for an error stack conforms to the #H5E_auto2_t \c typedef or the + * #H5E_auto1_t \c typedef. + * + * The \p is_stack parameter is set to 1 if the error stack conforms to + * #H5E_auto2_t and 0 if it conforms to #H5E_auto1_t. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Retrieves an error message + * + * \param[in] msg_id Error message identifier + * \param[out] type The type of the error message Valid values are #H5E_MAJOR + * and #H5E_MINOR. + * \param[out] msg Error message buffer + * \param[in] size The length of error message to be returned by this function + * \return Returns the size of the error message in bytes on success; otherwise + * returns a negative value. + * + * \details H5Eget_msg() retrieves the error message including its length and + * type. The error message is specified by \p msg_id. The user is + * responsible for passing in sufficient buffer space for the + * message. If \p msg is not NULL and \p size is greater than zero, the + * error message of \p size long is returned. The length of the message + * is also returned. If NULL is passed in as \p msg, only the length + * and type of the message is returned. If the return value is zero, it + * means there is no message. + * + * \since 1.8.0 + */ H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg, size_t size); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Retrieves the number of error messages in an error stack + * + * \estack_id{error_stack_id} + * \return Returns a non-negative value on success; otherwise returns a negative value. + * + * \details H5Eget_num() retrieves the number of error records in the error + * stack specified by \p error_stack_id (including major, minor + * messages and description). + * + * \since 1.8.0 + */ H5_DLL ssize_t H5Eget_num(hid_t error_stack_id); /* Symbols defined for compatibility with previous versions of the HDF5 API. @@ -188,30 +650,259 @@ H5_DLL ssize_t H5Eget_num(hid_t error_stack_id); typedef hid_t H5E_major_t; typedef hid_t H5E_minor_t; -/* Information about an error element of error stack. */ +/** + * Information about an error element of error stack. + */ typedef struct H5E_error1_t { - H5E_major_t maj_num; /*major error number */ - H5E_minor_t min_num; /*minor error number */ - const char *func_name; /*function in which error occurred */ - const char *file_name; /*file in which error occurred */ - unsigned line; /*line in file where error occurs */ - const char *desc; /*optional supplied description */ + H5E_major_t maj_num; /**< major error number */ + H5E_minor_t min_num; /**< minor error number */ + const char *func_name; /**< function in which error occurred */ + const char *file_name; /**< file in which error occurred */ + unsigned line; /**< line in file where error occurs */ + const char *desc; /**< optional supplied description */ } H5E_error1_t; /* Error stack traversal callback function pointers */ +//! +/** + * \brief Callback function for H5Ewalk1() + * + * \param[in] n Indexed error position in the stack + * \param[in] err_desc Pointer to a data structure describing the error + * \param[in] client_data Pointer to client data in the format expected by the + * user-defined function + * \return \herr_t + */ typedef herr_t (*H5E_walk1_t)(int n, H5E_error1_t *err_desc, void *client_data); +//! + +//! +/** + * \brief Callback function for H5Eset_auto1() + * + * \param[in] client_data Pointer to client data in the format expected by the + * user-defined function + * \return \herr_t + */ typedef herr_t (*H5E_auto1_t)(void *client_data); +//! /* Function prototypes */ +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Clears the error stack for the current thread + * + * \return \herr_t + * + * \details H5Eclear1() clears the error stack for the current thread.\n + * The stack is also cleared whenever an API function is called, with + * certain exceptions (for instance, H5Eprint1()). + * + * \deprecated 1.8.0 Function H5Eclear() renamed to H5Eclear1() and deprecated + * in this release. + */ H5_DLL herr_t H5Eclear1(void); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Returns the current settings for the automatic error stack traversal + * function and its data + * + * \param[out] func Current setting for the function to be called upon an error + * condition + * \param[out] client_data Current setting for the data passed to the error + * function + * \return \herr_t + * + * \details H5Eget_auto1() returns the current settings for the automatic error + * stack traversal function, \p func, and its data, + * \p client_data. Either or both arguments may be \c NULL, in which case the + * value is not returned. + * + * The library initializes its default error stack traversal functions + * to H5Eprint1() and H5Eprint2(). A call to H5Eget_auto2() returns + * H5Eprint2() or the user-defined function passed in through + * H5Eset_auto2(). A call to H5Eget_auto1() returns H5Eprint1() or the + * user-defined function passed in through H5Eset_auto1(). However, if + * the application passes in a user-defined function through + * H5Eset_auto1(), it should call H5Eget_auto1() to query the traversal + * function. If the application passes in a user-defined function + * through H5Eset_auto2(), it should call H5Eget_auto2() to query the + * traversal function. + * + * Mixing the new style and the old style functions will cause a + * failure. For example, if the application sets a user-defined + * old-style traversal function through H5Eset_auto1(), a call to + * H5Eget_auto2() will fail and will indicate that the application has + * mixed H5Eset_auto1() and H5Eget_auto2(). On the other hand, mixing + * H5Eset_auto2() and H5Eget_auto1() will also cause a failure. But if + * the traversal functions are the library’s default H5Eprint1() or + * H5Eprint2(), mixing H5Eset_auto1() and H5Eget_auto2() or mixing + * H5Eset_auto2() and H5Eget_auto1() does not fail. + * + * \deprecated 1.8.0 Function H5Eget_auto() renamed to H5Eget_auto1() and + * deprecated in this release. + */ H5_DLL herr_t H5Eget_auto1(H5E_auto1_t *func, void **client_data); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Pushes a new error record onto the error stack + * + * \param[in] file Name of the file in which the error was detected + * \param[in] func Name of the function in which the error was detected + * \param[in] line Line number in the file where the error was detected + * \param[in] maj Major error identifier + * \param[in] min Minor error identifier + * \param[in] str Error description string + * \return \herr_t + * + * \details H5Epush1() pushes a new error record onto the error stack for the + * current thread.\n + * The error has major and minor numbers \p maj_num + * and \p min_num, the function \p func where the error was detected, the + * name of the file \p file where the error was detected, the line \p line + * within that file, and an error description string \p str.\n + * The function name, filename, and error description strings must be statically + * allocated. + * + * \since 1.4.0 + * \deprecated 1.8.0 Function H5Epush() renamed to H5Epush1() and + * deprecated in this release. + */ H5_DLL herr_t H5Epush1(const char *file, const char *func, unsigned line, H5E_major_t maj, H5E_minor_t min, const char *str); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Prints the current error stack in a default manner + * + * \param[in] stream File pointer, or \c NULL for \c stderr + * \return \herr_t + * + * \details H5Eprint1() prints prints the error stack for the current thread + * on the specified stream, \p stream. Even if the error stack is empty, a + * one-line message of the following form will be printed: + * \code{.unparsed} + * HDF5-DIAG: Error detected in thread 0. + * \endcode + * H5Eprint1() is a convenience function for H5Ewalk1() with a function + * that prints error messages. Users are encouraged to write their own + * more specific error handlers. + * + * \deprecated 1.8.0 Function H5Eprint() renamed to H5Eprint1() and + * deprecated in this release. + */ H5_DLL herr_t H5Eprint1(FILE *stream); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Turns automatic error printing on or off + * + * \param[in] func Function to be called upon an error condition + * \param[in] client_data Data passed to the error function + * \return \herr_t + * + * \details H5Eset_auto1() turns on or off automatic printing of errors. When + * turned on (non-null \p func pointer), any API function which returns + * an error indication will first call \p func, passing it \p + * client_data as an argument. + * + * \p func, a function conforming to the #H5E_auto1_t prototype, is + * defined in the H5Epublic.h source code file as: + * \snippet this H5E_auto1_t_snip + * + * When the library is first initialized, the auto printing function is + * set to H5Eprint1() (cast appropriately) and \p client_data is the + * standard error stream pointer, \c stderr. + * + * Automatic stack traversal is always in the #H5E_WALK_DOWNWARD + * direction. + * + * \deprecated 1.8.0 Function H5Eset_auto() renamed to H5Eset_auto1() and + * deprecated in this release. + */ H5_DLL herr_t H5Eset_auto1(H5E_auto1_t func, void *client_data); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Walks the current error stack, calling the specified function + * + * \param[in] direction Direction in which the error stack is to be walked + * \param[in] func Function to be called for each error encountered + * \param[in] client_data Data to be passed to \p func + * \return \herr_t + * + * \details H5Ewalk1() walks the error stack for the current thread and calls + * the function specified in \p func for each error along the way. + * + * \p direction specifies whether the stack is walked from the inside + * out or the outside in. A value of #H5E_WALK_UPWARD means to begin + * with the most specific error and end at the API; a value of + * #H5E_WALK_DOWNWARD means to start at the API and end at the + * innermost function where the error was first detected. + * + * \p func, a function conforming to the #H5E_walk1_t prototype, will + * be called for each error in the error stack. Its arguments will + * include an index number \c n (beginning at zero regardless of stack + * traversal direction), an error stack entry \c err_desc, and the \c + * client_data pointer passed to H5Eprint(). The #H5E_walk1_t prototype + * is as follows: + * \snippet this H5E_walk1_t_snip + * + * \deprecated 1.8.0 Function H5Ewalk() renamed to H5Ewalk1() and + * deprecated in this release. + */ H5_DLL herr_t H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data); -H5_DLL char * H5Eget_major(H5E_major_t maj); -H5_DLL char * H5Eget_minor(H5E_minor_t min); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Returns a character string describing an error specified by a major + * error number + * + * \param[in] maj Major error number + * \return \herr_t + * + * \details Given a major error number, H5Eget_major() returns a constant + * character string that describes the error. + * + * \attention This function returns a dynamically allocated string (\c char + * array). An application calling this function must free the memory + * associated with the return value to prevent a memory leak. + * + * \deprecated 1.8.0 Function deprecated in this release. + */ +H5_DLL char *H5Eget_major(H5E_major_t maj); +/** + * -------------------------------------------------------------------------- + * \ingroup H5E + * + * \brief Returns a character string describing an error specified by a minor + * error number + * + * \param[in] min Minor error number + * \return \herr_t + * + * \details Given a minor error number, H5Eget_minor() returns a constant + * character string that describes the error. + * + * \attention In the Release 1.8.x series, H5Eget_minor() returns a string of + * dynamic allocated \c char array. An application calling this + * function from an HDF5 library of Release 1.8.0 or later must free + * the memory associated with the return value to prevent a memory + * leak. This is a change from the 1.6.x release series. + * + * \deprecated 1.8.0 Function deprecated and return type changed in this release. + */ +H5_DLL char *H5Eget_minor(H5E_minor_t min); #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus diff --git a/src/H5FDcore.h b/src/H5FDcore.h index f8a516a379a..d456c3efb57 100644 --- a/src/H5FDcore.h +++ b/src/H5FDcore.h @@ -25,8 +25,70 @@ #ifdef __cplusplus extern "C" { #endif -H5_DLL hid_t H5FD_core_init(void); +H5_DLL hid_t H5FD_core_init(void); + +/** + * \ingroup FAPL + * + * \brief Modifies the file access property list to use the #H5FD_CORE driver + * + * \fapl_id + * \param[in] increment Size, in bytes, of memory increments + * \param[in] backing_store Boolean flag indicating whether to write the file + * contents to disk when the file is closed + * \returns \herr_t + * + * \details H5Pset_fapl_core() modifies the file access property list to use the + * #H5FD_CORE driver. + * + * The #H5FD_CORE driver enables an application to work with a file in + * memory, speeding reads and writes as no disk access is made. File + * contents are stored only in memory until the file is closed. The \p + * backing_store parameter determines whether file contents are ever + * written to disk. + * + * \p increment specifies the increment by which allocated memory is to + * be increased each time more memory is required. + * + * While using H5Fcreate() to create a core file, if the \p + * backing_store is set to 1 (TRUE), the file contents are flushed to a + * file with the same name as this core file when the file is closed or + * access to the file is terminated in memory. + * + * The application is allowed to open an existing file with #H5FD_CORE + * driver. While using H5Fopen() to open an existing file, if the \p + * backing_store is set to 1 (TRUE) and the \c flags for H5Fopen() is set to + * #H5F_ACC_RDWR, any change to the file contents are saved to the file + * when the file is closed. If \p backing_store is set to 0 (FALSE) and the \c + * flags for H5Fopen() is set to #H5F_ACC_RDWR, any change to the file + * contents will be lost when the file is closed. If the flags for + * H5Fopen() is set to #H5F_ACC_RDONLY, no change to the file is + * allowed either in memory or on file. + * + * \note Currently this driver cannot create or open family or multi files. + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store); + +/** + * \ingroup FAPL + * + * \brief Queries core file driver properties + * + * \fapl_id + * \param[out] increment Size, in bytes, of memory increments + * \param[out] backing_store Boolean flag indicating whether to write the file + * contents to disk when the file is closed + * \returns \herr_t + * + * \details H5Pget_fapl_core() queries the #H5FD_CORE driver properties as set + * by H5Pset_fapl_core(). + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/); #ifdef __cplusplus } diff --git a/src/H5FDdirect.h b/src/H5FDdirect.h index eec10dea3c0..f06de7f4160 100644 --- a/src/H5FDdirect.h +++ b/src/H5FDdirect.h @@ -37,8 +37,69 @@ extern "C" { #define FBSIZE_DEF 4096 #define CBSIZE_DEF 16 * 1024 * 1024 -H5_DLL hid_t H5FD_direct_init(void); +H5_DLL hid_t H5FD_direct_init(void); + +/** + * \ingroup FAPL + * + * \brief Sets up use of the direct I/O driver + * + * \fapl_id + * \param[in] alignment Required memory alignment boundary + * \param[in] block_size File system block size + * \param[in] cbuf_size Copy buffer size + * \returns \herr_t + * + * \details H5Pset_fapl_direct() sets the file access property list, \p fapl_id, + * to use the direct I/O driver, #H5FD_DIRECT. With this driver, data + * is written to or read from the file synchronously without being + * cached by the system. + * + * File systems usually require the data address in memory, the file + * address, and the size of the data to be aligned. The HDF5 library’s + * direct I/O driver is able to handle unaligned data, though that will + * consume some additional memory resources and may slow + * performance. To get better performance, use the system function \p + * posix_memalign to align the data buffer in memory and the HDF5 + * function H5Pset_alignment() to align the data in the file. Be aware, + * however, that aligned data I/O may cause the HDF5 file to be bigger + * than the actual data size would otherwise require because the + * alignment may leave some holes in the file. + * + * \p alignment specifies the required alignment boundary in memory. + * + * \p block_size specifies the file system block size. A value of 0 + * (zero) means to use HDF5 library’s default value of 4KB. + * + * \p cbuf_size specifies the copy buffer size. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size, size_t cbuf_size); + +/** + * \ingroup FAPL + * + * \brief Retrieves direct I/O driver settings + * + * \fapl_id + * \param[out] boundary Required memory alignment boundary + * \param[out] block_size File system block size + * \param[out] cbuf_size Copy buffer size + * \returns \herr_t + * + * \details H5Pget_fapl_direct() retrieves the required memory alignment (\p + * alignment), file system block size (\p block_size), and copy buffer + * size (\p cbuf_size) settings for the direct I/O driver, #H5FD_DIRECT, + * from the file access property list \p fapl_id. + * + * See H5Pset_fapl_direct() for discussion of these values, + * requirements, and important considerations. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size /*out*/, size_t *cbuf_size /*out*/); diff --git a/src/H5FDfamily.h b/src/H5FDfamily.h index f00836fa5db..20ef5325924 100644 --- a/src/H5FDfamily.h +++ b/src/H5FDfamily.h @@ -26,8 +26,58 @@ extern "C" { #endif -H5_DLL hid_t H5FD_family_init(void); +H5_DLL hid_t H5FD_family_init(void); + +/** + * \ingroup FAPL + * + * \brief Sets the file access property list to use the family driver + * + * \fapl_id + * \param[in] memb_size Size in bytes of each file member + * \param[in] memb_fapl_id Identifier of file access property list for + * each family member + * \returns \herr_t + * + * \details H5Pset_fapl_family() sets the file access property list identifier, + * \p fapl_id, to use the family driver. + * + * \p memb_size is the size in bytes of each file member. This size + * will be saved in file when the property list \p fapl_id is used to + * create a new file. If \p fapl_id is used to open an existing file, + * \p memb_size has to be equal to the original size saved in file. A + * failure with an error message indicating the correct member size + * will be returned if \p memb_size does not match the size saved. If + * any user does not know the original size, #H5F_FAMILY_DEFAULT can be + * passed in. The library will retrieve the saved size. + * + * \p memb_fapl_id is the identifier of the file access property list + * to be used for each family member. + * + * \version 1.8.0 Behavior of the \p memb_size parameter was changed. + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size, hid_t memb_fapl_id); + +/** + * \ingroup FAPL + * + * \brief Returns file access property list information + * + * \fapl_id + * \param[out] memb_size Size in bytes of each file member + * \param[out] memb_fapl_id Identifier of file access property list for + * each family member + * \returns \herr_t + * + * \details H5Pget_fapl_family() returns file access property list for use with + * the family driver. This information is returned through the output + * parameters. + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size /*out*/, hid_t *memb_fapl_id /*out*/); #ifdef __cplusplus diff --git a/src/H5FDhdfs.h b/src/H5FDhdfs.h index 9e46954103b..219d0acdfa8 100644 --- a/src/H5FDhdfs.h +++ b/src/H5FDhdfs.h @@ -111,8 +111,20 @@ typedef struct H5FD_hdfs_fapl_t { extern "C" { #endif -H5_DLL hid_t H5FD_hdfs_init(void); +H5_DLL hid_t H5FD_hdfs_init(void); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_out); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa); #ifdef __cplusplus diff --git a/src/H5FDlog.h b/src/H5FDlog.h index aa1f3cbe41f..969c09131cc 100644 --- a/src/H5FDlog.h +++ b/src/H5FDlog.h @@ -65,7 +65,410 @@ extern "C" { #endif -H5_DLL hid_t H5FD_log_init(void); +H5_DLL hid_t H5FD_log_init(void); + +/** + * \ingroup FAPL + * + * \brief Sets up the logging virtual file driver (#H5FD_LOG) for use + * + * \fapl_id + * \param[in] logfile Name of the log file + * \param[in] flags Flags specifying the types of logging activity + * \param[in] buf_size The size of the logging buffers, in bytes (see description) + * \returns \herr_t + * + * \details H5Pset_fapl_log() modifies the file access property list to use the + * logging driver, #H5FD_LOG. The logging virtual file driver (VFD) is + * a clone of the standard SEC2 (#H5FD_SEC2) driver with additional + * facilities for logging VFD metrics and activity to a file. + * + * \p logfile is the name of the file in which the logging entries are + * to be recorded. + * + * The actions to be logged are specified in the parameter \p flags + * using the pre-defined constants described in the following + * table. Multiple flags can be set through the use of a logical \c OR + * contained in parentheses. For example, logging read and write + * locations would be specified as + * \Code{(H5FD_LOG_LOC_READ|H5FD_LOG_LOC_WRITE)}. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Table1: Logging Flags
    + * #H5FD_LOG_LOC_READ + * + * Track the location and length of every read, write, or seek operation. + *
    #H5FD_LOG_LOC_WRITE
    #H5FD_LOG_LOC_SEEK
    + * #H5FD_LOG_LOC_IO + * + * Track all I/O locations and lengths. The logical equivalent of the following: + * \Code{(#H5FD_LOG_LOC_READ | #H5FD_LOG_LOC_WRITE | #H5FD_LOG_LOC_SEEK)} + *
    + * #H5FD_LOG_FILE_READ + * + * Track the number of times each byte is read or written. + *
    #H5FD_LOG_FILE_WRITE
    + * #H5FD_LOG_FILE_IO + * + * Track the number of times each byte is read and written. The logical + * equivalent of the following: + * \Code{(#H5FD_LOG_FILE_READ | #H5FD_LOG_FILE_WRITE)} + *
    + * #H5FD_LOG_FLAVOR + * + * Track the type, or flavor, of information stored at each byte. + *
    + * #H5FD_LOG_NUM_READ + * + * Track the total number of read, write, seek, or truncate operations that occur. + *
    #H5FD_LOG_NUM_WRITE
    #H5FD_LOG_NUM_SEEK
    #H5FD_LOG_NUM_TRUNCATE
    + * #H5FD_LOG_NUM_IO + * + * Track the total number of all types of I/O operations. The logical equivalent + * of the following: + * \Code{(#H5FD_LOG_NUM_READ | #H5FD_LOG_NUM_WRITE | #H5FD_LOG_NUM_SEEK | #H5FD_LOG_NUM_TRUNCATE)} + *
    + * #H5FD_LOG_TIME_OPEN + * + * Track the time spent in open, stat, read, write, seek, or close operations. + *
    #H5FD_LOG_TIME_STAT
    #H5FD_LOG_TIME_READ
    #H5FD_LOG_TIME_WRITE
    #H5FD_LOG_TIME_SEEK
    #H5FD_LOG_TIME_CLOSE
    + * #H5FD_LOG_TIME_IO + * + * Track the time spent in each of the above operations. The logical equivalent + * of the following: + * \Code{(#H5FD_LOG_TIME_OPEN | #H5FD_LOG_TIME_STAT | #H5FD_LOG_TIME_READ | #H5FD_LOG_TIME_WRITE | + * #H5FD_LOG_TIME_SEEK | #H5FD_LOG_TIME_CLOSE)} + *
    + * #H5FD_LOG_ALLOC + * + * Track the allocation of space in the file. + *
    + * #H5FD_LOG_ALL + * + * Track everything. The logical equivalent of the following: + * \Code{(#H5FD_LOG_ALLOC | #H5FD_LOG_TIME_IO | #H5FD_LOG_NUM_IO | #H5FD_LOG_FLAVOR | #H5FD_LOG_FILE_IO | + * #H5FD_LOG_LOC_IO)} + *
    + * The logging driver can track the number of times each byte in the file is + * read from or written to (using #H5FD_LOG_FILE_READ and #H5FD_LOG_FILE_WRITE) + * and what kind of data is at that location (e.g., metadata, raw data; using + * #H5FD_LOG_FLAVOR). This information is tracked in internal buffers of size + * buf_size, which must be at least the maximum size in bytes of the file to be + * logged while the log driver is in use.\n + * One buffer of size buf_size will be created for each of #H5FD_LOG_FILE_READ, + * #H5FD_LOG_FILE_WRITE and #H5FD_LOG_FLAVOR when those flags are set; these + * buffers will not grow as the file increases in size. + * + * \par Output: + * This section describes the logging driver (LOG VFD) output.\n + * The table, immediately below, describes output of the various logging driver + * flags and function calls. A list of valid flavor values, describing the type + * of data stored, follows the table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Table2: Logging Output
    FlagVFD CallOutput and Comments
    #H5FD_LOG_LOC_READRead + * \Code{%10a-%10a (%10Zu bytes) (%s) Read}\n\n + * Start position\n + * End position\n + * Number of bytes\n + * Flavor of read\n\n + * Adds \Code{(\%f s)} and seek time if #H5FD_LOG_TIME_SEEK is also set. + *
    #H5FD_LOG_LOC_READRead Error + * \Code{Error! Reading: %10a-%10a (%10Zu bytes)}\n\n + * Same parameters as non-error entry. + *
    #H5FD_LOG_LOC_WRITEWrite + * \Code{%10a-%10a (%10Zu bytes) (%s) Written}\n\n + * Start position\n + * End position\n + * Number of bytes\n + * Flavor of write\n\n + * Adds \Code{(\%f s)} and seek time if #H5FD_LOG_TIME_SEEK is also set. + *
    #H5FD_LOG_LOC_WRITEWrite Error + * \Code{Error! Writing: %10a-%10a (%10Zu bytes)}\n\n + * Same parameters as non-error entry. + *
    #H5FD_LOG_LOC_SEEKRead, Write + * \Code{Seek: From %10a-%10a}\n\n + * Start position\n + * End position\n\n + * Adds \Code{(\%f s)} and seek time if #H5FD_LOG_TIME_SEEK is also set. + *
    #H5FD_LOG_FILE_READClose + * Begins with:\n + * Dumping read I/O information\n\n + * Then, for each range of identical values, there is this line:\n + * \Code{Addr %10-%10 (%10lu bytes) read from %3d times}\n\n + * Start address\n + * End address\n + * Number of bytes\n + * Number of times read\n\n + * Note: The data buffer is scanned and each range of identical values + * gets one entry in the log file to save space and make it easier to read. + *
    #H5FD_LOG_FILE_WRITEClose + * Begins with:\n + * Dumping read I/O information\n\n + * Then, for each range of identical values, there is this line:\n + * \Code{Addr %10-%10 (%10lu bytes) written to %3d times}\n\n + * Start address\n + * End address\n + * Number of bytes\n + * Number of times written\n\n + * Note: The data buffer is scanned and each range of identical values + * gets one entry in the log file to save space and make it easier to read. + *
    #H5FD_LOG_FLAVORClose + * Begins with:\n + * Dumping I/O flavor information\n\n + * Then, for each range of identical values, there is this line:\n + * \Code{Addr %10-%10 (%10lu bytes) flavor is %s}\n\n + * Start address\n + * End address\n + * Number of bytes\n + * Flavor\n\n + * Note: The data buffer is scanned and each range of identical values + * gets one entry in the log file to save space and make it easier to read. + *
    #H5FD_LOG_NUM_READClose + * Total number of read operations: \Code{%11u} + *
    #H5FD_LOG_NUM_WRITEClose + * Total number of write operations: \Code{%11u} + *
    #H5FD_LOG_NUM_SEEKClose + * Total number of seek operations: \Code{%11u} + *
    #H5FD_LOG_NUM_TRUNCATEClose + * Total number of truncate operations: \Code{%11u} + *
    #H5FD_LOG_TIME_OPENOpen + * Open took: \Code{(\%f s)} + *
    #H5FD_LOG_TIME_READClose, Read + * Total time in read operations: \Code{\%f s}\n\n + * See also: #H5FD_LOG_LOC_READ + *
    #H5FD_LOG_TIME_WRITEClose, Write + * Total time in write operations: \Code{\%f s}\n\n + * See also: #H5FD_LOG_LOC_WRITE + *
    #H5FD_LOG_TIME_SEEKClose, Read, Write + * Total time in write operations: \Code{\%f s}\n\n + * See also: #H5FD_LOG_LOC_SEEK or #H5FD_LOG_LOC_WRITE + *
    #H5FD_LOG_TIME_CLOSEClose + * Close took: \Code{(\%f s)} + *
    #H5FD_LOG_TIME_STATOpen + * Stat took: \Code{(\%f s)} + *
    #H5FD_LOG_ALLOCAlloc + * \Code{%10-%10 (%10Hu bytes) (\%s) Allocated}\n\n + * Start of address space\n + * End of address space\n + * Total size allocation\n + * Flavor of allocation + *
    + * + * \par Flavors: + * The \Emph{flavor} describes the type of stored information. The following + * table lists the flavors that appear in log output and briefly describes each. + * These terms are provided here to aid in the construction of log message + * parsers; a full description is beyond the scope of this document. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Table3: Flavors of logged data
    FlavorDescription
    #H5FD_MEM_NOLISTError value
    #H5FD_MEM_DEFAULTValue not yet set.\n + * May also be a datatype set in a larger allocation that will be + * suballocated by the library.
    #H5FD_MEM_SUPERSuperblock data
    #H5FD_MEM_BTREEB-tree data
    #H5FD_MEM_DRAWRaw data (for example, contents of a dataset)
    #H5FD_MEM_GHEAPGlobal heap data
    #H5FD_MEM_LHEAPLocal heap data
    #H5FD_MEM_OHDRObject header data
    + * + * \version 1.8.7 The flags parameter has been changed from \Code{unsigned int} + * to \Code{unsigned long long}. + * The implementation of the #H5FD_LOG_TIME_OPEN, #H5FD_LOG_TIME_READ, + * #H5FD_LOG_TIME_WRITE, and #H5FD_LOG_TIME_SEEK flags has been finished. + * New flags were added: #H5FD_LOG_NUM_TRUNCATE and #H5FD_LOG_TIME_STAT. + * \version 1.6.0 The \c verbosity parameter has been removed. + * Two new parameters have been added: \p flags of type \Code{unsigned} and + * \p buf_size of type \Code{size_t}. + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size); #ifdef __cplusplus diff --git a/src/H5FDmirror.h b/src/H5FDmirror.h index 8aef9348fcc..49e24c1b0f3 100644 --- a/src/H5FDmirror.h +++ b/src/H5FDmirror.h @@ -61,8 +61,20 @@ typedef struct H5FD_mirror_fapl_t { char remote_ip[H5FD_MIRROR_MAX_IP_LEN + 1]; } H5FD_mirror_fapl_t; -H5_DLL hid_t H5FD_mirror_init(void); +H5_DLL hid_t H5FD_mirror_init(void); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_out); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa); #ifdef __cplusplus diff --git a/src/H5FDmpi.h b/src/H5FDmpi.h index 3af5e4183a4..cf493015a04 100644 --- a/src/H5FDmpi.h +++ b/src/H5FDmpi.h @@ -34,10 +34,12 @@ */ #define H5D_MULTI_CHUNK_IO_COL_THRESHOLD 60 -/* Type of I/O for data transfer properties */ +/** + * Type of I/O for data transfer properties + */ typedef enum H5FD_mpio_xfer_t { - H5FD_MPIO_INDEPENDENT = 0, /*zero is the default*/ - H5FD_MPIO_COLLECTIVE + H5FD_MPIO_INDEPENDENT = 0, /**< Use independent I/O access */ + H5FD_MPIO_COLLECTIVE /**< Use collective I/O access */ } H5FD_mpio_xfer_t; /* Type of chunked dataset I/O */ diff --git a/src/H5FDmpio.h b/src/H5FDmpio.h index 79b52c7a7b2..8caf11c76cd 100644 --- a/src/H5FDmpio.h +++ b/src/H5FDmpio.h @@ -44,14 +44,237 @@ H5_DLLVAR hbool_t H5FD_mpi_opt_types_g; #ifdef __cplusplus extern "C" { #endif -H5_DLL hid_t H5FD_mpio_init(void); +H5_DLL hid_t H5FD_mpio_init(void); + +/** + * \ingroup FAPL + * + * \brief Stores MPI IO communicator information to the file access property list + * + * \fapl_id + * \param[in] comm MPI-2 communicator + * \param[in] info MPI-2 info object + * \returns \herr_t + * + * \details H5Pset_fapl_mpio() stores the user-supplied MPI IO parameters \p + * comm, for communicator, and \p info, for information, in the file + * access property list \p fapl_id. That property list can then be used + * to create and/or open a file. + * + * H5Pset_fapl_mpio() is available only in the parallel HDF5 library + * and is not a collective function. + * + * \p comm is the MPI communicator to be used for file open, as defined + * in \c MPI_File_open of MPI-2. This function makes a duplicate of the + * communicator, so modifications to \p comm after this function call + * returns have no effect on the file access property list. + * + * \p info is the MPI Info object to be used for file open, as defined + * in MPI_File_open() of MPI-2. This function makes a duplicate copy of + * the Info object, so modifications to the Info object after this + * function call returns will have no effect on the file access + * property list. + * + * If the file access property list already contains previously-set + * communicator and Info values, those values will be replaced and the + * old communicator and Info object will be freed. + * + * \note Raw dataset chunk caching is not currently supported when using this + * file driver in read/write mode. All calls to H5Dread() and H5Dwrite() + * will access the disk directly, and H5Pset_cache() and + * H5Pset_chunk_cache() will have no effect on performance.\n + * Raw dataset chunk caching is supported when this driver is used in + * read-only mode. + * + * \version 1.4.5 Handling of the MPI Communicator and Info object changed at + * this release. A duplicate of each of these is now stored in the property + * list instead of pointers to each. + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info); + +/** + * \ingroup FAPL + * + * \brief Returns MPI IO communicator information + * + * \fapl_id + * \param[out] comm MPI-2 communicator + * \param[out] info MPI-2 info object + * \returns \herr_t + * + * \details If the file access property list is set to the #H5FD_MPIO driver, + * H5Pget_fapl_mpio() returns duplicates of the stored MPI communicator + * and Info object through the \p comm and \p info pointers, if those + * values are non-null. + * + * Since the MPI communicator and Info object are duplicates of the + * stored information, future modifications to the access property list + * will not affect them. It is the responsibility of the application to + * free these objects. + * + * \version 1.4.5 Handling of the MPI Communicator and Info object changed at + * this release. A duplicate of each of these is now stored in the + * property list instead of pointers to each. + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/); + +/** + * \ingroup DXPL + * + * \brief Sets data transfer mode + * + * \dxpl_id + * \param[in] xfer_mode Transfer mode + * \returns \herr_t + * + * \details H5Pset_dxpl_mpio() sets the data transfer property list \p dxpl_id + * to use transfer mode \p xfer_mode. The property list can then be + * used to control the I/O transfer mode during data I/O operations. + * + * Valid transfer modes are #H5FD_MPIO_INDEPENDENT (default) and + * #H5FD_MPIO_COLLECTIVE. + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode); + +/** + * \ingroup DXPL + * + * \brief Returns the data transfer mode + * + * \dxpl_id + * \param[out] xfer_mode Transfer mode + * \returns \herr_t + * + * \details H5Pget_dxpl_mpio() queries the data transfer mode currently set in + * the data transfer property list \p dxpl_id. + * + * Upon return, \p xfer_mode contains the data transfer mode, if it is + * non-null. + * + * H5Pget_dxpl_mpio() is not a collective function. + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/); + +/** + * \ingroup DXPL + * + * \brief Sets data transfer mode + * + * \dxpl_id + * \param[in] opt_mode Transfer mode + * \returns \herr_t + * + * \details H5Pset_dxpl_mpio() sets the data transfer property list \p dxpl_id + * to use transfer mode xfer_mode. The property list can then be used + * to control the I/O transfer mode during data I/O operations. + * + * Valid transfer modes are #H5FD_MPIO_INDEPENDENT (default) and + * #H5FD_MPIO_COLLECTIVE. + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mode); + +/** + * \ingroup DXPL + * + * \brief Sets a flag specifying linked-chunk I/O or multi-chunk I/O + * + * \dxpl_id + * \param[in] opt_mode Transfer mode + * \returns \herr_t + * + * \details H5Pset_dxpl_mpio_chunk_opt() specifies whether I/O is to be + * performed as linked-chunk I/O or as multi-chunk I/O. This function + * overrides the HDF5 library's internal algorithm for determining + * which mechanism to use. + * + * When an application uses collective I/O with chunked storage, the + * HDF5 library normally uses an internal algorithm to determine + * whether that I/O activity should be conducted as one linked-chunk + * I/O or as multi-chunk I/O. H5Pset_dxpl_mpio_chunk_opt() is provided + * so that an application can override the library's algorithm in + * circumstances where the library might lack the information needed to + * make an optimal decision. + * + * H5Pset_dxpl_mpio_chunk_opt() works by setting one of the following + * flags in the parameter \p opt_mode: + * - #H5FD_MPIO_CHUNK_ONE_IO - Do one-link chunked I/O + * - #H5FD_MPIO_CHUNK_MULTI_IO - Do multi-chunked I/O + * + * This function works by setting a corresponding property in the + * dataset transfer property list \p dxpl_id. + * + * The library performs I/O in the specified manner unless it + * determines that the low-level MPI IO package does not support the + * requested behavior; in such cases, the HDF5 library will internally + * use independent I/O. + * + * Use of this function is optional. + * + * \todo Add missing version information + * + */ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode); + +/** + * \ingroup DXPL + * + * \brief Sets a numeric threshold for linked-chunk I/O + * + * \dxpl_id + * \param[in] num_chunk_per_proc + * \returns \herr_t + * + * \details H5Pset_dxpl_mpio_chunk_opt_num() sets a numeric threshold for the + * use of linked-chunk I/O. + * + * The library will calculate the average number of chunks selected by + * each process when doing collective access with chunked storage. If + * the number is greater than the threshold set in \p + * num_chunk_per_proc, the library will use linked-chunk I/O; + * otherwise, a separate I/O process will be invoked for each chunk + * (multi-chunk I/O). + * + * \todo Add missing version information + * + */ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc); + +/** + * \ingroup DXPL + * + * \brief Sets a ratio threshold for collective I/O + * + * \dxpl_id + * \param[in] percent_num_proc_per_chunk + * \returns \herr_t + * + * \details H5Pset_dxpl_mpio_chunk_opt_ratio() sets a threshold for the use of + * collective I/O based on the ratio of processes with collective + * access to a dataset with chunked storage. The decision whether to + * use collective I/O is made on a per-chunk basis. + * + * The library will calculate the percentage of the total number of + * processes, the ratio, that hold selections in each chunk. If that + * percentage is greater than the threshold set in \p + * percent_proc_per_chunk, the library will do collective I/O for this + * chunk; otherwise, independent I/O will be done for the chunk. + * + * \todo Add missing version information + * + */ H5_DLL herr_t H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_chunk); #ifdef __cplusplus } diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h index 9e04d8db3a1..62cc9c8843f 100644 --- a/src/H5FDmulti.h +++ b/src/H5FDmulti.h @@ -25,11 +25,228 @@ #ifdef __cplusplus extern "C" { #endif -H5_DLL hid_t H5FD_multi_init(void); +H5_DLL hid_t H5FD_multi_init(void); + +/** + * \ingroup FAPL + * + * \brief Sets up use of the multi-file driver + * + * \fapl_id + * \param[in] memb_map Maps memory usage types to other memory usage types + * \param[in] memb_fapl Property list for each memory usage type + * \param[in] memb_name Name generator for names of member files + * \param[in] memb_addr The offsets within the virtual address space, from 0 + * (zero) to #HADDR_MAX, at which each type of data storage begins + * \param[in] relax Allows read-only access to incomplete file sets when \c TRUE + * \returns \herr_t + * + * \details H5Pset_fapl_multi() sets the file access property list \p fapl_id to + * use the multi-file driver. + * + * The multi-file driver enables different types of HDF5 data and + * metadata to be written to separate files. These files are viewed by + * the HDF5 library and the application as a single virtual HDF5 file + * with a single HDF5 file address space. The types of data that can be + * broken out into separate files include raw data, the superblock, + * B-tree data, global heap data, local heap data, and object + * headers. At the programmer's discretion, two or more types of data + * can be written to the same file while other types of data are + * written to separate files. + * + * The array \p memb_map maps memory usage types to other memory usage + * types and is the mechanism that allows the caller to specify how + * many files are created. The array contains #H5FD_MEM_NTYPES entries, + * which are either the value #H5FD_MEM_DEFAULT or a memory usage + * type. The number of unique values determines the number of files + * that are opened. + * + * The array \p memb_fapl contains a property list for each memory + * usage type that will be associated with a file. + * + * The array \p memb_name should be a name generator (a + * \Code{printf}-style format with a \Code{%s} which will be replaced + * with the name passed to H5FDopen(), usually from H5Fcreate() or + * H5Fopen()). + * + * The array \p memb_addr specifies the offsets within the virtual + * address space, from 0 (zero) to #HADDR_MAX, at which each type of + * data storage begins. + * + * If \p relax is set to 1 (TRUE), then opening an existing file for + * read-only access will not fail if some file members are + * missing. This allows a file to be accessed in a limited sense if + * just the meta data is available. + * + * Default values for each of the optional arguments are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \p memb_mapThe default member map contains the value #H5FD_MEM_DEFAULT for each element.
    + * \p memb_fapl + * + * The default value is #H5P_DEFAULT for each element. + *
    + * \p memb_name + * + * The default string is \Code{%s-X.h5} where \c X is one of the following letters: + * - \c s for #H5FD_MEM_SUPER + * - \c b for #H5FD_MEM_BTREE + * - \c r for #H5FD_MEM_DRAW + * - \c g for #H5FD_MEM_GHEAP + * - \c l for #H5FD_MEM_LHEAP + * - \c o for #H5FD_MEM_OHDR + *
    + * \p memb_addr + * + * The default setting is that the address space is equally divided + * among all of the elements: + * - #H5FD_MEM_SUPER \Code{-> 0 * (HADDR_MAX/6)} + * - #H5FD_MEM_BTREE \Code{-> 1 * (HADDR_MAX/6)} + * - #H5FD_MEM_DRAW \Code{-> 2 * (HADDR_MAX/6)} + * - #H5FD_MEM_GHEAP \Code{-> 3 * (HADDR_MAX/6)} + * - #H5FD_MEM_LHEAP \Code{-> 4 * (HADDR_MAX/6)} + * - #H5FD_MEM_OHDR \Code{-> 5 * (HADDR_MAX/6)} + *
    + * + * \par Example: + * The following code sample sets up a multi-file access property list that + * partitions data into meta and raw files, each being one-half of the address:\n + * \code + * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES]; + * hid_t memb_fapl[H5FD_MEM_NTYPES]; + * const char *memb[H5FD_MEM_NTYPES]; + * haddr_t memb_addr[H5FD_MEM_NTYPES]; + * + * // The mapping... + * for (mt=0; mt typedef enum { H5FD_FILE_IMAGE_OP_NO_OP, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET, + /**< Passed to the \p image_malloc and \p image_memcpy callbacks when a + * file image buffer is to be copied while being set in a file access + * property list (FAPL)*/ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY, + /**< Passed to the \p image_malloc and \p image_memcpy callbacks + * when a file image buffer is to be copied when a FAPL is copied*/ H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET, + /** -/* Define structure to hold file image callbacks */ +/** + * Define structure to hold file image callbacks + */ +//! typedef struct { + /** + * \param[in] size Size in bytes of the file image buffer to allocate + * \param[in] file_image_op A value from H5FD_file_image_op_t indicating + * the operation being performed on the file image + * when this callback is invoked + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! void *(*image_malloc)(size_t size, H5FD_file_image_op_t file_image_op, void *udata); + //! + /** + * \param[in] dest Address of the destination buffer + * \param[in] src Address of the source buffer + * \param[in] file_image_op A value from #H5FD_file_image_op_t indicating + * the operation being performed on the file image + * when this callback is invoked + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! void *(*image_memcpy)(void *dest, const void *src, size_t size, H5FD_file_image_op_t file_image_op, void *udata); + //! + /** + * \param[in] ptr Pointer to the buffer being reallocated + * \param[in] file_image_op A value from #H5FD_file_image_op_t indicating + * the operation being performed on the file image + * when this callback is invoked + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! void *(*image_realloc)(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *udata); + //! + /** + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! herr_t (*image_free)(void *ptr, H5FD_file_image_op_t file_image_op, void *udata); + //! + /** + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! void *(*udata_copy)(void *udata); + //! + /** + * \param[in] udata Value passed in in the H5Pset_file_image_callbacks + * parameter \p udata + */ + //! herr_t (*udata_free)(void *udata); + //! + /** + * \brief The final field in the #H5FD_file_image_callbacks_t struct, + * provides a pointer to user-defined data. This pointer will be + * passed to the image_malloc, image_memcpy, image_realloc, and + * image_free callbacks. Define udata as NULL if no user-defined + * data is provided. + */ void *udata; } H5FD_file_image_callbacks_t; +//! #ifdef __cplusplus extern "C" { diff --git a/src/H5FDros3.h b/src/H5FDros3.h index 3ef6b8af330..8e42ca23fee 100644 --- a/src/H5FDros3.h +++ b/src/H5FDros3.h @@ -89,8 +89,20 @@ typedef struct H5FD_ros3_fapl_t { extern "C" { #endif -H5_DLL hid_t H5FD_ros3_init(void); +H5_DLL hid_t H5FD_ros3_init(void); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_out); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pset_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa); #ifdef __cplusplus diff --git a/src/H5FDsplitter.h b/src/H5FDsplitter.h index a201116805e..ee6e7c53a7c 100644 --- a/src/H5FDsplitter.h +++ b/src/H5FDsplitter.h @@ -87,8 +87,20 @@ typedef struct H5FD_splitter_vfd_config_t { #ifdef __cplusplus extern "C" { #endif -H5_DLL hid_t H5FD_splitter_init(void); +H5_DLL hid_t H5FD_splitter_init(void); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pset_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config_ptr); + +/** + * \ingroup FAPL + * + * \todo Add missing documentation + */ H5_DLL herr_t H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config_ptr); #ifdef __cplusplus diff --git a/src/H5FDstdio.h b/src/H5FDstdio.h index b3e06bb97fb..9db92edf834 100644 --- a/src/H5FDstdio.h +++ b/src/H5FDstdio.h @@ -28,7 +28,21 @@ extern "C" { #endif -H5_DLL hid_t H5FD_stdio_init(void); +H5_DLL hid_t H5FD_stdio_init(void); +/** + * \ingroup FAPL + * + * \brief Sets the standard I/O driver + * + * \fapl_id + * \returns \herr_t + * + * \details H5Pset_fapl_stdio() modifies the file access property list to use + * the standard I/O driver, H5FDstdio(). + * + * \since 1.4.0 + * + */ H5_DLL herr_t H5Pset_fapl_stdio(hid_t fapl_id); #ifdef __cplusplus diff --git a/src/H5FDwindows.h b/src/H5FDwindows.h index c1c465451d9..79e73b66e1b 100644 --- a/src/H5FDwindows.h +++ b/src/H5FDwindows.h @@ -27,6 +27,36 @@ extern "C" { #endif /* __cplusplus */ +/** + * \ingroup FAPL + * + * \brief Sets the Windows I/O driver + * + * \fapl_id + * \returns \herr_t + * + * \details H5Pset_fapl_windows() sets the default HDF5 Windows I/O driver on + * Windows systems. + * + * Since the HDF5 library uses this driver, #H5FD_WINDOWS, by default + * on Windows systems, it is not normally necessary for a user + * application to call H5Pset_fapl_windows(). While it is not + * recommended, there may be times when a user chooses to set a + * different HDF5 driver, such as the standard I/O driver (#H5FD_STDIO) + * or the sec2 driver (#H5FD_SEC2), in a Windows + * application. H5Pset_fapl_windows() is provided so that the + * application can return to the Windows I/O driver when the time + * comes. + * + * Only the Windows driver is tested on Windows systems; other drivers + * are used at the application’s and the user’s risk. + * + * Furthermore, the Windows driver is tested and available only on + * Windows systems; it is not available on non-Windows systems. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Pset_fapl_windows(hid_t fapl_id); #ifdef __cplusplus diff --git a/src/H5Fmodule.h b/src/H5Fmodule.h index a4bd67c9666..7f0299a0b05 100644 --- a/src/H5Fmodule.h +++ b/src/H5Fmodule.h @@ -29,4 +29,43 @@ #define H5_MY_PKG_ERR H5E_FILE #define H5_MY_PKG_INIT YES +/** + * \defgroup H5F H5F + * + * Use the functions in this module to manage HDF5 files. + * + * In the code snippets below, we show the skeletal life cycle of an HDF5 file, + * when creating a new file (left) or when opening an existing file (right). + * File creation is essentially controlled through \ref FCPL, and file access to + * new and existing files is controlled through \ref FAPL. The file \c name and + * creation or access \c mode control the interaction with the underlying + * storage such as file systems. + * + * \Emph{Proper error handling is part of the life cycle.} + * + * + * + * + * + * + *
    CreateOpen
    + * \snippet H5F_examples.c life_cycle + * + * \snippet H5F_examples.c life_cycle_w_open + *
    + * + * In addition to general file management functions, there are three categories + * of functions that deal with advanced file management tasks and use cases: + * 1. The control of the HDF5 \ref MDC + * 2. The use of (MPI-) \ref PH5F HDF5 + * 3. The \ref SWMR pattern + * + * \defgroup MDC Metadata Cache + * \ingroup H5F + * \defgroup PH5F Parallel + * \ingroup H5F + * \defgroup SWMR Single Writer Multiple Readers + * \ingroup H5F + */ + #endif /* H5Fmodule_H */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 28ba17de74d..1c31a58970d 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -47,50 +47,47 @@ * We're assuming that these constants are used rather early in the hdf5 * session. */ -#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */ -#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */ -#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */ -#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/ +#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /**< Absence of RDWR: read-only */ +#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /**< Open for read and write */ +#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /**< Overwrite existing files */ +#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /**< Fail if file already exists*/ /* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */ -#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */ +#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /**< Create non-existing files */ #define H5F_ACC_SWMR_WRITE \ - (H5CHECK 0x0020u) /*indicate that this file is \ - * open for writing in a \ - * single-writer/multi-reader (SWMR) \ - * scenario. Note that the \ - * process(es) opening the file \ - * for reading must open the file \ - * with RDONLY access, and use \ - * the special "SWMR_READ" access \ - * flag. */ + (H5CHECK 0x0020u) /**< Indicate that this file is open for writing in a \ + * single-writer/multi-reader (SWMR) scenario. \ + * Note that the process(es) opening the file for reading \ + * must open the file with #H5F_ACC_RDONLY and use the \ + * #H5F_ACC_SWMR_READ access flag. */ #define H5F_ACC_SWMR_READ \ - (H5CHECK 0x0040u) /*indicate that this file is \ - * open for reading in a \ - * single-writer/multi-reader (SWMR) \ - * scenario. Note that the \ - * process(es) opening the file \ - * for SWMR reading must also \ - * open the file with the RDONLY \ - * flag. */ - -/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the - * parent file. */ -#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /* ignore setting on lapl */ + (H5CHECK 0x0040u) /**< Indicate that this file is open for reading in a \ + * single-writer/multi-reader (SWMR) scenario. Note that \ + * the process(es) opening the file for SWMR reading must \ + * also open the file with the #H5F_ACC_RDONLY flag. */ + +/** + * Default property list identifier + * + * \internal Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the parent file. + * \internal ignore setting on lapl + */ +#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */ -#define H5F_OBJ_FILE (0x0001u) /* File objects */ -#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */ -#define H5F_OBJ_GROUP (0x0004u) /* Group objects */ -#define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */ -#define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */ +#define H5F_OBJ_FILE (0x0001u) /**< File objects */ +#define H5F_OBJ_DATASET (0x0002u) /**< Dataset objects */ +#define H5F_OBJ_GROUP (0x0004u) /**< Group objects */ +#define H5F_OBJ_DATATYPE (0x0008u) /**< Named datatype objects */ +#define H5F_OBJ_ATTR (0x0010u) /**< Attribute objects */ #define H5F_OBJ_ALL (H5F_OBJ_FILE | H5F_OBJ_DATASET | H5F_OBJ_GROUP | H5F_OBJ_DATATYPE | H5F_OBJ_ATTR) -#define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */ -/* (as opposed to objects opened through any file ID accessing this file) */ +#define H5F_OBJ_LOCAL \ + (0x0020u) /**< Restrict search to objects opened through current file ID \ + (as opposed to objects opened through any file ID accessing this file) */ #define H5F_FAMILY_DEFAULT (hsize_t)0 #ifdef H5_HAVE_PARALLEL -/* +/** * Use this constant string as the MPI_Info key to set H5Fmpio debug flags. * To turn on H5Fmpio debug flags, set the MPI_Info value with this key to * have the value of a string consisting of the characters that turn on the @@ -99,126 +96,149 @@ #define H5F_MPIO_DEBUG_KEY "H5F_mpio_debug_key" #endif /* H5_HAVE_PARALLEL */ -/* The difference between a single file and a set of mounted files */ +/** + * The scope of an operation such as H5Fflush(), e.g., + * a single file vs. a set of mounted files + */ typedef enum H5F_scope_t { - H5F_SCOPE_LOCAL = 0, /*specified file handle only */ - H5F_SCOPE_GLOBAL = 1 /*entire virtual file */ + H5F_SCOPE_LOCAL = 0, /**< The specified file handle only */ + H5F_SCOPE_GLOBAL = 1 /**< The entire virtual file */ } H5F_scope_t; -/* Unlimited file size for H5Pset_external() */ +/** + * Unlimited file size for H5Pset_external() + */ #define H5F_UNLIMITED ((hsize_t)(-1L)) -/* How does file close behave? - * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL - * H5F_CLOSE_WEAK - file closes only after all opened objects are closed - * H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file - close fails - * H5F_CLOSE_STRONG - if there are opened objects, close them first, then - close file +/** + * How does file close behave? */ typedef enum H5F_close_degree_t { - H5F_CLOSE_DEFAULT = 0, - H5F_CLOSE_WEAK = 1, - H5F_CLOSE_SEMI = 2, - H5F_CLOSE_STRONG = 3 + H5F_CLOSE_DEFAULT = 0, /**< Use the degree pre-defined by underlying VFD */ + H5F_CLOSE_WEAK = 1, /**< File closes only after all opened objects are closed */ + H5F_CLOSE_SEMI = 2, /**< If no opened objects, file is closed; otherwise, file close fails */ + H5F_CLOSE_STRONG = 3 /**< If there are opened objects, close them first, then close file */ } H5F_close_degree_t; -/* Current "global" information about file */ +/** + * Current "global" information about file + */ +//! typedef struct H5F_info2_t { struct { - unsigned version; /* Superblock version # */ - hsize_t super_size; /* Superblock size */ - hsize_t super_ext_size; /* Superblock extension size */ + unsigned version; /**< Superblock version # */ + hsize_t super_size; /**< Superblock size */ + hsize_t super_ext_size; /**< Superblock extension size */ } super; struct { - unsigned version; /* Version # of file free space management */ - hsize_t meta_size; /* Free space manager metadata size */ - hsize_t tot_space; /* Amount of free space in the file */ + unsigned version; /**< Version # of file free space management */ + hsize_t meta_size; /**< Free space manager metadata size */ + hsize_t tot_space; /**< Amount of free space in the file */ } free; struct { - unsigned version; /* Version # of shared object header info */ - hsize_t hdr_size; /* Shared object header message header size */ - H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ + unsigned version; /**< Version # of shared object header info */ + hsize_t hdr_size; /**< Shared object header message header size */ + H5_ih_info_t msgs_info; /**< Shared object header message index & heap size */ } sohm; } H5F_info2_t; +//! -/* - * Types of allocation requests. The values larger than H5FD_MEM_DEFAULT +/** + * Types of allocation requests. The values larger than #H5FD_MEM_DEFAULT * should not change other than adding new types to the end. These numbers * might appear in files. * - * Note: please change the log VFD flavors array if you change this - * enumeration. + * \internal Please change the log VFD flavors array if you change this + * enumeration. */ typedef enum H5F_mem_t { - H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list. + H5FD_MEM_NOLIST = -1, /**< Data should not appear in the free list. * Must be negative. */ - H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the + H5FD_MEM_DEFAULT = 0, /**< Value not yet set. Can also be the * datatype set in a larger allocation * that will be suballocated by the library. * Must be zero. */ - H5FD_MEM_SUPER = 1, /* Superblock data */ - H5FD_MEM_BTREE = 2, /* B-tree data */ - H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */ - H5FD_MEM_GHEAP = 4, /* Global heap data */ - H5FD_MEM_LHEAP = 5, /* Local heap data */ - H5FD_MEM_OHDR = 6, /* Object header data */ - - H5FD_MEM_NTYPES /* Sentinel value - must be last */ + H5FD_MEM_SUPER = 1, /**< Superblock data */ + H5FD_MEM_BTREE = 2, /**< B-tree data */ + H5FD_MEM_DRAW = 3, /**< Raw data (content of datasets, etc.) */ + H5FD_MEM_GHEAP = 4, /**< Global heap data */ + H5FD_MEM_LHEAP = 5, /**< Local heap data */ + H5FD_MEM_OHDR = 6, /**< Object header data */ + + H5FD_MEM_NTYPES /**< Sentinel value - must be last */ } H5F_mem_t; -/* Free space section information */ +/** + * Free space section information + */ +//! typedef struct H5F_sect_info_t { - haddr_t addr; /* Address of free space section */ - hsize_t size; /* Size of free space section */ + haddr_t addr; /**< Address of free space section */ + hsize_t size; /**< Size of free space section */ } H5F_sect_info_t; +//! -/* Library's format versions */ +/** + * Library's format versions + */ typedef enum H5F_libver_t { H5F_LIBVER_ERROR = -1, - H5F_LIBVER_EARLIEST = 0, /* Use the earliest possible format for storing objects */ - H5F_LIBVER_V18 = 1, /* Use the latest v18 format for storing objects */ - H5F_LIBVER_V110 = 2, /* Use the latest v10 format for storing objects */ + H5F_LIBVER_EARLIEST = 0, /**< Use the earliest possible format for storing objects */ + H5F_LIBVER_V18 = 1, /**< Use the latest v18 format for storing objects */ + H5F_LIBVER_V110 = 2, /**< Use the latest v110 format for storing objects */ H5F_LIBVER_NBOUNDS } H5F_libver_t; #define H5F_LIBVER_LATEST H5F_LIBVER_V110 -/* File space handling strategy */ +/** + * File space handling strategy + */ +//! typedef enum H5F_fspace_strategy_t { - H5F_FSPACE_STRATEGY_FSM_AGGR = - 0, /* Mechanisms: free-space managers, aggregators, and virtual file drivers */ - /* This is the library default when not set */ + H5F_FSPACE_STRATEGY_FSM_AGGR = 0, /**< Mechanisms: free-space managers, aggregators, and virtual file + drivers This is the library default when not set */ H5F_FSPACE_STRATEGY_PAGE = - 1, /* Mechanisms: free-space managers with embedded paged aggregation and virtual file drivers */ - H5F_FSPACE_STRATEGY_AGGR = 2, /* Mechanisms: aggregators and virtual file drivers */ - H5F_FSPACE_STRATEGY_NONE = 3, /* Mechanisms: virtual file drivers */ - H5F_FSPACE_STRATEGY_NTYPES /* must be last */ + 1, /**< Mechanisms: free-space managers with embedded paged aggregation and virtual file drivers */ + H5F_FSPACE_STRATEGY_AGGR = 2, /**< Mechanisms: aggregators and virtual file drivers */ + H5F_FSPACE_STRATEGY_NONE = 3, /**< Mechanisms: virtual file drivers */ + H5F_FSPACE_STRATEGY_NTYPES /**< Sentinel */ } H5F_fspace_strategy_t; +//! -/* Deprecated: File space handling strategy for release 1.10.0 */ -/* They are mapped to H5F_fspace_strategy_t as defined above from release 1.10.1 onwards */ +/** + * File space handling strategy for release 1.10.0 + * + * \deprecated 1.10.1 + */ typedef enum H5F_file_space_type_t { - H5F_FILE_SPACE_DEFAULT = 0, /* Default (or current) free space strategy setting */ - H5F_FILE_SPACE_ALL_PERSIST = 1, /* Persistent free space managers, aggregators, virtual file driver */ - H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */ - /* This is the library default */ - H5F_FILE_SPACE_AGGR_VFD = 3, /* Aggregators, Virtual file driver */ - H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */ - H5F_FILE_SPACE_NTYPES /* must be last */ + H5F_FILE_SPACE_DEFAULT = 0, /**< Default (or current) free space strategy setting */ + H5F_FILE_SPACE_ALL_PERSIST = 1, /**< Persistent free space managers, aggregators, virtual file driver */ + H5F_FILE_SPACE_ALL = 2, /**< Non-persistent free space managers, aggregators, virtual file driver + This is the library default */ + H5F_FILE_SPACE_AGGR_VFD = 3, /**< Aggregators, Virtual file driver */ + H5F_FILE_SPACE_VFD = 4, /**< Virtual file driver */ + H5F_FILE_SPACE_NTYPES /**< Sentinel */ } H5F_file_space_type_t; -/* Data structure to report the collection of read retries for metadata items with checksum */ -/* Used by public routine H5Fget_metadata_read_retry_info() */ +//! #define H5F_NUM_METADATA_READ_RETRY_TYPES 21 + +/** + * Data structure to report the collection of read retries for metadata items with checksum as + * used by H5Fget_metadata_read_retry_info() + */ typedef struct H5F_retry_info_t { unsigned nbins; uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES]; } H5F_retry_info_t; +//! -/* Callback for H5Pset_object_flush_cb() in a file access property list */ +/** + * Callback for H5Pset_object_flush_cb() in a file access property list + */ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata); /*********************/ @@ -228,55 +248,1433 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata); extern "C" { #endif -/* Functions in H5F.c */ -H5_DLL htri_t H5Fis_hdf5(const char *filename); -H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); -H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist); -H5_DLL hid_t H5Freopen(hid_t file_id); -H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); -H5_DLL herr_t H5Fclose(hid_t file_id); -H5_DLL hid_t H5Fget_create_plist(hid_t file_id); -H5_DLL hid_t H5Fget_access_plist(hid_t file_id); -H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent); -H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); -H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); -H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle); -H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); -H5_DLL herr_t H5Funmount(hid_t loc, const char *name); +/** + * \ingroup H5F + * + * \brief Checks if a file can be opened with a given file access property + * list + * + * \param[in] filename Name of a file + * + * \return \htri_t + * + * \details H5F__is_hdf5() checks if the file specified by \p + * filename can be opened. + * + * \note The H5Fis_hdf5(), only uses + * the default file driver when opening a file. + * + */ +H5_DLL htri_t H5Fis_hdf5(const char *filename); +/** + * \ingroup H5F + * + * \brief Creates an HDF5 file + * + * \param[in] filename Name of the file to create + * \param[in] flags File access flags. Allowable values are: + * - #H5F_ACC_TRUNC: Truncate file, if it already exists, + * erasing all data previously stored in the file + * - #H5F_ACC_EXCL: Fail if file already exists + * \fcpl_id + * \fapl_id + * \return \hid_t{file} + * + * \details H5Fcreate() is the primary function for creating HDF5 files; it + * creates a new HDF5 file with the specified name and property lists. + * + * The \p filename parameter specifies the name of the new file. + * + * The \p flags parameter specifies whether an existing file is to be + * overwritten. It should be set to either #H5F_ACC_TRUNC to overwrite + * an existing file or #H5F_ACC_EXCL, instructing the function to fail + * if the file already exists. + * + * New files are always created in read-write mode, so the read-write + * and read-only flags, #H5F_ACC_RDWR and #H5F_ACC_RDONLY, + * respectively, are not relevant in this function. Further note that + * a specification of #H5F_ACC_RDONLY will be ignored; the file will + * be created in read-write mode, regardless. + * + * More complex behaviors of file creation and access are controlled + * through the file creation and file access property lists, + * \p fcpl_id and \p fapl_id, respectively. The value of #H5P_DEFAULT + * for any property list value indicates that the library should use + * the default values for that appropriate property list. + * + * The return value is a file identifier for the newly-created file; + * this file identifier should be closed by calling H5Fclose() when + * it is no longer needed. + * + * \par Example + * \snippet H5F_examples.c minimal + * + * \note #H5F_ACC_TRUNC and #H5F_ACC_EXCL are mutually exclusive; use + * exactly one. + * + * \note An additional flag, #H5F_ACC_DEBUG, prints debug information. This + * flag can be combined with one of the above values using the bit-wise + * OR operator (\c |), but it is used only by HDF5 library developers; + * \Emph{it is neither tested nor supported for use in applications}. + * + * \attention \Bold{Special case — File creation in the case of an already-open file:} + * If a file being created is already opened, by either a previous + * H5Fopen() or H5Fcreate() call, the HDF5 library may or may not + * detect that the open file and the new file are the same physical + * file. (See H5Fopen() regarding the limitations in detecting the + * re-opening of an already-open file.)\n + * If the library detects that the file is already opened, + * H5Fcreate() will return a failure, regardless of the use of + * #H5F_ACC_TRUNC.\n + * If the library does not detect that the file is already opened + * and #H5F_ACC_TRUNC is not used, H5Fcreate() will return a failure + * because the file already exists. Note that this is correct + * behavior.\n + * But if the library does not detect that the file is already + * opened and #H5F_ACC_TRUNC is used, H5Fcreate() will truncate the + * existing file and return a valid file identifier. Such a + * truncation of a currently-opened file will almost certainly + * result in errors. While unlikely, the HDF5 library may not be + * able to detect, and thus report, such errors.\n + * Applications should avoid calling H5Fcreate() with an already + * opened file. + * + * \since 1.0.0 + * + * \see H5Fopen(), H5Fclose() + * + */ +H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id); +/** + * \ingroup H5F + * + * \brief Opens an existing HDF5 file + * + * \param[in] filename Name of the file to be opened + * \param[in] flags File access flags. Allowable values are: + * - #H5F_ACC_RDWR: Allows read and write access to file + * - #H5F_ACC_RDONLY: Allows read-only access to file + * - #H5F_ACC_RDWR \c | #H5F_ACC_SWMR_WRITE: Indicates that + * the file is open for writing in a + * single-writer/multi-writer (SWMR) scenario. + * - #H5F_ACC_RDONLY \c | #H5F_ACC_SWMR_READ: Indicates + * that the file is open for reading in a + * single-writer/multi-reader (SWMR) scenario. + * - An additional flag, #H5F_ACC_DEBUG, prints debug + * information. This flag can be combined with one of the + * above values using the bit-wise OR operator (\c |), but + * it is used only by HDF5 library developers; + * \Emph{it is neither tested nor supported} for use in + * applications. + * \fapl_id + * \return \hid_t{file} + * + * \details H5Fopen() is the primary function for accessing existing HDF5 files. + * This function opens the named file in the specified access mode and + * with the specified access property list. + * + * Note that H5Fopen() does not create a file if it does not already + * exist; see H5Fcreate(). + * + * The \p filename parameter specifies the name of the file to be + * opened. + * + * The \p fapl_id parameter specifies the file access property list. + * Use of #H5P_DEFAULT specifies that default I/O access properties + * are to be used. + * + * The \p flags parameter specifies whether the file will be opened in + * read-write or read-only mode, #H5F_ACC_RDWR or #H5F_ACC_RDONLY, + * respectively. More complex behaviors of file access are controlled + * through the file-access property list. + * + * The return value is a file identifier for the open file; this file + * identifier should be closed by calling H5Fclose() when it is no + * longer needed. + * + * \par Example + * \snippet H5F_examples.c open + * + * \note #H5F_ACC_RDWR and #H5F_ACC_RDONLY are mutually exclusive; use + * exactly one. + * + * \attention \Bold{Special cases — Multiple opens:} A file can often be opened + * with a new H5Fopen() call without closing an already-open + * identifier established in a previous H5Fopen() or H5Fcreate() + * call. Each such H5Fopen() call will return a unique identifier + * and the file can be accessed through any of these identifiers as + * long as the identifier remains valid. In such multiply-opened + * cases, the open calls must use the same flags argument and the + * file access property lists must use the same file close degree + * property setting (see the external link discussion below and + * H5Pset_fclose_degree()).\n + * In some cases, such as files on a local Unix file system, the + * HDF5 library can detect that a file is multiply opened and will + * maintain coherent access among the file identifiers.\n + * But in many other cases, such as parallel file systems or + * networked file systems, it is not always possible to detect + * multiple opens of the same physical file. In such cases, HDF5 + * will treat the file identifiers as though they are accessing + * different files and will be unable to maintain coherent access. + * Errors are likely to result in these cases. While unlikely, the + * HDF5 library may not be able to detect, and thus report, + * such errors.\n + * It is generally recommended that applications avoid multiple + * opens of the same file. + * + * \attention \Bold{Special restriction on multiple opens of a file first + * opened by means of an external link:} When an external link is + * followed, the external file is always opened with the weak file + * close degree property setting, #H5F_CLOSE_WEAK (see + * H5Lcreate_external() and H5Pset_fclose_degree()). If the file is + * reopened with H5Fopen while it remains held open from such an + * external link call, the file access property list used in the + * open call must include the file close degree setting + * #H5F_CLOSE_WEAK or the open will fail. + * + * \version 1.10.0 The #H5F_ACC_SWMR_WRITE and #H5F_ACC_SWMR_READ flags were added. + * + * \see H5Fclose() + * + */ +H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t fapl_id); +/** + * \ingroup H5F + * + * \brief Returns a new identifier for a previously-opened HDF5 file + * + * \param[in] file_id Identifier of a file for which an additional identifier + * is required + * + * \return \hid_t{file} + * + * \details H5Freopen() returns a new file identifier for an already-open HDF5 + * file, as specified by \p file_id. Both identifiers share caches and + * other information. The only difference between the identifiers is + * that the new identifier is not mounted anywhere and no files are + * mounted on it. + * + * The new file identifier should be closed by calling H5Fclose() when + * it is no longer needed. + * + * \note Note that there is no circumstance under which H5Freopen() can + * actually open a closed file; the file must already be open and have an + * active \p file_id. E.g., one cannot close a file with H5Fclose() on + * \p file_id then use H5Freopen() on \p file_id to reopen it. + * + */ +H5_DLL hid_t H5Freopen(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Flushes all buffers associated with a file to storage + * + * \loc_id{object_id} + * \param[in] scope The scope of the flush action + * + * \return \herr_t + * + * \details H5Fflush() causes all buffers associated with a file to be + * immediately flushed to storage without removing the data from the + * cache. + * + * \p object_id can be any object associated with the file, including + * the file itself, a dataset, a group, an attribute, or a named + * datatype. + * + * \p scope specifies whether the scope of the flush action is + * global or local. Valid values are as follows: + * \scopes + * + * \par Example + * \snippet H5F_examples.c flush + * + * \attention HDF5 does not possess full control over buffering. H5Fflush() + * flushes the internal HDF5 buffers then asks the operating system + * (the OS) to flush the system buffers for the open files. After + * that, the OS is responsible for ensuring that the data is + * actually flushed to disk. + * + */ +H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); +/** + * \ingroup H5F + * + * \brief Terminates access to an HDF5 file + * + * \file_id + * \return \herr_t + * + * \details H5Fclose() terminates access to an HDF5 file (specified by + * \p file_id) by flushing all data to storage. + * + * If this is the last file identifier open for the file and no other + * access identifier is open (e.g., a dataset identifier, group + * identifier, or shared datatype identifier), the file will be fully + * closed and access will end. + * + * \par Example + * \snippet H5F_examples.c minimal + * + * \note \Bold{Delayed close:} Note the following deviation from the + * above-described behavior. If H5Fclose() is called for a file but one + * or more objects within the file remain open, those objects will remain + * accessible until they are individually closed. Thus, if the dataset + * \c data_sample is open when H5Fclose() is called for the file + * containing it, \c data_sample will remain open and accessible + * (including writable) until it is explicitly closed. The file will be + * automatically closed once all objects in the file have been closed.\n + * Be warned, however, that there are circumstances where it is not + * possible to delay closing a file. For example, an MPI-IO file close is + * a collective call; all of the processes that opened the file must + * close it collectively. The file cannot be closed at some time in the + * future by each process in an independent fashion. Another example is + * that an application using an AFS token-based file access privilege may + * destroy its AFS token after H5Fclose() has returned successfully. This + * would make any future access to the file, or any object within it, + * illegal.\n + * In such situations, applications must close all open objects in a file + * before calling H5Fclose. It is generally recommended to do so in all + * cases. + * + * \see H5Fopen() + * + */ +H5_DLL herr_t H5Fclose(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Returns a file creation property list identifier + * + * \file_id + * \return \hid_t{file creation property list} + * + * \details H5Fget_create_plist() returns the file creation property list + * identifier identifying the creation properties used to create this + * file. This function is useful for duplicating properties when + * creating another file. + * + * The creation property list identifier should be released with + * H5Pclose(). + * + */ +H5_DLL hid_t H5Fget_create_plist(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Returns a file access property list identifier + * + * \file_id + * \return \hid_t{file access property list} + * + * \details H5Fget_access_plist() returns the file access property list + * identifier of the specified file. + * + */ +H5_DLL hid_t H5Fget_access_plist(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Determines the read/write or read-only status of a file + * + * \file_id + * \param[out] intent Access mode flag as originally passed with H5Fopen() + * + * \return \herr_t + * + * \details Given the identifier of an open file, \p file_id, H5Fget_intent() + * retrieves the intended access mode" flag passed with H5Fopen() when + * the file was opened. + * + * The value of the flag is returned in \p intent. Valid values are as + * follows: + * \file_access + * + * \note The function will not return an error if intent is NULL; it will + * simply do nothing. + * + * \version 1.10.0 Function enhanced to work with SWMR functionality. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent); +/** + * \ingroup H5F + * + * \brief Returns the number of open object identifiers for an open file + * + * \file_id or #H5F_OBJ_ALL for all currently-open HDF5 files + * \param[in] types Type of object for which identifiers are to be returned + * + * \return Returns the number of open objects if successful; otherwise returns + * a negative value. + * + * \details Given the identifier of an open file, file_id, and the desired + * object types, types, H5Fget_obj_count() returns the number of open + * object identifiers for the file. + * + * To retrieve a count of open identifiers for open objects in all + * HDF5 application files that are currently open, pass the value + * #H5F_OBJ_ALL in \p file_id. + * + * The types of objects to be counted are specified in types as + * follows: + * \obj_types + * + * Multiple object types can be combined with the + * logical \c OR operator (|). For example, the expression + * \c (#H5F_OBJ_DATASET|#H5F_OBJ_GROUP) would call for datasets and + * groups. + * + * \version 1.6.8, 1.8.2 Function return type changed to \c ssize_t. + * \version 1.6.5 #H5F_OBJ_LOCAL has been added as a qualifier on the types + * of objects to be counted. #H5F_OBJ_LOCAL restricts the + * search to objects opened through current file identifier. + * + */ +H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); +/** + *------------------------------------------------------------------------- + * \ingroup H5F + * + * \brief Returns a list of open object identifiers + * + * \file_id or #H5F_OBJ_ALL for all currently-open HDF5 files + * \param[in] types Type of object for which identifiers are to be returned + * \param[in] max_objs Maximum number of object identifiers to place into + * \p obj_id_list + * \param[out] obj_id_list Pointer to the returned buffer of open object + * identifiers + * + * \return Returns number of objects placed into \p obj_id_list if successful; + * otherwise returns a negative value. + * + * \details Given the file identifier \p file_id and the type of objects to be + * identified, types, H5Fget_obj_ids() returns the list of identifiers + * for all open HDF5 objects fitting the specified criteria. + * + * To retrieve identifiers for open objects in all HDF5 application + * files that are currently open, pass the value #H5F_OBJ_ALL in + * \p file_id. + * + * The types of object identifiers to be retrieved are specified in + * types using the codes listed for the same parameter in + * H5Fget_obj_count(). + * + * To retrieve a count of open objects, use the H5Fget_obj_count() + * function. This count can be used to set the \p max_objs parameter. + * + * \version 1.8.2 Function return type changed to \c ssize_t and \p + * max_objs parameter datatype changed to \c size_t. + * \version 1.6.8 Function return type changed to \c ssize_t and \p + * max_objs parameter datatype changed to \c size_t. + * \since 1.6.0 + * + */ +H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); +/** + * \ingroup H5F + * + * \brief Returns pointer to the file handle from the virtual file driver + * + * \file_id + * \fapl_id{fapl} + * \param[out] file_handle Pointer to the file handle being used by the + * low-level virtual file driver + * + * \return \herr_t + * + * \details Given the file identifier \p file_id and the file access property + * list \p fapl_id, H5Fget_vfd_handle() returns a pointer to the file + * handle from the low-level file driver currently being used by the + * HDF5 library for file I/O. + * + * \note For most drivers, the value of \p fapl_id will be #H5P_DEFAULT. For + * the \c FAMILY or \c MULTI drivers, this value should be defined + * through the property list functions: H5Pset_family_offset() for the + * \c FAMILY driver and H5Pset_multi_type() for the \c MULTI driver + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle); +/** + * \ingroup H5F + * + * \brief Mounts an HDF5 file + * + * \loc_id{loc} + * \param[in] name Name of the group onto which the file specified by \p child + * is to be mounted + * \file_id{child} + * \param[in] plist File mount property list identifier. Pass #H5P_DEFAULT! + * + * \return \herr_t + * + * \details H5Fmount() mounts the file specified by \p child onto the object + * specified by \p loc and \p name using the mount properties \p plist + * If the object specified by \p loc is a dataset, named datatype or + * attribute, then the file will be mounted at the location where the + * attribute, dataset, or named datatype is attached. + * + * \par Example + * \snippet H5F_examples.c mount + * + * \note To date, no file mount properties have been defined in HDF5. The + * proper value to pass for \p plist is #H5P_DEFAULT, indicating the + * default file mount property list. + * + */ +H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); +/** + * \ingroup H5F + * + * \brief Unounts an HDF5 file + * + * \loc_id{loc} + * \param[in] name Name of the mount point + * + * \return \herr_t + * + * \details Given a mount point, H5Funmount() dissociates the mount point's + * file from the file mounted there. This function does not close + * either file. + * + * The mount point can be either the group in the parent or the root + * group of the mounted file (both groups have the same name). If the + * mount point was opened before the mount then it is the group in the + * parent; if it was opened after the mount then it is the root group + * of the child. + * + */ +H5_DLL herr_t H5Funmount(hid_t loc, const char *name); +/** + * \ingroup H5F + * + * \brief Returns the amount of free space in a file (in bytes) + * + * \file_id + * + * \return Returns the amount of free space in the file if successful; + * otherwise returns a negative value. + * + * \details Given the identifier of an open file, \p file_id, + * H5Fget_freespace() returns the amount of space that is unused by + * any objects in the file. + * + * The interpretation of this number depends on the configured free space + * management strategy. For example, if the HDF5 library only tracks free + * space in a file from a file open or create until that file is closed, + * then this routine will report the free space that has been created + * during that interval. + * + * \since 1.6.1 + * + */ H5_DLL hssize_t H5Fget_freespace(hid_t file_id); -H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); -H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); -H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); -H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); -H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); -H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); -H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr); -H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, - size_t *cur_size_ptr, int *cur_num_entries_ptr); -H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); -H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); -H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo); -H5_DLL herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); -H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); -H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, - H5F_sect_info_t *sect_info /*out*/); -H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); -H5_DLL herr_t H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); -H5_DLL herr_t H5Fstart_mdc_logging(hid_t file_id); -H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); -H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, - /*OUT*/ hbool_t *is_enabled, - /*OUT*/ hbool_t *is_currently_logging); -H5_DLL herr_t H5Fformat_convert(hid_t fid); -H5_DLL herr_t H5Freset_page_buffering_stats(hid_t file_id); -H5_DLL herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], unsigned hits[2], - unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); -H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_size); -H5_DLL herr_t H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize); -H5_DLL herr_t H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize); +/** + * \ingroup H5F + * + * \brief Returns the size of an HDF5 file (in bytes) + * + * \file_id + * \param[out] size Size of the file, in bytes + * + * \return \herr_t + * + * \details H5Fget_filesize() returns the size of the HDF5 file specified by + * \p file_id. + * + * The returned size is that of the entire file, as opposed to only + * the HDF5 portion of the file. I.e., size includes the user block, + * if any, the HDF5 portion of the file, and any data that may have + * been appended beyond the data written through the HDF5 library. + * + * \since 1.6.3 + * + */ +H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); +/** + * \ingroup H5F + * + * \brief Retrieves the file's end-of-allocation (EOA) + * + * \file_id + * \param[out] eoa The file's EOA + * + * \return \herr_t + * + * \details H5Fget_eoa() retrieves the file's EOA and returns it in the + * parameter eoa. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); +/** + * \ingroup H5F + * + * \brief Sets the file' EOA to the maximum of (EOA, EOF) + increment + * + * \file_id + * \param[in] increment The number of bytes to be added to the maximum of + * (EOA, EOF) + * + * \return \herr_t + * + * \details H5Fincrement_filesize() sets the file's EOA to the maximum of (EOA, + * EOF) + \p increment. The EOA is the end-of-file address stored in + * the file's superblock while EOF is the file's actual end-of-file. + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); +/** + * \ingroup H5F + * + * \brief Retrieves a copy of the image of an existing, open file + * + * \file_id + * \param[out] buf_ptr Pointer to the buffer into which the image of the + * HDF5 file is to be copied. If \p buf_ptr is NULL, + * no data will be copied but the function’s return value + * will still indicate the buffer size required (or a + * negative value on error). + * \param[out] buf_len Size of the supplied buffer + * + * \return ssize_t + * + * \details H5Fget_file_image() retrieves a copy of the image of an existing, + * open file. This routine can be used with files opened using the + * SEC2 (or POSIX), STDIO, and Core (or Memory) virtual file drivers + * (VFDs). + * + * If the return value of H5Fget_file_image() is a positive value, it + * will be the length in bytes of the buffer required to store the + * file image. So if the file size is unknown, it can be safely + * determined with an initial H5Fget_file_image() call with buf_ptr + * set to NULL. The file image can then be retrieved with a second + * H5Fget_file_image() call with \p buf_len set to the initial call’s + * return value. + * + * While the current file size can also be retrieved with + * H5Fget_filesize(), that call may produce a larger value than is + * needed. The value returned by H5Fget_filesize() includes the user + * block, if it exists, and any unallocated space at the end of the + * file. It is safe in all situations to get the file size with + * H5Fget_file_image() and it often produces a value that is more + * appropriate for the size of a file image buffer. + * + * \note \Bold{Recommended Reading:} This function is part of the file image + * operations feature set. It is highly recommended to study the guide + * \ref_file_image_ops before using this feature set. + * + * \attention H5Pget_file_image() will fail, returning a negative value, if the + * file is too large for the supplied buffer. + * + * \see H5LTopen_file_image(), H5Pset_file_image(), H5Pget_file_image(), + * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks() + * + * \since 1.8.0 + * + */ +H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len); +/** + * \ingroup MDC + * + * \brief Obtains current metadata cache configuration for target file + * + * \file_id + * \param[in,out] config_ptr Pointer to the H5AC_cache_config_t instance in which + * the current metadata cache configuration is to be + * reported. The fields of this structure are discussed + * \ref H5AC-cache-config-t "here". + * \return \herr_t + * + * \note The \c in direction applies only to the H5AC_cache_config_t::version + * field. All other fields are out parameters. + * + * \details H5Fget_mdc_config() loads the current metadata cache configuration + * into the instance of H5AC_cache_config_t pointed to by the \p config_ptr + * parameter.\n + * The fields of the H5AC_cache_config_t structure are shown below: + * \snippet H5ACpublic.h H5AC_cache_config_t_snip + * \click4more + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); +/** + * \ingroup MDC + * + * \brief Attempts to configure metadata cache of target file + * + * \file_id + * \param[in,out] config_ptr Pointer to the H5AC_cache_config_t instance + * containing the desired configuration. + * The fields of this structure are discussed + * \ref H5AC-cache-config-t "here". + * \return \herr_t + * + * \details H5Fset_mdc_config() attempts to configure the file's metadata cache + * according configuration supplied in \p config_ptr. + * \snippet H5ACpublic.h H5AC_cache_config_t_snip + * \click4more + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr); +/** + * \ingroup MDC + * + * \brief Obtains target file's metadata cache hit rate + * + * \file_id + * \param[out] hit_rate_ptr Pointer to the double in which the hit rate is returned. Note that + * \p hit_rate_ptr is undefined if the API call fails + * \return \herr_t + * + * \details H5Fget_mdc_hit_rate() queries the metadata cache of the target file to obtain its hit rate + * \Code{(cache hits / (cache hits + cache misses))} since the last time hit rate statistics + * were reset. If the cache has not been accessed since the last time the hit rate stats were + * reset, the hit rate is defined to be 0.0. + * + * The hit rate stats can be reset either manually (via H5Freset_mdc_hit_rate_stats()), or + * automatically. If the cache's adaptive resize code is enabled, the hit rate stats will be + * reset once per epoch. If they are reset manually as well, the cache may behave oddly. + * + * See the overview of the metadata cache in the special topics section of the user manual for + * details on the metadata cache and its adaptive resize algorithms. + * + */ +H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr); +/** + * \ingroup MDC + * + * \brief Obtains current metadata cache size data for specified file + * + * \file_id + * \param[out] max_size_ptr Pointer to the location in which the current cache maximum size is to be + * returned, or NULL if this datum is not desired + * \param[out] min_clean_size_ptr Pointer to the location in which the current cache minimum clean + * size is to be returned, or NULL if that datum is not desired + * \param[out] cur_size_ptr Pointer to the location in which the current cache size is to be returned, + * or NULL if that datum is not desired + * \param[out] cur_num_entries_ptr Pointer to the location in which the current number of entries in + * the cache is to be returned, or NULL if that datum is not desired + * \returns \herr_t + * + * \details H5Fget_mdc_size() queries the metadata cache of the target file for the desired size + * information, and returns this information in the locations indicated by the pointer + * parameters. If any pointer parameter is NULL, the associated data is not returned. + * + * If the API call fails, the values returned via the pointer parameters are undefined. + * + * If adaptive cache resizing is enabled, the cache maximum size and minimum clean size + * may change at the end of each epoch. Current size and current number of entries can + * change on each cache access. + * + * Current size can exceed maximum size under certain conditions. See the overview of the + * metadata cache in the special topics section of the user manual for a discussion of this. + * + */ +H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, + size_t *cur_size_ptr, int *cur_num_entries_ptr); +/** + * \ingroup MDC + * + * \brief Resets hit rate statistics counters for the target file + * + * \file_id + * \returns \herr_t + * + * \details + * \parblock + * H5Freset_mdc_hit_rate_stats() resets the hit rate statistics counters in the metadata cache + * associated with the specified file. + * + * If the adaptive cache resizing code is enabled, the hit rate statistics are reset at the beginning + * of each epoch. This API call allows you to do the same thing from your program. + * + * The adaptive cache resizing code may behave oddly if you use this call when adaptive cache resizing + * is enabled. However, the call should be useful if you choose to control metadata cache size from your + * program. + * + * See \ref_mdc_in_hdf5 for details about the metadata cache and the adaptive cache resizing + * algorithms. If you have not read, understood, and thought about the material covered in that + * documentation, + * you should not be using this API call. + * \endparblock + * + */ +H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Retrieves name of file to which object belongs + * + * \obj_id + * \param[out] name Buffer for the file name + * \param[in] size Size, in bytes, of the \p name buffer + * + * \return Returns the length of the file name if successful; otherwise returns + * a negative value. + * + * \details H5Fget_name() retrieves the name of the file to which the object \p + * obj_id belongs. The object can be a file, group, dataset, + * attribute, or named datatype. + * + * Up to \p size characters of the file name are returned in \p name; + * additional characters, if any, are not returned to the user + * application. + * + * If the length of the name, which determines the required value of + * size, is unknown, a preliminary H5Fget_name() call can be made by + * setting \p name to NULL. The return value of this call will be the + * size of the file name; that value plus one (1) can then be assigned + * to size for a second H5Fget_name() call, which will retrieve the + * actual name. (The value passed in with the parameter \p size must + * be one greater than size in bytes of the actual name in order to + * accommodate the null terminator; if \p size is set to the exact + * size of the name, the last byte passed back will contain the null + * terminator and the last character will be missing from the name + * passed back to the calling application.) + * + * If an error occurs, the buffer pointed to by \p name is unchanged + * and the function returns a negative value. + * + * \since 1.6.3 + * + */ +H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); +/** + * \ingroup H5F + * + * \brief Retrieves name of file to which object belongs + * + * \fgdta_obj_id + * \param[out] file_info Buffer for global file information + * + * \return \herr_t + * + * \details H5Fget_info2() returns global information for the file associated + * with the object identifier \p obj_id in the H5F_info2_t \c struct + * named \p file_info. + * + * \p obj_id is an identifier for any object in the file of interest. + * + * H5F_info2_t struct is defined in H5Fpublic.h as follows: + * \snippet this H5F_info2_t_snip + * + * The \c super sub-struct contains the following information: + * \li \c vers is the version number of the superblock. + * \li \c super_size is the size of the superblock. + * \li \c super_ext_size is the size of the superblock extension. + * + * The \c free sub-struct contains the following information: + * \li vers is the version number of the free-space manager. + * \li \c hdr_size is the size of the free-space manager header. + * \li \c tot_space is the total amount of free space in the file. + * + * The \c sohm sub-struct contains shared object header message + * information as follows: + * \li \c vers is the version number of the shared object header information. + * \li \c hdr_size is the size of the shared object header message. + * \li \c msgs_info is an H5_ih_info_t struct defined in H5public.h as + * follows: \snippet H5public.h H5_ih_info_t_snip + * \li \p index_size is the summed size of all the shared object + * header indexes. Each index might be either a B-tree or + * a list. + * \li \p heap_size is the size of the heap. + * + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *file_info); +/** + * \ingroup SWMR + * + * \brief Retrieves the collection of read retries for metadata entries with checksum + * + * \file_id + * \param[out] info Struct containing the collection of read retries for metadata + * entries with checksum + * \return \herr_t\n + * + * \details \Bold{Failure Modes:} + * \li When the input identifier is not a file identifier. + * \li When the pointer to the output structure is NULL. + * \li When the memory allocation for \p retries failed. + * + * \details H5Fget_metadata_read_retry_info() retrieves information regarding the number + * of read retries for metadata entries with checksum for the file \p file_id. + * This information is reported in the H5F_retry_info_t struct defined in + * H5Fpublic.h as follows: + * \snippet this H5F_retry_info_t_snip + * \c nbins is the number of bins for each \c retries[i] of metadata entry \c i. + * It is calculated based on the current number of read attempts used in the + * library and logarithmic base 10. + * + * If read retries are incurred for a metadata entry \c i, the library will + * allocate memory for \Code{retries[i] (nbins * sizeof(uint32_t)} and store + * the collection of retries there. If there are no retries for a metadata entry + * \c i, \Code{retries[i]} will be NULL. After a call to this routine, users should + * free each \Code{retries[i]} that is non-NULL, otherwise resource leak will occur. + * + * For the library default read attempts of 100 for SWMR access, nbins will be 2 + * as depicted below: + * \li \Code{retries[i][0]} is the number of 1 to 9 read retries. + * \li \Code{retries[i][1]} is the number of 10 to 99 read retries. + * For the library default read attempts of 1 for non-SWMR access, \c nbins will + * be 0 and each \Code{retries[i]} will be NULL. + * + * The following table lists the 21 metadata entries of \Code{retries[]}: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Index for \Code{retries[]}Metadata entries*
    0Object header (version 2)
    1Object header chunk (version 2)
    2B-tree header (version 2)
    3B-tree internal node (version 2)
    4B-tree leaf node (version 2)
    5Fractal heap header
    6Fractal heap direct block (optional checksum)
    7Fractal heap indirect block
    8Free-space header
    9Free-space sections
    10Shared object header message table
    11Shared message record list
    12Extensive array header
    13Extensive array index block
    14Extensive array super block
    15Extensive array data block
    16Extensive array data block page
    17Fixed array super block
    18Fixed array data block
    19Fixed array data block page
    20File's superblock (version 2)
    * All entries are of version 0 (zero) unless indicated + * otherwise.
    + * + * \note On a system that is not atomic, the library might possibly read inconsistent + * metadata with checksum when performing single-writer/multiple-reader (SWMR) + * operations for an HDF5 file. Upon encountering such situations, the library + * will try reading the metadata again for a set number of times to attempt to + * obtain consistent data. The maximum number of read attempts used by the library + * will be either the value set via H5Pset_metadata_read_attempts() or the library + * default value when a value is not set.\n + * When the current number of metadata read attempts used in the library is unable + * to remedy the reading of inconsistent metadata on a system, the user can assess + * the information obtained via this routine to derive a different maximum value. + * The information can also be helpful for debugging purposes to identify potential + * issues with metadata flush dependencies and SWMR implementation in general. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); +/** + * \ingroup SWMR + * + * \brief Retrieves free-space section information for a file + * + * \file_id + * + * \return \herr_t + * + * \details H5Fstart_swmr_write() will activate SWMR writing mode for a file + * associated with \p file_id. This routine will prepare and ensure + * the file is safe for SWMR writing as follows: + * \li Check that the file is opened with write access (#H5F_ACC_RDWR). + * \li Check that the file is opened with the latest library format to + * ensure data structures with check-summed metadata are used. + * \li Check that the file is not already marked in SWMR writing mode. + * \li Enable reading retries for check-summed metadata to remedy + * possible checksum failures from reading inconsistent metadata + * on a system that is not atomic. + * \li Turn off usage of the library's accumulator to avoid possible + * ordering problem on a system that is not atomic. + * \li Perform a flush of the file’s data buffers and metadata to set + * a consistent state for starting SWMR write operations. + * + * Library objects are groups, datasets, and committed datatypes. For + * the current implementation, groups and datasets can remain open when + * activating SWMR writing mode, but not committed datatypes. Attributes + * attached to objects cannot remain open either. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Retrieves free-space section information for a file + * + * \file_id + * \param[in] type The file memory allocation type + * \param[in] nsects The number of free-space sections + * \param[out] sect_info Array of instances of H5F_sect_info_t in which + * the free-space section information is to be returned + * + * \return Returns the number of free-space sections for the specified + * free-space manager in the file; otherwise returns a negative value. + * + * \details H5Fget_free_sections() retrieves free-space section information for + * the free-space manager with type that is associated with file + * \p file_id. If type is #H5FD_MEM_DEFAULT, this routine retrieves + * free-space section information for all the free-space managers in + * the file. + * + * Valid values for \p type are the following: + * \mem_types + * + * H5F_sect_info_t is defined as follows (in H5Fpublic.h): + * \snippet this H5F_sect_info_t_snip + * + * This routine retrieves free-space section information for \p nsects + * sections or at most the maximum number of sections in the specified + * free-space manager. If the number of sections is not known, a + * preliminary H5Fget_free_sections() call can be made by setting \p + * sect_info to NULL and the total number of free-space sections for + * the specified free-space manager will be returned. Users can then + * allocate space for entries in \p sect_info, each of which is + * defined as an H5F_sect_info_t \c struct. + * + * \attention \Bold{Failure Modes:} This routine will fail when the following + * is true: + * \li The library fails to retrieve the file creation property list + * associated with \p file_id. + * \li If the parameter \p sect_info is non-null, but the parameter + * \p nsects is equal to 0. + * \li The library fails to retrieve free-space section information + * for the file. + * + * \since 1.10.0 + * + */ +H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, + H5F_sect_info_t *sect_info /*out*/); +/** + * \ingroup H5F + * + * \brief Clears the external link open file cache + * + * \file_id + * \return \herr_t + * + * \details H5Fclear_elink_file_cache() evicts all the cached child files in + * the specified file’s external file cache, causing them to be closed + * if there is nothing else holding them open. + * + * H5Fclear_elink_file_cache() does not close the cache itself; + * subsequent external link traversals from the parent file will again + * cache the target file. See H5Pset_elink_file_cache_size() for + * information on closing the file cache. + * + * \see H5Pset_elink_file_cache_size(), H5Pget_elink_file_cache_size() + * + * \since 1.8.7 + * + */ +H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Enables the switch of version bounds setting for a file + * + * \file_id + * \param[in] low The earliest version of the library that will be used for + * writing objects + * \param[in] high The latest version of the library that will be used for + * writing objects + * + * \return \herr_t + * + * \details H5Fset_libver_bounds() enables the switch of version bounds setting + * for an open file associated with \p file_id. + * + * For the parameters \p low and \p high, see the description for + * H5Pset_libver_bounds(). + * + * \par Example + * \snippet H5F_examples.c libver_bounds + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); +/** + * \ingroup MDC + * + * \brief Starts logging metadata cache events if logging was previously enabled + * + * \file_id + * + * \return \herr_t + * + * \details The metadata cache is a central part of the HDF5 library through + * which all \Emph{file metadata} reads and writes take place. File + * metadata is normally invisible to the user and is used by the + * library for purposes such as locating and indexing data. File + * metadata should not be confused with user metadata, which consists + * of attributes created by users and attached to HDF5 objects such + * as datasets via H5A API calls. + * + * Due to the complexity of the cache, a trace/logging feature has been + * created that can be used by HDF5 developers for debugging and performance + * analysis. The functions that control this functionality will normally be + * of use to a very limited number of developers outside of The HDF Group. + * The functions have been documented to help users create logs that can + * be sent with bug reports. + * + * Control of the log functionality is straightforward. Logging is enabled + * via the H5Pset_mdc_log_options() function, which will modify the file + * access property list used to open or create a file. This function has + * a flag that determines whether logging begins at file open or starts + * in a paused state. Log messages can then be controlled via the + * H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. + * H5Pget_mdc_log_options() can be used to examine a file access property + * list, and H5Fget_mdc_logging_status() will return the current state of + * the logging flags. + * + * The log format is described in the \ref_mdc_logging document. + * + * \note Logging can only be started or stopped if metadata cache logging was enabled + * via H5Pset_mdc_log_options().\n + * When enabled and currently logging, the overhead of the logging feature will + * almost certainly be significant.\n + * The log file is opened when the HDF5 file is opened or created and not when + * this function is called for the first time.\n + * This function opens the log file and starts logging metadata cache operations + * for a particular file. Calling this function when logging has already been + * enabled will be considered an error. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Fstart_mdc_logging(hid_t file_id); +/** + * \ingroup MDC + * + * \brief Stops logging metadata cache events if logging was previously enabled and is currently ongoing + * + * \file_id + * + * \return \herr_t + * + * \details The metadata cache is a central part of the HDF5 library through + * which all \Emph{file metadata} reads and writes take place. File + * metadata is normally invisible to the user and is used by the + * library for purposes such as locating and indexing data. File + * metadata should not be confused with user metadata, which consists + * of attributes created by users and attached to HDF5 objects such + * as datasets via H5A API calls. + * + * Due to the complexity of the cache, a trace/logging feature has been + * created that can be used by HDF5 developers for debugging and performance + * analysis. The functions that control this functionality will normally be + * of use to a very limited number of developers outside of The HDF Group. + * The functions have been documented to help users create logs that can + * be sent with bug reports. + * + * Control of the log functionality is straightforward. Logging is enabled + * via the H5Pset_mdc_log_options() function, which will modify the file + * access property list used to open or create a file. This function has + * a flag that determines whether logging begins at file open or starts + * in a paused state. Log messages can then be controlled via the + * H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. + * H5Pget_mdc_log_options() can be used to examine a file access property + * list, and H5Fget_mdc_logging_status() will return the current state of + * the logging flags. + * + * The log format is described in the \ref_mdc_logging document. + * + * \note Logging can only be started or stopped if metadata cache logging was enabled + * via H5Pset_mdc_log_options().\n + * This function only suspends the logging operations. The log file will remain + * open and will not be closed until the HDF5 file is closed. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); +/** + * \ingroup MDC + * + * \brief Gets the current metadata cache logging status + * + * \file_id + * \param[out] is_enabled Whether logging is enabled + * \param[out] is_currently_logging Whether events are currently being logged + * \return \herr_t + * + * \details The metadata cache is a central part of the HDF5 library through + * which all \Emph{file metadata} reads and writes take place. File + * metadata is normally invisible to the user and is used by the + * library for purposes such as locating and indexing data. File + * metadata should not be confused with user metadata, which consists + * of attributes created by users and attached to HDF5 objects such + * as datasets via H5A API calls. + * + * Due to the complexity of the cache, a trace/logging feature has been + * created that can be used by HDF5 developers for debugging and performance + * analysis. The functions that control this functionality will normally be + * of use to a very limited number of developers outside of The HDF Group. + * The functions have been documented to help users create logs that can + * be sent with bug reports. + * + * Control of the log functionality is straightforward. Logging is enabled + * via the H5Pset_mdc_log_options() function, which will modify the file + * access property list used to open or create a file. This function has + * a flag that determines whether logging begins at file open or starts + * in a paused state. Log messages can then be controlled via the + * H5Fstart_mdc_logging() and H5Fstop_mdc_logging() functions. + * H5Pget_mdc_log_options() can be used to examine a file access property + * list, and H5Fget_mdc_logging_status() will return the current state of + * the logging flags. + * + * The log format is described in the \ref_mdc_logging document. + * + * \note Unlike H5Fstart_mdc_logging() and H5Fstop_mdc_logging(), this function can + * be called on any open file identifier. + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging); +/** + * \ingroup SWMR + * + * \todo UFO? + */ +H5_DLL herr_t H5Fformat_convert(hid_t fid); +/** + * \ingroup H5F + * + * \brief Resets the page buffer statistics + * + * \file_id + * + * \return \herr_t + * + * \details H5Freset_page_buffering_stats() resets the page buffer statistics + * for a specified file identifier \p file_id. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Freset_page_buffering_stats(hid_t file_id); +/** + * \ingroup H5F + * + * \brief Retrieves statistics about page access when it is enabled + * + * \file_id + * \param[out] accesses Two integer array for the number of metadata and raw + * data accesses to the page buffer + * \param[out] hits Two integer array for the number of metadata and raw data + * hits in the page buffer + * \param[out] misses Two integer array for the number of metadata and raw data + * misses in the page buffer + * \param[out] evictions Two integer array for the number of metadata and raw + * data evictions from the page buffer + * \param[out] bypasses Two integer array for the number of metadata and raw + * data accesses that bypass the page buffer + * + * \return \herr_t + * + * \details H5Fget_page_buffering_stats() retrieves page buffering statistics + * such as the number of metadata and raw data accesses (\p accesses), + * hits (\p hits), misses (\p misses), evictions (\p evictions), and + * accesses that bypass the page buffer (\p bypasses). + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], unsigned hits[2], + unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); +/** + * \ingroup MDC + * + * \brief Obtains information about a cache image if it exists + * + * \file_id + * \param[out] image_addr Offset of the cache image if it exists, or \c HADDR_UNDEF if it does not + * \param[out] image_size Length of the cache image if it exists, or 0 if it does not + * \returns \herr_t + * + * \details + * \parblock + * H5Fget_mdc_image_info() returns information about a cache image if it exists. + * + * When an HDF5 file is opened in Read/Write mode, any metadata cache image will + * be read and deleted from the file on the first metadata cache access (or, if + * persistent free space managers are enabled, on the first file space + * allocation / deallocation, or read of free space manager status, whichever + * comes first). + * + * Thus, if the file is opened Read/Write, H5Fget_mdc_image_info() should be called + * immediately after file open and before any other operation. If H5Fget_mdc_image_info() + * is called after the cache image is loaded, it will correctly report that no cache image + * exists, as the image will have already been read and deleted from the file. In the Read Only + * case, the function may be called at any time, as any cache image will not be deleted + * from the file. + * \endparblock + * + * \since 1.10.1 + */ +H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_size); +/** + * \ingroup H5F + * + * \brief Retrieves the setting for whether or not a file will create minimized + * dataset object headers + * + * \file_id + * \param[out] minimize Flag indicating whether the library will or will not + * create minimized dataset object headers + * + * \return \herr_t + * + * \details H5Fget_dset_no_attrs_hint() retrieves the no dataset attributes + * hint setting for the file specified by the file identifier \p + * file_id. This setting is used to inform the library to create + * minimized dataset object headers when \c TRUE. + * + * The setting's value is returned in the boolean pointer minimize. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize); +/** + * \ingroup H5F + * + * \brief Sets the flag to create minimized dataset object headers + * + * \file_id + * \param[in] minimize Flag indicating whether the library will or will not + * create minimized dataset object headers + * + * \return \herr_t + * + * \details H5Fset_dset_no_attrs_hint() sets the no dataset attributes hint + * setting for the file specified by the file identifier \p file_id. + * If the boolean flag \p minimize is set to \c TRUE, then the library + * will create minimized dataset object headers in the file. + * \Bold{All} files that refer to the same file-on-disk will be + * affected by the most recent setting, regardless of the file + * identifier/handle (e.g., as returned by H5Fopen()). By setting the + * \p minimize flag to \c TRUE, the library expects that no attributes + * will be added to the dataset - attributes can be added, but they + * are appended with a continuation message, which can reduce + * performance. + * + * \attention This setting interacts with H5Pset_dset_no_attrs_hint(): if + * either is set to \c TRUE, then the created dataset's object header + * will be minimized. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize); #ifdef H5_HAVE_PARALLEL +/** + * \ingroup PH5F + * + * \brief Sets the MPI atomicity mode + * + * \file_id + * \param[in] flag Logical flag for atomicity setting. Valid values are: + * \li \c 1 -- Sets MPI file access to atomic mode. + * \li \c 0 -- Sets MPI file access to nonatomic mode. + * \returns \herr_t + * + * \par Motivation + * H5Fset_mpi_atomicity() is applicable only in parallel environments using MPI I/O. + * The function is one of the tools used to ensure sequential consistency. This means + * that a set of operations will behave as though they were performed in a serial + * order consistent with the program order. + * + * \details + * \parblock + * H5Fset_mpi_atomicity() sets MPI consistency semantics for data access to the file, + * \p file_id. + * + * If \p flag is set to \c 1, all file access operations will appear atomic, guaranteeing + * sequential consistency. If \p flag is set to \c 0, enforcement of atomic file access + * will be turned off. + * + * H5Fset_mpi_atomicity() is a collective function and all participating processes must + * pass the same values for \p file_id and \p flag. + * + * This function is available only when the HDF5 library is configured with parallel support + * (\Code{--enable-parallel}). It is useful only when used with the #H5FD_MPIO driver + * (see H5Pset_fapl_mpio()). + * \endparblock + * + * \attention + * \parblock + * H5Fset_mpi_atomicity() calls \Code{MPI_File_set_atomicity} underneath and is not supported + * if the execution platform does not support \Code{MPI_File_set_atomicity}. When it is + * supported and used, the performance of data access operations may drop significantly. + * + * In certain scenarios, even when \Code{MPI_File_set_atomicity} is supported, setting + * atomicity with H5Fset_mpi_atomicity() and \p flag set to 1 does not always yield + * strictly atomic updates. For example, some H5Dwrite() calls translate to multiple + * \Code{MPI_File_write_at} calls. This happens in all cases where the high-level file + * access routine translates to multiple lower level file access routines. + * The following scenarios will raise this issue: + * \li Non-contiguous file access using independent I/O + * \li Partial collective I/O using chunked access + * \li Collective I/O using filters or when data conversion is required + * + * This issue arises because MPI atomicity is a matter of MPI file access operations rather + * than HDF5 access operations. But the user is normally seeking atomicity at the HDF5 level. + * To accomplish this, the application must set a barrier after a write, H5Dwrite(), but before + * the next read, H5Dread(), in addition to calling H5Fset_mpi_atomicity().The barrier will + * guarantee that all underlying write operations execute atomically before the read + * operations starts. This ensures additional ordering semantics and will normally produce + * the desired behavior. + * \endparblock + * + * \see \ref_cons_semantics + * + * \since 1.8.9 + * + */ H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); +/** + * \ingroup PH5F + * + * \brief Retrieves the atomicity mode in use + * + * \file_id + * \param[out] flag Logical flag for atomicity setting. Valid values are: + * \li 1 -- MPI file access is set to atomic mode. + * \li 0 -- MPI file access is set to nonatomic mode. + * \returns \herr_t + * + * \details H5Fget_mpi_atomicity() retrieves the current consistency semantics mode for + * data access for the file \p file_id. + * + * Upon successful return, \p flag will be set to \c 1 if file access is set + * to atomic mode and \c 0 if file access is set to nonatomic mode. + * + * \see \ref_cons_semantics + * + * \since 1.8.9 + * + */ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); #endif /* H5_HAVE_PARALLEL */ @@ -287,21 +1685,81 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ -#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/ +#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /**< Print debug info \deprecated In which version? */ /* Typedefs */ -/* Current "global" information about file */ +/** + * Current "global" information about file + */ +//! typedef struct H5F_info1_t { - hsize_t super_ext_size; /* Superblock extension size */ + hsize_t super_ext_size; /**< Superblock extension size */ struct { - hsize_t hdr_size; /* Shared object header message header size */ - H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ + hsize_t hdr_size; /**< Shared object header message header size */ + H5_ih_info_t msgs_info; /**< Shared object header message index & heap size */ } sohm; } H5F_info1_t; +//! /* Function prototypes */ -H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo); +/** + * \ingroup H5F + * + * \brief Retrieves name of file to which object belongs + * + * \fgdta_obj_id + * \param[out] file_info Buffer for global file information + * + * \return \herr_t + * + * \deprecated This function has been renamed from H5Fget_info() and is + * deprecated in favor of the macro #H5Fget_info or the function + * H5Fget_info2(). + * + * \details H5Fget_info1() returns global information for the file associated + * with the object identifier \p obj_id in the H5F_info1_t \c struct + * named \p file_info. + * + * \p obj_id is an identifier for any object in the file of interest. + * + * H5F_info1_t struct is defined in H5Fpublic.h as follows: + * \snippet this H5F_info1_t_snip + * + * \c super_ext_size is the size of the superblock extension. + * + * The \c sohm sub-struct contains shared object header message + * information as follows: + * \li \c hdr_size is the size of the shared object header message. + * \li \c msgs_info is an H5_ih_info_t struct defined in H5public.h as + * follows: \snippet H5public.h H5_ih_info_t_snip + * + * \li \p index_size is the summed size of all the shared object + * header indexes. Each index might be either a B-tree or + * a list. + * + * \version 1.10.0 Function H5Fget_info() renamed to H5Fget_info1() and + * deprecated in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *file_info); +/** + * \ingroup H5F + * + * \brief Sets thelatest version of the library to be used for writing objects + * + * \file_id + * \param[in] latest_format Latest format flag + * + * \return \herr_t + * + * \deprecated When? + * + * \todo In which version was this function deprecated? + * + */ H5_DLL herr_t H5Fset_latest_format(hid_t file_id, hbool_t latest_format); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Gmodule.h b/src/H5Gmodule.h index 5a8791732ae..fe26bd2a14d 100644 --- a/src/H5Gmodule.h +++ b/src/H5Gmodule.h @@ -29,4 +29,96 @@ #define H5_MY_PKG_ERR H5E_SYM #define H5_MY_PKG_INIT YES +/** + * \defgroup H5G H5G + * + * \details \Bold{Groups in HDF5:} A group associates names with objects and + * provides a mechanism for mapping a name to an object. Since all + * objects appear in at least one group (with the possible exception of + * the root object) and since objects can have names in more than one + * group, the set of all objects in an HDF5 file is a directed + * graph. The internal nodes (nodes with out-degree greater than zero) + * must be groups while the leaf nodes (nodes with out-degree zero) are + * either empty groups or objects of some other type. Exactly one + * object in every non-empty file is the root object. The root object + * always has a positive in-degree because it is pointed to by the file + * super block. + * + * \Bold{Locating objects in the HDF5 file hierarchy:} An object name + * consists of one or more components separated from one another by + * slashes. An absolute name begins with a slash and the object is + * located by looking for the first component in the root object, then + * looking for the second component in the first object, etc., until + * the entire name is traversed. A relative name does not begin with a + * slash and the traversal begins at the location specified by the + * create or access function. + * + * \Bold{Group implementations in HDF5:} The original HDF5 group + * implementation provided a single indexed structure for link + * storage. A new group implementation, in HDF5 Release 1.8.0, enables + * more efficient compact storage for very small groups, improved link + * indexing for large groups, and other advanced features. + * + * \li The \Emph{original indexed} format remains the default. Links + * are stored in a B-tree in the group’s local heap. + * \li Groups created in the new \Emph{compact-or-indexed} format, the + * implementation introduced with Release 1.8.0, can be tuned for + * performance, switching between the compact and indexed formats + * at thresholds set in the user application. + * - The \Emph{compact} format will conserve file space and processing + * overhead when working with small groups and is particularly + * valuable when a group contains no links. Links are stored + * as a list of messages in the group’s header. + * - The \Emph{indexed} format will yield improved + * performance when working with large groups, e.g., groups + * containing thousands to millions of members. Links are stored in + * a fractal heap and indexed with an improved B-tree. + * \li The new implementation also enables the use of link names consisting of + * non-ASCII character sets (see H5Pset_char_encoding()) and is + * required for all link types other than hard or soft links, e.g., + * external and user-defined links (see the \ref H5L APIs). + * + * The original group structure and the newer structures are not + * directly interoperable. By default, a group will be created in the + * original indexed format. An existing group can be changed to a + * compact-or-indexed format if the need arises; there is no capability + * to change back. As stated above, once in the compact-or-indexed + * format, a group can switch between compact and indexed as needed. + * + * Groups will be initially created in the compact-or-indexed format + * only when one or more of the following conditions is met: + * \li The low version bound value of the library version bounds property + * has been set to Release 1.8.0 or later in the file access property + * list (see H5Pset_libver_bounds()). Currently, that would require an + * H5Pset_libver_bounds() call with the low parameter set to + * #H5F_LIBVER_LATEST.\n When this property is set for an HDF5 file, + * all objects in the file will be created using the latest available + * format; no effort will be made to create a file that can be read by + * older libraries. + * \li The creation order tracking property, #H5P_CRT_ORDER_TRACKED, has been + * set in the group creation property list (see H5Pset_link_creation_order()). + * + * An existing group, currently in the original indexed format, will be + * converted to the compact-or-indexed format upon the occurrence of + * any of the following events: + * \li An external or user-defined link is inserted into the group. + * \li A link named with a string composed of non-ASCII characters is + * inserted into the group. + * + * The compact-or-indexed format offers performance improvements that + * will be most notable at the extremes, i.e., in groups with zero + * members and in groups with tens of thousands of members. But + * measurable differences may sometimes appear at a threshold as low as + * eight group members. Since these performance thresholds and criteria + * differ from application to application, tunable settings are + * provided to govern the switch between the compact and indexed + * formats (see H5Pset_link_phase_change()). Optimal thresholds will + * depend on the application and the operating environment. + * + * Future versions of HDF5 will retain the ability to create, read, + * write, and manipulate all groups stored in either the original + * indexed format or the compact-or-indexed format. + * + */ + #endif /* H5Gmodule_H */ diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 99134f830a2..7f1faf8e6aa 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -41,22 +41,31 @@ /* Public Typedefs */ /*******************/ -/* Types of link storage for groups */ +//! +/** + * Types of link storage for groups + */ typedef enum H5G_storage_type_t { - H5G_STORAGE_TYPE_UNKNOWN = -1, /* Unknown link storage type */ - H5G_STORAGE_TYPE_SYMBOL_TABLE, /* Links in group are stored with a "symbol table" */ - /* (this is sometimes called "old-style" groups) */ - H5G_STORAGE_TYPE_COMPACT, /* Links are stored in object header */ - H5G_STORAGE_TYPE_DENSE /* Links are stored in fractal heap & indexed with v2 B-tree */ + H5G_STORAGE_TYPE_UNKNOWN = -1, /**< Unknown link storage type */ + H5G_STORAGE_TYPE_SYMBOL_TABLE, /**< Links in group are stored with a "symbol table" */ + /**< (this is sometimes called "old-style" groups) */ + H5G_STORAGE_TYPE_COMPACT, /**< Links are stored in object header */ + H5G_STORAGE_TYPE_DENSE /**< Links are stored in fractal heap & indexed with v2 B-tree */ } H5G_storage_type_t; +//! -/* Information struct for group (for H5Gget_info/H5Gget_info_by_name/H5Gget_info_by_idx) */ +//! +/** + * Information struct for group for + * H5Gget_info(), H5Gget_info_by_name(), and H5Gget_info_by_idx() + */ typedef struct H5G_info_t { - H5G_storage_type_t storage_type; /* Type of storage for links in group */ - hsize_t nlinks; /* Number of links in group */ - int64_t max_corder; /* Current max. creation order value for group */ - hbool_t mounted; /* Whether group has a file mounted on it */ + H5G_storage_type_t storage_type; /**< Type of storage for links in group */ + hsize_t nlinks; /**< Number of links in group */ + int64_t max_corder; /**< Current max. creation order value for group */ + hbool_t mounted; /**< Whether group has a file mounted on it */ } H5G_info_t; +//! /********************/ /* Public Variables */ @@ -69,18 +78,344 @@ typedef struct H5G_info_t { extern "C" { #endif -H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); -H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id); -H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id); -H5_DLL hid_t H5Gget_create_plist(hid_t group_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Creates a new group and links it into the file + * + * \fgdta_loc_id + * \param[in] name Name of the group to create + * \lcpl_id + * \gcpl_id + * \gapl_id + * + * \return \hid_t{group} + * + * \details H5Gcreate2() creates a new group in a file. After a + * group has been created, links to datasets and to other groups + * can be added. + * + * The \p loc_id and \p name parameters specify where the group + * is located. \p loc_id may be a file, group, dataset, named + * datatype or attribute in the file. If an attribute, dataset, + * or named datatype is specified for \p loc_id then the group + * will be created at the location where the attribute, dataset, + * or named datatype is attached. \p name is the link to the group; + * \p name may be either an absolute path in the file (the links + * from the root group to the new group) or a relative path from + * \p loc_id (the link(s) from the group specified by \p loc_id + * to the new group). + * + * \p lcpl_id, \p gcpl_id, and \p gapl_id are property list + * identifiers. These property lists govern how the link to the + * group is created, how the group is created, and how the group + * can be accessed in the future, respectively. #H5P_DEFAULT can + * be passed in if the default properties are appropriate for + * these property lists. Currently, there are no APIs for the + * group access property list; use #H5P_DEFAULT. + * + * The group identifier should be closed by H5Gclose() when access + * is no longer required to prevent resource leaks. + * + * \since 1.8.0 + * + * \see H5Gopen2(), H5Gclose() + * + */ +H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Creates a new empty group without linking it into the file structure + * + * \fgdta_loc_id + * \gcpl_id + * \gapl_id + * + * \return \hid_t{group} + * + * \details H5Gcreate_anon() creates a new empty group in the file + * specified by \p loc_id. With default settings, H5Gcreate_anon() + * provides similar functionality to that provided by + * H5Gcreate1(), with the differences described in the list below. + * + * The new group’s creation and access properties are specified + * in \p gcpl_id and \p gapl_id, respectively. + * + * H5Gcreate_anon() returns a new group identifier. This identifier + * must be linked into the HDF5 file structure with H5Olink() + * or it will be deleted from the file when the file is closed. + * + * The differences between this function and H5Gcreate1() are + * as follows: + * + * \li H5Gcreate1() does not provide for the use of custom property + * lists; H5Gcreate1() always uses default properties. + * \li H5Gcreate_anon() neither provides the new group’s name + * nor links it into the HDF5 file structure; those actions + * must be performed separately through a call to H5Olink(), + * which offers greater control over linking. + * \li H5Gcreate_anon() does not directly provide a hint mechanism + * for the group’s heap size. Comparable information can be + * included in the group creation property list \p gcpl_id through + * a H5Pset_local_heap_size_hint() call. + * + * A group created with this function should be closed with + * H5Gclose() when the group is no longer needed so that resource + * leaks will not develop. + * + * \see H5Olink(), H5Dcreate(), Using Identifiers + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Opens an existing group in a file + * + * \fgdta_loc_id + * \param[in] name Name of the group to open + * \gapl_id + * + * \return \hid_t{group} + * + * \details H5Gopen2() opens an existing group, \p name, at the location + * specified by \p loc_id. + * + * With default settings, H5Gopen2() provides similar functionality + * to that provided by H5Gopen(). The only difference is that + * H5Gopen2() can provide a group access property list, \p gapl_id. + * + * H5Gopen2() returns a group identifier for the group that was + * opened. This group identifier should be released by H5Gclose() + * when it is no longer needed to prevent resource leaks. + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ +H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Gets a group creation property list identifier + * + * \group_id + * + * \return \hid_t{creation property list} + * + * \details H5Gget_create_plist() returns an identifier for the group creation + * property list associated with the group specified by \p group_id. + * + * The creation property list identifier should be released with + * H5Gclose() to prevent resource leaks. + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ +H5_DLL hid_t H5Gget_create_plist(hid_t group_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Retrieves information about a group + * + * \fgdta_loc_id + * \param[out] ginfo Struct in which group information is returned + * + * \return \hid_t{group} + * + * \details H5Gget_info() retrieves information about the group at location + * specified by \p loc_id. The information is returned in the \p ginfo. + * + * \p ginfo is an H5G_info_t struct and is defined (in H5Gpublic.h) + * as follows: + * + * \snippet this H5G_info_t_snip + * Possible values of \p storage_type are: + * \storage_type + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Retrieves information about a group by its name + * + * \fgdta_loc_id + * \param[in] name Name of the group to query + * \param[out] ginfo Struct in which group information is returned + * \lapl_id + * + * \return \herr_t + * + * \details H5Gget_info_by_name() retrieves information about the group \p name + * at location specified by \p loc_id. The information is returned in + * the \p ginfo struct. + * + * If \p loc_id specifies the group for which information is queried, + * then the group's \p name can be a dot (.). + * + * \p ginfo is an H5G_info_t struct and is defined (in H5Gpublic.h) + * as follows: + * + * \snippet this H5G_info_t_snip + * Possible values of \p storage_type are: + * \storage_type + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Retrieves information about a group, according to the group’s + * position within an index + * + * \fgdta_loc_id + * \param[in] group_name Name of the group to query + * \param[in] idx_type Transient index identifying object + * \param[in] order Transient index identifying object + * \param[in] n Position in the index of the group to query + * \param[out] ginfo Struct in which group information is returned + * \lapl_id + * + * \return Returns + * \li The size of the object name if successful, or + * \li 0 if no name is associated with the group identifier, or + * \li negative value, if failure occurred + * + * \details H5Gget_info_by_idx() retrieves the same information + * about a group as retrieved by the function H5Gget_info(), + * but the means of identifying the group differs; the group is + * identified by position in an index rather than by name. + * + * \p loc_id and \p group_name specify the group containing + * the group for which information is sought. The groups in \p + * group_name are indexed by \p idx_type; the group for which + * information is retrieved is identified in that index by index + * order, \p order, and index position, \p n. + * + * If \p loc_id specifies the group containing the group for + * which information is queried, \p group_name can be a dot (.). + * + * Valid values for \p index_type are as follows: + * \indexes + * The order in which the index is to be examined, as specified + * by \p order, can be one of the following: + * \orders + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id); -H5_DLL herr_t H5Gclose(hid_t group_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Flushes all buffers associated with a group to disk + * + * \group_id + * + * \return \herr_t + * + * \details H5Gflush() causes all buffers associated with a group to be + * immediately flushed to disk without removing the data from + * the cache. + * + * \attention + * HDF5 does not possess full control over buffering. H5G_FLUSH + * flushes the internal HDF5 buffers and then asks the operating + * system (the OS) to flush the system buffers for the open + * files. After that, the OS is responsible for ensuring that + * the data is actually flushed to disk. + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ H5_DLL herr_t H5Gflush(hid_t group_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Refreshes all buffers associated with a group + * + * \group_id + * + * \return \herr_t + * + * \details H5Grefresh() causes all buffers associated with a group to be + * cleared and immediately re-loaded with updated contents from disk. + * + * This function essentially closes the group, evicts all + * metadata associated with it from the cache, and then re-opens + * the group. The reopened group is automatically re-registered + * with the same identifier. + * + * \since 1.8.0 + * + * \see H5Gcreate2(), H5Gclose() + * + */ H5_DLL herr_t H5Grefresh(hid_t group_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Closes the specified group + * + * \group_id + * + * \return \herr_t + * + * \details H5Gclose() releases resources used by a group which was + * opened by H5Gcreate() or H5Gopen(). After closing a group, + * \p group_id cannot be used again until another H5Gcreate() + * or H5Gopen() is called on it. + * + * Failure to release a group with this call will result in + * resource leaks. + * + * \par Example + * \snippet H5F_examples.c mount + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Gclose(hid_t group_id); + /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. @@ -104,56 +439,647 @@ H5_DLL herr_t H5Grefresh(hid_t group_id); /* Typedefs */ -/* +//! +/** * An object has a certain type. The first few numbers are reserved for use * internally by HDF5. Users may add their own types with higher values. The - * values are never stored in the file -- they only exist while an - * application is running. An object may satisfy the `isa' function for more - * than one type. + * values are never stored in the file -- they only exist while an application + * is running. An object may satisfy the `isa' function for more than one type. + * + * \deprecated */ typedef enum H5G_obj_t { - H5G_UNKNOWN = -1, /* Unknown object type */ - H5G_GROUP, /* Object is a group */ - H5G_DATASET, /* Object is a dataset */ - H5G_TYPE, /* Object is a named data type */ - H5G_LINK, /* Object is a symbolic link */ - H5G_UDLINK, /* Object is a user-defined link */ - H5G_RESERVED_5, /* Reserved for future use */ - H5G_RESERVED_6, /* Reserved for future use */ - H5G_RESERVED_7 /* Reserved for future use */ + H5G_UNKNOWN = -1, /**< Unknown object type */ + H5G_GROUP, /**< Object is a group */ + H5G_DATASET, /**< Object is a dataset */ + H5G_TYPE, /**< Object is a named data type */ + H5G_LINK, /**< Object is a symbolic link */ + H5G_UDLINK, /**< Object is a user-defined link */ + H5G_RESERVED_5, /**< Reserved for future use */ + H5G_RESERVED_6, /**< Reserved for future use */ + H5G_RESERVED_7 /**< Reserved for future use */ } H5G_obj_t; +//! -/* Prototype for H5Giterate() operator */ +//! +/** + * Callback for H5Giterate() + * + * \deprecated + */ typedef herr_t (*H5G_iterate_t)(hid_t group, const char *name, void *op_data); +//! -/* Information about an object */ +//! +/** + * Information about an object + * + * \deprecated + */ typedef struct H5G_stat_t { - unsigned long fileno[2]; /*file number */ - unsigned long objno[2]; /*object number */ - unsigned nlink; /*number of hard links to object*/ - H5G_obj_t type; /*basic object type */ - time_t mtime; /*modification time */ - size_t linklen; /*symbolic link value length */ - H5O_stat_t ohdr; /* Object header information */ + unsigned long fileno[2]; /**< file number */ + unsigned long objno[2]; /**< object number */ + unsigned nlink; /**< number of hard links to object*/ + H5G_obj_t type; /**< basic object type */ + time_t mtime; /**< modification time */ + size_t linklen; /**< symbolic link value length */ + H5O_stat_t ohdr; /**< Object header information */ } H5G_stat_t; +//! /* Function prototypes */ -H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint); -H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name); -H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name); -H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id, - const char *new_name); -H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name); -H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name); -H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name); -H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/); -H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment); -H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf); -H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx, H5G_iterate_t op, void *op_data); -H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs); -H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, - H5G_stat_t *statbuf /*out*/); -H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Creates a new group and links it into the file + * + * \fgdta_loc_id + * \param[in] name Name of the group to create + * \param[in] size_hint The number of bytes to reserve for the names + * that will appear in the group + * + * \return \hid_t{group} + * + * \deprecated This function is deprecated in favor of H5Gcreate2(). + * + * \details H5Gcreate1() creates a new group with the specified name at the + * specified location, \p loc_id. \p loc_id may be a file, group, + * dataset, named datatype or attribute. If an attribute, dataset, or + * named datatype is specified for \p loc_id then the group will be + * created at the location where the attribute, dataset, or named + * datatype is attached. The name, name, must not already be taken by + * some other object and all parent groups must already exist. + * + * \p name can be a relative path based at \p loc_id or an absolute + * path from the root of the file. Use of this function requires that + * any intermediate groups specified in the path already exist. + * + * The length of a group name, or of the name of any object within a + * group, is not limited. + * + * \p size_hint is a hint for the number of bytes to reserve to store + * the names which will be eventually added to the new group. This + * value must be between 0 and UINT32_MAX (inclusive). If this + * parameter is zero, a default value will be used. + * + * The return value is a group identifier for the open group. This + * group identifier should be closed by calling H5Gclose() when it is + * no longer needed. + * + * See H5Gcreate_anon() for a discussion of the differences between + * H5Gcreate1() and H5Gcreate_anon(). + * + * \par Example + * \snippet H5F_examples.c mount + * + * \version 1.8.0 Function H5Gcreate() renamed to H5Gcreate1() and deprecated + * in this release. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Opens an existing group for modification and returns a group + * identifier for that group + * + * \fgdta_loc_id + * \param[in] name Name of the group to open + * + * \return \hid_t{group} + * + * \deprecated This function is deprecated in favor of H5Gopen2(). + * + * \details H5Gopen1() opens an existing group, \p name, at the location + * specified by \p loc_id. + * + * H5Gopen1() returns a group identifier for the group that was + * opened. This group identifier should be released by calling + * H5Gclose() when it is no longer needed. + * + * \version 1.8.0 The function H5Gopen() was renamed to H5Gopen1() + * and deprecated in this release. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Gopen1(hid_t loc_id, const char *name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Creates a link of the specified type from \p new_name to \p + * cur_name + * + * \fg_loc_id{cur_loc_id} + * \param[in] type Link type + * \param[in] cur_name Name of the existing object + * \param[in] new_name New name for the object + * + * \return \herr_t + * + * \deprecated This function is deprecated. + * + * \details H5Glink() creates a new name for an object that has some current + * name, possibly one of many names it currently has. + * + * If \p link_type is #H5G_LINK_HARD, then \p cur_name must specify + * the name of an existing object and both names are interpreted + * relative to \p cur_loc_id, which is either a file identifier or a + * group identifier. + * + * If \p link_type is #H5G_LINK_SOFT, then \p cur_name can be anything + * and is interpreted at lookup time relative to the group which + * contains the final component of \p new_name. For instance, if \p + * cur_name is \Code{./foo}, \p new_name is \Code{./x/y/bar}, and a + * request is made for \Code{./x/y/bar}, then the actual object looked + * up is \Code{./x/y/./foo}. + + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new_name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Creates a link of the specified type from \p cur_name to \p + * new_name + * + * \fg_loc_id{cur_loc_id} + * \param[in] cur_name Name of the existing object + * \param[in] type Link type + * \fg_loc_id{new_loc_id} + * \param[in] new_name New name for the object + * + * \return \herr_t + * + * \deprecated This function is deprecated. + * + * \details H5Glink2() creates a new name for an object that has some current + * name, possibly one of many names it currently has. + * + * If \p link_type is #H5G_LINK_HARD, then \p cur_name must specify the + * name of an existing object and both names are interpreted relative + * to \p cur_loc_id and \p new_loc_id, respectively, which are either + * file identifiers or group identifiers. + * + * If \p link_type is #H5G_LINK_SOFT, then \p cur_name can be anything + * and is interpreted at lookup time relative to the group which + * contains the final component of \p new_name. For instance, if \p + * current_name is \Code{./foo}, \p new_name is \Code{./x/y/bar}, and a + * request is made for \Code{./x/y/bar}, then the actual object looked + * up is \Code{./x/y/./foo}. + + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id, + const char *new_name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Renames an object within an HDF5 file + * + * \fg_loc_id{src_loc_id} + * \param[in] src_name Object's original name + * \param[in] dst_name Object's new name + * + * \return \herr_t + * + * \deprecated This function is deprecated. + * + * \details H5Gmove() renames an object within an HDF5 file. The original name, + * \p src_name, is unlinked from the group graph and the new name, \p + * dst_name, is inserted as an atomic operation. Both names are + * interpreted relative to \p loc_id, which is either a file or a group + * identifier. + * + * \attention Exercise care in moving groups as it is possible to render data in + * a file inaccessible with H5Gmove(). See The Group Interface in the + * HDF5 User's Guide. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gmove(hid_t src_loc_id, const char *src_name, const char *dst_name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Renames an object within an HDF5 file + * + * \fg_loc_id{src_loc_id} + * \param[in] src_name Object's original name + * \fg_loc_id{dst_loc_id} + * \param[in] dst_name Object's new name + * + * \return \herr_t + * + * \deprecated This function is deprecated. + * + * \details H5Gmove2() renames an object within an HDF5 file. The original name, + * \p src_name, is unlinked from the group graph and the new name, \p + * dst_name, is inserted as an atomic operation. + * + * \p src_name and \p dst_name are interpreted relative to \p + * src_loc_id and \p dst_loc_id, respectively, which are either file or + * group identifiers. + * + * \attention Exercise care in moving groups as it is possible to render data in + * a file inaccessible with H5Gmove2(). See The Group Interface in the + * HDF5 User's Guide. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gmove2(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Removes the link to an object from a group + * + * \fg_loc_id{loc_id} + * \param[in] name Name of the object to unlink + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function H5Ldelete(). + * + * \details H5Gunlink() removes the object specified by \p name from the group + * graph and decrements the link count for the object to which \p name + * points. This action eliminates any association between name and the + * object to which name pointed. + * + * Object headers keep track of how many hard links refer to an object; + * when the link count reaches zero, the object can be removed from the + * file. Objects which are open are not removed until all identifiers + * to the object are closed. + * + * If the link count reaches zero, all file space associated with the + * object will be released, i.e., identified in memory as freespace. If + * any object identifier is open for the object, the space will not be + * released until after the object identifier is closed. + * + * Note that space identified as freespace is available for re-use only + * as long as the file remains open; once a file has been closed, the + * HDF5 library loses track of freespace. See “Freespace Management” in + * the HDF5 User's Guide for further details. + * + * \attention Exercise care in moving groups as it is possible to render data in + * a file inaccessible with H5Gunlink(). See The Group Interface in the + * HDF5 User's Guide. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gunlink(hid_t loc_id, const char *name); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Returns the name of the object that the symbolic link points to + * + * \fg_loc_id{loc_id} + * \param[in] name Symbolic link to the object whose name is to be returned + * \param[in] size Maximum number of characters of value to be returned + * \param[out] buf A buffer to hold the name of the object being sought + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function H5Lget_val(). + * + * \details H5Gget_linkval() returns up to size characters of the name of the + * object that the symbolic link name points to. + * + * The parameter \p loc_id is a file or group identifier. + * + * The parameter \p name must be a symbolic link pointing to the + * desired object and must be defined relative to \p loc_id. + * + * If size is smaller than the size of the returned object name, then + * the name stored in the buffer value will not be \c NULL terminated. + * + * This function fails if \p name is not a symbolic link. The presence + * of a symbolic link can be tested by passing zero for \p size and \p + * NULL for value. + * + * This function should be used only after H5Lget_info1() (or the + * deprecated function H5Gget_objinfo()) has been called to verify that + * name is a symbolic link. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf /*out*/); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Sets comment for specified object + * + * \fgdt_loc_id + * \param[in] name Name of the object whose comment is to be set or reset + * name must be \Code{'.'} (dot) if \p loc_id fully specifies + * the object for which the comment is to be set. + * \param[in] comment The new comment + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function + * H5Oset_comment(). + * + * \details H5Gset_comment() sets the comment for the object specified by \p + * loc_id and name to comment. Any previously existing comment is + * overwritten. + * + * \p loc_id can specify any object in the file. name can be one of the + * following: + * \li The name of the object relative to \p loc_id + * \li An absolute name of the object, starting from \c /, the file’s + * root group + * \li A dot (\c .), if \p loc_id fully specifies the object + * + * If \p comment is the empty string or a null pointer, the comment + * message is removed from the object. + * + * Comments should be relatively short, null-terminated, ASCII strings. + * + * Comments can be attached to any object that has an object header, + * e.g., datasets, groups, and named datatypes, but not symbolic links. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Retrieves comment for specified object + * + * \fgdt_loc_id + * \param[in] name Name of the object whose comment is to be set or reset + * name must be \Code{'.'} (dot) if \p loc_id fully specifies + * the object for which the comment is to be set. + * \param[in] bufsize Maximum number of comment characters to be returned in \p buf. + * \param[in] buf The comment + * + * \return Returns the number of characters in the comment, counting the \c NULL + * terminator, if successful; the value returned may be larger than + * \p bufsize. Otherwise returns a negative value. + * + * \deprecated This function is deprecated in favor of the function + * H5Oget_comment(). + * + * \details H5Gget_comment() retrieves the comment for the the object specified + * by \p loc_id and \p name. The comment is returned in the buffer \p + * buf. + * + * \p loc_id can specify any object in the file. name can be one of the + * following: + * \li The name of the object relative to \p loc_id + * \li An absolute name of the object, starting from \c /, the file’s + * root group + * \li A dot (\c .), if \p loc_id fully specifies the object + * + * At most bufsize characters, including a null-terminator, are + * returned in \p buf. The returned value is not null-terminated if the + * comment is longer than the supplied buffer. If the size of the + * comment is unknown, a preliminary \p H5Gget_comment() call will + * return the size of the comment, including space for the + * null-terminator. + * + * If an object does not have a comment, the empty string is returned + * in comment. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Iterates over the entries of a group invoking a callback for each + * entry encountered + * + * \fg_loc_id + * \param[in] name Group over which the iteration is performed + * \param[in,out] idx Location at which to begin the iteration + * \param[in] op Operation to be performed on an object at each step of the + * iteration + * \param[in,out] op_data Data associated with the operation + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function + * H5Literate1(). + * + * \details H5Giterate() iterates over the members of name in the file or group + * specified with \p loc_id. For each object in the group, the \p + * op_data and some additional information, specified below, are passed + * to the operator function. The iteration begins with the \p idx + * object in the group and the next element to be processed by the + * operator is returned in \p idx. If \p idx is NULL, then the iterator + * starts at the first group member; since no stopping point is + * returned in this case, the iterator cannot be restarted if one of + * the calls to its operator returns non-zero. H5Giterate() does not + * recursively follow links into subgroups of the specified group. + * + * The prototype for \ref H5G_iterate_t is: + * \snippet this H5G_iterate_t_snip + * + * The operation receives the group identifier for the group being + * iterated over, \p group, the name of the current object within + * the group, \p name, and the pointer to the operator data + * passed in to H5Giterate(), \p op_data. + * + * The return values from an operator are: + * \li Zero causes the iterator to continue, returning zero when all + * group members have been processed. + * \li Positive causes the iterator to immediately return that positive + * value, indicating short-circuit success. The iterator can be + * restarted at the next group member. + * \li Negative causes the iterator to immediately return that value, + * indicating failure. The iterator can be restarted at the next + * group member. + * + * H5Giterate() assumes that the membership of the group identified by + * \p name remains unchanged through the iteration. If the membership + * changes during the iteration, the function's behavior is undefined. + * + * H5Giterate() is not recursive. In particular, if a member of \p name + * is found to be a group, call it \c subgroup_a, H5Giterate() does not + * examine the members of \c subgroup_a. When recursive iteration is + * required, the application must handle the recursion, explicitly + * calling H5Giterate() on discovered subgroups. + + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Giterate(hid_t loc_id, const char *name, int *idx, H5G_iterate_t op, void *op_data); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Returns number of objects in the group specified by its identifier + * + * \fg_loc_id + * \param[out] num_objs Number of objects in the group + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the function H5Gget_info(). + * + * \details H5Gget_num_objs() returns number of objects in a group. Group is + * specified by its identifier \p loc_id. If a file identifier is + * passed in, then the number of objects in the root group is returned. + * + * \version 1.8.0 Function deprecated in this release. + * + */ +H5_DLL herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Returns information about an object. + * + * \fgdt_loc_id + * \param[in] name Name of the object for which status is being sought + * \param[in] follow_link Link flag + * \param[out] statbuf Buffer in which to return information about the object + * + * \return \herr_t + * + * \deprecated This function is deprecated in favor of the functions H5Oget_info() + * and H5Lget_info1(). + * + * \details H5Gget_objinfo() returns information about the specified object + * through the \p statbuf argument. + * + * A file or group identifier, \p loc_id, and an object name, \p name, + * relative to \p loc_id, are commonly used to specify the + * object. However, if the object identifier is already known to the + * application, an alternative approach is to use that identifier, \c + * obj_id, in place of \p loc_id, and a dot (\c .) in place of \p + * name. Thus, the alternative versions of the first portion of an + * H5Gget_objinfo() call would be as follows: + * \code + * H5Gget_objinfo (loc_id name ...) + * H5Gget_objinfo (obj_id . ...) + * \endcode + * + * If the object is a symbolic link and follow_link is zero (0), then + * the information returned describes the link itself; otherwise the + * link is followed and the information returned describes the object + * to which the link points. If \p follow_link is non-zero but the + * final symbolic link is dangling (does not point to anything), then + * an error is returned. The \p statbuf fields are undefined for an + * error. The existence of an object can be tested by calling this + * function with a \c NULL \p statbuf. + * + * H5Gget_objinfo() fills in the following data structure (defined in + * H5Gpublic.h): + * \snippet this H5G_stat_t_snip + * + * where \ref H5O_stat_t (defined in H5Opublic.h) is: + * \snippet H5Opublic.h H5O_stat_t_snip + * + * \attention Some systems will be able to record the time accurately but unable + * to retrieve the correct time; such systems (e.g., Irix64) will + * report an \c mtime value of 0 (zero). + * + * \version 1.8.0 Function deprecated in this release. + * \version 1.6.1 Two new fields were added to the \ref H5G_stat_t struct in + * this release. + * + */ +H5_DLL herr_t H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, + H5G_stat_t *statbuf /*out*/); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Returns a name of an object specified by an index + * + * \fg_loc_id + * \param[in] idx Transient index identifying object + * \param[in,out] name Pointer to user-provided buffer the object name + * \param[in] size Name length + * + * \return Returns the size of the object name if successful, or 0 if no name is + * associated with the group identifier. Otherwise returns a negative + * value. + * + * \deprecated This function is deprecated in favor of the function H5Lget_name_by_idx(). + * + * \details H5Gget_objname_by_idx() returns a name of the object specified by + * the index \p idx in the group \p loc_id. + * + * The group is specified by a group identifier \p loc_id. If + * preferred, a file identifier may be passed in \p loc_id; that file's + * root group will be assumed. + * + * \p idx is the transient index used to iterate through the objects in + * the group. The value of \p idx is any nonnegative number less than + * the total number of objects in the group, which is returned by the + * function H5Gget_num_objs(). Note that this is a transient index; an + * object may have a different index each time a group is opened. + * + * The object name is returned in the user-specified buffer \p name. + * + * If the size of the provided buffer \p name is less or equal the + * actual object name length, the object name is truncated to + * \Code{max_size - 1} characters. + * + * Note that if the size of the object's name is unkown, a preliminary + * call to H5Gget_objname_by_idx() with \p name set to \c NULL will + * return the length of the object's name. A second call to + * H5Gget_objname_by_idx() can then be used to retrieve the actual + * name. + * + * \version 1.8.0 Function deprecated in this release. + * \since 1.6.0 + * + */ +H5_DLL ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size); +/** + *------------------------------------------------------------------------- + * \ingroup H5G + * + * \brief Returns the type of an object specified by an index + * + * \fg_loc_id + * \param[in] idx Transient index identifying object + * + * \return Returns the type of the object if successful. Otherwise returns a + * negative value. + * + * \deprecated This function is deprecated in favor of the function H5Oget_info(). + * + * \details H5Gget_objtype_by_idx() returns the type of the object specified by + * the index \p idx in the group \p loc_id. + * + * The group is specified by a group identifier \p loc_id. If + * preferred, a file identifier may be passed in \p loc_id; that file's + * root group will be assumed. + * + * \p idx is the transient index used to iterate through the objects in + * the group. This parameter is described in more detail in the + * discussion of H5Gget_objname_by_idx(). + * + * \version 1.8.0 Function deprecated in this release. + * \version 1.6.0 The function return type changed from \c int to the enumerated + * type \ref H5G_obj_t. + * \since 1.6.0 + * + */ H5_DLL H5G_obj_t H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Imodule.h b/src/H5Imodule.h index 1ba8f11048c..a2174d735d0 100644 --- a/src/H5Imodule.h +++ b/src/H5Imodule.h @@ -29,4 +29,9 @@ #define H5_MY_PKG_ERR H5E_ATOM #define H5_MY_PKG_INIT NO +/**\defgroup H5I H5I + * \brief Identifier Interface + * \todo Describe concisely what the functions in this module are about. + */ + #endif /* H5Imodule_H */ diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index 3b9f1f5155b..cfd5b8d5a4d 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -21,46 +21,58 @@ /* Public headers needed by this file */ #include "H5public.h" -/* - * Library type values. Start with `1' instead of `0' because it makes the - * tracing output look better when hid_t values are large numbers. Change the - * TYPE_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will - * fail otherwise). +/** + * Library type values. + * \internal Library type values. Start with `1' instead of `0' because it + * makes the tracing output look better when hid_t values are large + * numbers. Change the TYPE_BITS in H5I.c if the MAXID gets larger + * than 32 (an assertion will fail otherwise). * - * When adding types here, add a section to the 'misc19' test in test/tmisc.c - * to verify that the H5I{inc|dec|get}_ref() routines work correctly with it. + * When adding types here, add a section to the 'misc19' test in + * test/tmisc.c to verify that the H5I{inc|dec|get}_ref() routines + * work correctly with it. * - * NOTE: H5I_REFERENCE is not used by the library and was removed - * in HDF5 1.12.0. + * NOTE: H5I_REFERENCE is not used by the library and was removed + * in HDF5 1.12.0. \endinternal */ +//! typedef enum H5I_type_t { - H5I_UNINIT = (-2), /* uninitialized type */ - H5I_BADID = (-1), /* invalid Type */ - H5I_FILE = 1, /* type ID for File objects */ - H5I_GROUP, /* type ID for Group objects */ - H5I_DATATYPE, /* type ID for Datatype objects */ - H5I_DATASPACE, /* type ID for Dataspace objects */ - H5I_DATASET, /* type ID for Dataset objects */ - H5I_ATTR, /* type ID for Attribute objects */ - H5I_REFERENCE, /* *DEPRECATED* type ID for Reference objects */ - H5I_VFL, /* type ID for virtual file layer */ - H5I_GENPROP_CLS, /* type ID for generic property list classes */ - H5I_GENPROP_LST, /* type ID for generic property lists */ - H5I_ERROR_CLASS, /* type ID for error classes */ - H5I_ERROR_MSG, /* type ID for error messages */ - H5I_ERROR_STACK, /* type ID for error stacks */ - H5I_NTYPES /* number of library types, MUST BE LAST! */ + H5I_UNINIT = (-2), /**< uninitialized type */ + H5I_BADID = (-1), /**< invalid Type */ + H5I_FILE = 1, /**< type ID for File objects */ + H5I_GROUP, /**< type ID for Group objects */ + H5I_DATATYPE, /**< type ID for Datatype objects */ + H5I_DATASPACE, /**< type ID for Dataspace objects */ + H5I_DATASET, /**< type ID for Dataset objects */ + H5I_ATTR, /**< type ID for Attribute objects */ + H5I_REFERENCE, /**< DEPRECATED* type ID for Reference objects */ + H5I_VFL, /**< type ID for virtual file layer */ + H5I_GENPROP_CLS, /**< type ID for generic property list classes */ + H5I_GENPROP_LST, /**< type ID for generic property lists */ + H5I_ERROR_CLASS, /**< type ID for error classes */ + H5I_ERROR_MSG, /**< type ID for error messages */ + H5I_ERROR_STACK, /**< type ID for error stacks */ + H5I_NTYPES /**< number of library types, MUST BE LAST! */ } H5I_type_t; +//! -/* Type of atoms to return to users */ +/** + * Type of IDs to return to users + */ typedef int64_t hid_t; + +/** + * The size of identifiers + */ #define H5_SIZEOF_HID_T H5_SIZEOF_INT64_T -/* An invalid object ID. This is also negative for error return. */ +/** + * An invalid object ID. This is also negative for error return. + */ #define H5I_INVALID_HID (-1) -/* - * Function for freeing objects. This function will be called with an object +/** + * A function for freeing objects. This function will be called with an object * ID type number and a pointer to the object. The function should free the * object and return non-negative to indicate that the object * can be removed from the ID type. If the function returns negative @@ -68,8 +80,12 @@ typedef int64_t hid_t; */ typedef herr_t (*H5I_free_t)(void *); -/* Type of the function to compare objects & keys */ +/** + * The type of a function to compare objects & keys + */ +//! typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key); +//! #ifdef __cplusplus extern "C" { @@ -77,25 +93,533 @@ extern "C" { /* Public API functions */ -H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); -H5_DLL void * H5Iobject_verify(hid_t id, H5I_type_t id_type); -H5_DLL void * H5Iremove_verify(hid_t id, H5I_type_t id_type); +/** + * \ingroup H5I + * + * \brief Registers an object under a type and returns an ID for it + * + * \param[in] type The identifier of the type of the new ID + * \param[in] object Pointer to object for which a new ID is created + * + * \return \hid_t{object} + * + * \details H5Iregister() creates and returns a new ID for an object. + * + * \details The \p type parameter is the identifier for the ID type to which + * this new ID will belong. This identifier must have been created by + * a call to H5Iregister_type(). + * + * \details The \p object parameter is a pointer to the memory which the new ID + * will be a reference to. This pointer will be stored by the library + * and returned via a call to H5Iobject_verify(). + * + */ +H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); +/** + * \ingroup H5I + * + * \brief Returns the object referenced by an ID + * + * \param[in] id ID to be dereferenced + * \param[in] type The identifier type + + * + * \return Pointer to the object referenced by \p id on success, NULL on failure. + * + * \details H5Iobject_verify() returns a pointer to the memory referenced by id + * after verifying that \p id is of type \p type. This function is + * analogous to dereferencing a pointer in C with type checking. + * + * \note H5Iobject_verify() does not change the ID it is called on in any way + * (as opposed to H5Iremove_verify(), which removes the ID from its + * type’s hash table). + * + * \see H5Iregister() + * + */ +H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Removes an ID from its type + * + * \param[in] id The ID to be removed from its type + * \param[in] type The identifier type + + * + * \return Returns a pointer to the memory referred to by \p id on success, + * NULL on failure. + * + * \details H5Iremove_verify() first ensures that \p id belongs to \p type. + * If so, it removes \p id from its type and returns the pointer + * to the memory it referred to. This pointer is the same pointer that + * was placed in storage by H5Iregister(). If id does not belong to + * \p type, then NULL is returned. + * + * The \p id parameter is the ID which is to be removed from its type. + * + * The \p type parameter is the identifier for the ID type which \p id + * is supposed to belong to. This identifier must have been created by + * a call to H5Iregister_type(). + * + * \note This function does NOT deallocate the memory that \p id refers to. + * The pointer returned by H5Iregister() must be deallocated by the user + * to avoid memory leaks. + * + */ +H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Retrieves the type of an object + * + * \obj_id{id} + * + * \return Returns the object type if successful; otherwise #H5I_BADID. + * + * \details H5Iget_type() retrieves the type of the object identified by + * \p id. + * + * Valid types returned by the function are: + * \id_types + * + * If no valid type can be determined or the identifier submitted is + * invalid, the function returns #H5I_BADID. + * + * This function is of particular use in determining the type of + * object closing function (H5Dclose(), H5Gclose(), etc.) to call + * after a call to H5Rdereference(). + * + * \note Note that this function returns only the type of object that \p id + * would identify if it were valid; it does not determine whether \p id + * is valid identifier. Validity can be determined with a call to + * H5Iis_valid(). + * + */ H5_DLL H5I_type_t H5Iget_type(hid_t id); -H5_DLL hid_t H5Iget_file_id(hid_t id); -H5_DLL ssize_t H5Iget_name(hid_t id, char *name /*out*/, size_t size); -H5_DLL int H5Iinc_ref(hid_t id); -H5_DLL int H5Idec_ref(hid_t id); -H5_DLL int H5Iget_ref(hid_t id); +/** + * \ingroup H5I + * + * \brief Retrieves an identifier for the file containing the specified object + * + * \obj_id{id} + * + * \return \hid_t{file} + * + * \details H5Iget_file_id() returns the identifier of the file associated with + * the object referenced by \p id. + * + * \note Note that the HDF5 library permits an application to close a file + * while objects within the file remain open. If the file containing the + * object \p id is still open, H5Iget_file_id() will retrieve the + * existing file identifier. If there is no existing file identifier for + * the file, i.e., the file has been closed, H5Iget_file_id() will reopen + * the file and return a new file identifier. In either case, the file + * identifier must eventually be released using H5Fclose(). + * + * \since 1.6.3 + * + */ +H5_DLL hid_t H5Iget_file_id(hid_t id); +/** + * \ingroup H5I + * + * \brief Retrieves a name of an object based on the object identifier + * + * \obj_id{id} + * \param[out] name A buffer for thename associated with the identifier + * \param[in] size The size of the \p name buffer; usually the size of + * the name in bytes plus 1 for a NULL terminator + * + * \return ssize_t + * + * \details H5Iget_name() retrieves a name for the object identified by \p id. + * + * \details Up to size characters of the name are returned in \p name; + * additional characters, if any, are not returned to the user + * application. + * + * If the length of the name, which determines the required value of + * \p size, is unknown, a preliminary H5Iget_name() call can be made. + * The return value of this call will be the size in bytes of the + * object name. That value, plus 1 for a NULL terminator, is then + * assigned to size for a second H5Iget_name() call, which will + * retrieve the actual name. + * + * If the object identified by \p id is an attribute, as determined + * via H5Iget_type(), H5Iget_name() retrieves the name of the object + * to which that attribute is attached. To retrieve the name of the + * attribute itself, use H5Aget_name(). + * + * If there is no name associated with the object identifier or if the + * name is NULL, H5Iget_name() returns 0 (zero). + * + * \note Note that an object in an HDF5 file may have multiple paths if there + * are multiple links pointing to it. This function may return any one of + * these paths. When possible, H5Iget_name() returns the path with which + * the object was opened. + * + * \since 1.6.0 + * + */ +H5_DLL ssize_t H5Iget_name(hid_t id, char *name /*out*/, size_t size); +/** + * \ingroup H5I + * + * \brief Increments the reference count for an object + * + * \obj_id{id} + * + * \return Returns a non-negative reference count of the object ID after + * incrementing it if successful; otherwise a negative value is + * returned. + * + * \details H5Iinc_ref() increments the reference count of the object + * identified by \p id. + * + * The reference count for an object ID is attached to the information + * about an object in memory and has no relation to the number of + * links to an object on disk. + * + * The reference count for a newly created object will be 1. Reference + * counts for objects may be explicitly modified with this function or + * with H5Idec_ref(). When an object ID's reference count reaches + * zero, the object will be closed. Calling an object ID's \c close + * function decrements the reference count for the ID which normally + * closes the object, but if the reference count for the ID has been + * incremented with this function, the object will only be closed when + * the reference count reaches zero with further calls to H5Idec_ref() + * or the object ID's \c close function. + * + * If the object ID was created by a collective parallel call (such as + * H5Dcreate(), H5Gopen(), etc.), the reference count should be + * modified by all the processes which have copies of the ID. + * Generally this means that group, dataset, attribute, file and named + * datatype IDs should be modified by all the processes and that all + * other types of IDs are safe to modify by individual processes. + * + * This function is of particular value when an application is + * maintaining multiple copies of an object ID. The object ID can be + * incremented when a copy is made. Each copy of the ID can then be + * safely closed or decremented and the HDF5 object will be closed + * when the reference count for that that object drops to zero. + * + * \since 1.6.2 + * + */ +H5_DLL int H5Iinc_ref(hid_t id); +/** + * \ingroup H5I + * + * \brief Decrements the reference count for an object + * + * \obj_id{id} + * + * \return Returns a non-negative reference count of the object ID after + * decrementing it, if successful; otherwise a negative value is + * returned. + * + * \details H5Idec_ref() decrements the reference count of the object + * identified by \p id. + * + * The reference count for an object ID is attached to the information + * about an object in memory and has no relation to the number of + * links to an object on disk. + * + * The reference count for a newly created object will be 1. Reference + * counts for objects may be explicitly modified with this function or + * with H5Iinc_ref(). When an object identifier’s reference count + * reaches zero, the object will be closed. Calling an object + * identifier’s \c close function decrements the reference count for + * the identifier which normally closes the object, but if the + * reference count for the identifier has been incremented with + * H5Iinc_ref(), the object will only be closed when the reference + * count reaches zero with further calls to this function or the + * object identifier’s \c close function. + * + * If the object ID was created by a collective parallel call (such as + * H5Dcreate(), H5Gopen(), etc.), the reference count should be + * modified by all the processes which have copies of the ID. + * Generally this means that group, dataset, attribute, file and named + * datatype IDs should be modified by all the processes and that all + * other types of IDs are safe to modify by individual processes. + * + * This function is of particular value when an application is + * maintaining multiple copies of an object ID. The object ID can be + * incremented when a copy is made. Each copy of the ID can then be + * safely closed or decremented and the HDF5 object will be closed + * when the reference count for that that object drops to zero. + * + * \since 1.6.2 + * + */ +H5_DLL int H5Idec_ref(hid_t id); +/** + * \ingroup H5I + * + * \brief Retrieves the reference count for an object + * + * \obj_id{id} + * + * \return Returns a non-negative current reference count of the object + * identifier if successful; otherwise a negative value is returned. + * + * \details H5Iget_ref() retrieves the reference count of the object identified + * by \p id. + * + * The reference count for an object identifier is attached to the + * information about an object in memory and has no relation to the + * number of links to an object on disk. + * + * The function H5Iis_valid() is used to determine whether a specific + * object identifier is valid. + * + * \since 1.6.2 + * + */ +H5_DLL int H5Iget_ref(hid_t id); +/** + * \ingroup H5I + * + * \brief Creates and returns a new ID type + * + * \param[in] hash_size Minimum hash table size (in entries) used to store IDs + * for the new type + * \param[in] reserved Number of reserved IDs for the new type + * \param[in] free_func Function used to deallocate space for a single ID + * + * \return Returns the type identifier on success, negative on failure. + * + * \details H5Iregister_type() allocates space for a new ID type and returns an + * identifier for it. + * + * The \p hash_size parameter indicates the minimum size of the hash + * table used to store IDs in the new type. + * + * The \p reserved parameter indicates the number of IDs in this new + * type to be reserved. Reserved IDs are valid IDs which are not + * associated with any storage within the library. + * + * The \p free_func parameter is a function pointer to a function + * which returns an herr_t and accepts a \c void*. The purpose of this + * function is to deallocate memory for a single ID. It will be called + * by H5Iclear_type() and H5Idestroy_type() on each ID. This function + * is NOT called by H5Iremove_verify(). The \c void* will be the same + * pointer which was passed in to the H5Iregister() function. The \p + * free_func function should return 0 on success and -1 on failure. + * + */ H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func); -H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); -H5_DLL herr_t H5Idestroy_type(H5I_type_t type); -H5_DLL int H5Iinc_type_ref(H5I_type_t type); -H5_DLL int H5Idec_type_ref(H5I_type_t type); -H5_DLL int H5Iget_type_ref(H5I_type_t type); -H5_DLL void * H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key); -H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); -H5_DLL htri_t H5Itype_exists(H5I_type_t type); -H5_DLL htri_t H5Iis_valid(hid_t id); +/** + * \ingroup H5I + * + * \brief Deletes all identifiers of the given type + * + * \param[in] type Identifier of identifier type which is to be cleared of identifiers + * \param[in] force Whether or not to force deletion of all identifiers + * + * \return \herr_t + * + * \details H5Iclear_type() deletes all identifiers of the type identified by + * the argument \p type. + * + * The identifier type's free function is first called on all of these + * identifiers to free their memory, then they are removed from the + * type. + * + * If the \p force flag is set to false, only those identifiers whose + * reference counts are equal to 1 will be deleted, and all other + * identifiers will be entirely unchanged. If the force flag is true, + * all identifiers of this type will be deleted. + * + */ +H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); +/** + * \ingroup H5I + * + * \brief Removes an identifier type and all identifiers within that type + * + * \param[in] type Identifier of identifier type which is to be destroyed + * + * \return \herr_t + * + * \details H5Idestroy_type deletes an entire identifier type \p type. All + * identifiers of this type are destroyed and no new identifiers of + * this type can be registered. + * + * The type’s free function is called on all of the identifiers which + * are deleted by this function, freeing their memory. In addition, + * all memory used by this type’s hash table is freed. + * + * Since the H5I_type_t values of destroyed identifier types are + * reused when new types are registered, it is a good idea to set the + * variable holding the value of the destroyed type to #H5I_UNINIT. + * + */ +H5_DLL herr_t H5Idestroy_type(H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Increments the reference count on an ID type + * + * \param[in] type The identifier of the type whose reference count is to be incremented + * + * \return Returns the current reference count on success, negative on failure. + * + * \details H5Iinc_type_ref() increments the reference count on an ID type. The + * reference count is used by the library to indicate when an ID type + * can be destroyed. + * + * The type parameter is the identifier for the ID type whose + * reference count is to be incremented. This identifier must have + * been created by a call to H5Iregister_type(). + * + */ +H5_DLL int H5Iinc_type_ref(H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Decrements the reference count on an identifier type + * + * \param[in] type The identifier of the type whose reference count is to be decremented + * + * \return Returns the current reference count on success, negative on failure. + * + * \details H5Idec_type_ref() decrements the reference count on an identifier + * type. The reference count is used by the library to indicate when + * an identifier type can be destroyed. If the reference count reaches + * zero, this function will destroy it. + * + * The type parameter is the identifier for the identifier type whose + * reference count is to be decremented. This identifier must have + * been created by a call to H5Iregister_type(). + * + */ +H5_DLL int H5Idec_type_ref(H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Retrieves the reference count on an ID type + * + * \param[in] type The identifier of the type whose reference count is to be retieved + * + * \return Returns the current reference count on success, negative on failure. + * + * \details H5Iget_type_ref() retrieves the reference count on an ID type. The + * reference count is used by the library to indicate when an ID type + * can be destroyed. + * + * The type parameter is the identifier for the ID type whose + * reference count is to be retrieved. This identifier must have been + * created by a call to H5Iregister_type(). + * + */ +H5_DLL int H5Iget_type_ref(H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Finds the memory referred to by an ID within the given ID type such + * that some criterion is satisfied + * + * \param[in] type The identifier of the type to be searched + * \param[in] func The function defining the search criteria + * \param[in] key A key for the search function + * + * \return Returns a pointer to the object which satisfies the search function + * on success, NULL on failure. + * + * \details H5Isearch() searches through a given ID type to find an object that + * satisfies the criteria defined by \p func. If such an object is + * found, the pointer to the memory containing this object is + * returned. Otherwise, NULL is returned. To do this, \p func is + * called on every member of type \p type. The first member to satisfy + * \p func is returned. + * + * The \p type parameter is the identifier for the ID type which is to + * be searched. This identifier must have been created by a call to + * H5Iregister_type(). + * + * The parameter \p func is a function pointer to a function which + * takes three parameters. The first parameter is a \c void* and will + * be a pointer to the object to be tested. This is the same object + * that was placed in storage using H5Iregister(). The second + * parameter is a hid_t and is the ID of the object to be tested. The + * last parameter is a \c void*. This is the \p key parameter and can + * be used however the user finds helpful, or it can be ignored if it + * is not needed. \p func returns 0 if the object it is testing does + * not pass its criteria. A non-zero value should be returned if the + * object does pass its criteria. H5I_search_func_t is defined in + * H5Ipublic.h and is shown below. + * \snippet this H5I_search_func_t_snip + * The \p key parameter will be passed to the search function as a + * parameter. It can be used to further define the search at run-time. + * + */ +H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key); +/** + * \ingroup H5I + * + * \brief Returns the number of identifiers in a given identifier type + * + * \param[in] type The identifier type + * \param[out] num_members Number of identifiers of the specified identifier type + * + * \return \herr_t + * + * \details H5Inmembers() returns the number of identifiers of the identifier + * type specified in \p type. + * + * The number of identifiers is returned in \p num_members. If no + * identifiers of this type have been registered, the type does not + * exist, or it has been destroyed, \p num_members is returned with + * the value 0. + * + */ +H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); +/** + * \ingroup H5I + * + * \brief Determines whether an identifier type is registered + * + * \param[in] type Identifier type + * + * \return \htri_t + * + * \details H5Itype_exists() determines whether the given identifier type, + * \p type, is registered with the library. + * + * \since 1.8.0 + * + */ +H5_DLL htri_t H5Itype_exists(H5I_type_t type); +/** + * \ingroup H5I + * + * \brief Determines whether an identifier is valid + * + * \obj_id{id} + * + * \return \htri_t + * + * \details H5Iis_valid() determines whether the identifier \p id is valid. + * + * \details Valid identifiers are those that have been obtained by an + * application and can still be used to access the original target. + * Examples of invalid identifiers include: + * \li Out of range values: negative, for example + * \li Previously-valid identifiers that have been released: + * for example, a dataset identifier for which the dataset has + * been closed + * + * H5Iis_valid() can be used with any type of identifier: object + * identifier, property list identifier, attribute identifier, error + * message identifier, etc. When necessary, a call to H5Iget_type() + * can determine the type of the object that \p id identifies. + * + * \since 1.8.3 + * + */ +H5_DLL htri_t H5Iis_valid(hid_t id); #ifdef __cplusplus } diff --git a/src/H5Lmodule.h b/src/H5Lmodule.h index fad9c1f3f37..54b94a4c43a 100644 --- a/src/H5Lmodule.h +++ b/src/H5Lmodule.h @@ -29,4 +29,12 @@ #define H5_MY_PKG_ERR H5E_LINK #define H5_MY_PKG_INIT YES +/**\defgroup H5L H5L + * \brief Link Interface + * \todo Describe concisely what the functions in this module are about. + * + * \defgroup TRAV Link Traversal + * \ingroup H5L + */ + #endif /* H5Lmodule_H */ diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 0cf198c78bc..45ea94b82d0 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -33,17 +33,26 @@ /* Public Macros */ /*****************/ -/* Maximum length of a link's name */ -/* (encoded in a 32-bit unsigned integer) */ +/** + * \brief Maximum length of a link's name + * + * The maximum length of a link's name is encoded in a 32-bit unsigned integer. + */ #define H5L_MAX_LINK_NAME_LEN ((uint32_t)(-1)) /* (4GB - 1) */ -/* Macro to indicate operation occurs on same location */ +/** + * \brief Macro to indicate operation occurs on same location + */ #define H5L_SAME_LOC (hid_t)0 -/* Current version of the H5L_class_t struct */ +/** + * \brief Current version of the H5L_class_t struct + */ #define H5L_LINK_CLASS_T_VERS 1 -/* Previous versions of the H5L_class_t struct */ +/** + * \brief Previous version of the H5L_class_t struct + */ #define H5L_LINK_CLASS_T_VERS_0 0 #ifdef __cplusplus @@ -54,67 +63,85 @@ extern "C" { /* Public Typedefs */ /*******************/ -/* Link class types. - * Values less than 64 are reserved for the HDF5 library's internal use. - * Values 64 to 255 are for "user-defined" link class types; these types are - * defined by HDF5 but their behavior can be overridden by users. - * Users who want to create new classes of links should contact the HDF5 - * development team at help@hdfgroup.org. - * These values can never change because they appear in HDF5 files. +/** + * \brief Link class types. + * + * Values less than 64 are reserved for the HDF5 library's internal use. Values + * 64 to 255 are for "user-defined" link class types; these types are defined + * by HDF5 but their behavior can be overridden by users. Users who want to + * create new classes of links should contact the HDF5 development team at + * mailto:help@hdfgroup.org. These values can never change because they appear + * in HDF5 files. */ typedef enum { - H5L_TYPE_ERROR = (-1), /* Invalid link type id */ - H5L_TYPE_HARD = 0, /* Hard link id */ - H5L_TYPE_SOFT = 1, /* Soft link id */ - H5L_TYPE_EXTERNAL = 64, /* External link id */ - H5L_TYPE_MAX = 255 /* Maximum link type id */ + H5L_TYPE_ERROR = (-1), /**< Invalid link type id */ + H5L_TYPE_HARD = 0, /**< Hard link id */ + H5L_TYPE_SOFT = 1, /**< Soft link id */ + H5L_TYPE_EXTERNAL = 64, /**< External link id */ + H5L_TYPE_MAX = 255 /**< Maximum link type id */ } H5L_type_t; -/* Maximum value link value for "built-in" link types */ +/** + * \brief Maximum value link value for "built-in" link types + */ #define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT -/* Link ids at or above this value are "user-defined" link types. */ +/** + * \brief Link ids at or above this value are "user-defined" link types. + */ #define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL -/* Information struct for link (for H5Lget_info/H5Lget_info_by_idx) */ +/** + * \brief Information struct for links + */ +//! typedef struct { - H5L_type_t type; /* Type of link */ - hbool_t corder_valid; /* Indicate if creation order is valid */ - int64_t corder; /* Creation order */ - H5T_cset_t cset; /* Character set of link name */ + H5L_type_t type; /**< Type of link */ + hbool_t corder_valid; /**< Indicate if creation order is valid */ + int64_t corder; /**< Creation order */ + H5T_cset_t cset; /**< Character set of link name */ union { - haddr_t address; /* Address hard link points to */ - size_t val_size; /* Size of a soft link or UD link value */ + haddr_t address; /**< Address hard link points to */ + size_t val_size; /**< Size of a soft link or user-defined link value */ } u; } H5L_info_t; +//! /* The H5L_class_t struct can be used to override the behavior of a * "user-defined" link class. Users should populate the struct with callback * functions defined below. */ /* Callback prototypes for user-defined links */ -/* Link creation callback */ +/** + * \brief Link creation callback + */ typedef herr_t (*H5L_create_func_t)(const char *link_name, hid_t loc_group, const void *lnkdata, size_t lnkdata_size, hid_t lcpl_id); - -/* Callback for when the link is moved */ +/** + * \brief Callback for link move + */ typedef herr_t (*H5L_move_func_t)(const char *new_name, hid_t new_loc, const void *lnkdata, size_t lnkdata_size); - -/* Callback for when the link is copied */ +/** + * \brief Callback for link copy + */ typedef herr_t (*H5L_copy_func_t)(const char *new_name, hid_t new_loc, const void *lnkdata, size_t lnkdata_size); - -/* Callback during link traversal */ typedef hid_t (*H5L_traverse_0_func_t)(const char *link_name, hid_t cur_group, const void *lnkdata, size_t lnkdata_size, hid_t lapl_id); +/** + * \brief Callback during link traversal + */ typedef hid_t (*H5L_traverse_func_t)(const char *link_name, hid_t cur_group, const void *lnkdata, size_t lnkdata_size, hid_t lapl_id, hid_t dxpl_id); - -/* Callback for when the link is deleted */ +/** + * \brief Callback for link deletion + */ typedef herr_t (*H5L_delete_func_t)(const char *link_name, hid_t file, const void *lnkdata, size_t lnkdata_size); - -/* Callback for querying the link */ -/* Returns the size of the buffer needed */ +/** + * \brief Callback for querying the link. + * + * Returns the size of the buffer needed. + */ typedef ssize_t (*H5L_query_func_t)(const char *link_name, const void *lnkdata, size_t lnkdata_size, void *buf /*out*/, size_t buf_size); @@ -131,22 +158,37 @@ typedef struct { H5L_query_func_t query_func; /* Callback for queries */ } H5L_class_0_t; +/** + * \brief Link prototype + * + * The H5L_class_t struct can be used to override the behavior of a + * "user-defined" link class. Users should populate the struct with callback + * functions defined elsewhere. + */ +//! typedef struct { - int version; /* Version number of this struct */ - H5L_type_t id; /* Link type ID */ - const char * comment; /* Comment for debugging */ - H5L_create_func_t create_func; /* Callback during link creation */ - H5L_move_func_t move_func; /* Callback after moving link */ - H5L_copy_func_t copy_func; /* Callback after copying link */ - H5L_traverse_func_t trav_func; /* Callback during link traversal */ - H5L_delete_func_t del_func; /* Callback for link deletion */ - H5L_query_func_t query_func; /* Callback for queries */ + int version; /**< Version number of this struct */ + H5L_type_t id; /**< Link type ID */ + const char * comment; /**< Comment for debugging */ + H5L_create_func_t create_func; /**< Callback during link creation */ + H5L_move_func_t move_func; /**< Callback after moving link */ + H5L_copy_func_t copy_func; /**< Callback after copying link */ + H5L_traverse_func_t trav_func; /**< Callback during link traversal */ + H5L_delete_func_t del_func; /**< Callback for link deletion */ + H5L_query_func_t query_func; /**< Callback for queries */ } H5L_class_t; +//! -/* Prototype for H5Literate/H5Literate_by_name() operator */ +/** + * \brief Prototype for H5Literate(), H5Literate_by_name() operator + */ +//! typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t *info, void *op_data); +//! -/* Callback for external link traversal */ +/** + * \brief Callback for external link traversal + */ typedef herr_t (*H5L_elink_traverse_t)(const char *parent_file_name, const char *parent_group_name, const char *child_file_name, const char *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data); @@ -158,48 +200,1401 @@ typedef herr_t (*H5L_elink_traverse_t)(const char *parent_file_name, const char /*********************/ /* Public Prototypes */ /*********************/ +/** + * \ingroup H5L + * + * \brief Moves a link within an HDF5 file + * + * \fgdta_loc_id{src_loc} + * \param[in] src_name Original link name + * \fgdta_loc_id{dst_loc} + * \param[in] dst_name New link name + * \lcpl_id + * \lapl_id + * + * \return \herr_t + * + * \details H5Lmove() moves a link within an HDF5 file. The original link, + * \p src_name, is removed from \p src_loc and the new link, + * \p dst_name, is inserted at dst_loc. This change is + * accomplished as an atomic operation. + * + * \p src_loc and \p src_name identify the original link. + * \p src_loc is the original location identifier; \p src_name is + * the path to the link and is interpreted relative to \p src_loc. + * + * \p dst_loc and \p dst_name identify the new link. \p dst_loc is + * either a file or group identifier; \p dst_name is the path to + * the link and is interpreted relative to \p dst_loc. + * + * \p lcpl_id and \p lapl_id are the link creation and link access + * property lists, respectively, associated with the new link, + * \p dst_name. + * + * Through these property lists, several properties are available to + * govern the behavior of H5Lmove(). The property controlling creation + * of missing intermediate groups is set in the link creation property + * list with H5Pset_create_intermediate_group(); H5Lmove() ignores any + * other properties in the link creation property list. Properties + * controlling character encoding, link traversals, and external link + * prefixes are set in the link access property list with + * H5Pset_char_encoding(), H5Pset_nlinks(), and H5Pset_elink_prefix(), + * respectively. + * + * \note Note that H5Lmove() does not modify the value of the link; the new + * link points to the same object as the original link pointed to. + * Furthermore, if the object pointed to by the original link was already + * open with a valid object identifier, that identifier will remain valid + * after the call to H5Lmove(). + * + * \attention Exercise care in moving links as it is possible to render data in + * a file inaccessible with H5Lmove(). If the link being moved is on + * the only path leading to an HDF5 object, that object may become + * permanently inaccessible in the file. + * + * \since 1.8.0 + * + *------------------------------------------------------------------------- + */ H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Creates an identical copy of a link with the same creation time and + * target. The new link can have a different name and be in a different + * location than the original. + * + * \fgdt_loc_id{src_loc} + * \param[in] src_name Name of the link to be copied + * \fgdt_loc_id{dst_loc} + * \param[in] dst_name Name to be assigned to the new copy + * \lcpl_id + * \lapl_id + * \return \herr_t + * + * \details H5Lcopy() copies the link specified by \p src_name from the location + * specified by \p src_loc_id to the location specified by + * \p dst_loc_id. The new copy of the link is created with the name + * \p dst_name. + * + * If \p dst_loc_id is a file identifier, \p dst_name will be + * interpreted relative to that file’s root group. + * + * The new link is created with the creation and access property lists + * specified by \p lcpl_id and \p lapl_id. The interpretation of + * \p lcpl_id is limited in the manner described in the next paragraph. + * + * H5Lcopy() retains the creation time and the target of the original + * link. However, since the link may be renamed, the character + * encoding is that specified in \p lcpl_id rather than that of the + * original link. Other link creation properties are ignored. + * + * If the link is a soft link, also known as a symbolic link, its + * target is interpreted relative to the location of the copy. + * + * Several properties are available to govern the behavior of + * H5Lcopy(). These properties are set in the link creation and access + * property lists, \p lcpl_id and \p lapl_id, respectively. The + * property controlling creation of missing intermediate groups is set + * in the link creation property list with + * H5Pset_create_intermediate_group(); this function ignores any + * other properties in the link creation property list. Properties + * controlling character encoding, link traversals, and external link + * prefixes are set in the link access property list with + * H5Pset_char_encoding(), H5Pset_nlinks(), and + * H5Pset_elink_prefix(). + * + * \note H5Lcopy() does not affect the object that the link points to. + * + * \attention H5Lcopy() cannot copy hard links across files as a hard link is + * not valid without a target object; to copy objects from one file + * to another, see H5Ocopy(). + * + * \see H5Ocopy() + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Creates a hard link to an object + * + * \fgdta_loc_id{cur_loc} + * \param[in] cur_name Name of the target object, which must already exist + * \fgdta_loc_id{dst_loc} + * \param[in] dst_name The name of the new link + * \lcpl_id + * \lapl_id + * + * \return \herr_t + * + * \details H5Lcreate_hard() creates a new hard link to a pre-existing object + * in an HDF5 file. + * + * \p cur_loc and \p cur_name specify the location + * and name, respectively, of the target object, i.e., the object that + * the new hard link points to. \p dst_loc and \p dst_name specify the + * location and name, respectively, of the new hard link. + * + * \p cur_name and \p dst_name are interpreted relative to \p cur_loc + * and \p dst_loc, respectively. If \p cur_loc and \p dst_loc are the + * same location, the HDF5 macro #H5L_SAME_LOC can be used for either + * parameter (but not both). + * + * \p lcpl_id and \p lapl_id are the link creation and access property + * lists associated with the new link. + * + * \note Hard and soft links are for use only if the target object is in the + * current file. If the desired target object is in a different file from + * the new link, an external link may be created with + * H5Lcreate_external(). + * + * \note The HDF5 library keeps a count of all hard links pointing to an + * object; if the hard link count reaches zero (0), the object will be + * deleted from the file. Creating new hard links to an object will + * prevent it from being deleted if other links are removed. The + * library maintains no similar count for soft links and they can dangle. + * + * \note The new link may be one of many that point to that object. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Creates a soft link + * + * \param[in] link_target An HDF5 path name + * \fgdta_loc_id{link_loc_id} + * \param[in] link_name The name of the new link + * \lcpl_id + * \lapl_id + * + * \return \herr_t + * + * \details H5Lcreate_soft() creates a new soft link to an object in an HDF5 + * file. + * + * \p link_target specifies the HDF5 path name the soft link contains. + * \p link_target can be an arbitrary HDF5 path name and is + * interpreted only at lookup time. This path may be absolute in the + * file or relative to \p link_loc_id. + * + * \p link_loc_id and \p link_name specify the location and name, + * respectively, of the new soft link. \p link_name is interpreted + * relative to \p link_loc_id and must contain only the name of the soft + * link; \p link_name may not contain any additional path elements. + * + * If \p link_loc_id is a group identifier, the object pointed to by + * \p link_name will be accessed as a member of that group. If + * \p link_loc_id is a file identifier, the object will be accessed as a + * member of the file's root group. + * + * \p lcpl_id and \p lapl_id are the link creation and access property + * lists associated with the new link. + * + * For instance, if target_path is \c ./foo, \p link_loc_id specifies + * \c ./x/y/bar, and the name of the new link is \c new_link, then a + * subsequent request for \c ./x/y/bar/new_link will return same the + * object as would be found at \c ./foo. + * + * \note H5Lcreate_soft() is for use only if the target object is in the + * current file. If the desired target object is in a different file from + * the new link, use H5Lcreate_external() to create an external link. + * + * \note Soft links and external links are also known as symbolic links as they + * use a name to point to an object; hard links employ an object’s + * address in the file. + * + * \note Unlike hard links, a soft link in an HDF5 file is allowed to dangle, + * meaning that the target object need not exist at the time that the + * link is created. + * + * \note The HDF5 library does not keep a count of soft links as it does of + * hard links. + * + * \note The new link may be one of many that point to that object. + * + * \see H5Lcreate_hard(), H5Lcreate_external() + * + * \since 1.8.0 + * + + */ H5_DLL herr_t H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Removes a link from a group + * + * \fgdta_loc_id + * \param[in] name Name of the link to delete + * \lapl_id + * + * \return \herr_t + * + * \details H5Ldelete() removes the link specified by \p name from the location + * \p loc_id. + * + * If the link being removed is a hard link, H5Ldelete() also + * decrements the link count for the object to which name points. + * Unless there is a duplicate hard link in that group, this action + * removes the object to which name points from the group that + * previously contained it. + * + * Object headers keep track of how many hard links refer to an + * object; when the hard link count, also referred to as the reference + * count, reaches zero, the object can be removed from the file. The + * file space associated will then be released, i.e., identified in + * memory as freespace. Objects which are open are not removed until + * all identifiers to the object are closed. + * + * \attention Exercise caution in the use of H5Ldelete(); if the link being + * removed is on the only path leading to an HDF5 object, that + * object may become permanently inaccessible in the file. + * + * \see H5Lcreate_hard(), H5Lcreate_soft(), H5Lcreate_external() + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Removes the \Emph{n}-th link in a group + * + * \fgdta_loc_id + * \param[in] group_name Name of subject group + * \param[in] idx_type Index or field which determines the order + * \param[in] order Order within field or index + * \param[in] n Link for which to retrieve information + * \lapl_id + * + * \return \herr_t + * + * \details H5Ldelete_by_idx() removes the \Emph{n}-th link in a group + * according to the specified order, \p order, in the specified index, + * \p index. + * + * If \p loc_id specifies the group in which the link resides, + * \p group_name can be a dot (\c .). + * + * \see H5Ldelete() + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Returns the value of a link + * + * \fgdta_loc_id + * \param[in] name Link name + * \param[out] buf The buffer to hold the link value + * \param[in] size Maximum number of bytes of link value to be returned + * \lapl_id + * + * \return \herr_t + * + * \details H5Lget_val() returns tha value of link \p name. For smbolic links, + * this is the path to which the link points, including the null + * terminator. For external and user-defined links, it is the link + * buffer. + * + * \p size is the size of \p buf and should be the size of the link + * value being returned. This size value can be determined through a + * call to H5Lget_info(); it is returned in the \c val_size field of + * the \ref H5L_info_t \c struct. + * + * If \p size is smaller than the size of the returned value, then the + * string stored in \p buf will be truncated to \p size bytes. For + * soft links, this means that the value will not be null terminated. + * + * In the case of external links, the target file and object names are + * extracted from \p buf by calling H5Lunpack_elink_val(). + * + * The link class of link \p name can be determined with a call to + * H5Lget_info(). + * + * \p lapl_id specifies the link access property list associated with + * the link \p name. In the general case, when default link access + * properties are acceptable, this can be passed in as #H5P_DEFAULT. An + * example of a situation that requires a non-default link access + * property list is when the link is an external link; an external + * link may require that a link prefix be set in a link access + * property list (see H5Pset_elink_prefix()). + * + * This function should be used only after H5Lget_info() has been + * called to verify that \p name is a symbolic link. This can be + * deteremined from the \c link_type field of the \ref H5L_info_t + * \c struct. + * + * \note This function will fail if called on a hard link. + * + * \see H5Lget_val_by_idx() + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lget_val(hid_t loc_id, const char *name, void *buf /*out*/, size_t size, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Retrieves value of the \Emph{n}-th link in a group, according to the order within an index + * + * \fgdta_loc_id + * \param[in] group_name Group name + * \param[in] idx_type Type of index + * \param[in] order Order within field or index + * \param[in] n Link position for which to retrieve information + * \param[out] buf The buffer to hold the link value + * \param[in] size Maximum number of bytes of link value to be returned + * \lapl_id + * + * \return \herr_t + * + * \details H5Lget_val_by_idx() retrieves the value of the \Emph{n}-th link in + * a group, according to the specified order, \p order, within an + * index, \p index. + * + * For soft links, the value is an HDF5 path name. + * + * For external links, this is a compound value containing file and + * path name information; to use this external link information, it + * must first be decoded with H5Lunpack_elink_val() + * + * For user-defined links, this value will be described in the + * definition of the user-defined link type. + * + * \p loc_id specifies the location identifier of the group specified + * by \p group_name. + * + * \p group_name specifies the group in which the link exists. If + * \p loc_id already specifies the group in which the link exists, + * \p group_name must be a dot (\c .). + * + * The size in bytes of link_val is specified in \p size. The size + * value can be determined through a call to H5Lget_info_by_idx(); it + * is returned in the \c val_size field of the \ref H5L_info_t + * \c struct. If + * size is smaller than the size of the returned value, then the + * string stored in link_val will be truncated to size bytes. For soft + * links, this means that the value will not be null terminated. + * + * If the type of the link is unknown or uncertain, H5Lget_val_by_idx() + * should be called only after the type has been determined via a call + * to H5Lget_info_by_idx(). + * + * \note This function will fail if called on a hard link. + * + * \see H5Lget_val() + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, void *buf /*out*/, size_t size, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Determines whether a link with the specified name exists in a group + * + * \fgdta_loc_id + * \param[in] name Link name + * \lapl_id + * + * \return \herr_t + * + * \details H5Lexists() allows an application to determine whether the link \p + * name exists in the location specified by \p loc_id. The link may be + * of any type; only the presence of a link with that name is checked. + * + * Note that H5Lexists() verifies only that the target link exists. If + * name includes either a relative path or an absolute path to the + * target link, intermediate steps along the path must be verified + * before the existence of the target link can be safely checked. If + * the path is not verified and an intermediate element of the path + * does not exist, H5Lexists() will fail. The example in the next + * paragraph illustrates one step-by-step method for verifying the + * existence of a link with a relative or absolute path. + * + * \Bold{Example:} Use the following steps to verify the existence of + * the link \c datasetD in the \c group group1/group2/softlink_to_group3/, + * where \c group1 is a member of the group specified by \c loc_id: + * + * 1. First use H5Lexists() to verify that \c group1 exists. + * 2. If \c group1 exists, use H5Lexists() again, this time with name + * set to \c group1/group2, to verify that \c group2 exists. + * 3. If \c group2 exists, use H5Lexists() with name set to + * \c group1/group2/softlink_to_group3 to verify that + * \c softlink_to_group3 exists. + * 4. If \c softlink_to_group3 exists, you can now safely use + * H5Lexists() with \c name set to + * \c group1/group2/softlink_to_group3/datasetD to verify that the + * target link, \c datasetD, exists. + * + * If the link to be verified is specified with an absolute path, the + * same approach should be used, but starting with the first link in + * the file’s root group. For instance, if \c datasetD were in + * \c /group1/group2/softlink_to_group3, the first call to H5Lexists() + * would have name set to \c /group1. + * + * Note that this is an outline and does not include all necessary + * details. Depending on circumstances, for example, you may need to + * verify that an intermediate link points to a group and that a soft + * link points to an existing target. + * + * \note The behavior of H5Lexists() was changed in the 1.10 release in the + * case where the root group, \c "/", is the name of the link. This + * change is described below: + *

      + *
    1. Let \c file denote a valid HDF5 file identifier, and let \c lapl + * denote a valid link access property list identifier. A call to + * H5Lexists() with arguments \c file, \c "/", and \c lapl + * returns a positive value; in other words, + * \Code{H5Lexists(file, "/", lapl)} returns a positive value. + * In HDF5 version 1.8.16, this function returns 0.
    2. + *
    3. Let \c root denote a valid HDF5 group identifier that refers to the + * root group of an HDF5 file, and let \c lapl denote a valid link + * access property list identifier. A call to H5Lexists() with + * arguments c root, \c "/", and \c lapl returns a positive value; + * in other words, \Code{H5Lexists(root, "/", lapl)} returns a postive + * value. In HDF5 version 1.8.16, this function returns 0.
    4. + *
    + * Note that the function accepts link names and path names. This is + * potentially misleading to callers, and we plan to separate the + * functionality for link names and path names in a future release. + * + * \attention H5Lexists() checks the existence of only the final element in a + * relative or absolute path; it does not check any other path + * elements. The function will therefore fail when both of the + * following conditions exist: + * - \c name is not local to the group specified by \c loc_id or, + * if \c loc_id is something other than a group identifier, \c name + * is not local to the root group. + * - Any element of the relative path or absolute path in name, + * except the target link, does not exist. + * + * \version 1.10.0 Function behavior changed in this release. (See the note.) + * \since 1.8.0 + * + */ H5_DLL htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id); -H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Returns information about a link + * + * \fgdta_loc_id + * \param[in] name Link name + * \param[out] linfo Buffer in which link information is returned + * \lapl_id + * + * \return \herr_t + * + * \details H5Lget_info() returns information about the specified link through + * the \p linfo argument. + * + * The location identifier, \p loc_id, specifies the location of the + * link. A link name, \p name, interpreted relative to \p loc_id, + * specifies the link being queried. + * + * \p lapl_id is the link access property list associated with the + * link \p name. In the general case, when default link access + * properties are acceptable, this can be passed in as #H5P_DEFAULT. + * An example of a situation that requires a non-default link access + * property list is when the link is an external link; an external + * link may require that a link prefix be set in a link access + * property list (see H5Pset_elink_prefix()). + * + * H5Lget_info() returns information about name in the data structure + * \ref H5L_info_t, which is described below and defined in + * H5Lpublic.h. This structure is returned in the buffer \p linfo. + * \snippet this H5L_info_t_snip + * In the above struct, type specifies the link class. Valid values + * include the following: + * \link_types + * There will be additional valid values if user-defined links have + * been registered. + * + * \c corder specifies the link’s creation order position while + * \c corder_valid indicates whether the value in \c corder is valid. + * + * If \c corder_valid is \c TRUE, the value in \c corder is known to + * be valid; if \c corder_valid is \c FALSE, the value in \c corder is + * presumed to be invalid; + * + * \c corder starts at zero (0) and is incremented by one (1) as new + * links are created. But higher-numbered entries are not adjusted + * when a lower-numbered link is deleted; the deleted link’s creation + * order position is simply left vacant. In such situations, the value + * of \c corder for the last link created will be larger than the + * number of links remaining in the group. + * + * \c cset specifies the character set in which the link name is + * encoded. Valid values include the following: + * \csets + * This value is set with H5Pset_char_encoding(). + * + * \c address and \c val_size are returned for hard and symbolic + * links, respectively. Symbolic links include soft and external links + * and some user-defined links. + * + * If the link is a hard link, \c address specifies the file address + * that the link points to. + * + * If the link is a symbolic link, \c val_size will be the length of + * the link value, e.g., the length of the HDF5 path name with a null + * terminator. + * + * \version 1.8.2 Fortran subroutine added in this release. + * \version 1.8.4 Fortran subroutine syntax changed in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Retrieves metadata for a link in a group, according to the order + * within a field or index + * + * \loc_id + * \param[in] group_name Group name + * \idx_type + * \order + * \param[in] n Link position for which to retrieve information + * \param[out] linfo Buffer in which link information is returned + * \lapl_id + * + * \return \herr_t + * + * \details H5get_info_by_idx() returns the metadata for a link in a group + * according to a specified field or index and a specified order. + * + * The link for which information is to be returned is specified by \p + * idx_type, \p order, and \p n as follows: + * + * - \p idx_type specifies the field by which the links in \p + * group_name are ordered. The links may be indexed on this field, + * in which case operations seeking specific links are likely to + * complete more quickly. + * - \p order specifies the order in which + * the links are to be referenced for the purposes of this function. + * - \p n specifies the position of the subject link. Note that this + * count is zero-based; 0 (zero) indicates that the function will + * return the value of the first link; if \p n is 5, the function + * will return the value of the sixth link; etc. + * + * For example, assume that \p idx_type, \p order, and \p n are + * #H5_INDEX_NAME, #H5_ITER_DEC, and 5, respectively. #H5_INDEX_NAME + * indicates that the links are accessed in lexicographic order by + * their names. #H5_ITER_DEC specifies that the list be traversed in + * reverse order, or in decremented order. And 5 specifies that this + * call to the function will return the metadata for the 6th link + * (\c n + 1) from the end. + * + * See H5Literate() for a list of valid values and further discussion + * regarding \p idx_type and \p order. + * + * If \p loc_id specifies the group in which the link resides, + * \p group_name can be a dot (\c .). + * + * \version 1.8.4 Fortran subroutine syntax changed in this release. + * \version 1.8.2 Fortran subroutine added in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t n, H5L_info_t *linfo /*out*/, hid_t lapl_id); + H5_iter_order_t order, hsize_t n, H5L_info_t *linfo, hid_t lapl_id); +/** + * \ingroup H5L + * + * \brief Retrieves name of the \Emph{n}-th link in a group, according to the + * order within a specified field or index + * + * \loc_id + * \param[in] group_name Group name + * \idx_type + * \order + * \param[in] n Link position for which to retrieve information + * \param[out] name Buffer in which link name is returned + * \param[in] size Size in bytes of \p name + * \lapl_id + * + * \return Returns the size of the link name if successful; otherwise returns a + * negative value. + * + * \details H5get_name_by_idx() retrieves the name of the \Emph{n}-th link in a + * group, according to the specified order, \p order, within a specified + * field or index, \p idx_type. + * + * \p idx_type specifies the index that is used. Valid values include + * the following: + * \indexes + * + * \p order specifies the order in which objects are inspected along + * the index specified in \p idx_type. Valid values include the + * following: + * \orders + * + * If \p loc_id specifies the group in which the link resides, + * \p group_name can be a dot (\c .). + * + * The size in bytes of name is specified in \p size. If \p size is + * unknown, it can be determined via an initial H5Lget_name_by_idx() + * call with name set to NULL; the function's return value will be the + * size of the name. + * + * \note Please note that in order for the specified index to correspond to the + * creation order index, \p order must be set to #H5_ITER_INC or + * #H5_ITER_DEC when calling H5Lget_name_by_idx(). \note The index \p n + * passed to H5Lget_name_by_idx() is the index of the link within the + * link table, sorted according to \p order and \p idx_type. If order is + * #H5_ITER_NATIVE, then the link table is not sorted, and it does not + * matter what \p idx_type is. Specifying #H5_ITER_NATIVE does not + * guarantee any particular order, only that it remains consistent. + * + * \since 1.8.0 + * + */ H5_DLL ssize_t H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name /*out*/, size_t size, hid_t lapl_id); -H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, - H5L_iterate_t op, void *op_data); -H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data, - hid_t lapl_id); -H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, - void *op_data); -H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, +/** + * \ingroup TRAV + * + * \brief Iterates over links in a group, with user callback routine, + * according to the order within an index. + * + * \group_id{grp_id} + * \idx_type + * \order + * \param[in,out] idx Pointer to an iteration index to allow + * continuing a previous iteration + * \op + * \op_data + * \return \success{The return value of the first operator that returns + * non-zero, or zero if all members were processed with no + * operator returning non-zero.} + * \return \failure{Negative if an error occurs in the library, or the negative + * value returned by one of the operators.} + * + * \details H5Literate() iterates through the links in a file or + * group, \p group_id, in the order of the specified + * index, \p idx_type, using a user-defined callback routine + * \p op. H5Literate() does not recursively follow links into + * subgroups of the specified group. + * + * Three parameters are used to manage progress of the iteration: + * \p idx_type, \p order, and \p idx_p. + * + * \p idx_type specifies the index to be used. If the links have + * not been indexed by the index type, they will first be sorted by + * that index then the iteration will begin; if the links have been + * so indexed, the sorting step will be unnecessary, so the iteration + * may begin more quickly. + * + * \p order specifies the order in which objects are to be inspected + * along the index \p idx_type. + * + * \p idx_p tracks the iteration and allows an iteration to be + * resumed if it was stopped before all members were processed. It is + * passed in by the application with a starting point and returned by + * the library with the point at which the iteration stopped. + * + * \p op_data is a user-defined pointer to the data required to + * process links in the course of the iteration. This pointer is + * passed back to each step of the iteration in the \p op callback + * function's \p op_data parameter. \p op is invoked for each link + * encounter. + * + * \p op_data is passed to and from each iteration and can be used to + * supply or aggregate information across iterations. + * + * \remark Same pattern of behavior as H5Giterate(). + * + * \note This function is also available through the H5Literate() macro. + * + * \warning The behavior of H5Literate() is undefined if the link + * membership of \p group_id changes during the iteration. + * This does not limit the ability to change link destinations + * while iterating, but caution is advised. + * + * + * \since 1.8.0 + * + * \see H5Literate_by_name(), H5Lvisit(), H5Lvisit_by_name() + * + */ +H5_DLL herr_t H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, + H5L_iterate_t op, void *op_data); +/** + * \ingroup TRAV + * + * \brief Iterates through links in a group by its name + * + * \loc_id + * \param[in] group_name Group name + * \idx_type + * \order + * \param[in,out] idx iteration position at which to start (\Emph{IN}) or + * position at which an interrupted iteration may be restarted + * (\Emph{OUT}) + * \op + * \op_data + * \lapl_id + * + * \return \success{The return value of the first operator that returns + * non-zero, or zero if all members were processed with no + * operator returning non-zero.} + * \return \failure{Negative if an error occurs in the library, or the negative + * value returned by one of the operators.} + * + * \details H5Literate_by_name() iterates through the links in a group + * specified by \p loc_id and \p group_name, in the order of the + * specified index, \p idx_type, using a user-defined callback routine + * \p op. H5Literate_by_name() does not recursively follow links into + * subgroups of the specified group. + * + * \p idx_type specifies the index to be used. If the links have not + * been indexed by the index type, they will first be sorted by that + * index then the iteration will begin; if the links have been so + * indexed, the sorting step will be unnecessary, so the iteration may + * begin more quickly. Valid values include the following: + * \indexes + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include the + * following: + * \orders + * + * \p idx allows an interrupted iteration to be resumed; it is + * passed in by the application with a starting point and returned by + * the library with the point at which the iteration stopped. + * + * \note H5Literate_by_name() is not recursive. In particular, if a member of + * \p group_name is found to be a group, call it \c subgroup_a, + * H5Literate_by_name() does not examine the members of \c subgroup_a. + * When recursive iteration is required, the application must handle the + * recursion, explicitly calling H5Literate_by_name1() on discovered + * subgroups. + * + * \note H5Literate_by_name() assumes that the membership of the group being + * iterated over remains unchanged through the iteration; if any of the + * links in the group change during the iteration, the function’s + * behavior is undefined. Note, however, that objects pointed to by the + * links can be modified. + * + * \note H5Literate_by_name() is the same as H5Giterate(), except that + * H5Giterate() always proceeds in lexicographic order. + * + * \version 1.8.8 Fortran subroutine added. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Literate_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t *idx, H5L_iterate_t op, void *op_data, + hid_t lapl_id); +/** + * \ingroup TRAV + * + * \brief Recursively visits all links starting from a specified group + * + * \group_id{grp_id} + * \idx_type + * \order + * \op + * \op_data + * + * \return \success{The return value of the first operator that returns + * non-zero, or zero if all members were processed with no + * operator returning non-zero.} + * \return \failure{Negative if an error occurs in the library, or the negative + * value returned by one of the operators.} + * + * \details H5Lvisit() is a recursive iteration function to visit all links in + * and below a group in an HDF5 file, thus providing a mechanism for + * an application to perform a common set of operations across all of + * those links or a dynamically selected subset. For non-recursive + * iteration across the members of a group, see H5Literate(). + * + * The group serving as the root of the iteration is specified by its + * group or file identifier, \p group_id. + * + * Two parameters are used to establish the iteration: \p idx_type and + * \p order. + * + * \p idx_type specifies the index to be used. If the links have not + * been indexed by the index type, they will first be sorted by that + * index then the iteration will begin; if the links have been so + * indexed, the sorting step will be unnecessary, so the iteration may + * begin more quickly. Valid values include the following: + * \indexes + * + * Note that the index type passed in \p idx_type is a best effort + * setting. If the application passes in a value indicating iteration + * in creation order and a group is encountered that was not tracked + * in creation order, that group will be iterated over in + * lexicographic order by name, or name order. (Name order is the + * native order used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include the + * following: + * \orders + * + * \p op is a callback function of type \ref H5L_iterate_t that is invoked + * for each link encountered. + * \snippet this H5L_iterate_t_snip + * + * The \ref H5L_info_t struct is defined (in H5Lpublic.h) as follows: + * \snippet this H5L_info_t_snip + * + * The possible return values from the callback function, and the + * effect of each, are as follows: + * \li Zero causes the visit iterator to continue, returning zero when + * all group members have been processed. + * \li A positive value causes the visit iterator to immediately + * return that positive value, indicating short-circuit success. + * \li A negative value causes the visit iterator to immediately + * return that value, indicating failure. + * + * The H5Lvisit() \p op_data parameter is a user-defined pointer to + * the data required to process links in the course of the iteration. + * This pointer is passed back to each step of the iteration in the + * \p op callback function's \p op_data parameter. + * + * H5Lvisit() and H5Ovisit() are companion functions: one for + * examining and operating on links; the other for examining and + * operating on the objects that those links point to. Both functions + * ensure that by the time the function completes successfully, every + * link or object below the specified point in the file has been + * presented to the application for whatever processing the + * application requires. + * + * \since 1.8.0 + * + * \see H5Literate() + * + */ +H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, + void *op_data); +/** + * \ingroup TRAV + * + * \brief Recursively visits all links starting from a specified group + * + * \loc_id + * \param[in] group_name Group name + * \idx_type + * \order + * \op + * \op_data + * \lapl_id + * + * \return \success{The return value of the first operator that returns + * non-zero, or zero if all members were processed with no + * operator returning non-zero.} + * \return \failure{Negative if an error occurs in the library, or the negative + * value returned by one of the operators.} + * + * \details H5Lvisit_by_name() is a recursive iteration function to visit all + * links in and below a group in an HDF5 file, thus providing a + * mechanism for an application to perform a common set of operations + * across all of those links or a dynamically selected subset. For + * non-recursive iteration across the members of a group, see + * H5Literate(). + * + * The group serving as the root of the iteration is specified by the + * \p loc_id / \p group_name parameter pair. \p loc_id specifies a + * file or group; group_name specifies either a group in the file + * (with an absolute name based in the file’s root group) or a group + * relative to \p loc_id. If \p loc_id fully specifies the group that + * is to serve as the root of the iteration, group_name should be '.' + * (a dot). (Note that when \p loc_id fully specifies the the group + * that is to serve as the root of the iteration, the user may wish to + * consider using H5Lvisit() instead of H5Lvisit_by_name().) + * + * Two parameters are used to establish the iteration: \p idx_type and + * \p order. + * + * \p idx_type specifies the index to be used. If the links have not + * been indexed by the index type, they will first be sorted by that + * index then the iteration will begin; if the links have been so + * indexed, the sorting step will be unnecesary, so the iteration may + * begin more quickly. Valid values include the following: + * \indexes + * + * Note that the index type passed in \p idx_type is a best effort + * setting. If the application passes in a value indicating iteration + * in creation order and a group is encountered that was not tracked + * in creation order, that group will be iterated over in + * lexicographic order by name, or name order. (Name order is the + * native order used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include the + * following: + * \orders + * + * The \p op callback function, the related \ref H5L_info_t + * \c struct, and the effect that the callback function's return value + * has on the application are described in H5Lvisit(). + * + * The H5Lvisit_by_name() \p op_data parameter is a user-defined + * pointer to the data required to process links in the course of the + * iteration. This pointer is passed back to each step of the + * iteration in the callback function's \p op_data parameter. + * + * \p lapl_id is a link access property list. In the general case, + * when default link access properties are acceptable, this can be + * passed in as #H5P_DEFAULT. An example of a situation that requires + * a non-default link access property list is when the link is an + * external link; an external link may require that a link prefix be + * set in a link access property list (see H5Pset_elink_prefix()). + * + * H5Lvisit_by_name() and H5Ovisit_by_name() are companion + * functions: one for examining and operating on links; the other for + * examining and operating on the objects that those links point to. + * Both functions ensure that by the time the function completes + * successfully, every link or object below the specified point in the + * file has been presented to the application for whatever processing + * the application requires. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id); /* UD link functions */ +/** + * \ingroup H5L + * + * \brief Creates a link of a user-defined type + * + * \loc_id{link_loc_id} + * \param[in] link_name Link name + * \param[in] link_type User-defined link class + * \param[in] udata User-supplied link information + * \param[in] udata_size Size of udata buffer + * \lcpl_id + * \lapl_id + * + * \return \herr_t + * + * \details H5Lcreate_ud() creates a link of user-defined type \p link_type + * named \p link_name at the location specified in \p link_loc_id with + * user-specified data \p udata. + * + * \p link_name is interpreted relative to \p link_loc_id. + * + * Valid values for the link class of the new link, \p link_type, + * include #H5L_TYPE_EXTERNAL and any user-defined link classes that + * have been registered with the library. See H5Lregister() for + * further information. + * + * The format of the information pointed to by \p udata is defined by + * the user. \p udata_size specifies the size of the \p udata buffer. + * \p udata may be NULL if \p udata_size is zero (0). + * + * The property lists specified by \p lcpl_id and \p lapl_id specify + * properties used to create and access the link. + * + * \note The external link type, #H5L_TYPE_EXTERNAL, included in the HDF5 + * library distribution, is implemented as a user-defined link type. This + * was done, in part, to provide a model for the implementation of other + * user-defined links. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, const void *udata, size_t udata_size, hid_t lcpl_id, hid_t lapl_id); +/** + * \ingroup H5LA + * + * \brief Registers a user-defined link class or changes behavior of an + * existing class + * + * \param[in] cls Pointer to a buffer containing the struct describing the + * user-defined link class + * + * \return \herr_t + * + * \details H5Lregister() registers a class of user-defined links, or changes + * the behavior of an existing class. + * + * \p cls is a pointer to a buffer containing a copy of the + * H5L_class_t struct. This struct is defined in H5Lpublic.h as + * follows: + * \snippet this H5L_class_t_snip + * + * The class definition passed with \p cls must include at least the + * following: + * \li An H5L_class_t version (which should be #H5L_LINK_CLASS_T_VERS) + * \li A link class identifier, \c class_id + * \li A traversal function, \c trav_func + * + * Remaining \c struct members are optional and may be passed as NULL. + * + * The link class passed in \c class_id must be in the user-definable + * range between #H5L_TYPE_UD_MIN and #H5L_TYPE_UD_MAX + * (see the table below) and will override + * any existing link class with that identifier. + * + * As distributed, valid values of \c class_id used in HDF5 include + * the following (defined in H5Lpublic.h): + * \link_types + * + * The hard and soft link class identifiers cannot be modified or + * reassigned, but the external link class is implemented as an + * example in the user-definable link class identifier range. + * H5Lregister() is used to register additional link classes. It could + * also be used to modify the behavior of the external link class, + * though that is not recommended. + * + * The following table summarizes existing link types and values and + * the reserved and user-definable link class identifier value ranges. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Link class identifier or Value rangeDescriptionLink class or label
    0 to 63Reserved range
    64 to 255User-definable range
    64Minimum user-defined value#H5L_TYPE_UD_MIN
    64External link#H5L_TYPE_EXTERNAL
    255Maximum user-defined value#H5L_TYPE_UD_MAX
    255Maximum value#H5L_TYPE_MAX
    -1Error#H5L_TYPE_ERROR
    + * + * Note that HDF5 internally registers user-defined link classes only + * by the numeric value of the link class identifier. An application, + * on the other hand, will generally use a name for a user-defined + * class, if for no other purpose than as a variable name. Assume, + * for example, that a complex link type is registered with the link + * class identifier 73 and that the code includes the following + * assignment: + * \code + * H5L_TYPE_COMPLEX_A = 73 + * \endcode + * The application can refer to the link class with a term, + * \c H5L_TYPE_COMPLEX_A, that conveys meaning to a human reviewing + * the code, while HDF5 recognizes it by the more cryptic numeric + * identifier, 73. + * + * \attention Important details and considerations include the following: + * \li If you plan to distribute files or software with a + * user-defined link class, please contact the Help Desk at + * The HDF Group to help prevent collisions between \c class_id + * values. See below. + * \li As distributed with HDF5, the external link class is + * implemented as an example of a user-defined link class with + * #H5L_TYPE_EXTERNAL equal to #H5L_TYPE_UD_MIN. \c class_id in + * the H5L_class_t \c struct must not equal #H5L_TYPE_UD_MIN + * unless you intend to overwrite or modify the behavior of + * external links. + * \li H5Lregister() can be used only with link class identifiers + * in the user-definable range (see table above). + * \li The hard and soft links defined by the HDF5 library, + * #H5L_TYPE_HARD and #H5L_TYPE_SOFT, reside in the reserved + * range below #H5L_TYPE_UD_MIN and cannot be redefined or + * modified. + * \li H5Lis_registered() can be used to determine whether a desired + * link class identifier is available. \Emph{Note that this + * function will tell you only whether the link class identifier + * has been registered with the installed copy of HDF5; it + * cannot tell you whether the link class has been registered + * with The HDF Group.} + * \li #H5L_TYPE_MAX is the maximum allowed value for a link type + * identifier. + * \li #H5L_TYPE_UD_MIN equals #H5L_TYPE_EXTERNAL. + * \li #H5L_TYPE_UD_MAX equals #H5L_TYPE_MAX. + * \li #H5L_TYPE_ERROR indicates that an error has occurred. + * + * \note \Bold{Registration with The HDF Group:}\n + * There are sometimes reasons to take a broader approach to registering + * a user-defined link class than just invoking H5Lregister(). For + * example: + * \li A user-defined link class is intended for use across an + * organization, among collaborators, or across a community of users. + * \li An application or library overlying HDF5 invokes a user-defined + * link class that must be shipped with the software. + * \li Files are distributed that make use of a user-defined link class. + * \li Or simply, a specific user-defined link class is thought to be + * widely useful. + * + * In such cases, you are encouraged to register that link class with + * The HDF Group's Helpdesk. The HDF Group maintains a registry of known + * user-defined link classes and tracks the selected link class + * identifiers. This registry is intended to reduce the risk of + * collisions between \c class_id values and to help coordinate the use + * of specialized link classes. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lregister(const H5L_class_t *cls); +/** + * \ingroup H5LA + * + * \brief Unregisters a class of user-defined links + * + * \param[in] id User-defined link class identifier + * + * \return \herr_t + * + * \details H5Lunregister() unregisters a class of user-defined links, + * preventing them from being traversed, queried, moved, etc. + * + * \note A link class can be re-registered using H5Lregister(). + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lunregister(H5L_type_t id); +/** + * \ingroup H5LA + * + * \brief Determines whether a class of user-defined links is registered + * + * \param[in] id User-defined link class identifier + * + * \return \htri_t + * + * \details H5Lis_registered() tests whether a user-defined link class is + * currently registered, either by the HDF5 library or by the user + * through the use of H5Lregister(). + * + * \note A link class must be registered to create new links of that type or to + * traverse existing links of that type. + * + * \since 1.8.0 + * + */ H5_DLL htri_t H5Lis_registered(H5L_type_t id); /* External link functions */ +/** + * \ingroup H5L + * + * \brief Decodes external link information + * + * \param[in] ext_linkval Buffer containing external link information + * \param[in] link_size Size, in bytes, of the \p ext_linkval buffer + * \param[out] flags External link flags, packed as a bitmap (\Emph{Reserved as + * a bitmap for flags; no flags are currently defined, so the + * only valid value * is 0.}) + * \param[out] filename Returned filename \param[out] obj_path Returned + * object path, relative to \p filename + * + * \return \herr_t + * + * \details H5Lunpack_elink_val() decodes the external link information + * returned by H5Lget_val() in the \p ext_linkval buffer. + * + * \p ext_linkval should be the buffer set by H5Lget_val() and will + * consist of two NULL-terminated strings, the filename and object + * path, one after the other. + * + * Given this buffer, H5Lunpack_elink_val() creates pointers to the + * filename and object path within the buffer and returns them in + * \p filename and \p obj_path, unless they are passed in as NULL. + * + * H5Lunpack_elink_val() requires that \p ext_linkval contain a + * concatenated pair of null-terminated strings, so use of this + * function on a string that is not an external link \p udata buffer + * may result in a segmentation fault. This failure can be avoided by + * adhering to the following procedure: + *
      + *
    1. Call H5Lget_info() to get the link type and the size of the + * link value.
    2. + *
    3. Verify that the link is an external link, i.e., that its link + * type is #H5L_TYPE_EXTERNAL.
    4. + *
    5. Call H5Lget_val() to get the link value.
    6. + *
    7. Call H5Lunpack_elink_val() to unpack that value.
    8. + *
    + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Lunpack_elink_val(const void *ext_linkval /*in*/, size_t link_size, unsigned *flags, const char **filename /*out*/, const char **obj_path /*out*/); +/** + * \ingroup H5L + * + * \brief Creates an external link, a soft link to an object in a different file. + * + * \param[in] file_name Name of the target file containing the target object. + * \param[in] obj_name Path within the target file to the target object + * \fgdt_loc_id{link_loc_id} + * \param[in] link_name Name of the new link, relative to \p link_loc_id + * \lcpl_id + * \lapl_id + * \return \herr_t + * + * \details H5Lcreate_external() creates a new external link. An external link + * is a soft link to an object in a different HDF5 file from the + * location of the link, i.e., to an external object. + * + * \p file_name identifies the target file containing the target + * object; \p obj_name specifies the path of the target object within + * that file. \p obj_name must be an absolute pathname in + * \p file_name, i.e., it must start at the target file’s root group, + * but it is not interpreted until an application attempts to traverse + * it. + * + * \p link_loc_id and \p link_name specify the location and name, + * respectively, of the new link. \p link_name is interpreted relative + * to \p link_loc_id. + * + * \p lcpl_id is the link creation property list used in creating the + * new link. + * + * \p lapl_id is the link access property list used in traversing the + * new link. Note that an external file opened by the traversal of an + * external link is always opened with the weak file close degree + * property setting, #H5F_CLOSE_WEAK (see H5Pset_fclose_degree()); + * any file close degree property setting in \p lapl_id is ignored. + * + * An external link behaves similarly to a soft link, and like a soft + * link in an HDF5 file, it may dangle: the target file and object + * need not exist at the time that the external link is created. + * + * When the external link \p link_name is accessed, the library will + * search for the target file \p file_name as described below: + * + * - If \p file_name is a relative pathname, the following steps are + * performed: + * - The library will get the prefix(es) set in the environment + * variable \c HDF5_EXT_PREFIX and will try to prepend each prefix + * to \p file_name to form a new \p file_name. + * - If the new \p file_name does not exist or if \c HDF5_EXT_PREFIX + * is not set, the library will get the prefix set via + * H5Pset_elink_prefix() and prepend it to \p file_name to form a + * new \p file_name. + * - If the new \p file_name does not exist or no prefix is being + * set by H5Pset_elink_prefix(), then the path of the file + * associated with \p link_loc_id is obtained. This path can be + * the absolute path or the current working directory plus the + * relative path of that file when it is created/opened. The + * library will prepend this path to \p file_name to form a new + * \p file_name. + * - If the new \p file_name does not exist, then the library will + * look for \p file_name and will return failure/success + * accordingly. + * - If \p file_name is an absolute pathname, the library will first + * try to find \p file_name. If \p file_name does not exist, + * \p file_name is stripped of directory paths to form a new + * \p file_name. The search for the new \p file_name then follows + * the same steps as described above for a relative pathname. See + * examples below illustrating how target_file_name is stripped to + * form a new \p file_name. + * + * Note that \p file_name is considered to be an absolute pathname + * when the following condition is true: + * + * - For Unix, the first character of \p file_name is a slash (\c /). + * For example, consider a \p file_name of \c /tmp/A.h5. + * If that target file does not exist, the new \p file_name after + * stripping will be \c A.h5. + * - For Windows, there are 6 cases: + * -# \p file_name is an absolute drive with absolute pathname. + * For example, consider a \p file_name of \c /tmp/A.h5. If that + * target file does not exist, the new \p file_name after + * stripping will be \c A.h5. + * -# \p file_name is an absolute pathname without specifying drive + * name. For example, consider a \p file_name of \c /tmp/A.h5. + * If that target file does not exist, the new \p file_name after + * stripping will be \c A.h5. + * -# \p file_name is an absolute drive with relative pathname. + * For example, consider a \p file_name of \c /tmp/A.h5. If that + * target file does not exist, the new \p file_name after + * stripping will be \c tmp\A.h5. + * -# \p file_name is in UNC (Uniform Naming Convention) format with + * server name, share name, and pathname. For example, consider + * a \p file_name of \c /tmp/A.h5. If that target file does not + * exist, the new \p file_name after stripping will be \c A.h5. + * -# \p file_name is in Long UNC (Uniform Naming Convention) format + * with server name, share name, and pathname. For example, + * consider a \p file_name of \c /tmp/A.h5. If that target file + * does not exist, the new \p file_name after stripping will be + * \c A.h5. + * -# \p file_name is in Long UNC (Uniform Naming Convention) format + * with an absolute drive and an absolute pathname. For example, + * consider a \p file_name of \c /tmp/A.h5. If that target file + * does not exist, the new \p file_name after stripping will be + * \c A.h5. + * + * The library opens target file \p file_name with the file access + * property list that is set via H5Pset_elink_fapl() when the external + * link link_name is accessed. If no such property list is set, the + * library uses the file access property list associated with the file + * of \p link_loc_id to open the target file. + * + * If an application requires additional control over file access + * flags or the file access property list, see H5Pset_elink_cb(); this + * function enables the use of an external link callback function as + * described in H5L_elink_traverse_t(). + * + * \attention A file close degree property setting (H5Pset_fclose_degree()) in + * the external link file access property list or in the external + * link callback function will be ignored. A file opened by means of + * traversing an external link is always opened with the weak file + * close degree property setting, #H5F_CLOSE_WEAK . + * + * \see H5Lcreate_hard(), H5Lcreate_soft(), H5Lcreate_ud() + * + * \since 1.8.0 + */ H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); diff --git a/src/H5MMpublic.h b/src/H5MMpublic.h index ebfb3772111..70ac6445ea5 100644 --- a/src/H5MMpublic.h +++ b/src/H5MMpublic.h @@ -29,8 +29,13 @@ #include "H5public.h" /* These typedefs are currently used for VL datatype allocation/freeing */ +//! typedef void *(*H5MM_allocate_t)(size_t size, void *alloc_info); +//! + +//! typedef void (*H5MM_free_t)(void *mem, void *free_info); +//! #ifdef __cplusplus extern "C" { diff --git a/src/H5Omodule.h b/src/H5Omodule.h index 9ba6c61c90e..134aa920528 100644 --- a/src/H5Omodule.h +++ b/src/H5Omodule.h @@ -29,4 +29,10 @@ #define H5_MY_PKG_ERR H5E_OHDR #define H5_MY_PKG_INIT YES +/**\defgroup H5O H5O + * \brief Object Interface + * + * \todo Describe concisely what the functions in this module are about. + * + */ #endif /* H5Omodule_H */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index b8cd9400621..1c33fec22e5 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -92,68 +92,95 @@ /* Public Typedefs */ /*******************/ -/* Types of objects in file */ +//! +/** + * Types of objects in file + */ typedef enum H5O_type_t { - H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ - H5O_TYPE_GROUP, /* Object is a group */ - H5O_TYPE_DATASET, /* Object is a dataset */ - H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ - H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ + H5O_TYPE_UNKNOWN = -1, /**< Unknown object type */ + H5O_TYPE_GROUP, /**< Object is a group */ + H5O_TYPE_DATASET, /**< Object is a dataset */ + H5O_TYPE_NAMED_DATATYPE, /**< Object is a named data type */ + H5O_TYPE_NTYPES /**< Number of different object types (must be last!) */ } H5O_type_t; +//! -/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ +//! +/** + * Information struct for object header metadata (for + * H5Oget_info(), H5Oget_info_by_name(), H5Oget_info_by_idx()) + */ typedef struct H5O_hdr_info_t { - unsigned version; /* Version number of header format in file */ - unsigned nmesgs; /* Number of object header messages */ - unsigned nchunks; /* Number of object header chunks */ - unsigned flags; /* Object header status flags */ + unsigned version; /**< Version number of header format in file */ + unsigned nmesgs; /**< Number of object header messages */ + unsigned nchunks; /**< Number of object header chunks */ + unsigned flags; /**< Object header status flags */ struct { - hsize_t total; /* Total space for storing object header in file */ - hsize_t meta; /* Space within header for object header metadata information */ - hsize_t mesg; /* Space within header for actual message information */ - hsize_t free; /* Free space within object header */ + hsize_t total; /**< Total space for storing object header in file */ + hsize_t meta; /**< Space within header for object header metadata information */ + hsize_t mesg; /**< Space within header for actual message information */ + hsize_t free; /**< Free space within object header */ } space; struct { - uint64_t present; /* Flags to indicate presence of message type in header */ - uint64_t shared; /* Flags to indicate message type is shared in header */ + uint64_t present; /**< Flags to indicate presence of message type in header */ + uint64_t shared; /**< Flags to indicate message type is shared in header */ } mesg; } H5O_hdr_info_t; +//! -/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ +//! +/** + * Data model information struct for objects + * (For H5Oget_info(), H5Oget_info_by_name(), H5Oget_info_by_idx() version 3) + */ typedef struct H5O_info_t { - unsigned long fileno; /* File number that object is located in */ - haddr_t addr; /* Object address in file */ - H5O_type_t type; /* Basic object type (group, dataset, etc.) */ - unsigned rc; /* Reference count of object */ - time_t atime; /* Access time */ - time_t mtime; /* Modification time */ - time_t ctime; /* Change time */ - time_t btime; /* Birth time */ - hsize_t num_attrs; /* # of attributes attached to object */ - H5O_hdr_info_t hdr; /* Object header information */ + unsigned long fileno; /**< File number that object is located in */ + haddr_t addr; /**< Object address in file */ + H5O_type_t type; /**< Basic object type (group, dataset, etc.) */ + unsigned rc; /**< Reference count of object */ + time_t atime; /**< Access time */ + time_t mtime; /**< Modification time */ + time_t ctime; /**< Change time */ + time_t btime; /**< Birth time */ + hsize_t num_attrs; /**< # of attributes attached to object */ + H5O_hdr_info_t hdr; /**< Object header information */ /* Extra metadata storage for obj & attributes */ struct { - H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ - H5_ih_info_t attr; /* v2 B-tree & heap for attributes */ + H5_ih_info_t obj; /**< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ + H5_ih_info_t attr; /**< v2 B-tree & heap for attributes */ } meta_size; } H5O_info_t; +//! -/* Typedef for message creation indexes */ +/** + * Typedef for message creation indexes + */ typedef uint32_t H5O_msg_crt_idx_t; -/* Prototype for H5Ovisit/H5Ovisit_by_name() operator */ +//! +/** + * Prototype for H5Ovisit(), H5Ovisit_by_name() operator (version 3) + */ typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info, void *op_data); +//! +//! typedef enum H5O_mcdt_search_ret_t { - H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */ - H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */ - H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but - not merged. */ + H5O_MCDT_SEARCH_ERROR = -1, /**< Abort H5Ocopy */ + H5O_MCDT_SEARCH_CONT, /**< Continue the global search of all committed datatypes in the destination file + */ + H5O_MCDT_SEARCH_STOP /**< Stop the search, but continue copying. The committed datatype will be copied + but not merged. */ } H5O_mcdt_search_ret_t; +//! -/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype - * list */ +//! +/** + * Callback to invoke when completing the search for a matching committed + * datatype from the committed dtype list + */ typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data); +//! /********************/ /* Public Variables */ @@ -166,42 +193,1410 @@ typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data); extern "C" { #endif -H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); -H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); -H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, - hsize_t n, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Opens an object in an HDF5 file by location identifier and path name. + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Path to the object; relative to \p loc_id + * \lapl_id + * + * \return \hid_tv{object} + * + * \details H5Oopen() opens a group, dataset, or committed (named) datatype + * specified by a location, \p loc_id, and a path name, \p name, in an HDF5 file. + * + * This function opens the object in the same manner as H5Gopen(), H5Topen(), and H5Dopen(). + * However, H5Oopen() does not require the type of object to be known beforehand. + * This can be useful with user-defined links, for instance, when only a path may be known. + * + * H5Oopen() cannot be used to open a dataspace, attribute, property list, or file. + * + * Once an object of unknown type has been opened with H5Oopen(), + * the type of that object can be determined by means of an H5Iget_type() call. + * + * \p loc_id may be a file, group, dataset, named datatype, or attribute. + * If an attribute is specified for \p loc_id then the object where the + * attribute is attached will be accessed. + * + * \p name must be the path to that object relative to \p loc_id. + * + * \p lapl_id is the link access property list associated with the link pointing to + * the object. If default link access properties are appropriate, this can be + * passed in as #H5P_DEFAULT. + * + * When it is no longer needed, the opened object should be closed with + * H5Oclose(), H5Gclose(), H5Tclose(), or H5Dclose(). + * + * \version 1.8.1 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Opens an object using its address within an HDF5 file. + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] addr Object's address in the file + * + * \return \hid_tv{object} + * + * \details H5Oopen_by_addr() opens a group, dataset, or committed (named) datatype using its + * address within an HDF5 file, \p addr. The resulting opened object is identical to + * an object opened with H5Oopen() and should be closed with H5Oclose() or an + * object-type-specific closing function (such as H5Gclose()) when no longer needed. + * + * \p loc_id is a location identifier in the file. + * + * The object’s address within the file, \p addr, is the byte offset of the first byte + * of the object header from the beginning of the HDF5 file space, i.e., from the + * beginning of the super block (see the “HDF5 Storage Model” section of the The + * HDF5 Data Model and File Structure chapter of the HDF5 User's Guide.) + * + * \p addr can be obtained via either of two function calls. H5Gget_objinfo() returns + * the object’s address in the \c objno field of the H5G_stat_t \c struct; + * H5Lget_info() returns the address in the \c address field of the #H5L_info_t \c struct. + * + * The address of the HDF5 file on a physical device has no effect on H5Oopen_by_addr(), + * nor does the use of any file driver. As stated above, the object address is its + * offset within the HDF5 file; HDF5’s file drivers will transparently map this to an + * address on a storage device. + * + * \warning This function must be used with care! + * \warning Improper use can lead to inaccessible data, wasted space in the file, + * or file corruption. + * \warning This function is dangerous if called on an invalid address. The risk can be safely + * overcome by retrieving the object address with H5Gget_objinfo() or H5Lget_info() + * immediately before calling H5Oopen_by_addr(). The immediacy of the operation can be + * important; if time has elapsed and the object has been deleted from the file, + * the address will be invalid and file corruption can result. + * + * \version 1.8.4 Fortran subroutine added in this release. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Opens the nth object in a group + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] group_name Name of group, relative to \p loc_id, in which object is located + * \idx_type + * \order + * \param[in] n Object to open + * \lapl_id + * + * \return \hid_tv{object} + * + * \details H5Open_by_idx() opens the nth object in the group specified by \p loc_id + * and \p group_name. + * + * \p loc_id specifies a location identifier. + * \p group_name specifies the group relative to \p loc_id in which the object can be found. + * If \p loc_id fully specifies the group in which the object resides, + * \p group_name can be a dot (.). + * + * The specific object to be opened within the group is specified by the three parameters: + * \p idx_type, \p order and \p n. + * + * \p idx_type specifies the type of index by which objects are ordered. + * Valid index types include the following: + * + * \indexes + * + * \p order specifies the order in which the objects are to be referenced for the purposes + * of this function. Valid orders include the following: + * + * \orders + * + * Note that for #H5_ITER_NATIVE, rather than implying a particular order, + * it instructs the HDF5 library to iterate through the objects in the fastest + * available order, i.e., in a natural order. + * + * \p n specifies the position of the object within the index. Note that this count is + * zero-based; 0 (zero) indicates that the function will return the value of the first object; + * if \p n is 5, the function will return the value of the sixth object; etc. + * + * \p lapl_id specifies the link access property list to be used in accessing the object. + * + * An object opened with this function should be closed when it is no longer needed so that + * resource leaks will not develop. H5Oclose() can be used to close groups, datasets, + * or committed datatypes. + * + * \version 1.8.1 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, + hsize_t n, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Determines whether a link resolves to an actual object. + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name The name of the link to check + * \lapl_id + * + * \return Returns a positive value if the object pointed to by + * the \p loc_id and \p name combination exists. + * \return Returns 0 if the object pointed to by + * the \p loc_id and \p name combination does not exist. + * \return Returns a negatvie value when the function fails. + * + * \details H5Oexists_by_name() allows an application to determine whether + * the link \p name in the group or file specified with \p loc_id + * resolves to an HDF5 object to open or if the link dangles. The + * link may be of any type, but hard links will always resolve + * to objects and do not need to be verified. + * + * Note that H5Oexists_by_name() verifies only that the target + * object exists. If \p name includes either a relative path or + * an absolute path to the target link, intermediate steps + * along the path must be verified before the existence of + * the target link can be safely checked. If the path is not + * verified and an intermediate element of the path does not + * exist, H5Oexists_by_name() will fail. The example in the next + * paragraph illustrates one step-by-step method for verifying + * the existence of a link with a relative or absolute path. + * + * \par Example + * Use the following steps to verify the existence of + * the link \c datasetD in the \c group group1/group2/softlink_to_group3/, + * where \c group1 is a member of the group specified by \c loc_id: + * + * \par + * - First use H5Lexists() to verify that a link named \c group1 exists. + * - If \c group1 exists, use H5Oexists_by_name() to verify that the + * link \c group1 resolves to an object. + * - If \c group1 exists, use H5Lexists() again, this time with name + * set to \c group1/group2, to verify that the link \c group2 exists + * in \c group1. + * - If the \c group2 link exists, use H5Oexists_by_name() to verify + * that \c group1/group2 resolves to an object. + * - If \c group2 exists, use H5Lexists() again, this time with name + * set to \c group1/group2/softlink_to_group3, to verify that the + * link \c softlink_to_group3 exists in \c group2. + * - If the \c softlink_to_group3 link exists, use H5Oexists_by_name() + * to verify that \c group1/group2/softlink_to_group3 resolves to + * an object. + * - If \c softlink_to_group3 exists, you can now safely use H5Lexists + * with name set to \c group1/group2/softlink_to_group3/datasetD to + * verify that the target link, \c datasetD, exists. + * - And finally, if the link \c datasetD exists, use H5Oexists_by_name + * to verify that \c group1/group2/softlink_to_group3/datasetD + * resolves to an object. + * + * \par + * If the link to be verified is specified with an absolute path, + * the same approach should be used, but starting with the first + * link in the file’s root group. For instance, if \c datasetD + * were in \c /group1/group2/softlink_to_group3, the first call to + * H5Lexists() would have name set to \c /group1. + * + * \par + * Note that this is an outline and does not include all necessary + * details. Depending on circumstances, for example, an application + * may need to verify the type of an object also. + * + * \warning \Bold{Failure Modes:} + * \warning If \p loc_id and \p name both exist but the combination does not + * resolve to an object, the function will return 0 (zero); + * the function does not fail in this case. + * \warning If either the location or the link specified by the \p loc_id + * and \p name combination does not exist, the function will fail, + * returning a negative value. + * \warning Note that verifying the existence of an object within an HDF5 + * file is a multistep process. An application can be certain the + * object does not exist only if H5Lexists() and H5Oexists_by_name() + * have been used to verify the existence of the links and groups + * in the hierarchy above that object. The example above, in the + * function description, provides a step-by-step description of + * that verification process. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.5 + * + */ H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object specified by an identifier + * + * \fgdta_loc_obj_id{loc_id} + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * + * \return \herr_t + * + * \details H5Oget_info2() specifies an object by its identifier, \p loc_id , and + * retrieves the metadata describing that object in \p oinfo , an H5O_info1_t \c struct. + * This \c struct type is described in H5Oget_info1(). + * + * The \p fields parameter contains flags to determine which fields will be filled in + * the H5O_info1_t \c struct returned in \p oinfo. + * These flags are defined in the H5Opublic.h file: + * + * \obj_info_fields + * + * \note If you are iterating through a lot of different objects to + * retrieve information via the H5Oget_info() family of routines, + * you may see memory building up. This can be due to memory + * allocation for metadata such as object headers and messages + * when the iterated objects are put into the metadata cache. + * \note + * If the memory buildup is not desirable, you can configure a + * smaller cache via H5Fset_mdc_config() or set the file access + * property list via H5Pset_mdc_config(). A smaller sized cache + * will force metadata entries to be evicted from the cache, + * thus freeing the memory associated with the entries. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by location and relative name + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Name of group, relative to \p loc_id + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_name2() specifies an object’s location and name, \p loc_id and + * \p name, respectively, and retrieves the metadata describing + * that object in \p oinfo, an H5O_info1_t \c struct. + * + * The \c struct H5O_info1_t is defined in H5Opublic.h and described + * in the H5Oget_info1() function entry. + * + * The \p fields parameter contains flags to determine which fields + * will be filled in in the H5O_info1_t \c struct returned in + * \p oinfo. These flags are defined in the H5Opublic.h file: + * + * \obj_info_fields + * + * The link access property list, \p lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo, unsigned fields, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by an index position + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] group_name Name of group in which object is located + * \idx_type + * \order + * \param[in] n Position within the index + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_idx2() retrieves the metadata describing an + * object in the \c struct \p oinfo, as specified by the location, + * \p loc_id, group name, \p group_name, the index by which objects + * in that group are tracked, \p idx_type, the order by which the + * index is to be traversed, \p order, and an object’s position + * \p n within that index. + * + * \p oinfo, in which the object information is returned, is a \c struct of + * type H5O_info1_t. This and other \c struct types used + * by H5Oget_info_by_idx2() are described in H5Oget_info_by_idx1(). + * + * If \p loc_id fully specifies the group in which the object resides, + * i\p group_name can be a dot (\c .). + * + * The \p fields parameter contains flags to determine which fields will be + * filled in the H5O_info1_t \c struct returned in \p oinfo. + * These flags are defined in the H5Opublic.h file: + * \obj_info_fields + * + * The link access property list, \c lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Creates a hard link to an object in an HDF5 file + * + * \param[in] obj_id Object to be linked + * \param[in] new_loc_id Location identifier at which object is to be linked; + * may be a file, group, dataset, named datatype or attribute identifier. + * \param[in] new_name Name of link to be created, relative to \p new_loc_id. + * \lcpl_id + * \lapl_id + * + * \return \herr_t + * + * \details H5Olink() creates a new hard link to an object in an HDF5 file. + * \p new_loc_id and \p \p new_link_name specify the location and name of the + * new link while \p object_id identifies the object that the link + * points to. + * + * H5Olink() is designed for two purposes: + * - To create the first hard link to an object that has just + * been created with H5Dcreate_anon(), H5Gcreate_anon(), or + * H5Tcommit_anon(). + * - To add additional structure to an existing + * file so that, for example, an object can be shared among + * multiple groups. + * + * \p lcpl and \p lapl are the link creation and access property lists + * associated with the new link. + * + * \par Example: + * To create a new link to an object while simultaneously creating + * missing intermediate groups: Suppose that an application must + * create the group C with the path /A/B01/C but may not know + * at run time whether the groups A and B01 exist. The following + * code ensures that those groups are created if they are missing: + * \par + * \code + * + * // Creates a link creation property list (LCPL). + * hid_t lcpl_id = H5Pcreate(H5P_LINK_CREATE); + * + * // Sets "create missing intermediate groups" property in that LCPL. + * int status = H5Pset_create_intermediate_group(lcpl_id, TRUE); + * + * // Creates a group without linking it into the file structure. + * hid_t gid = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT); + * + * // Links group into file structure. + * status = H5Olink(gid, file_id, "/A/B01/C", lcpl_id, H5P_DEFAULT); + * + * \endcode + * + * \par + * Note that unless the object is intended to be temporary, + * the H5O_LINK call is mandatory if an object created with one + * of the H5*_CREATE_ANON functions (or with H5T_COMMIT_ANON) + * is to be retained in the file; without an H5O_LINK call, + * the object will not be linked into the HDF5 file structure + * and will be deleted when the file is closed. + * + * \version 1.8.1 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Increments an object reference count + * + * \fgdta_loc_obj_id{object_id} + * + * \return \herr_t + * + * \details H5Oincr_refcount() increments the hard link reference count for an object. + * It should be used any time a user-defined link that references + * an object by address is added. When the link is deleted, + * H5Odecr_refcount() should be used. + * + * An object’s reference count is the number of hard links in the + * file that point to that object. See the “Programming Model” + * section of the HDF5 Groups chapter in the -- HDF5 User’s Guide + * for a more complete discussion of reference counts. + * + * If a user application needs to determine an object’s reference + * count, an H5Oget_info() call is required; the reference count + * is returned in the \c rc field of the #H5O_info_t \c struct. + * + * \warning This function must be used with care! + * \warning Improper use can lead to inaccessible data, wasted space in the file, + * or file corruption. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oincr_refcount(hid_t object_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Decrements an object reference count + * + * \fgdta_loc_obj_id{object_id} + * + * \return \herr_t + * + * \details H5Odecr_refcount() decrements the hard link reference count for an object. + * It should be used any time a user-defined link that references + * an object by address is deleted. In general, H5Oincr_refcount() will have + * been used previously, when the link was created. + * + * An object’s reference count is the number of hard links in the + * file that point to that object. See the “Programming Model” + * section of the HDF5 Groups chapter in the HDF5 User’s Guide + * for a more complete discussion of reference counts. + * + * If a user application needs to determine an object’s reference + * count, an H5Oget_info() call is required; the reference count + * is returned in the \c rc field of the #H5O_info_t \c struct. + * + * \warning This function must be used with care! + * \warning Improper use can lead to inaccessible data, wasted space in the file, + * or file corruption. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Odecr_refcount(hid_t object_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Copies an object in an HDF5 file + * + * \param[in] src_loc_id Object identifier indicating the location of the + * source object to be copied + * \param[in] src_name Name of the source object to be copied + * \param[in] dst_loc_id Location identifier specifying the destination + * \param[in] dst_name Name to be assigned to the new copy + * \param[in] ocpypl_id Object copy property list + * \lcpl_id + * + * \return \herr_t + * + * \details H5Ocopy() copies the group, dataset or committed datatype + * specified by \p src_name from the file or group specified by + * \p src_loc_id to the destination location \p dst_loc_id. + * + * The destination location, as specified in dst_loc_id, may + * be a group in the current file or a location in a different + * file. If dst_loc_id is a file identifier, the copy will be + * placed in that file’s root group. + * + * The copy will be created with the path specified in \p dst_name, + * which must not pre-exist in the destination location. If + * \p dst_name already exists at the location \p dst_loc_id, + * H5Ocopy() will fail. If \p dst_name is an absolute path, + * the copy will be created relative to the file’s root group. + * + * The copy of the object is created with the property lists + * specified by \p ocpypl_id and \p lcpl_id. #H5P_DEFAULT can be passed + * in for these property lists. The default behavior: + * + * - of the link creation property list is to NOT create + * intermediate groups. + * - of the flags specified by the object creation property list + * is described in H5Pset_copy_object(). + * + * These property lists or flags can be modified to govern the + * behavior of H5Ocopy() as follows: + * + * - A flag controlling the creation of intermediate groups that + * may not yet exist is set in the link creation property list + * \p lcpl_id with H5Pset_create_intermediate_group(). + * + * - Copying of committed datatypes can be tuned through the use + * of H5Pset_copy_object(), H5Padd_merge_committed_dtype_path(), + * H5Pset_mcdt_search_cb(), and related functions. + * + * - Flags controlling other aspects of object copying are set in the + * object copy property list \p ocpypl_id with H5Pset_copy_object(). + * + * H5Ocopy() will always try to make a copy of the object specified + * in \p src_name. + * + * - If the object specified by \p src_name is a group containing a + * soft or external link, the default is that the new copy will + * contain a soft or external link with the same value as the + * original. See H5Pset_copy_object() for optional settings. + * + * - If the path specified in \p src_name is or contains a soft link + * or an external link, H5Ocopy() will copy the target object. + * Use H5Lcopy() if the intent is to create a new soft or external + * link with the same value as the original link. + * + * H5Ocopy() can be used to copy an object in an HDF5 file. If + * an object has been changed since it was opened, it should be + * written back to the file before using H5Ocopy(). The object + * can be written back either by closing the object (H5Gclose(), + * H5Oclose(), H5Dclose(), or H5Tclose()) or by flushing + * the HDF5 file (H5Fflush()). + * + * \par See Also: + * - Functions to modify the behavior of H5Ocopy(): + * - H5Padd_merge_committed_dtype_path() + * - H5Pset_copy_object() + * - H5Pset_create_intermediate_group() + * - H5Pset_mcdt_search_cb() + * - Copying Committed Datatypes with #H5Ocopy - A comprehensive + * discussion of copying committed datatypes (PDF) in + * Advanced Topics in HDF5 + * + * \version 1.8.9 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Sets comment for specified object + * + * \fgdta_loc_obj_id{obj_id} + * \param[in] comment The new comment + * + * \return \herr_t + * + * \details H5Oset_comment() sets the comment for the specified object + * to the contents of \p comment. Any previously existing comment + * is overwritten. + * + * The target object is specified by an identifier, \p obj_id. + * If \p comment is the empty string or a null pointer, any existing + * comment message is removed from the object. + * + * Comments should be relatively short, null-terminated, ASCII strings. + * + * Comments can be attached to any object that has an object + * header. Datasets, groups, and committed (named) datatypes have + * object headers. Symbolic links do not have object headers. + * + * If a comment is being added to an object attribute, this comment + * will be attached to the object to which the attribute belongs + * and not to the attribute itself. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Sets comment for specified object + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Name of the object whose comment is to be set or reset + * \param[in] comment The new comment + * \lapl_id + * + * \return \herr_t + * + * \details H5Oset_comment_by_name() sets the comment for the specified object + * to the contents of \p comment. Any previously existing comment + * is overwritten. + * + * The target object is specified by \p loc_id and \p name. + * \p loc_id can specify any object in the file. + * \p name can be one of the following: + * + * - The name of the object specified as a path relative to \p loc_id + * - An absolute name of the object, starting from \c /, the file’s root group + * - A dot (\c .), if \p loc_id fully specifies the object + * + * If \p comment is the empty string or a null pointer, any existing + * comment message is removed from the object. + * + * Comments should be relatively short, null-terminated, ASCII strings. + * + * Comments can be attached to any object that has an object + * header. Datasets, groups, and committed (named) datatypes have + * object headers. Symbolic links do not have object headers. + * + * If a comment is being added to an object attribute, this comment + * will be attached to the object to which the attribute belongs + * and not to the attribute itself. + * + * \p lapl_id contains a link access property list identifier. A + * link access property list can come into play when traversing + * links to access an object. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves comment for specified object + * + * \fgdta_loc_obj_id{obj_id} + * \param[out] comment The comment + * \param[in] bufsize Anticipated required size of the comment buffer + * + * \return Upon success, returns the number of characters in the + * comment, not including the \c NULL terminator, or zero (\c 0) if + * the object has no comment. The value returned may be larger + * than \p bufsize. Otherwise returns a negative value. + * + * \details H5Oget_comment() retrieves the comment for the specified object in + * the buffer \p comment. + * + * The target object is specified by an identifier, \p object_id. + * + * The size in bytes of the buffer \p comment, including the \c NULL + * terminator, is specified in \p bufsize. If \p bufsize is unknown, + * a preliminary H5Oget_comment() call with the pointer \p comment + * set to \c NULL will return the size of the comment without + * the \c NULL terminator. + * + * If \p bufsize is set to a smaller value than described above, + * only \p bufsize bytes of the comment, without a \c NULL terminator, + * are returned in \p comment. + * + * If an object does not have a comment, the empty string is + * returned in \p comment. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves comment for specified object + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Name of the object whose comment is to be retrieved + * \param[out] comment The comment + * \param[in] bufsize Anticipated required size of the \p comment buffer + * \lapl_id + * + * \return Upon success, returns the number of characters in the comment, + * not including the \c NULL terminator, or zero (\c 0) if the object + * has no comment. The value returned may be larger than \c bufsize. + * Otherwise returns a negative value. + * + * \details H5Oget_comment_by_name() retrieves the comment for an object + * in the buffer \p comment. + * + * The target object is specified by \p loc_id and \p name. + * \p loc_id can specify any object in the file. + * \p name can be one of the following: + * + * - The name of the object relative to \p loc_id + * - An absolute name of the object, starting from \c /, the file’s root group + * - A dot (\c .), if \p loc_id fully specifies the object + * + * The size in bytes of the comment, including the \c NULL terminator, + * is specified in \p bufsize. If \p bufsize is unknown, a preliminary + * H5Oget_comment_by_name() call with the pointer \p comment set + * to \c NULL will return the size of the comment without + * the \c NULL terminator. + * + * If \p bufsize is set to a smaller value than described above, + * only \p bufsize bytes of the comment, without a \c NULL terminator, + * are returned in \p comment. + * + * If an object does not have a comment, the empty string is + * returned in \p comment. + * + * \p lapl_id contains a link access property list identifier. A + * link access property list can come into play when traversing + * links to access an object. + * + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); -H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Recursively visits all objects accessible from a specified object + * + * \fgdta_loc_obj_id{obj_id} + * \idx_type + * \order + * \param[in] op Callback function passing data regarding the object + * to the calling application + * \param[in] op_data User-defined pointer to data required by the application + * for its processing of the object + * \param[in] fields Flags specifying the fields to be retrieved to the + * callback \p op + * + * \return On success, returns the return value of the first operator + * that returns a positive value, or zero if all members were + * processed with no operator returning non-zero. + * + * \return On failure, returns a negative value if something goes wrong + * within the library, or the first negative value returned by + * an operator. + * + * \details H5Ovisit2() is a recursive iteration function to visit the + * object \p obj_id and, if \p obj_id is a group, all objects in + * and below it in an HDF5 file, thus providing a mechanism for + * an application to perform a common set of operations across all + * of those objects or a dynamically selected subset. For + * non-recursive iteration across the members of a group, + * see H5Literate1(). + * + * If \p obj_id is a group identifier, that group serves as the + * root of a recursive iteration. If \p obj_id is a file identifier, + * that file’s root group serves as the root of the recursive + * iteration. If \p obj_id is an attribute identifier, + * then the object where the attribute is attached will be iterated. + * If \p obj_id is any other type of object, such as a dataset or + * named datatype, there is no iteration. + * + * Two parameters are used to establish the iteration: \p idx_type + * and \p order. + * + * \p idx_type specifies the index to be used. If the links in + * a group have not been indexed by the index type, they will + * first be sorted by that index then the iteration will begin; + * if the links have been so indexed, the sorting step will be + * unnecessary, so the iteration may begin more quickly. Valid + * values include the following: + * + * \indexes + * + * Note that the index type passed in \p idx_type is a + * best effort setting. If the application passes in + * a value indicating iteration in creation order and a group is + * encountered that was not tracked in creation order, that group + * will be iterated over in alpha-numeric order by name, or + * name order. (Name order is the native order + * used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include + * the following: + * + * \orders + * + * The prototype of the callback function op is as follows (as + * defined in the source code file H5Opublic.h): + * + * \snippet this H5O_iterate1_t_snip + * + * The parameters of this callback function have the following values + * or meanings: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \c objObject that serves as root of the iteration; + * same value as the H5Ovisit1() \p obj_id parameter
    \c nameName of object, relative to \c obj, being examined at + * current step of the iteration
    \c infoH5O_info1_t \c struct containing information + * regarding that object
    \c op_dataUser-defined pointer to data required by the application in + * processing the object; a pass-through of the \c op_data pointer + * provided with the H5Ovisit() function call
    + * + * The H5O_info1_t \c struct is defined in H5Opublic.h and + * described in the H5Oget_info1() function entry. + * + * The return values from an operator are: + * - Zero causes the visit iterator to continue, returning zero when all + * group members have been processed. + * - A positive value causes the visit iterator to immediately return that + * positive value, indicating short-circuit success. + * - A negative value causes the visit iterator to immediately return that + * value, indicating failure. + * + * The H5Ovisit2() \p op_data parameter is a user-defined pointer to the data + * required to process objects in the course of the iteration. This pointer + * is passed back to each step of the iteration in the callback + * function’s \p op_data parameter. + * + * The \p fields parameter contains flags to determine which fields will + * be retrieved by the \p op callback function. These flags are defined + * in the H5Opublic.h file: + * \obj_info_fields + * + * H5Lvisit() and H5Ovisit() are companion functions: one for + * examining and operating on links; the other for examining + * and operating on the objects that those links point to. Both + * functions ensure that by the time the function completes + * successfully, every link or object below the specified point + * in the file has been presented to the application for whatever + * processing the application requires. These functions assume + * that the membership of the group being iterated over remains + * unchanged through the iteration; if any of the links in the + * group change during the iteration, the resulting behavior + * is undefined. + * + * \note \Bold{Programming Note for C++ Developers Using C Functions:} + * \note If a C routine that takes a function pointer as an argument is + * called from within C++ code, the C routine should be returned + * from normally. + * + * \note Examples of this kind of routine include callbacks such as + * H5Pset_elink_cb() and H5Pset_type_conv_cb() and + * functions such as H5Tconvert() and H5Ewalk2(). + * + * \note Exiting the routine in its normal fashion allows the HDF5 + * C library to clean up its work properly. In other words, if + * the C++ application jumps out of the routine back to the C++ + * “catch” statement, the library is not given the opportunity + * to close any temporary data structures that were set up when + * the routine was called. The C++ application should save some + * state as the routine is started so that any problem that occurs + * might be diagnosed. + * + * \since 1.10.3 + * + */ +H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields); -H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Recursively visits all objects starting from a specified object + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] obj_name Name of the object, generally relative to + * \p loc_id, that will serve as root of the iteration + * \idx_type + * \order + * \param[in] op Callback function passing data regarding the object + * to the calling application + * \param[in] op_data User-defined pointer to data required by the application + * for its processing of the object + * \param[in] fields Flags specifying the fields to be retrieved to the + * callback function \p op + * \lapl_id + * + * \return On success, returns the return value of the first operator + * that returns a positive value, or zero if all members were + * processed with no operator returning non-zero. + * + * \return On failure, returns a negative value if something goes wrong + * within the library, or the first negative value returned by + * an operator. + * + * \details H5Ovisit_by_name2() is a recursive iteration function to visit + * the object specified by the \p loc_id / \p obj_name parameter + * pair and, if that object is a group, all objects in and below it + * in an HDF5 file, thus providing a mechanism for an application to + * perform a common set of operations across all of those objects or + * a dynamically selected subset. For non-recursive iteration across + * the members of a group, see #H5Literate. + * + * The object serving as the root of the iteration is specified + * by the \p loc_id / \p obj_name parameter pair. \p loc_id specifies + * a file or an object in a file; if \p loc_id is an attribute identifier, + * the object where the attribute is attached will be used. + * \p obj_name specifies either an object in the file (with an absolute + * name based in the file’s root group) or an object name relative + * to \p loc_id. If \p loc_id fully specifies the object that is to serve + * as the root of the iteration, \p obj_name should be '\c .' (a dot). + * (Note that when \p loc_id fully specifies the object that is to serve + * as the root of the iteration, the user may wish to consider + * using H5Ovisit2() instead of #H5Ovisit_by_name.) + * + * Two parameters are used to establish the iteration: \p idx_type + * and \p order. + * + * \p idx_type specifies the index to be used. If the links in + * a group have not been indexed by the index type, they will + * first be sorted by that index then the iteration will begin; + * if the links have been so indexed, the sorting step will be + * unnecessary, so the iteration may begin more quickly. Valid + * values include the following: + * + * \indexes + * + * Note that the index type passed in \p idx_type is a + * best effort setting. If the application passes in a + * value indicating iteration in creation order and a group is + * encountered that was not tracked in creation order, that group + * will be iterated over in alpha-numeric order by name, or + * name order. (Name order is the native order + * used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include + * the following: + * + * \orders + * + * The \p op callback function and the effect of the callback + * function’s return value on the application are described + * in H5Ovisit2(). + * + * The H5O_info1_t \c struct is defined in H5Opublic.h + * and described in the H5Oget_info1() function entry. + * + * The H5Ovisit_by_name2() \p op_data parameter is a user-defined + * pointer to the data required to process objects in the course + * of the iteration. This pointer is passed back to each step of + * the iteration in the callback function’s \p op_data parameter. + * + * \p lapl_id is a link access property list. In the general case, + * when default link access properties are acceptable, this can + * be passed in as #H5P_DEFAULT. An example of a situation that + * requires a non-default link access property list is when + * the link is an external link; an external link may require + * that a link prefix be set in a link access property list + * (see H5Pset_elink_prefix()). + * + * The \p fields parameter contains flags to determine which fields will + * be retrieved by the \p op callback function. These flags are defined + * in the H5Opublic.h file: + * \obj_info_fields + * + * #H5Lvisit_by_name and #H5Ovisit_by_name are companion + * functions: one for examining and operating on links; the other + * for examining and operating on the objects that those links point to. + * Both functions ensure that by the time the function completes + * successfully, every link or object below the specified point + * in the file has been presented to the application for whatever + * processing the application requires. + * + * \note \Bold{Programming Note for C++ Developers Using C Functions:} + * \note If a C routine that takes a function pointer as an argument is + * called from within C++ code, the C routine should be returned + * from normally. + * + * \note Examples of this kind of routine include callbacks such as + * H5Pset_elink_cb() and H5Pset_type_conv_cb() and + * functions such as H5Tconvert() and H5Ewalk2(). + * + * \note Exiting the routine in its normal fashion allows the HDF5 + * C library to clean up its work properly. In other words, if + * the C++ application jumps out of the routine back to the C++ + * “catch” statement, the library is not given the opportunity + * to close any temporary data structures that were set up when + * the routine was called. The C++ application should save some + * state as the routine is started so that any problem that occurs + * might be diagnosed. + * + * \since 1.10.3 + * + */ +H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields, hid_t lapl_id); -H5_DLL herr_t H5Oclose(hid_t object_id); -H5_DLL herr_t H5Oflush(hid_t obj_id); -H5_DLL herr_t H5Orefresh(hid_t oid); -H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); -H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); -H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Closes an object in an HDF5 file + * + * \obj_id{object_id} + * + * \return \herr_t + * + * \details H5Oclose() closes the group, dataset, or named datatype specified by + * object_id. + * + * This function is the companion to H5Oopen(), and has the same + * effect as calling H5Gclose(), H5Dclose(), or H5Tclose(). + * + * H5Oclose() is not used to close a dataspace, attribute, property + * list, or file. + * + * \version 1.8.8 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Oclose(hid_t object_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Flushes all buffers associated with an HDF5 object to disk + * + * \fgdta_loc_obj_id{obj_id} + * + * \return \herr_t + * + * \details H5Oflush() causes all buffers associated with an object to be immediately + * flushed to disk without removing the data from the cache. + * + * The object associated with \p object_id can be any named object in an + * HDF5 file including a dataset, a group, or a committed datatype. + * + * \note HDF5 does not possess full control over buffering. H5Oflush() + * flushes the internal HDF5 buffers and then asks the operating + * system (the OS) to flush the system buffers for the open + * files. After that, the OS is responsible for ensuring that + * the data is actually flushed to disk. + * + * \par See Also: + * - H5Dflush() + * - H5Drefresh() + * - H5Oflush() + * - H5Grefresh() + * - H5Oflush() + * - H5Orefresh() + * - H5Tflush() + * - H5Trefresh() + * \par + * - \c H5DOappend() + * - H5Fstart_swmr_write() + * - H5Pget_append_flush() + * - H5Pget_object_flush_cb() + * - H5Pset_append_flush() + * - H5Pset_object_flush_cb() + * \par + * - H5Oare_mdc_flushes_disabled() + * - H5Odisable_mdc_flushes() + * - H5Oenable_mdc_flushes() + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Oflush(hid_t obj_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Refreshes all buffers associated with an HDF5 object + * + * \fgdta_loc_obj_id{oid} + * + * \return \herr_t + * + * \details H5Orefresh() causes all buffers associated with an object to be cleared + * and immediately re-loaded with updated contents from disk. + * + * This function essentially closes the object, evicts all + * metadata associated with it from the cache, and then re-opens + * the object. The reopened object is automatically re-registered + * with the same identifier. + * + * The object associated with \p oid can be any named object in an + * HDF5 file including a dataset, a group, or a committed datatype. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Orefresh(hid_t oid); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Prevents metadata entries for an HDF5 object from being flushed + * from the metadata cache to storage + * + * \param[in] object_id Identifier of the object that will have flushes disabled; + * may be a group, named datatype, or dataset identifier + * + * \return \herr_t + * + * \details H5Odisable_mdc_flushes(), H5Oenable_mdc_flushes() and associated flush + * functions can be used to control the flushing of entries from + * a file’s metadata cache. + * + * This function prevents an object’s or cache’s dirty metadata + * entries from being flushed from the cache by the usual cache + * eviction/flush policy. Instead, users must manually flush the + * cache or entries for individual objects via the appropriate + * H5Fflush(), H5Dflush(), H5Gflush(), H5Tflush(), and H5Oflush() calls. + * + * Metadata cache entries can be controlled at both the individual + * HDF5 object level (datasets, groups, committed datatypes) + * and the entire metadata cache level. + * + * \note HDF5 objects include datasets, groups, and committed datatypes. + * Only #hid_t identifiers that represent these objects can be passed to the function. + * \note Passing in a #hid_t identifier that represents any other HDF5 entity is + * considered an error. + * \note It is an error to pass an HDF5 file identifier + * (obtained from H5Fopen() or H5Fcreate()) + * to this function. + * \note Misuse of this function can cause the cache to exhaust + * available memory. + * \note Objects can be returned to the default automatic flush behavior + * with H5Oenable_mdc_flushes(). + * \note Flush prevention only pertains to new or dirty metadata entries. + * Clean entries can be evicted from the cache. + * \note Calling this function on an object that has already had flushes + * disabled will return an error. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Enables flushing of dirty metadata entries from a file’s metadata cache + * + * \param[in] object_id Identifier of the object that will have flushes re-enabled; + * may be a group, named datatype, or dataset identifier + * + * \return \herr_t + * + * \details H5Oenable_mdc_flushes(), H5Odisable_mdc_flushes() + * and associated flush functions can be used to control the flushing + * of entries from a file’s metadata cache. + * + * This function allows an object or cache’s dirty metadata entries to be + * flushed from the cache by the usual cache eviction/flush policy. + * + * Metadata cache entries can be controlled at both the individual HDF5 + * object level (datasets, groups, committed datatypes) and the entire + * metadata cache level. + * + * + * \note HDF5 objects include datasets, groups, and committed datatypes. + * Only #hid_t identifiers that represent these objects can be + * passed to the function. + * + * \note Passing in a #hid_t identifier that represents any other HDF5 entity + * is considered an error. + * + * \note It is an error to pass an HDF5 file identifier + * (obtained from H5Fopen() or H5Fcreate()) + * to this function. + * + * \note Using this function on an object that has not had flushes disabled + * is considered an error. The state of an object can be determined + * with H5Oare_mdc_flushes_disabled(). + * + * \note An object will be returned to the default flush algorithm when it is closed. + * + * \note All objects will be returned to the default flush algorithm when + * the file is closed. + * + * \note An object’s entries will not necessarily be flushed as a result of + * calling this function. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves comment for specified object + * + * \param[in] object_id Identifier of an object in the cache; + * may be a group, named datatype, or dataset identifier + * \param[out] are_disabled Flushes enabled/disabled + * + * \return \p are_disabled will be set to \c 1 if an object has had flushes disabled + * and \c 0 if it has not had flushes disabled. + * \return \herr_t + * + * \details H5Oare_mdc_flushes_disabled() determines if an HDF5 object (dataset, group, committed + * datatype) has had flushes of metadata entries disabled. + * + * The H5Oenable_mdc_flushes(), H5Odisable_mdc_flushes() and + * associated flush functions can be used to control the flushing of + * entries from a file’s metadata cache. Metadata cache entries can be controlled + * at both the individual HDF5 object level (datasets, groups, + * committed datatypes) and the entire metadata cache level. + * + * \note HDF5 objects include datasets, groups, and committed datatypes. + * Only #hid_t identifiers that represent these objects can be passed to the function. + * \note Passing in a #hid_t identifier that represents any other HDF5 entity is + * considered an error. + * \note It is an error to pass an HDF5 file identifier + * (obtained from H5Fopen() or H5Fcreate()) to this function. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); /* Future function prototypes to be deprecated in next version */ +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object specified by an identifier + * + * \fgdta_loc_obj_id{loc_id} + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * + * \return \herr_t + * + * \details H5Oget_info specifies an object by its identifier, \p loc_id , and + * retrieves the metadata describing that object in \p oinfo , an H5O_info_t \c struct. + * This \c struct type is described in H5Oget_info(). + * + * The \p fields parameter contains flags to determine which fields will be filled in + * the H5O_info_t \c struct returned in \p oinfo. + * These flags are defined in the H5Opublic.h file: + * + * \obj_info_fields + * + * \note If you are iterating through a lot of different objects to + * retrieve information via the H5Oget_info() family of routines, + * you may see memory building up. This can be due to memory + * allocation for metadata such as object headers and messages + * when the iterated objects are put into the metadata cache. + * \note + * If the memory buildup is not desirable, you can configure a + * smaller cache via H5Fset_mdc_config() or set the file access + * property list via H5Pset_mdc_config(). A smaller sized cache + * will force metadata entries to be evicted from the cache, + * thus freeing the memory associated with the entries. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by location and relative name + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Name of group, relative to \p loc_id + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_name() specifies an object’s location and name, \p loc_id and + * \p name, respectively, and retrieves the metadata describing + * that object in \p oinfo, an H5O_info1_t \c struct. + * + * The \c struct H5O_info_t is defined in H5Opublic.h and described + * in the H5Oget_info() function entry. + * + * The \p fields parameter contains flags to determine which fields + * will be filled in in the H5O_info_t \c struct returned in + * \p oinfo. These flags are defined in the H5Opublic.h file: + * + * \obj_info_fields + * + * The link access property list, \p lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by an index position + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] group_name Name of group in which object is located + * \idx_type + * \order + * \param[in] n Position within the index + * \param[out] oinfo Buffer in which to return object information + * \param[in] fields Flags specifying the fields to include in \p oinfo + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_idx() retrieves the metadata describing an + * object in the \c struct \p oinfo, as specified by the location, + * \p loc_id, group name, \p group_name, the index by which objects + * in that group are tracked, \p idx_type, the order by which the + * index is to be traversed, \p order, and an object’s position + * \p n within that index. + * + * \p oinfo, in which the object information is returned, is a \c struct of + * type H5O_info1_t. This and other \c struct types used + * by H5Oget_info_by_idx() are described in H5Oget_info_by_idx1(). + * + * If \p loc_id fully specifies the group in which the object resides, + * i\p group_name can be a dot (\c .). + * + * The \p fields parameter contains flags to determine which fields will be + * filled in the H5O_info_t \c struct returned in \p oinfo. + * These flags are defined in the H5Opublic.h file: + * \obj_info_fields + * + * The link access property list, \c lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \since 1.10.3 + * + */ H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); @@ -210,14 +1605,442 @@ H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id); -/* Compatibility function prototypes to replace non-versioned function for use by macro in next version */ +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object specified by an identifier + * + * \fgdta_loc_obj_id{loc_id} + * \param[out] oinfo Buffer in which to return object information + * + * \return \herr_t + * + * \details H5Oget_info1() specifies an object by its identifier, \p loc_id , and + * retrieves the metadata describing that object in \p oinfo , + * defined as a \c struct of type H5O_info1_t : + * + * \snippet this H5O_info1_t_snip + * + * Note the following about H5O_info1_t : + * - Of the four time fields (\c atime, \c mtime, \c ctime, and \c btime) + * only \c ctime has been implemented. + * - The \c atime value is the last time the object was read or written. + * - The \c mtime value is the last time the raw data in the object was changed. + * - The \c ctime value is the last time the metadata for the object was changed. + * - The \c btime value is the time the object was created. + * - The fields nested in the \c meta_size field are for internal library use only. + * + * The #H5O_type_t \c enum indicates the object type and + * is defined in H5Opublic.h as follows: + * \snippet this H5O_type_t_snip + * + * Note that the object retrieved as indicated by \p loc_id + * refers only to the types specified by #H5O_type_t. + * + * An H5O_hdr_info_t \c struct holds object header metadata and is + * defined in H5Opublic.h as follows: + * \snippet this H5O_hdr_info_t_snip + * + * Valid values for the \c version field are \c H5O_VERSION_1 and \c H5O_VERSION_2. + * Version 2 of the object header is smaller and more efficient than version 1. + * + * Please be aware that the information held by H5O_hdr_info_t may only be useful to + * developers with extensive HDF5 experience. + * + * \note If you are iterating through a lot of different objects to + * retrieve information via the H5Oget_info() family of routines, + * you may see memory building up. This can be due to memory + * allocation for metadata such as object headers and messages + * when the iterated objects are put into the metadata cache. + * \note + * If the memory buildup is not desirable, you can configure a + * smaller cache via H5Fset_mdc_config() or set the file access + * property list via H5Pset_mdc_config(). A smaller sized cache + * will force metadata entries to be evicted from the cache, + * thus freeing the memory associated with the entries. + * + * \version 1.10.5 The macro #H5Oget_info was removed and the function + * H5Oget_info1() was copied to H5Oget_info(). + * \version 1.10.3 Function H5Oget_info() was copied to H5Oget_info1(), + * and the macro #H5Oget_info was created. + * \version 1.8.15 Added a note about the valid values for the \c version + * field in the H5O_hdr_info_t structure. + * \version 1.8.11 Fortran subroutine introduced in this release. + * \version 1.8.10 Added #H5O_type_t structure to the Description section. \n + * Separated H5O_hdr_info_t structure from #H5O_info_t in the + * Description section. \n + * Clarified the definition and implementation of the time fields. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by location and relative name + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] name Name of group, relative to \p loc_id + * \param[out] oinfo Buffer in which to return object information + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_name1() specifies an object’s location and name, \p loc_id + * and \p name, respectively, and retrieves the metadata describing that object + * in \p oinfo, an H5O_info1_t \c struct. + * + * The \c struct H5O_info1_t is defined in H5Opublic.h and described + * in the H5Oget_info1() function entry. + * + * The link access property list, \p lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \version 1.10.5 The macro #H5Oget_info_by_name was removed and the function + * H5Oget_info_by_name1() was copied to H5Oget_info_by_name(). + * \version 1.10.3 Function H5Oget_info_by_name() was copied to H5Oget_info_by_name1() + * and the macro #H5Oget_info_by_name was created. + * \version 1.8.8 Fortran 2003 subroutine and \c h5o_info_t derived type introduced + * in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Retrieves the metadata for an object, identifying the object + * by an index position + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] group_name Name of group in which object is located + * \idx_type + * \order + * \param[in] n Position within the index + * \param[out] oinfo Buffer in which to return object information + * \lapl_id + * + * \return \herr_t + * + * \details H5Oget_info_by_idx1() retrieves the metadata describing an + * object in the \c struct \p oinfo, as specified by the location, + * \p loc_id, group name, \p group_name, the index by which objects + * in that group are tracked, \p idx_type, the order by which the + * index is to be traversed, \p order, and an object’s position + * \p n within that index. + * + * If \p loc_id fully specifies the group in which the object resides, + * \p group_name can be a dot (\c .). + * + * \p idx_type is of type #H5_index_t, defined in H5public.h as: + * \snippet H5public.h H5_index_t_snip + * + * \p order is of type #H5_iter_order_t defined in H5public.h as: + * \snippet H5public.h H5_iter_order_t_snip + * + * \p oinfo, in which the object information is returned, is a \c struct of + * type H5O_info1_t . + * \snippet this H5O_info1_t_snip + * + * The link access property list, \c lapl_id, is not currently used; + * it should be passed in as #H5P_DEFAULT. + * + * \version 1.10.5 The macro #H5Oget_info_by_idx was removed and the function + * H5Oget_info_by_idx() was copied to H5Oget_info_by_idx1(). + * \version 1.10.3 Function H5Oget_info_by_idx() was copied to H5Oget_info_by_idx1() + * and the macro #H5Oget_info_by_idx was created. + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Recursively visits all objects accessible from a specified object + * + * \fgdta_loc_obj_id{obj_id} + * \idx_type + * \order + * \param[in] op Callback function passing data regarding the object + * to the calling application + * \param[in] op_data User-defined pointer to data required by the application + * for its processing of the object + * + * \return On success, returns the return value of the first operator + * that returns a positive value, or zero if all members were + * processed with no operator returning non-zero. + * + * \return On failure, returns a negative value if something goes wrong + * within the library, or the first negative value returned by + * an operator. + * + * \details H5Ovisit1() is a recursive iteration function to visit the + * object \p obj_id and, if \p obj_id is a group, all objects in + * and below it in an HDF5 file, thus providing a mechanism for + * an application to perform a common set of operations across all + * of those objects or a dynamically selected subset. For + * non-recursive iteration across the members of a group, + * see H5Literate1(). + * + * If \p obj_id is a group identifier, that group serves as the + * root of a recursive iteration. If \p obj_id is a file identifier, + * that file’s root group serves as the root of the recursive + * iteration. If \p obj_id is an attribute identifier, + * then the object where the attribute is attached will be iterated. + * If \p obj_id is any other type of object, such as a dataset or + * named datatype, there is no iteration. + * + * Two parameters are used to establish the iteration: \p idx_type + * and \p order. + * + * \p idx_type specifies the index to be used. If the links in + * a group have not been indexed by the index type, they will + * first be sorted by that index then the iteration will begin; + * if the links have been so indexed, the sorting step will be + * unnecessary, so the iteration may begin more quickly. Valid + * values include the following: + * + * \indexes + * + * Note that the index type passed in \p idx_type is a + * best effort setting. If the application passes in + * a value indicating iteration in creation order and a group is + * encountered that was not tracked in creation order, that group + * will be iterated over in alpha-numeric order by name, or + * name order. (Name order is the native order + * used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include + * the following: + * + * \orders + * + * The prototype of the callback function op is as follows (as + * defined in the source code file H5Opublic.h): + * + * \snippet this H5O_iterate1_t_snip + * + * The parameters of this callback function have the following values + * or meanings: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \c objObject that serves as root of the iteration; + * same value as the H5Ovisit1() \p obj_id parameter
    \c nameName of object, relative to \c obj, being examined at + * current step of the iteration
    \c infoH5O_info1_t \c struct containing information + * regarding that object
    \c op_dataUser-defined pointer to data required by the application in + * processing the object
    + * + * The H5O_info1_t \c struct is defined in H5Opublic.h: + * \snippet this H5O_info1_t_snip + * + * The return values from an operator are: + * - Zero causes the visit iterator to continue, returning zero when all + * group members have been processed. + * - A positive value causes the visit iterator to immediately return that + * positive value, indicating short-circuit success. + * - A negative value causes the visit iterator to immediately return that + * value, indicating failure. + * + * The H5Ovisit1() \p op_data parameter is a user-defined pointer to the data + * required to process objects in the course of the iteration. This pointer + * is passed back to each step of the iteration in the callback + * function’s \p op_data parameter. + * + * H5Lvisit1() and H5Ovisit1() are companion functions: one for + * examining and operating on links; the other for examining + * and operating on the objects that those links point to. Both + * functions ensure that by the time the function completes + * successfully, every link or object below the specified point + * in the file has been presented to the application for whatever + * processing the application requires. These functions assume + * that the membership of the group being iterated over remains + * unchanged through the iteration; if any of the links in the + * group change during the iteration, the resulting behavior + * is undefined. + * + * \note \Bold{Programming Note for C++ Developers Using C Functions:} + * \note If a C routine that takes a function pointer as an argument is + * called from within C++ code, the C routine should be returned + * from normally. + * + * \note Examples of this kind of routine include callbacks such as + * H5Pset_elink_cb() and H5Pset_type_conv_cb() and + * functions such as H5Tconvert() and H5Ewalk2(). + * + * \note Exiting the routine in its normal fashion allows the HDF5 + * C library to clean up its work properly. In other words, if + * the C++ application jumps out of the routine back to the C++ + * “catch” statement, the library is not given the opportunity + * to close any temporary data structures that were set up when + * the routine was called. The C++ application should save some + * state as the routine is started so that any problem that occurs + * might be diagnosed. + * + * \version 1.10.5 The macro #H5Ovisit was removed and the function + * H5Ovisit1() was copied to H5Ovisit(). + * \version 1.10.3 Function H5Ovisit() was copied to H5Ovisit1(), + * and the macro #H5Ovisit was created. + * \version 1.8.8 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Ovisit1(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data); + +/** + *------------------------------------------------------------------------- + * \ingroup H5O + * + * \brief Recursively visits all objects starting from a specified object + * + * \fgdta_loc_obj_id{loc_id} + * \param[in] obj_name Name of the object, generally relative to + * \p loc_id, that will serve as root of the iteration + * \idx_type + * \order + * \param[in] op Callback function passing data regarding the object + * to the calling application + * \param[in] op_data User-defined pointer to data required by the application + * for its processing of the object + * \lapl_id + * + * \return On success, returns the return value of the first operator + * that returns a positive value, or zero if all members were + * processed with no operator returning non-zero. + * + * \return On failure, returns a negative value if something goes wrong + * within the library, or the first negative value returned by + * an operator. + * + * \details H5Ovisit_by_name1() is a recursive iteration function to visit + * the object specified by the \p loc_id / \p obj_name parameter + * pair and, if that object is a group, all objects in and below it + * in an HDF5 file, thus providing a mechanism for an application to + * perform a common set of operations across all of those objects or + * a dynamically selected subset. For non-recursive iteration across + * the members of a group, see H5Literate1(). + * + * The object serving as the root of the iteration is specified + * by the \p loc_id / \p obj_name parameter pair. \p loc_id specifies + * a file or an object in a file; if \p loc_id is an attribute identifier, + * the object where the attribute is attached will be used. + * \p obj_name specifies either an object in the file (with an absolute + * name based in the file’s root group) or an object name relative + * to \p loc_id. If \p loc_id fully specifies the object that is to serve + * as the root of the iteration, \p obj_name should be '\c .' (a dot). + * (Note that when \p loc_id fully specifies the object that is to serve + * as the root of the iteration, the user may wish to consider + * using H5Ovisit1() instead of H5Ovisit_by_name1().) + * + * Two parameters are used to establish the iteration: \p idx_type + * and \p order. + * + * \p idx_type specifies the index to be used. If the links in + * a group have not been indexed by the index type, they will + * first be sorted by that index then the iteration will begin; + * if the links have been so indexed, the sorting step will be + * unnecessary, so the iteration may begin more quickly. Valid + * values include the following: + * + * \indexes + * + * Note that the index type passed in \p idx_type is a + * best effort setting. If the application passes in a + * value indicating iteration in creation order and a group is + * encountered that was not tracked in creation order, that group + * will be iterated over in alpha-numeric order by name, or + * name order. (Name order is the native order + * used by the HDF5 library and is always available.) + * + * \p order specifies the order in which objects are to be inspected + * along the index specified in \p idx_type. Valid values include + * the following: + * + * \orders + * + * The \p op callback function and the effect of the callback + * function’s return value on the application are described + * in H5Ovisit1(). + * + * The H5O_info1_t \c struct is defined in H5Opublic.h + * and described in the H5Oget_info1() function entry. + * + * The H5Ovisit_by_name1() \p op_data parameter is a user-defined + * pointer to the data required to process objects in the course + * of the iteration. This pointer is passed back to each step of + * the iteration in the callback function’s \p op_data parameter. + * + * \p lapl_id is a link access property list. In the general case, + * when default link access properties are acceptable, this can + * be passed in as #H5P_DEFAULT. An example of a situation that + * requires a non-default link access property list is when + * the link is an external link; an external link may require + * that a link prefix be set in a link access property list + * (see H5Pset_elink_prefix()). + * + * H5Lvisit_by_name1() and H5Ovisit_by_name1() are companion + * functions: one for examining and operating on links; the other + * for examining and operating on the objects that those links point to. + * Both functions ensure that by the time the function completes + * successfully, every link or object below the specified point + * in the file has been presented to the application for whatever + * processing the application requires. + * + * \note \Bold{Programming Note for C++ Developers Using C Functions:} + * \note If a C routine that takes a function pointer as an argument is + * called from within C++ code, the C routine should be returned + * from normally. + * + * \note Examples of this kind of routine include callbacks such as + * H5Pset_elink_cb() and H5Pset_type_conv_cb() and + * functions such as H5Tconvert() and H5Ewalk2(). + * + * \note Exiting the routine in its normal fashion allows the HDF5 + * C library to clean up its work properly. In other words, if + * the C++ application jumps out of the routine back to the C++ + * “catch” statement, the library is not given the opportunity + * to close any temporary data structures that were set up when + * the routine was called. The C++ application should save some + * state as the routine is started so that any problem that occurs + * might be diagnosed. + * + * \version 1.10.5 The macro #H5Ovisit_by_name was removed and the function + * H5Ovisit_by_name1() was copied to #H5Ovisit_by_name. + * \version 1.10.3 The H5Ovisit_by_name() function was renamed to H5Ovisit_by_name1(), + * and the macro #H5Ovisit_by_name was created. + * \version 1.8.11 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id); @@ -231,13 +2054,18 @@ H5_DLL herr_t H5Ovisit_by_name1(hid_t loc_id, const char *obj_name, H5_index_t i /* Typedefs */ -/* A struct that's part of the H5G_stat_t structure (deprecated) */ +//! +/** + * A struct that's part of the \ref H5G_stat_t structure + * \deprecated + */ typedef struct H5O_stat_t { - hsize_t size; /* Total size of object header in file */ - hsize_t free; /* Free space within object header */ - unsigned nmesgs; /* Number of object header messages */ - unsigned nchunks; /* Number of object header chunks */ + hsize_t size; /**< Total size of object header in file */ + hsize_t free; /**< Free space within object header */ + unsigned nmesgs; /**< Number of object header messages */ + unsigned nchunks; /**< Number of object header chunks */ } H5O_stat_t; +//! /* Function prototypes */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5PLmodule.h b/src/H5PLmodule.h index 0a08cca9e6c..ab9f1d5ff89 100644 --- a/src/H5PLmodule.h +++ b/src/H5PLmodule.h @@ -27,4 +27,9 @@ #define H5_MY_PKG_ERR H5E_PLUGIN #define H5_MY_PKG_INIT YES +/**\defgroup H5PL H5PL + * \brief Plugins + * \todo Describe what programmatically controlling dynamically loaded plugins (H5PL) is all about + */ + #endif /* H5PLmodule_H */ diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index ded2dc541dd..9014131c9da 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -28,12 +28,16 @@ */ #define H5PL_NO_PLUGIN "::" -/* Plugin type used by the plugin library */ +//! +/** + * Plugin type (bit-position) used by the plugin library + */ typedef enum H5PL_type_t { - H5PL_TYPE_ERROR = -1, /* Error */ - H5PL_TYPE_FILTER = 0, /* Filter */ - H5PL_TYPE_NONE = 1 /* This must be last! */ + H5PL_TYPE_ERROR = -1, /**< Error */ + H5PL_TYPE_FILTER = 0, /**< Filter */ + H5PL_TYPE_NONE = 1 /**< This must be last! */ } H5PL_type_t; +//! /* Common dynamic plugin type flags used by the set/get_loading_state functions */ #define H5PL_FILTER_PLUGIN 0x0001 @@ -44,15 +48,175 @@ extern "C" { #endif /* plugin state */ -H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_control_mask); -H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_control_mask /*out*/); -H5_DLL herr_t H5PLappend(const char *search_path); -H5_DLL herr_t H5PLprepend(const char *search_path); -H5_DLL herr_t H5PLreplace(const char *search_path, unsigned int index); -H5_DLL herr_t H5PLinsert(const char *search_path, unsigned int index); -H5_DLL herr_t H5PLremove(unsigned int index); +/** + * \ingroup H5PL + * \brief Controls the loadability of dynamic plugin types + * + * \param[in] plugin_control_mask The list of dynamic plugin types to enable or disable.\n + * A plugin bit set to 0 (zero) prevents use of that dynamic plugin.\n + * A plugin bit set to 1 (one) enables use of that dynamic plugin.\n + * Setting \p plugin_control_mask to a negative value enables all dynamic + * plugin types.\n + * Setting \p plugin_control_mask to 0 (zero) disables all dynamic plugin\n + * types. + * \return \herr_t + * + * \details H5PLset_loading_state() uses one argument to enable or disable individual plugin types. + * + * \details The \p plugin_control_mask parameter is an encoded integer in which each bit controls a specific + * plugin type. Bit positions allocated to date are specified in \ref H5PL_type_t as follows: + * \snippet this H5PL_type_t_snip + * + * A plugin bit set to 0 (zero) prevents the use of the dynamic plugin type corresponding to that bit + * position. A plugin bit set to 1 (one) allows the use of that dynamic plugin type. + * + * All dynamic plugin types can be enabled by setting \p plugin_control_mask to a negative value. A + * value of 0 (zero) will disable all dynamic plugin types. + * + * The loading of external dynamic plugins can be controlled during runtime with an environment + * variable, \c HDF5_PLUGIN_PRELOAD. H5PLset_loading_state() inspects the \c HDF5_PLUGIN_PRELOAD + * environment variable every time it is called. If the environment variable is set to the special + * \c :: string, all dynamic plugins are disabled. + * + * \warning The environment variable \c HDF5_PLUGIN_PRELOAD controls the loading of dynamic plugin types at + * runtime. If it is set to disable all plugin types, then it will disable them for \Emph{all} + * running programs that access the same variable instance. + * + * \since 1.8.15 + * + */ +H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_control_mask); +/** + * \ingroup H5PL + * \brief Queries the loadability of dynamic plugin types + * + * \param[out] plugin_control_mask List of dynamic plugin types that are enabled or disabled.\n + * A plugin bit set to 0 (zero) indicates that that the dynamic plugin type is + * disabled.\n + * A plugin bit set to 1 (one) indicates that that the dynamic plugin type is + * enabled.\n + * If the value of \p plugin_control_mask is negative, all dynamic plugin + * types are enabled.\n + * If the value of \p plugin_control_mask is 0 (zero), all dynamic plugins + * are disabled. + * \return \herr_t + * + * \details H5PLget_loading_state() retrieves the bitmask that controls whether a certain type of plugins + * (e.g.: filters, VOL drivers) will be loaded by the HDF5 library. + * + * Bit positions allocated to date are specified in \ref H5PL_type_t as follows: + * \snippet this H5PL_type_t_snip + * + * \since 1.8.15 + * + */ +H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_control_mask /*out*/); +/** + * \ingroup H5PL + * \brief Inserts a plugin path at the end of the plugin search path list + * + * \param[in] search_path A plugin path + * \return \herr_t + * + * \details H5PLappend() inserts a plugin path at the end of the plugin search path list. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLappend(const char *search_path); +/** + * \ingroup H5PL + * \brief Inserts a plugin path at the beginning of the plugin search path list + * + * \param[in] search_path A plugin path + * \return \herr_t + * + * \details H5PLprepend() inserts a plugin path at the end of the plugin search path list. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLprepend(const char *search_path); +/** + * \ingroup H5PL + * \brief Replaces the path at the specified index in the plugin search path list + * + * \param[in] search_path A plugin path + * \param[in] index Index + * \return \herr_t + * + * \details H5PLreplace() replaces a plugin path at the specified index in the plugin search path list. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLreplace(const char *search_path, unsigned int index); +/** + * \ingroup H5PL + * \brief Inserts a path at the specified index in the plugin search path list + * + * \param[in] search_path A plugin path + * \param[in] index Index + * \return \herr_t + * + * \details H5PLinsert() inserts a plugin path at the specified index in the plugin search path list, + * moving other paths after \p index. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLinsert(const char *search_path, unsigned int index); +/** + * \ingroup H5PL + * \brief Removes a plugin path at a specified index from the plugin search path list + * + * \param[in] index Index + * \return \herr_t + * + * \details H5PLremove() removes a plugin path at the specified \p index and compacts the plugin search path + * list. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLremove(unsigned int index); +/** + * \ingroup H5PL + * \brief Queries the plugin search path list at the specified index + * + * \param[in] index Index + * \param[out] path_buf Pathname + * \param[in] buf_size Size of \p path_buf + * \return Returns the length of the path, a non-negative value, if successful; otherwise returns a negative + * value. + * + * \details H5PLget() queries the plugin path at a specified index. If \p path_buf is non-NULL then it writes + * up to \p buf_size bytes into that buffer and always returns the length of the path name. + * + * If \p path_buf is NULL, this function will simply return the number of characters required to + * store the path name, ignoring \p path_buf and \p buf_size. + * + * If an error occurs then the buffer pointed to by \p path_buf (NULL or non-NULL) is unchanged and + * the function returns a negative value. If a zero is returned for the name's length, then there is + * no path name associated with the index. and the \p path_buf buffer will be unchanged. + * + * \since 1.10.1 + * + */ H5_DLL ssize_t H5PLget(unsigned int index, char *path_buf /*out*/, size_t buf_size); -H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/); +/** + * \ingroup H5PL + * \brief Retrieves the number of stored plugin paths + * + * \param[out] num_paths Current length of the plugin search path list + * \return \herr_t + * + * \details H5PLsize() retrieves the number of paths stored in the plugin search path list. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5PLsize(unsigned int *num_paths /*out*/); #ifdef __cplusplus } diff --git a/src/H5Pmodule.h b/src/H5Pmodule.h index 73f60095dfc..18f30c682ed 100644 --- a/src/H5Pmodule.h +++ b/src/H5Pmodule.h @@ -29,4 +29,50 @@ #define H5_MY_PKG_ERR H5E_PLIST #define H5_MY_PKG_INIT YES +/**\defgroup H5P H5P + * \brief Property List Interface + * + * \details The HDF5 Property List Interface provides a mechanism to take + * advantage of more powerful or unusual features in HDF5. + * + * HDF5 objects have properties or characteristics associated with + * them, and there are default properties that handle the most + * common needs. These default properties can be modified using the + * HDF5 Property List Interface. For example, the data storage + * layout property of a dataset is contiguous by default. For better + * performance, the layout can be modified to be chunked or chunked + * and compressed. + * + * \todo Describe concisely what the functions in this module are about. + * + * \defgroup GPLO General Property List Operations + * \ingroup H5P + * \defgroup GPLOA General Property List Operations (Advanced) + * \ingroup H5P + * \defgroup FCPL File Creation Properties + * \ingroup H5P + * \defgroup FAPL File Access Properties + * \ingroup H5P + * \defgroup GCPL Group Creation Properties + * \ingroup H5P + * \defgroup ALCAPL Attribute and Link Creation Properties + * \ingroup H5P + * \defgroup LAPL Link Access Properties + * \ingroup H5P + * \defgroup DCPL Dataset Creation Properties + * \ingroup H5P + * \defgroup DAPL Dataset Access Properties + * \ingroup H5P + * \defgroup DXPL Dataset Transfer Properties + * \ingroup H5P + * \defgroup OCPL Object Creation Properties + * \ingroup H5P + * \defgroup OCPPL Object Copy Properties + * \ingroup H5P + * \defgroup GACPL General Access Properties + * \ingroup H5P + * \defgroup MAPL Map Access Properties + * \ingroup H5P + */ + #endif /* H5Pmodule_H */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 3ece6c3bbdf..fea8a39d41b 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -103,68 +103,142 @@ extern "C" { /*******************/ /* Define property list class callback function pointer types */ +//! typedef herr_t (*H5P_cls_create_func_t)(hid_t prop_id, void *create_data); +//! + +//! typedef herr_t (*H5P_cls_copy_func_t)(hid_t new_prop_id, hid_t old_prop_id, void *copy_data); +//! + +//! typedef herr_t (*H5P_cls_close_func_t)(hid_t prop_id, void *close_data); +//! /* Define property list callback function pointer types */ +//! +/** + * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1() + * + * \param[in] name The name of the property + * \param[in] size The size of the property in bytes + * \param[in,out] value The value for the property + * \return \herr_t + * + * \details The H5P_prp_cb1_t() describes the parameters used by the + * property create,copy and close callback functions. + */ typedef herr_t (*H5P_prp_cb1_t)(const char *name, size_t size, void *value); +//! + +//! +/** + * \brief Callback function for H5Pregister2(),H5Pregister1(),H5Pinsert2(),H5Pinsert1() + * + * \plist_id{prop_id} + * \param[in] name The name of the property + * \param[in] size The size of the property in bytes + * \param[in] value The value for the property + * \return \herr_t + * + * \details The H5P_prp_cb2_t() describes the parameters used by the + * property set ,copy and delete callback functions. + */ typedef herr_t (*H5P_prp_cb2_t)(hid_t prop_id, const char *name, size_t size, void *value); +//! + typedef H5P_prp_cb1_t H5P_prp_create_func_t; typedef H5P_prp_cb2_t H5P_prp_set_func_t; typedef H5P_prp_cb2_t H5P_prp_get_func_t; typedef H5P_prp_cb2_t H5P_prp_delete_func_t; typedef H5P_prp_cb1_t H5P_prp_copy_func_t; + +//! typedef int (*H5P_prp_compare_func_t)(const void *value1, const void *value2, size_t size); +//! + typedef H5P_prp_cb1_t H5P_prp_close_func_t; /* Define property list iteration function type */ +//! typedef herr_t (*H5P_iterate_t)(hid_t id, const char *name, void *iter_data); +//! -/* Actual IO mode property */ +//! +/** + * Actual IO mode property + * + * \details The default value, #H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all + * I/O operations that do not use chunk optimizations, including + * non-collective I/O and contiguous collective I/O. + */ typedef enum H5D_mpio_actual_chunk_opt_mode_t { - /* The default value, H5D_MPIO_NO_CHUNK_OPTIMIZATION, is used for all I/O - * operations that do not use chunk optimizations, including non-collective - * I/O and contiguous collective I/O. - */ H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0, + /**< No chunk optimization was performed. Either no collective I/O was + attempted or the dataset wasn't chunked. */ H5D_MPIO_LINK_CHUNK, + /**< Collective I/O is performed on all chunks simultaneously. */ H5D_MPIO_MULTI_CHUNK + /**< Each chunk was individually assigned collective or independent I/O based + on what fraction of processes access the chunk. If the fraction is greater + than the multi chunk ratio threshold, collective I/O is performed on that + chunk. The multi chunk ratio threshold can be set using + H5Pset_dxpl_mpio_chunk_opt_ratio(). The default value is 60%. */ } H5D_mpio_actual_chunk_opt_mode_t; +//! +//! +/** + * The following values are conveniently defined as a bit field so that + * we can switch from the default to independent or collective and then to + * mixed without having to check the original value. + */ typedef enum H5D_mpio_actual_io_mode_t { - /* The following four values are conveniently defined as a bit field so that - * we can switch from the default to independent or collective and then to - * mixed without having to check the original value. - * - * NO_COLLECTIVE means that either collective I/O wasn't requested or that - * no I/O took place. - * - * CHUNK_INDEPENDENT means that collective I/O was requested, but the - * chunk optimization scheme chose independent I/O for each chunk. - */ - H5D_MPIO_NO_COLLECTIVE = 0x0, + H5D_MPIO_NO_COLLECTIVE = 0x0, + /**< No collective I/O was performed. Collective I/O was not requested or + collective I/O isn't possible on this dataset */ H5D_MPIO_CHUNK_INDEPENDENT = 0x1, - H5D_MPIO_CHUNK_COLLECTIVE = 0x2, - H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2, - - /* The contiguous case is separate from the bit field. */ + /**< HDF5 performed one the chunk collective optimization schemes and each + chunk was accessed independently */ + H5D_MPIO_CHUNK_COLLECTIVE = 0x2, + /**< HDF5 performed one the chunk collective optimization schemes and each + chunk was accessed collectively */ + H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2, + /**< HDF5 performed one the chunk collective optimization schemes and some + chunks were accessed independently, some collectively. */ + /** \internal The contiguous case is separate from the bit field. */ H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4 + /**< Collective I/O was performed on a contiguous dataset */ } H5D_mpio_actual_io_mode_t; +//! -/* Broken collective IO property */ +//! +/** + * Broken collective IO property + */ typedef enum H5D_mpio_no_collective_cause_t { - H5D_MPIO_COLLECTIVE = 0x00, - H5D_MPIO_SET_INDEPENDENT = 0x01, - H5D_MPIO_DATATYPE_CONVERSION = 0x02, - H5D_MPIO_DATA_TRANSFORMS = 0x04, - H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08, - H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, - H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20, - H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40, + H5D_MPIO_COLLECTIVE = 0x00, + /**< Collective I/O was performed successfully */ + H5D_MPIO_SET_INDEPENDENT = 0x01, + /**< Collective I/O was not performed because independent I/O was requested */ + H5D_MPIO_DATATYPE_CONVERSION = 0x02, + /**< Collective I/O was not performed because datatype conversions were required */ + H5D_MPIO_DATA_TRANSFORMS = 0x04, + /**< Collective I/O was not performed because data transforms needed to be applied */ + H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08, + /**< \todo FIXME! */ + H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, + /**< Collective I/O was not performed because one of the dataspaces was neither simple nor scalar */ + H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20, + /**< Collective I/O was not performed because the dataset was neither contiguous nor chunked */ + H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40, + /**< \todo FIXME! */ H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE = 0x80, - H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100 + /**< \todo FIXME! */ + H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100 + /**< Sentinel */ } H5D_mpio_no_collective_cause_t; +//! /********************/ /* Public Variables */ @@ -214,297 +288,9253 @@ H5_DLLVAR hid_t H5P_LST_LINK_ACCESS_ID_g; /*********************/ /* Generic property list routines */ -H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t cls_create, - void *create_data, H5P_cls_copy_func_t cls_copy, void *copy_data, - H5P_cls_close_func_t cls_close, void *close_data); -H5_DLL char * H5Pget_class_name(hid_t pclass_id); -H5_DLL hid_t H5Pcreate(hid_t cls_id); -H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, - H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, - H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, - H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, - H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, - H5P_prp_compare_func_t prp_cmp, H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value); -H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); + +/** + * \ingroup GPLO + * + * \brief Terminates access to a property list + * + * \plist_id + * + * \return \herr_t + * + * \details H5Pclose() terminates access to a property list. All property + * lists should be closed when the application is finished + * accessing them. This frees resources used by the property + * list. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pclose(hid_t plist_id); +/** + * \ingroup GPLOA + * + * \brief Closes an existing property list class + * + * \plistcls_id{plist_id} + * + * \return \herr_t + * + * \details H5Pclose_class() removes a property list class from the library. + * Existing property lists of this class will continue to exist, + * but new ones are not able to be created. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Pclose_class(hid_t plist_id); +/** + * \ingroup GPLO + * + * \brief Copies an existing property list to create a new property list + * + * \plist_id + * + * \return \hid_t{property list} + * + * \details H5Pcopy() copies an existing property list to create a new + * property list. The new property list has the same properties + * and values as the original property list. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Pcopy(hid_t plist_id); +/** + * \ingroup GPLOA + * + * \brief Copies a property from one list or class to another + * + * \param[in] dst_id Identifier of the destination property list or class + * \param[in] src_id Identifier of the source property list or class + * \param[in] name Name of the property to copy + * + * \return \herr_t + * + * \details H5Pcopy_prop() copies a property from one property list or + * class to another. + * + * If a property is copied from one class to another, all the + * property information will be first deleted from the destination + * class and then the property information will be copied from the + * source class into the destination class. + * + * If a property is copied from one list to another, the property + * will be first deleted from the destination list (generating a + * call to the close callback for the property, if one exists) + * and then the property is copied from the source list to the + * destination list (generating a call to the copy callback for + * the property, if one exists). + * + * If the property does not exist in the class or list, this + * call is equivalent to calling H5Pregister() or H5Pinsert() (for + * a class or list, as appropriate) and the create callback will + * be called in the case of the property being copied into a list + * (if such a callback exists for the property). + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name); +/** + * \ingroup GPLO + * + * \brief Creates a new property list as an instance of a property list class + * + * \plistcls_id{cls_id} + * + * \return \hid_t{property list} + * + * \details H5Pcreate() creates a new property list as an instance of + * some property list class. The new property list is initialized + * with default values for the specified class. The classes are as + * follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Class IdentifierClass NameComments
    #H5P_ATTRIBUTE_CREATEattribute createProperties for attribute creation
    #H5P_DATASET_ACCESSdataset accessProperties for dataset access
    #H5P_DATASET_CREATEdataset createProperties for dataset creation
    #H5P_DATASET_XFERdata transferProperties for raw data transfer
    #H5P_DATATYPE_ACCESSdatatype accessProperties for datatype access
    #H5P_DATATYPE_CREATEdatatype createProperties for datatype creation
    #H5P_FILE_ACCESSfile accessProperties for file access
    #H5P_FILE_CREATEfile createProperties for file creation
    #H5P_FILE_MOUNTfile mountProperties for file mounting
    #H5P_GROUP_ACCESSgroup accessProperties for group access
    #H5P_GROUP_CREATEgroup createProperties for group creation
    #H5P_LINK_ACCESSlink accessProperties governing link traversal when accessing objects
    #H5P_LINK_CREATElink createProperties governing link creation
    #H5P_OBJECT_COPYobject copyProperties governing the object copying process
    #H5P_OBJECT_CREATEobject createProperties for object creation
    #H5P_STRING_CREATEstring createProperties for character encoding when encoding strings or + * object names
    + * + * This property list must eventually be closed with H5Pclose(); + * otherwise, errors are likely to occur. + * + * \version 1.8.15 For each class, the class name returned by + * H5Pget_class_name() was added. + * The list of possible Fortran values was updated. + * \version 1.8.0 The following property list classes were added at this + * release: #H5P_DATASET_ACCESS, #H5P_GROUP_CREATE, + * #H5P_GROUP_ACCESS, #H5P_DATATYPE_CREATE, + * #H5P_DATATYPE_ACCESS, #H5P_ATTRIBUTE_CREATE + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Pcreate(hid_t cls_id); +/** + * \ingroup GPLOA + * + * \brief Creates a new property list class + * + * \plistcls_id{parent} + * \param[in] name Name of property list class to register + * \param[in] create Callback routine called when a property list is + * created + * \param[in] create_data Pointer to user-defined class create data, to be + * passed along to class create callback + * \param[in] copy Callback routine called when a property list is + * copied + * \param[in] copy_data Pointer to user-defined class copy data, to be + * passed along to class copy callback + * \param[in] close Callback routine called when a property list is + * being closed + * \param[in] close_data Pointer to user-defined class close data, to be + * passed along to class close callback + * + * \return \hid_t{property list class} + * + * \details H5Pcreate_class() registers a new property list class with the + * library. The new property list class can inherit from an + * existing property list class, \p parent, or may be derived + * from the default “empty” class, NULL. New classes with + * inherited properties from existing classes may not remove + * those existing properties, only add or remove their own class + * properties. Property list classes defined and supported in the + * HDF5 library distribution are listed and briefly described in + * H5Pcreate(). The \p create routine is called when a new property + * list of this class is being created. The #H5P_cls_create_func_t + * callback function is defined as follows: + * + * \snippet this H5P_cls_create_func_t_snip + * + * The parameters to this callback function are defined as follows: + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being created
    \Code{void * create_data}IN: User pointer to any class creation data required
    + * + * The \p create routine is called after any registered + * \p create function is called for each property value. If the + * \p create routine returns a negative value, the new list is not + * returned to the user and the property list creation routine returns + * an error value. + * + * The \p copy routine is called when an existing property + * list of this class is copied. The #H5P_cls_copy_func_t callback + * function is defined as follows: + * \snippet this H5P_cls_copy_func_t_snip + * + * The parameters to this callback function are defined as follows: + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list created by copying
    \Code{void * copy_data}IN: User pointer to any class copy data required
    + * + * The \p copy routine is called after any registered \p copy function + * is called for each property value. If the \p copy routine returns a + * negative value, the new list is not returned to the user and the + * property list \p copy routine returns an error value. + * + * The \p close routine is called when a property list of this class + * is being closed. The #H5P_cls_close_func_t callback function is + * defined as follows: + * \snippet this H5P_cls_close_func_t_snip + * + * The parameters to this callback function are defined as follows: + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being closed
    \Code{void * close_data}IN: User pointer to any class close data required
    + * + * The \p close routine is called before any registered \p close + * function is called for each property value. If the \p close routine + * returns a negative value, the property list close routine returns + * an error value but the property list is still closed. + * + * H5Pclose_class() can be used to release the property list class + * identifier returned by this function so that resources leaks will + * not develop. + * + * \since 1.4.0 + * + */ +H5_DLL hid_t H5Pcreate_class(hid_t parent, const char *name, H5P_cls_create_func_t create, void *create_data, + H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close, + void *close_data); +/** + * \ingroup GPLO + * + * \brief Decodes property list received in a binary object buffer and + * returns a new property list identifier + * + * \param[in] buf Buffer holding the encoded property list + * + * \return \hid_tv{object} + * + * \details Given a binary property list description in a buffer, H5Pdecode() + * reconstructs the HDF5 property list and returns an identifier + * for the new property list. The binary description of the property + * list is encoded by H5Pencode(). + * + * The user is responsible for passing in the correct buffer. + * + * The property list identifier returned by this function should be + * released with H5Pclose() when the identifier is no longer needed + * so that resource leaks will not develop. + * + * \note Some properties cannot be encoded and therefore will not be available + * in the decoded property list. These properties are discussed in + * H5Pencode(). + * + * \since 1.10.0 + * + */ +H5_DLL hid_t H5Pdecode(const void *buf); +/** + * \ingroup GPLO + * + * \brief Encodes the property values in a property list into a binary + * buffer + * + * \plist_id + * \param[out] buf Buffer into which the property list will be encoded. + * If the provided buffer is NULL, the size of the + * buffer required is returned through \p nalloc; the + * function does nothing more. + * \param[out] nalloc The size of the required buffer + * + * \return \herr_t + * + * \details H5Pencode() encodes the property list \p plist_id into the + * binary buffer \p buf. + * + * If the required buffer size is unknown, \p buf can be passed + * in as NULL and the function will set the required buffer size + * in \p nalloc. The buffer can then be created and the property + * list encoded with a subsequent H5Pencode() call. + * + * If the buffer passed in is not big enough to hold the encoded + * properties, the H5Pencode() call can be expected to fail with + * a segmentation fault. + * + * Properties that do not have encode callbacks will be skipped. + * There is currently no mechanism to register an encode callback for + * a user-defined property, so user-defined properties cannot currently + * be encoded. + * + * Some properties cannot be encoded, particularly properties that are + * reliant on local context. + * + * \since 1.10.0 + * + */ H5_DLL herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc); -H5_DLL hid_t H5Pdecode(const void *buf); -H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); -H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops); -H5_DLL hid_t H5Pget_class(hid_t plist_id); -H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id); -H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value); +/** + * \ingroup GPLOA + * + * \brief Compares two property lists or classes for equality + * + * \param[in] id1 First property object to be compared + * \param[in] id2 Second property object to be compared + * + * \return \htri_t + * + * \details H5Pequal() compares two property lists or classes to determine + * whether they are equal to one another. + * + * Either both \p id1 and \p id2 must be property lists or both + * must be classes; comparing a list to a class is an error. + * + * \since 1.4.0 + * + */ H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2); -H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id); -H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data); -H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name); -H5_DLL herr_t H5Premove(hid_t plist_id, const char *name); -H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name); -H5_DLL herr_t H5Pclose_class(hid_t plist_id); -H5_DLL herr_t H5Pclose(hid_t plist_id); -H5_DLL hid_t H5Pcopy(hid_t plist_id); - -/* Object creation property list (OCPL) routines */ -H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); -H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); -H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); -H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); -H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); -H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); -H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, - const unsigned int cd_values[/*cd_nelmts*/]); -H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, - const unsigned int c_values[]); -H5_DLL int H5Pget_nfilters(hid_t plist_id); -H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/, - size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, - char name[], unsigned *filter_config /*out*/); -H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, - size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, - char name[] /*out*/, unsigned *filter_config /*out*/); -H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); -H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); -H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression); -H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); - -/* File creation property list (FCPL) routines */ -H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); -H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size); -H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size); -H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*out*/); -H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk); -H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/); -H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik); -H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/); -H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes); -H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes); -H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, - unsigned min_mesg_size); -H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, - unsigned *min_mesg_size); -H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree); -H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree); -H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist, - hsize_t threshold); -H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist, - hsize_t *threshold); -H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size); -H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size); - -/* File access property list (FAPL) routines */ -H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); -H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /*out*/); -H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); -H5_DLL hid_t H5Pget_driver(hid_t plist_id); -H5_DLL const void *H5Pget_driver_info(hid_t plist_id); -H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); -H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset); -H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); -H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); -H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, - double rdcc_w0); -H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* out */ - size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, double *rdcc_w0); -H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); -H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); /* out */ -H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); -H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/); -H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); -H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree); -H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); -H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size /*out*/); -H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); -H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/); -H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); -H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/); -H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); -H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); -H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); -H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size); -H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); -H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr); -H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); -H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); -H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); -H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); -H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); -H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); -H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); -H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); -H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, - hbool_t start_on_access); -H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, - size_t *location_size, hbool_t *start_on_access); -H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); -H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); -H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled); -H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); -#ifdef H5_HAVE_PARALLEL -H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective); -H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); -H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective); -H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective); -#endif /* H5_HAVE_PARALLEL */ -H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); -H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); -H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, - unsigned min_raw_per); -H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_per, - unsigned *min_raw_per); - -/* Dataset creation property list (DCPL) routines */ -H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); -H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); -H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]); -H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/); -H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, - const char *src_dset_name, hid_t src_space_id); -H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); -H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); -H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); -H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); -H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); -H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); -H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); -H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); -H5_DLL int H5Pget_external_count(hid_t plist_id); -H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, - off_t *offset /*out*/, hsize_t *size /*out*/); -H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); -H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); -H5_DLL herr_t H5Pset_nbit(hid_t plist_id); -H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); -H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); -H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/); -H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); -H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); -H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); -H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); -H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/); -H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); -H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); - -/* Dataset access property list (DAPL) routines */ -H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); -H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, - double *rdcc_w0 /*out*/); -H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); -H5_DLL herr_t H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view); -H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size); -H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size); -H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix); -H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); -H5_DLL herr_t H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t boundary[], - H5D_append_cb_t func, void *udata); -H5_DLL herr_t H5Pget_append_flush(hid_t plist_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func, - void **udata); -H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix); -H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); - -/* Dataset xfer property list (DXPL) routines */ -H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression); -H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size); -H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); -H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/); -H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); -H5_DLL int H5Pget_preserve(hid_t plist_id); -H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); -H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); -H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data); -H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); -H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/, - double *right /*out*/); -H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, - H5MM_free_t free_func, void *free_info); -H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info, - H5MM_free_t *free_func, void **free_info); -H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size); -H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/); -H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data); -H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data); -#ifdef H5_HAVE_PARALLEL -H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, - H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); -H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); -H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, - uint32_t *global_no_collective_cause); -#endif /* H5_HAVE_PARALLEL */ - -/* Link creation property list (LCPL) routines */ -H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); -H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/); - -/* Group creation property list (GCPL) routines */ -H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); -H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/); -H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); -H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, - unsigned *min_dense /*out*/); -H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); -H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */, - unsigned *est_name_len /* out */); -H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); -H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */); - -/* String creation property list (STRCPL) routines */ -H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); -H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/); - -/* Link access property list (LAPL) routines */ -H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); -H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); -H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); -H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); -H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); -H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); -H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); -H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); -H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data); -H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data); - -/* Object copy property list (OCPYPL) routines */ -H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd); -H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd /*out*/); -H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); -H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); -H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data); -H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data); - -/* Symbols defined for compatibility with previous versions of the HDF5 API. +/** + * \ingroup GPLOA + * + * \brief Queries whether a property name exists in a property list or + * class + * + * \param[in] plist_id Identifier for the property list or class to query + * \param[in] name Name of property to check for + * + * \return \htri_t + * + * \details H5Pexist() determines whether a property exists within a + * property list or class. + * + * \since 1.4.0 * - * Use of these symbols is deprecated. */ -#ifndef H5_NO_DEPRECATED_SYMBOLS - -/* Macros */ - -/* We renamed the "root" of the property list class hierarchy */ -#define H5P_NO_CLASS H5P_ROOT - -/* Typedefs */ - -/* Function prototypes */ -H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, - H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, - H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, - H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); -H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, - H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, - H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, - H5P_prp_close_func_t prp_close); -H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/, - size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, - char name[]); -H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, - size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, - char name[] /*out*/); -H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/, - unsigned *stab /*out*/, unsigned *shhdr /*out*/); -H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); -H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); +H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); +/** + * \ingroup GPLOA + * + * \brief Queries the value of a property + * + * \plist_id + * \param[in] name Name of property to query + * \param[out] value Pointer to a location to which to copy the value of + * the property + * + * \return \herr_t + * + * \details H5Pget() retrieves a copy of the value for a property in a + * property list. If there is a \p get callback routine registered + * for this property, the copy of the value of the property will + * first be passed to that routine and any changes to the copy of + * the value will be used when returning the property value from + * this routine. + * + * This routine may be called for zero-sized properties with the + * \p value set to NULL. The \p get routine will be called with + * a NULL value if the callback exists. + * + * The property name must exist or this routine will fail. + * + * If the \p get callback routine returns an error, \ value will + * not be modified. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void *value); +/** + *\ingroup GPLO + * + * \brief Returns the property list class identifier for a property list + * + * \plist_id + * + * \return \hid_t{property list class} + * + * \details H5Pget_class() returns the property list class identifier for + * the property list identified by the \p plist_id parameter. + * + * Note that H5Pget_class() returns a value of #hid_t type, an + * internal HDF5 identifier, rather than directly returning a + * property list class. That identifier can then be used with + * either H5Pequal() or H5Pget_class_name() to determine which + * predefined HDF5 property list class H5Pget_class() has returned. + * + * A full list of valid predefined property list classes appears + * in the description of H5Pcreate(). + * + * Determining the HDF5 property list class name with H5Pequal() + * requires a series of H5Pequal() calls in an if-else sequence. + * An iterative sequence of H5Pequal() calls can compare the + * identifier returned by H5Pget_class() to members of the list of + * valid property list class names. A pseudo-code snippet might + * read as follows: + * + * \code + * plist_class_id = H5Pget_class (dsetA_plist); + * + * if H5Pequal (plist_class_id, H5P_OBJECT_CREATE) = TRUE; + * [ H5P_OBJECT_CREATE is the property list class ] + * [ returned by H5Pget_class. ] + * + * else if H5Pequal (plist_class_id, H5P_DATASET_CREATE) = TRUE; + * [ H5P_DATASET_CREATE is the property list class. ] + * + * else if H5Pequal (plist_class_id, H5P_DATASET_XFER) = TRUE; + * [ H5P_DATASET_XFER is the property list class. ] + * + * . + * . [ Continuing the iteration until a match is found. ] + * . + * \endcode + * + * H5Pget_class_name() returns the property list class name directly + * as a string: + * + * \code + * plist_class_id = H5Pget_class (dsetA_plist); + * plist_class_name = H5Pget_class_name (plist_class_id) + * \endcode + * + * Note that frequent use of H5Pget_class_name() can become a + * performance problem in a high-performance environment. The + * H5Pequal() approach is generally much faster. + * + * \version 1.6.0 Return type changed in this release. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Pget_class(hid_t plist_id); +/** + * \ingroup GPLOA + * + * \brief Retrieves the name of a class + * + * \plistcls_id{pclass_id} + * + * \return Returns a pointer to an allocated string containing the class + * name if successful, and NULL if not successful. + * + * \details H5Pget_class_name() retrieves the name of a generic property + * list class. The pointer to the name must be freed by the user + * with a call to H5free_memory() after each successful call. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Class Name (class identifier) ReturnedProperty List ClassExpanded Name of the Property List ClassThe Class Identifier Used with H5PcreateComments
    attribute createacplAttribute Creation Property ListH5P_ATTRIBUTE_CREATE
    dataset accessdaplDataset Access Property ListH5P_DATASET_ACCESS
    dataset createdcplDataset Creation Property ListH5P_DATASET_CREATE
    data transferdxplData Transfer Property ListH5P_DATASET_XFER
    datatype access H5P_DATATYPE_ACCESSThis class can be created, but there are no properties + * in the class currently. + *
    datatype create H5P_DATATYPE_CREATEThis class can be created, but there + * are no properties in the class currently.
    file accessfaplFile Access Property ListH5P_FILE_ACCESS
    file createfcplFile Creation Property ListH5P_FILE_CREATE
    file mountfmplFile Mount Property ListH5P_FILE_MOUNT
    group access H5P_GROUP_ACCESSThis class can be created, but there + * are no properties in the class currently.
    group creategcplGroup Creation Property ListH5P_GROUP_CREATE
    link accesslaplLink Access Property ListH5P_LINK_ACCESS
    link createlcplLink Creation Property ListH5P_LINK_CREATE
    object copyocpyplObject Copy Property ListH5P_OBJECT_COPY
    object createocplObject Creation Property ListH5P_OBJECT_CREATE
    string createstrcplString Creation Property ListH5P_STRING_CREATE
    + * + * \since 1.4.0 + * + */ +H5_DLL char *H5Pget_class_name(hid_t pclass_id); +/** + * \ingroup GPLOA + * + * \brief Retrieves the parent class of a property class + * + * \plistcls_id{pclass_id} + * + * \return \hid_t{parent class object} + * + * \details H5Pget_class_parent() retrieves an identifier for the parent + * class of a property class. + * + * \since 1.4.0 + * + */ +H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id); +/** + * \ingroup GPLOA + * + * \brief Queries the number of properties in a property list or class + * + * \param[in] id Identifier for property object to query + * \param[out] nprops Number of properties in object + * + * \return \herr_t + * + * \details H5Pget_nprops() retrieves the number of properties in a + * property list or property list class. + * + * If \p id is a property list identifier, the current number of + * properties in the list is returned in \p nprops. + * + * If \p id is a property list class identifier, the number of + * registered properties in the class is returned in \p nprops. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops); +/** + * \ingroup GPLOA + * + * \brief Queries the size of a property value in bytes + * + * \param[in] id Identifier of property object to query + * \param[in] name Name of property to query + * \param[out] size Size of property in bytes + * + * \return \herr_t + * + * \details H5Pget_size() retrieves the size of a property's value in + * bytes. This function operates on both property lists and + * property classes. + * + * Zero-sized properties are allowed and return 0. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); +/** + * \ingroup GPLOA + * + * \brief Registers a temporary property with a property list + * + * \plist_id + * \param[in] name Name of property to create + * \param[in] size Size of property in bytes + * \param[in] value Initial value for the property + * \param[in] set Callback routine called before a new value is copied + * into the property's value + * \param[in] get Callback routine called when a property value is + * retrieved from the property + * \param[in] prp_del Callback routine called when a property is deleted + * from a property list + * \param[in] copy Callback routine called when a property is copied + * from an existing property list + * \param[in] compare Callback routine called when a property is compared + * with another property list + * \param[in] close Callback routine called when a property list is + * being closed and the property value will be disposed + * of + * + * \return \herr_t + * + * \details H5Pinsert2() creates a new property in a property + * list. The property will exist only in this property list and + * copies made from it. + * + * The initial property value must be provided in \p value and + * the property value will be set accordingly. + * + * The name of the property must not already exist in this list, + * or this routine will fail. + * + * The \p set and \p get callback routines may be set to NULL + * if they are not needed. + * + * Zero-sized properties are allowed and do not store any data + * in the property list. The default value of a zero-size + * property may be set to NULL. They may be used to indicate the + * presence or absence of a particular piece of information. + * + * The \p set routine is called before a new value is copied + * into the property. The #H5P_prp_set_func_t callback function + * is defined as follows: + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being + * modified
    \Code{const char * name}IN: The name of the property being modified
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: Pointer to new value pointer for the property + * being modified
    + * + * The \p set routine may modify the value pointer to be set and + * those changes will be used when setting the property's value. + * If the \p set routine returns a negative value, the new property + * value is not copied into the property and the \p set routine + * returns an error value. The \p set routine will be called for + * the initial value. + * + * \b Note: The \p set callback function may be useful to range + * check the value being set for the property or may perform some + * transformation or translation of the value set. The \p get + * callback would then reverse the transformation or translation. + * A single \p get or \p set callback could handle multiple + * properties by performing different actions based on the + * property name or other properties in the property list. + * + * The \p get routine is called when a value is retrieved from + * a property value. The #H5P_prp_get_func_t callback function + * is defined as follows: + * + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to the above callback function are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being queried
    \Code{const char * name}IN: The name of the property being queried
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: The value of the property being returned
    + * + * The \p get routine may modify the value to be returned from + * the query and those changes will be preserved. If the \p get + * routine returns a negative value, the query routine returns + * an error value. + * + * The \p prp_del routine is called when a property is being + * deleted from a property list. The #H5P_prp_delete_func_t + * callback function is defined as follows: + * + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to the above callback function are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list the property is + * being deleted from
    \Code{const char * name}IN: The name of the property in the list
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: The value for the property being deleted
    + * + * The \p prp_del routine may modify the value passed in, but the + * value is not used by the library when the \p prp_del routine + * returns. If the \p prp_del routine returns a negative value, + * the property list \p prp_del routine returns an error value but + * the property is still deleted. + * + * The \p copy routine is called when a new property list with + * this property is being created through a \p copy operation. + * + * The #H5P_prp_copy_func_t callback function is defined as follows: + * + * \snippet this H5P_prp_cb1_t_snip + * + * The parameters to the above callback function are: + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const char * name}IN: The name of the property being copied
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN/OUT: The value for the property being copied
    + * + * The \p copy routine may modify the value to be set and those + * changes will be stored as the new value of the property. If the + * \p copy routine returns a negative value, the new property value + * is not copied into the property and the copy routine returns an + * error value. + * + * The \p compare routine is called when a property list with this + * property is compared to another property list with the same + * property. + * + * The #H5P_prp_compare_func_t callback function is defined as + * follows: + * + * \snippet this H5P_prp_compare_func_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const void * value1}IN: The value of the first property to compare
    \Code{const void * value2}IN: The value of the second property to compare
    \Code{size_t size}IN: The size of the property in bytes
    + * + * The \p compare routine may not modify the values. The \p compare + * routine should return a positive value if \p value1 is greater + * than \p value2, a negative value if \p value2 is greater than + * \p value1 and zero if \p value1 and \p value2 are equal. + * + * The \p close routine is called when a property list with this + * property is being closed. + * + * The #H5P_prp_close_func_t callback function is defined as follows: + * \snippet this H5P_prp_cb1_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const char * name}IN: The name of the property in the list
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: The value for the property being closed
    + * + * The \p close routine may modify the value passed in, the + * value is not used by the library when the close routine + * returns. If the \p close routine returns a negative value, + * the property list \p close routine returns an error value + * but the property list is still closed. + * + * \b Note: There is no \p create callback routine for temporary + * property list objects; the initial value is assumed to + * have any necessary setup already performed on it. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pinsert2(hid_t plist_id, const char *name, size_t size, void *value, H5P_prp_set_func_t set, + H5P_prp_get_func_t get, H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy, + H5P_prp_compare_func_t compare, H5P_prp_close_func_t close); +/** + * \ingroup GPLOA + * + * \brief Determines whether a property list is a member of a class + * + * \plist_id + * \plistcls_id{pclass_id} + * + * \return \htri_t + * + * \details H5Pisa_class() checks to determine whether the property list + * \p plist_id is a member of the property list class + * \p pclass_id. + * + * \see H5Pcreate() + * + * \since 1.6.0 + * + */ +H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id); +/** + * \ingroup GPLOA + * + * \brief Iterates over properties in a property class or list + * + * \param[in] id Identifier of property object to iterate over + * \param[in,out] idx Index of the property to begin with + * \param[in] iter_func Function pointer to function to be called + * with each property iterated over + * \param[in,out] iter_data Pointer to iteration data from user + * + * \return On success: the return value of the last call to \p iter_func if + * it was non-zero; zero if all properties have been processed. + * On Failure, a negative value + * + * \details H5Piterate() iterates over the properties in the property + * object specified in \p id, which may be either a property + * list or a property class, performing a specified operation + * on each property in turn. + * + * For each property in the object, \p iter_func and the + * additional information specified below are passed to the + * #H5P_iterate_t operator function. + * + * The iteration begins with the \p idx-th property in the + * object; the next element to be processed by the operator + * is returned in \p idx. If \p idx is NULL, the iterator + * starts at the first property; since no stopping point is + * returned in this case, the iterator cannot be restarted if + * one of the calls to its operator returns non-zero. + * + * The prototype for the #H5P_iterate_t operator is as follows: + * \snippet this H5P_iterate_t_snip + * + * The operation receives the property list or class + * identifier for the object being iterated over, \p id, the + * name of the current property within the object, \p name, + * and the pointer to the operator data passed in to H5Piterate(), + * \p iter_data. The valid return values from an operator are + * as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    ZeroCauses the iterator to continue, returning zero when all + * properties have been processed
    PositiveCauses the iterator to immediately return that positive + * value, indicating short-circuit success. The iterator + * can be restarted at the index of the next property
    NegativeCauses the iterator to immediately return that value, + * indicating failure. The iterator can be restarted at the + * index of the next property
    + * H5Piterate() assumes that the properties in the object + * identified by \p id remain unchanged through the iteration. + * If the membership changes during the iteration, the function's + * behavior is undefined. + * + * \since 1.4.0 + * + */ +H5_DLL int H5Piterate(hid_t id, int *idx, H5P_iterate_t iter_func, void *iter_data); +/** + * \ingroup GPLOA + * + * \brief Registers a permanent property with a property list class + * + * \plistcls_id{cls_id} + * \param[in] name Name of property to register + * \param[in] size Size of property in bytes + * \param[in] def_value Default value for property in newly created + * property lists + * \param[in] create Callback routine called when a property list is + * being created and the property value will be + * initialized + * \param[in] set Callback routine called before a new value is + * copied into the property's value + * \param[in] get Callback routine called when a property value is + * retrieved from the property + * \param[in] prp_del Callback routine called when a property is deleted + * from a property list + * \param[in] copy Callback routine called when a property is copied + * from a property list + * \param[in] compare Callback routine called when a property is compared + * with another property list + * \param[in] close Callback routine called when a property list is + * being closed and the property value will be + * disposed of + * + * \return \herr_t + * + * \details H5Pregister2() registers a new property with a property list + * class. The \p cls_id identifier can be obtained by calling + * H5Pcreate_class(). The property will exist in all property + * list objects of \p cl_id created after this routine finishes. The + * name of the property must not already exist, or this routine + * will fail. The default property value must be provided and all + * new property lists created with this property will have the + * property value set to the default value. Any of the callback + * routines may be set to NULL if they are not needed. + * + * Zero-sized properties are allowed and do not store any data in + * the property list. These may be used as flags to indicate the + * presence or absence of a particular piece of information. The + * default pointer for a zero-sized property may be set to NULL. + * The property \p create and \p close callbacks are called for + * zero-sized properties, but the \p set and \p get callbacks are + * never called. + * + * The \p create routine is called when a new property list with + * this property is being created. The #H5P_prp_create_func_t + * callback function is defined as follows: + * + * \snippet this H5P_prp_cb1_t_snip + * + * The parameters to this callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const char * name}IN: The name of the property being modified
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN/OUT: The default value for the property being created, + * which will be passed to H5Pregister2()
    + * + * The \p create routine may modify the value to be set and those + * changes will be stored as the initial value of the property. + * If the \p create routine returns a negative value, the new + * property value is not copied into the property and the + * \p create routine returns an error value. + * + * The \p set routine is called before a new value is copied into + * the property. The #H5P_prp_set_func_t callback function is defined + * as follows: + * + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to this callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being modified
    \Code{const char * name}IN: The name of the property being modified
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void *value}IN/OUT: Pointer to new value pointer for the property + * being modified
    + * + * The \p set routine may modify the value pointer to be set and + * those changes will be used when setting the property's value. + * If the \p set routine returns a negative value, the new property + * value is not copied into the property and the \p set routine + * returns an error value. The \p set routine will not be called + * for the initial value; only the \p create routine will be called. + * + * \b Note: The \p set callback function may be useful to range + * check the value being set for the property or may perform some + * transformation or translation of the value set. The \p get + * callback would then reverse the transformation or translation. + * A single \p get or \p set callback could handle multiple + * properties by performing different actions based on the property + * name or other properties in the property list. + * + * The \p get routine is called when a value is retrieved from a + * property value. The #H5P_prp_get_func_t callback function is + * defined as follows: + * + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list being + * queried
    \Code{const char * name}IN: The name of the property being queried
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN/OUT: The value of the property being returned
    + * + * The \p get routine may modify the value to be returned from the + * query and those changes will be returned to the calling routine. + * If the \p set routine returns a negative value, the query + * routine returns an error value. + * + * The \p prp_del routine is called when a property is being + * deleted from a property list. The #H5P_prp_delete_func_t + * callback function is defined as follows: + * + * \snippet this H5P_prp_cb2_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \ref hid_t \c prop_idIN: The identifier of the property list the property is + * being deleted from
    \Code{const char * name}IN: The name of the property in the list
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: The value for the property being deleted
    + * + * The \p prp_del routine may modify the value passed in, but the + * value is not used by the library when the \p prp_del routine + * returns. If the \p prp_del routine returns a negative value, + * the property list delete routine returns an error value but + * the property is still deleted. + * + * The \p copy routine is called when a new property list with + * this property is being created through a \p copy operation. + * The #H5P_prp_copy_func_t callback function is defined as follows: + * + * \snippet this H5P_prp_cb1_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const char * name}IN: The name of the property being copied
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN/OUT: The value for the property being copied
    + * + * The \p copy routine may modify the value to be set and those + * changes will be stored as the new value of the property. If + * the \p copy routine returns a negative value, the new + * property value is not copied into the property and the \p copy + * routine returns an error value. + * + * The \p compare routine is called when a property list with this + * property is compared to another property list with the same + * property. The #H5P_prp_compare_func_t callback function is + * defined as follows: + * + * \snippet this H5P_prp_compare_func_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const void * value1}IN: The value of the first property to compare
    \Code{const void * value2}IN: The value of the second property to compare
    \Code{size_t size}IN: The size of the property in bytes
    + * + * The \p compare routine may not modify the values. The \p compare + * routine should return a positive value if \p value1 is greater + * than \p value2, a negative value if \p value2 is greater than + * \p value1 and zero if \p value1 and \p value2 are equal. + * + * The \p close routine is called when a property list with this + * property is being closed. The #H5P_prp_close_func_t callback + * function is defined as follows: + * + * \snippet this H5P_prp_cb1_t_snip + * + * The parameters to the callback function are defined as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \Code{const char * name}IN: The name of the property in the list
    \Code{size_t size}IN: The size of the property in bytes
    \Code{void * value}IN: The value for the property being closed
    + * + * The \p close routine may modify the value passed in, but the + * value is not used by the library when the \p close routine returns. + * If the \p close routine returns a negative value, the property + * list close routine returns an error value but the property list is + * still closed. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pregister2(hid_t cls_id, const char *name, size_t size, void *def_value, + H5P_prp_create_func_t create, H5P_prp_set_func_t set, H5P_prp_get_func_t get, + H5P_prp_delete_func_t prp_del, H5P_prp_copy_func_t copy, + H5P_prp_compare_func_t compare, H5P_prp_close_func_t close); +/** + * \ingroup GPLOA + * + * \brief Removes a property from a property list + * + * \plist_id + * \param[in] name Name of property to remove + * + * \return \herr_t + * + * \details H5Premove() removes a property from a property list. Both + * properties which were in existence when the property list was + * created (i.e. properties registered with H5Pregister()) and + * properties added to the list after it was created (i.e. added + * with H5Pinsert1() may be removed from a property list. + * Properties do not need to be removed from a property list + * before the list itself is closed; they will be released + * automatically when H5Pclose() is called. + * + * If a \p close callback exists for the removed property, it + * will be called before the property is released. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Premove(hid_t plist_id, const char *name); +/** + * \ingroup GPLOA + * + * \brief Sets a property list value + * + * \plist_id + * \param[in] name Name of property to modify + * \param[in] value Pointer to value to set the property to + * + * \return \herr_t + * + * \details H5Pset() sets a new value for a property in a property list. + * If there is a \p set callback routine registered for this + * property, the \p value will be passed to that routine and any + * changes to the \p value will be used when setting the property + * value. The information pointed to by the \p value pointer + * (possibly modified by the \p set callback) is copied into the + * property list value and may be changed by the application + * making the H5Pset() call without affecting the property value. + * + * The property name must exist or this routine will fail. + * + * If the \p set callback routine returns an error, the property + * value will not be modified. + * + * This routine may not be called for zero-sized properties and + * will return an error in that case. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value); +/** + * \ingroup GPLOA + * + * \brief Removes a property from a property list class + * + * \plistcls_id{pclass_id} + * \param[in] name Name of property to remove + * + * \return \herr_t + * + * \details H5Punregister() removes a property from a property list class. + * Future property lists created of that class will not contain + * this property; existing property lists containing this property + * are not affected. + * + * \since 1.4.0 + * + */ +H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name); + +/* Object creation property list (OCPL) routines */ + +/** + * \ingroup DCPL + * + * \brief Verifies that all required filters are available + * + * \plist_id + * + * \return \htri_t + * + * \details H5Pall_filters_avail() verifies that all of the filters set in + * the dataset or group creation property list \p plist_id are + * currently available. + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \since 1.6.0 + * + */ +H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); +/** + * \ingroup OCPL + * + * \brief Retrieves tracking and indexing settings for attribute creation + * order + * + * \plist_id + * \param[out] crt_order_flags Flags specifying whether to track and + * index attribute creation order + * + * \return \herr_t + * + * \details H5Pget_attr_creation_order() retrieves the settings for + * tracking and indexing attribute creation order on an object. + * + * \p plist_id is an object creation property list (\p ocpl), + * as it can be a dataset or group creation property list + * identifier. The term \p ocpl is used when different types + * of objects may be involved. + * + * \p crt_order_flags returns flags with the following meanings: + * + * + * + * + * + * + * + * + * + * + *
    #H5P_CRT_ORDER_TRACKEDAttribute creation order is tracked but not necessarily + * indexed.
    #H5P_CRT_ORDER_INDEXED Attribute creation order is indexed (requires + * #H5P_CRT_ORDER_TRACKED).
    + * + * If \p crt_order_flags is returned with a value of 0 (zero), + * attribute creation order is neither tracked nor indexed. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); +/** + * \ingroup OCPL + * + * \brief Retrieves attribute storage phase change thresholds + * + * \plist_id + * \param[out] max_compact Maximum number of attributes to be stored in + * compact storage (Default: 8) + * \param[out] min_dense Minimum number of attributes to be stored in + * dense storage (Default: 6) + * + * \return \herr_t + * + * \details H5Pget_attr_phase_change() retrieves threshold values for + * attribute storage on an object. These thresholds determine the + * point at which attribute storage changes from compact storage + * (i.e., storage in the object header) to dense storage (i.e., + * storage in a heap and indexed with a B-tree). + * + * In the general case, attributes are initially kept in compact + * storage. When the number of attributes exceeds \p max_compact, + * attribute storage switches to dense storage. If the number of + * attributes subsequently falls below \p min_dense, the + * attributes are returned to compact storage. + * + * If \p max_compact is set to 0 (zero), dense storage always used. + * + * \p plist_id is an object creation property list (\p ocpl), as it + * can be a dataset or group creation property list identifier. + * The term \p ocpl is used when different types of objects may be + * involved. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); +/** + * \ingroup OCPL + * + * \brief Returns information about a filter in a pipeline + * + * \todo Signature for H5Pget_filter2 is different in H5Pocpl.c than in + * H5Ppublic.h + * + * \ocpl_id{plist_id} + * \param[in] idx Sequence number within the filter pipeline of the filter + * for which information is sought + * \param[out] flags Bit vector specifying certain general properties of the + * filter + * \param[in,out] cd_nelmts Number of elements in \p cd_values + * \param[out] cd_values Auxiliary data for the filter + * \param[in] namelen Anticipated number of characters in \p name + * \param[out] name Name of the filter + * \param[out] filter_config Bit field, as described in H5Zget_filter_info() + * + * \return Returns a negative value on failure, and the filter identifier + * if successful (see #H5Z_filter_t): + * - #H5Z_FILTER_DEFLATE Data compression filter, + * employing the gzip algorithm + * - #H5Z_FILTER_SHUFFLE Data shuffling filter + * - #H5Z_FILTER_FLETCHER32 Error detection filter, employing the + * Fletcher32 checksum algorithm + * - #H5Z_FILTER_SZIP Data compression filter, employing the + * SZIP algorithm + * - #H5Z_FILTER_NBIT Data compression filter, employing the + * N-bit algorithm + * - #H5Z_FILTER_SCALEOFFSET Data compression filter, employing the + * scale-offset algorithm + * + * \details H5Pget_filter2() returns information about a filter specified by + * its filter number, in a filter pipeline specified by the property + * list with which it is associated. + * + * \p plist_id must be a dataset or group creation property list. + * + * \p idx is a value between zero and N-1, as described in + * H5Pget_nfilters(). The function will return a negative value if + * the filter number is out of range. + * + * The structure of the \p flags argument is discussed in + * H5Pset_filter(). + * + * On input, \p cd_nelmts indicates the number of entries in the + * \p cd_values array, as allocated by the caller; on return, + * \p cd_nelmts contains the number of values defined by the filter. + * + * If \p name is a pointer to an array of at least \p namelen bytes, + * the filter name will be copied into that array. The name will be + * null terminated if \p namelen is large enough. The filter name + * returned will be the name appearing in the file, the name + * registered for the filter, or an empty string. + * + * \p filter_config is the bit field described in + * H5Zget_filter_info(). + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \since 1.8.0 + * + */ +H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[], unsigned *filter_config /*out*/); +/** + * \ingroup OCPL + * + * \brief Returns information about the specified filter + * + * \ocpl_id{plist_id} + * \param[in] filter_id Filter identifier + * \param[out] flags Bit vector specifying certain general + * properties of the filter + * \param[in,out] cd_nelmts Number of elements in \p cd_values + * \param[out] cd_values[] Auxiliary data for the filter + * \param[in] namelen Length of filter name and number of + * elements in \p name + * \param[out] name[] Name of filter + * \param[out] filter_config Bit field, as described in + * H5Zget_filter_info() + * + * \return \herr_t + * + * \details H5Pget_filter_by_id2() returns information about the filter + * specified in \p filter_id, a filter identifier. + * + * \p plist_id must be a dataset or group creation property list + * and \p filter_id must be in the associated filter pipeline. + * + * The \p filter_id and \p flags parameters are used in the same + * manner as described in the discussion of H5Pset_filter(). + * + * Aside from the fact that they are used for output, the + * parameters \p cd_nelmts and \p cd_values[] are used in the same + * manner as described in the discussion of H5Pset_filter(). On + * input, the \p cd_nelmts parameter indicates the number of + * entries in the \p cd_values[] array allocated by the calling + * program; on exit it contains the number of values defined by + * the filter. + * + * On input, the \p namelen parameter indicates the number of + * characters allocated for the filter name by the calling program + * in the array \p name[]. On exit \p name[] contains the name of the + * filter with one character of the name in each element of the + * array. + * + * \p filter_config is the bit field described in + * H5Zget_filter_info(). + * + * If the filter specified in \p filter_id is not set for the + * property list, an error will be returned and + * H5Pget_filter_by_id2() will fail. + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t filter_id, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[] /*out*/, unsigned *filter_config /*out*/); +/** + * \ingroup OCPL + * + * \brief Returns the number of filters in the pipeline + * + * \ocpl_id{plist_id} + * + * \return Returns the number of filters in the pipeline if successful; + * otherwise returns a negative value. + * + * \details H5Pget_nfilters() returns the number of filters defined in the + * filter pipeline associated with the property list \p plist_id. + * + * In each pipeline, the filters are numbered from 0 through \Code{N-1}, + * where \c N is the value returned by this function. During output to + * the file, the filters are applied in increasing order; during + * input from the file, they are applied in decreasing order. + * + * H5Pget_nfilters() returns the number of filters in the pipeline, + * including zero (0) if there are none. + * + * \since 1.0.0 + * + */ +H5_DLL int H5Pget_nfilters(hid_t plist_id); +/** + * \ingroup OCPL + * + * \brief Determines whether times associated with an object + * are being recorded + * + * \plist_id + * \param[out] track_times Boolean value, 1 (TRUE) or 0 (FALSE), + * specifying whether object times are being recorded + * + * \return \herr_t + * + * \details H5Pget_obj_track_times() queries the object creation property + * list, \p plist_id, to determine whether object times are being + * recorded. + * + * If \p track_times is returned as 1, times are being recorded; + * if \p track_times is returned as 0, times are not being + * recorded. + * + * Time data can be retrieved with H5Oget_info(), which will return + * it in the #H5O_info_t struct. + * + * If times are not tracked, they will be reported as follows + * when queried: 12:00 AM UDT, Jan. 1, 1970 + * + * See H5Pset_obj_track_times() for further discussion. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); +/** + * \ingroup OCPL + * + * \brief Modifies a filter in the filter pipeline + * + * \ocpl_id{plist_id} + * \param[in] filter Filter to be modified + * \param[in] flags Bit vector specifying certain general properties + * of the filter + * \param[in] cd_nelmts Number of elements in \p cd_values + * \param[in] cd_values[] Auxiliary data for the filter + * + * \return \herr_t + * + * \details H5Pmodify_filter() modifies the specified \p filter in the + * filter pipeline. \p plist_id must be a dataset or group + * creation property list. + * + * The \p filter, \p flags \p cd_nelmts[], and \p cd_values + * parameters are used in the same manner and accept the same + * values as described in the discussion of H5Pset_filter(). + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, + const unsigned int cd_values[/*cd_nelmts*/]); +/** + * \ingroup OCPL + * + * \brief Delete one or more filters in the filter pipeline + * + * \ocpl_id{plist_id} + * \param[in] filter Filter to be deleted + * + * \return \herr_t + * + * \details H5Premove_filter() removes the specified \p filter from the + * filter pipeline in the dataset or group creation property + * list \p plist_id. + * + * The \p filter parameter specifies the filter to be removed. + * Valid values for use in \p filter are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5Z_FILTER_ALLRemoves all filters from the filter pipeline
    #H5Z_FILTER_DEFLATEData compression filter, employing the gzip + * algorithm
    #H5Z_FILTER_SHUFFLEData shuffling filter
    #H5Z_FILTER_FLETCHER32Error detection filter, employing the Fletcher32 + * checksum algorithm
    #H5Z_FILTER_SZIPData compression filter, employing the SZIP + * algorithm
    #H5Z_FILTER_NBITData compression filter, employing the N-Bit + * algorithm
    #H5Z_FILTER_SCALEOFFSETData compression filter, employing the scale-offset + * algorithm
    + * + * Additionally, user-defined filters can be removed with this + * routine by passing the filter identifier with which they were + * registered with the HDF5 library. + * + * Attempting to remove a filter that is not in the filter + * pipeline is an error. + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \since 1.6.3 + * + */ +H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); +/** + * \ingroup OCPL + * + * \brief Sets tracking and indexing of attribute creation order + * + * \plist_id + * \param[in] crt_order_flags Flags specifying whether to track and index + * attribute creation order. \em Default: No + * flag set; attribute creation order is neither + * tracked not indexed + * + * \return \herr_t + * + * \details H5Pset_attr_creation_order() sets flags for tracking and + * indexing attribute creation order on an object. + * + * \p plist_id is a dataset or group creation property list + * identifier. + * + * \p crt_order_flags contains flags with the following meanings: + * + * + * + * + * + * + * + * + * + * + *
    #H5P_CRT_ORDER_TRACKEDAttribute creation order is tracked but not necessarily + * indexed.
    #H5P_CRT_ORDER_INDEXED Attribute creation order is indexed (requires + * #H5P_CRT_ORDER_TRACKED).
    + * + * Default behavior is that attribute creation order is neither + * tracked nor indexed. + * + * H5Pset_attr_creation_order() can be used to set attribute + * creation order tracking, or to set attribute creation order + * tracking and indexing. + * + * \note If a creation order index is to be built, it must be specified in + * the object creation property list. HDF5 currently provides no + * mechanism to turn on attribute creation order tracking at object + * creation time and to build the index later. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); +/** + * \ingroup OCPL + * + * \brief Sets attribute storage phase change thresholds + * + * \plist_id + * \param[in] max_compact Maximum number of attributes to be stored in + * compact storage (\em Default: 8); must be greater + * than or equal to \p min_dense + * + * \param[in] min_dense Minimum number of attributes to be stored in + * dense storage (\em Default: 6) + * + * \return \herr_t + * + * \details H5Pset_attr_phase_change() sets threshold values for attribute + * storage on an object. These thresholds determine the point at + * which attribute storage changes from compact storage (i.e., + * storage in the object header) to dense storage (i.e., storage + * in a heap and indexed with a B-tree). + * + * In the general case, attributes are initially kept in compact + * storage. When the number of attributes exceeds \p max_compact, + * attribute storage switches to dense storage. If the number of + * attributes subsequently falls below \p min_dense, the attributes + * are returned to compact storage. + * + * If \p max_compact is set to 0 (zero), dense storage is always + * used. \p min_dense must be set to 0 (zero) when \p max_compact + * is 0 (zero). + * + * \p plist_id is a dataset or group creation property list + * identifier. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); +/** + * \ingroup OCPL + * + * \brief Sets deflate (GNU gzip) compression method and compression level + * + * \ocpl_id{plist_id} + * \param[in] level Compression level + * + * \return \herr_t + * + * \details H5Pset_deflate() sets the deflate compression method and the + * compression level, \p level, for a dataset or group creation + * property list, \p plist_id. + * + * The filter identifier set in the property list is + * #H5Z_FILTER_DEFLATE. + * + * The compression level, \p level, is a value from zero to nine, + * inclusive. A compression level of 0 (zero) indicates no + * compression; compression improves but speed slows progressively + * from levels 1 through 9: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Compression LevelGzip Action
    0No compression
    1Best compression speed; least compression
    2 through 8Compression improves; speed degrades
    9Best compression ratio; slowest speed
    + * + * Note that setting the compression level to 0 (zero) does not turn + * off use of the gzip filter; it simply sets the filter to perform + * no compression as it processes the data. + * + * HDF5 relies on GNU gzip for this compression. + * + * \version 1.8.5 Function extended to work with group creation property lists. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned level); +/** + * \ingroup OCPL + * + * \brief Adds a filter to the filter pipeline + * + * \ocpl_id{plist_id} + * \param[in] filter Filter identifier for the filter to be added to the + * pipeline + * \param[in] flags Bit vector specifying certain general properties of + * the filter + * \param[in] cd_nelmts Number of elements in \p c_values + * \param[in] c_values Auxiliary data for the filter + * + * \return \herr_t + * + * \details H5Pset_filter() adds the specified \p filter identifier and + * corresponding properties to the end of an output filter + * pipeline. + * + * \p plist_id must be either a dataset creation property list or + * group creation property list identifier. If \p plist_id is a + * dataset creation property list identifier, the filter is added + * to the raw data filter pipeline. + * + * If \p plist_id is a group creation property list identifier, + * the filter is added to the link filter pipeline, which filters + * the fractal heap used to store most of the link metadata in + * certain types of groups. The only predefined filters that can + * be set in a group creation property list are the gzip filter + * (#H5Z_FILTER_DEFLATE) and the Fletcher32 error detection filter + * (#H5Z_FILTER_FLETCHER32). + * + * The array \p c_values contains \p cd_nelmts integers which are + * auxiliary data for the filter. The integer values will be + * stored in the dataset object header as part of the filter + * information. + * + * The \p flags argument is a bit vector with the following + * fields specifying certain general properties of the filter: + * + * + * + * + * + * + * + * + * + * + *
    #H5Z_FLAG_OPTIONALIf this bit is set then the filter is optional. If the + * filter fails (see below) during an H5Dwrite() operation + * then the filter is just excluded from the pipeline for + * the chunk for which it failed; the filter will not + * participate in the pipeline during an H5Dread() of the + * chunk. This is commonly used for compression filters: + * if the filter result would be larger than the input, + * then the compression filter returns failure and the + * uncompressed data is stored in the file.

    + * This flag should not be set for the Fletcher32 checksum + * filter as it will bypass the checksum filter without + * reporting checksum errors to an application.
    #H5Z_FLAG_MANDATORYIf the filter is required, that is, set to mandatory, + * and the filter fails, the library’s behavior depends + * on whether the chunk cache is in use: + * \li If the chunk cache is enabled, data chunks will + * be flushed to the file during H5Dclose() and the + * library will return the failure in H5Dclose(). + * \li When the chunk cache is disabled or not big enough, + * or the chunk is being evicted from the cache, the + * failure will happen during H5Dwrite(). + * + * In each case, the library will still write to the file + * all data chunks that were processed by the filter + * before the failure occurred.

    + * For example, assume that an application creates a + * dataset of four chunks, the chunk cache is enabled and + * is big enough to hold all four chunks, and the filter + * fails when it tries to write the fourth chunk. The + * actual flush of the chunks will happen during + * H5Dclose(), not H5Dwrite(). By the time H5Dclose() + * fails, the first three chunks will have been written + * to the file. Even though H5Dclose() fails, all the + * resources will be released and the file can be closed + * properly.

    + * If, however, the filter fails on the second chunk, only + * the first chunk will be written to the file as nothing + * further can be written once the filter fails.
    + * The \p filter parameter specifies the filter to be set. Valid + * pre-defined filter identifiers are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5Z_FILTER_DEFLATEData compression filter, employing the gzip + * algorithm
    #H5Z_FILTER_SHUFFLEData shuffling filter
    #H5Z_FILTER_FLETCHER32Error detection filter, employing the Fletcher32 + * checksum algorithm
    #H5Z_FILTER_SZIPData compression filter, employing the SZIP + * algorithm
    #H5Z_FILTER_NBITData compression filter, employing the N-Bit + * algorithm
    #H5Z_FILTER_SCALEOFFSETData compression filter, employing the scale-offset + * algorithm
    + * Also see H5Pset_edc_check() and H5Pset_filter_callback(). + * + * \note When a non-empty filter pipeline is used with a group creation + * property list, the group will be created with the new group file + * format. The filters will come into play only when dense storage + * is used (see H5Pset_link_phase_change()) and will be applied to + * the group’s fractal heap. The fractal heap will contain most of + * the the group’s link metadata, including link names. + * + * \note When working with group creation property lists, if you are + * adding a filter that is not in HDF5’s set of predefined filters, + * i.e., a user-defined or third-party filter, you must first + * determine that the filter will work for a group. See the + * discussion of the set local and can apply callback functions + * in H5Zregister(). + * + * \note If multiple filters are set for a property list, they will be + * applied to each chunk of raw data for datasets or each block + * of the fractal heap for groups in the order in which they were + * set. + * + * \note Filters can be applied only to chunked datasets; they cannot be + * used with other dataset storage methods, such as contiguous, + * compact, or external datasets. + * + * \note Dataset elements of variable-length and dataset region + * reference datatypes are stored in separate structures in the + * file called heaps. Filters cannot currently be applied to + * these heaps. + * + * \note Filter Behavior in HDF5:
    + * Filters can be inserted into the HDF5 pipeline to perform + * functions such as compression and conversion. As such, they are + * a very flexible aspect of HDF5; for example, a user-defined + * filter could provide encryption for an HDF5 dataset. + * + * \note A filter can be declared as either required or optional. + * Required is the default status; optional status must be + * explicitly declared. + * + * \note A required filter that fails or is not defined causes an + * entire output operation to fail; if it was applied when the + * data was written, such a filter will cause an input operation + * to fail. + * + * \note The following table summarizes required filter behavior. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Required FILTER_X not availableFILTER_X available
    H5Pset_Will fail.Will succeed.
    H5Dwrite with FILTER_X setWill fail.Will succeed; FILTER_X will be applied to + * the data.
    H5Dread with FILTER_X setWill fail.Will succeed.
    + * \note An optional filter can be set for an HDF5 dataset even when + * the filter is not available. Such a filter can then be + * applied to the dataset when it becomes available on the + * original system or when the file containing the dataset is + * processed on a system on which it is available. + * + * \note A filter can be declared as optional through the use of the + * #H5Z_FLAG_OPTIONAL flag with H5Pset_filter(). + * + * \note Consider a situation where one is creating files that will + * normally be used only on systems where the optional (and + * fictional) filter FILTER_Z is routinely available. One can + * create those files on system A, which lacks FILTER_Z, create + * chunked datasets in the files with FILTER_Z defined in the + * dataset creation property list, and even write data to those + * datasets. The dataset object header will indicate that FILTER_Z + * has been associated with this dataset. But since system A does + * not have FILTER_Z, dataset chunks will be written without it + * being applied. + * + * \note HDF5 has a mechanism for determining whether chunks are + * actually written with the filters specified in the object + * header, so while the filter remains unavailable, system A will + * be able to read the data. Once the file is moved to system B, + * where FILTER_Z is available, HDF5 will apply FILTER_Z to any + * data rewritten or new data written in these datasets. Dataset + * chunks that have been written on system B will then be + * unreadable on system A; chunks that have not been re-written + * since being written on system A will remain readable on system + * A. All chunks will be readable on system B. + * + * \note The following table summarizes optional filter behavior. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    FILTER_Z not availableFILTER_Z available
    with encode and decode
    FILTER_Z available decode only
    H5Pset_Will succeed.Will succeed.Will succeed.
    H5Dread with FILTER_Z setWill succeed if FILTER_Z has not actually
    + * been applied to data.
    Will succeed.Will succeed.
    H5Dwrite with FILTER_Z setWill succeed;
    + * FILTER_Z will not be applied to the data.
    Will succeed;
    + * FILTER_Z will be applied to the data.
    Will succeed;
    + * FILTER_Z will not be applied to the data.
    + * \note The above principles apply generally in the use of HDF5 + * optional filters insofar as HDF5 does as much as possible to + * complete an operation when an optional filter is unavailable. + * (The SZIP filter is an exception to this rule; see H5Pset_szip() + * for details.) + * + * \see \ref_filter_pipe, \ref_group_impls + * + * \version 1.8.5 Function applied to group creation property lists. + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, + const unsigned int c_values[]); +/** + * \ingroup OCPL + * + * \brief Sets up use of the Fletcher32 checksum filter + * + * \ocpl_id{plist_id} + * + * \return \herr_t + * + * \details H5Pset_fletcher32() sets the Fletcher32 checksum filter in the + * dataset or group creation property list \p plist_id. + * + * \attention The Fletcher32 EDC checksum filter was added in HDF5 Release + * 1.6.0. In the original implementation, however, the checksum + * value was calculated incorrectly on little-endian systems. + * The error was fixed in HDF5 Release 1.6.3. + * + * \attention As a result of this fix, an HDF5 library of Release 1.6.0 + * through Release 1.6.2 cannot read a dataset created or written + * with Release 1.6.3 or later if the dataset was created with + * the checksum filter and the filter is enabled in the reading + * library. (Libraries of Release 1.6.3 and later understand the + * earlier error and compensate appropriately.) + * + * \attention \b Work-around: An HDF5 library of Release 1.6.2 or earlier + * will be able to read a dataset created or written with the + * checksum filter by an HDF5 library of Release 1.6.3 or later + * if the checksum filter is disabled for the read operation. + * This can be accomplished via a call to H5Pset_edc_check() + * with the value #H5Z_DISABLE_EDC in the second parameter. + * This has the obvious drawback that the application will be + * unable to verify the checksum, but the data does remain + * accessible. + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \version 1.6.3 Error in checksum calculation on little-endian systems + * corrected in this release. + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); +/** + * \ingroup OCPL + * + * \brief Sets the recording of times associated with an object + * + * \param[in] plist_id Object creation property list identifier + * \param[in] track_times Boolean value, 1 or 0, specifying whether object + * times are to be tracked + * + * \return \herr_t + * + * \details H5Pset_obj_track_times() sets a property in the object creation + * property list, \p plist_id, that governs the recording of times + * associated with an object. + * + * If \p track_times is set to 1, time data will be recorded. If + * \p track_times is set to 0, time data will not be recorded. + * + * Time data can be retrieved with H5Oget_info(), which will + * return it in the #H5O_info_t struct. + * + * If times are not tracked, they will be reported as follows when queried: + * \Code{ 12:00 AM UDT, Jan. 1, 1970} + * + * That date and time are commonly used to represent the beginning of the UNIX epoch. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); + +/* File creation property list (FCPL) routines */ +/** + * \ingroup FCPL + * + * \brief Retrieves the file space page size for a file creation property + * list + * + * \fcpl_id{plist_id} + * \param[out] fsp_size File space page size + * + * \return \herr_t + * + * \details H5Pget_file_space_page_size() retrieves the file space page + * size for paged aggregation in the parameter \p fsp_size. + * + * The library default is 4KB (4096) if \p fsp_size is not + * previously set via a call to H5Pset_file_space_page_size(). + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size); +/** + * \ingroup FCPL + * + * \brief Retrieves the file space handling strategy, persisting free-space + * condition and threshold value for a file creation property list + * + * \fcpl_id{plist_id} + * \param[out] strategy The file space handling strategy + * \param[out] persist The boolean value indicating whether free space is + * persistent or not + * \param[out] threshold The free-space section size threshold value + * + * \return \herr_t + * + * \details H5Pget_file_space_strategy() retrieves the file space handling + * strategy, the persisting free-space condition and the threshold + * value in the parameters \p strategy, \p persist and + * \p threshold respectively. + * + * The library default values returned when + * H5Pset_file_space_strategy() has not been called are: + * + * \li \p strategy - #H5F_FSPACE_STRATEGY_FSM_AGGR + * \li \p persist - 0 + * \li \p threshold - 1 + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist, + hsize_t *threshold); +/** + * \ingroup FCPL + * + * \brief Queries the 1/2 rank of an indexed storage B-tree + * + * \fcpl_id{plist_id} + * \param[out] ik Pointer to location to return the chunked storage B-tree + * 1/2 rank (Default value of B-tree 1/2 rank: 32) + * + * \return \herr_t + * + * \details H5Pget_istore_k() queries the 1/2 rank of an indexed storage + * B-tree. + * + * The argument \p ik may be the null pointer (NULL). + * This function is valid only for file creation property lists. + * + * \see H5Pset_istore_k() + * + * \version 1.6.4 \p ik parameter type changed to \em unsigned. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/); +/** + * \ingroup FCPL + * + * \brief Retrieves the configuration settings for a shared message index + * + * \fcpl_id{plist_id} + * \param[in] index_num Index being configured + * \param[out] mesg_type_flags Types of messages that may be stored in + * this index + * \param[out] min_mesg_size Minimum message size + * + * \return \herr_t + * + * \details H5Pget_shared_mesg_index() retrieves the message type and + * minimum message size settings from the file creation property + * list \p plist_id for the shared object header message index + * specified by \p index_num. + * + * \p index_num specifies the index. \p index_num is zero-indexed, + * so in a file with three indexes, they will be numbered 0, 1, + * and 2. + * + * \p mesg_type_flags and \p min_mesg_size will contain, + * respectively, the types of messages and the minimum size, in + * bytes, of messages that can be stored in this index. + * + * Valid message types are described in H5Pset_shared_mesg_index(). + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, + unsigned *min_mesg_size); +/** + * \ingroup FCPL + * + * \brief Retrieves the number of shared object header message indexes in file + * creation property list + * + * \fcpl_id{plist_id} + * \param[out] nindexes Number of shared object header message indexes + * available in files created with this property list + * + * \return \herr_t + * + * \details H5Pget_shared_mesg_nindexes() retrieves the number of shared + * object header message indexes in the specified file creation + * property list \p plist_id. + * + * If the value of \p nindexes is 0 (zero), shared object header + * messages are disabled in files created with this property list. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes); +/** + * \ingroup FCPL + * + * \brief Retrieves shared object header message phase change information + * + * \fcpl_id{plist_id} + * \param[out] max_list Threshold above which storage of a shared object + * header message index shifts from list to B-tree + * \param[out] min_btree Threshold below which storage of a shared object + * header message index reverts to list format + * + * \return \herr_t + * + * \details H5Pget_shared_mesg_phase_change() retrieves the threshold values + * for storage of shared object header message indexes in a file. + * These phase change thresholds determine the point at which the + * index storage mechanism changes from a more compact list format + * to a more performance-oriented B-tree format, and vice-versa. + * + * By default, a shared object header message index is initially + * stored as a compact list. When the number of messages in an + * index exceeds the specified \p max_list threshold, storage + * switches to a B-tree format for improved performance. If the + * number of messages subsequently falls below the \p min_btree + * threshold, the index will revert to the list format. + * + * If \p max_list is set to 0 (zero), shared object header message + * indexes in the file will always be stored as B-trees. + * + * \p plist_id specifies the file creation property list. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree); +/** + * \ingroup FCPL + * + * \brief Retrieves the size of the offsets and lengths used in an HDF5 + * file + * + * \fcpl_id{plist_id} + * \param[out] sizeof_addr Pointer to location to return offset size in + * bytes + * \param[out] sizeof_size Pointer to location to return length size in + * bytes + * + * \return \herr_t + * + * \details H5Pget_sizes() retrieves the size of the offsets and lengths + * used in an HDF5 file. This function is only valid for file + * creation property lists. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*out*/); +/** + * \ingroup FCPL + * + * \brief Retrieves the size of the symbol table B-tree 1/2 rank and the + * symbol table leaf node 1/2 size + * + * \fcpl_id{plist_id} + * \param[out] ik Pointer to location to return the symbol table's B-tree + * 1/2 rank (Default value of B-tree 1/2 rank: 16) + * \param[out] lk Pointer to location to return the symbol table's leaf + * node 1/2 size (Default value of leaf node 1/2 + * size: 4) + * + * \return \herr_t + * + * \details H5Pget_sym_k() retrieves the size of the symbol table B-tree + * 1/2 rank and the symbol table leaf node 1/2 size. + * + * This function is valid only for file creation property lists. + * + * If a parameter value is set to NULL, that parameter is not + * retrieved. + * + * \see H5Pset_sym_k() + * + * \version 1.6.4 \p ik parameter type changed to \em unsigned + * \version 1.6.0 The \p ik parameter has changed from type int to + * \em unsigned + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/); +/** + * \ingroup FCPL + * + * \brief Retrieves the size of a user block + * + * \fcpl_id{plist_id} + * \param[out] size Pointer to location to return user-block size + * + * \return \herr_t + * + * \details H5Pget_userblock() retrieves the size of a user block in a + * file creation property list. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size); +/** + * \ingroup FCPL + * + * \brief Sets the file space page size for a file creation property list + * + * \fcpl_id{plist_id} + * \param[in] fsp_size File space page size + * + * \return \herr_t + * + * \details H5Pset_file_space_page_size() sets the file space page size + * \p fsp_size used in paged aggregation and paged buffering. + * + * \p fsp_size has a minimum size of 512. Setting a value less + * than 512 will return an error. The library default size for + * the file space page size when not set is 4096. + * + * The size set via this routine may not be changed for the life + * of the file. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size); +/** + * \ingroup FCPL + * + * \brief Sets the file space handling strategy and persisting free-space + * values for a file creation property list + * + * \fcpl_id{plist_id} + * \param[in] strategy The file space handling strategy to be used. See: + * #H5F_fspace_strategy_t + * \param[in] persist A boolean value to indicate whether free space + * should be persistent or not + * \param[in] threshold The smallest free-space section size that the free + * space manager will track + * + * \return \herr_t + * + * \details H5Pset_file_space_strategy() sets the file space handling + * \p strategy, specifies persisting free-space or not (\p persist), + * and sets the free-space section size \p threshold in the file + * creation property list \p plist_id. + * + * #H5F_fspace_strategy_t is a struct defined in H5Fpublic.h as + * follows: + * + * \snippet H5Fpublic.h H5F_fspace_strategy_t_snip + * + * This setting cannot be changed for the life of the file. + * + * As the #H5F_FSPACE_STRATEGY_AGGR and #H5F_FSPACE_STRATEGY_NONE + * strategies do not use the free-space managers, the \p persist + * and \p threshold settings will be ignored for those strategies. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist, + hsize_t threshold); +/** + * \ingroup FCPL + * + * \brief Sets the size of the parameter used to control the B-trees for + * indexing chunked datasets + * + * \fcpl_id{plist_id} + * \param[in] ik 1/2 rank of chunked storage B-tree + * + * \return \herr_t + * + * \details H5Pset_istore_k() sets the size of the parameter used to + * control the B-trees for indexing chunked datasets. This + * function is valid only for file creation property lists. + * + * \p ik is one half the rank of a tree that stores chunked + * raw data. On average, such a tree will be 75% full, or have + * an average rank of 1.5 times the value of \p ik. + * + * The HDF5 library uses (\p ik*2) as the maximum # of entries + * before splitting a B-tree node. Since only 2 bytes are used + * in storing # of entries for a B-tree node in an HDF5 file, + * (\p ik*2) cannot exceed 65536. The default value for + * \p ik is 32. + * + * \version 1.6.4 \p ik parameter type changed to \p unsigned. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik); +/** + * \ingroup FCPL + * + * \brief Configures the specified shared object header message index + * + * \fcpl_id{plist_id} + * \param[in] index_num Index being configured + * \param[in] mesg_type_flags Types of messages that should be stored in + * this index + * \param[in] min_mesg_size Minimum message size + * + * \return \herr_t + * + * \details H5Pset_shared_mesg_index() is used to configure the specified + * shared object header message index, setting the types of + * messages that may be stored in the index and the minimum size + * of each message. + * + * \p plist_id specifies the file creation property list. + * + * \p index_num specifies the index to be configured. + * \p index_num is zero-indexed, so in a file with three indexes, + * they will be numbered 0, 1, and 2. + * + * \p mesg_type_flags and \p min_mesg_size specify, respectively, + * the types and minimum size of messages that can be stored in + * this index. + * + * Valid message types are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5O_SHMESG_NONE_FLAGNo shared messages
    #H5O_SHMESG_SDSPACE_FLAGSimple dataspace message
    #H5O_SHMESG_DTYPE_FLAGDatatype message
    #H5O_SHMESG_FILL_FLAGFill value message
    #H5O_SHMESG_PLINE_FLAGFilter pipeline message
    #H5O_SHMESG_ATTR_FLAGAttribute message
    #H5O_SHMESG_ALL_FLAGAll message types; i.e., equivalent to the following: + * (#H5O_SHMESG_SDSPACE_FLAG | #H5O_SHMESG_DTYPE_FLAG | + * #H5O_SHMESG_FILL_FLAG | #H5O_SHMESG_PLINE_FLAG | + * #H5O_SHMESG_ATTR_FLAG)
    + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, + unsigned min_mesg_size); +/** + * \ingroup FCPL + * + * \brief Sets number of shared object header message indexes + * + * \fcpl_id{plist_id} + * \param[in] nindexes Number of shared object header message indexes to be + * available in files created with this property list + * (\p nindexes must be <= #H5O_SHMESG_MAX_NINDEXES (8)) + * + * \return \herr_t + * + * \details H5Pset_shared_mesg_nindexes() sets the number of shared object + * header message indexes in the specified file creation property + * list. + * + * This setting determines the number of shared object header + * message indexes, \p nindexes, that will be available in files + * created with this property list. These indexes can then be + * configured with H5Pset_shared_mesg_index(). + * + * If \p nindexes is set to 0 (zero), shared object header messages + * are disabled in files created with this property list. + * + * There is a limit of #H5O_SHMESG_MAX_NINDEXES (8) that can be set + * with H5Pset_shared_mesg_nindexes(). An error will occur if + * specifying a value of \p nindexes that is greater than this value. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes); +/** + * \ingroup FCPL + * + * \brief Sets shared object header message storage phase change thresholds + * + * \fcpl_id{plist_id} + * \param[in] max_list Threshold above which storage of a shared object + * header message index shifts from list to B-tree + * \param[in] min_btree Threshold below which storage of a shared object + * header message index reverts to list format + * + * \return \herr_t + * + * \details H5Pset_shared_mesg_phase_change() sets threshold values for + * storage of shared object header message indexes in a file. + * These phase change thresholds determine the point at which the + * index storage mechanism changes from a more compact list format + * to a more performance-oriented B-tree format, and vice-versa. + * + * By default, a shared object header message index is initially + * stored as a compact list. When the number of messages in an + * index exceeds the threshold value of \p max_list, storage + * switches to a B-tree for improved performance. If the number + * of messages subsequently falls below the \p min_btree threshold, + * the index will revert to the list format. + * + * If \p max_list is set to 0 (zero), shared object header message + * indexes in the file will be created as B-trees and will never + * revert to lists. + * + * \p plist_id specifies the file creation property list. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree); +/** + * \ingroup FCPL + * + * \brief Sets the byte size of the offsets and lengths used to address + * objects in an HDF5 file + * + * \fcpl_id{plist_id} + * \param[in] sizeof_addr Size of an object offset in bytes + * \param[in] sizeof_size Size of an object length in bytes + * + * \return \herr_t + * + * \details H5Pset_sizes() sets the byte size of the offsets and lengths + * used to address objects in an HDF5 file. This function is only + * valid for file creation property lists. Passing in a value + * of 0 for one of the parameters retains the current value. The + * default value for both values is the same as sizeof(hsize_t) + * in the library (normally 8 bytes). Valid values currently + * are 2, 4, 8 and 16. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size); +/** + * \ingroup FCPL + * + * \brief + * + * \fcpl_id{plist_id} + * \param[in] ik Symbol table tree rank + * \param[in] lk Symbol table node size + * + * \return \herr_t + * + * \details H5Pset_sym_k() sets the size of parameters used to control the + * symbol table nodes. + * + * This function is valid only for file creation property lists. + * Passing in a value of zero (0) for one of the parameters retains + * the current value. + * + * \p ik is one half the rank of a B-tree that stores a symbol + * table for a group. Internal nodes of the symbol table are on + * average 75% full. That is, the average rank of the tree is + * 1.5 times the value of \p ik. The HDF5 library uses (\p ik*2) as + * the maximum # of entries before splitting a B-tree node. Since + * only 2 bytes are used in storing # of entries for a B-tree node + * in an HDF5 file, (\p ik*2) cannot exceed 65536. The default value + * for \p ik is 16. + * + * \p lk is one half of the number of symbols that can be stored in + * a symbol table node. A symbol table node is the leaf of a symbol + * table tree which is used to store a group. When symbols are + * inserted randomly into a group, the group's symbol table nodes are + * 75% full on average. That is, they contain 1.5 times the number of + * symbols specified by \p lk. The default value for \p lk is 4. + * + * \version 1.6.4 \p ik parameter type changed to \em unsigned. + * \version 1.6.0 The \p ik parameter has changed from type int to + * \em unsigned. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk); +/** + * \ingroup FCPL + * + * \brief Sets user block size + * + * \fcpl_id{plist_id} + * \param[in] size Size of the user-block in bytes + * + * \return \herr_t + * + * \details H5Pset_userblock() sets the user block size of a file creation + * property list. The default user block size is 0; it may be set + * to any power of 2 equal to 512 or greater (512, 1024, 2048, etc.). + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); + +/* File access property list (FAPL) routines */ +/** + * \ingroup FAPL + * + * \brief Retrieves the current settings for alignment properties from a + * file access property list + * + * \fapl_id + * \param[out] threshold Pointer to location of return threshold value + * \param[out] alignment Pointer to location of return alignment value + * + * \return \herr_t + * + * \details H5Pget_alignment() retrieves the current settings for + * alignment properties from a file access property list. The + * \p threshold and/or \p alignment pointers may be null + * pointers (NULL). + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /*out*/); +/** + * \ingroup FAPL + * + * \brief Queries the raw data chunk cache parameters + * + * \fapl_id{plist_id} + * \param[in,out] mdc_nelmts No longer used + * \param[in,out] rdcc_nslots Number of elements (objects) in the raw data + * chunk cache + * \param[in,out] rdcc_nbytes Total size of the raw data chunk cache, in + * bytes + * \param[in,out] rdcc_w0 Preemption policy + * + * \return \herr_t + * + * \details H5Pget_cache() retrieves the maximum possible number of + * elements in the raw data chunk cache, the maximum possible + * number of bytes in the raw data chunk cache, and the + * preemption policy value. + * + * Any (or all) arguments may be null pointers, in which case + * the corresponding datum is not returned. + * + * Note that the \p mdc_nelmts parameter is no longer used. + * + * \version 1.8.0 Use of the \p mdc_nelmts parameter discontinued. + * Metadata cache configuration is managed with + * H5Pset_mdc_config() and H5Pget_mdc_config() + * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nslots parameters changed + * from type int to size_t. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, /* out */ + size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, double *rdcc_w0); +/** + * \ingroup FAPL + * + * \brief Gets information about the write tracking feature used by + * the core VFD + * + * \fapl_id + * \param[out] is_enabled Whether the feature is enabled + * \param[out] page_size Size, in bytes, of write aggregation pages + * + * \return \herr_t + * + * \details H5Pget_core_write_tracking() retrieves information about the + * write tracking feature used by the core VFD. + * + * When a file is created or opened for writing using the core + * virtual file driver (VFD) with the backing store option turned + * on, the VFD can be configured to track changes to the file + * and only write out the modified bytes. To avoid a large number + * of small writes, the changes can be aggregated into pages of + * a user-specified size. The core VFD is also known as the + * memory VFD. The driver identifier is #H5FD_CORE. + * + * \note This function is only for use with the core VFD and must be used + * after the call to H5Pset_fapl_core(). It is an error to use this + * function with any other VFD. + * + * \note This function only applies to the backing store write operation + * which typically occurs when the file is flushed or closed. This + * function has no relationship to the increment parameter passed + * to H5Pset_fapl_core(). + * + * \note For optimum performance, the \p page_size parameter should be + * a power of two. + * + * \since 1.8.13 + * + */ +H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); +/** + * \ingroup FAPL + * + * \brief Returns low-lever driver identifier + * + * \plist_id + * + * \return \hid_t{low level driver} + * + * \details H5Pget_driver() returns the identifier of the low-level file + * driver associated with the file access property list or + * data transfer property list \p plist_id. + * + * Valid driver identifiers distributed with HDF5 are listed and + * described in the following table. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Driver NameDriver IdentifierDescriptionRelated Function
    POSIX#H5FD_SEC2This driver uses POSIX file-system functions like read and + * write to perform I/O to a single, permanent file on local disk + * with no system buffering. This driver is POSIX-compliant and + * is the default file driver for all systems.H5Pset_fapl_sec2()
    Direct#H5FD_DIRECTThis is the #H5FD_SEC2 driver except data is written to or + * read from the file synchronously without being cached by the + * system.H5Pset_fapl_direct()
    Log#H5FD_LOGThis is the #H5FD_SEC2 driver with logging capabilities.H5Pset_fapl_log()
    Windows#H5FD_WINDOWSThis driver was modified in HDF5-1.8.8 to be a wrapper of the + * POSIX driver, #H5FD_SEC2. This change should not affect user + * applications.H5Pset_fapl_windows()
    STDIO#H5FD_STDIOThis driver uses functions from the standard C stdio.h to + * perform I/O to a single, permanent file on local disk with + * additional system buffering.H5Pset_fapl_stdio()
    Memory#H5FD_COREWith this driver, an application can work with a file in + * memory for faster reads and writes. File contents are kept in + * memory until the file is closed. At closing, the memory + * version of the file can be written back to disk or abandoned. + * H5Pset_fapl_core()
    Family#H5FD_FAMILYWith this driver, the HDF5 file’s address space is partitioned + * into pieces and sent to separate storage files using an + * underlying driver of the user’s choice. This driver is for + * systems that do not support files larger than 2 gigabytes. + * H5Pset_fapl_family()
    Multi#H5FD_MULTIWith this driver, data can be stored in multiple files + * according to the type of the data. I/O might work better if + * data is stored in separate files based on the type of data. + * The Split driver is a special case of this driver.H5Pset_fapl_multi()
    Parallel#H5FD_MPIOThis is the standard HDF5 file driver for parallel file + * systems. This driver uses the MPI standard for both + * communication and file I/O.H5Pset_fapl_mpio()
    Parallel POSIXH5FD_MPIPOSIXThis driver is no longer available.
    StreamH5FD_STREAMThis driver is no longer available.
    + * + * This list does not include custom drivers that might be + * defined and registered by a user. + * + * The returned driver identifier is only valid as long as the + * file driver remains registered. + * + * + * \since 1.4.0 + * + */ +H5_DLL hid_t H5Pget_driver(hid_t plist_id); +/** + * \ingroup FAPL + * + * \brief Returns a pointer to file driver information + * + * \param[in] plist_id File access or data transfer property list + * identifier + * + * \return Returns a pointer to a struct containing low-level driver + * information. Otherwise returns NULL. NULL is also returned if + * no driver-specific properties have been registered. No error + * is pushed on the stack in this case. + * + * \details H5Pget_driver_info() returns a pointer to file driver-specific + * information for the low-level driver associated with the file + * access or data transfer property list \p plist_id. + * + * The pointer returned by this function points to an “uncopied” + * struct. Driver-specific versions of that struct are defined + * for each low-level driver in the relevant source code file + * H5FD*.c. For example, the struct used for the MULTI driver is + * \c H5FD_multi_fapl_t defined in H5FDmulti.c. + * + * If no driver-specific properties have been registered, + * H5Pget_driver_info() returns NULL. + * + * \note H5Pget_driver_info() and H5Pset_driver() are used only when + * creating a virtual file driver (VFD) in the virtual file + * layer (VFL). + * + * \version 1.10.1 Return value was changed from \em void * to + * \em const \em void *. + * \version 1.8.2 Function publicized in this release; previous releases + * described this function only in the virtual file driver + * documentation. + * + */ +H5_DLL const void *H5Pget_driver_info(hid_t plist_id); +/** + * \ingroup FAPL + * + * \brief Retrieves the size of the external link open file cache + * + * \fapl_id{plist_id} + * \param[out] efc_size External link open file cache size in number of files + * + * \return \herr_t + * + * \details H5Pget_elink_file_cache_size() retrieves the number of files that + * can be held open in an external link open file cache. + * + * \since 1.8.7 + * + */ +H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size); +/** + * \ingroup FAPL + * + * \brief Retrieves the file access property list setting that determines + * whether an HDF5 object will be evicted from the library's metadata + * cache when it is closed + * + * \fapl_id + * \param[out] evict_on_close Pointer to a variable that will indicate if + * the object will be evicted on close + * + * \return \herr_t + * + * \details The library's metadata cache is fairly conservative about holding on + * to HDF5 object metadata (object headers, chunk index structures, + * etc.), which can cause the cache size to grow, resulting in memory + * pressure on an application or system. When enabled, the "evict on + * close" property will cause all metadata for an object to be + * immediately evicted from the cache as long as it is not referenced + * by any other open object. + * + * See H5Pset_evict_on_close() for additional notes on behavior. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); +/** + * \ingroup FAPL + * + * \brief Retrieves a data offset from the file access property list + * + * \fapl_id + * \param[out] offset Offset in bytes within the HDF5 file + * + * \return \herr_t + * + * \details H5Pget_family_offset() retrieves the value of offset from the + * file access property list \p fapl_id so that the user + * application can retrieve a file handle for low-level access to + * a particular member of a family of files. The file handle is + * retrieved with a separate call to H5Fget_vfd_handle() (or, + * in special circumstances, to H5FDget_vfd_handle(), see \ref VFL). + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset); +/** + * \ingroup FAPL + * + * \brief Returns the file close degree + * + * \fapl_id + * \param[out] degree Pointer to a location to which to return the file + * close degree property, the value of \p degree + * + * \return \herr_t + * + * \details H5Pget_fclose_degree() returns the current setting of the file + * close degree property \p degree in the file access property + * list \p fapl_id. The value of \p degree determines how + * aggressively H5Fclose() deals with objects within a file that + * remain open when H5Fclose() is called to close that file. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree); +/** + * \ingroup FAPL + * + * \brief Retrieves a copy of the file image designated as the initial content + * and structure of a file + * + * \fapl_id + * \param[in,out] buf_ptr_ptr On input, \c NULL or a pointer to a + * pointer to a buffer that contains the + * file image.\n On successful return, if \p buf_ptr_ptr is not + * \c NULL, \Code{*buf_ptr_ptr} will contain a pointer to a copy + * of the initial image provided in the last call to + * H5Pset_file_image() for the supplied \p fapl_id. If no initial + * image has been set, \Code{*buf_ptr_ptr} will be \c NULL. + * \param[in,out] buf_len_ptr On input, \c NULL or a pointer to a buffer + * specifying the required size of the buffer to hold the file + * image.\n On successful return, if \p buf_len_ptr was not + * passed in as \c NULL, \p buf_len_ptr will return the required + * size in bytes of the buffer to hold the initial file image in + * the supplied file access property list, \p fapl_id. If no + * initial image is set, the value of \Code{*buf_len_ptr} will be + * set to 0 (zero) + * \return \herr_t + * + * \details H5Pget_file_image() allows an application to retrieve a copy of the + * file image designated for a VFD to use as the initial contents of a file. + * + * If file image callbacks are defined, H5Pget_file_image() will use + * them when allocating and loading the buffer to return to the + * application (see H5Pset_file_image_callbacks()). If file image + * callbacks are not defined, the function will use \c malloc and \c + * memcpy. When \c malloc and \c memcpy are used, it is the caller’s + * responsibility to discard the returned buffer with a call to \c + * free. + * + * It is the responsibility of the calling application to free the + * buffer whose address is returned in \p buf_ptr_ptr. This can be + * accomplished with \c free if file image callbacks have not been set + * (see H5Pset_file_image_callbacks()) or with the appropriate method + * if file image callbacks have been set. + * + * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(), + * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(), + * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t, + * + * HDF5 File Image Operations. + * + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pget_file_image(hid_t fapl_id, void **buf_ptr_ptr, size_t *buf_len_ptr); +/** + * \ingroup FAPL + * + * \brief Retrieves callback routines for working with file images + * + * \fapl_id + * \param[in,out] callbacks_ptr Pointer to the instance of the + * #H5FD_file_image_callbacks_t struct in which the callback + * routines are to be returned\n + * Struct fields must be initialized to NULL before the call + * is made.\n + * Struct field contents upon return will match those passed in + * in the last H5Pset_file_image_callbacks() call for the file + * access property list \p fapl_id. + * \return \herr_t + * + * \details H5Pget_file_image_callbacks() retrieves the callback routines set for + * working with file images opened with the file access property list + * \p fapl_id. + * + * The callbacks must have been previously set with + * H5Pset_file_image_callbacks() in the file access property list. + * + * Upon the successful return of H5Pset_file_image_callbacks(), the + * fields in the instance of the #H5FD_file_image_callbacks_t struct + * pointed to by \p callbacks_ptr will contain the same values as were + * passed in the most recent H5Pset_file_image_callbacks() call for the + * file access property list \p fapl_id. + * + * \see H5LTopen_file_image(), H5Fget_file_image(), H5Pset_file_image(), + * H5Pset_file_image_callbacks(), H5Pget_file_image_callbacks(), + * \ref H5FD_file_image_callbacks_t, \ref H5FD_file_image_op_t, + * + * HDF5 File Image Operations. + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); +/** + * \ingroup FAPL + * + * \brief Retrieves the file locking property values + * + * \fapl_id + * \param[out] use_file_locking File locking flag + * \param[out] ignore_when_disabled Ignore when disabled flag + * \return \herr_t + * + * \details H5Pget_file_locking() retrieves the file locking property values for + * the file access property list specified by \p fapl_id. + * + * \since 1.10.7 + * + */ +H5_DLL herr_t H5Pget_file_locking(hid_t fapl_id, hbool_t *use_file_locking, hbool_t *ignore_when_disabled); +/** + * \ingroup FAPL + * + * \brief Returns garbage collecting references setting + * + * \fapl_id + * \param[out] gc_ref Flag returning the state of reference garbage + * collection. A returned value of 1 indicates that + * garbage collection is on while 0 indicates that + * garbage collection is off. + * + * \return \herr_t + * + * \details H5Pget_gc_references() returns the current setting for the + * garbage collection references property from the specified + * file access property list. The garbage collection references + * property is set by H5Pset_gc_references(). + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref /*out*/); +/** + * \ingroup FAPL + * + * \brief Retrieves library version bounds settings that indirectly control + * the format versions used when creating objects + * + * \fapl_id{plist_id} + * \param[out] low The earliest version of the library that will be used + * for writing objects + * \param[out] high The latest version of the library that will be used for + * writing objects + * + * \return \herr_t + * + * \details H5Pget_libver_bounds() retrieves the lower and upper bounds on + * the HDF5 library release versions that indirectly determine the + * object format versions used when creating objects in the file. + * + * This property is retrieved from the file access property list + * specified by the parameter \p fapl_id. + * + * The value returned in the parameters \p low and \p high is one + * of the enumerated values in the #H5F_libver_t struct, which is + * defined in H5Fpublic.h. + * + * \version 1.10.2 Add #H5F_LIBVER_V18 to the enumerated defines in + * #H5F_libver_t + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); +/** + * \ingroup FAPL + * + * \brief Get the current initial metadata cache configuration from the + * provided file access property list + * + * \fapl_id{plist_id} + * \param[in,out] config_ptr Pointer to the instance of #H5AC_cache_config_t + * in which the current metadata cache configuration is to be + * reported + * \return \herr_t + * + * \note The \c in direction applies only to the \ref H5AC_cache_config_t.version + * field. All other fields are \c out parameters. + * + * \details The fields of the #H5AC_cache_config_t structure are shown + * below: + * \snippet H5ACpublic.h H5AC_cache_config_t_snip + * \click4more + * + * H5Pget_mdc_config() gets the initial metadata cache configuration + * contained in a file access property list and loads it into the + * instance of #H5AC_cache_config_t pointed to by the \p config_ptr + * parameter. This configuration is used when the file is opened. + * + * Note that the version field of \Code{*config_ptr} must be + * initialized; this allows the library to support earlier versions of + * the #H5AC_cache_config_t structure. + * + * See the overview of the metadata cache in the special topics section + * of the user guide for details on the configuration data returned. If + * you haven't read and understood that documentation, the results of + * this call will not make much sense. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); +/** + * \ingroup FAPL + * + * \brief Retrieves the metadata cache image configuration values for a file + * access property list + * + * \fapl_id{plist_id} + * \param[out] config_ptr Pointer to metadata cache image configuration values + * \return \herr_t + * + * \details H5Pget_mdc_image_config() retrieves the metadata cache image values + * into \p config_ptr for the file access property list specified in \p + * plist_id. + * + * #H5AC_cache_image_config_t is defined as follows: + * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip + * \click4more + * + * \since 1.10.1 + */ +H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr /*out*/); +/** + * \ingroup FAPL + * + * \brief Gets metadata cache logging options + * + * \fapl_id{plist_id} + * \param[out] is_enabled Flag whether logging is enabled + * \param[out] location Location of log in UTF-8/ASCII (file path/name) (On + * Windows, this must be ASCII) + * \param[out] location_size Size in bytes of the location string + * \param[out] start_on_access Whether the logging begins as soon as the file is + * opened or created + * \return \herr_t + * + * \details The metadata cache is a central part of the HDF5 library through + * which all file metadata reads and writes take place. File metadata + * is normally invisible to the user and is used by the library for + * purposes such as locating and indexing data. File metadata should + * not be confused with user metadata, which consists of attributes + * created by users and attached to HDF5 objects such as datasets via + * \ref H5A API calls. + * + * Due to the complexity of the cache, a trace/logging feature has been + * created that can be used by HDF5 developers for debugging and + * performance analysis. The functions that control this functionality + * will normally be of use to a very limited number of developers + * outside of The HDF Group. The functions have been documented to help + * users create logs that can be sent with bug reports. + * + * Control of the log functionality is straightforward. Logging is + * enabled via the H5Pset_mdc_log_options() function, which will modify + * the file access property list used to open or create a file. This + * function has a flag that determines whether logging begins at file + * open or starts in a paused state. Log messages can then be + * controlled via the H5Fstart_mdc_logging() / H5Fstop_mdc_logging() + * functions. H5Pget_mdc_log_options() can be used to examine a file + * access property list, and H5Fget_mdc_logging_status() will return + * the current state of the logging flags. + * + * The log format is described in the + * Metadata Cache Logging document. + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, + size_t *location_size, hbool_t *start_on_access); +/** + * \ingroup FAPL + * + * \brief Returns the current metadata block size setting + * + * \fapl_id{fapl_id} + * \param[out] size Minimum size, in bytes, of metadata block allocations + * + * \return \herr_t + * + * \details Returns the current minimum size, in bytes, of new + * metadata block allocations. This setting is retrieved from the + * file access property list \p fapl_id. + * + * This value is set by H5Pset_meta_block_size() and is + * retrieved from the file access property list \p fapl_id. + * + * \since 1.4.0 + */ +H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size); +/** + * \ingroup FAPL + * + * \brief Retrieves the number of read attempts from a file access + * property list + * + * \fapl_id{plist_id} + * \param[out] attempts The number of read attempts + * + * \return \herr_t + * + * \details H5Pget_metadata_read_attempts() retrieves the number of read + * attempts that is set in the file access property list \p plist_id. + * + * For a default file access property list, the value retrieved + * will depend on whether the user sets the number of attempts via + * H5Pset_metadata_read_attempts(): + * + *
      + * + *
    • If the number of attempts is set to N, the value + * returned will be N. + *
    • If the number of attempts is not set, the value returned + * will be the default for non-SWMR access (1). SWMR is short + * for single-writer/multiple-reader. + *
    + * + * For the file access property list of a specified HDF5 file, + * the value retrieved will depend on how the file is opened + * and whether the user sets the number of read attempts via + * H5Pset_metadata_read_attempts(): + * + *
      + *
    • For a file opened with SWMR access: + * + *
        + *
      • If the number of attempts is set to N, the value + * returned will be N. + *
      • If the number of attempts is not set, the value + * returned will be the default for SWMR access (100). + *
      + *
    • For a file opened without SWMR access, the value + * retrieved will always be the default for non-SWMR access + * (1). The value set via H5Pset_metadata_read_attempts() does + * not have any effect on non-SWMR access. + *
    + * + * \par Failure Modes + * \parblock + * + * When the input property list is not a file access property list. + * + * When the library is unable to retrieve the number of read attempts from + * the file access property list. + * + * \endparblock + * + * \par Examples + * \parblock + * + * The first example illustrates the two cases for retrieving the number + * of read attempts from a default file access property list. + * + * \include H5Pget_metadata_read_attempts.1.c + * + * The second example illustrates the two cases for retrieving the + * number of read attempts from the file access property list of a file + * opened with SWMR acccess. + * + * \include H5Pget_metadata_read_attempts.2.c + * + * The third example illustrates the two cases for retrieving the number + * of read attempts from the file access property list of a file opened + * with non-SWMR acccess. + * + * \include H5Pget_metadata_read_attempts.3.c + * + * \endparblock + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); +/** + * \ingroup FAPL + * + * \brief Retrieves type of data property for MULTI driver + * + * \param[in] fapl_id File access property list or data transfer property + * list identifier + * \param[out] type Type of data + * + * \return \herr_t + * + * \details H5Pget_multi_type() retrieves the type of data setting from + * the file access or data transfer property list \p fapl_id. + * This enables a user application to specify the type of data + * the application wishes to access so that the application can + * retrieve a file handle for low-level access to the particular + * member of a set of MULTI files in which that type of data is + * stored. The file handle is retrieved with a separate call to + * H5Fget_vfd_handle() (or, in special circumstances, to + * H5FDget_vfd_handle(); see the Virtual File Layer documentation + * for more information. + * + * The type of data returned in \p type will be one of those + * listed in the discussion of the \p type parameter in the the + * description of the function H5Pset_multi_type(). + * + * Use of this function is only appropriate for an HDF5 file + * written as a set of files with the MULTI file driver. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); +/** + * \ingroup FAPL + * + * \brief Retrieves the object flush property values from the file access property list + * + * \fapl_id{plist_id} + * \param[in] func The user-defined callback function + * \param[in] udata The user-defined input data for the callback function + * + * \return \herr_t + * + * \details H5Pget_object_flush_cb() gets the user-defined callback + * function that is set in the file access property list + * \p fapl_id and stored in the parameter \p func. The callback is + * invoked whenever an object flush occurs in the file. This + * routine also obtains the user-defined input data that is + * passed along to the callback function in the parameter + * \p udata. + * + * \par Example + * \parblock + * The example below illustrates the usage of this routine to obtain the + * object flush property values. + * + * \include H5Pget_object_flush_cb.c + * \endparblock + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func, void **udata); +/** + * \ingroup FAPL + * + * \brief Retrieves the maximum size for the page buffer and the minimum + percentage for metadata and raw data pages + * + * \fapl_id{plist_id} + * \param[out] buf_size Maximum size, in bytes, of the page buffer + * \param[out] min_meta_perc Minimum metadata percentage to keep in the + * page buffer before allowing pages containing metadata to + * be evicted + * + * \param[out] min_raw_perc Minimum raw data percentage to keep in the + * page buffer before allowing pages containing raw data to + * be evicted + * + * \return \herr_t + * + * \details H5Pget_page_buffer_size() retrieves \p buf_size, the maximum + * size in bytes of the page buffer, \p min_meta_perc, the + * minimum metadata percentage, and \p min_raw_perc, the + * minimum raw data percentage. + * + * \since 1.10.1 + */ +H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_perc, + unsigned *min_raw_perc); +/** + * \ingroup FAPL + * + * \brief Returns maximum data sieve buffer size + * + * \fapl_id{fapl_id} + * \param[in] size Maximum size, in bytes, of data sieve buffer + * + * \return \herr_t + * + * \details H5Pget_sieve_buf_size() retrieves, size, the current maximum + * size of the data sieve buffer. + * + * This value is set by H5Pset_sieve_buf_size() and is retrieved + * from the file access property list fapl_id. + * + * \version 1.6.0 The \p size parameter has changed from type \c hsize_t + * to \c size_t + * \since 1.4.0 + */ +H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size /*out*/); +/** + * \ingroup FAPL + * + * \brief Retrieves the current small data block size setting + * + * \fapl_id{fapl_id} + * \param[out] size Maximum size, in bytes, of the small data block + * + * \result \herr_t + * + * \details H5Pget_small_data_block_size() retrieves the current setting + * for the size of the small data block. + * + * If the returned value is zero (0), the small data block + * mechanism has been disabled for the file. + * + * \since 1.4.4 + */ +H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size /*out*/); +/** + * \ingroup FAPL + * + * \brief Sets alignment properties of a file access property list + * + * \fapl_id + * \param[in] threshold Threshold value. Note that setting the threshold + * value to 0 (zero) has the effect of a special case, + * forcing everything to be aligned + * \param[in] alignment Alignment value + * + * \return \herr_t + * + * \details H5Pset_alignment() sets the alignment properties of a + * file access property list so that any file object greater + * than or equal in size to \p threshold bytes will be aligned + * on an address which is a multiple of \p alignment. The + * addresses are relative to the end of the user block; the + * alignment is calculated by subtracting the user block size + * from the absolute file address and then adjusting the address + * to be a multiple of \p alignment. + * + * Default values for \p threshold and \p alignment are one, + * implying no alignment. Generally the default values will + * result in the best performance for single-process access to + * the file. For MPI IO and other parallel systems, choose an + * alignment which is a multiple of the disk block size. + * + * If the file space handling strategy is set to + * #H5F_FSPACE_STRATEGY_PAGE, then the alignment set via this + * routine is ignored. The file space handling strategy is set + * by H5Pset_file_space_strategy(). + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); +/** + * \ingroup FAPL + * + * \brief Sets the raw data chunk cache parameters + * + * \fapl_id{plist_id} + * \param[in] mdc_nelmts No longer used; any value passed is ignored + * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk + * cache for this dataset. Increasing this value + * reduces the number of cache collisions, but + * slightly increases the memory used. Due to the + * hashing strategy, this value should ideally be a + * prime number. As a rule of thumb, this value + * should be at least 10 times the number of chunks + * that can fit in \p rdcc_nbytes bytes. For + * maximum performance, this value should be set + * approximately 100 times that number of chunks. + * The default value is 521. + * \param[in] rdcc_nbytes Total size of the raw data chunk cache in bytes. + * The default size is 1 MB per dataset. + * \param[in] rdcc_w0 The chunk preemption policy for all datasets. + * This must be between 0 and 1 inclusive and + * indicates the weighting according to which chunks + * which have been fully read or written are + * penalized when determining which chunks to flush + * from cache. A value of 0 means fully read or + * written chunks are treated no differently than + * other chunks (the preemption is strictly LRU) + * while a value of 1 means fully read or written + * chunks are always preempted before other chunks. + * If your application only reads or writes data once, + * this can be safely set to 1. Otherwise, this should + * be set lower depending on how often you re-read or + * re-write the same data. The default value is 0.75. + * If the value passed is #H5D_CHUNK_CACHE_W0_DEFAULT, + * then the property will not be set on the dataset + * access property list, and the parameter will come + * from the file access property list. + * + * \return \herr_t + * + * \details H5Pset_cache() sets the number of elements, the total number of + * bytes, and the preemption policy value for all datasets in a file + * on the file’s file access property list. + * + * The raw data chunk cache inserts chunks into the cache by first + * computing a hash value using the address of a chunk and then by + * using that hash value as the chunk’s index into the table of + * cached chunks. In other words, the size of this hash table and the + * number of possible hash values is determined by the \p rdcc_nslots + * parameter. If a different chunk in the cache has the same hash value, + * a collision will occur, which will reduce efficiency. If inserting + * the chunk into the cache would cause the cache to be too big, then + * the cache will be pruned according to the \p rdcc_w0 parameter. + * + * The \p mdc_nelmts parameter is no longer used; any value passed + * in that parameter will be ignored. + * + * \b Motivation: Setting raw data chunk cache parameters + * can be done with H5Pset_cache(), H5Pset_chunk_cache(), + * or a combination of both. H5Pset_cache() is used to + * adjust the chunk cache parameters for all datasets via + * a global setting for the file, and H5Pset_chunk_cache() + * is used to adjust the chunk cache parameters for + * individual datasets. When both are used, parameters + * set with H5Pset_chunk_cache() will override any parameters + * set with H5Pset_cache(). + * + * \note Optimum chunk cache parameters may vary widely depending + * on different data layout and access patterns. For datasets + * with low performance requirements for example, changing + * the cache settings can save memory. + * + * \note Note: Raw dataset chunk caching is not currently + * supported when using the MPI I/O and MPI POSIX file drivers + * in read/write mode; see H5Pset_fapl_mpio() and + * H5Pset_fapl_mpiposix(), respectively. When using one of these + * file drivers, all calls to H5Dread() and H5Dwrite() will access + * the disk directly, and H5Pset_cache() will have no effect on + * performance. + * + * \note Raw dataset chunk caching is supported when these drivers are + * used in read-only mode. + * + * \todo Check on H5Pset_fapl_mpio() and H5Pset_fapl_mpiposix(). + * + * \version 1.8.0 The use of the \p mdc_nelmts parameter was discontinued. + * Metadata cache configuration is managed with + * H5Pset_mdc_config() and H5Pget_mdc_config(). + * \version 1.6.0 The \p rdcc_nbytes and \p rdcc_nelmts parameters + * changed from type int to size_t. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, + double rdcc_w0); +/** + * \ingroup FAPL + * + * \brief Sets write tracking information for core driver, #H5FD_CORE + * + * \fapl_id{fapl_id} + * \param[in] is_enabled Boolean value specifying whether feature is + enabled + * \param[in] page_size Positive integer specifying size, in bytes, of + * write aggregation pages Value of 1 (one) enables + * tracking with no paging. + * + * \return \herr_t + * + * \details When a file is created or opened for writing using the core + * virtual file driver (VFD) with the backing store option + * turned on, the core driver can be configured to track + * changes to the file and write out only the modified bytes. + * + * This write tracking feature is enabled and disabled with \p + * is_enabled. The default setting is that write tracking is + * disabled, or off. + * + * To avoid a large number of small writes, changes can + * be aggregated into pages of a user-specified size, \p + * page_size. + * + * Setting \p page_size to 1 enables tracking with no page + * aggregation. + * + * The backing store option is set via the function + * H5Pset_fapl_core. + * + * \attention + * \parblock + * This function is only for use with the core VFD and must + * be used after the call to H5Pset_fapl_core(). It is an error + * to use this function with any other VFD. + * + * It is an error to use this function when the backing store + * flag has not been set using H5Pset_fapl_core(). + * + * This function only applies to the backing store write + * operation which typically occurs when the file is flushed + * or closed. This function has no relationship to the + * increment parameter passed to H5Pset_fapl_core(). + * + * For optimum performance, the \p page_size parameter should be + * a power of two. + * + * It is an error to set the page size to 0. + * \endparblock + * + * \version 1.8.14 C function modified in this release to return error + * if \p page_size is set to 0 (zero). + * \since 1.8.13 + * + */ +H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); +/** + * \ingroup FAPL + * + * \brief Sets a file driver + * + * \plist_id + * \param[in] driver_id The new driver identifier + * \param[in] driver_info Optional struct containing driver properties + * + * \return \herr_t + * + * \details H5Pset_driver() sets the file driver, driver_id, for a file + * access or data transfer property list, \p plist_id, and + * supplies an optional struct containing the driver-specific + * properties, \p driver_info. + * + * The driver properties will be copied into the property list + * and the reference count on the driver will be incremented, + * allowing the caller to close the driver identifier but still + * use the property list. + * + * \version 1.8.2 Function publicized in this release; previous releases + * described this function only in the virtual file driver + * documentation. + * + */ +H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); +/** + * \ingroup FAPL + * + * \brief Sets the number of files that can be held open in an external + * link open file cache + * + * \par Motivation + * \parblock + * The external link open file cache holds files open after + * they have been accessed via an external link. This cache reduces + * the number of times such files are opened when external links are + * accessed repeatedly and can siginificantly improves performance in + * certain heavy-use situations and when low-level file opens or closes + * are expensive. + * + * H5Pset_elink_file_cache_size() sets the number of files + * that will be held open in an external link open file + * cache. H5Pget_elink_file_cache_size() retrieves the size of an existing + * cache; and H5Fclear_elink_file_cache() clears an existing cache without + * closing it. + * \endparblock + * + * \fapl_id{plist_id} + * \param[in] efc_size External link open file cache size in number of files + * Default setting is 0 (zero). + * + * \return \herr_t + * + * \details H5Pset_elink_file_cache_size() specifies the number of files + * that will be held open in an external link open file cache. + * + * The default external link open file cache size is 0 (zero), + * meaning that files accessed via an external link are not + * held open. Setting the cache size to a positive integer + * turns on the cache; setting the size back to zero turns it + * off. + * + * With this property set, files are placed in the external + * link open file cache cache when they are opened via an + * external link. Files are then held open until either + * they are evicted from the cache or the parent file is + * closed. This property setting can improve performance when + * external links are repeatedly accessed. + * + * When the cache is full, files will be evicted using a least + * recently used (LRU) scheme; the file which has gone the + * longest time without being accessed through the parent file + * will be evicted and closed if nothing else is holding that + * file open. + * + * Files opened through external links inherit the parent + * file’s file access property list by default, and therefore + * inherit the parent file’s external link open file cache + * setting. + * + * When child files contain external links of their own, the + * caches can form a graph of cached external files. Closing + * the last external reference to such a graph will recursively + * close all files in the graph, even if cycles are present. + * \par Example + * \parblock + * The following code sets up an external link open file cache that will + * hold open up to 8 files reached through external links: + * + * \code + * status = H5Pset_elink_file_cache_size(fapl_id, 8); + * \endcode + * \endparblock + * + * \since 1.8.7 + */ +H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); +/** + * \ingroup FAPL + * + * \brief Controls the library's behavior of evicting metadata associated with + * a closed object + * + * \fapl_id + * \param[in] evict_on_close Whether the HDF5 object should be evicted on close + * + * \return \herr_t + * + * \details The library's metadata cache is fairly conservative about holding + * on to HDF5 object metadata(object headers, chunk index structures, + * etc.), which can cause the cache size to grow, resulting in memory + * pressure on an application or system. When enabled, the "evict on + * close" property will cause all metadata for an object to be evicted + * from the cache as long as metadata is not referenced by any other + * open object. + * + * This function only applies to file access property lists. + * + * The default library behavior is to not evict on object or file + * close. + * + * When applied to a file access property list, any subsequently opened + * object will inherit the "evict on close" property and will have + * its metadata evicted when the object is closed. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); +/** + * \ingroup FAPL + * + * \brief Sets offset property for low-level access to a file in a family of + * files + * + * \fapl_id + * \param[in] offset Offset in bytes within the HDF5 file + * + * \return \herr_t + * + * \details H5Pset_family_offset() sets the offset property in the file access + * property list \p fapl_id so that the user application can + * retrieve a file handle for low-level access to a particular member + * of a family of files. The file handle is retrieved with a separate + * call to H5Fget_vfd_handle() (or, in special circumstances, to + * H5FDget_vfd_handle(); see \ref VFL). + * + * The value of \p offset is an offset in bytes from the beginning of + * the HDF5 file, identifying a user-determined location within the + * HDF5 file. + * The file handle the user application is seeking is for the specific + * member-file in the associated family of files to which this offset + * is mapped. + * + * Use of this function is only appropriate for an HDF5 file written as + * a family of files with the \c FAMILY file driver. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); +/** + * \ingroup FAPL + * + * \brief Sets the file close degree + * + * \fapl_id + * \param[in] degree Pointer to a location containing the file close + * degree property, the value of \p degree + * + * \return \herr_t + * + * \details H5Pset_fclose_degree() sets the file close degree property + * \p degree in the file access property list \p fapl_id. + * + * The value of \p degree determines how aggressively + * H5Fclose() deals with objects within a file that remain open + * when H5Fclose() is called to close that file. \p degree can + * have any one of four valid values: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Degree nameH5Fclose behavior with no open object in fileH5Fclose behavior with open object(s) in file
    #H5F_CLOSE_WEAKActual file is closed.Access to file identifier is terminated; actual file + * close is delayed until all objects in file are closed + *
    #H5F_CLOSE_SEMIActual file is closed.Function returns FAILURE
    #H5F_CLOSE_STRONGActual file is closed.All open objects remaining in the file are closed then + * file is closed
    #H5F_CLOSE_DEFAULTThe VFL driver chooses the behavior. Currently, all VFL + * drivers set this value to #H5F_CLOSE_WEAK, except for the + * MPI-I/O driver, which sets it to #H5F_CLOSE_SEMI.
    + * \warning If a file is opened multiple times without being closed, each + * open operation must use the same file close degree setting. + * For example, if a file is already open with #H5F_CLOSE_WEAK, + * an H5Fopen() call with #H5F_CLOSE_STRONG will fail. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); +/** + * \ingroup FAPL + * + * \brief Sets an initial file image in a memory buffer + * + * \fapl_id + * \param[in] buf_ptr Pointer to the initial file image, or + * NULL if no initial file image is desired + * \param[in] buf_len Size of the supplied buffer, or + * 0 (zero) if no initial image is desired + * + * \return \herr_t + * + * \details H5Pset_file_image() allows an application to provide a file image + * to be used as the initial contents of a file. + * Calling H5Pset_file_image()makes a copy of the buffer specified in + * \p buf_ptr of size \p buf_len. + * + * \par Motivation: + * H5Pset_file_image() and other elements of HDF5 are + * used to load an image of an HDF5 file into system memory and open + * that image as a regular HDF5 file. An application can then use the + * file without the overhead of disk I/O. + * + * \par Recommended Reading: + * This function is part of the file image + * operations feature set. It is highly recommended to study the guide + * [HDF5 File Image Operations] + * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations + * ) before using this feature set. See the “See Also” section below + * for links to other elements of HDF5 file image operations. + * + * \see + * \li H5LTopen_file_image() + * \li H5Fget_file_image() + * \li H5Pget_file_image() + * \li H5Pset_file_image_callbacks() + * \li H5Pget_file_image_callbacks() + * + * \li [HDF5 File Image Operations] + * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations) + * in [Advanced Topics in HDF5] + * (https://portal.hdfgroup.org/display/HDF5/Advanced+Topics+in+HDF5) + * + * \li Within H5Pset_file_image_callbacks(): + * \li Callback #H5FD_file_image_callbacks_t + * \li Callback #H5FD_file_image_op_t + * + * \version 1.8.13 Fortran subroutine added in this release. + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); +/** + * \ingroup FAPL + * + * \brief Sets the callbacks for working with file images + * + * \note **Motivation:** H5Pset_file_image_callbacks() and other elements + * of HDF5 are used to load an image of an HDF5 file into system + * memory and open that image as a regular HDF5 file. An application + * can then use the file without the overhead of disk I/O.\n + * **Recommended Reading:** This function is part of the file + * image operations feature set. It is highly recommended to study + * the guide [HDF5 File Image Operations] + * (https://portal.hdfgroup.org/display/HDF5/HDF5+File+Image+Operations + * ) before using this feature set. See the “See Also” section below + * for links to other elements of HDF5 file image operations. + * + * \fapl_id + * \param[in,out] callbacks_ptr Pointer to the instance of the + * #H5FD_file_image_callbacks_t structure + * + * \return \herr_t \n + * **Failure Modes**: Due to interactions between this function and + * H5Pset_file_image() and H5Pget_file_image(), + * H5Pset_file_image_callbacks() will fail if a file image has + * already been set in the target file access property list, \p fapl_id. + * + * \details H5Pset_file_image_callbacks() sets callback functions for working + * with file images in memory. + * + * H5Pset_file_image_callbacks() allows an application to control the + * management of file image buffers through user defined callbacks. + * These callbacks can be used in the management of file image buffers + * in property lists and with certain file drivers. + * + * H5Pset_file_image_callbacks() must be used before any file image has + * been set in the file access property list. Once a file image has + * been set, the function will fail. + * + * The callback routines set up by H5Pset_file_image_callbacks() are + * invoked when a new file image buffer is allocated, when an existing + * file image buffer is copied or resized, or when a file image buffer + * is released from use. + * + * Some file drivers allow the use of user-defined callback functions + * for allocating, freeing, and copying the driver’s internal buffer, + * potentially allowing optimizations such as avoiding large \c malloc + * and \c memcpy operations, or to perform detailed logging. + * + * From the perspective of the HDF5 library, the operations of the + * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", + * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", + * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and + * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks + * must be identical to those of the + * corresponding C standard library calls (\c malloc, \c memcpy, + * \c realloc, and \c free). While the operations must be identical, + * the file image callbacks have more parameters. The return values + * of \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and + * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" are identical to + * the return values of \c malloc and \c realloc. The return values of + * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" and + * \ref H5FD_file_image_callbacks_t.image_free "image_free" differ from the return + * values of \c memcpy and \c free in that the return values of + * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" and + * \ref H5FD_file_image_callbacks_t.image_free "image_free" can also indicate failure. + * + * The callbacks and their parameters, along with a struct and + * an \c ENUM required for their use, are described below. + * + * Callback struct and \c ENUM: + * + * The callback functions set up by H5Pset_file_image_callbacks() use + * a struct and an \c ENUM that are defined as follows + * + * The struct #H5FD_file_image_callbacks_t serves as a container + * for the callback functions and a pointer to user-supplied data. + * The struct is defined as follows: + * \snippet H5FDpublic.h H5FD_file_image_callbacks_t_snip + * + * Elements of the #H5FD_file_image_op_t are used by the + * callbacks to invoke certain operations on file images. The ENUM is + * defined as follows: + * \snippet H5FDpublic.h H5FD_file_image_op_t_snip + * + * The elements of the #H5FD_file_image_op_t are used in the following + * callbacks: + * + * - The \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc" callback + * contains a pointer to a function that must appear to HDF5 to have + * functionality identical to that of the standard C library \c malloc() call. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h image_malloc_snip + * \n + * - The \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" + * callback contains a pointer to a function + * that must appear to HDF5 to have functionality identical to that + * of the standard C library \c memcopy() call, except that it returns + * a \p NULL on failure. (The \c memcpy C Library routine is defined + * to return the \p dest parameter in all cases.) + * + * - Setting \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy" + * to \c NULL indicates that HDF5 should invoke + * the standard C library \c memcpy() routine when copying buffers. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h image_memcpy_snip + * \n + * - The \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" callback + * contains a pointer to a function that must appear to HDF5 to have + * functionality identical to that of the standard C library \c realloc() call. + * + * - Setting \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc" + * to \p NULL indicates that HDF5 should + * invoke the standard C library \c realloc() routine when resizing + * file image buffers. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h image_realloc_snip + * \n + * - The \ref H5FD_file_image_callbacks_t.image_free "image_free" callback contains + * a pointer to a function that must appear to HDF5 to have functionality + * identical to that of the standard C library \c free() call, except + * that it will return \c 0 (\c SUCCEED) on success and \c -1 (\c FAIL) on failure. + * + * - Setting \ref H5FD_file_image_callbacks_t.image_free "image_free" + * to \c NULL indicates that HDF5 should invoke + * the standard C library \c free() routine when releasing file image + * buffers. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h image_free_snip + * \n + * - The \ref H5FD_file_image_callbacks_t.udata_copy "udata_copy" + * callback contains a pointer to a function + * that, from the perspective of HDF5, allocates a buffer of suitable + * size, copies the contents of the supplied \p udata into the new + * buffer, and returns the address of the new buffer. The function + * returns NULL on failure. This function is necessary if a non-NULL + * \p udata parameter is supplied, so that property lists containing + * the image callbacks can be copied. If the \p udata parameter below + * is \c NULL, then this parameter should be \c NULL as well. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h udata_copy_snip + * \n + * - The \ref H5FD_file_image_callbacks_t.udata_free "udata_free" + * callback contains a pointer to a function + * that, from the perspective of HDF5, frees a user data block. This + * function is necessary if a non-NULL udata parameter is supplied so + * that property lists containing image callbacks can be discarded + * without a memory leak. If the udata parameter below is \c NULL, + * this parameter should be \c NULL as well. + * + * - Signature in #H5FD_file_image_callbacks_t: + * \snippet H5FDpublic.h udata_free_snip + * + * - \p **udata**, the final field in the #H5FD_file_image_callbacks_t + * struct, provides a pointer to user-defined data. This pointer will + * be passed to the + * \ref H5FD_file_image_callbacks_t.image_malloc "image_malloc", + * \ref H5FD_file_image_callbacks_t.image_memcpy "image_memcpy", + * \ref H5FD_file_image_callbacks_t.image_realloc "image_realloc", and + * \ref H5FD_file_image_callbacks_t.image_free "image_free" callbacks. + * Define udata as \c NULL if no user-defined data is provided. + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callbacks_ptr); +/** + * \ingroup FAPL + * + * \brief Sets the file locking property values + * + * \fapl_id + * \param[in] use_file_locking Toggle to specify file locking (or not) + * \param[in] ignore_when_disabled Toggle to ignore when disabled (or not) + * + * \return \herr_t + * + * \details H5Pset_file_locking() overrides the default file locking flag + * setting that was set when the library was configured. + * + * This setting can be overridden by the \c HDF5_USE_FILE_LOCKING + * environment variable. + * + * File locking is used when creating/opening a file to prevent + * problematic file accesses. + * + * \since 1.10.7 + * + */ +H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool_t ignore_when_disabled); +/** + * \ingroup FAPL + * + * \brief Sets garbage collecting references flag + * + * \fapl_id + * \param[in] gc_ref Flag setting reference garbage collection to on (1) or off (0) + * + * \return \herr_t + * + * \details H5Pset_gc_references() sets the flag for garbage collecting + * references for the file. + * + * Dataset region references and other reference types use space in an + * HDF5 file's global heap. If garbage collection is on and the user + * passes in an uninitialized value in a reference structure, the heap + * might get corrupted. When garbage collection is off, however, and + * the user re-uses a reference, the previous heap block will be + * orphaned and not returned to the free heap space. + * + * When garbage collection is on, the user must initialize the + * reference structures to 0 or risk heap corruption. + * + * The default value for garbage collecting references is off. + * + */ +H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); +/** + * \ingroup FAPL + * + * \brief Controls the range of library release versions used when creating + * objects in a file + * + * \fapl_id{plist_id} + * \param[in] low The earliest version of the library that will be used + * for writing objects + * \param[in] high The latest version of the library that will be used for + * writing objects + * + * \return \herr_t + * + * \details H5Pset_libver_bounds() controls the range of library release + * versions that will be used when creating objects in a file. + * The object format versions are determined indirectly from the + * library release versions specified in the call. + * + * This property is set in the file access property list + * specified by the parameter \p fapl_id. + * + * The parameter \p low sets the earliest possible format + * versions that the library will use when creating objects in + * the file. Note that earliest possible is different from + * earliest, as some features introduced in library versions + * later than 1.0.0 resulted in updates to object formats. + * The parameter \p high sets the latest format versions that + * the library will be allowed to use when creating objects in + * the file. + * + * The parameters \p low and \p high must be one of the + * enumerated values in the #H5F_libver_t struct, which is + * defined in H5Fpublic.h. + * + * The macro #H5F_LIBVER_LATEST is aliased to the highest + * enumerated value in #H5F_libver_t, indicating that this is + * currently the latest format available. + * + * The library supports the following five pairs of + * (\p low, \p high) combinations as derived from the values + * in #H5F_libver_t: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    Value of \p low and \p highResult
    \p low=#H5F_LIBVER_EARLIEST
    + * \p high=#H5F_LIBVER_V18
    + * \li The library will create objects with the earliest + * possible format versions. + * \li The library will allow objects to be created with the + * latest format versions available to library release 1.8.x. + * \li API calls that create objects or features that are + * available to versions of the library greater than 1.8.x + * release will fail. + *
    \p low=#H5F_LIBVER_EARLIEST
    + * \p high=#H5F_LIBVER_V110
    + * \li The library will create objects with the earliest possible + * format versions. + * \li The library will allow objects to be created with the latest + * format versions available to library release 1.10.x. + * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper + * limit on the format versions to use. For example, if a newer + * format version is required to support a feature e.g. virtual + * dataset, this setting will allow the object to be created. + * \li This is the library default setting and provides the greatest + * format compatibility. + *
    \p low=#H5F_LIBVER_V18
    + * \p high=#H5F_LIBVER_V18
    + * \li The library will create objects with the latest format + * versions available to library release 1.8.x. + * \li API calls that create objects or features that are available + * to versions of the library greater than 1.8.x release will + * fail. + * \li Earlier versions of the library may not be able to access + * objects created with this setting.
    \p low=#H5F_LIBVER_V18
    + * \p high=#H5F_LIBVER_V110
    + * \li The library will create objects with the latest format + * versions available to library release 1.8.x. + * \li The library will allow objects to be created with the latest + * format versions available to library release 1.10.x. + * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper + * limit on the format versions to use. For example, if a + * newer format version is required to support a feature e.g. + * virtual dataset, this setting will allow the object to be + * created. + * \li Earlier versions of the library may not be able to access + * objects created with this setting.
    \p low=#H5F_LIBVER_V110
    + * \p high=#H5F_LIBVER_V110 + *
    + * \li The library will create objects with the latest format + * versions available to library release 1.10.x. + * \li The library will allow objects to be created with the latest + * format versions available to library release 1.10.x. + * Since 1.10.x is also #H5F_LIBVER_LATEST, there is no upper + * limit on the format versions to use. For example, if a + * newer format version is required to support a feature e.g. + * virtual dataset, this setting will allow the object to be + * created. + * \li This setting allows users to take advantage of the latest + * features and performance enhancements in the library. + * However, objects written with this setting may be + * accessible to a smaller range of library versions than + * would be the case if low is set to #H5F_LIBVER_EARLIEST. + * \li Earlier versions of the library may not be able to access + * objects created with this + * setting. + *
    + * + * \version 1.10.2 #H5F_LIBVER_V18 added to the enumerated defines in + * #H5F_libver_t. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); +/** + * \ingroup FAPL + * + * \brief Set the initial metadata cache configuration in the indicated File + * Access Property List to the supplied value + * + * \fapl_id{plist_id} + * \param[in] config_ptr Pointer to the instance of \p H5AC_cache_config_t + * containing the desired configuration + * \return \herr_t + * + * \details The fields of the #H5AC_cache_config_t structure are shown + * below: + * \snippet H5ACpublic.h H5AC_cache_config_t_snip + * \click4more + * + * \details H5Pset_mdc_config() attempts to set the initial metadata cache + * configuration to the supplied value. It will fail if an invalid + * configuration is detected. This configuration is used when the file + * is opened. + * + * See the overview of the metadata cache in the special topics section + * of the user manual for details on what is being configured. If you + * have not read and understood that documentation, you really should + * not be using this API call. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr); +/** + * \ingroup FAPL + * + * \brief Sets metadata cache logging options + * + * \fapl_id{plist_id} + * \param[in] is_enabled Whether logging is enabled + * \param[in] location Location of log in UTF-8/ASCII (file path/name) + * (On Windows, this must be ASCII) + * \param[in] start_on_access Whether the logging will begin as soon as the + * file is opened or created + * + * \return \herr_t + * + * \details The metadata cache is a central part of the HDF5 library through + * which all file metadata reads and writes take place. File metadata + * is normally invisible to the user and is used by the library for + * purposes such as locating and indexing data. File metadata should + * not be confused with user metadata, which consists of attributes + * created by users and attached to HDF5 objects such as datasets via + * H5A API calls. + * + * Due to the complexity of the cache, a trace/logging feature has + * been created that can be used by HDF5 developers for debugging and + * performance analysis. The functions that control this functionality + * will normally be of use to a very limited number of developers + * outside of The HDF Group. The functions have been documented to + * help users create logs that can be sent with bug reports. + * + * Control of the log functionality is straightforward. Logging is + * enabled via the H5Pset_mdc_log_options() function, + * which will modify the file access property list used to open or + * create a file. This function has a flag that determines whether + * logging begins at file open or starts in a paused state. Log + * messages can then be controlled via the H5Fstart_mdc_logging() + * and H5Fstop_mdc_logging() function. + * + * H5Pget_mdc_log_options() can be used to examine a file access + * property list, and H5Fget_mdc_logging_status() will return the + * current state of the logging flags. + * + * The log format is described in [Metadata Cache Logging] + * (https://portal.hdfgroup.org/display/HDF5/Fine-tuning+the+Metadata+Cache). + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, + hbool_t start_on_access); +/** + * \ingroup FAPL + * + * \brief Sets the minimum metadata block size + * + * \fapl_id{fapl_id} + * \param[in] size Minimum size, in bytes, of metadata block allocations + * + * \return \herr_t + * + * \details H5Pset_meta_block_size() sets the minimum size, in bytes, of + * metadata block allocations when #H5FD_FEAT_AGGREGATE_METADATA is set by a VFL + * driver. + + * Each raw metadata block is initially allocated to be of the given size. + * Specific metadata objects (e.g., object headers, local heaps, B-trees) are then + * sub-allocated from this block. + * + * The default setting is 2048 bytes, meaning that the library will + * attempt to aggregate metadata in at least 2K blocks in the file. + * Setting the value to zero (\Code{0}) with this function will turn + * off metadata aggregation, even if the VFL driver attempts to use the + * metadata aggregation strategy. + * + * Metadata aggregation reduces the number of small data objects in the file that + * would otherwise be required for metadata. The aggregated block of metadata is + * usually written in a single write action and always in a contiguous block, + * potentially significantly improving library and application performance. + * + * \since 1.4.0 + */ +H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); +/** + * \ingroup FAPL + * + * \brief Sets the number of read attempts in a file access property list + * + * \fapl_id{plist_id} + * \param[in] attempts The number of read attempts. Must be a value greater than \Code{0} + * + * \return \herr_t + * + * \return Failure Modes: + * - When the user sets the number of read attempts to \Code{0}. + * - When the input property list is not a file access property list. + * - When the library is unable to set the number of read attempts in the file access property list. + * + * \details H5Pset_metadata_read_attempts() sets the number of reads that the + * library will try when reading checksummed metadata in an HDF5 file opened + * with SWMR access. When reading such metadata, the library will compare the + * checksum computed for the metadata just read with the checksum stored within + * the piece of checksum. When performing SWMR operations on a file, the + * checksum check might fail when the library reads data on a system that is not + * atomic. To remedy such situations, the library will repeatedly read the piece + * of metadata until the check passes or finally fails the read when the allowed + * number of attempts is reached. + * + * The number of read attempts used by the library will depend on how the file is + * opened and whether the user sets the number of read attempts via this routine: + + * - For a file opened with SWMR access: + * - If the user sets the number of attempts to \Code{N}, the library will use \Code{N}. + * - If the user does not set the number of attempts, the library will use the + * default for SWMR access (\Code{100}). + * - For a file opened with non-SWMR access, the library will always use the default + * for non-SWMR access (\Code{1}). The value set via this routine does not have any effect + * during non-SWMR access. + * + * \b Example: The first example illustrates the case in setting the number of read attempts for a file + * opened with SWMR access. + * + * \snippet H5Pset_metadata_read_attempts.c SWMR Access + * + * \b Example: The second example illustrates the case in setting the number of + * read attempts for a file opened with non-SWMR access. The value + * set in the file access property list does not have any effect. + * + * \snippet H5Pset_metadata_read_attempts.c non-SWMR Access + * + * \note \b Motivation: On a system that is not atomic, the library might + * possibly read inconsistent metadata with checksum when performing + * single-writer/multiple-reader (SWMR) operations for an HDF5 file. Upon + * encountering such situations, the library will try reading the metadata + * again to obtain consistent data. This routine provides the means to set + * the number of read attempts other than the library default. + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); +/** + * \ingroup FAPL + * + * \brief Specifies type of data to be accessed via the \Code{MULTI} driver, + * enabling more direct access + * + * \fapl_id{fapl_id} + * \param[in] type Type of data to be accessed + * + * \return \herr_t + * + * \details H5Pset_multi_type() sets the \Emph{type of data} property in the file + * access property list \p fapl_id. This setting enables a user + * application to specify the type of data the application wishes to + * access so that the application can retrieve a file handle for + * low-level access to the particular member of a set of \Code{MULTI} + * files in which that type of data is stored. The file handle is + * retrieved with a separate call to H5Fget_vfd_handle() (or, in special + * circumstances, to H5FDget_vfd_handle(); see \ref VFL. + * + * The type of data specified in \p type may be one of the following: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5FD_MEM_SUPER Super block data
    #H5FD_MEM_BTREE B-tree data
    #H5FD_MEM_DRAW Dataset raw data
    #H5FD_MEM_GHEAP Global heap data
    #H5FD_MEM_LHEAP Local Heap data
    #H5FD_MEM_OHDR Object header data
    + * + * This function is for use only when accessing an HDF5 file written as a set of + * files with the \Code{MULTI} file driver. + * + * \since 1.6.0 + */ +H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); +/** + * \ingroup FAPL + * + * \brief Sets a callback function to invoke when an object flush occurs in the file + * + * \fapl_id{plist_id} + * \op{func} + * \op_data_in{udata} + * + * \return \herr_t + * + * \details H5Pset_object_flush_cb() sets the callback function to invoke in the + * file access property list \p plist_id whenever an object flush occurs in + * the file. Library objects are group, dataset, and committed + * datatype. + * + * The callback function \p func must conform to the prototype defined below: + * \code + * typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *user_data) + * \endcode + * + * The parameters of the callback function, per the above prototypes, are defined as follows: + * - \Code{object_id} is the identifier of the object which has just been flushed. + * - \Code{user_data} is the user-defined input data for the callback function. + * + * \b Example: The example below illustrates the usage of this routine to set + * the callback function to invoke when an object flush occurs. + * + * \include H5Pset_object_flush_cb.c + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata); +/** + * \ingroup FAPL + * + * \brief Sets the maximum size of the data sieve buffer + * + * \fapl_id{fapl_id} + * \param[in] size Maximum size, in bytes, of data sieve buffer + * + * \return \herr_t + * + * \details H5Pset_sieve_buf_size() sets \p size, the maximum size in bytes of the + * data sieve buffer, which is used by file drivers that are capable of + * using data sieving. + * + * The data sieve buffer is used when performing I/O on datasets in the + * file. Using a buffer which is large enough to hold several pieces of + * the dataset being read in for hyperslab selections boosts + * performance by quite a bit. + * + * The default value is set to 64KB, indicating that file I/O for raw + * data reads and writes will occur in at least 64KB blocks. Setting + * the value to zero (\Code{0}) with this API function will turn off + * the data sieving, even if the VFL driver attempts to use that + * strategy. + * + * Internally, the library checks the storage sizes of the datasets in + * the file. It picks the smaller one between the size from the file + * access property and the size of the dataset to allocate the sieve + * buffer for the dataset in order to save memory usage. + * + * \version 1.6.0 The \p size parameter has changed from type \Code{hsize_t} to \Code{size_t}. + * + * \since 1.4.0 + */ +H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); +/** + * \ingroup FAPL + * + * \brief Sets the size of a contiguous block reserved for small data + * + * \fapl_id{fapl_id} + * \param[in] size Maximum size, in bytes, of the small data block. + The default size is \Code{2048}. + * + * \return \herr_t + * + * \details H5Pset_small_data_block_size() reserves blocks of \p size bytes for the + * contiguous storage of the raw data portion of \Emph{small} datasets. The + * HDF5 library then writes the raw data from small datasets to this + * reserved space, thus reducing unnecessary discontinuities within + * blocks of meta data and improving I/O performance. + * + * A small data block is actually allocated the first time a qualifying + * small dataset is written to the file. Space for the raw data portion + * of this small dataset is suballocated within the small data block. + * The raw data from each subsequent small dataset is also written to + * the small data block until it is filled; additional small data + * blocks are allocated as required. + * + * The HDF5 library employs an algorithm that determines whether I/O + * performance is likely to benefit from the use of this mechanism with + * each dataset as storage space is allocated in the file. A larger + * \p size will result in this mechanism being employed with larger + * datasets. + * + * The small data block size is set as an allocation property in the + * file access property list identified by \p fapl_id. + * + * Setting \p size to zero (\Code{0}) disables the small data block mechanism. + * + * \since 1.4.4 + */ +H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); +#ifdef H5_HAVE_PARALLEL +/** + * \ingroup GACPL + * + * \brief Sets metadata I/O mode for read operations to collective or independent (default) + * + * \gacpl_id + * \param[in] is_collective Boolean value indicating whether metadata reads are collective + * (\Code{1}) or independent (\Code{0}). + * Default mode: Independent (\Code{0}) + * + * \return \herr_t + * + * \details H5Pset_all_coll_metadata_ops() sets the metadata I/O mode for read + * operations in the access property list \p plist_id. + * + * When engaging in parallel I/O, all metadata write operations must be + * collective. If \p is_collective is \Code{1}, this property specifies + * that the HDF5 library will perform all metadata read operations + * collectively; if \p is_collective is \Code{0}, such operations may + * be performed independently. + * + * Users must be aware that several HDF5 operations can potentially + * issue metadata reads. These include opening a dataset, datatype, or + * group; reading an attribute; or issuing a \Emph{get info} call such + * as getting information for a group with H5Fget_info(). Collective + * I/O requirements must be kept in mind when issuing such calls in the + * context of parallel I/O. + * + * If this property is collective on a file access property list that + * is used in creating or opening a file, then the HDF5 library will + * assume that all metadata read operations issued on that file + * identifier will be issued collectively from all ranks irrespective + * of the individual setting of a particular operation. If this + * assumption is not adhered to, corruption will be introduced in the + * metadata cache and HDF5’s behavior will be undefined. + * + * Alternatively, a user may wish to avoid setting this property + * globally on the file access property list, and individually set it + * on particular object access property lists (dataset, group, link, + * datatype, attribute access property lists) for certain operations. + * This will indicate that only the operations issued with such an + * access property list will be called collectively and other + * operations may potentially be called independently. There are, + * however, several HDF5 operations that can issue metadata reads but + * have no property list in their function signatures to allow passing + * the collective requirement property. For those operations, the only + * option is to set the global collective requirement property on the + * file access property list; otherwise the metadata reads that can be + * triggered from those operations will be done independently by each + * process. + * + * Functions that do not accommodate an access property list but that + * might issue metadata reads are listed in \ref maybe_metadata_reads. + * + * \attention As noted above, corruption will be introduced into the metadata + * cache and HDF5 library behavior will be undefined when both of the following + * conditions exist: + * - A file is created or opened with a file access property list in which the + * collective metadata I/O property is set to \Code{1}. + * - Any function is called that triggers an independent metadata read while the + * file remains open with that file access property list. + * + * \attention An approach that avoids this corruption risk is described above. + * + * \sa_metadata_ops + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pset_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective); +/** + * \ingroup GACPL + * + * \brief Retrieves metadata read mode setting + * + * \gacpl_id + * \param[out] is_collective Pointer to a buffer containing the Boolean value indicating whether metadata + * reads are collective (\Code{>0}) or independent (\Code{0}). + * Default mode: Independent (\Code{0}) + * + * \return \herr_t + * + * \details H5Pget_all_coll_metadata_ops() retrieves the collective metadata read setting from the access + * property list \p plist_id into \p is_collective. + * + * \sa_metadata_ops + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pget_all_coll_metadata_ops(hid_t plist_id, hbool_t *is_collective); +/** + * \ingroup FAPL + * + * \brief Sets metadata write mode to collective or independent (default) + * + * \fapl_id{plist_id} + * \param[out] is_collective Boolean value indicating whether metadata + * writes are collective (\Code{>0}) or independent (\Code{0}). + * \Emph{Default mode:} Independent (\Code{0}) + * \return \herr_t + * + * \details H5Pset_coll_metadata_write() tells the HDF5 library whether to + * perform metadata writes collectively (1) or independently (0). + * + * If collective access is selected, then on a flush of the metadata + * cache, all processes will divide the metadata cache entries to be + * flushed evenly among themselves and issue a single MPI-IO collective + * write operation. This is the preferred method when the size of the + * metadata created by the application is large. + * + * If independent access is selected, the library uses the default + * method for doing metadata I/O either from process zero or + * independently from each process. + * + * \sa_metadata_ops + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pset_coll_metadata_write(hid_t plist_id, hbool_t is_collective); +/** + * \ingroup FAPL + * + * \brief Retrieves metadata write mode setting + * + * \fapl_id{plist_id} + * \param[out] is_collective Pointer to a boolean value indicating whether + * metadata writes are collective (\Code{>0}) or independent (\Code{0}). + * \Emph{Default mode:} Independent (\Code{0}) + * \return \herr_t + * + * \details H5Pget_coll_metadata_write() retrieves the collective metadata write + * setting from the file access property into \p is_collective. + * + * \sa_metadata_ops + * + * \since 1.10.0 + */ +H5_DLL herr_t H5Pget_coll_metadata_write(hid_t plist_id, hbool_t *is_collective); +#endif /* H5_HAVE_PARALLEL */ +/** + * \ingroup FAPL + * + * \brief Sets the metadata cache image option for a file access property list + * + * \fapl_id{plist_id} + * \param[out] config_ptr Pointer to metadata cache image configuration values + * \return \herr_t + * + * \details H5Pset_mdc_image_config() sets the metadata cache image option with + * configuration values specified by \p config_ptr for the file access + * property list specified in \p plist_id. + * + * #H5AC_cache_image_config_t is defined as follows: + * \snippet H5ACpublic.h H5AC_cache_image_config_t_snip + * \click4more + * + * \par Limitations: While it is an obvious error to request a cache image when + * opening the file read only, it is not in general possible to test for + * this error in the H5Pset_mdc_image_config() call. Rather than fail the + * subsequent file open, the library silently ignores the file image + * request in this case.\n It is also an error to request a cache image on + * a file that does not support superblock extension messages (i.e. a + * superblock version less than 2). As above, it is not always possible to + * detect this error in the H5Pset_mdc_image_config() call, and thus the + * request for a cache image will fail silently in this case as well.\n + * Creation of cache images is currently disabled in parallel -- as above, + * any request for a cache image in this context will fail silently.\n + * Files with cache images may be read in parallel applications, but note + * that the load of the cache image is a collective operation triggered by + * the first operation that accesses metadata after file open (or, if + * persistent free space managers are enabled, on the first allocation or + * deallocation of file space, or read of file space manager status, + * whichever comes first). Thus the parallel process may deadlock if any + * process does not participate in this access.\n + * In long sequences of file closes and opens, infrequently accessed + * metadata can accumulate in the cache image to the point where the cost + * of storing and restoring this metadata exceeds the benefit of retaining + * frequently used metadata in the cache image. When implemented, the + * #H5AC_cache_image_config_t::entry_ageout should address this problem. In + * the interim, not requesting a cache image every n file close/open cycles + * may be an acceptable work around. The choice of \c n will be driven by + * application behavior, but \Code{n = 10} seems a good starting point. + * + * \since 1.10.1 + */ +H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); +/** + * \ingroup FAPL + * + * \brief Sets the maximum size for the page buffer and the minimum percentage + * for metadata and raw data pages + * + * \fapl_id{plist_id} + * \param[in] buf_size Maximum size, in bytes, of the page buffer + * \param[in] min_meta_per Minimum metadata percentage to keep in the page buffer + * before allowing pages containing metadata to be evicted (Default is 0) + * \param[in] min_raw_per Minimum raw data percentage to keep in the page buffer + * before allowing pages containing raw data to be evicted (Default is 0) + * \return \herr_t + * + * \details H5Pset_page_buffer_size() sets buf_size, the maximum size in bytes + * of the page buffer. The default value is zero, meaning that page + * buffering is disabled. When a non-zero page buffer size is set, the + * library will enable page buffering if that size is larger or equal + * than a single page size if a paged file space strategy is enabled + * using the functions H5Pset_file_space_strategy() and + * H5Pset_file_space_page_size(). + * + * The page buffer layer captures all I/O requests before they are + * issued to the VFD and "caches" them in fixed sized pages. Once the + * total number of pages exceeds the page buffer size, the library + * evicts pages from the page buffer by writing them to the VFD. At + * file close, the page buffer is flushed writing all the pages to the + * file. + * + * If a non-zero page buffer size is set, and the file space strategy + * is not set to paged or the page size for the file space strategy is + * larger than the page buffer size, the subsequent call to H5Fcreate() + * or H5Fopen() using the \p plist_id will fail. + * + * The function also allows setting the minimum percentage of pages for + * metadata and raw data to prevent a certain type of data to evict hot + * data of the other type. + * + * \since 1.10.1 + * + */ +H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, + unsigned min_raw_per); + +/* Dataset creation property list (DCPL) routines */ +/** + * \ingroup DCPL + * + * \brief Determines whether fill value is defined + * + * \dcpl_id{plist} + * \param[out] status Status of fill value in property list + * + * \return \herr_t + * + * \details H5Pfill_value_defined() determines whether a fill value is + * defined in the dataset creation property list \p plist. Valid + * values returned in status are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5D_FILL_VALUE_UNDEFINEDFill value is undefined.
    #H5D_FILL_VALUE_DEFAULTFill value is the library default.
    #H5D_FILL_VALUE_USER_DEFINEDFill value is defined by the application.
    + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); +/** + * \ingroup DCPL + * + * \brief Retrieves the timing for storage space allocation + * + * \dcpl_id{plist_id} + * \param[out] alloc_time The timing setting for allocating dataset + * storage space + * + * \return \herr_t + * + * \details H5Pget_alloc_time() retrieves the timing for allocating storage + * space for a dataset's raw data. This property is set in the + * dataset creation property list \p plist_id. The timing setting + * is returned in \p alloc_time as one of the following values: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5D_ALLOC_TIME_DEFAULT
     
    Uses the default allocation time, based on the dataset + * storage method.
    See the \p alloc_time description in + * H5Pset_alloc_time() for default allocation times for + * various storage methods.
    #H5D_ALLOC_TIME_EARLYAll space is allocated when the dataset is created.
    #H5D_ALLOC_TIME_INCRSpace is allocated incrementally as data is written + * to the dataset.
    #H5D_ALLOC_TIME_LATEAll space is allocated when data is first written to + * the dataset.
    + * + * \note H5Pget_alloc_time() is designed to work in concert with the + * dataset fill value and fill value write time properties, set + * with the functions H5Pget_fill_value() and H5Pget_fill_time(). + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/); +/** + * \ingroup DCPL + * + * \brief Retrieves the size of chunks for the raw data of a chunked + * layout dataset + * + * \dcpl_id{plist_id} + * \param[in] max_ndims Size of the \p dims array + * \param[out] dim Array to store the chunk dimensions + * + * \return Returns chunk dimensionality if successful; + * otherwise returns a negative value. + * + * \details H5Pget_chunk() retrieves the size of chunks for the raw data + * of a chunked layout dataset. This function is only valid for + * dataset creation property lists. At most, \p max_ndims elements + * of \p dim will be initialized. + * + * \since 1.0.0 + * + */ +H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/); +/** + * + * \ingroup DCPL + * + * \brief Retrieves the edge chunk option setting from a dataset creation + * property list + * + * \dcpl_id{plist_id} + * \param[out] opts Edge chunk option flag. Valid values are described in + * H5Pset_chunk_opts(). The option status can be + * retrieved using the bitwise AND operator ( & ). For + * example, the expression + * (opts&#H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) will + * evaluate to #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS if + * that option has been enabled. Otherwise, it will + * evaluate to 0 (zero). + * + * \return \herr_t + * + * \details H5Pget_chunk_opts() retrieves the edge chunk option setting + * stored in the dataset creation property list \p plist_id. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); +/** + * \ingroup DCPL + * + * \brief Retrieves the setting for whether or not to create minimized + * dataset object headers + * + * \dcpl_id + * \param[out] minimize Flag indicating whether the library will or will + * not create minimized dataset object headers + * + * \return \herr_t + * + * \details H5Pget_dset_no_attrs_hint() retrieves the + * no dataset attributes hint setting for the dataset + * creation property list \p dcpl_id. This setting is used to + * inform the library to create minimized dataset object headers + * when TRUE. The setting value is returned in the boolean pointer + * \p minimize. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize); +/** + * \ingroup DCPL + * + * \brief Returns information about an external file + * + * \dcpl_id{plist_id} + * \param[in] idx External file index + * \param[in] name_size Maximum length of \p name array + * \param[out] name Name of the external file + * \param[out] offset Pointer to a location to return an offset value + * \param[out] size Pointer to a location to return the size of the + * external file data + * + * \return \herr_t + * + * \details H5Pget_external() returns information about an external file. + * The external file is specified by its index, \p idx, which + * is a number from zero to N-1, where N is the value returned + * by H5Pget_external_count(). At most \p name_size characters + * are copied into the \p name array. If the external file name + * is longer than \p name_size with the null terminator, the + * return value is not null terminated (similar to strncpy()). + * + * If \p name_size is zero or \p name is the null pointer, the + * external file name is not returned. If \p offset or \p size + * are null pointers then the corresponding information is not + * returned. + * + * \version 1.6.4 \p idx parameter type changed to unsigned. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out*/, + off_t *offset /*out*/, hsize_t *size /*out*/); +/** + * \ingroup DCPL + * + * \brief Returns the number of external files for a dataset + * + * \dcpl_id{plist_id} + * + * \return Returns the number of external files if successful; otherwise + * returns a negative value. + * + * \details H5Pget_external_count() returns the number of external files + * for the specified dataset. + * + * \since 1.0.0 + * + */ +H5_DLL int H5Pget_external_count(hid_t plist_id); +/** + * \ingroup DCPL + * + * \brief Retrieves the time when fill values are written to a dataset + * + * \dcpl_id{plist_id} + * \param[out] fill_time Setting for the timing of writing fill values to + * the dataset + * + * \return \herr_t + * + * \details H5Pget_fill_time() examines the dataset creation property list + * \p plist_id to determine when fill values are to be written to + * a dataset. Valid values returned in \p fill_time are as + * follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5D_FILL_TIME_IFSETFill values are written to the dataset when storage + * space is allocated only if there is a user-defined fill + * value, i.e., one set with H5Pset_fill_value(). (Default) + *
    #H5D_FILL_TIME_ALLOCFill values are written to the dataset when storage + * space is allocated.
    #H5D_FILL_TIME_NEVERFill values are never written to the dataset.
    + * + * \note H5Pget_fill_time() is designed to work in coordination with the + * dataset fill value and dataset storage allocation time properties, + * retrieved with the functions H5Pget_fill_value() and + * H5Pget_alloc_time(). + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/); +/** + * \ingroup DCPL + * + * \brief Retrieves a dataset fill value + * + * \dcpl_id{plist_id} + * \param[in] type_id Datatype identifier for the value passed via + * \p value + * \param[out] value Pointer to buffer to contain the returned + * fill value + * + * \return \herr_t + * + * \details H5Pget_fill_value() returns the dataset fill value defined in + * the dataset creation property list \p plist_id. The fill value + * is returned through the \p value pointer and will be converted + * to the datatype specified by \p type_id. This datatype may + * differ from the fill value datatype in the property list, but + * the HDF5 library must be able to convert between the two + * datatypes. + * + * If the fill value is undefined, i.e., set to NULL in the + * property list, H5Pget_fill_value() will return an error. + * H5Pfill_value_defined() should be used to check for this + * condition before H5Pget_fill_value() is called. + * + * Memory must be allocated by the calling application. + * + * \note H5Pget_fill_value() is designed to coordinate with the dataset + * storage allocation time and fill value write time properties, + * which can be retrieved with the functions H5Pget_alloc_time() + * and H5Pget_fill_time(), respectively. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/); +/** + * \ingroup DCPL + * + * \brief Returns the layout of the raw data for a dataset + * + * \dcpl_id{plist_id} + * + * \return Returns the layout type (a non-negative value) of a dataset + * creation property list if successful. Valid return values are: + * - #H5D_COMPACT: Raw data is stored in the object header in the + * file. + * - #H5D_CONTIGUOUS: Raw data is stored separately from the object + * header in one contiguous chunk in the file. + * - #H5D_CHUNKED: Raw data is stored separately from the object + * header in chunks in separate locations in the + * file. + * - #H5D_VIRTUAL: Raw data is drawn from multiple datasets in + * different files. + * \return + * Otherwise, returns a negative value indicating failure. + * + * \details H5Pget_layout() returns the layout of the raw data for a + * dataset. This function is only valid for dataset creation + * property lists. + * + * Note that a compact storage layout may affect writing data to + * the dataset with parallel applications. See the H5Dwrite() + * documentation for details. + * + * \version 1.10.0 #H5D_VIRTUAL added in this release. + * + * \since 1.0.0 + * + */ +H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); +/** + * \ingroup DCPL + * + * \brief Gets the number of mappings for the virtual dataset + * + * \dcpl_id + * \param[out] count The number of mappings + * + * \return \herr_t + * + * \details H5Pget_virtual_count() gets the number of mappings for a + * virtual dataset that has the creation property list specified + * by \p dcpl_id. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/); +/** + * \ingroup DCPL + * + * \brief Gets the name of a source dataset used in the mapping + * + * \dcpl_id + * \param[in] index Mapping index. The value of \p index is 0 (zero) or + * greater and less than \p count + * (0 ≤ \p index < \p count), where \p count is the + * number of mappings returned by H5Pget_virtual_count(). + * \param[out] name A buffer containing the name of the source dataset + * \param[in] size The size, in bytes, of the name buffer. Must be the + * size of the dataset name in bytes plus 1 for a NULL + * terminator + * + * \return Returns the length of the dataset name if successful; + * otherwise returns a negative value. + * + * \details H5Pget_virtual_dsetname() takes the dataset creation property + * list for the virtual dataset, \p dcpl_id, the mapping index, + * \p index, the size of the dataset name for a source dataset, + * \p size, and retrieves the name of the source dataset used in + * the mapping. + * + * Up to \p size characters of the dataset name are returned in + * \p name; additional characters, if any, are not returned to + * the user application. + * + * If the length of the dataset name, which determines the + * required value of \p size, is unknown, a preliminary call + * to H5Pget_virtual_dsetname() with the last two parameters + * set to NULL and zero respectively can be made. The return + * value of this call will be the size in bytes of the dataset + * name. That value, plus 1 for a NULL terminator, must then be + * assigned to \p size for a second H5Pget_virtual_dsetname() + * call, which will retrieve the actual dataset name. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); +/** + * \ingroup DCPL + * + * \brief Gets the filename of a source dataset used in the mapping + * + * \dcpl_id + * \param[in] index Mapping index. The value of \p index is 0 (zero) or + * greater and less than \p count + * (0 ≤ \p index < \p count), where \p count is the + * number of mappings returned by H5Pget_virtual_count(). + * \param[out] name A buffer containing the name of the file containing + * the source dataset + * \param[in] size The size, in bytes, of the name buffer. Must be the + * size of the filename in bytes plus 1 for a NULL + * terminator + * + * \return Returns the length of the filename if successful; otherwise + * returns a negative value. + * + * \details H5Pget_virtual_filename() takes the dataset creation property + * list for the virtual dataset, \p dcpl_id, the mapping index, + * \p index, the size of the filename for a source dataset, + * \p size, and retrieves the name of the file for a source dataset + * used in the mapping. + * + * Up to \p size characters of the filename are returned in + * \p name; additional characters, if any, are not returned to + * the user application. + * + * If the length of the filename, which determines the required + * value of \p size, is unknown, a preliminary call to + * H5Pget_virtual_filename() with the last two parameters set + * to NULL and zero respectively can be made. The return value + * of this call will be the size in bytes of the filename. That + * value, plus 1 for a NULL terminator, must then be assigned to + * \p size for a second H5Pget_virtual_filename() call, which + * will retrieve the actual filename. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name /*out*/, size_t size); +/** + * \ingroup DCPL + * + * \brief Gets a dataspace identifier for the selection within the source + * dataset used in the mapping + * + * \dcpl_id + * \param[in] index Mapping index. The value of \p index is 0 (zero) or + * greater and less than \p count + * (0 ≤ \p index < \p count), where \p count is the number + * of mappings returned by H5Pget_virtual_count(). + * + * \return \hid_t{valid dataspace identifier} + * + * \details H5Pget_virtual_srcspace() takes the dataset creation property + * list for the virtual dataset, \p dcpl_id, and the mapping + * index, \p index, and returns a dataspace identifier for the + * selection within the source dataset used in the mapping. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); +/** + * \ingroup DCPL + * + * \brief Gets a dataspace identifier for the selection within the virtual + * dataset used in the mapping + * + * \dcpl_id + * \param[in] index Mapping index. The value of \p index is 0 (zero) or + * greater and less than \p count + * (0 ≤ \p index < \p count), where \p count is the number + * of mappings returned by H5Pget_virtual_count() + * + * \return \hid_t{valid dataspace identifier} + * + * \details H5Pget_virtual_vspace() takes the dataset creation property + * list for the virtual dataset, \p dcpl_id, and the mapping + * index, \p index, and returns a dataspace identifier for the + * selection within the virtual dataset used in the mapping. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); +/** + * \ingroup DCPL + * + * \brief Sets the timing for storage space allocation + * + * \dcpl_id{plist_id} + * \param[in] alloc_time When to allocate dataset storage space + * + * \return \herr_t + * + * \details H5Pset_alloc_time() sets up the timing for the allocation of + * storage space for a dataset's raw data. This property is set + * in the dataset creation property list \p plist_id. Timing is + * specified in \p alloc_time with one of the following values: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5D_ALLOC_TIME_DEFAULTAllocate dataset storage space at the default time
    + * (Defaults differ by storage method.)
    #H5D_ALLOC_TIME_EARLYAllocate all space when the dataset is created
    + * (Default for compact datasets.)
    #H5D_ALLOC_TIME_INCRAllocate space incrementally, as data is written to + * the dataset
    (Default for chunked storage datasets.) + * + * \li Chunked datasets: Storage space allocation for each + * chunk is deferred until data is written to the chunk. + * \li Contiguous datasets: Incremental storage space + * allocation for contiguous data is treated as late + * allocation. + * \li Compact datasets: Incremental allocation is not + * allowed with compact datasets; H5Pset_alloc_time() + * will return an error.
    #H5D_ALLOC_TIME_LATEAllocate all space when data is first written to the + * dataset
    + * (Default for contiguous datasets.)
    + * + * \note H5Pset_alloc_time() is designed to work in concert with the + * dataset fill value and fill value write time properties, set + * with the functions H5Pset_fill_value() and H5Pset_fill_time(). + * + * \note See H5Dcreate() for further cross-references. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); +/** + * \ingroup DCPL + * + * \brief Sets the size of the chunks used to store a chunked layout + * dataset + * + * \dcpl_id{plist_id} + * \param[in] ndims The number of dimensions of each chunk + * \param[in] dim An array defining the size, in dataset elements, of + * each chunk + * + * \return \herr_t + * \details H5Pset_chunk() sets the size of the chunks used to store a + * chunked layout dataset. This function is only valid for dataset + * creation property lists. + * + * The \p ndims parameter currently must be the same size as the + * rank of the dataset. + * + * The values of the \p dim array define the size of the chunks + * to store the dataset's raw data. The unit of measure for \p dim + * values is dataset elements. + * + * As a side-effect of this function, the layout of the dataset is + * changed to #H5D_CHUNKED, if it is not already so set. + * + * \note Chunk size cannot exceed the size of a fixed-size dataset. For + * example, a dataset consisting of a 5x4 fixed-size array cannot be + * defined with 10x10 chunks. Chunk maximums: + * - The maximum number of elements in a chunk is 232-1 which + * is equal to 4,294,967,295. If the number of elements in a chunk is + * set via H5Pset_chunk() to a value greater than 232-1, + * then H5Pset_chunk() will fail. + * - The maximum size for any chunk is 4GB. If a chunk that is larger + * than 4GB attempts to be written with H5Dwrite(), then H5Dwrite() + * will fail. + * + * \see H5Pset_layout(), H5Dwrite() + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]); +/** + * \ingroup DCPL + * + * \brief Sets the edge chunk option in a dataset creation property list + * + * \dcpl_id{plist_id} + * \param[in] opts Edge chunk option flag. Valid values are: + * \li #H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS + * When enabled, filters are not applied to partial + * edge chunks. When disabled, partial edge chunks are + * filtered. Enabling this option will improve + * performance when appending to the dataset and, when + * compression filters are used, prevent reallocation + * of these chunks. Datasets created with this option + * enabled will be inaccessible with HDF5 library + * versions before Release 1.10. Default: \e Disabled + * \li 0 (zero) Disables option; partial edge chunks + * will be compressed. + * + * \return \herr_t + * + * \details H5Pset_chunk_opts() sets the edge chunk option in the + * dataset creation property list \p dcpl_id. + * + * The available option is detailed in the parameters section. + * Only chunks that are not completely filled by the dataset’s + * dataspace are affected by this option. Such chunks are + * referred to as partial edge chunks. + * + * \b Motivation: H5Pset_chunk_opts() is used to specify storage + * options for chunks on the edge of a dataset’s dataspace. This + * capability allows the user to tune performance in cases where + * the dataset size may not be a multiple of the chunk size and + * the handling of partial edge chunks can impact performance. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); +/** + * \ingroup DCPL + * + * \brief Sets the flag to create minimized dataset object headers + * + * \dcpl_id + * \param[in] minimize Flag for indicating whether or not a dataset's + * object header will be minimized + * + * \return \herr_t + * + * \details H5Pset_dset_no_attrs_hint() sets the no dataset attributes + * hint setting for the dataset creation property list \p dcpl_id. + * Datasets created with the dataset creation property list + * \p dcpl_id will have their object headers minimized if the + * boolean flag \p minimize is set to TRUE. By setting \p minimize + * to TRUE, the library expects that no attributes will be added + * to the dataset. Attributes can be added, but they are appended + * with a continuation message, which can reduce performance. + * + * This setting interacts with H5Fset_dset_no_attrs_hint(): if + * either is set to TRUE, then the created dataset's object header + * will be minimized. + * + * \since 1.10.5 + * + */ +H5_DLL herr_t H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize); +/** + * \ingroup DCPL + * + * \brief Adds an external file to the list of external files + * + * \dcpl_id{plist_id} + * \param[in] name Name of an external file + * \param[in] offset Offset, in bytes, from the beginning of the file to + * the location in the file where the data starts + * \param[in] size Number of bytes reserved in the file for the data + * + * \return \herr_t + * + * \details The first call to H5Pset_external() sets the external + * storage property in the property list, thus designating that + * the dataset will be stored in one or more non-HDF5 file(s) + * external to the HDF5 file. This call also adds the file + * \p name as the first file in the list of external files. + * Subsequent calls to the function add the named file as the + * next file in the list. + * + * If a dataset is split across multiple files, then the files + * should be defined in order. The total size of the dataset is + * the sum of the \p size arguments for all the external files. + * If the total size is larger than the size of a dataset then + * the dataset can be extended (provided the data space also + * allows the extending). + * + * The \p size argument specifies the number of bytes reserved + * for data in the external file. If \p size is set to + * #H5F_UNLIMITED, the external file can be of unlimited size + * and no more files can be added to the external files list. + * If \p size is set to 0 (zero), no external file will actually + * be created. + * + * All of the external files for a given dataset must be specified + * with H5Pset_external() before H5Dcreate() is called to create + * the dataset. If one these files does not exist on the system + * when H5Dwrite() is called to write data to it, the library + * will create the file. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); +/** + * \ingroup DCPL + * + * \brief Sets the time when fill values are written to a dataset + * + * \dcpl_id{plist_id} + * \param[in] fill_time When to write fill values to a dataset + * + * \return \herr_t + * + * \details H5Pset_fill_time() sets up the timing for writing fill values + * to a dataset. This property is set in the dataset creation + * property list \p plist_id. Timing is specified in \p fill_time + * with one of the following values: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5D_FILL_TIME_IFSETWrite fill values to the dataset when storage space is + * allocated only if there is a user-defined fill value, + * i.e.,one set with H5Pset_fill_value(). (Default)
    #H5D_FILL_TIME_ALLOCWrite fill values to the dataset when storage space is + * allocated.
    #H5D_FILL_TIME_NEVERNever write fill values to the dataset.
    + * + * \note H5Pset_fill_time() is designed for coordination with the dataset + * fill value and dataset storage allocation time properties, set + * with the functions H5Pset_fill_value() and H5Pset_alloc_time(). + * See H5Dcreate() for further cross-references. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); +/** + * \ingroup DCPL + * + * \brief Sets the fill value for a dataset + * + * \dcpl_id{plist_id} + * \param[in] type_id Datatype of \p value + * \param[in] value Pointer to buffer containing value to use as + * fill value + * + * \return \herr_t + * + * \details H5Pset_fill_value() sets the fill value for a dataset in the + * dataset creation property list. \p value is interpreted as + * being of datatype \p type_id. This datatype may differ from + * that of the dataset, but the HDF5 library must be able to + * convert \p value to the dataset datatype when the dataset is + * created. + * + * The default fill value is 0 (zero), which is interpreted + * according to the actual dataset datatype. + * + * Setting \p value to NULL indicates that the fill value is to + * be undefined. + * + * \note Applications sometimes write data only to portions of an allocated + * dataset. It is often useful in such cases to fill the unused space + * with a known fill value. This function allows the user application + * to set that fill value; the functions H5Dfill() and + * H5Pset_fill_time(), respectively, provide the ability to apply the + * fill value on demand or to set up its automatic application. + * + * \note A fill value should be defined so that it is appropriate for the + * application. While the HDF5 default fill value is 0 (zero), it is + * often appropriate to use another value. It might be useful, for + * example, to use a value that is known to be impossible for the + * application to legitimately generate. + * + * \note H5Pset_fill_value() is designed to work in concert with + * H5Pset_alloc_time() and H5Pset_fill_time(). H5Pset_alloc_time() + * and H5Pset_fill_time() govern the timing of dataset storage + * allocation and fill value write operations and can be important in + * tuning application performance. + * + * \note See H5Dcreate() for further cross-references. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); +/** + * \ingroup DCPL + * + * \brief Sets up use of the shuffle filter + * + * \dcpl_id{plist_id} + * + * \return \herr_t + * + * \details H5Pset_shuffle() sets the shuffle filter, #H5Z_FILTER_SHUFFLE, + * in the dataset creation property list \p plist_id. The shuffle + * filter de-interlaces a block of data by reordering the bytes. + * All the bytes from one consistent byte position of each data + * element are placed together in one block; all bytes from a + * second consistent byte position of each data element are placed + * together a second block; etc. For example, given three data + * elements of a 4-byte datatype stored as 012301230123, shuffling + * will re-order data as 000111222333. This can be a valuable step + * in an effective compression algorithm because the bytes in each + * byte position are often closely related to each other and + * putting them together can increase the compression ratio. + * + * As implied above, the primary value of the shuffle filter lies + * in its coordinated use with a compression filter; it does not + * provide data compression when used alone. When the shuffle + * filter is applied to a dataset immediately prior to the use of + * a compression filter, the compression ratio achieved is often + * superior to that achieved by the use of a compression filter + * without the shuffle filter. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); +/** + * \ingroup DCPL + * + * \brief Sets the type of storage used to store the raw data for a dataset + * + * \dcpl_id{plist_id} + * \param[in] layout Type of storage layout for raw data + * + * \return \herr_t + * \details H5Pset_layout() sets the type of storage used to store the raw + * data for a dataset. This function is only valid for dataset + * creation property lists. + * + * Valid values for \p layout are: + * - #H5D_COMPACT: Store raw data in the dataset object header + * in file. This should only be used for datasets + * with small amounts of raw data. The raw data + * size limit is 64K (65520 bytes). Attempting + * to create a dataset with raw data larger than + * this limit will cause the H5Dcreate() call to + * fail. + * - #H5D_CONTIGUOUS: Store raw data separately from the object + * header in one large chunk in the file. + * - #H5D_CHUNKED: Store raw data separately from the object header + * as chunks of data in separate locations in + * the file. + * - #H5D_VIRTUAL: Draw raw data from multiple datasets in + * different files. + * + * Note that a compact storage layout may affect writing data to + * the dataset with parallel applications. See the note in + * H5Dwrite() documentation for details. + * \version 1.10.0 #H5D_VIRTUAL added in this release. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); +/** + * \ingroup DCPL + * + * \brief Sets up the use of the N-Bit filter + * + * \dcpl_id{plist_id} + * + * \return \herr_t + * + * \details H5Pset_nbit() sets the N-Bit filter, #H5Z_FILTER_NBIT, in the + * dataset creation property list \p plist_id. + * + * The HDF5 user can create an N-Bit datatype with the following + * code: + *
    + *          hid_t nbit_datatype = H5Tcopy(H5T_STD_I32LE);
    + *          H5Tset_precision(nbit_datatype, 16);
    + *          H5Tset_offset(nbit_datatype, 4);
    + *          
    + * + * In memory, one value of the N-Bit datatype in the above example + * will be stored on a little-endian machine as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    byte 3byte 2byte 1byte 0
    ????????????SPPPPPPPPPPPPPPP????
    + * Note: S - sign bit, P - significant bit, ? - padding bit; For + * signed integer, the sign bit is included in the precision. + * + * When data of the above datatype is stored on disk using the + * N-bit filter, all padding bits are chopped off and only + * significant bits are stored. The values on disk will be + * something like: + * + * + * + * + * + * + * + * + * + * + * + * + *
    1st value2nd value...
    SPPPPPPPPPPPPPPPSPPPPPPPPPPPPPPP...
    + * The N-Bit filter is used effectively for compressing data of + * an N-Bit datatype as well as a compound and an array + * datatype with N-Bit fields. However, the datatype classes of + * the N-Bit datatype or the N-Bit field of the compound + * datatype or the array datatype are limited to integer or + * floating-point. + * + * The N-Bit filter supports complex situations where a compound + * datatype contains member(s) of a compound datatype or an array + * datatype that has a compound datatype as the base type. + * However, it does not support the situation where an array + * datatype has a variable-length or variable-length string as + * its base datatype. The filter does support the situation where + * a variable-length or variable-length string is a member of a + * compound datatype. + * + * The N-Bit filter allows all other HDF5 datatypes (such as + * time, string, bitfield, opaque, reference, enum, and variable + * length) to pass through as a no-op. + * + * Like other I/O filters supported by the HDF5 library, + * application using the N-Bit filter must store data with + * chunked storage. + * + * By nature, the N-Bit filter should not be used together with + * other I/O filters. + * + * \version 1.8.8 Fortran subroutine introduced in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_nbit(hid_t plist_id); +/** + * \ingroup DCPL + * + * \brief Sets up the use of the scale-offset filter + * + * \dcpl_id{plist_id} + * \param[in] scale_type Flag indicating compression method + * \param[in] scale_factor Parameter related to scale. Must be + * non-negative + * + * \return \herr_t + * + * \details H5Pset_scaleoffset() sets the scale-offset filter, + * #H5Z_FILTER_SCALEOFFSET, for a dataset. + * + * Generally speaking, scale-offset compression performs a scale and/or + * offset operation on each data value and truncates the resulting + * value to a minimum number of bits (MinBits) before storing it. The + * current scale-offset filter supports integer and floating-point + * datatypes. + * + * For an integer datatype, the parameter \p scale_type should be set + * to #H5Z_SO_INT (2). The parameter \p scale_factor denotes MinBits. + * If the user sets it to H5Z_SO_INT_MINBITS_DEFAULT (0), the filter + * will calculate MinBits. If \p scale_factor is set to a positive + * integer, the filter does not do any calculation and just uses the + * number as MinBits. However, if the user gives a MinBits that is less + * than what would be generated by the filter, the compression will be + * lossy. Also, the MinBits supplied by the user cannot exceed the + * number of bits to store one value of the dataset datatype. + * + * For a floating-point datatype, the filter adopts the GRiB data + * packing mechanism, which offers two alternate methods: E-scaling and + * D-scaling. Both methods are lossy compression. If the parameter + * \p scale_type is set to #H5Z_SO_FLOAT_DSCALE (0), the filter will + * use the D-scaling method; if it is set to #H5Z_SO_FLOAT_ESCALE (1), + * the filter will use the E-scaling method. Since only the D-scaling + * method is implemented, \p scale_type should be set to + * #H5Z_SO_FLOAT_DSCALE or 0. + * + * When the D-scaling method is used, the original data is "D" scaled + * — multiplied by 10 to the power of \p scale_factor, and the + * "significant" part of the value is moved to the left of the decimal + * point. Care should be taken in setting the decimal \p scale_factor + * so that the integer part will have enough precision to contain the + * appropriate information of the data value. For example, if + * \p scale_factor is set to 2, the number 104.561 will be 10456.1 + * after "D" scaling. The last digit 1 is not "significant" and is + * thrown off in the process of rounding. The user should make sure that + * after "D" scaling and rounding, the data values are within the range + * that can be represented by the integer (same size as the + * floating-point type). + * + * Valid values for scale_type are as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5Z_SO_FLOAT_DSCALE (0)Floating-point type, using variable MinBits method
    #H5Z_SO_FLOAT_ESCALE (1)Floating-point type, using fixed MinBits method
    #H5Z_SO_INT (2)Integer type
    + * + * The meaning of \p scale_factor varies according to the value + * assigned to \p scale_type: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    \p scale_type value\p scale_factor description
    #H5Z_SO_FLOAT_DSCALEDenotes the decimal scale factor for D-scaling and can be + * positive, negative or zero. This is the current + * implementation of the library.
    #H5Z_SO_FLOAT_ESCALEDenotes MinBits for E-scaling and must be a positive integer. + * This is not currently implemented by the library.
    #H5Z_SO_INTDenotes MinBits and it should be a positive integer or + * #H5Z_SO_INT_MINBITS_DEFAULT (0). If it is less than 0, the + * library will reset it to 0 since it is not implemented. + *
    + * Like other I/O filters supported by the HDF5 library, an + * application using the scale-offset filter must store data with + * chunked storage. + * + * \version 1.8.8 Fortran90 subroutine introduced in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); +/** + * \ingroup DCPL + * + * \brief Sets up use of the SZIP compression filter + * + * \dcpl_id{plist_id} + * \param[in] options_mask A bit-mask conveying the desired SZIP options; + * Valid values are #H5_SZIP_EC_OPTION_MASK and + * #H5_SZIP_NN_OPTION_MASK. + * \param[in] pixels_per_block The number of pixels or data elements in each + * data block + * + * \return \herr_t + * + * \details H5Pset_szip() sets an SZIP compression filter, #H5Z_FILTER_SZIP, + * for a dataset. SZIP is a compression method designed for use with + * scientific data. + * + * Before proceeding, all users should review the “Limitations” + * section below. + * + * Users familiar with SZIP outside the HDF5 context may benefit + * from reviewing the Note “For Users Familiar with SZIP in Other + * Contexts” below. + * + * In the text below, the term pixel refers to an HDF5 data element. + * This terminology derives from SZIP compression's use with image + * data, where pixel referred to an image pixel. + * + * The SZIP \p bits_per_pixel value (see Note, below) is automatically + * set, based on the HDF5 datatype. SZIP can be used with atomic + * datatypes that may have size of 8, 16, 32, or 64 bits. + * Specifically, a dataset with a datatype that is 8-, 16-, 32-, or + * 64-bit signed or unsigned integer; char; or 32- or 64-bit float + * can be compressed with SZIP. See Note, below, for further + * discussion of the the SZIP \p bits_per_pixel setting. + * + * SZIP options are passed in an options mask, \p options_mask, + * as follows. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    OptionDescription (Mutually exclusive; select one.)
    #H5_SZIP_EC_OPTION_MASKSelects entropy coding method
    #H5_SZIP_NN_OPTION_MASKSelects nearest neighbor coding method
    + * + * The following guidelines can be used in determining which + * option to select: + * + * - The entropy coding method, the EC option specified by + * #H5_SZIP_EC_OPTION_MASK, is best suited for data that has been + * processed. The EC method works best for small numbers. + * - The nearest neighbor coding method, the NN option specified + * by #H5_SZIP_NN_OPTION_MASK, preprocesses the data then the + * applies EC method as above. + * + * Other factors may affect results, but the above criteria + * provides a good starting point for optimizing data compression. + * + * SZIP compresses data block by block, with a user-tunable block + * size. This block size is passed in the parameter + * \p pixels_per_block and must be even and not greater than 32, + * with typical values being 8, 10, 16, or 32. This parameter + * affects compression ratio; the more pixel values vary, the + * smaller this number should be to achieve better performance. + * + * In HDF5, compression can be applied only to chunked datasets. + * If \p pixels_per_block is bigger than the total number of + * elements in a dataset chunk, H5Pset_szip() will succeed but + * the subsequent call to H5Dcreate() will fail; the conflict + * can be detected only when the property list is used. + * + * To achieve optimal performance for SZIP compression, it is + * recommended that a chunk's fastest-changing dimension be equal + * to N times \p pixels_per_block where N is the maximum number of + * blocks per scan line allowed by the SZIP library. In the + * current version of SZIP, N is set to 128. + * + * SZIP compression is an optional HDF5 filter. + * + * \b Limitations: + * + * - SZIP compression cannot be applied to compound, array, + * variable-length, enumeration, or any other user-defined + * datatypes. If an SZIP filter is set in a dataset creation + * property list used to create a dataset containing a + * non-allowed datatype, the call to H5Dcreate() will fail; the + * conflict can be detected only when the property list is used. + * - Users should be aware that there are factors that affect one’s + * rights and ability to use SZIP compression by reviewing the + * SZIP copyright notice. + * + * \note \b For \b Users \b Familiar \b with \b SZIP \b in \b Other \b Contexts: + * + * \note The following notes are of interest primarily to those who have + * used SZIP compression outside of the HDF5 context. + * In non-HDF5 applications, SZIP typically requires that the user + * application supply additional parameters: + * - \p pixels_in_object, the number of pixels in the object to + * be compressed + * - \p bits_per_pixel, the number of bits per pixel + * - \p pixels_per_scanline, the number of pixels per scan line + * + * \note These values need not be independently supplied in the HDF5 + * environment as they are derived from the datatype and dataspace, + * which are already known. In particular, HDF5 sets + * \p pixels_in_object to the number of elements in a chunk and + * \p bits_per_pixel to the size of the element or pixel datatype. + * + * \note The following algorithm is used to set \p pixels_per_scanline: + * - If the size of a chunk's fastest-changing dimension, size, + * is greater than 4K, set \p pixels_per_scanline to 128 times + * \p pixels_per_block. + * - If size is less than 4K but greater than \p pixels_per_block, + * set \p pixels_per_scanline to the minimum of size and 128 + * times \p pixels_per_block. + * - If size is less than \p pixels_per_block but greater than the + * number elements in the chunk, set \p pixels_per_scanline to + * the minimum of the number elements in the chunk and 128 times + * \p pixels_per_block. + * + * \note The HDF5 datatype may have precision that is less than the full + * size of the data element, e.g., an 11-bit integer can be defined + * using H5Tset_precision(). To a certain extent, SZIP can take + * advantage of the precision of the datatype to improve compression: + * - If the HDF5 datatype size is 24-bit or less and the offset of + * the bits in the HDF5 datatype is zero (see H5Tset_offset() or + * H5Tget_offset()), the data is the in lowest N bits of the data + * element. In this case, the SZIP \p bits_per_pixel is set to the + * precision of the HDF5 datatype. + * - If the offset is not zero, the SZIP \p bits_per_pixel will be + * set to the number of bits in the full size of the data element. + * - If the HDF5 datatype precision is 25-bit to 32-bit, the SZIP + * \p bits_per_pixel will be set to 32. + * - If the HDF5 datatype precision is 33-bit to 64-bit, the SZIP + * \p bits_per_pixel will be set to 64. + * + * \note HDF5 always modifies the options mask provided by the user to set up + * usage of RAW_OPTION_MASK, ALLOW_K13_OPTION_MASK, and one of + * LSB_OPTION_MASK or MSB_OPTION_MASK, depending on endianness of the + * datatype. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); + +/** + * \ingroup DCPL + * + * \brief Sets the mapping between virtual and source datasets + * + * \dcpl_id + * \param[in] vspace_id The dataspace identifier with the selection within the + * virtual dataset applied, possibly an unlimited selection + * \param[in] src_file_name The name of the HDF5 file where the source dataset is + * located or a \Code{"."} (period) for a source dataset in the same + * file. The file might not exist yet. The name can be specified using + * a C-style \c printf statement as described below. + * \param[in] src_dset_name The path to the HDF5 dataset in the file specified by + * \p src_file_name. The dataset might not exist yet. The dataset name + * can be specified using a C-style \c printf statement as described below. + * \param[in] src_space_id The source dataset’s dataspace identifier with a + * selection applied, possibly an unlimited selection + * \return \herr_t + * + * \details H5Pset_virtual() maps elements of the virtual dataset (VDS) + * described by the virtual dataspace identifier \p vspace_id to the + * elements of the source dataset described by the source dataset + * dataspace identifier \p src_space_id. The source dataset is + * identified by the name of the file where it is located, + * \p src_file_name, and the name of the dataset, \p src_dset_name. + * + * \par C-style \c printf Formatting Statements: + * C-style \c printf formatting allows a pattern to be specified in the name + * of a source file or dataset. Strings for the file and dataset names are + * treated as literals except for the following substitutions: + * + * + * + * + * + * + * + * + * + *
    \Code{"%%"}Replaced with a single \Code{"%"} (percent) character.
    "%b"Where "" is the virtual dataset dimension axis (0-based) + * and \Code{"b"} indicates that the block count of the selection in that + * dimension should be used. The full expression (for example, \Code{"%0b"}) + * is replaced with a single numeric value when the mapping is evaluated at + * VDS access time. Example code for many source and virtual dataset mappings + * is available in the "Examples of Source to Virtual Dataset Mapping" + * chapter in the + * + * RFC: HDF5 Virtual Dataset. + *
    + * If the printf form is used for the source file or dataset names, the + * selection in the source dataset’s dataspace must be fixed-size. + * + * \par Source File Resolutions: + * When a source dataset residing in a different file is accessed, the + * library will search for the source file \p src_file_name as described + * below: + * \li If \p src_file_name is a \Code{"."} (period) then it refers to the + * file containing the virtual dataset. + * \li If \p src_file_name is a relative pathname, the following steps are + * performed: + * - The library will get the prefix(es) set in the environment + * variable \c HDF5_VDS_PREFIX and will try to prepend each prefix + * to \p src_file_name to form a new \p src_file_name. If the new + * \p src_file_name does not exist or if \c HDF5_VDS_PREFIX is not + * set, the library will get the prefix set via H5Pset_virtual_prefix() + * and prepend it to \p src_file_name to form a new \p src_file_name. + * If the new \p src_file_name does not exist or no prefix is being + * set by H5Pset_virtual_prefix() then the path of the file containing + * the virtual dataset is obtained. This path can be the absolute path + * or the current working directory plus the relative path of that + * file when it is created/opened. The library will prepend this path + * to \p src_file_name to form a new \p src_file_name. + * - If the new \p src_file_name does not exist, then the library will + * look for \p src_file_name and will return failure/success accordingly. + * \li If \p src_file_name is an absolute pathname, the library will first + * try to find \p src_file_name. If \p src_file_name does not exist, + * \p src_file_name is stripped of directory paths to form a new + * \p src_file_name. The search for the new \p src_file_name then follows + * the same steps as described above for a relative pathname. See + * examples below illustrating how \p src_file_name is stripped to form + * a new \p src_file_name. + * \par + * Note that \p src_file_name is considered to be an absolute pathname when + * the following condition is true: + * \li For Unix, the first character of \p src_file_name is a slash + * (\Code{/}).\n For example, consider a \p src_file_name of + * \Code{/tmp/A.h5}. If that source file does not exist, the new + * \p src_file_name after stripping will be \Code{A.h5}. + * \li For Windows, there are 6 cases: + * 1. \p src_file_name is an absolute drive with absolute pathname.\n + * For example, consider a \p src_file_name of \Code{/tmp/A.h5}. + * If that source file does not exist, the new \p src_file_name + * after stripping will be \Code{A.h5}. + * 2. \p src_file_name is an absolute pathname without specifying + * drive name.\n For example, consider a \p src_file_name of + * \Code{/tmp/A.h5}. If that source file does not exist, the new + * \p src_file_name after stripping will be \Code{A.h5}. + * 3. \p src_file_name is an absolute drive with relative pathname.\n + * For example, consider a \p src_file_name of \Code{/tmp/A.h5}. + * If that source file does not exist, the new \p src_file_name + * after stripping will be \Code{tmp/A.h5}. + * 4. \p src_file_name is in UNC (Uniform Naming Convention) format + * with server name, share name, and pathname.\n + * For example, consider a \p src_file_name of \Code{/tmp/A.h5}. + * If that source file does not exist, the new \p src_file_name + * after stripping will be \Code{A.h5}. + * 5. \p src_file_name is in Long UNC (Uniform Naming Convention) + * format with server name, share name, and pathname.\n + * For example, consider a \p src_file_name of \Code{/tmp/A.h5}. + * If that source file does not exist, the new \p src_file_name + * after stripping will be \Code{A.h5}. + * 6. \p src_file_name is in Long UNC (Uniform Naming Convention) + * format with an absolute drive and an absolute pathname.\n + * For example, consider a \p src_file_name of \Code{/tmp/A.h5}. + * If that source file does not exist, the new \p src_file_name + * after stripping will be \Code{A.h5} + * + * \see + * Virtual Dataset Overview + * + * \see_virtual + * + * \version 1.10.2 A change was made to the method of searching for VDS source files. + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, + const char *src_dset_name, hid_t src_space_id); + +/* Dataset access property list (DAPL) routines */ +/** + * \ingroup DAPL + * + * \brief Retrieves the values of the append property that is set up in + * the dataset access property list + * + * \dapl_id + * \param[in] dims The number of elements for \p boundary + * \param[in] boundary The dimension sizes used to determine the boundary + * \param[in] func The user-defined callback function + * \param[in] udata The user-defined input data + * + * \return \herr_t + * + * \details H5Pget_append_flush() obtains the following information + * from the dataset access property list, \p dapl_id. + * + * \p boundary consists of the sizes set up in the access + * property list that are used to determine when a dataset + * dimension size hits the boundary. Only at most \p dims + * boundary sizes are retrieved, and \p dims will not exceed + * the corresponding value that is set in the property list. + * + * \p func is the user-defined callback function to invoke when + * a dataset’s appended dimension size reaches a boundary and + * \p udata is the user-defined input data for the callback + * function. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pget_append_flush(hid_t dapl_id, unsigned dims, hsize_t boundary[], H5D_append_cb_t *func, + void **udata); +/** + * \ingroup DAPL + * + * \brief Retrieves the raw data chunk cache parameters + * + * \dapl_id + * \param[out] rdcc_nslots Number of chunk slots in the raw data chunk + * cache hash table + * \param[out] rdcc_nbytes Total size of the raw data chunk cache, in + * bytes + * \param[out] rdcc_w0 Preemption policy + * + * \return \herr_t + * + * \details H5Pget_chunk_cache() retrieves the number of chunk slots in + * the raw data chunk cache hash table, the maximum possible + * number of bytes in the raw data chunk cache, and the + * preemption policy value. + * + * These values are retrieved from a dataset access property + * list. If the values have not been set on the property list, + * then values returned will be the corresponding values from + * a default file access property list. + * + * Any (or all) pointer arguments may be null pointers, in which + * case the corresponding data is not returned. + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, + double *rdcc_w0 /*out*/); +/** + * \ingroup DAPL + * + * \brief Retrieves the prefix for external raw data storage files as set + * in the dataset access property list + * + * \dapl_id + * \param[in,out] prefix Dataset external storage prefix in UTF-8 or + * ASCII (\em Path and \em filename must be ASCII + * on Windows systems.) + * \param[in] size Size of prefix buffer in bytes + * + * \return Returns the size of \p prefix and the prefix string will be + * stored in \p prefix if successful. + * Otherwise returns a negative value and the contents of \p prefix + * will be undefined. + * + * \details H5Pget_efile_prefix() retrieves the file system path prefix + * for locating external files associated with a dataset that + * uses external storage. This will be the value set with + * H5Pset_efile_prefix() or the HDF5 library’s default. + * + * The value of \p size is the size in bytes of the prefix, + * including the NULL terminator. If the size is unknown, a + * preliminary H5Pget_elink_prefix() call with the pointer + * \p prefix set to NULL will return the size of the prefix + * without the NULL terminator. + * + * The \p prefix buffer must be allocated by the caller. In a + * call that retrieves the actual prefix, that buffer must be + * of the size specified in \p size. + * + * \note See H5Pset_efile_prefix() for a more complete description of + * file location behavior and for notes on the use of the + * HDF5_EXTFILE_PREFIX environment variable. + * + * \since 1.10.0, 1.8.17 + * + */ +H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); +/** + * \ingroup DAPL + * + * \brief Retrieves prefix applied to VDS source file paths + * + * \dapl_id + * \param[out] prefix Prefix applied to VDS source file paths + * \param[in] size Size of prefix, including null terminator + * + * \return If successful, returns a non-negative value specifying the size + * in bytes of the prefix without the NULL terminator; otherwise + * returns a negative value. + * + * \details H5Pget_virtual_prefix() retrieves the prefix applied to the + * path of any VDS source files traversed. + * + * When an VDS source file is traversed, the prefix is retrieved + * from the dataset access property list \p dapl_id, returned + * in the user-allocated buffer pointed to by \p prefix, and + * prepended to the filename stored in the VDS virtual file, set + * with H5Pset_virtual(). + * + * The size in bytes of the prefix, including the NULL terminator, + * is specified in \p size. If \p size is unknown, a preliminary + * H5Pget_virtual_prefix() call with the pointer \p prefix set to + * NULL will return the size of the prefix without the NULL + * terminator. + * + * \see_virtual + * + * \since 1.10.2 + * + */ +H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char *prefix /*out*/, size_t size); +/** + * \ingroup DAPL + * + * \brief Returns the maximum number of missing source files and/or datasets + * with the printf-style names when getting the extent for an unlimited + * virtual dataset + * + * \dapl_id + * \param[out] gap_size Maximum number of the files and/or datasets + * allowed to be missing for determining the extent + * of an unlimited virtual dataset with printf-style + * mappings. (\em Default: 0) + * + * \return \herr_t + * + * \details H5Pget_virtual_printf_gap() returns the maximum number of + * missing printf-style files and/or datasets for determining the + * extent of an unlimited virtual dataaset, \p gap_size, using + * the access property list for the virtual dataset, \p dapl_id. + * + * The default library value for \p gap_size is 0 (zero). + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t dapl_id, hsize_t *gap_size); +/** + * \ingroup DAPL + * + * \brief Retrieves the view of a virtual dataset accessed with + * \p dapl_id + * + * \dapl_id + * \param[out] view The flag specifying the view of the virtual dataset. + * Valid values are: + * \li #H5D_VDS_FIRST_MISSING + * \li #H5D_VDS_LAST_AVAILABLE + * + * \return \herr_t + * + * \details H5Pget_virtual_view() takes the virtual dataset access property + * list, \p dapl_id, and retrieves the flag, \p view, set by the + * H5Pset_virtual_view() call. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pget_virtual_view(hid_t dapl_id, H5D_vds_view_t *view); +/** + * \ingroup DAPL + * + * \brief Sets two actions to perform when the size of a dataset’s + * dimension being appended reaches a specified boundary + * + * \dapl_id + * \param[in] ndims The number of elements for boundary + * \param[in] boundary The dimension sizes used to determine the boundary + * \param[in] func The user-defined callback function + * \param[in] udata The user-defined input data + * + * \return \herr_t + * + * \details H5Pset_append_flush() sets the following two actions to + * perform for a dataset associated with the dataset access + * property list \p dapl_id: + * + * \li Call the callback function \p func set in the property + * list + * \li Flush the dataset associated with the dataset access + * property list + * + * When a user is appending data to a dataset via H5DOappend() + * and the dataset’s newly extended dimension size hits a + * specified boundary, the library will perform the first action + * listed above. Upon return from the callback function, the + * library will then perform the second action listed above and + * return to the user. If no boundary is hit or set, the two + * actions above are not invoked. + * + * The specified boundary is indicated by the parameter + * \p boundary. It is a 1-dimensional array with \p ndims + * elements, which should be the same as the rank of the + * dataset’s dataspace. While appending to a dataset along a + * particular dimension index via H5Dappend(), the library + * determines a boundary is reached when the resulting dimension + * size is divisible by \p boundary[index]. A zero value for + * \p boundary[index] indicates no boundary is set for that + * dimension index. + * + * The setting of this property will apply only for a chunked + * dataset with an extendible dataspace. A dataspace is extendible + * when it is defined with either one of the following: + * + * \li A dataspace with fixed current and maximum dimension sizes + * \li A dataspace with at least one unlimited dimension for its + * maximum dimension size + * + * When creating or opening a chunked dataset, the library will + * check whether the boundary as specified in the access property + * list is set up properly. The library will fail the dataset + * create or open if the following conditions are true: + * + * \li \p ndims, the number of elements for boundary, is not the + * same as the rank of the dataset’s dataspace. + * \li A non-zero boundary value is specified for a non-extendible + * dimension. + * + * The callback function \p func must conform to the following + * prototype: + * \snippet H5Dpublic.h H5D_append_cb_t_snip + * + * The parameters of the callback function, per the above + * prototype, are defined as follows: + * + * \li \p dataset_id is the dataset identifier. + * \li \p cur_dims is the dataset’s current dimension sizes when + * a boundary is hit. + * \li \p user_data is the user-defined input data. + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_append_flush(hid_t dapl_id, unsigned ndims, const hsize_t boundary[], + H5D_append_cb_t func, void *udata); +/** + * \ingroup DAPL + * + * \brief Sets the raw data chunk cache parameters + * + * \dapl_id + * \param[in] rdcc_nslots The number of chunk slots in the raw data chunk + * cache for this dataset. Increasing this value + * reduces the number of cache collisions, but + * slightly increases the memory used. Due to the + * hashing strategy, this value should ideally be a + * prime number. As a rule of thumb, this value + * should be at least 10 times the number of chunks + * that can fit in \p rdcc_nbytes bytes. For maximum + * performance, this value should be set + * approximately 100 times that number of chunks. + * The default value is 521. If the value passed is + * #H5D_CHUNK_CACHE_NSLOTS_DEFAULT, then the + * property will not be set on \p dapl_id and the + * parameter will come from the file access + * property list used to open the file. + * \param[in] rdcc_nbytes The total size of the raw data chunk cache for + * this dataset. In most cases increasing this + * number will improve performance, as long as + * you have enough free memory. + * The default size is 1 MB. If the value passed is + * #H5D_CHUNK_CACHE_NBYTES_DEFAULT, then the + * property will not be set on \p dapl_id and the + * parameter will come from the file access + * property list. + * \param[in] rdcc_w0 The chunk preemption policy for this dataset. + * This must be between 0 and 1 inclusive and + * indicates the weighting according to which chunks + * which have been fully read or written are + * penalized when determining which chunks to flush + * from cache. A value of 0 means fully read or + * written chunks are treated no differently than + * other chunks (the preemption is strictly LRU) + * while a value of 1 means fully read or written + * chunks are always preempted before other chunks. + * If your application only reads or writes data + * once, this can be safely set to 1. Otherwise, + * this should be set lower, depending on how often + * you re-read or re-write the same data. + * The default value is 0.75. If the value passed is + * #H5D_CHUNK_CACHE_W0_DEFAULT, then the property + * will not be set on \p dapl_id and the parameter + * will come from the file access property list. + * + * \return \herr_t + * + * \details H5Pset_chunk_cache() sets the number of elements, the total + * number of bytes, and the preemption policy value in the raw + * data chunk cache on a dataset access property list. After + * calling this function, the values set in the property list + * will override the values in the file's file access property + * list. + * + * The raw data chunk cache inserts chunks into the cache + * by first computing a hash value using the address of a chunk, + * then using that hash value as the chunk's index into the table + * of cached chunks. The size of this hash table, i.e., and the + * number of possible hash values, is determined by the + * \p rdcc_nslots parameter. If a different chunk in the cache + * has the same hash value, this causes a collision, which + * reduces efficiency. If inserting the chunk into cache would + * cause the cache to be too big, then the cache is pruned + * according to the \p rdcc_w0 parameter. + * + * \b Motivation: H5Pset_chunk_cache() is used to adjust the chunk + * cache parameters on a per-dataset basis, as opposed to a global + * setting for the file using H5Pset_cache(). The optimum chunk + * cache parameters may vary widely with different data layout and + * access patterns, so for optimal performance they must be set + * individually for each dataset. It may also be beneficial to + * reduce the size of the chunk cache for datasets whose + * performance is not important in order to save memory space. + * + * \b Example \b Usage: The following code sets the chunk cache to + * use a hash table with 12421 elements and a maximum size of + * 16 MB, while using the preemption policy specified for the + * entire file: + * \Code{ + * H5Pset_chunk_cache(dapl_id, 12421, 16*1024*1024, + * H5D_CHUNK_CACHE_W0_DEFAULT);} + * + * \b Usage \b Notes: The chunk cache size is a property for + * accessing a dataset and is not stored with a dataset or a + * file. To guarantee the same chunk cache settings each time + * the dataset is opened, call H5Dopen() with a dataset access + * property list where the chunk cache size is set by calling + * H5Pset_chunk_cache() for that property list. The property + * list can be used for multiple accesses in the same + * application. + * + * For files where the same chunk cache size will be + * appropriate for all or most datasets, H5Pset_cache() can + * be called with a file access property list to set the + * chunk cache size for accessing all datasets in the file. + * + * Both methods can be used in combination, in which case + * the chunk cache size set by H5Pset_cache() will apply + * except for specific datasets where H5Dopen() is called + * with dataset property list with the chunk cache size + * set by H5Pset_chunk_cache(). + * + * In the absence of any cache settings, H5Dopen() will + * by default create a 1 MB chunk cache for the opened + * dataset. If this size happens to be appropriate, no + * call will be needed to either function to set the + * chunk cache size. + * + * It is also possible that a change in access pattern + * for later access to a dataset will change the + * appropriate chunk cache size. + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); +/** + * \ingroup DAPL + * + * \brief Sets the external dataset storage file prefix in the dataset + * access property list + * + * \dapl_id + * \param[in] prefix Dataset external storage prefix in UTF-8 or ASCII + * (Path and filename must be ASCII on Windows systems.) + * + * \return \herr_t + * + * \details H5Pset_efile_prefix() sets the prefix used to locate raw data + * files for a dataset that uses external storage. This prefix + * can provide either an absolute path or a relative path to the + * external files. + * + * H5Pset_efile_prefix() is used in conjunction with + * H5Pset_external() to control the behavior of the HDF5 library + * when searching for the raw data files associated with a dataset + * that uses external storage: + * + * \li The default behavior of the library is to search for the + * dataset’s external storage raw data files in the same + * directory as the HDF5 file which contains the dataset. + * \li If the prefix is set to an absolute path, the target + * directory will be searched for the dataset’s external + * storage raw data files. + * \li If the prefix is set to a relative path, the target + * directory, relative to the current working directory, will + * be searched for the dataset’s external storage raw data + * files. + * \li If the prefix is set to a relative path that begins with + * the special token ${ORIGIN}, that directory, relative to + * the HDF5 file containing the dataset, will be searched for + * the dataset’s external storage raw data files. + * + * The HDF5_EXTFILE_PREFIX environment variable can be used to + * override the above behavior (the environment variable + * supersedes the API call). Setting the variable to a path + * string and calling H5Dcreate() or H5Dopen() is the equivalent + * of calling H5Pset_efile_prefix() and calling the same create + * or open function. The environment variable is checked at the + * time of the create or open action and copied so it can be + * safely changed after the H5Dcreate() or H5Dopen() call. + * + * Calling H5Pset_efile_prefix() with \p prefix set to NULL or + * the empty string returns the search path to the default. The + * result would be the same as if H5Pset_efile_prefix() had never + * been called. + * + * \note If the external file prefix is not an absolute path and the HDF5 + * file is moved, the external storage files will also need to be + * moved so they can be accessed at the new location. + * + * \note As stated above, the use of the HDF5_EXTFILE_PREFIX environment + * variable overrides any property list setting. + * H5Pset_efile_prefix() and H5Pget_efile_prefix(), being property + * functions, set and retrieve only the property list setting; they + * are unaware of the environment variable. + * + * \note On Windows, the prefix must be an ASCII string since the Windows + * standard C library’s I/O functions cannot handle UTF-8 file names. + * + * \since 1.10.0, 1.8.17 + * + */ +H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char *prefix); +/** + * \ingroup DAPL + * + * \brief Sets prefix to be applied to VDS source file paths + * + * \dapl_id + * \param[in] prefix Prefix to be applied to VDS source file paths + * + * \return \herr_t + * + * \details H5Pset_virtual_prefix() sets the prefix to be applied to the + * path of any VDS source files traversed. The prefix is prepended + * to the filename stored in the VDS virtual file, set with + * H5Pset_virtual(). + * + * The prefix is specified in the user-allocated buffer \p prefix + * and set in the dataset access property list \p dapl_id. The + * buffer should not be freed until the property list has been + * closed. + * + * \see_virtual + * + * \since 1.10.2 + * + */ +H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char *prefix); +/** + * \ingroup DAPL + * + * \brief Sets the maximum number of missing source files and/or datasets + * with the printf-style names when getting the extent of an + * unlimited virtual dataset + * + * \dapl_id + * \param[in] gap_size Maximum number of files and/or datasets allowed to + * be missing for determining the extent of an + * unlimited virtual dataset with printf-style + * mappings (Default value: 0) + * + * \return \herr_t + * + * \details H5Pset_virtual_printf_gap() sets the access property list for + * the virtual dataset, \p dapl_id, to instruct the library to + * stop looking for the mapped data stored in the files and/or + * datasets with the printf-style names after not finding + * \p gap_size files and/or datasets. The found source files and + * datasets will determine the extent of the unlimited virtual + * dataset with the printf-style mappings. + * + * Consider the following examples where the regularly spaced + * blocks of a virtual dataset are mapped to datasets with the + * names d-1, d-2, d-3, ..., d-N, ... : + * + * \li If the dataset d-2 is missing and \p gap_size is set to 0, + * then the virtual dataset will contain only data found + * in d-1. + * \li If d-2 and d-3 are missing and \p gap_size is set to 2, + * then the virtual dataset will contain the data from + * d-1, d-3, ..., d-N, ... . The blocks that are mapped to + * d-2 and d-3 will be filled according to the virtual + * dataset’s fill value setting. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t dapl_id, hsize_t gap_size); +/** + * \ingroup DAPL + * + * \brief Sets the view of the virtual dataset (VDS) to include or exclude + * missing mapped elements + * + * \dapl_id + * \param[in] view Flag specifying the extent of the data to be included + * in the view. Valid values are: + * \li #H5D_VDS_FIRST_MISSING: View includes all data + * before the first missing mapped data + * \li #H5D_VDS_LAST_AVAILABLE View includes all + * available mapped data + * + * \return \herr_t + * + * \details H5Pset_virtual_view() takes the access property list for the + * virtual dataset, \p dapl_id, and the flag, \p view, and sets + * the VDS view according to the flag value. + * + * If \p view is set to #H5D_VDS_FIRST_MISSING, the view includes + * all data before the first missing mapped data. This setting + * provides a view containing only the continuous data starting + * with the dataset’s first data element. Any break in + * continuity terminates the view. + * + * If \p view is set to #H5D_VDS_LAST_AVAILABLE, the view + * includes all available mapped data. + * + * Missing mapped data is filled with the fill value set in the + * VDS creation property list. + * + * \see_virtual + * + * \since 1.10.0 + * + */ +H5_DLL herr_t H5Pset_virtual_view(hid_t dapl_id, H5D_vds_view_t view); + +/* Dataset xfer property list (DXPL) routines */ +/** + * + * \ingroup DXPL + * + * \brief Gets B-tree split ratios for a dataset transfer property list + * + * \dxpl_id{plist_id} + * \param[out] left The B-tree split ratio for left-most nodes + * \param[out] middle The B-tree split ratio for right-most nodes and lone nodes + * \param[out] right The B-tree split ratio for all other nodes + * \return \herr_t + * + * \details H5Pget_btree_ratios() returns the B-tree split ratios for a dataset + * transfer property list. + * + * The B-tree split ratios are returned through the non-NULL arguments + * \p left, \p middle, and \p right, as set by the H5Pset_btree_ratios() + * function. + * + */ +H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/, + double *right /*out*/); +/** + * + * \ingroup DXPL + * + * \brief Reads buffer settings + * + * \param[in] plist_id Identifier for the dataset transfer property list + * \param[out] tconv Address of the pointer to application-allocated type + * conversion buffer + * \param[out] bkg Address of the pointer to application-allocated + * background buffer + * + * \return Returns buffer size, in bytes, if successful; otherwise 0 on failure. + * + * \details H5Pget_buffer() reads values previously set with H5Pset_buffer(). + * + * \version 1.6.0 The return type changed from \p hsize_t to \p size_t. + * \version 1.4.0 The return type changed to \p hsize_t. + * + */ +H5_DLL size_t H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/); +/** + * + * \ingroup DXPL + * + * \brief Retrieves a data transform expression + * + * \param[in] plist_id Identifier of the property list or class + * \param[out] expression Pointer to memory where the transform expression will + * be copied + * \param[in] size Number of bytes of the transform expression to copy + * to + * + * \return Success: the size of the transform expression. Failure: a negative + * value. + * + * \details H5Pget_data_transform() retrieves the data transform expression + * previously set in the dataset transfer property list \p plist_id + * by H5Pset_data_transform(). + * + * H5Pget_data_transform() can be used to both retrieve the transform + * expression and query its size. + * + * If \p expression is non-NULL, up to \p size bytes of the data + * transform expression are written to the buffer. If \p expression + * is NULL, \p size is ignored, and the function does not write + * anything to the buffer. The function always returns the size of + * the data transform expression. + * + * If 0 is returned for the size of the expression, no data transform + * expression exists for the property list. + * + * If an error occurs, the buffer pointed to by \p expression is + * unchanged, and the function returns a negative value. + * + * \par Example + * An example snippet from examples/h5_dtransform.c: + * \snippet h5_dtransform.c H5Pget_data_transform_snip + * + * \since 1.8.0 + * + */ +H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size); +/** + * + * \ingroup DXPL + * + * \brief Determines whether error-detection is enabled for dataset reads + * + * \param[in] plist_id Dataset transfer property list identifier + * + * \return Returns \p H5Z_ENABLE_EDC or \p H5Z_DISABLE_EDC if successful; + * otherwise returns a negative value. + * + * \details H5Pget_edc_check() queries the dataset transfer property + * list \p plist to determine whether error detection is enabled for + * data read operations. + * + * \since 1.6.0 + * + */ +H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); +/** + * + * \ingroup DXPL + * + * \brief Retrieves number of I/O vectors to be read/written in hyperslab I/O + * + * \param[in] fapl_id Dataset transfer property list identifier + * \param[out] size Number of I/O vectors to accumulate in memory for I/O operations + * + * \return \herr_t + * + * \details H5Pget_hyper_vector_size() retrieves the number of I/O vectors to be accumulated in + * memory before being issued to the lower levels of the HDF5 library for reading or + * writing the actual data. + * + * The number of I/O vectors set in the dataset transfer property list \p fapl_id is + * returned in \p size. Unless the default value is in use, \p size was + * previously set with a call to H5Pset_hyper_vector_size(). + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size /*out*/); +/** + * + * \ingroup DXPL + * + * \brief Checks status of the dataset transfer property list (\b DEPRECATED) + * + * \deprecated{H5Pget_preserve() is deprecated as it is no longer useful; + * compound datatype field preservation is now core functionality + * in the HDF5 library.} + * + * \param[in] plist_id Identifier for the dataset transfer property list + * + * \return Returns 1 or 0 if successful; otherwise returns a negative value. + * + * \details H5Pget_preserve() checks the status of the dataset transfer + * property list. + * + * \version 1.6.0 The flag parameter was changed from INTEGER to LOGICAL to + * better match the C API. (Fortran 90) + * + */ +H5_DLL int H5Pget_preserve(hid_t plist_id); +/** + * + * \ingroup DXPL + * + * \brief Gets user-defined datatype conversion callback function + * + * \param[in] dxpl_id Dataset transfer property list identifier + * \param[out] op User-defined type conversion callback function + * \param[out] operate_data User-defined input data for the callback function + * + * \return \herr_t + * + * \details H5Pget_type_conv_cb() gets the user-defined datatype conversion + * callback function \p op in the dataset transfer property list + * \p dxpl_id. + * + * The parameter \p operate_data is a pointer to user-defined input + * data for the callback function. + * + * The callback function \p op defines the actions an application is + * to take when there is an exception during datatype conversion. + * + * Please refer to the function H5Pset_type_conv_cb() for more details. + * + */ +H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void **operate_data); +/** + * + * \ingroup DXPL + * + * \brief Gets the memory manager for variable-length datatype allocation in H5Dread() and H5Dvlen_reclaim() + * + * \param[in] plist_id Identifier for the dataset transfer property list + * \param[out] alloc_func User's allocate routine, or NULL for system malloc + * \param[out] alloc_info Extra parameter for user’s allocation routine. + * Contents are ignored if preceding + * parameter is NULL \param[out] free_func User's free routine, or NULL for + * system free \param[out] free_info + * Extra parameter for user’s free routine. Contents are ignored if preceding + * parameter is NULL + * + * \return \herr_t + * + * \details H5Pget_vlen_mem_manager() is the companion function to + * H5Pset_vlen_mem_manager(), returning the parameters set by + * that function. + * + */ +H5_DLL herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func, void **alloc_info, + H5MM_free_t *free_func, void **free_info); +/** + * + * \ingroup DXPL + * + * \brief Sets B-tree split ratios for a dataset transfer property list + * + * \param[in] plist_id The dataset transfer property list identifier + * \param[in] left The B-tree split ratio for left-most nodes + * \param[in] middle The B-tree split ratio for all other nodes + * \param[in] right The B-tree split ratio for right-most nodes and lone + * nodes + * + * \return \herr_t + * + * \details H5Pset_btree_ratios() sets the B-tree split ratios for a dataset + * transfer property list. The split ratios determine what percent of + * children go in the first node when a node splits. + * + * The ratio \p left is used when the splitting node is the left-most + * node at its level in the tree; + * the ratio \p right is used when the splitting node is the right-most + * node at its level; and + * the ratio \p middle is used for all other cases. + * + * A node that is the only node at its level in the tree uses the + * ratio \p right when it splits. + * + * All ratios are real numbers between 0 and 1, inclusive. + * + */ +H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); + +/** + * + * \ingroup DXPL + * + * \brief Sets type conversion and background buffers + * + * \dxpl_id{plist_id} + * \param[in] size Size, in bytes, of the type conversion and background buffers + * \param[in] tconv Pointer to application-allocated type conversion buffer + * \param[in] bkg Pointer to application-allocated background buffer + * \return \herr_t + * + * \details Given a dataset transfer property list, H5Pset_buffer() sets the + * maximum size for the type conversion buffer and background buffer + * and optionally supplies pointers to application-allocated + * buffers. If the buffer size is smaller than the entire amount of + * data being transferred between the application and the file, and a + * type conversion buffer or background buffer is required, then strip + * mining will be used. + * + * Note that there are minimum size requirements for the buffer. Strip + * mining can only break the data up along the first dimension, so the + * buffer must be large enough to accommodate a complete slice that + * encompasses all of the remaining dimensions. For example, when strip + * mining a \Code{100x200x300} hyperslab of a simple data space, the + * buffer must be large enough to hold \Code{1x200x300} data + * elements. When strip mining a \Code{100x200x300x150} hyperslab of a + * simple data space, the buffer must be large enough to hold + * \Code{1x200x300x150} data elements. + * + * If \p tconv and/or \p bkg are null pointers, then buffers will be + * allocated and freed during the data transfer. + * + * The default value for the maximum buffer is 1 MiB. + * + * \version 1.6.0 The \p size parameter has changed from type hsize_t to \c size_t. + * \version 1.4.0 The \p size parameter has changed to type hsize_t. + * + */ +H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); + +/** + * \ingroup DXPL + * + * \brief Sets a data transform expression + * + * \dxpl_id{plist_id} + * \param[in] expression Pointer to the null-terminated data transform + * expression + * \return \herr_t + * + * \details H5Pset_data_transform() sets the data transform to be used for + * reading and writing data. This function operates on the dataset + * transfer property list \p plist_id. + * + * The \p expression parameter is a string containing an algebraic + * expression, such as \Code{(5/9.0)*(x-32)} or \Code{x*(x-5)}. When a + * dataset is read or written with this property list, the transform + * expression is applied with the \c x being replaced by the values in + * the dataset. When reading data, the values in the file are not + * changed and the transformed data is returned to the user. + * + * Data transforms can only be applied to integer or + * floating-point datasets. Order of operations is obeyed and + * the only supported operations are +, -, *, and /. Parentheses + * can be nested arbitrarily and can be used to change precedence. + * When writing data back to the dataset, the transformed data is + * written to the file and there is no way to recover the original + * values to which the transform was applied. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char *expression); + +/** + * \ingroup DXPL + * + * \brief Sets the dataset transfer property list to enable or disable error + * detection when reading data + * + * \dxpl_id{plist_id} + * \param[in] check Specifies whether error checking is enabled or disabled + * for dataset read operations + * \return \herr_t + * + * \details H5Pset_edc_check() sets the dataset transfer property list \p plist + * to enable or disable error detection when reading data. + * + * Whether error detection is enabled or disabled is specified in the + * \p check parameter. Valid values are #H5Z_ENABLE_EDC (default) and + * #H5Z_DISABLE_EDC. + * + * \note The initial error detection implementation, Fletcher32 checksum, + * supports error detection for chunked datasets only. + * + * \attention The Fletcher32 EDC checksum filter, set with H5Pset_fletcher32(), + * was added in HDF5 Release 1.6.0. In the original implementation, + * however, the checksum value was calculated incorrectly on + * little-endian systems. The error was fixed in HDF5 Release 1.6.3.\n + * As a result of this fix, an HDF5 library of Release 1.6.0 through + * Release 1.6.2 cannot read a dataset created or written with + * Release 1.6.3 or later if the dataset was created with the + * checksum filter and the filter is enabled in the reading + * library. (Libraries of Release 1.6.3 and later understand the + * earlier error and compensate appropriately.)\n + * \Bold{Work-around:} An HDF5 library of Release 1.6.2 or earlier + * will be able to read a dataset created or written with the + * checksum filter by an HDF5 library of Release 1.6.3 or later if + * the checksum filter is disabled for the read operation. This can + * be accomplished via an H5Pset_edc_check() call with the value + * #H5Z_DISABLE_EDC in the second parameter. This has the obvious + * drawback that the application will be unable to verify the + * checksum, but the data does remain accessible. + * + * \version 1.6.3 Error in checksum calculation on little-endian systems + * corrected in this release. + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); + +/** + * \ingroup DXPL + * + * \brief Sets user-defined filter callback function + * + * \dxpl_id{plist_id} + * \param[in] func User-defined filter callback function + * \param[in] op_data User-defined input data for the callback function + * \return \herr_t + * + * \details H5Pset_filter_callback() sets the user-defined filter callback + * function \p func in the dataset transfer property list \p plist_id. + * + * The parameter \p op_data is a pointer to user-defined input data for + * the callback function and will be passed through to the callback + * function. + * + * The callback function \p func defines the actions an application is + * to take when a filter fails. The function prototype is as follows: + * \snippet H5Zpublic.h H5Z_filter_func_t_snip + * where \c filter indicates which filter has failed, \c buf and \c buf_size + * are used to pass in the failed data, and op_data is the required + * input data for this callback function. + * + * Valid callback function return values are #H5Z_CB_FAIL and #H5Z_CB_CONT. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data); + +/** + * \ingroup DXPL + * + * \brief Sets number of I/O vectors to be read/written in hyperslab I/O + * + * \dxpl_id{plist_id} + * \param[in] size Number of I/O vectors to accumulate in memory for I/O + * operations\n + * Must be greater than 1 (one)\n + * Default value: 1024 + * \return \herr_t + * + * \details H5Pset_hyper_vector_size() sets the number of I/O vectors to be + * accumulated in memory before being issued to the lower levels of + * the HDF5 library for reading or writing the actual data. + * + * The I/O vectors are hyperslab offset and length pairs and are + * generated during hyperslab I/O. + * + * The number of I/O vectors is passed in \p size to be set in the + * dataset transfer property list \p plist_id. \p size must be + * greater than 1 (one). + * + * H5Pset_hyper_vector_size() is an I/O optimization function; + * increasing vector_size should provide better performance, but the + * library will use more memory during hyperslab I/O. The default value + * of \p size is 1024. + * + * \since 1.6.0 + * + */ +H5_DLL herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t size); + +/** + * \ingroup DXPL + * + * \brief Sets the dataset transfer property list \p status + * + * \dxpl_id{plist_id} + * \param[in] status Status toggle of the dataset transfer property list + * \return \herr_t + * + * \deprecated This function is deprecated as it no longer has any effect; + * compound datatype field preservation is now core functionality in + * the HDF5 library. + * + * \details H5Pset_preserve() sets the dataset transfer property list status to + * \c 1 or \c 0. + * + * When reading or writing compound datatypes and the destination is + * partially initialized and the read/write is intended to initialize + * the other members, one must set this property to \c 1. Otherwise the + * I/O pipeline treats the destination datapoints as completely + * uninitialized. + * + * \todo Add missing version information: introduction, deprecation, etc. + * Why is the declaration not in the deprecated section? + * + */ +H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); + +/** + * \ingroup DXPL + * + * \brief Sets user-defined datatype conversion callback function + * + * \dxpl_id + * \param[in] op User-defined type conversion callback function + * \param[in] operate_data User-defined input data for the callback function + * \return \herr_t + * + * \details H5Pset_type_conv_cb() sets the user-defined datatype conversion + * callback function \p op in the dataset transfer property list \p + * dxpl_id + * + * The parameter operate_data is a pointer to user-defined input data + * for the callback function and will be passed through to the callback + * function. + * + * The callback function \p op defines the actions an application is to + * take when there is an exception during datatype conversion. The + * function prototype is as follows: + * \snippet H5Tpublic.h H5T_conv_except_func_t_snip + * + * \todo Add version information. + * + */ +H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void *operate_data); + +/** + * \ingroup DXPL + * + * \brief Sets the memory manager for variable-length datatype allocation in + * H5Dread() and H5Dvlen_reclaim() + * + * \dxpl_id{plist_id} + * \param[in] alloc_func User's allocate routine, or \c NULL for system \c malloc + * \param[in] alloc_info Extra parameter for user's allocation routine. + * Contents are ignored if preceding parameter is \c NULL. + * \param[in] free_func User's free routine, or \c NULL for system \c free + * \param[in] free_info Extra parameter for user's free routine. Contents are + * ignored if preceding parameter is \c NULL + * \return \herr_t + * + * \details H5Pset_vlen_mem_manager() sets the memory manager for + * variable-length datatype allocation in H5Dread() and free in + * H5Dvlen_reclaim(). + * + * The \p alloc_func and \p free_func parameters identify the memory + * management routines to be used. If the user has defined custom + * memory management routines, \p alloc_func and/or free_func should be + * set to make those routine calls (i.e., the name of the routine is + * used as the value of the parameter); if the user prefers to use the + * system's \c malloc and/or \c free, the \p alloc_func and \p + * free_func parameters, respectively, should be set to \c NULL + * + * The prototypes for these user-defined functions are as follows: + * \snippet H5MMpublic.h H5MM_allocate_t_snip + * + * \snippet H5MMpublic.h H5MM_free_t_snip + * + * The \p alloc_info and \p free_info parameters can be used to pass + * along any required information to the user's memory management + * routines. + * + * In summary, if the user has defined custom memory management + * routines, the name(s) of the routines are passed in the \p + * alloc_func and \p free_func parameters and the custom routines' + * parameters are passed in the \p alloc_info and \p free_info + * parameters. If the user wishes to use the system \c malloc and \c + * free functions, the \p alloc_func and/or \p free_func parameters are + * set to \c NULL and the \p alloc_info and \p free_info parameters are + * ignored. + * + * \todo Add version information. + */ +H5_DLL herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, + H5MM_free_t free_func, void *free_info); + +#ifdef H5_HAVE_PARALLEL +/** + * \ingroup DXPL + * + * \brief Retrieves the type of chunk optimization that HDF5 actually performed + * on the last parallel I/O call (not necessarily the type requested) + * + * \dxpl_id{plist_id} + * \param[out] actual_chunk_opt_mode The type of chunk optimization performed by HDF5 + * \return \herr_t + * + * \par Motivation: + * A user can request collective I/O via a data transfer property list + * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). + * However, HDF5 will sometimes ignore this request and perform independent + * I/O instead. This property allows the user to see what kind of I/O HDF5 + * actually performed. Used in conjunction with H5Pget_mpio_actual_io_mode(), + * this property allows the user to determine exactly what HDF5 did when + * attempting collective I/O. + * + * \details H5Pget_mpio_actual_chunk_opt_mode() retrieves the type of chunk + * optimization performed when collective I/O was requested. This + * property is set before I/O takes place, and will be set even if I/O + * fails. + * + * Valid values returned in \p actual_chunk_opt_mode: + * \snippet this H5D_mpio_actual_chunk_opt_mode_t_snip + * \click4more + * + * \since 1.8.8 + * + */ +H5_DLL herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, + H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode); +/** + * \ingroup DXPL + * + * \brief Retrieves the type of I/O that HDF5 actually performed on the last + * parallel I/O call (not necessarily the type requested) + * + * \dxpl_id{plist_id} + * \param[out] actual_io_mode The type of I/O performed by this process + * \return \herr_t + * + * \par Motivation: + * A user can request collective I/O via a data transfer property list + * (DXPL) that has been suitably modified with H5Pset_dxpl_mpio(). + * However, HDF5 will sometimes ignore this request and perform independent + * I/O instead. This property allows the user to see what kind of I/O HDF5 + * actually performed. Used in conjunction with H5Pget_mpio_actual_chunk_opt_mode(), + * this property allows the user to determine exactly HDF5 did when + * attempting collective I/O. + * + * \details H5Pget_mpio_actual_io_mode() retrieves the type of I/O performed on + * the selection of the current process. This property is set after all + * I/O is completed; if I/O fails, it will not be set. + * + * Valid values returned in \p actual_io_mode: + * \snippet this H5D_mpio_actual_io_mode_t_snip + * \click4more + * + * \attention All processes do not need to have the same value. For example, if + * I/O is being performed using the multi chunk optimization scheme, + * one process's selection may include only chunks accessed + * collectively, while another may include chunks accessed + * independently. In this case, the first process will report + * #H5D_MPIO_CHUNK_COLLECTIVE while the second will report + * #H5D_MPIO_CHUNK_INDEPENDENT. + * + * \see H5Pget_mpio_no_collective_cause(), H5Pget_mpio_actual_chunk_opt_mode() + * + * \since 1.8.8 + * + */ +H5_DLL herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode); +/** + * \ingroup DXPL + * + * \brief Retrieves local and global causes that broke collective I/O on the last + * parallel I/O call + * + * \dxpl_id{plist_id} + * \param[out] local_no_collective_cause An enumerated set value indicating the + * causes that prevented collective I/O in the local process + * \param[out] global_no_collective_cause An enumerated set value indicating + * the causes across all processes that prevented collective I/O + * \return \herr_t + * + * \par Motivation: + * A user can request collective I/O via a data transfer property list (DXPL) + * that has been suitably modified with H5P_SET_DXPL_MPIO. However, there are + * conditions that can cause HDF5 to forgo collective I/O and perform + * independent I/O. Such causes can be different across the processes of a + * parallel application. This function allows the user to determine what + * caused the HDF5 library to skip collective I/O locally, that is in the + * local process, and globally, across all processes. + * + * \details H5Pget_mpio_no_collective_cause() serves two purposes. It can be + * used to determine whether collective I/O was used for the last + * preceding parallel I/O call. If collective I/O was not used, the + * function retrieves the local and global causes that broke collective + * I/O on that parallel I/O call. The properties retrieved by this + * function are set before I/O takes place and are retained even when + * I/O fails. + * + * Valid values returned in \p local_no_collective_cause and \p + * global_no_collective_cause are as follows or, if there are multiple + * causes, a bitwise OR of the relevant causes; the numbers in the + * center column are the bitmask values: + * \snippet this H5D_mpio_no_collective_cause_t_snip + * \click4more + * + * \attention Each process determines whether it can perform collective I/O and + * broadcasts the result. Those results are combined to make a + * collective decision; collective I/O will be performed only if all + * processes can perform collective I/O.\n + * If collective I/O was not used, the causes that prevented it are + * reported by individual process by means of an enumerated set. The + * causes may differ among processes, so H5Pget_mpio_no_collective_cause() + * returns two property values. The first value is the one produced + * by the local process to report local causes. This local information + * is encoded in an enumeration, the \ref H5D_mpio_no_collective_cause_t + * described above, with all individual causes combined into a single + * enumeration value by means of a bitwise OR operation. The second + * value reports global causes; this global value is the result of a + * bitwise-OR operation across the values returned by all the processes. + * + * \since 1.8.10 + * + */ +H5_DLL herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, + uint32_t *global_no_collective_cause); +#endif /* H5_HAVE_PARALLEL */ + +/* Link creation property list (LCPL) routines */ +/** + * \ingroup ALCAPL + * + * \brief Determines whether property is set to enable creating missing + * intermediate groups + * + * \lcpl_id{plist_id} + * \param[out] crt_intmd Flag specifying whether to create intermediate + * groups upon creation of an object + * + * \return \herr_t + * + * \details H5Pget_create_intermediate_group() determines whether the link + * creation property list \p plist_id is set to allow functions + * that create objects in groups different from the current + * working group to create intermediate groups that may be + * missing in the path of a new or moved object. + * + * Functions that create objects in or move objects to a group + * other than the current working group make use of this + * property. H5Gcreate_anon() and H5Lmove() are examples of such + * functions. + * + * If \p crt_intmd is positive, missing intermediate groups will + * be created; if \p crt_intmd is non-positive, missing intermediate + * groups will not be created. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/); +/** + * \ingroup ALCAPL + * + * \brief Specifies in property list whether to create missing + * intermediate groups + * + * \lcpl_id{plist_id} + * \param[in] crt_intmd Flag specifying whether to create intermediate + * groups upon the creation of an object + * + * \return \herr_t + * + * \details H5Pset_create_intermediate_group() + * + * \since + * + */ +H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); + +/* Group creation property list (GCPL) routines */ + +/** + * \ingroup GCPL + * + * \brief Returns the estimated link count and average link name length in a group + * + * \gcpl_id{plist_id} + * \param[out] est_num_entries The estimated number of links in the group + * referenced by \p plist_id + * \param[out] est_name_len The estimated average length of line names in the group + * referenced by \p plist_id + * \return \herr_t + * + * \details H5Pget_est_link_info() retrieves two settings from the group creation + * property list \p plist_id: the estimated number of links that are + * expected to be inserted into a group created with the property list + * and the estimated average length of those link names. + * + * The estimated number of links is returned in \p est_num_entries. The + * limit for \p est_num_entries is 64 K. + * + * The estimated average length of the anticipated link names is returned + * in \p est_name_len. The limit for \p est_name_len is 64 K. + * + * See \ref_group_impls for a discussion of the available types of HDF5 + * group structures. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /* out */, + unsigned *est_name_len /* out */); +/** + * \ingroup GCPL + * + * \brief Queries whether link creation order is tracked and/or indexed in + * a group + * + * \param[in] plist_id Group or file creation property list + * identifier + * \param[out] crt_order_flags Creation order flag(s) + * + * \return \herr_t + * + * \details H5Pget_link_creation_order() queries the group or file creation + * property list, \p plist_id, and returns a flag indicating whether + * link creation order is tracked and/or indexed in a group. + * + * See H5Pset_link_creation_order() for a list of valid creation + * order flags, as passed in \p crt_order_flags, and their + * meanings. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /* out */); +/** + * \ingroup GCPL + * + * \brief Queries the settings for conversion between compact and dense + * groups + * + * \gcpl_id{plist_id} + * \param[out] max_compact Maximum number of links for compact storage + * \param[out] min_dense Minimum number of links for dense storage + * + * \return \herr_t + * + * \details H5Pget_link_phase_change() queries the maximum number of + * entries for a compact group and the minimum number of links + * to require before converting a group to a dense form. + * + * In the compact format, links are stored as messages in the + * group’s header. In the dense format, links are stored in a + * fractal heap and indexed with a version 2 B-tree. + * + * \p max_compact is the maximum number of links to store as + * header messages in the group header before converting the + * group to the dense format. Groups that are in the compact + * format and exceed this number of links are automatically + * converted to the dense format. + * + * \p min_dense is the minimum number of links to store in the + * dense format. Groups which are in dense format and in which + * the number of links falls below this number are automatically + * converted back to the compact format. + * + * In the compact format, links are stored as messages in the + * group’s header. In the dense format, links are stored in a + * fractal heap and indexed with a version 2 B-tree. + * + * See H5Pset_link_phase_change() for a discussion of + * traditional, compact, and dense group storage. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, + unsigned *min_dense /*out*/); +/** + * \ingroup GCPL + * + * \brief Retrieves the anticipated size of the local heap for original-style + * groups + * + * \gcpl_id{plist_id} + * \param[out] size_hint Anticipated size of local heap + * \return \herr_t + * + * \details H5Pget_local_heap_size_hint() queries the group creation property + * list, \p plist_id, for the anticipated size of the local heap, \p + * size_hint, for original-style groups, i.e., for groups of the style + * used prior to HDF5 Release 1.8.0. See H5Pset_local_heap_size_hint() + * for further discussion. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/); +/** + * \ingroup GCPL + * + * \brief Sets estimated number of links and length of link names in a group + * + * \gcpl_id{plist_id} + * \param[in] est_num_entries Estimated number of links to be inserted into group + * \param[in] est_name_len Estimated average length of link names + * \return \herr_t + * + * \details H5Pset_est_link_info() inserts two settings into the group creation + * property list plist_id: the estimated number of links that are + * expected to be inserted into a group created with the property list + * and the estimated average length of those link names. + * + * The estimated number of links is passed in \p est_num_entries. The + * limit for \p est_num_entries is 64 K. + * + * The estimated average length of the anticipated link names is passed + * in \p est_name_len. The limit for \p est_name_len is 64 K. + * + * The values for these two settings are multiplied to compute the + * initial local heap size (for old-style groups, if the local heap + * size hint is not set) or the initial object header size for + * (new-style compact groups; see \ref_group_impls). Accurately setting + * these parameters will help reduce wasted file space. + * + * If a group is expected to have many links and to be stored in dense + * format, set \p est_num_entries to 0 (zero) for maximum + * efficiency. This will prevent the group from being created in the + * compact format. + * + * See \ref_group_impls for a discussion of the available types of HDF5 + * group structures. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); +/** + * \ingroup GCPL + * + * \brief Sets creation order tracking and indexing for links in a group + * + * \param[in] plist_id Group or file creation property list + * identifier + * \param[out] crt_order_flags Creation order flag(s) + * + * \return \herr_t + * + * \details H5Pset_link_creation_order() sets flags for tracking and + * indexing links on creation order in groups created with the + * group (or file) creation property list \p plist_id. + * + * \p crt_order_flags contains flags with the following meanings: + * + * + * + * + * + * + * + * + * + * + *
    #H5P_CRT_ORDER_TRACKEDLink creation order is tracked but not necessarily + * indexed
    #H5P_CRT_ORDER_INDEXEDLink creation order is indexed (requires + * #H5P_CRT_ORDER_TRACKED)
    + * + * The default behavior is that links are tracked and indexed by + * name, and link creation order is neither tracked nor indexed. + * The name is always the primary index for links in a group. + * + * H5Pset_link_creation_order() can be used to set link creation + * order tracking, or to set link creation order tracking and + * indexing. + * + * If (#H5P_CRT_ORDER_TRACKED | #H5P_CRT_ORDER_INDEXED) is + * specified for \p crt_order_flags, then links will be tracked + * and indexed by creation order. The creation order is added as + * a secondary index and enables faster queries and iterations + * by creation order. + * + * If just #H5P_CRT_ORDER_TRACKED is specified for + * \p crt_order_flags, then links will be tracked by creation + * order, but not indexed by creation order. Queries and iterations + * by creation order will work but will be much slower for large + * groups than if #H5P_CRT_ORDER_INDEXED had been included. + * + * \note If a creation order index is to be built, it must be specified in + * the group creation property list. HDF5 currently provides no + * mechanism to turn on link creation order tracking at group + * creation time and to build the index later. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); +/** + * \ingroup GCPL + * + * \brief Sets the parameters for conversion between compact and dense + * groups + * + * \gcpl_id{plist_id} + * \param[in] max_compact Maximum number of links for compact storage + * (\a Default: 8) + * \param[in] min_dense Minimum number of links for dense storage + * (\a Default: 6) + * + * \return \herr_t + * + * \details H5Pset_link_phase_change() sets the maximum number of entries + * for a compact group and the minimum number of links to allow + * before converting a dense group back to the compact format. + * + * \p max_compact is the maximum number of links to store as + * header messages in the group header before converting the + * group to the dense format. Groups that are in compact format + * and which exceed this number of links are automatically + * converted to dense format. + * + * \p min_dense is the minimum number of links to store in the + * dense format. Groups which are in dense format and in which + * the number of links falls below this threshold are + * automatically converted to compact format. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); +/** + * \ingroup GCPL + * + * \brief Specifies the anticipated maximum size of a local heap + * + * \gcpl_id{plist_id} + * \param[in] size_hint Anticipated maximum size in bytes of local heap + * \return \herr_t + * + * \details H5Pset_local_heap_size_hint() is used with original-style HDF5 + * groups (see “Motivation” below) to specify the anticipated maximum + * local heap size, size_hint, for groups created with the group + * creation property list \p plist_id. The HDF5 library then uses \p + * size_hint to allocate contiguous local heap space in the file for + * each group created with \p plist_id. + * + * For groups with many members or very few members, an appropriate + * initial value of \p size_hint would be the anticipated number of + * group members times the average length of group member names, plus a + * small margin: + * \code + * size_hint = max_number_of_group_members * + * (average_length_of_group_member_link_names + 2) + * \endcode + * If it is known that there will be groups with zero members, the use + * of a group creation property list with \p size_hint set to to 1 (one) + * will guarantee the smallest possible local heap for each of those groups. + * + * Setting \p size_hint to zero (0) causes the library to make a + * reasonable estimate for the default local heap size. + * + * \par Motivation: + * In situations where backward-compatibility is required, specifically, when + * libraries prior to HDF5 Release 1.8.0 may be used to read the file, groups + * must be created and maintained in the original style. This is HDF5’s default + * behavior. If backward compatibility with pre-1.8.0 libraries is not a concern, + * greater efficiencies can be obtained with the new-format compact and indexed + * groups. See Group + * implementations in HDF5 in the \ref H5G API introduction (at the bottom).\n + * H5Pset_local_heap_size_hint() is useful for tuning file size when files + * contain original-style groups with either zero members or very large + * numbers of members.\n + * The original style of HDF5 groups, the only style available prior to HDF5 + * Release 1.8.0, was well-suited for moderate-sized groups but was not optimized + * for either very small or very large groups. This original style remains the + * default, but two new group implementations were introduced in HDF5 Release 1.8.0: + * compact groups to accommodate zero to small numbers of members and indexed groups + * for thousands or tens of thousands of members ... or millions, if that's what + * your application requires.\n + * The local heap size hint, \p size_hint, is a performance tuning parameter for + * original-style groups. As indicated above, an HDF5 group may have zero, a handful, + * or tens of thousands of members. Since the original style of HDF5 groups stores the + * metadata for all of these group members in a uniform format in a local heap, the size + * of that metadata (and hence, the size of the local heap) can vary wildly from group + * to group. To intelligently allocate space and to avoid unnecessary fragmentation of + * the local heap, it can be valuable to provide the library with a hint as to the local + * heap’s likely eventual size. This can be particularly valuable when it is known that + * a group will eventually have a great many members. It can also be useful in conserving + * space in a file when it is known that certain groups will never have any members. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); + +/* String creation property list (STRCPL) routines */ +/** + * \ingroup ALCAPL + * + * \brief Retrieves the character encoding used to create a link or + * attribute name + * + * \param[in] plist_id Link creation or attribute creation property list + * identifier + * \param[out] encoding String encoding character set + * + * \return \herr_t + * + * \details H5Pget_char_encoding() retrieves the character encoding used + * to encode link or attribute names that are created with the + * property list \p plist_id. + * + * Valid values for \p encoding are defined in H5Tpublic.h and + * include the following: + * + * \csets + * + * \note H5Pget_char_encoding() retrieves the character set used for an + * HDF5 link or attribute name while H5Tget_cset() retrieves the + * character set used in a character or string datatype. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/); +/** + * \ingroup ALCAPL + * + * \brief Sets the character encoding used to encode link and attribute + * names + * + * \param[in] plist_id Link creation or attribute creation property list + * identifier + * \param[in] encoding String encoding character set + * + * \return \herr_t + * + * \details H5Pset_char_encoding() sets the character encoding used for + * the names of links (which provide the names by which objects + * are referenced) or attributes created with the property list + * \p plist_id. + * + * Valid values for encoding include the following: + * \csets + * \details For example, if the character set for the property list + * \p plist_id is set to #H5T_CSET_UTF8, link names pointing to + * objects created with the link creation property list + * \p plist_id will be encoded using the UTF-8 character set. + * Similarly, names of attributes created with the attribute + * creation property list \p plist_id will be encoded as UTF-8. + * + * ASCII and UTF-8 Unicode are the only currently supported + * character encodings. Extended ASCII encodings (for example, + * ISO 8859) are not supported. This encoding policy is not + * enforced by the HDF5 library. Using encodings other than + * ASCII and UTF-8 can lead to compatibility and usability + * problems. + * + * \note H5Pset_char_encoding() sets the character set used for an + * HDF5 link or attribute name while H5Tset_cset() sets the + * character set used in a character or string datatype. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); + +/* Link access property list (LAPL) routines */ +/** + * \ingroup LAPL + * + * \brief Retrieves the external link traversal file access flag from the + * specified link access property list + * + * \lapl_id + * \param[out] flags File access flag for link traversal + * + * \return \herr_t + * + * \details H5Pget_elink_acc_flags() retrieves the file access flag used + * to open an external link target file from the specified link + * access property list. + * + * Valid values for \p flags include: + * \li #H5F_ACC_RDWR - Files opened through external links will + * be opened with write access + * \li #H5F_ACC_RDONLY - Files opened through external links will + * be opened with read-only access + * \li #H5F_ACC_DEFAULT - Files opened through external links will + * be opened with the same access flag as + * the parent file + * + * The value returned, if it is not #H5F_ACC_DEFAULT, will + * override the default access flag, which is the access flag + * used to open the parent file. + * + * Example Usage: + * The following code retrieves the external link access flag + * settings on the link access property list \p lapl_id into a + * local variable: + *
    + *         unsigned acc_flags;
    + *         status = H5Pget_elink_acc_flags(lapl_id, &acc_flags);
    + *       
    + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); +/** + * \ingroup LAPL + * + * \brief Retrieves the external link traversal callback function from the + * specified link access property list + * + * \lapl_id + * \param[out] func User-defined external link traversal callback + * function + * \param[out] op_data User-defined input data for the callback function + * + * \return \herr_t + * + * \details H5Pget_elink_cb() retrieves the user-defined external link + * traversal callback function defined in the specified link + * access property list. + * + * The callback function may adjust the file access property + * list and file access flag to use when opening a file through + * an external link. The callback will be executed by the HDF5 + * library immediately before opening the target file. + * + * Failure Modes: H5Pget_elink_cb() will fail if the link + * access property list identifier, \p lapl_id, is invalid. + * + * An invalid function pointer or data pointer, \p func or + * \p op_data respectively, may cause a segmentation fault or an + * invalid memory access. + * + * Example Usage: The following code retrieves the external + * link callback settings on the link access property list + * \p lapl_id into local variables: + *
    + *       H5L_elink_traverse_t elink_callback_func;
    + *       void *elink_callback_udata;
    + *       status = H5Pget_elink_cb (lapl_id, &elink_callback_func,
    + *                                 &elink_callback_udata);
    + *       
    + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func, void **op_data); +/** + * \ingroup LAPL + * + * \brief Retrieves the file access property list identifier associated + * with the link access property list + * + * \lapl_id + * + * \return \hid_t{file access property list} + * + * \details H5Pget_elink_fapl() retrieves the file access property list + * identifier that is set for the link access property list + * identifier, \p lapl_id. The library uses this file access + * property list identifier to open the target file for the + * external link access. When no such identifier is set, this + * routine returns #H5P_DEFAULT. + * + * \see H5Pset_elink_fapl() and H5Lcreate_external(). + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); +/** + * \ingroup LAPL + * + * \brief Retrieves prefix applied to external link paths + * + * \lapl_id{plist_id} + * \param[out] prefix Prefix applied to external link paths + * \param[in] size Size of prefix, including null terminator + * + * \return If successful, returns a non-negative value specifying the size + * in bytes of the prefix without the NULL terminator; otherwise + * returns a negative value. + * + * \details H5Pget_elink_prefix() retrieves the prefix applied to the + * path of any external links traversed. + * + * When an external link is traversed, the prefix is retrieved + * from the link access property list \p plist_id, returned in + * the user-allocated buffer pointed to by \p prefix, and + * prepended to the filename stored in the external link. + * + * The size in bytes of the prefix, including the NULL terminator, + * is specified in \p size. If size is unknown, a preliminary + * H5Pget_elink_prefix() call with the pointer \p prefix set to + * NULL will return the size of the prefix without the NULL + * terminator. + * + * \since 1.8.0 + * + */ +H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); +/** + * \ingroup LAPL + * + * \brief Retrieves the maximum number of link traversals + * + * \lapl_id{plist_id} + * \param[out] nlinks Maximum number of links to traverse + * + * \return \herr_t + * + * \details H5Pget_nlinks() retrieves the maximum number of soft or + * user-defined link traversals allowed, \p nlinks, before the + * library assumes it has found a cycle and aborts the traversal. + * This value is retrieved from the link access property list + * \p plist_id. + * + * The limit on the number of soft or user-defined link traversals + * is designed to terminate link traversal if one or more links + * form a cycle. User control is provided because some files may + * have legitimate paths formed of large numbers of soft or + * user-defined links. This property can be used to allow + * traversal of as many links as desired. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); +/** + * \ingroup LAPL + * + * \brief Sets the external link traversal file access flag in a link + * access property list + * + * \lapl_id + * \param[in] flags The access flag for external link traversal + * + * \return \herr_t + * + * \details H5Pset_elink_acc_flags() specifies the file access flag to use + * to open the target file of an external link. This allows + * read-only access of files reached through an external link in + * a file opened with write access, or vice-versa. + * + * Valid values for \p flags include: + * \li #H5F_ACC_RDWR - Causes files opened through external links + * to be opened with write access + * \li #H5F_ACC_RDONLY - Causes files opened through external + * links to be opened with read-only access + * \li #H5F_ACC_DEFAULT - Removes any external link file access + * flag setting from \p lapl_id, causing the file access flag + * setting to be taken from the parent file + * + * The library will normally use the file access flag used to + * open the parent file as the file access flag for the target + * file. This function provides a way to override that behavior. + * The external link traversal callback function set by + * H5Pset_elink_cb() can override the setting from + * H5Pset_elink_acc_flags(). + * + * Motivation: H5Pset_elink_acc_flags() is used to adjust the + * file access flag used to open files reached through external links. + * This may be useful to, for example, prevent modifying files + * accessed through an external link. Otherwise, the target file is + * opened with whatever flag was used to open the parent. + * + * Example Usage: The following code sets the link access + * property list \p lapl_id to open external link target files with + * read-only access: + *
    + *         status = H5Pset_elink_acc_flags(lapl_id, H5F_ACC_RDONLY);
    + *        
    + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); +/** + * \ingroup LAPL + * + * \brief Sets the external link traversal callback function in a link + * access property list + * + * \lapl_id + * \param[in] func User-defined external link traversal callback + * function + * \param[in] op_data User-defined input data for the callback function + * + * \return \herr_t + * + * \details H5Pset_elink_cb() sets a user-defined external link traversal + * callback function in the link access property list \p lapl_id. + * The callback function \p func must conform to the prototype + * specified in #H5L_elink_traverse_t. + * + * The callback function may adjust the file access property + * list and file access flags to use when opening a file through + * an external link. The callback will be executed by the HDF5 + * library immediately before opening the target file. + * + * The callback will be made after the file access property list + * set by H5Pset_elink_fapl() and the file access flag set by + * H5Pset_elink_acc_flags() are applied, so changes made by this + * callback function will take precedence. + * + * \attention A file close degree property setting (H5Pset_fclose_degree()) + * in this callback function or an associated property list will + * be ignored. A file opened by means of traversing an external + * link is always opened with the weak file close degree + * property setting, #H5F_CLOSE_WEAK. + * + * Motivation: H5Pset_elink_cb() is used to specify a + * callback function that is executed by the HDF5 library when + * traversing an external link. This provides a mechanism to set + * specific access permissions, modify the file access property + * list, modify the parent or target file, or take any other + * user-defined action. This callback function is used in + * situations where the HDF5 library's default behavior is not + * suitable. + * + * Failure Modes: H5Pset_elink_cb() will fail if the link + * access property list identifier, \p lapl_id, is invalid or if + * the function pointer, \p func, is NULL. + * + * An invalid function pointer, \p func, will cause a segmentation + * fault or other failure when an attempt is subsequently made to + * traverse an external link. + * + * Example Usage: + * This example defines a callback function that prints the name + * of the target file every time an external link is followed, and + * sets this callback function on \p lapl_id. + *
    + *          herr_t elink_callback(const char *parent_file_name, const char
    + *                 *parent_group_name, const char *child_file_name, const char
    + *                 *child_object_name, unsigned *acc_flags, hid_t fapl_id, void *op_data) {
    + *              puts(child_file_name);
    + *              return 0;
    + *          }
    + *          int main(void) {
    + *              hid_t lapl_id = H5Pcreate(H5P_LINK_ACCESS);
    + *              H5Pset_elink_cb(lapl_id, elink_callback, NULL);
    + *                ...
    + *          }
    + *          
    + * + * + * \since 1.8.3 + * + */ +H5_DLL herr_t H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data); +/** + * \ingroup LAPL + * + * \brief Sets a file access property list for use in accessing a file + * pointed to by an external link + * + * \lapl_id + * \fapl_id + * + * \return \herr_t + * + * \details H5Pset_elink_fapl() sets the file access property list, + * \p fapl_id, to be used when accessing the target file of an + * external link associated with \p lapl_id. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); +/** + * \ingroup LAPL + * + * \brief Sets prefix to be applied to external link paths + * + * \lapl_id{plist_id} + * \param[in] prefix Prefix to be applied to external link paths + * + * \return \herr_t + * + * \details H5Pset_elink_prefix() sets the prefix to be applied to the + * path of any external links traversed. The prefix is prepended + * to the filename stored in the external link. + * + * The prefix is specified in the user-allocated buffer \p prefix + * and set in the link access property list \p plist_id. The buffer + * should not be freed until the property list has been closed. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); +/** + * \ingroup LAPL + * + * \brief Sets maximum number of soft or user-defined link traversals + * + * \lapl_id{plist_id} + * \param[in] nlinks Maximum number of links to traverse + * + * \return \herr_t + * + * \details H5Pset_nlinks() sets the maximum number of soft or user-defined + * link traversals allowed, \p nlinks, before the library assumes + * it has found a cycle and aborts the traversal. This value is + * set in the link access property list \p plist_id. + * + * The limit on the number of soft or user-defined link traversals + * is designed to terminate link traversal if one or more links + * form a cycle. User control is provided because some files may + * have legitimate paths formed of large numbers of soft or + * user-defined links. This property can be used to allow + * traversal of as many links as desired. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); + +/* Object copy property list (OCPYPL) routines */ +/** + * \ingroup OCPPL + * + * \brief Adds a path to the list of paths that will be searched in the + * destination file for a matching committed datatype + * + * \param[in] plist_id Object copy property list identifier + * \param[in] path The path to be added + * + * \return \herr_t + * + * \details H5Padd_merge_committed_dtype_path() adds a path, \p path, + * which points to a committed datatype, to the current list of + * suggested paths stored in the object copy property list + * \p plist_id. The search as described in the next paragraph is + * effective only if the #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is + * enabled in the object copy property list via + * H5Pset_copy_object(). + * + * When copying a committed datatype, a dataset with a committed + * datatype, or an object with an attribute of a committed + * datatype, the default behavior of H5Ocopy() is to search for + * a matching committed datatype: + *
      + *
    1. First search the list of suggested paths in the object + * copy property list.
    2. + *
    3. Then, if no match has been found, search all the committed + * datatypes in the destination file. + *
    + * The default Step 2 in this search process can be changed by + * setting a callback function (see H5Pset_mcdt_search_cb()). + * + * Two datatypes are determined equal if their descriptions are + * identical, in a manner similar to H5Tequal(). If either + * committed datatype has one or more attributes, then all + * attributes must be present in both committed datatypes and they + * must be identical. Two attributes are considered identical if + * their datatype description, dataspace, and raw data values are + * the same. However, if an attribute uses a committed datatype, + * that committed datatype’s attributes will not be compared. + * + * If a match is found, H5Ocopy() will perform the following in + * the destination file: + * \li For a committed datatype, the library will create a hard + * link to the found datatype. + * \li For a dataset that uses a committed datatype, the library + * will modify the copied dataset to use the found committed + * datatype as its datatype. + * \li For an object with an attribute of a committed datatype, + * the library will modify the copied object’s attribute to + * use the found committed datatype as its datatype. + * + * If no match is found, H5Ocopy() will perform the following in + * the destination file: + * \li For a committed datatype, the library will copy it as it + * would any other object, creating a named committed + * datatype at the destination. That is, the library will + * create a committed datatype that is accessible in the + * file by a unique path. + * \li For a dataset that uses a committed datatype, the + * library will copy the datatype as an anonymous + * committed datatype and use that as the dataset’s + * datatype. + * \li For an object with an attribute of a committed datatype, + * the library will copy the datatype as an anonymous + * committed datatype and use that as the attribute’s + * datatype. + * + * \b Motivation: H5Padd_merge_committed_dtype_path() provides a + * means to override the default behavior of H5Ocopy() when + * #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG is set in an object + * copy property list. + * H5Padd_merge_committed_dtype_path() is the mechanism for + * suggesting search paths where H5Ocopy() will look for a + * matching committed datatype. This can be substantially + * faster than the default approach of searching the entire + * destination file for a match. + * + * \b Example \b Usage: This example adds two paths to the object + * copy property list. H5Ocopy() will search the two suggested + * paths for a match before searching all the committed datatypes + * in the destination file. + * + *
    + *     int main(void) {
    + *     hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
    + *
    + *        H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
    + *        H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
    + *        H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dset");
    + *        H5Ocopy(...ocpypl_id...);
    + *        ...
    + *        ...
    + *     }
    + *     
    + * + * \note H5Padd_merge_committed_dtype_path() will fail if the object + * copy property list is invalid. + * It will also fail if there is insufficient memory when + * duplicating \p path. + * + * \see + * \li H5Ocopy() + * \li #H5O_mcdt_search_cb_t + * \li H5Padd_merge_committed_dtype_path() + * \li H5Pfree_merge_committed_dtype_paths() + * \li H5Pget_mcdt_search_cb() + * \li H5Pset_copy_object() + * \li H5Pset_mcdt_search_cb() + * \li \ref_h5ocopy + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); +/** + * \ingroup OCPPL + * + * \brief Clears the list of paths stored in the object copy property list + * + * \param[in] plist_id Object copy property list identifier + * + * \return \herr_t + * + * \details H5Pfree_merge_committed_dtype_paths() clears the suggested + * paths stored in the object copy property list \p plist_id. + * These are the suggested paths previously set with + * H5Padd_merge_committed_dtype_path(). + * + * \b Example \b Usage: This example adds a suggested path to the + * object copy property list, does the copy, clears the list, and + * then adds a new suggested path to the list for another copy. + * + *
    + *       int main(void) {
    + *           hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
    + *
    + *           H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
    + *           H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
    + *           H5Ocopy(...ocpypl_id...);
    + *           ...
    + *           ...
    + *           H5Pfree_merge_committed_dtype_paths(ocpypl_id);
    + *           H5Padd_merge_committed_dtype_path(ocpypl_id, "/group2/committed_dtypeB");
    + *           H5Ocopy(...ocpypl_id...);
    + *           ...
    + *           ...
    + *       }
    + *       
    + * + * \note H5Pfree_merge_committed_dtype_paths() will fail if the + * object copy property list is invalid. + * + * \see + * \li H5Ocopy() + * \li #H5O_mcdt_search_cb_t + * \li H5Padd_merge_committed_dtype_path() + * \li H5Pfree_merge_committed_dtype_paths() + * \li H5Pget_mcdt_search_cb() + * \li H5Pset_copy_object() + * \li H5Pset_mcdt_search_cb() + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); +/** + * \ingroup OCPPL + * + * \brief Retrieves the properties to be used when an object is copied + * + * \param[in] plist_id Object copy property list identifier + * \param[out] copy_options Copy option(s) set in the object copy property + * list + * + * \return \herr_t + * + * \details H5Pget_copy_object() retrieves the properties currently + * specified in the object copy property list \p plist_id, which + * will be invoked when a new copy is made of an existing object. + * + * \p copy_options is a bit map indicating the flags, or + * properties, governing object copying that are set in the + * property list \p plist_id. + * + * The available flags are described in H5Pset_copy_object(). + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *copy_options /*out*/); +/** + * \ingroup OCPPL + * + * \brief Retrieves the callback function from the specified object copy + * property list + * + * \param[in] plist_id Object copy property list identifier + * \param[out] func User-defined callback function + * \param[out] op_data User-defined data for the callback + * function + * + * \return \herr_t + * + * \details H5Pget_mcdt_search_cb() retrieves the user-defined callback + * function and the user data that are set via + * H5Pset_mcdt_search_cb() in the object copy property list + * \p plist_id. + * + * The callback function will be returned in the parameter \p func + * and the user data will be returned in the parameter \p op_data. + * + * \note H5Pget_mcdt_search_cb() will fail if the object copy property + * list is invalid. + * + * \see + * \li H5Ocopy() + * \li #H5O_mcdt_search_cb_t + * \li H5Padd_merge_committed_dtype_path() + * \li H5Pfree_merge_committed_dtype_paths() + * \li H5Pget_mcdt_search_cb() + * \li H5Pset_copy_object() + * \li H5Pset_mcdt_search_cb() + * \li \ref_h5ocopy + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func, void **op_data); +/** + * \ingroup OCPPL + * + * \brief Sets properties to be used when an object is copied + * + * \param[in] plist_id Object copy property list identifier + * \param[out] copy_options Copy option(s) to be set + * + * \return \herr_t + * + * \details H5Pset_copy_object() sets properties in the object copy + * property list \p plist_id. When an existing object is copied, + * that property list will determine how the new copy is created. + * + * The following flags are available for use in an object copy + * property list: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5O_COPY_SHALLOW_HIERARCHY_FLAGCopy only immediate members of a group
    + * Default behavior, without flag: Recursively + * copy all objects in and below the group.
    #H5O_COPY_EXPAND_SOFT_LINK_FLAGExpand soft links into new objects
    + * Default behavior, without flag: Copy soft + * links as they are.
    #H5O_COPY_EXPAND_EXT_LINK_FLAGExpand external link into new objects
    + * Default behavior, without flag: Copy external + * links as they are.
    #H5O_COPY_EXPAND_REFERENCE_FLAGCopy objects that are pointed to by references and + * update reference values in destination file
    + * Default behavior, without flag: Set reference + * values in destination file to zero (0)
    #H5O_COPY_WITHOUT_ATTR_FLAGCopy object without copying attributes
    + * Default behavior, without flag: Copy object + * with all its attributes
    #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAGUse a matching committed datatype in the destination + * file when copying a committed datatype, a dataset with + * a committed datatype, or an object with an attribute + * of committed datatype
    + * Default behavior without flag: + * + * \li A committed datatype in the source will be copied to + * the destination as a committed datatype. + * \li If a dataset in the source uses a committed + * datatype or an object in the source has an attribute + * of a committed datatype, that committed datatype will + * be written to the destination as an anonymous + * committed datatype. + * If copied in a single H5Ocopy() operation, objects + * that share a committed datatype in the source will + * share an anonymous committed dataype in the + * destination copy. Subsequent H5Ocopy() operations, + * however, will be unaware of prior anonymous committed + * dataypes and will create new ones. + * + * See the “See Also” section immediately below for + * functions related to the use of this flag.
    + * + * \see + * Functions and a callback function used to tune committed datatype + * copying behavior: + * \li #H5O_mcdt_search_cb_t + * \li H5Padd_merge_committed_dtype_path() + * \li H5Pfree_merge_committed_dtype_paths() + * \li H5Pget_mcdt_search_cb() + * \li H5Pset_copy_object() + * \li H5Pset_mcdt_search_cb() + * \li \ref_h5ocopy + * + * \version 1.8.9 #H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG added in this release. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned copy_options); +/** + * \ingroup OCPPL + * + * \brief Sets the callback function that H5Ocopy() will invoke before + * searching the entire destination file for a matching committed + * datatype + * + * \param[in] plist_id Object copy property list identifier + * \param[in] func User-defined callback function + * \param[in] op_data User-defined input data for the callback function + * + * \return \herr_t + * + * \details H5Pset_mcdt_search_cb() allows an application to set a + * callback function, \p func, that will be invoked before + * searching the destination file for a matching committed + * datatype. The default, global search process is described in + * H5Padd_merge_committed_dtype_path(). + * + * The callback function must conform to the #H5O_mcdt_search_cb_t + * prototype and will return an instruction for one of the + * following actions: + * + * \li Continue the search for a matching committed datatype in + * the destination file. + * \li Discontinue the search for a matching committed datatype. + * H5Ocopy() will then apply the default behavior of creating + * an anonymous committed datatype. + * \li Abort the copy operation and exit H5Ocopy(). + * + * \b Motivation: H5Pset_mcdt_search_cb() provides the means to + * define a callback function. An application can then use that + * callback to take an additional action before the default search + * of all committed datatypes in the destination file or to take an + * action that replaces the default search. This mechanism is + * intended to improve performance when the global search might + * take a long time. + * + * \b Example \b Usage: This example defines a callback function in + * the object copy property list. + * + *
    + * static H5O_mcdt_search_ret_t
    + * mcdt_search_cb(void *_udata)
    + * {
    + *     H5O_mcdt_search_ret_t action = *((H5O_mcdt_search_ret_t *)_udata);
    + *
    + *      return(action);
    + *  }
    + *
    + *  int main(void) {
    + *      hid_t ocpypl_id = H5Pcreate(H5P_OBJECT_COPY);
    + *
    + *      H5Pset_copy_object(ocpypl_id, H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG);
    + *      H5Padd_merge_committed_dtype_path(ocpypl_id, "/group/committed_dtypeA");
    + *
    + *      action = H5O_MCDT_SEARCH_STOP;
    + *      H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &action);
    + *      H5Ocopy(...ocpypl_id...);
    + *      ...
    + *      ...
    + * }
    + * 
    + * + * \note H5Pset_mcdt_search_cb() will fail if the + * object copy property list is invalid. + * + * \warning If the callback function return value causes H5Ocopy() to + * abort, the destination file may be left in an inconsistent or + * corrupted state. + * + * \see + * \li H5Ocopy() + * \li #H5O_mcdt_search_cb_t + * \li H5Padd_merge_committed_dtype_path() + * \li H5Pfree_merge_committed_dtype_paths() + * \li H5Pget_mcdt_search_cb() + * \li H5Pset_copy_object() + * \li H5Pset_mcdt_search_cb() + * \li \ref_h5ocopy + * + * \since 1.8.9 + * + */ +H5_DLL herr_t H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data); + +/* Symbols defined for compatibility with previous versions of the HDF5 API. + * + * Use of these symbols is deprecated. + */ +#ifndef H5_NO_DEPRECATED_SYMBOLS + +/* Macros */ + +/* We renamed the "root" of the property list class hierarchy */ +#define H5P_NO_CLASS H5P_ROOT + +/* Typedefs */ +/** + * \ingroup GPLOA + * + * \brief Registers a permanent property with a property list class + * + * \plistcls_id{cls_id} + * \param[in] name Name of property to register + * \param[in] size Size of property in bytes + * \param[in] def_value Default value for property in newly created + * property lists + * \param[in] prp_create Callback routine called when a property list is + * being created and the property value will be + * initialized + * \param[in] prp_set Callback routine called before a new value is + * copied into the property's value + * \param[in] prp_get Callback routine called when a property value is + * retrieved from the property + * \param[in] prp_del Callback routine called when a property is deleted + * from a property list + * \param[in] prp_copy Callback routine called when a property is copied + * from a property list + * \param[in] prp_close Callback routine called when a property list is + * being closed and the property value will be + * disposed of + * + * \return \herr_t + * + * \deprecated As of HDF5-1.8 this function was deprecated in favor of + * H5Pregister2() or the macro H5Pregister(). + * + * \details H5Pregister1() registers a new property with a property list + * class. The property will exist in all property list objects + * of that class after this routine is finished. The name of + * the property must not already exist. The default property + * value must be provided and all new property lists created + * with this property will have the property value set to the + * default provided. Any of the callback routines may be set + * to NULL if they are not needed. + * + * Zero-sized properties are allowed and do not store any data in + * the property list. These may be used as flags to indicate the + * presence or absence of a particular piece of information. The + * default pointer for a zero-sized property may be set to NULL. + * The property \p prp_create and \p prp_close callbacks are called for + * zero-sized properties, but the \p prp_set and \p prp_get callbacks + * are never called. + * + * The \p prp_create routine is called when a new property list with + * this property is being created. The #H5P_prp_create_func_t + * callback function is defined as #H5P_prp_cb1_t. + * + * The \p prp_create routine may modify the value to be set and those + * changes will be stored as the initial value of the property. + * If the \p prp_create routine returns a negative value, the new + * property value is not copied into the property and the + * \p prp_create routine returns an error value. + * + * The \p prp_set routine is called before a new value is copied into + * the property. The #H5P_prp_set_func_t callback function is defined + * as #H5P_prp_cb2_t. + * + * The \p prp_set routine may modify the value pointer to be set and + * those changes will be used when setting the property's value. + * If the \p prp_set routine returns a negative value, the new property + * value is not copied into the property and the \p prp_set routine + * returns an error value. The \p prp_set routine will not be called + * for the initial value; only the \p prp_create routine will be + * called. + * + * \b Note: The \p prp_set callback function may be useful to range + * check the value being set for the property or may perform some + * transformation or translation of the value set. The \p prp_get + * callback would then reverse the transformation or translation. + * A single \p prp_get or \p prp_set callback could handle multiple + * properties by performing different actions based on the property + * name or other properties in the property list. + * + * The \p prp_get routine is called when a value is retrieved from a + * property value. The #H5P_prp_get_func_t callback function is + * defined as #H5P_prp_cb2_t. + * + * The \p prp_get routine may modify the value to be returned from the + * query and those changes will be returned to the calling routine. + * If the \p prp_set routine returns a negative value, the query + * routine returns an error value. + * + * The \p prp_del routine is called when a property is being + * deleted from a property list. The #H5P_prp_delete_func_t + * callback function is defined as #H5P_prp_cb2_t. + * + * The \p prp_del routine may modify the value passed in, but the + * value is not used by the library when the \p prp_del routine + * returns. If the \p prp_del routine returns a negative value, + * the property list deletion routine returns an error value but + * the property is still deleted. + * + * The \p prp_copy routine is called when a new property list with + * this property is being created through a \p prp_copy operation. + * The #H5P_prp_copy_func_t callback function is defined as + * #H5P_prp_cb1_t. + * + * The \p prp_copy routine may modify the value to be set and those + * changes will be stored as the new value of the property. If + * the \p prp_copy routine returns a negative value, the new + * property value is not copied into the property and the \p prp_copy + * routine returns an error value. + * + * The \p prp_close routine is called when a property list with this + * property is being closed. The #H5P_prp_close_func_t callback + * function is defined as #H5P_prp_cb1_t. + * + * The \p prp_close routine may modify the value passed in, but the + * value is not used by the library when the \p prp_close routine + * returns. If the \p prp_close routine returns a negative value, the + * property list close routine returns an error value but the property + * list is still closed. + * + * The #H5P_prp_cb1_t is as follows: + * \snippet this H5P_prp_cb1_t_snip + * + * The #H5P_prp_cb2_t is as follows: + * \snippet this H5P_prp_cb2_t_snip + * + * + * \cpp_c_api_note + * + */ + +/* Function prototypes */ +H5_DLL herr_t H5Pregister1(hid_t cls_id, const char *name, size_t size, void *def_value, + H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, + H5P_prp_get_func_t prp_get, H5P_prp_delete_func_t prp_del, + H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); +/** + * \ingroup GPLOA + * + * \brief Registers a temporary property with a property list + * + * \plist_id + * \param[in] name Name of property to create + * \param[in] size Size of property in bytes + * \param[in] value Initial value for the property + * \param[in] prp_set Callback routine called before a new value is copied + * into the property's value + * \param[in] prp_get Callback routine called when a property value is + * retrieved from the property + * \param[in] prp_delete Callback routine called when a property is deleted + * from a property list + * \param[in] prp_copy Callback routine called when a property is copied + * from an existing property list + * \param[in] prp_close Callback routine called when a property list is + * being closed and the property value will be disposed + * of + * + * \return \herr_t + * + * \deprecated As of HDF5-1.8 this function was deprecated in favor of + * H5Pinsert2() or the macro H5Pinsert(). + * + * \details H5Pinsert1() creates a new property in a property + * list. The property will exist only in this property list and + * copies made from it. + * + * The initial property value must be provided in \p value and + * the property value will be set accordingly. + * + * The name of the property must not already exist in this list, + * or this routine will fail. + * + * The \p prp_set and \p prp_get callback routines may be set to NULL + * if they are not needed. + * + * Zero-sized properties are allowed and do not store any data + * in the property list. The default value of a zero-size + * property may be set to NULL. They may be used to indicate the + * presence or absence of a particular piece of information. + * + * The \p prp_set routine is called before a new value is copied + * into the property. The #H5P_prp_set_func_t callback function + * is defined as #H5P_prp_cb2_t. + * The \p prp_set routine may modify the value pointer to be set and + * those changes will be used when setting the property's value. + * If the \p prp_set routine returns a negative value, the new property + * value is not copied into the property and the \p set routine + * returns an error value. The \p prp_set routine will be called for + * the initial value. + * + * \b Note: The \p prp_set callback function may be useful to range + * check the value being set for the property or may perform some + * transformation or translation of the value set. The \p prp_get + * callback would then reverse the transformation or translation. + * A single \p prp_get or \p prp_set callback could handle multiple + * properties by performing different actions based on the + * property name or other properties in the property list. + * + * The \p prp_get routine is called when a value is retrieved from + * a property value. The #H5P_prp_get_func_t callback function + * is defined as #H5P_prp_cb2_t. + * + * The \p prp_get routine may modify the value to be returned from + * the query and those changes will be preserved. If the \p prp_get + * routine returns a negative value, the query routine returns + * an error value. + * + * The \p prp_delete routine is called when a property is being + * deleted from a property list. The #H5P_prp_delete_func_t + * callback function is defined as #H5P_prp_cb2_t. + * + * The \p prp_copy routine is called when a new property list with + * this property is being created through a \p prp_copy operation. + * The #H5P_prp_copy_func_t callback function is defined as + * #H5P_prp_cb1_t. + * + * The \p prp_copy routine may modify the value to be set and those + * changes will be stored as the new value of the property. If the + * \p prp_copy routine returns a negative value, the new property value + * is not copied into the property and the prp_copy routine returns an + * error value. + * + * The \p prp_close routine is called when a property list with this + * property is being closed. + * The #H5P_prp_close_func_t callback function is defined as + * #H5P_prp_cb1_t. + * + * The \p prp_close routine may modify the value passed in, the + * value is not used by the library when the close routine + * returns. If the \p prp_close routine returns a negative value, + * the property list \p prp_close routine returns an error value + * but the property list is still closed. + * + * \b Note: There is no \p prp_create callback routine for temporary + * property list objects; the initial value is assumed to + * have any necessary setup already performed on it. + * + * The #H5P_prp_cb1_t is as follows: + * \snippet this H5P_prp_cb1_t_snip + * + * The #H5P_prp_cb2_t is as follows: + * \snippet this H5P_prp_cb2_t_snip + + * \cpp_c_api_note + */ +H5_DLL herr_t H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value, + H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get, + H5P_prp_delete_func_t prp_delete, H5P_prp_copy_func_t prp_copy, + H5P_prp_close_func_t prp_close); +/** + * \ingroup DCPL + * + * \brief Returns information about a filter in a pipeline (DEPRECATED) + * + * + * + * \plist_id{plist_id} + * \param[in] filter Sequence number within the filter pipeline of + * the filter for which information is sought + * \param[out] flags Bit vector specifying certain general properties + * of the filter + * \param[in,out] cd_nelmts Number of elements in \p cd_values + * \param[out] cd_values Auxiliary data for the filter + * \param[in] namelen Anticipated number of characters in \p name + * \param[out] name Name of the filter + * + * \return Returns the filter identifier if successful; Otherwise returns + * a negative value. See: #H5Z_filter_t + * + * \deprecated When was this function deprecated? + * + * \details H5Pget_filter1() returns information about a filter, specified + * by its filter number, in a filter pipeline, specified by the + * property list with which it is associated. + * + * \p plist_id must be a dataset or group creation property list. + * + * \p filter is a value between zero and N-1, as described in + * H5Pget_nfilters(). The function will return a negative value + * if the filter number is out of range. + * + * The structure of the \p flags argument is discussed in + * H5Pset_filter(). + * + * On input, \p cd_nelmts indicates the number of entries in the + * \p cd_values array, as allocated by the caller; on return, + * \p cd_nelmts contains the number of values defined by the filter. + * + * If \p name is a pointer to an array of at least \p namelen + * bytes, the filter name will be copied into that array. The name + * will be null terminated if \p namelen is large enough. The + * filter name returned will be the name appearing in the file, the + * name registered for the filter, or an empty string. + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \version 1.8.0 N-bit and scale-offset filters added. + * \version 1.8.0 Function H5Pget_filter() renamed to H5Pget_filter1() and + * deprecated in this release. + * \version 1.6.4 \p filter parameter type changed to unsigned. + * + */ +H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[]); +/** + * \ingroup DCPL + * + * \brief Returns information about the specified filter + * + * \plist_id{plist_id} + * \param[in] id Filter identifier + * \param[out] flags Bit vector specifying certain general properties + * of the filter + * \param[in,out] cd_nelmts Number of elements in \p cd_values + * \param[out] cd_values Auxiliary data for the filter + * \param[in] namelen Anticipated number of characters in \p name + * \param[out] name Name of the filter + * + * + * \return Returns a non-negative value if successful; Otherwise returns + * a negative value. + * + * \deprecated As of HDF5-1.8 this function was deprecated in favor of + * H5Pget_filter_by_id2() or the macro H5Pget_filter_by_id(). + * + * \details H5Pget_filter_by_id1() returns information about a filter, specified + * in \p id, a filter identifier. + * + * \p plist_id must be a dataset or group creation property list and + * \p id must be in the associated filter pipeline. + * + * The \p id and \p flags parameters are used in the same + * manner as described in the discussion of H5Pset_filter(). + * + * Aside from the fact that they are used for output, the parameters + * \p cd_nelmts and \p cd_values[] are used in the same manner as + * described in the discussion of H5Pset_filter(). + * On input, the \p cd_nelmts parameter indicates the number of entries + * in the \p cd_values[] array allocated by the calling program; + * on exit it contains the number of values defined by the filter. + * + * On input, the \p namelen parameter indicates the number of + * characters allocated for the filter name by the calling program + * in the array \p name[]. On exit \p name[] contains the name of the + * filter with one character of the name in each element of the array. + * + * If the filter specified in \p id is not set for the property + * list, an error will be returned and this function will fail. + * + * + * \version 1.8.5 Function extended to work with group creation property + * lists. + * \version 1.8.0 Function H5Pget_filter_by_id() renamed to + * H5Pget_filter_by_id1() and deprecated in this release. + * \version 1.6.0 Function introduced in this release. + */ +H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*/, + size_t *cd_nelmts /*out*/, unsigned cd_values[] /*out*/, size_t namelen, + char name[] /*out*/); +/** + * \ingroup FCPL + * + * \brief Retrieves the version information of various objects + * for a file creation property list(deprecated) + * + * \plist_id + * \param[out] boot Pointer to location to return super block version number + * \param[out] freelist Pointer to location to return global freelist version number + * \param[out] stab Pointer to location to return symbol table version number + * \param[out] shhdr Pointer to location to return shared object header version + * number + * + * \return \herr_t + * + * \deprecated Deprecated in favor of the function H5Fget_info() + * + * \details H5Pget_version() retrieves the version information of various objects + * for a file creation property list. Any pointer parameters which are + * passed as NULL are not queried. + * + * \version 1.6.4 \p boot, \p freelist, \p stab, \p shhdr parameter types + * changed to unsigned. + * + */ +H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot /*out*/, unsigned *freelist /*out*/, + unsigned *stab /*out*/, unsigned *shhdr /*out*/); +/** + * \ingroup FCPL + * + * \brief Sets the file space handling strategy and the free-space section + * size threshold. + * + * \fcpl_id{plist_id} + * \param[in] strategy The file space handling strategy to be used. See: + * #H5F_fspace_strategy_t + * \param[in] threshold The smallest free-space section size that the free + * space manager will track + * + * \return \herr_t + * + * \deprecated When was this function deprecated? + * + * \details Maps to the function H5Pset_file_space_strategy(). + * + */ +H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); +/** + * \ingroup FCPL + * + * \brief Retrieves the file space handling strategy, and threshold value for + * a file creation property list + * + * \fcpl_id{plist_id} + * \param[out] strategy Pointer to the file space handling strategy + * \param[out] threshold Pointer to the free-space section size threshold value + * + * \return \herr_t + * + * \deprecated When was this function deprecated? + * + * \details Maps to the function H5Pget_file_space_strategy() + * + * + */ +H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus diff --git a/src/H5Rmodule.h b/src/H5Rmodule.h index 9a3bf33e17c..2a34d56d7b1 100644 --- a/src/H5Rmodule.h +++ b/src/H5Rmodule.h @@ -25,4 +25,11 @@ #define H5_MY_PKG_ERR H5E_REFERENCE #define H5_MY_PKG_INIT YES +/** + * \defgroup H5R H5R + * \brief Reference Interface + * \details The HDF5 Reference Interface, H5R, provides a mechanism for managing + * HDF5 referenced objects. + */ + #endif /* H5Rmodule_H */ diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index 1fc41ec08dd..348a7a2e6ae 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -42,26 +42,39 @@ /* Public Typedefs */ /*******************/ -/* Reference types */ -typedef enum H5R_type_t { - H5R_BADTYPE = (-1), /* Invalid Reference Type */ - H5R_OBJECT, /* Object reference */ - H5R_DATASET_REGION, /* Dataset Region Reference */ - H5R_MAXTYPE /* Highest type (Invalid as true type) */ +//! +/** + * Reference types allowed. + * + * \internal DO NOT CHANGE THE ORDER or VALUES as reference type values are + * encoded into the datatype message header. + */ +typedef enum { + H5R_BADTYPE = (-1), /**< Invalid reference type */ + H5R_OBJECT, /**< Object reference */ + H5R_DATASET_REGION, /**< Dataset Region Reference */ + H5R_MAXTYPE /**< Highest type (Invalid as true type) */ } H5R_type_t; +//! -/* Object reference structure for user's code +//! +/** + * Object reference structure for user's code * This needs to be large enough to store largest haddr_t on a worst case * machine (8 bytes currently). */ typedef haddr_t hobj_ref_t; +//! -/* Dataset Region reference structure for user's code +//! +/** + * Dataset Region reference structure for user's code * (Buffer to store heap ID and index) * This needs to be large enough to store largest haddr_t in a worst case * machine (8 bytes currently) plus an int */ typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE]; +//! /********************/ /* Public Variables */ @@ -75,10 +88,223 @@ typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE]; extern "C" { #endif -H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); -H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); -H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); -H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Creates a reference + * + * \param[out] ref Reference created by the function call + * \param[in] loc_id Location identifier used to locate the object being pointed to + * \param[in] name Name of object at location \p loc_id + * \param[in] ref_type Type of reference + * \param[in] space_id Dataspace identifier with selection. Used only for + * dataset region references; pass as -1 if reference is + * an object reference, i.e., of type #H5R_OBJECT + * + * \return \herr_t + * + * \details H5Rcreate() creates the reference, \p ref, of the type specified in + * \p ref_type, pointing to the object \p name located at \p loc_id. + * + * The HDF5 library maps the void type specified above for \p ref to + * the type specified in \p ref_type, which will be one of the following: + * \snippet this H5R_type_t_snip + * + * The parameters \p loc_id and \p name are used to locate the object. + * + * The parameter \p space_id identifies the dataset region that a + * dataset region reference points to. This parameter is used only with + * dataset region references and should be set to -1 if the reference + * is an object reference, #H5R_OBJECT. + * + * \since 1.8.0 + */ +H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Opens the HDF5 object referenced + * + * \obj_id + * \oapl_id + * \param[in] ref_type The reference type of \p ref + * \param[in] ref Reference to open + * + * \return Returns identifier of referenced object if successful; otherwise + * returns a negative value. + * + * \details Given a reference, \p ref, to an object or a region in an object, + * H5Rdereference2() opens that object and returns an identifier. + * + * The parameter \p obj_id must be a valid identifier for the HDF5 file + * containing the referenced object or for any object in that HDF5 + * file. + * + * The parameter \p oapl_id is an object access property list + * identifier for the referenced object. The access property list must + * be of the same type as the object being referenced, that is a group, + * dataset, or datatype property list. + * + * The parameter \p ref_type specifies the reference type of the + * reference \p ref. \p ref_type may contain either of the following + * values: + * - #H5R_OBJECT + * - #H5R_DATASET_REGION + * + * The object opened with this function should be closed when it is no + * longer needed so that resource leaks will not develop. Use the + * appropriate close function such as H5Oclose() or H5Dclose() for + * datasets. + * + * \since 1.10.0 + * + */ +H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Sets up a dataspace and selection as specified by a region reference + * + * \param[in] dataset File identifier or identifier for any object in the file + * containing the referenced region + * \param[in] ref_type Reference type of \p ref, which must be #H5R_DATASET_REGION + * \param[in] ref Region reference to open + * + * \return Returns a valid dataspace identifier if successful; otherwise returns + * a negative value. + * + * \details H5Rget_region() creates a copy of the dataspace of the dataset + * pointed to by a region reference, \p ref, and defines a selection + * matching the selection pointed to by ref within the dataspace copy. + * + * \p dataset is used to identify the file containing the referenced + * region; it can be a file identifier or an identifier for any object + * in the file. + * + * The parameter \p ref_type specifies the reference type of \p ref and + * must contain the value #H5R_DATASET_REGION. + * + * Use H5Sclose() to release the dataspace identifier returned by this + * function when the identifier is no longer needed. + * + */ +H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Retrieves the type of object that an object reference points to + * + * \param[in] id The dataset containing the reference object or the group + * containing that dataset + * \param[in] ref_type Type of reference to query + * \param[in] ref Reference to query + * \param[out] obj_type Type of referenced object + * + * \return \herr_t + * + * \details Given an object reference, \p ref, H5Rget_obj_type2() returns the + * type of the referenced object in \p obj_type. + * + * A \Emph{reference type} is the type of reference, either an object + * reference or a dataset region reference. An \Emph{object reference} + * points to an HDF5 object while a \Emph{dataset region reference} + * points to a defined region within a dataset. + * + * The \Emph{referenced object} is the object the reference points + * to. The \Emph{referenced object type}, or the type of the referenced + * object, is the type of the object that the reference points to. + * + * The location identifier, \p id, is the identifier for either the + * dataset containing the object reference or the group containing that + * dataset. + * + * Valid reference types, to pass in as \p ref_type, include the + * following: + * \snippet this H5R_type_t_snip + * + * If the application does not already know the object reference type, + * that can be determined with three preliminary calls: + * + * \li Call H5Dget_type() on the dataset containing the reference to + * get a datatype identifier for the dataset’s datatype. + * \li Using that datatype identifier, H5Tget_class() returns a datatype + * class.\n If the datatype class is #H5T_REFERENCE, H5Tequal() can + * then be used to determine whether the reference’s datatype is + * #H5T_STD_REF_OBJ or #H5T_STD_REF_DSETREG: + * - If the datatype is #H5T_STD_REF_OBJ, the reference object type + * is #H5R_OBJECT. + * - If the datatype is #H5T_STD_REF_DSETREG, the reference object + * type is #H5R_DATASET_REGION. + * + * When the function completes successfully, it returns one of the + * following valid object type values (defined in H5Opublic.h): + * \snippet H5Opublic.h H5O_type_t_snip + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Retrieves a name for a referenced object + * + * \param[in] loc_id Identifier for the file containing the reference or for + * any object in that file + * \param[in] ref_type Type of reference + * \param[in] ref An object or dataset region reference + * \param[out] name A buffer to place the name of the referenced object or + * dataset region. If \c NULL, then this call will return the + * size in bytes of the name. + * \param[in] size The size of the \p name buffer. When the size is passed in, + * the \c NULL terminator needs to be included. + * + * \return Returns the length of the name if successful, returning 0 (zero) if + * no name is associated with the identifier. Otherwise returns a + * negative value. + * + * \details H5Rget_name() retrieves a name for the object identified by \p ref.\n + * \p loc_id is used to identify the file containing the reference. It + * can be the file identifier for the file containing the reference or + * an identifier for any object in that file. + * + * \ref H5R_type_t is the reference type of \p ref. Valid values + * include the following: + * \snippet this H5R_type_t_snip + * + * \p ref is the reference for which the target object’s name is + * sought. + * + * If \p ref is an object reference, \p name will be returned with a + * name for the referenced object. If \p ref is a dataset region + * reference, \p name will contain a name for the object containing the + * referenced region. + * + * Up to \p size characters of the name are returned in \p name; + * additional characters, if any, are not returned to the user + * application. + * + * If the length of the name, which determines the required value of \p + * size, is unknown, a preliminary H5Rget_name() call can be made. The + * return value of this call will be the size of the object name. That + * value can then be assigned to \p size for a second H5Rget_name() + * call, which will retrieve the actual name. + * + * If there is no name associated with the object identifier or if the + * \p name is \c NULL, H5Rget_name() returns the size of the \p name + * buffer (the size does not include the \p NULL terminator). + * + * Note that an object in an HDF5 file may have multiple paths if there + * are multiple links pointing to it. This function may return any one + * of these paths. + * + * \since 1.8.0 + */ H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name /*out*/, size_t size); @@ -89,8 +315,110 @@ H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, c #ifndef H5_NO_DEPRECATED_SYMBOLS /* Function prototypes */ -H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref); -H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Retrieves the type of object that an object reference points to + * + * \param[in] id The dataset containing the reference object or the group + * containing that dataset + * \param[in] ref_type Type of reference to query + * \param[in] ref Reference to query + * + * \return Returns a valid object type if successful; otherwise returns a + * negative value (#H5G_UNKNOWN). + * + * \deprecated This function has been renamed from H5Rget_obj_type() and is + * deprecated in favor of the macro H5Rget_obj_type() or the + * function H5Rget_obj_type2(). + * + * \details Given an object reference, \p ref, H5Rget_obj_type1() returns the + * type of the referenced object. + * + * A \Emph{reference type} is the type of reference, either an object + * reference or a dataset region reference. An \Emph{object reference} + * points to an HDF5 object while a \Emph{dataset region reference} + * points to a defined region within a dataset. + * + * The \Emph{referenced object} is the object the reference points + * to. The \Emph{referenced object type}, or the type of the referenced + * object, is the type of the object that the reference points to. + * + * The location identifier, \p id, is the identifier for either the + * dataset containing the object reference or the group containing that + * dataset. + * + * Valid reference types, to pass in as \p ref_type, include the + * following: + * \snippet this H5R_type_t_snip + * + * If the application does not already know the object reference type, + * that can be determined with three preliminary calls: + * + * \li Call H5Dget_type() on the dataset containing the reference to + * get a datatype identifier for the dataset’s datatype. + * \li Using that datatype identifier, H5Tget_class() returns a datatype + * class.\n If the datatype class is #H5T_REFERENCE, H5Tequal() can + * then be used to determine whether the reference’s datatype is + * #H5T_STD_REF_OBJ or #H5T_STD_REF_DSETREG: + * - If the datatype is #H5T_STD_REF_OBJ, the reference object type + * is #H5R_OBJECT. + * - If the datatype is #H5T_STD_REF_DSETREG, the reference object + * type is #H5R_DATASET_REGION. + * + * When the function completes successfully, it returns one of the + * following valid object type values (defined in H5Gpublic.h): + * \snippet H5Gpublic.h H5G_obj_t_snip + * + * \version 1.8.0 Function H5Rget_obj_type() renamed to H5Rget_obj_type1() and + * deprecated in this release. + * \since 1.6.0 + * + */ +H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref); + +/** + * -------------------------------------------------------------------------- + * \ingroup H5R + * + * \brief Opens the HDF5 object referenced + * + * \obj_id + * \param[in] ref_type The reference type of \p ref + * \param[in] ref Reference to open + * + * \return Returns identifier of referenced object if successful; otherwise + * returns a negative value. + * + * \deprecated This function has been renamed from H5Rdereference() and is + * deprecated in favor of the macro H5Rdereference() or the function + * H5Rdereference2(). + * + * \details Given a reference, \p ref, to an object or a region in an object, + * H5Rdereference1() opens that object and returns an identifier. + * + * The parameter \p obj_id must be a valid identifier for an object in + * the HDF5 file containing the referenced object, including the file + * identifier. + * + * The parameter \p ref_type specifies the reference type of the + * reference \p ref. \p ref_type may contain either of the following + * values: + * - #H5R_OBJECT + * - #H5R_DATASET_REGION + * + * The object opened with this function should be closed when it is no + * longer needed so that resource leaks will not develop. Use the + * appropriate close function such as H5Oclose() or H5Dclose() for + * datasets. + * + * \version 1.10.0 Function H5Rdereference() renamed to H5Rdereference1() and + * deprecated in this release. + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Smodule.h b/src/H5Smodule.h index a7b035e2766..bb33eb855a7 100644 --- a/src/H5Smodule.h +++ b/src/H5Smodule.h @@ -29,4 +29,31 @@ #define H5_MY_PKG_ERR H5E_DATASPACE #define H5_MY_PKG_INIT YES +/**\defgroup H5S H5S + * \brief Dataspace Interface + * + * \details The Dataspace Interface provides functions for creating and + * working with dataspaces. + * + * A dataspace has two roles: + * + * \li It contains the spatial information (logical layout) of a + * dataset stored in a file. + * \li It describes an application’s data buffers and data elements + * participating in I/O. In other words, it can be used to + * select a portion or subset of a dataset. + * + * The spatial information of a dataset in a file includes the + * rank and dimensions of the dataset, which are a permanent part + * of the dataset definition. It can have dimensions that are fixed + * (unchanging) or unlimited, which means they can grow in size + * (or are extendible). + * + * A dataspace can consist of: + * \li no elements (NULL) + * \li a single element (scalar), or + * \li a simple array. + * + */ + #endif /* H5Smodule_H */ diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 8a7f1a38526..2b619d61a49 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -39,7 +39,7 @@ typedef enum H5S_class_t { /* Different ways of combining selections */ typedef enum H5S_seloper_t { H5S_SELECT_NOOP = -1, /* error */ - H5S_SELECT_SET = 0, /* Select "set" operation */ + H5S_SELECT_SET = 0, /* Select "set" operation */ H5S_SELECT_OR, /* Binary "or" operation for hyperslabs * (add new selection to existing selection) * Original region: AAAAAAAAAA @@ -77,12 +77,12 @@ typedef enum H5S_seloper_t { /* Enumerated type for the type of selection */ typedef enum { - H5S_SEL_ERROR = -1, /* Error */ - H5S_SEL_NONE = 0, /* Nothing selected */ - H5S_SEL_POINTS = 1, /* Points / elements selected */ + H5S_SEL_ERROR = -1, /* Error */ + H5S_SEL_NONE = 0, /* Nothing selected */ + H5S_SEL_POINTS = 1, /* Points / elements selected */ H5S_SEL_HYPERSLABS = 2, /* Hyperslab selected */ - H5S_SEL_ALL = 3, /* Entire extent selected */ - H5S_SEL_N /*THIS MUST BE LAST */ + H5S_SEL_ALL = 3, /* Entire extent selected */ + H5S_SEL_N /*THIS MUST BE LAST */ } H5S_sel_type; #ifdef __cplusplus @@ -90,52 +90,1104 @@ extern "C" { #endif /* Operations on dataspaces */ -H5_DLL hid_t H5Screate(H5S_class_t type); -H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); -H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); -H5_DLL hid_t H5Scopy(hid_t space_id); -H5_DLL herr_t H5Sclose(hid_t space_id); -H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc); -H5_DLL hid_t H5Sdecode(const void *buf); -H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id); -H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); -H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); -H5_DLL htri_t H5Sis_simple(hid_t space_id); +/** + * \ingroup H5S + * + * \brief Releases and terminates access to a dataspace + * + * \space_id + * + * \return \herr_t + * + * \details H5Sclose() releases a dataspace. Further access through the + * dataspace identifier is illegal. Failure to release a dataspace with this + * call will result in resource leaks. + * + * \version 1.4.0 Fortran subroutine introduced in this release. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sclose(hid_t space_id); +/** + * \ingroup H5S + * + * \brief Creates an exact copy of a dataspace + * + * \space_id + * + * \return \hid_tv{dataspace} + * + * \details H5Scopy() creates a new dataspace which is an exact copy of the + * dataspace identified by \p space_id. The dataspace identifier + * returned from this function should be released with H5Sclose() + * or resource leaks will occur. + * + * \version 1.4.0 Fortran subroutine introduced. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Scopy(hid_t space_id); +/** + * \ingroup H5S + * + * \brief Creates a new dataspace of a specified type + * + * \param[in] type Type of dataspace to be created + * + * \return \hid_t{dataspace} + * + * \details H5Screate() creates a new dataspace of a particular type. Currently + * supported types are #H5S_SCALAR, #H5S_SIMPLE, and #H5S_NULL. + * + * Further dataspace types may be added later. + * + * A scalar dataspace, #H5S_SCALAR, has a single element, though that + * element may be of a complex datatype, such as a compound or array + * datatype. By convention, the rank of a scalar dataspace is always \p 0 + * (zero); think of it geometrically as a single, dimensionless point, + * though that point can be complex. + * + * A simple dataspace, #H5S_SIMPLE, consists of a regular array of elements. + * + * A null dataspace, #H5S_NULL, has no data elements. + * + * The dataspace identifier returned by this function can be released with + * H5Sclose() so that resource leaks will not occur. + * + * \version 1.4.0 Fortran subroutine introduced. + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Screate(H5S_class_t type); +/** + * \ingroup H5S + * \brief Creates a new simple dataspace and opens it for access + * + * \param[in] rank Number of dimensions of dataspace + * \param[in] dims Array specifying the size of each dimension + * \param[in] maxdims Array specifying the maximum size of each dimension + * + * \return \hid_t{dataspace} + * + * \details H5Screate_simple() creates a new simple dataspace and opens it + * for access, returning a dataspace identifier. + * + * \p rank is the number of dimensions used in the dataspace. + * + * \p dims is a one-dimensional array of size rank specifying the + * size of each dimension of the dataset. \p maxdims is an array of + * the same size specifying the upper limit on the size of each + * dimension. + * + * Any element of \p dims can be \p 0 (zero). Note that no data can + * be written to a dataset if the size of any dimension of its current + * dataspace is \p 0. This is sometimes a useful initial state for + * a dataset. + * + * \p maxdims may be the null pointer, in which case the upper limit + * is the same as \p dims. Otherwise, no element of \p maxdims + * should be smaller than the corresponding element of \p dims. + * + * If an element of \p maxdims is #H5S_UNLIMITED, the maximum size of + * the corresponding dimension is unlimited. + * + * Any dataset with an unlimited dimension must also be chunked; see + * H5Pset_chunk(). Similarly, a dataset must be chunked if \p dims + * does not equal \p maxdims. + * + * The dataspace identifier returned from this function must be + * released with H5Sclose() or resource leaks will occur. + * + * \note Once a dataspace has been created, specific regions or elements in + * the dataspace can be selected and selections can be removed, as well. + * For example, H5Sselect_hyperslab() selects a region in a dataspace and + * H5Sselect_elements() selects array elements in a dataspace. These + * functions are used for subsetting. H5Sselect_none() removes all + * selections from a dataspace and is used in Parallel HDF5 when a process + * does not have or need to write data. + * + * \version 1.4.0 Fortran subroutine introduced. + * + * \since 1.0.0 + * + */ +H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); +/** + * \ingroup H5S + * + * \brief Decodes a binary object description of data space and returns a + * new object handle + * + * \param[in] buf Buffer for the data space object to be decoded + * + * \return \hid_t{dataspace} + * + * \details Given an object description of a dataspace in binary in a + * buffer, H5Sdecode() reconstructs the HDF5 data type object and + * returns a new object handle for it. The binary description of the + * object is encoded by H5Sencode(). The user is responsible for + * passing in the right buffer. The types of dataspace addressed + * in this function are null, scalar, and simple space. For a + * simple dataspace, the selection information (for example, + * hyperslab selection) is also encoded and decoded. A complex + * dataspace has not been implemented in the library. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Sdecode(const void *buf); +/** + * \ingroup H5S + * + * \brief Encodes a data space object description into a binary buffer + * + * \space_id{obj_id} + * \param[in,out] buf Buffer for the object to be encoded into; + * If the provided buffer is NULL, only the size of + * buffer needed is returned through \p nalloc. + * \param[in,out] nalloc The size of the allocated buffer + * + * \return \herr_t + * + * \details Given the data space identifier \p obj_id, H5Sencode() converts + * a data space description into binary form in a buffer. Using + * this binary form in the buffer, a data space object can be + * reconstructed using H5Sdecode() to return a new object handle + * (\p hid_t) for this data space. + * + * A preliminary H5Sencode() call can be made to find out the size + * of the buffer needed. This value is returned as \p nalloc. That + * value can then be assigned to \p nalloc for a second H5Sencode1() + * call, which will retrieve the actual encoded object. + * + * If the library finds out \p nalloc is not big enough for the + * object, it simply returns the size of the buffer needed through + * \p nalloc without encoding the provided buffer. + * + * The types of data space addressed in this function are null, + * scalar, and simple space. For a simple data space, the information + * on the selection, for example, hyperslab selection, is also + * encoded and decoded. A complex data space has not been + * implemented in the library. + * + * \since 1.8.0 + * + */ +H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc); +/** + * \ingroup H5S + * + * \brief Copies the extent of a dataspace + * + * \space_id{dst_id} + * \space_id{src_id} + * + * \return \herr_t + * + * \details H5Sextent_copy() copies the extent from \p src_id to \p dst_id. + * This action may change the type of the dataspace. + * + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sextent_copy(hid_t dst_id, hid_t src_id); +/** + * \ingroup H5S + * + * \brief Determines whether two dataspace extents are equal + * + * \space_id{space1_id} + * \space_id{space2_id} + * + * \return \htri_t + * + * \details H5Sextent_equal() determines whether the dataspace extents of + * two dataspaces, \p space1_id and \p space2_id, are equal. + * + * \since 1.8.0 + * + */ +H5_DLL htri_t H5Sextent_equal(hid_t space1_id, hid_t space2_id); +/** + * \ingroup H5S + * + * \brief Retrieves dataspace dimension size and maximum size + * + * \space_id + * \param[out] dims Pointer to array to store the size of each dimension + * \param[out] maxdims Pointer to array to store the maximum size of each + * dimension + * + * \return Returns the number of dimensions in the dataspace if successful; + * otherwise returns a negative value. + * + * \details H5Sget_simple_extent_dims() returns the size and maximum sizes + * of each dimension of a dataspace \p space_id through the \p dims + * and \p maxdims parameters. + * + * Either or both of \p dims and \p maxdims may be NULL. + * + * If a value in the returned array \p maxdims is #H5S_UNLIMITED (-1), + * the maximum size of that dimension is unlimited. + * + * \version 1.4.0 Fortran subroutine introduced. + * \since 1.0.0 + * + */ +H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); +/** + * \ingroup H5S + * + * \brief Determines the dimensionality of a dataspace + * + * \space_id + * + * \return Returns the number of dimensions in the dataspace if successful; + * otherwise returns a negative value. + * + * \details H5Sget_simple_extent_ndims() determines the dimensionality (or + * rank) of a dataspace. + * + * \version 1.4.0 Fortran subroutine introduced. + * \since 1.0.0 + * + */ +H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); +/** + * \ingroup H5S + * + * \brief Determines the number of elements in a dataspace + * + * \space_id + * + * \return Returns the number of elements in the dataspace if successful; + * otherwise returns a negative value. + * + * \details H5Sget_simple_extent_npoints() determines the number of elements + * in a dataspace \p space_id. For example, a simple 3-dimensional + * dataspace with dimensions 2, 3, and 4 would have 24 elements. + * + * \version 1.4.0 Fortran subroutine introduced. + * \since 1.0.0 + * + */ +H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id); +/** + * \ingroup H5S + * + * \brief Determines the current class of a dataspace + * + * \space_id + * + * \return Returns a dataspace class name if successful; + * otherwise #H5S_NO_CLASS (-1). + * + * \details H5Sget_simple_extent_type() determines the current class of a + * dataspace \p space_id. + * + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id); -H5_DLL herr_t H5Sset_extent_none(hid_t space_id); -H5_DLL herr_t H5Sextent_copy(hid_t dst_id, hid_t src_id); -H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2); +/** + * \ingroup H5S + * + * \brief Determines whether a dataspace is a simple dataspace + * + * \space_id + * + * \return \htri_t + * + * \details H5Sis_simple() determines whether or not a dataspace is a simple + * dataspace. + * + * \note Currently, all dataspace objects are simple dataspaces; complex + * dataspace support will be added in the future. + * + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ +H5_DLL htri_t H5Sis_simple(hid_t space_id); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Resets the extent of a dataspace back to "none" + * + * \space_id + * + * \return \herr_t + * + * \details H5Sset_extent_none() resets the type of a dataspace to + * #H5S_NULL with no extent information stored for the dataspace. + * + * \version 1.10.7 To set the class to #H5S_NO_CLASS. + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sset_extent_none(hid_t space_id); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Sets or resets the size of an existing dataspace + * + * \space_id + * \param[in] rank Rank, or dimensionality, of the dataspace + * \param[in] dims Array containing current size of dataspace + * \param[in] max Array containing maximum size of dataspace + * + * \return \herr_t + * + * \details H5Sset_extent_simple() sets or resets the size of an existing + * dataspace. + * + * \p rank is the dimensionality, or number of dimensions, of the + * dataspace. + * + * \p dims is an array of size \p rank which contains the new size + * of each dimension in the dataspace. \p max is an array of size + * \p rank which contains the maximum size of each dimension in + * the dataspace. + * + * Any previous extent is removed from the dataspace, the dataspace + * type is set to #H5S_SIMPLE, and the extent is set as specified. + * + * Note that a dataset must be chunked if \p dims does not equal + * \p max. + * + * + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); /* Operations on dataspace selections */ -H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid); -H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); -H5_DLL herr_t H5Sselect_copy(hid_t dst_id, hid_t src_id); -H5_DLL htri_t H5Sselect_valid(hid_t spaceid); -H5_DLL herr_t H5Sselect_adjust(hid_t spaceid, const hssize_t *offset); -H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[]); -H5_DLL htri_t H5Sselect_shape_same(hid_t space1_id, hid_t space2_id); -H5_DLL htri_t H5Sselect_intersect_block(hid_t space_id, const hsize_t *start, const hsize_t *end); -H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); -H5_DLL herr_t H5Sselect_all(hid_t spaceid); -H5_DLL herr_t H5Sselect_none(hid_t spaceid); -H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord); +/** + * \ingroup H5S + * + * \brief Performs an operation on a hyperslab and an existing selection and + * returns the resulting selection + * + * \space_id + * \param[in] op Operation to perform on the current selection + * \param[in] start Offset of the start of of the hyperslab + * \param[in] stride Hyperslab stride + * \param[in] count Number of blocks included in the hyperslab + * \param[in] block Size of a block in the hyperslab + * + * \return \hid_tv{dataspace} + * + * \details H5Scombine_hyperslab() combines a hyperslab selection specified + * by \p start, \p stride, \p count and \p block with the current + * selection for the dataspace \p space_id, creating a new dataspace + * to return the generated selection. If the current selection is + * not a hyperslab, it is freed and the hyperslab parameters passed + * in are combined with the #H5S_SEL_ALL hyperslab (ie. a selection + * composing the entire current extent). If either \p stride or + * \p block is NULL, then it will be set to \p 1. + * + * \since 1.10.6 + * + */ +H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], + const hsize_t stride[], const hsize_t count[], const hsize_t block[]); +/** + * \ingroup H5S + * + * \brief Combine two hyperslab selections with an operation, returning a + * dataspace with the resulting selection + * + * \space_id{space1_id} + * \param[in] op Selection operator + * \space_id{space2_id} + * + * \return \hid_t{dataspace} + * + * \details H5Scombine_select() combines two hyperslab selections + * \p space1_id and \p space2_id with an operation, returning a + * new dataspace with the resulting selection. The dataspace extent + * from \p space1_id is copied for the dataspace extent of the + * newly created dataspace. + * + * \since 1.10.6 + * + */ +H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); +/** + * \ingroup H5S + * + * \brief Retrieves a regular hyperslab selection + * + * \space_id{spaceid} + * \param[out] start Offset of the start of the regular hyperslab + * \param[out] stride Stride of the regular hyperslab + * \param[out] count Number of blocks in the regular hyperslab + * \param[out] block Size of a block in the regular hyperslab + * + * \return \herr_t + * + * \details H5Sget_regular_hyperslab() takes the dataspace identifier, + * \p spaceid, and retrieves the values of \p start, \p stride, + * \p count, and \p block for the regular hyperslab selection. + * + * A regular hyperslab selection is a hyperslab selection + * described by setting the \p offset, \p stride, \p count, and + * \p block parameters to the H5Sselect_hyperslab() call. If + * several calls to H5Sselect_hyperslab() are needed, the + * hyperslab selection is irregular. + * + * See H5Sselect_hyperslab() for descriptions of \p offset, + * \p stride, \p count, and \p block. + * + * \note If a hyperslab selection is originally regular, then becomes + * irregular through selection operations, and then becomes regular + * again, the final regular selection may be equivalent but not + * identical to the original regular selection. + * + * \since 1.10.0 + * + */ +H5_DLL htri_t H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], + hsize_t block[]); +/** + * \ingroup H5S + * + * \brief Gets the bounding box containing the current selection + * + * \space_id{spaceid} + * \param[out] start Starting coordinates of the bounding box + * \param[out] end Ending coordinates of the bounding box, i.e., the + * coordinates of the diagonally opposite corner + * + * \return \herr_t + * + * \details H5Sget_select_bounds() retrieves the coordinates of the bounding + * box containing the current selection and places them into + * user-supplied buffers. + * + * The \p start and \p end buffers must be large enough to hold + * the dataspace rank number of coordinates. + * + * The bounding box exactly contains the selection. I.e., if a + * 2-dimensional element selection is currently defined as containing + * the points (4,5), (6,8), and (10,7), then the bounding box + * will be (4, 5), (10, 8). + * + * The bounding box calculation includes the current offset of the + * selection within the dataspace extent. + * + * Calling this function on a \a none selection will fail. + * + * \version 1.6.0 The \p start and \p end parameters have changed from type + * \p hsize_t * to \p hssize_t *. + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[]); +/** + * \ingroup H5S + * + * \brief Gets the number of element points in the current selection + * + * \space_id{spaceid} + * + * \return Returns the number of element points in the current dataspace + * selection if successful. Otherwise returns a negative value. + * + * \details H5Sget_select_elem_npoints() returns the number of element + * points in the current dataspace selection, so that the element + * points can be retrieved with H5Sget_select_elem_pointlist(). + * (This is similar to the way that H5Sget_select_hyper_nblocks() + * and H5Sget_select_hyper_blocklist() work with hyperslab + * selections.) + * + * Coincidentally, H5Sget_select_npoints() and + * H5Sget_select_elem_npoints() will always return the same value + * when an element selection is queried, but + * H5Sget_select_elem_npoints() does not work with other selection + * types. + * + * \since 1.2.0 + * + */ H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid); -H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, - hsize_t buf[/*numpoints*/]); -H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], - const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); -H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], - const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); -H5_DLL herr_t H5Smodify_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); -H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); -H5_DLL htri_t H5Sis_regular_hyperslab(hid_t spaceid); -H5_DLL htri_t H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], - hsize_t block[]); +/** + * \ingroup H5S + * + * \brief Gets the list of element points currently selected + * + * \space_id{spaceid} + * \param[in] startpoint Element point to start with + * \param[in] numpoints Number of element points to get + * \param[out] buf List of element points selected + * + * \details H5Sget_select_elem_pointlist() returns the list of element + * points in the current dataspace selection \p space_id. Starting + * with the \p startpoint in the list of points, \p numpoints + * points are put into the user's buffer. If the user's buffer + * fills up before \p numpoints points are inserted, the buffer + * will contain only as many points as fit. + * + * The element point coordinates have the same dimensionality + * (rank) as the dataspace they are located within. The list of + * element points is formatted as follows:\n + * \, followed by\n + * the next coordinate,\n + * etc.\n + * until all of the selected element points have been listed. + * + * The points are returned in the order they will be iterated + * through when the selection is read/written from/to disk. + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, + hsize_t buf[/*numpoints*/]); +/** + * \ingroup H5S + * + * \brief Gets the list of hyperslab blocks currently selected + * + * \space_id{spaceid} + * \param[in] startblock Hyperslab block to start with + * \param[in] numblocks Number of hyperslab blocks to get + * \param[out] buf List of hyperslab blocks selected + * + * \return \herr_t + * + * \details H5Sget_select_hyper_blocklist() returns a list of the hyperslab + * blocks currently selected. Starting with the \p startblock-th block + * in the list of blocks, \p numblocks blocks are put into the + * user's buffer. If the user's buffer fills up before \p numblocks + * blocks are inserted, the buffer will contain only as many blocks + * as fit. + * + * The block coordinates have the same dimensionality (rank) as the + * dataspace they are located within. The list of blocks is + * formatted as follows:\n + * \<"start" coordinate\>, immediately followed by\n + * \<"opposite" corner coordinate\>, followed by\n + * the next "start" and "opposite" coordinates,\n + * etc. until all of the selected blocks have been listed.\n + * No guarantee of any order of the blocks is implied. + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, + hsize_t buf[/*numblocks*/]); +/** + * \ingroup H5S + * + * \brief Get number of hyperslab blocks + * + * \space_id{spaceid} + * + * \return Returns the number of hyperslab blocks in the current dataspace + * selection if successful. Otherwise returns a negative value. + * + * \details H5Sget_select_hyper_nblocks() returns the number of hyperslab + * blocks in the current dataspace selection. + * + * \since 1.2.0 + * + */ H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid); -H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, - hsize_t buf[/*numblocks*/]); -H5_DLL hid_t H5Sselect_project_intersection(hid_t src_space_id, hid_t dst_space_id, - hid_t src_intersect_space_id); +/** + * \ingroup H5S + * + * \brief Determines the number of elements in a dataspace selection + * + * \space_id{spaceid} + * + * \return Returns the number of elements in the selection if successful; + * otherwise returns a negative value. + * + * \details H5Sget_select_npoints() determines the number of elements in + * the current selection of a dataspace. It works with any + * selection type, and is the correct way to retrieve the number + * of elements in a selection. + * + * \version 1.4.0 Fortran subroutine introduced in this release. + * \since 1.0.0 + * + */ +H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); +/** + * \ingroup H5S + * + * \brief Determines the type of the dataspace selection + * + * \space_id{spaceid} + * + * \return Returns the dataspace selection type, a value of the enumerated + * datatype #H5S_sel_type, if successful. + * + * \details H5Sget_select_type() retrieves the type of dataspace selection + * currently defined for the dataspace \p space_id. Valid values + * for the dataspace selection type are: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5S_SEL_NONENo selection is defined
    #H5S_SEL_POINTSA sequence of points is selected
    #H5S_SEL_HYPERSLABSA hyperslab or compound hyperslab is selected
    #H5S_SEL_ALLThe entire dataset is selected
    + * + * Otherwise returns a negative value. + * + * \since 1.6.0 + * + */ +H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid); +/** + * \ingroup H5S + * + * \brief Determines if a hyperslab selection is regular + * + * \space_id{spaceid} + * + * \return \htri_t + * + * \details H5Sis_regular_hyperslab() takes the dataspace identifier, + * \p spaceid, and queries the type of the hyperslab selection. + * + * A regular hyperslab selection is a hyperslab selection described + * by setting the offset, stride, count, and block parameters for + * a single H5Sselect_hyperslab() call. If several calls to + * H5Sselect_hyperslab() are needed, then the hyperslab selection + * is irregular. + * + * \since 1.10.0 + * + */ +H5_DLL htri_t H5Sis_regular_hyperslab(hid_t spaceid); +/** + * \ingroup H5S + * + * \brief Refines a hyperslab selection with an operation, using a second + * hyperslab to modify it + * + * \space_id{space1_id} + * \param[in] op Selection operator + * \space_id{space2_id} + * + * \return \herr_t + * + * \details H5Smodify_select() refines an existing hyperslab selection + * \p space1_id with an operation \p op, using a second hyperslab + * \p space2_id. The first selection is modified to contain the + * result of \p space1_id operated on by \p space2_id. + * + * \since 1.10.6 + * + */ +H5_DLL herr_t H5Smodify_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); +/** + * \ingroup H5S + * + * \brief Sets the offset of a simple dataspace + * + * \space_id + * \param[in] offset The offset at which to position the selection + * + * \return \herr_t + * + * \details H5Soffset_simple() sets the offset of a simple dataspace + * \p space_id. The offset array must be the same number of + * elements as the number of dimensions for the dataspace. If the + * \p offset array is set to NULL, the offset for the dataspace is + * reset to 0. + * + * This function allows the same shaped selection to be moved to + * different locations within a dataspace without requiring it to + * be redefined. + * + * \version 1.4.0 Fortran subroutine was introduced. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); +/** + * \ingroup H5S + * + * \brief Adjusts a selection by subtracting an offset + * + * \space_id{spaceid} + * \param[in] offset Offset to subtract + * + * \return \herr_t + * + * \details H5Sselect_adjust() shifts a dataspace selection by a specified + * logical offset within the dataspace extent. + * + * \note This can be useful for VOL developers to implement chunked datasets. + * + * \since 1.10.6 + */ +H5_DLL herr_t H5Sselect_adjust(hid_t spaceid, const hssize_t *offset); +/** + * \ingroup H5S + * + * \brief Selects an entire dataspace + * + * \space_id{spaceid} + * + * \return \herr_t + * + * \details H5Sselect_all() selects the entire extent of the dataspace + * \p dspace_id. + * + * More specifically, H5Sselect_all() sets the selection type to + * #H5S_SEL_ALL, which specifies the entire dataspace anywhere it + * is applied. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sselect_all(hid_t spaceid); +/** + * \ingroup H5S + * + * \brief Copies a selection from one dataspace to another + * + * \space_id{dst_id} + * \space_id{src_id} + * + * \return \herr_t + * + * \details H5Sselect_copy() copies all selection information (including + * offset) from the source dataspace \p src_id to the destination + * dataspace \p dst_id. + * + * \since 1.10.6 + * + */ +H5_DLL herr_t H5Sselect_copy(hid_t dst_id, hid_t src_id); +/** + * \ingroup H5S + * + * \brief Selects array elements to be included in the selection for a + * dataspace + * + * \space_id + * \param[in] op Operator specifying how the new selection is to be + * combined with the existing selection for the dataspace + * \param[in] num_elem Number of elements to be selected + * \param[in] coord A pointer to a buffer containing a serialized copy of + * a 2-dimensional array of zero-based values specifying + * the coordinates of the elements in the point selection + * + * \return \herr_t + * + * \details H5Sselect_elements() selects array elements to be included in + * the selection for the \p space_id dataspace. This is referred + * to as a point selection. + * + * The number of elements selected is set in the \p num_elements + * parameter. + * + * The \p coord parameter is a pointer to a buffer containing a + * serialized 2-dimensional array of size \p num_elements by the + * rank of the dataspace. The array lists dataset elements in the + * point selection; that is, it’s a list of of zero-based values + * specifying the coordinates in the dataset of the selected + * elements. The order of the element coordinates in the \p coord + * array specifies the order in which the array elements are + * iterated through when I/O is performed. Duplicate coordinate + * locations are not checked for. See below for examples of the + * mapping between the serialized contents of the buffer and the + * point selection array that it represents. + * + * The selection operator \p op determines how the new selection + * is to be combined with the previously existing selection for + * the dataspace. The following operators are supported: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5S_SELECT_SETReplaces the existing selection with the parameters from + * this call. Overlapping blocks are not supported with this + * operator. Adds the new selection to the existing selection. + *
    #H5S_SELECT_APPENDAdds the new selection following the last element of the + * existing selection.
    #H5S_SELECT_PREPENDAdds the new selection preceding the first element of the + * existing selection.
    + * + * Mapping the serialized \p coord buffer to a 2-dimensional + * point selection array: + * To illustrate the construction of the contents of the \p coord + * buffer, consider two simple examples: a selection of 5 points in + * a 1-dimensional array and a selection of 3 points in a + * 4-dimensional array. + * + * In the 1D case, we will be selecting five points and a 1D + * dataspace has rank 1, so the selection will be described in a + * 5-by-1 array. To select the 1st, 14th, 17th, 23rd, 8th elements + * of the dataset, the selection array would be as follows + * (remembering that point coordinates are zero-based): + * \n 0 + * \n 13 + * \n 16 + * \n 22 + * \n 7 + * + * This point selection array will be serialized in the \p coord + * buffer as: + * \n 0 13 16 22 7 + * + * In the 4D case, we will be selecting three points and a 4D + * dataspace has rank 4, so the selection will be described in a + * 3-by-4 array. To select the points (1,1,1,1), (14,6,12,18), and + * (8,22,30,22), the point selection array would be as follows: + * \n 0 0 0 0 + * \n 13 5 11 17 + * \n 7 21 29 21 + * + * This point selection array will be serialized in the \p coord + * buffer as: + * \n 0 0 0 0 13 5 11 17 7 21 29 21 + * + * \version 1.6.4 C coord parameter type changed to \p const hsize_t. + * \version 1.6.4 Fortran \p coord parameter type changed to \p INTEGER(HSIZE_T). + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord); +/** + * \ingroup H5S + * + * \brief Selects a hyperslab region to add to the current selected region + * + * \space_id + * \param[in] op Operation to perform on current selection + * \param[in] start Offset of start of hyperslab + * \param[in] stride Hyperslab stride + * \param[in] count Number of blocks included in hyperslab + * \param[in] block Size of block in hyperslab + * + * \return \herr_t + * + * \details H5Sselect_hyperslab() selects a hyperslab region to add to the + * current selected region for the dataspace specified by + * \p space_id. + * + * The \p start, \p stride, \p count, and \p block arrays must be the + * same size as the rank of the dataspace. For example, if the + * dataspace is 4-dimensional, each of these parameters must be a + * 1-dimensional array of size 4. + * + * The selection operator \p op determines how the new selection + * is to be combined with the already existing selection for the + * dataspace. The following operators are supported: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
    #H5S_SELECT_SETReplaces the existing selection with the + * parameters from this call. Overlapping blocks + * are not supported with this operator.
    #H5S_SELECT_ORAdds the new selection to the existing selection. + * (Binary OR)
    #H5S_SELECT_ANDRetains only the overlapping portions of the + * new selection and the existing selection. + * (Binary AND)
    #H5S_SELECT_XORRetains only the elements that are members of + * the new selection or the existing selection, + * excluding elements that are members of both + * selections. (Binary exclusive-OR, XOR) + *
    #H5S_SELECT_NOTBRetains only elements of the existing selection + * that are not in the new selection.
    #H5S_SELECT_NOTARetains only elements of the new selection that + * are not in the existing selection.
    + * + * The \p start array specifies the offset of the starting element + * of the specified hyperslab. + * + * The \p stride array chooses array locations from the dataspace with + * each value in the \p stride array determining how many elements to + * move in each dimension. Setting a value in the \p stride array to + * \p 1 moves to each element in that dimension of the dataspace; + * setting a value of \p 2 in allocation in the \p stride array moves + * to every other element in that dimension of the dataspace. In + * other words, the \p stride determines the number of elements to + * move from the \p start location in each dimension. Stride values + * of \p 0 are not allowed. If the \p stride parameter is NULL, a + * contiguous hyperslab is selected (as if each value in the \p stride + * array were set to \p 1). + * + * The \p count array determines how many blocks to select from the + * dataspace, in each dimension. + * + * The \p block array determines the size of the element block + * selected from the dataspace. If the \p block parameter is set to + * NULL, the block size defaults to a single element in each dimension + * (as if each value in the \p block array were set to \p 1). + * + * For example, consider a 2-dimensional dataspace with hyperslab + * selection settings as follows: the \p start offset is specified as + * [1,1], \p stride is [4,4], \p count is [3,7], and \p block is [2,2]. + * In C, these settings will specify a hyperslab consisting of 21 + * 2x2 blocks of array elements starting with location (1,1) with the + * selected blocks at locations (1,1), (5,1), (9,1), (1,5), (5,5), etc.; + * in Fortran, they will specify a hyperslab consisting of 21 2x2 + * blocks of array elements starting with location (2,2) with the + * selected blocks at locations (2,2), (6,2), (10,2), (2,6), (6,6), etc. + * + * Regions selected with this function call default to C order + * iteration when I/O is performed. + * + * \version 1.4.0 Fortran subroutine introduced in this release. + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], + const hsize_t stride[], const hsize_t count[], const hsize_t block[]); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Checks if current selection intersects with a block + * + * \space_id + * \param[in] start Starting coordinate of block + * \param[in] end Opposite ("ending") coordinate of block + * + * \return \htri_t + * + * \details H5Sselect_intersect_block() checks to see if the current + * selection \p space_id in the dataspace intersects with the block + * specified by \p start and \p end. + * + * \note Assumes that \p start & \p end block bounds are inclusive, so + * \p start == \p end value is OK. + * + * \since 1.10.6 + * + */ +H5_DLL htri_t H5Sselect_intersect_block(hid_t space_id, const hsize_t *start, const hsize_t *end); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Resets the selection region to include no elements + * + * \space_id{spaceid} + * + * \return \herr_t + * + * \details H5Sselect_none() resets the selection region for the dataspace + * \p space_id to include no elements. + * + * \since 1.0.0 + * + */ +H5_DLL herr_t H5Sselect_none(hid_t spaceid); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Projects the intersection of two source selections to a + * destination selection + * + * \space_id{src_space_id} + * \space_id{dst_space_id} + * \space_id{src_intersect_space_id} + * + * \return Returns a dataspace with a selection equal to the intersection of + * \p src_intersect_space_id and \p src_space_id projected from + * \p src_space to \p dst_space on success, negative on failure. + * + * \details H5Sselect_project_intersection() computes the intersection + * between two dataspace selections and projects that intersection + * into a third selection.This can be useful for VOL developers to + * implement chunked or virtual datasets. + * + * \since 1.10.6 + * + */ +H5_DLL hid_t H5Sselect_project_intersection(hid_t src_space_id, hid_t dst_space_id, + hid_t src_intersect_space_id); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Checks if two selections are the same shape + * + * \space_id{space1_id} + * \space_id{space2_id} + * + * \return \htri_t + * + * \details H5Sselect_shape_same() checks to see if the current selection + * in the dataspaces are the same dimensionality and shape. + * + * This is primarily used for reading the entire selection in + * one swoop. + * + * \since 1.10.6 + * + */ +H5_DLL htri_t H5Sselect_shape_same(hid_t space1_id, hid_t space2_id); +/*--------------------------------------------------------------------------*/ +/**\ingroup H5S + * + * \brief Verifies that the selection is within the extent of the dataspace + * + * \space_id{spaceid} + * + * \return \htri_t + * + * \details H5Sselect_valid() verifies that the selection for the dataspace + * \p space_id is within the extent of the dataspace if the current + * offset for the dataspace is used. + * + * \version 1.4.0 Fortran subroutine introduced in this release. + * \since 1.0.0 + * + */ +H5_DLL htri_t H5Sselect_valid(hid_t spaceid); #ifdef __cplusplus } diff --git a/src/H5Tmodule.h b/src/H5Tmodule.h index 9d585d89c6a..c489edc56c3 100644 --- a/src/H5Tmodule.h +++ b/src/H5Tmodule.h @@ -29,4 +29,76 @@ #define H5_MY_PKG_ERR H5E_DATATYPE #define H5_MY_PKG_INIT YES +/** + * \defgroup H5T H5T + * \brief Datatype Interface + * \todo Describe concisely what the functions in this module are about. + * + * \defgroup ARRAY Array Datatypes + * \ingroup H5T + * \defgroup ATOM Atomic Datatypes + * \ingroup H5T + * \defgroup COMPOUND Compound Datatypes + * \ingroup H5T + * \defgroup CONV Conversion Function + * \ingroup H5T + * \defgroup ENUM Enumeration Datatypes + * \ingroup H5T + * \defgroup OPAQUE Opaque Datatypes + * \ingroup H5T + * \defgroup VLEN Variable-length Sequence Datatypes + * \ingroup H5T + * + * \defgroup PDT Predefined Datatypes + * \ingroup H5T + * \details What is a predefined HDF5 datatype? + * \todo Fill in the blanks! + * + * \defgroup PDTCPU By CPU + * \ingroup PDT + * \details CPU-specific datatypes + * \defgroup PDTALPHA DEC Alpha + * \ingroup PDTCPU + * \defgroup PDTX86 AMD & INTEL + * \ingroup PDTCPU + * \defgroup PDTMIPS SGI MIPS + * \ingroup PDTCPU + * + * \defgroup PDTIEEE IEEE + * \ingroup PDT + * \details The IEEE floating point types in big- and little-endian byte orders. + * + * \defgroup PDTSTD Standard Datatypes + * \ingroup PDT + * \details These are "standard" types. For instance, signed (2's complement) + * and unsigned integers of various sizes in big- and little-endian + * byte orders. + * + * \defgroup PDTUNIX UNIX-specific Datatypes + * \ingroup PDT + * \details Types which are particular to Unix. + * \todo Fill in the blanks! + * + * \defgroup PDTNAT Native Datatypes + * \ingroup PDT + * \details These are the datatypes detected during library \Emph{compilation} + * by \c H5detect(). Their names differ from other HDF5 datatype names + * as follows: + * \li Instead of a class name, precision and byte order as the last + * component, they have a C-like type name. + * \li If the type begins with \c U then it is the unsigned version of + * the integer type; other integer types are signed. + * \li The datatype \c LLONG corresponds C's \Code{long long} and + * \c LDOUBLE is \Code{long double}. These types might be the same + * as \c LONG and \c DOUBLE, respectively. + * \defgroup PDTC9x C9x Integer Datatypes + * \ingroup PDTNAT + * \details C9x integer types + * \todo Fill in the blanks! + * + * \defgroup PDTS Strings + * \ingroup PDT + * + */ + #endif /* H5Tmodule_H */ diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 822c26f90df..dad322f4ca8 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -23,212 +23,300 @@ #define HOFFSET(S, M) (offsetof(S, M)) -/* These are the various classes of datatypes */ -/* If this goes over 16 types (0-15), the file format will need to change) */ +/** + * These are the various classes of datatypes + * internal If this goes over 16 types (0-15), the file format will need to + * change. + */ +//! typedef enum H5T_class_t { - H5T_NO_CLASS = -1, /*error */ - H5T_INTEGER = 0, /*integer types */ - H5T_FLOAT = 1, /*floating-point types */ - H5T_TIME = 2, /*date and time types */ - H5T_STRING = 3, /*character string types */ - H5T_BITFIELD = 4, /*bit field types */ - H5T_OPAQUE = 5, /*opaque types */ - H5T_COMPOUND = 6, /*compound types */ - H5T_REFERENCE = 7, /*reference types */ - H5T_ENUM = 8, /*enumeration types */ - H5T_VLEN = 9, /*Variable-Length types */ - H5T_ARRAY = 10, /*Array types */ - - H5T_NCLASSES /*this must be last */ + H5T_NO_CLASS = -1, /**< error */ + H5T_INTEGER = 0, /**< integer types */ + H5T_FLOAT = 1, /**< floating-point types */ + H5T_TIME = 2, /**< date and time types */ + H5T_STRING = 3, /**< character string types */ + H5T_BITFIELD = 4, /**< bit field types */ + H5T_OPAQUE = 5, /**< opaque types */ + H5T_COMPOUND = 6, /**< compound types */ + H5T_REFERENCE = 7, /**< reference types */ + H5T_ENUM = 8, /**< enumeration types */ + H5T_VLEN = 9, /**< variable-Length types */ + H5T_ARRAY = 10, /**< array types */ + + H5T_NCLASSES /**< sentinel: this must be last */ } H5T_class_t; +//! -/* Byte orders */ +/** + * Byte orders + */ +//! typedef enum H5T_order_t { - H5T_ORDER_ERROR = -1, /*error */ - H5T_ORDER_LE = 0, /*little endian */ - H5T_ORDER_BE = 1, /*bit endian */ - H5T_ORDER_VAX = 2, /*VAX mixed endian */ - H5T_ORDER_MIXED = 3, /*Compound type with mixed member orders */ - H5T_ORDER_NONE = 4 /*no particular order (strings, bits,..) */ + H5T_ORDER_ERROR = -1, /**< error */ + H5T_ORDER_LE = 0, /**< little endian */ + H5T_ORDER_BE = 1, /**< bit endian */ + H5T_ORDER_VAX = 2, /**< VAX mixed endian */ + H5T_ORDER_MIXED = 3, /**< Compound type with mixed member orders */ + H5T_ORDER_NONE = 4 /**< no particular order (strings, bits,..) */ /*H5T_ORDER_NONE must be last */ } H5T_order_t; +//! -/* Types of integer sign schemes */ +/** + * Types of integer sign schemes + */ +//! typedef enum H5T_sign_t { - H5T_SGN_ERROR = -1, /*error */ - H5T_SGN_NONE = 0, /*this is an unsigned type */ - H5T_SGN_2 = 1, /*two's complement */ + H5T_SGN_ERROR = -1, /**< error */ + H5T_SGN_NONE = 0, /**< this is an unsigned type */ + H5T_SGN_2 = 1, /**< two's complement */ - H5T_NSGN = 2 /*this must be last! */ + H5T_NSGN = 2 /** sentinel: this must be last! */ } H5T_sign_t; +//! -/* Floating-point normalization schemes */ +/** + * Floating-point normalization schemes + */ +//! typedef enum H5T_norm_t { - H5T_NORM_ERROR = -1, /*error */ - H5T_NORM_IMPLIED = 0, /*msb of mantissa isn't stored, always 1 */ - H5T_NORM_MSBSET = 1, /*msb of mantissa is always 1 */ - H5T_NORM_NONE = 2 /*not normalized */ + H5T_NORM_ERROR = -1, /**< error */ + H5T_NORM_IMPLIED = 0, /**< msb of mantissa isn't stored, always 1 */ + H5T_NORM_MSBSET = 1, /**< msb of mantissa is always 1 */ + H5T_NORM_NONE = 2 /**< not normalized */ /*H5T_NORM_NONE must be last */ } H5T_norm_t; +//! -/* - * Character set to use for text strings. Do not change these values since - * they appear in HDF5 files! +/** + * Character set to use for text strings. + * \internal Do not change these values since they appear in HDF5 files! */ typedef enum H5T_cset_t { - H5T_CSET_ERROR = -1, /*error */ - H5T_CSET_ASCII = 0, /*US ASCII */ - H5T_CSET_UTF8 = 1, /*UTF-8 Unicode encoding */ - H5T_CSET_RESERVED_2 = 2, /*reserved for later use */ - H5T_CSET_RESERVED_3 = 3, /*reserved for later use */ - H5T_CSET_RESERVED_4 = 4, /*reserved for later use */ - H5T_CSET_RESERVED_5 = 5, /*reserved for later use */ - H5T_CSET_RESERVED_6 = 6, /*reserved for later use */ - H5T_CSET_RESERVED_7 = 7, /*reserved for later use */ - H5T_CSET_RESERVED_8 = 8, /*reserved for later use */ - H5T_CSET_RESERVED_9 = 9, /*reserved for later use */ - H5T_CSET_RESERVED_10 = 10, /*reserved for later use */ - H5T_CSET_RESERVED_11 = 11, /*reserved for later use */ - H5T_CSET_RESERVED_12 = 12, /*reserved for later use */ - H5T_CSET_RESERVED_13 = 13, /*reserved for later use */ - H5T_CSET_RESERVED_14 = 14, /*reserved for later use */ - H5T_CSET_RESERVED_15 = 15 /*reserved for later use */ + H5T_CSET_ERROR = -1, /**< error */ + H5T_CSET_ASCII = 0, /**< US ASCII */ + H5T_CSET_UTF8 = 1, /**< UTF-8 Unicode encoding */ + H5T_CSET_RESERVED_2 = 2, /**< reserved for later use */ + H5T_CSET_RESERVED_3 = 3, /**< reserved for later use */ + H5T_CSET_RESERVED_4 = 4, /**< reserved for later use */ + H5T_CSET_RESERVED_5 = 5, /**< reserved for later use */ + H5T_CSET_RESERVED_6 = 6, /**< reserved for later use */ + H5T_CSET_RESERVED_7 = 7, /**< reserved for later use */ + H5T_CSET_RESERVED_8 = 8, /**< reserved for later use */ + H5T_CSET_RESERVED_9 = 9, /**< reserved for later use */ + H5T_CSET_RESERVED_10 = 10, /**< reserved for later use */ + H5T_CSET_RESERVED_11 = 11, /**< reserved for later use */ + H5T_CSET_RESERVED_12 = 12, /**< reserved for later use */ + H5T_CSET_RESERVED_13 = 13, /**< reserved for later use */ + H5T_CSET_RESERVED_14 = 14, /**< reserved for later use */ + H5T_CSET_RESERVED_15 = 15 /**< reserved for later use */ } H5T_cset_t; #define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */ -/* - * Type of padding to use in character strings. Do not change these values - * since they appear in HDF5 files! +/** + * Type of padding to use in character strings. + * \internal Do not change these values since they appear in HDF5 files! */ typedef enum H5T_str_t { - H5T_STR_ERROR = -1, /*error */ - H5T_STR_NULLTERM = 0, /*null terminate like in C */ - H5T_STR_NULLPAD = 1, /*pad with nulls */ - H5T_STR_SPACEPAD = 2, /*pad with spaces like in Fortran */ - H5T_STR_RESERVED_3 = 3, /*reserved for later use */ - H5T_STR_RESERVED_4 = 4, /*reserved for later use */ - H5T_STR_RESERVED_5 = 5, /*reserved for later use */ - H5T_STR_RESERVED_6 = 6, /*reserved for later use */ - H5T_STR_RESERVED_7 = 7, /*reserved for later use */ - H5T_STR_RESERVED_8 = 8, /*reserved for later use */ - H5T_STR_RESERVED_9 = 9, /*reserved for later use */ - H5T_STR_RESERVED_10 = 10, /*reserved for later use */ - H5T_STR_RESERVED_11 = 11, /*reserved for later use */ - H5T_STR_RESERVED_12 = 12, /*reserved for later use */ - H5T_STR_RESERVED_13 = 13, /*reserved for later use */ - H5T_STR_RESERVED_14 = 14, /*reserved for later use */ - H5T_STR_RESERVED_15 = 15 /*reserved for later use */ + H5T_STR_ERROR = -1, /**< error */ + H5T_STR_NULLTERM = 0, /**< null terminate like in C */ + H5T_STR_NULLPAD = 1, /**< pad with nulls */ + H5T_STR_SPACEPAD = 2, /**< pad with spaces like in Fortran */ + H5T_STR_RESERVED_3 = 3, /**< reserved for later use */ + H5T_STR_RESERVED_4 = 4, /**< reserved for later use */ + H5T_STR_RESERVED_5 = 5, /**< reserved for later use */ + H5T_STR_RESERVED_6 = 6, /**< reserved for later use */ + H5T_STR_RESERVED_7 = 7, /**< reserved for later use */ + H5T_STR_RESERVED_8 = 8, /**< reserved for later use */ + H5T_STR_RESERVED_9 = 9, /**< reserved for later use */ + H5T_STR_RESERVED_10 = 10, /**< reserved for later use */ + H5T_STR_RESERVED_11 = 11, /**< reserved for later use */ + H5T_STR_RESERVED_12 = 12, /**< reserved for later use */ + H5T_STR_RESERVED_13 = 13, /**< reserved for later use */ + H5T_STR_RESERVED_14 = 14, /**< reserved for later use */ + H5T_STR_RESERVED_15 = 15 /**< reserved for later use */ } H5T_str_t; #define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */ -/* Type of padding to use in other atomic types */ +/** + * Type of padding to use in other atomic types + */ +//! typedef enum H5T_pad_t { - H5T_PAD_ERROR = -1, /*error */ - H5T_PAD_ZERO = 0, /*always set to zero */ - H5T_PAD_ONE = 1, /*always set to one */ - H5T_PAD_BACKGROUND = 2, /*set to background value */ + H5T_PAD_ERROR = -1, /**< error */ + H5T_PAD_ZERO = 0, /**< always set to zero */ + H5T_PAD_ONE = 1, /**< always set to one */ + H5T_PAD_BACKGROUND = 2, /**< set to background value */ - H5T_NPAD = 3 /*THIS MUST BE LAST */ + H5T_NPAD = 3 /**< sentinal: THIS MUST BE LAST */ } H5T_pad_t; +//! -/* Commands sent to conversion functions */ +/** + * Commands sent to conversion functions + */ typedef enum H5T_cmd_t { - H5T_CONV_INIT = 0, /*query and/or initialize private data */ - H5T_CONV_CONV = 1, /*convert data from source to dest datatype */ - H5T_CONV_FREE = 2 /*function is being removed from path */ + H5T_CONV_INIT = 0, /**< query and/or initialize private data */ + H5T_CONV_CONV = 1, /**< convert data from source to dest datatype */ + H5T_CONV_FREE = 2 /**< function is being removed from path */ } H5T_cmd_t; -/* How is the `bkg' buffer used by the conversion function? */ +/** + * How is the `bkg' buffer used by the conversion function? + */ typedef enum H5T_bkg_t { - H5T_BKG_NO = 0, /*background buffer is not needed, send NULL */ - H5T_BKG_TEMP = 1, /*bkg buffer used as temp storage only */ - H5T_BKG_YES = 2 /*init bkg buf with data before conversion */ + H5T_BKG_NO = 0, /**< background buffer is not needed, send NULL */ + H5T_BKG_TEMP = 1, /**< bkg buffer used as temp storage only */ + H5T_BKG_YES = 2 /**< init bkg buf with data before conversion */ } H5T_bkg_t; -/* Type conversion client data */ +/** + * Type conversion client data + */ +//! typedef struct H5T_cdata_t { - H5T_cmd_t command; /*what should the conversion function do? */ - H5T_bkg_t need_bkg; /*is the background buffer needed? */ - hbool_t recalc; /*recalculate private data */ - void * priv; /*private data */ + H5T_cmd_t command; /**< what should the conversion function do? */ + H5T_bkg_t need_bkg; /**< is the background buffer needed? */ + hbool_t recalc; /**< recalculate private data */ + void * priv; /**< private data */ } H5T_cdata_t; +//! -/* Conversion function persistence */ +/** + * Conversion function persistence + */ typedef enum H5T_pers_t { - H5T_PERS_DONTCARE = -1, /*wild card */ - H5T_PERS_HARD = 0, /*hard conversion function */ - H5T_PERS_SOFT = 1 /*soft conversion function */ + H5T_PERS_DONTCARE = -1, /**< wild card */ + H5T_PERS_HARD = 0, /**< hard conversion function */ + H5T_PERS_SOFT = 1 /**< soft conversion function */ } H5T_pers_t; -/* The order to retrieve atomic native datatype */ +/** + * The order to retrieve atomic native datatype + */ +//! typedef enum H5T_direction_t { - H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ - H5T_DIR_ASCEND = 1, /*in inscendent order */ - H5T_DIR_DESCEND = 2 /*in descendent order */ + H5T_DIR_DEFAULT = 0, /**< default direction is inscendent */ + H5T_DIR_ASCEND = 1, /**< in inscendent order */ + H5T_DIR_DESCEND = 2 /**< in descendent order */ } H5T_direction_t; +//! -/* The exception type passed into the conversion callback function */ +/** + * The exception type passed into the conversion callback function + */ typedef enum H5T_conv_except_t { - H5T_CONV_EXCEPT_RANGE_HI = 0, /*source value is greater than destination's range */ - H5T_CONV_EXCEPT_RANGE_LOW = 1, /*source value is less than destination's range */ - H5T_CONV_EXCEPT_PRECISION = 2, /*source value loses precision in destination */ - H5T_CONV_EXCEPT_TRUNCATE = 3, /*source value is truncated in destination */ - H5T_CONV_EXCEPT_PINF = 4, /*source value is positive infinity(floating number) */ - H5T_CONV_EXCEPT_NINF = 5, /*source value is negative infinity(floating number) */ - H5T_CONV_EXCEPT_NAN = 6 /*source value is NaN(floating number) */ + H5T_CONV_EXCEPT_RANGE_HI = 0, + /**< Source value is greater than destination's range */ + H5T_CONV_EXCEPT_RANGE_LOW = 1, + /**< Source value is less than destination's range */ + H5T_CONV_EXCEPT_PRECISION = 2, + /**< Source value loses precision in destination */ + H5T_CONV_EXCEPT_TRUNCATE = 3, + /**< Source value is truncated in destination */ + H5T_CONV_EXCEPT_PINF = 4, + /**< Source value is positive infinity */ + H5T_CONV_EXCEPT_NINF = 5, + /**< Source value is negative infinity */ + H5T_CONV_EXCEPT_NAN = 6 + /**< Source value is \c NaN (not a number, including \c QNaN and \c SNaN) */ } H5T_conv_except_t; -/* The return value from conversion callback function H5T_conv_except_func_t */ +/** + * The return value from conversion callback function H5T_conv_except_func_t() + */ typedef enum H5T_conv_ret_t { - H5T_CONV_ABORT = -1, /*abort conversion */ - H5T_CONV_UNHANDLED = 0, /*callback function failed to handle the exception */ - H5T_CONV_HANDLED = 1 /*callback function handled the exception successfully */ + H5T_CONV_ABORT = -1, /**< abort conversion */ + H5T_CONV_UNHANDLED = 0, /**< callback function failed to handle the exception */ + H5T_CONV_HANDLED = 1 /**< callback function handled the exception successfully */ } H5T_conv_ret_t; -/* Variable Length Datatype struct in memory */ -/* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */ +/** + * Variable Length Datatype struct in memory (This is only used for VL + * sequences, not VL strings, which are stored in char *'s) + */ typedef struct { - size_t len; /* Length of VL data (in base type units) */ - void * p; /* Pointer to VL data */ + size_t len; /**< Length of VL data (in base type units) */ + void * p; /**< Pointer to VL data */ } hvl_t; /* Variable Length String information */ -#define H5T_VARIABLE \ - ((size_t)( \ - -1)) /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */ +/** + * Indicate that a string is variable length (null-terminated in C, instead of + * fixed length) + */ +#define H5T_VARIABLE ((size_t)(-1)) /* Opaque information */ -#define H5T_OPAQUE_TAG_MAX 256 /* Maximum length of an opaque tag */ -/* This could be raised without too much difficulty */ +/** + * Maximum length of an opaque tag + * \internal This could be raised without too much difficulty + */ +#define H5T_OPAQUE_TAG_MAX 256 #ifdef __cplusplus extern "C" { #endif -/* All datatype conversion functions are... */ +/** + * All datatype conversion functions are... + */ +//! typedef herr_t (*H5T_conv_t)(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); +//! -/* Exception handler. If an exception like overflow happenes during conversion, - * this function is called if it's registered through H5Pset_type_conv_cb. +//! +/** + * \brief Exception handler. + * + * \param[in] except_type The kind of exception that occurred + * \param[in] src_id Source datatype identifier + * \param[in] dst_id Destination datatype identifier + * \param[in] src_buf Source data buffer + * \param[in,out] dst_buf Destination data buffer + * \param[in,out] user_data Callback context + * \returns Valid callback function return values are #H5T_CONV_ABORT, + * #H5T_CONV_UNHANDLED and #H5T_CONV_HANDLED. + * + * \details If an exception like overflow happenes during conversion, this + * function is called if it's registered through H5Pset_type_conv_cb(). + * */ typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data); +//! /* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN -#ifndef _H5private_H +#ifndef H5private_H #define H5OPEN H5open(), -#else /* _H5private_H */ +#else /* H5private_H */ #define H5OPEN -#endif /* _H5private_H */ +#endif /* H5private_H */ /* * The IEEE floating point types in various byte orders. */ +/** + * \ingroup PDTIEEE + * 32-bit big-endian IEEE floating-point numbers + */ #define H5T_IEEE_F32BE (H5OPEN H5T_IEEE_F32BE_g) +/** + * \ingroup PDTIEEE + * 32-bit little-endian IEEE floating-point numbers + */ #define H5T_IEEE_F32LE (H5OPEN H5T_IEEE_F32LE_g) +/** + * \ingroup PDTIEEE + * 64-bit big-endian IEEE floating-point numbers + */ #define H5T_IEEE_F64BE (H5OPEN H5T_IEEE_F64BE_g) +/** + * \ingroup PDTIEEE + * 64-bit little-endian IEEE floating-point numbers + */ #define H5T_IEEE_F64LE (H5OPEN H5T_IEEE_F64LE_g) H5_DLLVAR hid_t H5T_IEEE_F32BE_g; H5_DLLVAR hid_t H5T_IEEE_F32LE_g; @@ -239,31 +327,135 @@ H5_DLLVAR hid_t H5T_IEEE_F64LE_g; * These are "standard" types. For instance, signed (2's complement) and * unsigned integers of various sizes and byte orders. */ -#define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g) -#define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g) -#define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g) -#define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g) -#define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g) -#define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g) -#define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g) -#define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g) -#define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g) -#define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g) -#define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g) -#define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g) -#define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g) -#define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g) -#define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g) -#define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g) -#define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g) -#define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g) -#define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g) -#define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g) -#define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g) -#define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g) -#define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g) -#define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g) -#define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g) +/** + * \ingroup PDTSTD + * 8-bit big-endian signed integers + */ +#define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g) +/** + * \ingroup PDTSTD + * 8-bit little-endian signed integers + */ +#define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g) +/** + * \ingroup PDTSTD + * 16-bit big-endian signed integers + */ +#define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g) +/** + * \ingroup PDTSTD + * 16-bit little-endian signed integers + */ +#define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g) +/** + * \ingroup PDTSTD + * 32-bit big-endian signed integers + */ +#define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g) +/** + * \ingroup PDTSTD + * 32-bit little-endian signed integers + */ +#define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g) +/** + * \ingroup PDTSTD + * 64-bit big-endian signed integers + */ +#define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g) +/** + * \ingroup PDTSTD + * 64-bit little-endian signed integers + */ +#define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g) +/** + * \ingroup PDTSTD + * 8-bit big-endian unsigned integers + */ +#define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g) +/** + * \ingroup PDTSTD + * 8-bit little-endian unsigned integers + */ +#define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g) +/** + * \ingroup PDTSTD + * 16-bit big-endian unsigned integers + */ +#define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g) +/** + * \ingroup PDTSTD + * 16-bit little-endian unsigned integers + */ +#define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g) +/** + * \ingroup PDTSTD + * 32-bit big-endian unsigned integers + */ +#define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g) +/** + * \ingroup PDTSTD + * 32-bit little-endian unsigned integers + */ +#define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g) +/** + * \ingroup PDTSTD + * 64-bit big-endian unsigned integers + */ +#define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g) +/** + * \ingroup PDTSTD + * 64-bit little-endian unsigned integers + */ +#define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g) +/** + * \ingroup PDTSTD + * 8-bit big-endian bitfield + */ +#define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g) +/** + * \ingroup PDTSTD + * 8-bit little-endian bitfield + */ +#define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g) +/** + * \ingroup PDTSTD + * 16-bit big-endian bitfield + */ +#define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g) +/** + * \ingroup PDTSTD + * 16-bit little-endian bitfield + */ +#define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g) +/** + * \ingroup PDTSTD + * 32-bit big-endian bitfield + */ +#define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g) +/** + * \ingroup PDTSTD + * 32-bit little-endian bitfield + */ +#define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g) +/** + * \ingroup PDTSTD + * 64-bit big-endian bitfield + */ +#define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g) +/** + * \ingroup PDTSTD + * 64-bit little-endian bitfield + */ +#define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g) +/** + * \ingroup PDTSTD + * Object reference + */ +#define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g) +/** + * \ingroup PDTSTD + * Dataset region reference + */ #define H5T_STD_REF_DSETREG (H5OPEN H5T_STD_REF_DSETREG_g) H5_DLLVAR hid_t H5T_STD_I8BE_g; H5_DLLVAR hid_t H5T_STD_I8LE_g; @@ -295,9 +487,21 @@ H5_DLLVAR hid_t H5T_STD_REF_DSETREG_g; /* * Types which are particular to Unix. */ +/** + * \ingroup PDTUNIX + */ #define H5T_UNIX_D32BE (H5OPEN H5T_UNIX_D32BE_g) +/** + * \ingroup PDTUNIX + */ #define H5T_UNIX_D32LE (H5OPEN H5T_UNIX_D32LE_g) +/** + * \ingroup PDTUNIX + */ #define H5T_UNIX_D64BE (H5OPEN H5T_UNIX_D64BE_g) +/** + * \ingroup PDTUNIX + */ #define H5T_UNIX_D64LE (H5OPEN H5T_UNIX_D64LE_g) H5_DLLVAR hid_t H5T_UNIX_D32BE_g; H5_DLLVAR hid_t H5T_UNIX_D32LE_g; @@ -308,12 +512,20 @@ H5_DLLVAR hid_t H5T_UNIX_D64LE_g; * Types particular to the C language. String types use `bytes' instead * of `bits' as their size. */ +/** + * \ingroup PDTS + * String datatype in C (size defined in bytes rather than in bits) + */ #define H5T_C_S1 (H5OPEN H5T_C_S1_g) H5_DLLVAR hid_t H5T_C_S1_g; /* * Types particular to Fortran. */ +/** + * \ingroup PDTS + * String datatype in Fortran (as defined for the HDF5 C library) + */ #define H5T_FORTRAN_S1 (H5OPEN H5T_FORTRAN_S1_g) H5_DLLVAR hid_t H5T_FORTRAN_S1_g; @@ -321,63 +533,239 @@ H5_DLLVAR hid_t H5T_FORTRAN_S1_g; * These types are for Intel CPU's. They are little endian with IEEE * floating point. */ -#define H5T_INTEL_I8 H5T_STD_I8LE +/** + * \ingroup PDTX86 + * 8-bit little-endian signed (2's complement) integers for Intel CPUs + */ +#define H5T_INTEL_I8 H5T_STD_I8LE +/** + * \ingroup PDTX86 + * 16-bit little-endian signed (2's complement) integers for Intel CPUs + */ #define H5T_INTEL_I16 H5T_STD_I16LE +/** + * \ingroup PDTX86 + * 32-bit little-endian signed (2's complement) integers for Intel CPUs + */ #define H5T_INTEL_I32 H5T_STD_I32LE +/** + * \ingroup PDTX86 + * 64-bit little-endian signed (2's complement) integers for Intel CPUs + */ #define H5T_INTEL_I64 H5T_STD_I64LE -#define H5T_INTEL_U8 H5T_STD_U8LE +/** + * \ingroup PDTX86 + * 8-bit little-endian unsigned integers for Intel CPUs + */ +#define H5T_INTEL_U8 H5T_STD_U8LE +/** + * \ingroup PDTX86 + * 16-bit little-endian unsigned integers for Intel CPUs + */ #define H5T_INTEL_U16 H5T_STD_U16LE +/** + * \ingroup PDTX86 + * 32-bit little-endian unsigned integers for Intel CPUs + */ #define H5T_INTEL_U32 H5T_STD_U32LE +/** + * \ingroup PDTX86 + * 64-bit little-endian unsigned integers for Intel CPUs + */ #define H5T_INTEL_U64 H5T_STD_U64LE -#define H5T_INTEL_B8 H5T_STD_B8LE +/** + * \ingroup PDTX86 + * 8-bit little-endian bitfield for Intel CPUs + */ +#define H5T_INTEL_B8 H5T_STD_B8LE +/** + * \ingroup PDTX86 + * 16-bit little-endian bitfield for Intel CPUs + */ #define H5T_INTEL_B16 H5T_STD_B16LE +/** + * \ingroup PDTX86 + * 32-bit little-endian bitfield for Intel CPUs + */ #define H5T_INTEL_B32 H5T_STD_B32LE +/** + * \ingroup PDTX86 + * 64-bit little-endian bitfield for Intel CPUs + */ #define H5T_INTEL_B64 H5T_STD_B64LE +/** + * \ingroup PDTX86 + * 32-bit little-endian IEEE floating-point numbers for Intel CPUs + */ #define H5T_INTEL_F32 H5T_IEEE_F32LE +/** + * \ingroup PDTX86 + * 64-bit little-endian IEEE floating-point numbers for Intel CPUs + */ #define H5T_INTEL_F64 H5T_IEEE_F64LE /* * These types are for DEC Alpha CPU's. They are little endian with IEEE * floating point. */ -#define H5T_ALPHA_I8 H5T_STD_I8LE +/** + * \ingroup PDTALPHA + * 8-bit little-endian signed (2's complement) integers for DEC Alpha CPUs + */ +#define H5T_ALPHA_I8 H5T_STD_I8LE +/** + * \ingroup PDTALPHA + * 16-bit little-endian signed (2's complement) integers for DEC Alpha CPUs + */ #define H5T_ALPHA_I16 H5T_STD_I16LE +/** + * \ingroup PDTALPHA + * 32-bit little-endian signed (2's complement) integers for DEC Alpha CPUs + */ #define H5T_ALPHA_I32 H5T_STD_I32LE +/** + * \ingroup PDTALPHA + * 64-bit little-endian signed (2's complement) integers for DEC Alpha CPUs + */ #define H5T_ALPHA_I64 H5T_STD_I64LE -#define H5T_ALPHA_U8 H5T_STD_U8LE +/** + * \ingroup PDTALPHA + * 8-bit little-endian unsigned integers for DEC Alpha CPUs + */ +#define H5T_ALPHA_U8 H5T_STD_U8LE +/** + * \ingroup PDTALPHA + * 16-bit little-endian unsigned integers for DEC Alpha CPUs + */ #define H5T_ALPHA_U16 H5T_STD_U16LE +/** + * \ingroup PDTALPHA + * 32-bit little-endian unsigned integers for DEC Alpha CPUs + */ #define H5T_ALPHA_U32 H5T_STD_U32LE +/** + * \ingroup PDTALPHA + * 64-bit little-endian unsigned integers for DEC Alpha CPUs + */ #define H5T_ALPHA_U64 H5T_STD_U64LE -#define H5T_ALPHA_B8 H5T_STD_B8LE +/** + * \ingroup PDTALPHA + * 8-bit little-endian bitfield for DEC Alpha CPUs + */ +#define H5T_ALPHA_B8 H5T_STD_B8LE +/** + * \ingroup PDTALPHA + * 16-bit little-endian bitfield for DEC Alpha CPUs + */ #define H5T_ALPHA_B16 H5T_STD_B16LE +/** + * \ingroup PDTALPHA + * 32-bit little-endian bitfield for DEC Alpha CPUs + */ #define H5T_ALPHA_B32 H5T_STD_B32LE +/** + * \ingroup PDTALPHA + * 64-bit little-endian bitfield for DEC Alpha CPUs + */ #define H5T_ALPHA_B64 H5T_STD_B64LE +/** + * \ingroup PDTALPHA + * 32-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs + */ #define H5T_ALPHA_F32 H5T_IEEE_F32LE +/** + * \ingroup PDTALPHA + * 64-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs + */ #define H5T_ALPHA_F64 H5T_IEEE_F64LE /* * These types are for MIPS cpu's commonly used in SGI systems. They are big * endian with IEEE floating point. */ -#define H5T_MIPS_I8 H5T_STD_I8BE +/** + * \ingroup PDTMIPS + * 8-bit big-endian signed (2's complement) integers for SGI MIPS CPUs + */ +#define H5T_MIPS_I8 H5T_STD_I8BE +/** + * \ingroup PDTMIPS + * 16-bit big-endian signed (2's complement) integers for SGI MIPS CPUs + */ #define H5T_MIPS_I16 H5T_STD_I16BE +/** + * \ingroup PDTMIPS + * 32-bit big-endian signed (2's complement) integers for SGI MIPS CPUs + */ #define H5T_MIPS_I32 H5T_STD_I32BE +/** + * \ingroup PDTMIPS + * 64-bit big-endian signed (2's complement) integers for SGI MIPS CPUs + */ #define H5T_MIPS_I64 H5T_STD_I64BE -#define H5T_MIPS_U8 H5T_STD_U8BE +/** + * \ingroup PDTMIPS + * 8-bit big-endian unsigned integers for SGI MIPS CPUs + */ +#define H5T_MIPS_U8 H5T_STD_U8BE +/** + * \ingroup PDTMIPS + * 16-bit big-endian unsigned integers for SGI MIPS CPUs + */ #define H5T_MIPS_U16 H5T_STD_U16BE +/** + * \ingroup PDTMIPS + * 32-bit big-endian unsigned integers for SGI MIPS CPUs + */ #define H5T_MIPS_U32 H5T_STD_U32BE +/** + * \ingroup PDTMIPS + * 64-bit big-endian unsigned integers for SGI MIPS CPUs + */ #define H5T_MIPS_U64 H5T_STD_U64BE -#define H5T_MIPS_B8 H5T_STD_B8BE +/** + * \ingroup PDTMIPS + * 8-bit big-endian bitfield for SGI MIPS CPUs + */ +#define H5T_MIPS_B8 H5T_STD_B8BE +/** + * \ingroup PDTMIPS + * 16-bit big-endian bitfield for SGI MIPS CPUs + */ #define H5T_MIPS_B16 H5T_STD_B16BE +/** + * \ingroup PDTMIPS + * 32-bit big-endian bitfield for SGI MIPS CPUs + */ #define H5T_MIPS_B32 H5T_STD_B32BE +/** + * \ingroup PDTMIPS + * 64-bit big-endian bitfield for SGI MIPS CPUs + */ #define H5T_MIPS_B64 H5T_STD_B64BE +/** + * \ingroup PDTMIPS + * 32-bit big-endian IEEE floating-point numbers for MIPS CPUs + */ #define H5T_MIPS_F32 H5T_IEEE_F32BE +/** + * \ingroup PDTMIPS + * 64-bit big-endian IEEE floating-point numbers for MIPS CPUs + */ #define H5T_MIPS_F64 H5T_IEEE_F64BE /* * The VAX floating point types (i.e. in VAX byte order) */ +/** + * \ingroup PDTALPHA + * 32-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs + */ #define H5T_VAX_F32 (H5OPEN H5T_VAX_F32_g) +/** + * \ingroup PDTALPHA + * 64-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs + */ #define H5T_VAX_F64 (H5OPEN H5T_VAX_F64_g) H5_DLLVAR hid_t H5T_VAX_F32_g; H5_DLLVAR hid_t H5T_VAX_F64_g; @@ -391,32 +779,128 @@ H5_DLLVAR hid_t H5T_VAX_F64_g; * to C's `long long' and LDOUBLE is `long double' (these types might be the * same as `LONG' and `DOUBLE' respectively). */ -#define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR) -#define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g) -#define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g) -#define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g) +/** + * \ingroup PDTNAT + * C-style \c char + */ +#define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR) +/** + * \ingroup PDTNAT + * C-style \Code{signed char} + */ +#define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g) +/** + * \ingroup PDTNAT + * C-style \Code{unsigned char} + */ +#define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g) +/** + * \ingroup PDTNAT + * C-style \Code{short} + */ +#define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g) +/** + * \ingroup PDTNAT + * C-style \Code{unsigned short} + */ #define H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g) -#define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g) -#define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g) -#define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g) -#define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g) -#define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g) +/** + * \ingroup PDTNAT + * C-style \Code{int} + */ +#define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g) +/** + * \ingroup PDTNAT + * C-style \Code{unsigned int} + */ +#define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g) +/** + * \ingroup PDTNAT + * C-style \Code{long} + */ +#define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g) +/** + * \ingroup PDTNAT + * C-style \Code{unsigned long} + */ +#define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g) +/** + * \ingroup PDTNAT + * C-style \Code{long long} + */ +#define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g) +/** + * \ingroup PDTNAT + * C-style \Code{unsigned long long} + */ #define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g) -#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g) +/** + * \ingroup PDTNAT + * C-style \Code{float} + */ +#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g) +/** + * \ingroup PDTNAT + * C-style \Code{double} + */ #define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g) #if H5_SIZEOF_LONG_DOUBLE != 0 +/** + * \ingroup PDTNAT + * C-style \Code{long double} + */ #define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g) #endif -#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g) -#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g) -#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g) -#define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g) +/** + * \ingroup PDTNAT + * HDF5 8-bit bitfield based on native types + */ +#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g) +/** + * \ingroup PDTNAT + * HDF5 16-bit bitfield based on native types + */ +#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g) +/** + * \ingroup PDTNAT + * HDF5 32-bit bitfield based on native types + */ +#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g) +/** + * \ingroup PDTNAT + * HDF5 64-bit bitfield based on native types + */ +#define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g) +/** + * \ingroup PDTNAT + * HDF5 opaque unit based on native types + */ #define H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g) -#define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g) -#define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g) +/** + * \ingroup PDTNAT + * HDF5 address type based on native types + */ +#define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g) +/** + * \ingroup PDTNAT + * HDF5 size type based on native types + */ +#define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g) +/** + * \ingroup PDTNAT + * HDF5 signed size type based on native types + */ #define H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g) -#define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g) -#define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g) +/** + * \ingroup PDTNAT + * HDF5 error code type based on native types + */ +#define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g) +/** + * \ingroup PDTNAT + * HDF5 Boolean type based on native types + */ +#define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g) H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g; H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g; H5_DLLVAR hid_t H5T_NATIVE_SHORT_g; @@ -444,12 +928,30 @@ H5_DLLVAR hid_t H5T_NATIVE_HERR_g; H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g; /* C9x integer types */ -#define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g) -#define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g) -#define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g) +/** + * \ingroup PDTC9x + */ #define H5T_NATIVE_UINT_LEAST8 (H5OPEN H5T_NATIVE_UINT_LEAST8_g) -#define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g) -#define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g) H5_DLLVAR hid_t H5T_NATIVE_INT8_g; H5_DLLVAR hid_t H5T_NATIVE_UINT8_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g; @@ -457,12 +959,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g; -#define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g) -#define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g) -#define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g) +/** + * \ingroup PDTC9x + */ #define H5T_NATIVE_UINT_LEAST16 (H5OPEN H5T_NATIVE_UINT_LEAST16_g) -#define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g) -#define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g) H5_DLLVAR hid_t H5T_NATIVE_INT16_g; H5_DLLVAR hid_t H5T_NATIVE_UINT16_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g; @@ -470,12 +990,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g; -#define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g) -#define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g) -#define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g) +/** + * \ingroup PDTC9x + */ #define H5T_NATIVE_UINT_LEAST32 (H5OPEN H5T_NATIVE_UINT_LEAST32_g) -#define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g) -#define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g) H5_DLLVAR hid_t H5T_NATIVE_INT32_g; H5_DLLVAR hid_t H5T_NATIVE_UINT32_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g; @@ -483,12 +1021,30 @@ H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g; -#define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g) -#define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g) -#define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g) +/** + * \ingroup PDTC9x + */ #define H5T_NATIVE_UINT_LEAST64 (H5OPEN H5T_NATIVE_UINT_LEAST64_g) -#define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g) -#define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g) +/** + * \ingroup PDTC9x + */ +#define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g) H5_DLLVAR hid_t H5T_NATIVE_INT64_g; H5_DLLVAR hid_t H5T_NATIVE_UINT64_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g; @@ -497,97 +1053,1827 @@ H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g; /* Operations defined on all datatypes */ -H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size); -H5_DLL hid_t H5Tcopy(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Creates a new datatype. + * + * \param[in] type Class of datatype to create + * \param[in] size Size, in bytes, of the datatype being created + * + * \return \hid_t{datatype} + * + * \details H5Tcreate() creates a new datatype of the specified class with the + * specified number of bytes. This function is used only with the + * following datatype classes: + * - #H5T_COMPOUND + * - #H5T_OPAQUE + * - #H5T_ENUM + * - #H5T_STRING + * + * Other datatypes, including integer and floating-point datatypes, + * are typically created by using H5Tcopy() to copy and modify a + * predefined datatype. + * + * When creating a variable-length string datatype, \p size must + * be #H5T_VARIABLE; see \ref_vlen_strings. + * + * When creating a fixed-length string datatype, \p size will + * be the length of the string in bytes. The length of the + * string in characters will depend on i the encoding used; see + * H5Pset_char_encoding(). + * + * ENUMs created with this function have a signed native integer + * base datatype. Use H5Tenum_create() if a different integer base + * datatype is required. + * + * The datatype identifier returned from this function should be + * released with H5Tclose or resource leaks will result. + * + * \see H5Tclose() + * + * \since 1.2.0 + * + */ +H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size); +/** + * \ingroup H5T + * + * \brief Copies an existing datatype. + * + * \type_id + * + * \return \hid_t{datatype} + * + * \details H5Tcopy() makes a copy of an existing datatype. The returned type + * is always transient and unlocked. + * + * The \p type_id argument can be either a datatype identifier, + * a predefined datatype (defined in H5Tpublic.h), or a dataset + * identifier. If \p type_id is a dataset identifier, this function + * returns a transient, modifiable datatype which is a copy of the + * dataset's datatype. + * + * The returned datatype identifier should be released with H5Tclose() + * to prevent resource leak. + * + */ +H5_DLL hid_t H5Tcopy(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Releases a datatype + * + * \type_id + * + * \return \herr_t + * + * \details H5Tclose() releases the datatype \p dtype_id. Further access + * through this datatype identifier is illegal. Failure to release + * a datatype with this call will result in resource leaks. + * + */ H5_DLL herr_t H5Tclose(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Determines whether two datatype identifiers refer to the same datatype + * + * \type_id{type1_id} + * \type_id{type2_id} + * + * \return \htri_t + * + * \details H5Tequal() determines whether two datatype identifiers refer to + * the same datatype. + * + * \since 1.6 or earlier + * + */ H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id); +/** + * \ingroup H5T + * + * \brief Locks a datatype + * + * \type_id + * + * \return \herr_t + * + * \details H5Tlock() locks the datatype specified by the dtype_id identifier, + * making it read-only and non-destructible. This is normally done by + * the library for predefined datatypes so the application does not + * inadvertently change or delete a predefined type. Once a datatype + * is locked it can never be unlocked. + * + */ H5_DLL herr_t H5Tlock(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Commits a transient datatype, linking it into the file and creating + * a new committed datatype + * + * \fg_loc_id + * \param[in] name Name given to committed datatype + * \type_id Identifier of datatype to be committed and, upon function’s + * return, identifier for the committed datatype + * \lcpl_id + * \tcpl_id + * \tapl_id + * + * \return \herr_t + * + * \details H5Tcommit2() saves a transient datatype as an immutable committed + * datatype in a file. The datatype specified by \p dtype_id is + * committed to the file with the name name at the location specified + * by \p loc_id and with the datatype creation and access property + * lists \p tcpl_id and \p tapl_id, respectively. + * + * \p loc_id may be a file identifier, or a group identifier within + * that file. \p name may be either an absolute path in the file or + * a relative path from \p loc_id naming the newly-commited datatype. + * + * The link creation property list, \p lcpl_id, governs creation of + * the link(s) by which the new committed datatype is accessed and + * the creation of any intermediate groups that may be missing. + * + * Once commited, this datatype may be used to define the datatype + * of any other dataset or attribute in the file. + * + * This function will not accept a datatype that cannot actually hold + * information. This currently includes compound datatypes with no + * fields and enumerated datatypes with no members. + * + * Committed datatypes are sometimes referred to as named datatypes. + * + * \version 1.8.7 Function modified in this release to reject datatypes that + * will not accomodate actual data, such as a compound datatype + * with no fields or an enumerated datatype with no members. + * + * \since 1.8.0 + * + */ H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id); -H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); +/** + * -------------------------------------------------------------------------- + * \ingroup H5T + * + * \brief Opens a committed (named) datatype + * + * \fgdta_loc_id + * \param[in] name Name of the datatype to open + * \tapl_id + * + * \return \hid_t{datatype} + * + * \details H5Topen2() opens a committed datatype at the location specified + * by \p loc_id and returns an identifier for the datatype. \p + * loc_id is either a file or group identifier. The identifier should + * eventually be closed by calling H5Tclose() to release resources. + * + * The committed datatype is opened with the datatype access property + * list tapl_id. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); +/** + * \ingroup H5T + * + * \brief Commits a transient datatype to a file, creating a new named + * datatype, but does not link it into the file structure + * + * \fg_loc_id + * \type_id + * \tcpl_id + * \tapl_id + * + * \return \herr_t + * + * \details H5Tcommit_anon() commits a transient datatype (not immutable) + * to a file, turning it into a named datatype with the specified + * creation and property lists. With default property lists, + * #H5P_DEFAULT, H5Tcommit_anon() provides similar functionality to + * that of H5Tcommit(), with the differences described below. + * + * #H5P_DEFAULT can be passed in for the datatype creation property + * list identifier, \p tcpl_id. The datatype access property list + * identifier, \p tapl_id, is provided for future functionality and + * is not used at this time. This parameter should always be passed + * as the value #H5P_DEFAULT. + * + * Note that H5Tcommit_anon() does not link this newly-committed + * datatype into the file. After the H5Tcommit_anon() call, the + * datatype identifier \p type_id must be linked into the HDF5 file + * structure with H5Olink() or it will be deleted from the file when + * the file is closed. + * + * The differences between this function and H5Tcommit() are as follows: + * \li H5Tcommit_anon() explicitly includes property lists, + * which provides for greater control of the creation process + * and of the properties of the new named datatype. H5Tcommit() + * always uses default properties. + * \li H5Tcommit_anon() neither provides the new named datatype’s + * name nor links it into the HDF5 file structure; those actions + * must be performed separately through a call to H5Olink(), + * which offers greater control over linking. + * + * This function will not accept a datatype that cannot actually + * hold data. This currently includes compound datatypes with no + * fields and enumerated datatypes with no members. + * + * \version 1.8.7 Function modified in this release to reject datatypes that + * will not accomodate actual data, such as a compound datatype + * with no fields or an enumerated datatype with no members. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id); -H5_DLL hid_t H5Tget_create_plist(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Returns a copy of a datatype's creation property list + * + * \type_id + * + * \return \hid_t{datatype creation property list} + * + * \details H5Tget_create_plist() returns a property list identifier + * for the datatype creation property list associated with the datatype + * specified by \p type_id. + * + * The creation property list identifier should be released with + * H5Pclose() to prevent memory leaks. + * + * \since 1.8.0 + * + */ +H5_DLL hid_t H5Tget_create_plist(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Determines whether a datatype is a committed type or a transient type + * + * \type_id + * + * \return \htri_t + * + * \details H5Tcommitted() queries a type to determine whether the type + * specified by the \p dtype_id identifier is a committed (formerly + * known as a \Emph{named}) type or a transient type. If this function returns + * a positive value, then the type is committed (that is, it has been + * committed, perhaps by some other application). Datasets which + * return committed datatypes with H5Dget_type() are able to share + * the datatype with other datasets in the same file. + * + * \version 1.8.0 Fortran API was added + * + * \since 1.6 or earlier + * + */ H5_DLL htri_t H5Tcommitted(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Encodes a datatype object description into a binary buffer + * + * \param[in] obj_id Identifier of the object to be encoded + * \param[in,out] buf Buffer for the object to be encoded into. + * \param[in,out] nalloc IN: The size of the allocated buffer + * OUT: The size of the buffer needed + * + * \return \herr_t + * + * \details H5Tencode() Given datatype identifier, H5Tencode() converts a + * datatype description into binary form in a buffer. Using this + * binary form in the buffer, a datatype object can be reconstructed + * using H5Tdecode() to return a new object handle (\ref hid_t) for + * this datatype. + * + * If the provided buffer is NULL, only the size of buffer needed is + * returned through \p nalloc. + * + * A preliminary H5Tencode() call can be made to find out the size + * of the buffer needed. This value is returned as \p nalloc. That + * value can then be assigned to \p nalloc for a second H5Tencode() + * call, which will retrieve the actual encoded object. + * + * If the library finds that \p nalloc is not big enough for the + * object, it simply returns the size of the buffer needed through + * \p nalloc without encoding the provided buffer. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc); -H5_DLL hid_t H5Tdecode(const void *buf); -H5_DLL herr_t H5Tflush(hid_t type_id); -H5_DLL herr_t H5Trefresh(hid_t type_id); - -/* Operations defined on compound datatypes */ -H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id); -H5_DLL herr_t H5Tpack(hid_t type_id); - +/** + * \ingroup H5T + * + * \brief Decodes a binary object description of datatype and return a new + * object handle + * + * \param[in] buf Buffer for the datatype object to be decoded + * + * \return \hid_t{datatype} + * + * \details H5Tdecode() Given an object description of datatype in binary in a + * buffer, H5Tdecode() reconstructs the HDF5 datatype object and + * returns a new object handle for it. The binary description of + * the object is encoded by H5Tencode(). User is responsible for + * passing in the right buffer. + * + * The datatype identifier returned by this function can be released + * with H5Tclose() when the identifier is no longer needed so that + * resource leaks will not develop. + * + */ +H5_DLL hid_t H5Tdecode(const void *buf); +/** + * \ingroup H5T + * + * \brief Flushes all buffers associated with a committed datatype to disk + * + * \type_id + * + * \return \herr_t + * + * \details H5Tflush() causes all buffers associated with a committed datatype + * \p type_id to be immediately flushed to disk without removing the + * data from the cache. + * + * HDF5 does not possess full control over buffering. H5Tflush() + * flushes the internal HDF5 buffers and then asks the operating + * system (the OS) to flush the system buffers for the open + * files. After that, the OS is responsible for ensuring that the + * data is actually flushed to disk. + * + * \return \herr_t + * + * \since 1.10.0 C function introduced with this release. + * + * \see H5Dflush() + * H5Drefresh() + * H5Tflush() + * H5Grefresh() + * H5Oflush() + * H5Orefresh() + * H5Tflush() + * H5Trefresh() + * H5Fstart_swmr_write() + * H5Pget_append_flush() + * H5Pget_object_flush_cb() + * H5Pset_append_flush() + * H5Pset_object_flush_cb() + * + */ +H5_DLL herr_t H5Tflush(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Refreshes all buffers associated with a committed datatype + * + * \type_id + * + * \return \herr_t + * + * \details H5Trefresh() causes all buffers associated with a committed + * datatype to be cleared and immediately re-loaded with updated + * contents from disk. + * + * This function essentially closes the datatype, evicts all + * metadata associated with it from the cache, and then re-opens the + * datatype. The reopened datatype is automatically re-registered + * with the same identifier. + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Trefresh(hid_t type_id); + +/* Operations defined on compound datatypes */ +/** + * \ingroup COMPOUND + * + * \brief Adds a new member to a compound datatype. + * + * \type_id{parent_id} + * \param[in] name Name of the field to insert + * \param[in] offset Offset in memory structure of the field to insert + * \param[in] member_id Datatype identifier of the field to insert + * + * \return \herr_t + * + * \details H5Tinsert() adds another member to the compound datatype, specified + * \p type_id. + * + * The new member has a \p name which must be unique within the + * compound datatype. The \p offset argument defines the start of the + * member in an instance of the compound datatype, and \p member_id + * is the datatype identifier of the new member. + * + * \note Members of a compound datatype do not have to be atomic + * datatypes; a compound datatype can have a member which is a + * compound datatype. + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id); +/** + * \ingroup COMPOUND + * + * \brief Recursively removes padding from within a compound datatype + * + * \type_id + * + * \return \herr_t + * + * \details H5Tpack() recursively removes padding from within a compound + * datatype to make it more efficient (space-wise) to store that data. + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Tpack(hid_t type_id); + /* Operations defined on enumeration datatypes */ -H5_DLL hid_t H5Tenum_create(hid_t base_id); +/** + * \ingroup ENUM + * + * \brief Creates a new enumeration datatype + * + * \param[in] base_id Datatype identifier for the base datatype. Must be an + * integer datatype + * + * \return \hid_t{enumeration datatype} + * + * \details H5Tenum_create() creates a new enumeration datatype based on the + * specified base datatype, dtype_id, which must be an integer datatype. + * + * If a particular architecture datatype is required, a little endian + * or big endian datatype for example, use a native datatype as the + * base datatype and use H5Tconvert() on values as they are read + * from or written to a dataset. + * + * \since 1.2.0 + * + */ +H5_DLL hid_t H5Tenum_create(hid_t base_id); +/** + * \ingroup ENUM + * + * \brief Inserts a new enumeration datatype member + * + * \type_id{type} + * \param[in] name Name of the new member + * \param[in] value Pointer to the value of the new member + * + * \return \herr_t + * + * \details H5Tenum_insert() inserts a new enumeration datatype member into an + * enumeration datatype. + * + * \p type_id is the datatype identifier for the enumeration datatype, + * \p name is the name of the new member, and \p value points to the + * value of the new member. + * + * \p name and \p value must both be unique within \p dtype_id. + * + * \p value points to data which must be of the integer base datatype + * used when the enumeration datatype was created. If a particular + * architecture datatype is required, a little endian or big endian + * datatype for example, use a native datatype as the base datatype + * and use H5Tconvert() on values as they are read from or written + * to a dataset. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value); +/** + * \ingroup ENUM + * + * \brief Returns the symbol name corresponding to a specified member of an + * enumeration datatype + * + * \type_id{type} + * \param[in] value Value of the enumeration datatype + * \param[out] name Buffer for output of the symbol name + * \param[in] size Anticipated size of the symbol name, in bytes + * + * \return Returns a non-negative value if successful. Otherwise returns a + * negative value + * + * \details H5Tenum_nameof() finds the symbol name that corresponds to the + * specified \p value of the enumeration datatype \p type. + * + * At most \p size characters of the symbol \p name are copied into + * the \p name buffer. If the entire symbol name and null terminator + * do not fit in the name buffer, then as many characters as possible + * are copied (not null terminated) and the function fails. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name /*out*/, size_t size); +/** + * \ingroup ENUM + * + * \brief Returns the value corresponding to a specified member of an + * enumeration datatype + * + * \type_id{type} + * \param[in] name Symbol name of the enumeration datatype + * \param[out] value Buffer for the value of the enumeration datatype + * + * \return \herr_t + * + * \details H5Tenum_valueof() finds the value that corresponds to the + * specified name of the enumeration datatype \p dtype_id. + * + * Values returned in \p value will be of the enumerated type’s + * base type, that is, the datatype used by H5Tenum_create() when + * the enumerated type was created. + * + * The \p value buffer must be at least large enough to hold a value + * of that base type. If the size is unknown, you can determine it + * with H5Tget_size(). + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value /*out*/); /* Operations defined on variable-length datatypes */ +/** + * \ingroup VLEN + * + * \brief Creates a new variable-length array datatype + * + * \type_id{base_id}, the element type of the datatype to create + * + * \return \hid_t{variable-length datatype} + * + * \details H5Tvlen_create() creates a new one-dimensional array datatype of + * variable-length (VL) with the base datatype \p base_id. + * + * This one-dimensional array often represents a data sequence of the + * base datatype, such as characters for character sequences or vertex + * coordinates for polygon lists. The base type specified for the VL + * datatype can be any HDF5 datatype, including another VL datatype, a + * compound datatype, or an atomic datatype. + * + * When necessary, use H5Tget_super() to determine the base type of + * the VL datatype. + * + * The datatype identifier returned from this function should be + * released with H5Tclose() or resource leaks will result. Under + * certain circumstances, H5Dvlen_reclaim() must also be used. + * + * \attention H5Tvlen_create() cannot be used to create a variable-length + * string datatype. H5Tvlen_create() called with a string or + * character base type creates a variable-length sequence of strings + * (a variable-length, 1-dimensional array), with each element of + * the array being of the string or character base type.\n + * To create a variable-length string datatype, see \ref_vlen_strings. + * + */ H5_DLL hid_t H5Tvlen_create(hid_t base_id); /* Operations defined on array datatypes */ +/** + * \ingroup ARRAY + * + * \brief Creates an array datatype object + * + * \param[in] base_id Datatype identifier for the array base datatype + * \param[in] ndims Rank of the array + * \param[in] dim Size of each array dimension + * + * \return \hid_t{array datatype} + * + * \details H5Tarray_create2() creates a new array datatype object.\n\n + * \p base_id is the datatype of every element of the array, i.e., + * of the number at each position in the array. + * + * \p ndims is the number of dimensions and the size of each dimension + * is specified in the array \p dim. The value of \p rank is + * currently limited to #H5S_MAX_RANK and must be greater than 0 + * (zero). All dimension sizes specified in \p dim must be greater + * than 0 (zero). + * + * \since 1.8.0 + * + */ H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]); -H5_DLL int H5Tget_array_ndims(hid_t type_id); -H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]); +/** + * \ingroup ARRAY + * + * \brief Returns the rank of an array datatype + * + * \type_id + * + * \return Returns the rank of the array if successful; otherwise returns a + * negative value. + * + * \details H5Tget_array_ndims() returns the rank, i.e., the number of + * dimensions, of an array datatype object. + * + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_array_ndims(hid_t type_id); +/** + * \ingroup ARRAY + * + * \brief Retrieves sizes of array dimensions + * + * \type_id + * \param[out] dims Sizes of array dimensions + * + * \return Returns the non-negative number of dimensions of the array type + * if successful; otherwise returns a negative value. + * + * \details H5Tget_array_dims2() returns the sizes of the dimensions of the + * specified array datatype object in the array \p dims. + * + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]); /* Operations defined on opaque datatypes */ +/** + * \ingroup OPAQUE + * + * \brief Tags an opaque datatype + * + * \type_id{type} of an opaque datatype + * \param[in] tag Descriptive ASCII string with which the opaque datatype is + * to be tagged + * + * \return \herr_t + * + * \details H5Tset_tag() tags an opaque datatype \p type with a descriptive + * ASCII identifier, \p tag. + * + * \p tag is intended to provide a concise description; the maximum + * size is hard-coded in the HDF5 library as 256 bytes + * (#H5T_OPAQUE_TAG_MAX). + * + * \version 1.6.5 The #H5T_OPAQUE_TAG_MAX macro constant, specifying the + * maximum size of an opaque datatype tag, was added in + * H5Tpublic.h. + * + */ H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag); -H5_DLL char * H5Tget_tag(hid_t type); +/** + * \ingroup OPAQUE + * + * \brief Gets the tag associated with an opaque datatype + * + * \type_id{type} of an opaque datatype + * + * \return Returns a pointer to an allocated string if successful; otherwise + * returns NULL. + * + * \details H5Tget_tag() returns the tag associated with the opaque datatype + * \p type. + * + * \attention The tag is returned via a pointer to an allocated string, which + * the caller must free. + * + */ +H5_DLL char *H5Tget_tag(hid_t type); /* Querying property values */ -H5_DLL hid_t H5Tget_super(hid_t type); +/** + * \ingroup H5T + * + * \brief Returns the base datatype from which a datatype is derived + * + * \type_id{type} + * + * \return \hid_t{datatype} + * + * \details H5Tget_super() returns the base datatype from which the datatype + * \p type_id is derived. In the case of an enumeration type, the + * return value is an integer type. + * + * The datatype identifier returned by this function must be released + * with H5Tclose() when the identifier is no longer needed so that + * resource leaks will not develop. + * + */ +H5_DLL hid_t H5Tget_super(hid_t type); +/** + * \ingroup H5T + * + * \brief Returns a datatype class + * + * \type_id + * + * \return Returns the datatype class if successful; otherwise #H5T_NO_CLASS. + * + * \details H5Tget_class() returns the class of the datatype \p type_id. + * Valid class identifiers, as defined in H5Tpublic.h, are: + * \snippet this H5T_class_t_snip + * + * \note The library returns #H5T_STRING for both fixed-length and + * variable-length strings. + * + * \note Unsupported datatype: The time datatype class, #H5T_TIME, + * is not supported. If #H5T_TIME is used, the resulting data will + * be readable and modifiable only on the originating computing + * platform; it will not be portable to other platforms. + * + */ H5_DLL H5T_class_t H5Tget_class(hid_t type_id); -H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls); -H5_DLL size_t H5Tget_size(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Determines whether a datatype contains any datatypes of the given + * datatype class + * + * \type_id + * \param[in] cls Datatype class + * + * \return \htri_t + * + * \details H5Tdetect_class() determines whether the datatype specified in + * \p type_id contains any datatypes of the datatype class specified + * in \p dtype_class. + * + * This function is useful primarily in recursively examining all the + * fields and/or base types of compound, array, and variable-length + * datatypes. + * + * Valid class identifiers, as defined in H5Tpublic.h, are: + * \snippet this H5T_class_t_snip + * + * \since 1.6.0 + * + */ +H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls); +/** + * \ingroup H5T + * + * \brief Returns the size of a datatype + * + * \type_id + * + * \return Returns the size of the datatype in bytes if successful; otherwise, + * returns 0. + * + * \details H5Tget_size() returns the size of a datatype in bytes. + * \li For atomic datatypes, array datatypes, compound datatypes, and + * other datatypes of a constant size, the returned value is the + * size of the actual datatype in bytes. + * \li For variable-length string datatypes the returned value is + * the size of the pointer to the actual string, or \c sizeof(\c + * char \c *). This function does not return the size of actual + * variable-length string data. + * \li For variable-length sequence datatypes (see H5Tvlen_create()), + * the returned value is the size of the \p hvl_t struct, or \c + * sizeof(\p hvl_t). The \p hvl_t struct contains a pointer to the + * actual data and a size value. This function does not return the + * size of actual variable-length sequence data. + * + * \see H5Tset_size() + * + * \since 1.2.0 + */ +H5_DLL size_t H5Tget_size(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Returns the byte order of an atomic datatype + * + * \type_id + * + * \return Returns a byte order constant if successful; otherwise returns + * #H5T_ORDER_ERROR (-1) + * + * \details H5Tget_order() returns the byte order of an atomic datatype. + * Possible return values are: + * \snippet this H5T_order_t_snip + * Members of a compound datatype need not have the same byte + * order. If members of a compound datatype have more than one of + * little endian, big endian, or VAX byte order, H5Tget_order() will + * return #H5T_ORDER_MIXED for the compound datatype. A byte order of + * #H5T_ORDER_NONE will, however, be ignored; for example, if one or + * more members of a compound datatype have byte order #H5T_ORDER_NONE + * but all other members have byte order #H5T_ORDER_LE, H5Tget_order() + * will return #H5T_ORDER_LE for the compound datatype. + * + * \since 1.2.0 + * + */ H5_DLL H5T_order_t H5Tget_order(hid_t type_id); -H5_DLL size_t H5Tget_precision(hid_t type_id); -H5_DLL int H5Tget_offset(hid_t type_id); -H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/); -H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Returns the precision of an atomic datatype + * + * \type_id + * + * \return Returns the number of significant bits if successful; otherwise 0 + * + * \details H5Tget_precision() returns the precision of an atomic datatype + * (for example, integer or float) or a datatype whose base (parent) + * type is an atomic type (for example, array, enum and variable + * length). The precision is the number of significant bits which, + * unless padding is present, is 8 times larger than the value + * returned by H5Tget_size(). + * + * \since 1.2.0 + * + */ +H5_DLL size_t H5Tget_precision(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Retrieves the bit offset of the first significant bit + * + * \type_id + * + * \return Returns an offset value if successful; otherwise returns a + * negative value. + * + * \details H5Tget_offset() retrieves the bit offset of the first significant + * bit. The significant bits of an atomic datum can be offset from the + * beginning of the memory for that datum by an amount of padding. The + * 'offset' property specifies the number of bits of padding that + * appear to the "right of" the value. That is, if we have a 32-bit + * datum with 16-bits of precision having the value 0x1122 then it + * will be laid out in memory as (from small byte address toward + * larger byte addresses): + * \code{.unparsed} + * 0: [ pad] [0x11] [0x22] [ pad] + * 1: [ pad] [0x22] [0x11] [ pad] + * 2: [0x11] [ pad] [ pad] [0x22] + * 3: [0x22] [ pad] [ pad] [0x11] + * \endcode + * + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_offset(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Retrieves the padding type of the least and most-significant bit padding + * + * \type_id + * \param[out] lsb Buffer for the least-significant bit padding type + * \param[out] msb Buffer for the most-significant bit padding type + * + * \return \herr_t + * + * \details H5Tget_pad() retrieves the padding type of the least and + * most-significant bit padding. Valid padding types are: + * \snippet this H5T_pad_t_snip + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/); +/** + * \ingroup ATOM + * + * \brief Retrieves the sign type for an integer type + * + * \type_id + * + * \return Returns a valid sign type if successful; otherwise #H5T_SGN_ERROR (-1) + * + * \details H5Tget_sign() retrieves the sign type for an integer type. + * Valid types are: + * \snippet this H5T_sign_t_snip + * + * \since 1.2.0 + * + */ +H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Retrieves floating point datatype bit field information + * + * \type_id + * \param[out] spos Pointer to location to return floating-point sign bit + * \param[out] epos Pointer to location to return exponent bit-position + * \param[out] esize Pointer to location to return size of exponent in bits + * \param[out] mpos Pointer to location to return mantissa bit-position + * \param[out] msize Pointer to location to return size of mantissa in bits + * + * \return \herr_t + * + * \details H5Tget_fields() retrieves information about the locations of + * the various bit fields of a floating point datatype. The field + * positions are bit positions in the significant region of the + * datatype. Bits are numbered with the least significant bit number + * zero. Any (or even all) of the arguments can be null pointers. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos /*out*/, size_t *epos /*out*/, size_t *esize /*out*/, size_t *mpos /*out*/, size_t *msize /*out*/); +/** + * \ingroup ATOM + * + * \brief Retrieves the exponent bias of a floating-point type + * + * \type_id + * + * \return Returns the bias if successful and 0, otherwise. + * + * \details H5Tget_ebias() retrieves the exponent bias of a floating-point type. + * + * \since 1.2.0 + * + */ H5_DLL size_t H5Tget_ebias(hid_t type_id); -H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id); -H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id); -H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id); -H5_DLL int H5Tget_nmembers(hid_t type_id); -H5_DLL char * H5Tget_member_name(hid_t type_id, unsigned membno); -H5_DLL int H5Tget_member_index(hid_t type_id, const char *name); -H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno); +/** + * -------------------------------------------------------------------------- + * \ingroup ATOM + * + * \brief Retrieves mantissa normalization of a floating-point datatype + * + * \type_id + * + * \return Returns a valid normalization type if successful; otherwise + * returns #H5T_NORM_ERROR (-1) + * + * \details H5Tget_norm() retrieves the mantissa normalization of a + * floating-point datatype. Valid normalization types are: + * \snippet this H5T_norm_t_snip + * + * \since 1.2.0 + * + */ +H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Retrieves the internal padding type for unused bits in floating-point + * datatypes + * + * \type_id + * + * \return Returns a valid padding type if successful; otherwise returns + * #H5T_PAD_ERROR (-1). + * + * \details H5Tget_inpad() retrieves the internal padding type for unused + * bits in floating-point datatypes. Valid padding types are: + * \snippet this H5T_pad_t_snip + * + * \since 1.2.0 + * + */ +H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Retrieves the type of padding used for a string datatype + * + * \type_id + * + * \return Returns a valid string of the padding if successful; otherwise + * returns #H5T_STR_ERROR (-1) + * + * \details H5Tget_strpad() retrieves the type of padding used for a string + * datatype. + * + * The string padding type is set with H5Tset_strpad(). Possible + * values returned are: + * \str_pad_type + * + * \since 1.2.0 + * + */ +H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id); +/** + * \ingroup COMPOUND ENUM + * + * \brief Retrieves the number of elements in a compound or enumeration datatype + * + * \type_id + * + * \return Returns the number of elements if successful; otherwise returns a + * negative value. + * + * \details H5Tget_nmembers() retrieves the number of fields in a compound + * datatype or the number of members of an enumeration datatype. + * + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_nmembers(hid_t type_id); +/** + * \ingroup COMPOUND ENUM + * + * \brief Retrieves the name of a compound or enumeration datatype member + * + * \type_id + * \param[in] membno Zero-based index of the field or element + * + * \return Returns a valid pointer to a string allocated with malloc() if + * successful; otherwise returns NULL. + * + * \details H5Tget_member_name() retrieves the name of a field of a compound + * datatype or an element of an enumeration datatype. + * + * The index of the target field or element is specified in \p + * member_no. Compound datatype fields and enumeration datatype + * elements are stored in no particular order with index values of + * 0 through N-1, where N is the value returned by H5Tget_nmembers(). + * + * The HDF5 library allocates a buffer to receive the name of + * the field. The caller must subsequently free the buffer with + * H5free_memory(). + * + * \since 1.2.0 + * + */ +H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno); +/** + * \ingroup COMPOUND ENUM + * + * \brief Retrieves the index of a compound or enumeration datatype member + * + * \type_id + * \param[in] name Name of the field or member + * + * \return \herr_t + * + * \details H5Tget_member_index() retrieves the index of a field of a compound + * datatype or an element of an enumeration datatype. + * + * The name of the target field or element is specified by \p name. + * + * Fields are stored in no particular order with index values of 0 + * through N-1, where N is the value returned by H5Tget_nmembers() . + * + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_member_index(hid_t type_id, const char *name); +/** + * \ingroup COMPOUND + * + * \brief Retrieves the offset of a field of a compound datatype + * + * \type_id + * \param[in] membno Zero-based index of the field or element + * + * \return Returns the byte offset of the field if successful; otherwise + * returns 0 (zero). + * + * \details H5Tget_member_offset() retrieves the byte offset of the beginning + * of a field within a compound datatype with respect to the beginning + * of the compound datatype datum. + * + * Note that zero is a valid offset and that this function will fail + * only if a call to H5Tget_member_class() fails with the same arguments. + * + * \version 1.6.4 \p member_no parameter type changed to unsigned. + * + * \since 1.2.0 + * + */ +H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno); +/** + * \ingroup COMPOUND + * + * \brief Returns datatype class of compound datatype member + * + * \type_id + * \param[in] membno Zero-based index of the field or element + * + * \return Returns the datatype class, a non-negative value, if successful; + * otherwise returns a negative value. + * + * \details Given a compound datatype, \p dtype_id, H5Tget_member_class() + * returns the datatype class of the member specified by \p member_no. + * + * Valid class identifiers, as defined in H5Tpublic.h, are: + * \snippet this H5T_class_t_snip + * + * \since 1.2.0 + * + */ H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno); -H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno); -H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value /*out*/); -H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id); -H5_DLL htri_t H5Tis_variable_str(hid_t type_id); -H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction); +/** + * \ingroup COMPOUND + * + * \brief Returns the datatype of the specified member + * + * \type_id + * \param[in] membno Zero-based index of the field or element + * + * \return Returns the identifier of a copy of the datatype of the field if + * successful; otherwise returns a negative value. + * + * \details H5Tget_member_type() returns the datatype of the specified member. + * The caller should invoke H5Tclose() to release resources associated + * with the type. + * + * \version 1.6.4 \p membno parameter type changed to unsigned. + * + * \since 1.2.0 + * + */ +H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno); +/** + * \ingroup ENUM + * + * \brief Returns the value of an enumeration datatype member + * + * \type_id + * \param[in] membno Number of the enumeration datatype member + * \param[out] value Buffer for the value of the enumeration datatype member + * + * \return \herr_t + * + * \details H5Tget_member_value() returns the value of the enumeration datatype + * member \p member_no. + * + * The member value is returned in a user-supplied buffer pointed to + * by \p value. Values returned in \p value will be of the enumerated + * type’s base type, that is, the datatype used by H5Tenum_create() + * when the enumerated type was created. + * + * The value buffer must be at least large enough to hold a value + * of that base type. If the size is unknown, you can determine it + * with H5Tget_size(). + * + * \since 1.2.0 + * + */ +H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value /*out*/); +/** + * \ingroup ATOM + * + * \brief Retrieves the character set type of a string datatype + * + * \type_id + * + * \return Returns a valid character set type if successful; otherwise + * #H5T_CSET_ERROR (-1). + * + * \details H5Tget_cset() retrieves the character set type of a string datatype. + * Valid character set types are: + * \csets + * + * \since 1.2.0 + * + */ +H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id); +/** + * \ingroup ATOM + * + * \brief Determines whether datatype is a variable-length string + * + * \type_id + * + * \return Returns: + * \li a positive value if the specified datatype is a variable-length + * string + * \li 0 if the specified datatype is not a variable-length string + * \li a negative value when the function fails + * + * \details H5Tis_variable_str() determines whether the datatype identified + * by \p dtype_id is a variable-length string. + * + * This function can be used to distinguish between fixed and + * variable-length string datatypes. + * + * \since 1.6.0 + * + */ +H5_DLL htri_t H5Tis_variable_str(hid_t type_id); +/** + * \ingroup H5T + * + * \brief Returns the native datatype identifier of a specified datatype + * + * \type_id + * \param[in] direction Direction of search + * + * \return \hid_t{native datatype} + * + * \details H5Tget_native_type() returns the equivalent native datatype + * identifier for the datatype specified by \p type_id. + * + * H5Tget_native_type() is designed primarily to facilitate use of + * the H5Dread() function, for which users otherwise must undertake a + * multi-step process to determine the native datatype of a dataset + * prior to reading it into memory. This function can be used for + * the following purposes: + * + * \li To determine the native datatype of an atomic datatype + * \li To determine the base datatype of an array, enumerated, or + * variable-length datatype + * \li To determine the native atomic datatypes of the individual + * components of a compound datatype + * + * For example, if \p type_id is a compound datatype, the returned + * datatype identifier will be for a similar compound datatype with + * each element converted to the corresponding native datatype; + * nested compound datatypes will be unwound. If \p type_id is an + * array, the returned datatype identifier will be for the native + * datatype of a single array element. + * + * H5Tget_native_type() selects the first matching native datatype + * from the following list: + * + * \li #H5T_NATIVE_CHAR + * \li #H5T_NATIVE_SHORT + * \li #H5T_NATIVE_INT + * \li #H5T_NATIVE_LONG + * \li #H5T_NATIVE_LLONG + * + * \li #H5T_NATIVE_UCHAR + * \li #H5T_NATIVE_USHORT + * \li #H5T_NATIVE_UINT + * \li #H5T_NATIVE_ULONG + * \li #H5T_NATIVE_ULLONG + * + * \li #H5T_NATIVE_FLOAT + * \li #H5T_NATIVE_DOUBLE + * \li #H5T_NATIVE_LDOUBLE + * + * \li #H5T_NATIVE_B8 + * \li #H5T_NATIVE_B16 + * \li #H5T_NATIVE_B32 + * \li #H5T_NATIVE_B64 + * + * The direction parameter indicates the order in which the library + * searches for a native datatype match. Valid values for direction + * are as follows: + * \snippet this H5T_direction_t_snip + * + * H5Tget_native_type() is designed primarily for use with integer, + * floating point, and bitfield datatypes. String, time, opaque, and + * reference datatypes are returned as a copy of dtype_id. See above + * for compound, array, enumerated, and variable-length datatypes. + * + * The identifier returned by H5Tget_native_type() should eventually + * be closed by calling H5Tclose() to release resources. + * + * \note Please note that a datatype is actually an object + * identifier or handle returned from opening the datatype. It + * is not persistent and its value can be different from one HDF5 + * session to the next. + * + * \note H5Tequal() can be used to compare datatypes. + * + * \note HDF5 High Level APIs that may also be of interest are: H5LTdtype_to_text() + * creates a text description of a datatype. H5LTtext_to_dtype() creates an + * HDF5 datatype given a text description. + * + * \since 1.6.0 + * + */ +H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction); /* Setting property values */ +/** + * \ingroup H5T + * + * \brief Sets size for a datatype. + * + * \type_id + * \param[in] size New datatype size is bytes or #H5T_VARIABLE + * + * \return \herr_t + * + * \details H5Tset_size() sets the total size, \p size, in bytes, for a + * datatype. + * + * \p size must have a positive value, unless it is passed in as + * #H5T_VARIABLE and the datatype is a string datatype. + * + * \li Numeric datatypes: If the datatype is atomic and the size + * is decreased so that significant bits of the datatype extend + * beyond the edge of the new size, then the offset property of the + * datatype is decreased toward zero. If the offset becomes zero + * and the significant bits of the datatype still hang over the edge + * of the new size, then the number of significant bits is decreased. + * + * \li String or character datatypes: The size set for a string + * datatype should include space for the null-terminator character, + * otherwise it will not be stored on (or retrieved from) + * disk. Adjusting the size of a string automatically sets the + * precision to \p 8*size. + * + * \li Variable-length string datatypes: If \p dtype_id is a + * variable-length string, size must normally be set to #H5T_VARIABLE. + * See \ref_vlen_strings. + * + * \li Compound datatypes: This function may be used to increase or + * decrease the size of a compound datatype, but the function will + * fail if the new size is too small to accommodate all member fields. + * + * \li Ineligible datatypes: This function cannot be used with + * enumerated datatypes (#H5T_ENUM), array datatypes (#H5T_ARRAY), + * variable-length array datatypes (#H5T_VLEN), or reference datatypes + * (#H5T_REFERENCE). + * + * \see H5Tget_size() + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size); +/** + * \ingroup ATOM + * + * \brief Sets the byte order of a datatype + * + * \type_id + * \param[in] order Byte order constant + * + * \return \herr_t + * + * \details H5Tset_order() sets the byte order of a datatype.\n + * Byte order can currently be set to any of the following: + * \snippet this H5T_order_t_snip + * #H5T_ORDER_MIXED (3) is a valid value for order only when + * returned by the function H5Tget_order(); it cannot be set with + * H5Tset_order(). + * + * #H5T_ORDER_NONE (4) is a valid value for order, but it has no + * effect. It is valid only for fixed-length strings and object and + * region references and specifies “no particular order.” + * + * The byte order of a derived datatype is initially the same as + * that of the parent type, but can be changed with H5Tset_order(). + * + * This function cannot be used with a datatype after it has been + * committed. + * + * \note Special considerations: + * \li ENUM datatypes: Byte order must be set before any member on + * an ENUM is defined. + * \li Compound datatypes: Byte order is set individually on each member + * of a compound datatype; members of a compound datatype need not + * have the same byte order. + * \li Opaque datatypes: Byte order can be set but has no effect. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order); +/** + * \ingroup ATOM + * + * \brief Sets the precision of an atomic datatype + * + * \type_id + * \param[in] prec Number of bits of precision for datatype + * + * \return \herr_t + * + * \details H5Tset_precision() sets the precision of an atomic datatype. The + * precision is the number of significant bits which, unless + * padding is present, is 8 times larger than the value returned + * by H5Tget_size(). + * + * If the precision is increased then the offset is decreased and + * then the size is increased to insure that significant bits do not + * "hang over" the edge of the datatype. + * + * Changing the precision of an #H5T_STRING automatically changes + * the size as well. The precision must be a multiple of 8. + * + * When decreasing the precision of a floating point type, set the + * locations and sizes of the sign, mantissa, and exponent fields + * first. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec); +/** + * \ingroup ATOM + * + * \brief Sets the bit offset of the first significant bit + * + * \type_id + * \param[in] offset Offset of first significant bit + * + * \return \herr_t + * + * \details H5Tset_offset() sets the bit offset of the first significant + * bit. The significant bits of an atomic datum can be offset from + * the beginning of the memory for that datum by an amount of + * padding. The offset property specifies the number of bits of + * padding that appear “to the right of” the value. That is, + * if we have a 32-bit datum with 16-bits of precision having the + * value 0x1122, then it will be laid out in memory as (from small + * byte address toward larger byte addresses): + * \code{.unparsed} + * 0: [ pad] [0x11] [0x22] [ pad] + * 1: [ pad] [0x22] [0x11] [ pad] + * 2: [0x11] [ pad] [ pad] [0x22] + * 3: [0x22] [ pad] [ pad] [0x11] + * \endcode + * If the offset is incremented then the total size is incremented + * also if necessary to prevent significant bits of the value from + * hanging over the edge of the datatype. + * + * The offset of an #H5T_STRING cannot be set to anything but zero. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset); +/** + * \ingroup ATOM + * + * \brief Sets the least and most-significant bits padding types + * + * \type_id + * \param[in] lsb Padding type for least-significant bits + * \param[in] msb Padding type for most-significant bits + * + * \return \herr_t + * + * \details H5Tset_pad() sets the least and most-significant bits padding types. + * Available values are: + * \padding_type + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb); +/** + * \ingroup ATOM + * + * \brief Sets the sign property for an integer type + * + * \type_id + * \param[in] sign Sign type + * + * \return \herr_t + * + * \details H5Tset_sign() sets the sign property for an integer type: + * \sign_prop + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign); +/** + * \ingroup ATOM + * + * \brief Sets locations and sizes of floating point bit fields + * + * \type_id + * \param[in] spos Sign position, i.e., the bit offset of the floating-point + * sign bit + * \param[in] epos Exponent bit position + * \param[in] esize Size of exponent in bits + * \param[in] mpos Mantissa bit position + * \param[in] msize Size of mantissa in bits + * + * \return \herr_t + * + * \details H5Tset_fields() sets the locations and sizes of the various + * floating-point bit fields. The field positions are bit positions + * in the significant region of the datatype. Bits are numbered with + * the least significant bit number zero. + * + * Fields are not allowed to extend beyond the number of bits of + * precision, nor are they allowed to overlap with one another. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize); +/** + * \ingroup ATOM + * + * \brief Sets the exponent bias of a floating-point type + * + * \type_id + * \param[in] ebias Exponent bias value + * + * \return \herr_t + * + * \details H5Tset_ebias() sets the exponent bias of a floating-point type. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias); +/** + * \ingroup ATOM + * + * \brief Sets the mantissa normalization of a floating-point datatype + * + * \type_id + * \param[in] norm Mantissa normalization type + * + * \return \herr_t + * + * \details H5Tset_norm() sets the mantissa normalization of a floating-point + * datatype. Valid normalization types are: + * \snippet this H5T_norm_t_snip + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm); +/** + * \ingroup ATOM + * + * \brief Fills unused internal floating-point bits + * + * \type_id + * \param[in] pad Padding type + * + * \return \herr_t + * + * \details H5Tset_inpad() If any internal bits of a floating point-type are + * unused (that is, those significant bits which are not part of the + * sign, exponent, or mantissa), then H5Tset_inpad() will be filled + * according to the value of the padding value property inpad. Valid + * padding types are: + * \snippet this H5T_pad_t_snip + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad); +/** + * \ingroup ATOM + * + * \brief Sets character set to be used in a string or character datatype + * + * \type_id + * \param[in] cset Character set type + * + * \return \herr_t + * + * \details H5Tset_cset() sets the character set to be used in a dataset with + * a string or character datatype. + * + * Valid values for cset include the following: + * \csets + * For example, if the character set for the datatype \p type_id is set + * to #H5T_CSET_UTF8, string or character data of datatype dtype_id + * will be encoded using the UTF-8 Unicode character set. + * + * ASCII and UTF-8 Unicode are the only currently supported character + * encodings. Extended ASCII encodings (for example, ISO 8859) are + * not supported. This encoding policy is not enforced by the HDF5 + * library. Using encodings other than ASCII and UTF-8 can lead to + * compatibility and usability problems. + * + * Note that H5Tset_cset() sets the character set for a character or + * string datatype while H5Pset_char_encoding() sets the character + * set used for an HDF5 link or attribute name. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset); +/** + * \ingroup ATOM + * + * \brief Defines the type of padding used for character strings + * + * \type_id + * \param[in] strpad String padding type + * + * \return \herr_t + * + * \details H5Tset_strpad() defines the type of padding used for a string + * datatype. + * + * The method used to store character strings differs with the + * programming language. C usually null terminates strings while + * Fortran left-justifies and space-pads strings. + * + * Valid values of \p strpad are as follows: + * \str_pad_type + * When converting from a longer string to a shorter string, the + * behavior is as follows. If the shorter string is #H5T_STR_NULLPAD + * or #H5T_STR_SPACEPAD, then the string is simply truncated. If + * the short string is #H5T_STR_NULLTERM, it is truncated and a null + * terminator is appended. + * + * When converting from a shorter string to a longer string, the + * longer string is padded on the end by appending nulls or spaces. + * + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad); /* Type conversion database */ +/** + * \ingroup CONV + * + * \brief Registers a datatype conversion function + * + * \param[in] pers Conversion function type + * \param[in] name Name displayed in diagnostic output + * \type_id{src_id} of source datatype + * \type_id{dst_id} of destination datatype + * \param[in] func Function to convert between source and destination datatypes + * + * \return \herr_t + * + * \details H5Tregister() registers a hard or soft conversion function for a + * datatype conversion path. The parameter \p pers indicates whether a + * conversion function is hard (#H5T_PERS_HARD) or soft + * (#H5T_PERS_SOFT). User-defined functions employing compiler casting + * are designated as \Emph{hard}; other user-defined conversion + * functions registered with the HDF5 library (with H5Tregister() ) + * are designated as \Emph{soft}. The HDF5 library also has its own + * hard and soft conversion functions. + * + * A conversion path can have only one hard function. When type is + * #H5T_PERS_HARD, \p func replaces any previous hard function. + * + * When type is #H5T_PERS_SOFT, H5Tregister() adds the function to the + * end of the master soft list and replaces the soft function in all + * applicable existing conversion paths. Soft functions are used when + * determining which conversion function is appropriate for this path. + * + * The \p name is used only for debugging and should be a short + * identifier for the function. + * + * The path is specified by the source and destination datatypes \p + * src_id and \p dst_id. For soft conversion functions, only the class + * of these types is important. + * + * The type of the conversion function pointer is declared as: + * \snippet this H5T_conv_t_snip + * + * The \ref H5T_cdata_t \c struct is declared as: + * \snippet this H5T_cdata_t_snip + * + * \since 1.6.3 The following change occurred in the \ref H5T_conv_t function: + * the \c nelmts parameter type changed to size_t. + * + */ H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func); +/** + * \ingroup CONV + * + * \brief Removes a conversion function + * + * \param[in] pers Conversion function type + * \param[in] name Name displayed in diagnostic output + * \type_id{src_id} of source datatype + * \type_id{dst_id} of destination datatype + * \param[in] func Function to convert between source and destination datatypes + * + * \return \herr_t + * + * \details H5Tunregister() removes a conversion function matching criteria + * such as soft or hard conversion, source and destination types, and + * the conversion function. + * + * If a user is trying to remove a conversion function he registered, + * all parameters can be used. If he is trying to remove a library’s + * default conversion function, there is no guarantee the \p name and + * \p func parameters will match the user’s chosen values. Passing in + * some values may cause this function to fail. A good practice is to + * pass in NULL as their values. + * + * All parameters are optional. The missing parameters will be used to + * generalize the search criteria. + * + * The conversion function pointer type declaration is described in + * H5Tregister(). + * + * \version 1.6.3 The following change occurred in the \ref H5T_conv_t function: + * the \c nelmts parameter type changed to size_t. + * + */ H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func); +/** + * \ingroup CONV + * + * \brief Finds a conversion function + * + * \type_id{src_id} of source datatype + * \type_id{dst_id} of destination datatype + * \param[out] pcdata Pointer to type conversion data + * + * \return Returns a pointer to a suitable conversion function if successful. + * Otherwise returns NULL. + * + * \details H5Tfind() finds a conversion function that can handle a conversion + * from type \p src_id to type \p dst_id. The \p pcdata argument is a + * pointer to a pointer to type conversion data which was created and + * initialized by the soft type conversion function of this path when + * the conversion function was installed on the path. + * + */ H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata); -H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id); -H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, - hid_t plist_id); +/** + * \ingroup CONV + * + * \brief Check whether the library’s default conversion is hard conversion + * + * \type_id{src_id} of source datatype + * \type_id{dst_id} of destination datatype + * + * \return \htri_t + * + * \details H5Tcompiler_conv() determines whether the library’s conversion + * function from type \p src_id to type \p dst_id is a compiler (hard) + * conversion or not. A compiler conversion uses compiler’s casting; a + * library (soft) conversion uses the library’s own conversion + * function. + * + * \since 1.8.0 + * + */ +H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id); +/** + * -------------------------------------------------------------------------- + * \ingroup CONV + * + * \brief Converts data from one specified datatype to another + * + * \type_id{src_id} of source datatype + * \type_id{dst_id} of destination datatype + * \param[in] nelmts Size of array \p buf + * \param[in,out] buf Array containing pre- and post-conversion values + * \param[in] background Optional background buffer + * \dxpl_id{plist_id} + * + * \return \herr_t + * + * \details H5Tconvert() converts \p nelmts elements from a source datatype, + * specified by \p src_id, to a destination datatype, \p dst_id. The + * source elements are packed in \p buf and on return the destination + * elements will be packed in \p buf. That is, the conversion is + * performed in place. + * + * The optional background buffer is for use with compound datatypes. + * It is an array of \p nelmts values for the destination datatype + * which can then be merged with the converted values to recreate the + * compound datatype. For instance, background might be an array of + * structs with the \c a and \c b fields already initialized and the + * conversion of buf supplies the \c c and \c d field values. + * + * The parameter \p plist_id contains the dataset transfer property list + * identifier which is passed to the conversion functions. As of + * Release 1.2, this parameter is only used to pass along the + * variable-length datatype custom allocation information. + * + * \note H5Tconvert() will not resize the buffer \p buf; it must be large + * enough to hold the larger of the input and output data. + * + * \version 1.6.3 \p nelmts parameter type changed to size_t. + * \version 1.4.0 \p nelmts parameter type changed to hsize_t. + * + */ +H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, + hid_t plist_id); +/** + * \ingroup VLEN + * + * \brief Reclaims the variable length (VL) datatype memory buffers + * + * \type_id + * \space_id + * \dxpl_id{plist_id} used to create the buffer + * \param[in] buf Pointer to the buffer to be reclaimed + * + * \return \herr_t + * + * \details H5Treclaim() reclaims memory buffers created to store VL datatypes. + * It only frees the variable length data in the selection defined in + * the dataspace specified by \p space_id. The dataset transfer + * property list \p plist_id is required to find the correct + * allocation and/or free methods for the variable-length data in the + * buffer. + * + * \since 1.12.0 + * + */ +H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf); /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. */ + #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ @@ -595,11 +2881,140 @@ H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *bu /* Typedefs */ /* Function prototypes */ +/** + * \ingroup H5T + * + * \brief Commits a transient datatype to a file, creating a new named datatype + * + * \fg_loc_id + * \param[in] name Name given to committed datatype + * \param[in] type_id Identifier of datatype to be committed + * + * \return \herr_t + * + * \deprecated This function has been renamed from H5Tcommit() and is + * deprecated in favor of the macro #H5Tcommit or the function + * H5Tcommit2(). + * + * \details H5Tcommit1() commits the transient datatype (not immutable) to + * a file, turning it into a named datatype. + * + * The datatype \p dtype_id is committed as a named datatype at the + * location \p loc_id, which is either a file or group identifier, + * with the name \p name. + * + * \p name can be a relative path based at \p loc_id or an absolute + * path from the root of the file. Use of this function requires + * that any intermediate groups specified in the path already exist. + * + * As is the case for any object in a group, the length of the name + * of a named datatype is not limited. + * + * See H5Tcommit_anon() for a discussion of the differences between + * H5Tcommit() and H5Tcommit_anon(). + * + * This function will not accept a datatype that cannot actually + * hold data. This currently includes compound datatypes with no + * fields and enumerated datatypes with no members. + * + * \version 1.8.7 Function modified in this release to reject datatypes that + * will not accommodate actual data, such as a compound datatype with + * no fields or an enumerated datatype with no members. + * \version 1.8.0 C function H5Tcommit() renamed to H5Tcommit1() and deprecated + * in this release. + * \since 1.2.0 + * + */ H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id); -H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name); -H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */], - const int perm[/* ndims */]); -H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); +/** + * \ingroup H5T + * + * \brief Opens a named datatype + * + * \fg_loc_id + * \param[in] name A datatype name, defined within the specified file or group + * + * \return \herr_t + * + * \deprecated This function has been renamed from H5Topen() and is + * deprecated in favor of the macro #H5Topen or the function + * H5Topen2(). + * + * \details H5Topen1() opens a named datatype at the location specified by + * \p loc_id and returns an identifier for the datatype. \p loc_id + * can be either a file or group identifier. The identifier should + * eventually be closed by calling H5Tclose() to release resources. + * + * \version 1.8.0 Function H5Topen() renamed to H5Topen1() and deprecated in + * this release. + * + * \since 1.2.0 + * + */ +H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name); +/** + * \ingroup ARRAY + * + * \brief Creates an array datatype object + * + * \param[in] base_id Datatype identifier for the array base datatype + * \param[in] ndims Rank of the array + * \param[in] dim Size of each array dimension + * \param[in] perm Dimension permutation (Currently not implemented.) + * + * \return \hid_t{array datatype} + * + * \deprecated This function has been renamed from H5Tarray_create() and is + * deprecated in favor of the macro #H5Tarray_create or the function + * H5Tarray_create2(). + * + * \details H5Tarray_create1() creates a new array datatype object.\n\n + * \p base_id is the datatype of every element of the array, i.e., + * of the number at each position in the array. + * + * \p rank is the number of dimensions and the size of each dimension + * is specified in the array dims. The value of rank is currently + * limited to #H5S_MAX_RANK and must be greater than 0 (zero). All + * dimension sizes specified in dims must be greater than 0 (zero). + * + * The array \p perm is designed to contain the dimension permutation, + * i.e. C versus FORTRAN array order. (The parameter perm is + * currently unused and is not yet implemented.) + * + * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1() + * and deprecated in this release. + * \since 1.4.0 + * + */ +H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */], + const int perm[/* ndims */]); +/** + * \ingroup ARRAY + * + * \brief Retrieves sizes of array dimensions + * + * \type_id + * \param[out] dims Sizes of array dimensions + * \param[out] perm Dimension permutations (This parameter is not used.) + * + * \return Returns the non-negative number of dimensions of the array type + * if successful; otherwise, returns a negative value. + * + * \deprecated This function has been renamed from H5Tget_array_dims() and is + * deprecated in favor of the macro #H5Tget_array_dims or the + * function H5Tget_array_dims2(). + * + * \details H5Tget_array_dims1() returns the sizes of the dimensions and + * the dimension permutations of the specified array datatype object. + * + * The sizes of the dimensions are returned in the array \p dims. + * + * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1() + * and deprecated in this release. + * \since 1.2.0 + * + */ +H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Zmodule.h b/src/H5Zmodule.h index 7dc687a73b9..76a23809294 100644 --- a/src/H5Zmodule.h +++ b/src/H5Zmodule.h @@ -29,4 +29,69 @@ #define H5_MY_PKG_ERR H5E_PLINE #define H5_MY_PKG_INIT YES +/** + * \defgroup H5Z H5Z + * + * + * \brief Filter and Compression Interface + * + * \details The functions in this module let you configure filters that process + * data during I/O operation. + * + * HDF5 supports a filter pipeline that provides the capability for + * standard and customized raw data processing during I/O operations. + * HDF5 is distributed with a small set of standard filters such as + * compression (gzip, SZIP, and a shuffling algorithm) and error + * checking (Fletcher32 checksum). For further flexibility, the + * library allows a user application to extend the pipeline through + * the creation and registration of customized filters. + * + * The flexibility of the filter pipeline implementation enables the + * definition of additional filters by a user application. A filter + * \li is associated with a dataset when the dataset is created, + * \li can be used only with chunked data (i.e., datasets stored in + * the #H5D_CHUNKED storage layout), and + * \li is applied independently to each chunk of the dataset. + * + * The HDF5 library does not support filters for contiguous datasets + * because of the difficulty of implementing random access for partial + * I/O. Compact dataset filters are not supported because it would not + * produce significant results. + * + * Filter identifiers for the filters distributed with the HDF5 + * Library are as follows: + * + * + * + * + * + * + * + *
    #H5Z_FILTER_DEFLATEThe gzip compression, or + * deflation, filter
    #H5Z_FILTER_SZIPThe SZIP compression + * filter
    #H5Z_FILTER_NBITThe N-bit compression + * filter
    #H5Z_FILTER_SCALEOFFSETThe scale-offset + * compression filter
    #H5Z_FILTER_SHUFFLEThe shuffle algorithm + * filter
    #H5Z_FILTER_FLETCHER32The Fletcher32 checksum, + * or error checking, filter
    + * Custom filters that have been registered with the library will have + * additional unique identifiers. + * + * See \ref_dld_filters for more information on how an HDF5 + * application can apply a filter that is not registered with the HDF5 + * library. + * + * \defgroup H5ZPRE Predefined Filters + * \ingroup H5Z + * \defgroup FLETCHER32 Checksum Filter + * \ingroup H5ZPRE + * \defgroup SCALEOFFSET Scale-Offset Filter + * \ingroup H5ZPRE + * \defgroup SHUFFLE Shuffle Filter + * \ingroup H5ZPRE + * \defgroup SZIP Szip Filter + * \ingroup H5ZPRE + * + */ + #endif /* H5Zmodule_H */ diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index 66099f01a77..90277cf9cea 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -21,111 +21,231 @@ /* Public headers needed by this file */ #include "H5public.h" -/* - * Filter identifiers. Values 0 through 255 are for filters defined by the - * HDF5 library. Values 256 through 511 are available for testing new - * filters. Subsequent values should be obtained from the HDF5 development - * team at help@hdfgroup.org. These values will never change because they - * appear in the HDF5 files. +/** + * \brief Filter identifiers + * + * \details Values 0 through 255 are for filters defined by the HDF5 library. + * Values 256 through 511 are available for testing new filters. + * Subsequent values should be obtained from the HDF5 development team + * at mailto:help@hdfgroup.org. These values will never change because + * they appear in the HDF5 files. */ typedef int H5Z_filter_t; /* Filter IDs */ -#define H5Z_FILTER_ERROR (-1) /*no filter */ -#define H5Z_FILTER_NONE 0 /*reserved indefinitely */ -#define H5Z_FILTER_DEFLATE 1 /*deflation like gzip */ -#define H5Z_FILTER_SHUFFLE 2 /*shuffle the data */ -#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */ -#define H5Z_FILTER_SZIP 4 /*szip compression */ -#define H5Z_FILTER_NBIT 5 /*nbit compression */ -#define H5Z_FILTER_SCALEOFFSET 6 /*scale+offset compression */ -#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved for library use */ - -#define H5Z_FILTER_MAX 65535 /*maximum filter id */ +/** + * no filter + */ +#define H5Z_FILTER_ERROR (-1) +/** + * reserved indefinitely + */ +#define H5Z_FILTER_NONE 0 +/** + * deflation like gzip + */ +#define H5Z_FILTER_DEFLATE 1 +/** + * shuffle the data + */ +#define H5Z_FILTER_SHUFFLE 2 +/** + * fletcher32 checksum of EDC + */ +#define H5Z_FILTER_FLETCHER32 3 +/** + * szip compression + */ +#define H5Z_FILTER_SZIP 4 +/** + * nbit compression + */ +#define H5Z_FILTER_NBIT 5 +/** + * scale+offset compression + */ +#define H5Z_FILTER_SCALEOFFSET 6 +/** + * filter ids below this value are reserved for library use + */ +#define H5Z_FILTER_RESERVED 256 +/** + * maximum filter id + */ +#define H5Z_FILTER_MAX 65535 /* General macros */ -#define H5Z_FILTER_ALL 0 /* Symbol to remove all filters in H5Premove_filter */ -#define H5Z_MAX_NFILTERS 32 /* Maximum number of filters allowed in a pipeline */ -/* (should probably be allowed to be an - * unlimited amount, but currently each - * filter uses a bit in a 32-bit field, - * so the format would have to be - * changed to accommodate that) +/** + * Symbol to remove all filters in H5Premove_filter() */ +#define H5Z_FILTER_ALL 0 +/** + * Maximum number of filters allowed in a pipeline + * + * \internal (should probably be allowed to be an unlimited amount, but + * currently each filter uses a bit in a 32-bit field, so the format + * would have to be changed to accommodate that) + */ +#define H5Z_MAX_NFILTERS 32 /* Flags for filter definition (stored) */ -#define H5Z_FLAG_DEFMASK 0x00ff /*definition flag mask */ -#define H5Z_FLAG_MANDATORY 0x0000 /*filter is mandatory */ -#define H5Z_FLAG_OPTIONAL 0x0001 /*filter is optional */ +/** + * definition flag mask + */ +#define H5Z_FLAG_DEFMASK 0x00ff +/** + * filter is mandatory + */ +#define H5Z_FLAG_MANDATORY 0x0000 +/** + * filter is optional + */ +#define H5Z_FLAG_OPTIONAL 0x0001 /* Additional flags for filter invocation (not stored) */ -#define H5Z_FLAG_INVMASK 0xff00 /*invocation flag mask */ -#define H5Z_FLAG_REVERSE 0x0100 /*reverse direction; read */ -#define H5Z_FLAG_SKIP_EDC 0x0200 /*skip EDC filters for read */ +/** + * invocation flag mask + */ +#define H5Z_FLAG_INVMASK 0xff00 +/** + * reverse direction; read + */ +#define H5Z_FLAG_REVERSE 0x0100 +/** + * skip EDC filters for read + */ +#define H5Z_FLAG_SKIP_EDC 0x0200 /* Special parameters for szip compression */ /* [These are aliases for the similar definitions in szlib.h, which we can't * include directly due to the duplication of various symbols with the zlib.h * header file] */ +/** + * \ingroup SZIP */ #define H5_SZIP_ALLOW_K13_OPTION_MASK 1 -#define H5_SZIP_CHIP_OPTION_MASK 2 -#define H5_SZIP_EC_OPTION_MASK 4 -#define H5_SZIP_NN_OPTION_MASK 32 -#define H5_SZIP_MAX_PIXELS_PER_BLOCK 32 +/** + * \ingroup SZIP */ +#define H5_SZIP_CHIP_OPTION_MASK 2 +/** + * \ingroup SZIP */ +#define H5_SZIP_EC_OPTION_MASK 4 +/** + * \ingroup SZIP */ +#define H5_SZIP_NN_OPTION_MASK 32 +/** + * \ingroup SZIP */ +#define H5_SZIP_MAX_PIXELS_PER_BLOCK 32 /* Macros for the shuffle filter */ -#define H5Z_SHUFFLE_USER_NPARMS 0 /* Number of parameters that users can set */ -#define H5Z_SHUFFLE_TOTAL_NPARMS 1 /* Total number of parameters for filter */ +/** + * \ingroup SHUFFLE + * Number of parameters that users can set for the shuffle filter + */ +#define H5Z_SHUFFLE_USER_NPARMS 0 +/** + * \ingroup SHUFFLE + * Total number of parameters for the shuffle filter + */ +#define H5Z_SHUFFLE_TOTAL_NPARMS 1 /* Macros for the szip filter */ -#define H5Z_SZIP_USER_NPARMS 2 /* Number of parameters that users can set */ -#define H5Z_SZIP_TOTAL_NPARMS 4 /* Total number of parameters for filter */ -#define H5Z_SZIP_PARM_MASK 0 /* "User" parameter for option mask */ -#define H5Z_SZIP_PARM_PPB 1 /* "User" parameter for pixels-per-block */ -#define H5Z_SZIP_PARM_BPP 2 /* "Local" parameter for bits-per-pixel */ -#define H5Z_SZIP_PARM_PPS 3 /* "Local" parameter for pixels-per-scanline */ +/** + * \ingroup SZIP + * Number of parameters that users can set for SZIP + */ +#define H5Z_SZIP_USER_NPARMS 2 +/** + * \ingroup SZIP + * Total number of parameters for SZIP filter + */ +#define H5Z_SZIP_TOTAL_NPARMS 4 +/** + * \ingroup SZIP + * "User" parameter for option mask + */ +#define H5Z_SZIP_PARM_MASK 0 +/** + * \ingroup SZIP + * "User" parameter for pixels-per-block + */ +#define H5Z_SZIP_PARM_PPB 1 +/** + * \ingroup SZIP + * "Local" parameter for bits-per-pixel + */ +#define H5Z_SZIP_PARM_BPP 2 +/** + * \ingroup SZIP + * "Local" parameter for pixels-per-scanline + */ +#define H5Z_SZIP_PARM_PPS 3 /* Macros for the nbit filter */ +/** + * \ingroup NBIT + * Number of parameters that users can set for the N-bit filter + */ #define H5Z_NBIT_USER_NPARMS 0 /* Number of parameters that users can set */ /* Macros for the scale offset filter */ -#define H5Z_SCALEOFFSET_USER_NPARMS 2 /* Number of parameters that users can set */ +/** + * \ingroup SCALEOFFSET + * Number of parameters that users can set for the scale-offset filter + */ +#define H5Z_SCALEOFFSET_USER_NPARMS 2 /* Special parameters for ScaleOffset filter*/ +/** + * \ingroup SCALEOFFSET */ #define H5Z_SO_INT_MINBITS_DEFAULT 0 +/** + * \ingroup SCALEOFFSET */ typedef enum H5Z_SO_scale_type_t { H5Z_SO_FLOAT_DSCALE = 0, H5Z_SO_FLOAT_ESCALE = 1, H5Z_SO_INT = 2 } H5Z_SO_scale_type_t; -/* Current version of the H5Z_class_t struct */ +/** + * Current version of the H5Z_class_t struct + */ #define H5Z_CLASS_T_VERS (1) -/* Values to decide if EDC is enabled for reading data */ +/** + * \ingroup FLETCHER32 + * Values to decide if EDC is enabled for reading data + */ typedef enum H5Z_EDC_t { - H5Z_ERROR_EDC = -1, /* error value */ + H5Z_ERROR_EDC = -1, /**< error value */ H5Z_DISABLE_EDC = 0, H5Z_ENABLE_EDC = 1, - H5Z_NO_EDC = 2 /* must be the last */ + H5Z_NO_EDC = 2 /**< sentinel */ } H5Z_EDC_t; /* Bit flags for H5Zget_filter_info */ #define H5Z_FILTER_CONFIG_ENCODE_ENABLED (0x0001) #define H5Z_FILTER_CONFIG_DECODE_ENABLED (0x0002) -/* Return values for filter callback function */ +/** + * Return values for filter callback function + */ typedef enum H5Z_cb_return_t { - H5Z_CB_ERROR = -1, - H5Z_CB_FAIL = 0, /* I/O should fail if filter fails. */ - H5Z_CB_CONT = 1, /* I/O continues if filter fails. */ - H5Z_CB_NO = 2 + H5Z_CB_ERROR = -1, /**< error value */ + H5Z_CB_FAIL = 0, /**< I/O should fail if filter fails. */ + H5Z_CB_CONT = 1, /**< I/O continues if filter fails. */ + H5Z_CB_NO = 2 /**< sentinel */ } H5Z_cb_return_t; -/* Filter callback function definition */ +//! +/** + * Filter callback function definition + */ typedef H5Z_cb_return_t (*H5Z_filter_func_t)(H5Z_filter_t filter, void *buf, size_t buf_size, void *op_data); +//! -/* Structure for filter callback property */ +/** + * Structure for filter callback property + */ typedef struct H5Z_cb_t { H5Z_filter_func_t func; void * op_data; @@ -135,87 +255,411 @@ typedef struct H5Z_cb_t { extern "C" { #endif -/* - * Before a dataset gets created, the "can_apply" callbacks for any filters used - * in the dataset creation property list are called - * with the dataset's dataset creation property list, the dataset's datatype and - * a dataspace describing a chunk (for chunked dataset storage). +/** + * \brief This callback determines if a filter can be applied to the dataset + * with the characteristics provided * - * The "can_apply" callback must determine if the combination of the dataset - * creation property list setting, the datatype and the dataspace represent a - * valid combination to apply this filter to. For example, some cases of - * invalid combinations may involve the filter not operating correctly on - * certain datatypes (or certain datatype sizes), or certain sizes of the chunk - * dataspace. + * \dcpl_id + * \type_id + * \space_id * - * The "can_apply" callback can be the NULL pointer, in which case, the library - * will assume that it can apply to any combination of dataset creation - * property list values, datatypes and dataspaces. + * \return \htri_t * - * The "can_apply" callback returns positive a valid combination, zero for an - * invalid combination and negative for an error. + * \details Before a dataset gets created, the \ref H5Z_can_apply_func_t + * callbacks for any filters used in the dataset creation property list + * are called with the dataset's dataset creation property list, the + * dataset's datatype and a dataspace describing a chunk (for chunked + * dataset storage). + * + * The \ref H5Z_can_apply_func_t callback must determine if the + * combination of the dataset creation property list setting, the + * datatype and the dataspace represent a valid combination to apply + * this filter to. For example, some cases of invalid combinations may + * involve the filter not operating correctly on certain datatypes (or + * certain datatype sizes), or certain sizes of the chunk dataspace. + * + * The \ref H5Z_can_apply_func_t callback can be the NULL pointer, in + * which case, the library will assume that it can apply to any + * combination of dataset creation property list values, datatypes and + * dataspaces. + * + * The \ref H5Z_can_apply_func_t callback returns positive a valid + * combination, zero for an invalid combination and negative for an + * error. */ +//! typedef htri_t (*H5Z_can_apply_func_t)(hid_t dcpl_id, hid_t type_id, hid_t space_id); - -/* - * After the "can_apply" callbacks are checked for new datasets, the "set_local" - * callbacks for any filters used in the dataset creation property list are - * called. These callbacks receive the dataset's private copy of the dataset - * creation property list passed in to H5Dcreate (i.e. not the actual property - * list passed in to H5Dcreate) and the datatype ID passed in to H5Dcreate - * (which is not copied and should not be modified) and a dataspace describing - * the chunk (for chunked dataset storage) (which should also not be modified). +//! +/** + * \brief The filter operation callback function, defining a filter's operation + * on data + * + * \dcpl_id + * \type_id + * \space_id + * + * \return \herr_t * - * The "set_local" callback must set any parameters that are specific to this - * dataset, based on the combination of the dataset creation property list - * values, the datatype and the dataspace. For example, some filters perform - * different actions based on different datatypes (or datatype sizes) or - * different number of dimensions or dataspace sizes. + * \details After the \ref H5Z_can_apply_func_t callbacks are checked for new + * datasets, the \ref H5Z_set_local_func_t callbacks for any filters + * used in the dataset creation property list are called. These + * callbacks receive the dataset's private copy of the dataset creation + * property list passed in to H5Dcreate() (i.e. not the actual property + * list passed in to H5Dcreate()) and the datatype ID passed in to + * H5Dcreate() (which is not copied and should not be modified) and a + * dataspace describing the chunk (for chunked dataset storage) (which + * should also not be modified). * - * The "set_local" callback can be the NULL pointer, in which case, the library - * will assume that there are no dataset-specific settings for this filter. + * The \ref H5Z_set_local_func_t callback must set any parameters that + * are specific to this dataset, based on the combination of the + * dataset creation property list values, the datatype and the + * dataspace. For example, some filters perform different actions based + * on different datatypes (or datatype sizes) or different number of + * dimensions or dataspace sizes. * - * The "set_local" callback must return non-negative on success and negative - * for an error. + * The \ref H5Z_set_local_func_t callback can be the NULL pointer, in + * which case, the library will assume that there are no + * dataset-specific settings for this filter. + * + * The \ref H5Z_set_local_func_t callback must return non-negative on + * success and negative for an error. */ +//! typedef herr_t (*H5Z_set_local_func_t)(hid_t dcpl_id, hid_t type_id, hid_t space_id); +//! -/* - * A filter gets definition flags and invocation flags (defined above), the - * client data array and size defined when the filter was added to the - * pipeline, the size in bytes of the data on which to operate, and pointers - * to a buffer and its allocated size. +/** + * \brief The filter operation callback function, defining a filter's operation + * on data + * + * \param[in] flags Bit vector specifying certain general properties of the filter + * \param[in] cd_nelmts Number of elements in \p cd_values + * \param[in] cd_values Auxiliary data for the filter + * \param[in] nbytes The number of valid bytes in \p buf to be filtered + * \param[in,out] buf_size The size of \p buf + * \param[in,out] buf The filter buffer + * + * \return Returns the number of valid bytes of data contained in \p buf. In the + * case of failure, the return value is 0 (zero) and all pointer + * arguments are left unchanged. + * + * \details A filter gets definition flags and invocation flags (defined + * above), the client data array and size defined when the filter was + * added to the pipeline, the size in bytes of the data on which to + * operate, and pointers to a buffer and its allocated size. * - * The filter should store the result in the supplied buffer if possible, - * otherwise it can allocate a new buffer, freeing the original. The - * allocated size of the new buffer should be returned through the BUF_SIZE - * pointer and the new buffer through the BUF pointer. + * The filter should store the result in the supplied buffer if + * possible, otherwise it can allocate a new buffer, freeing the + * original. The allocated size of the new buffer should be returned + * through the \p buf_size pointer and the new buffer through the \p + * buf pointer. * - * The return value from the filter is the number of bytes in the output - * buffer. If an error occurs then the function should return zero and leave - * all pointer arguments unchanged. + * The return value from the filter is the number of bytes in the + * output buffer. If an error occurs then the function should return + * zero and leave all pointer arguments unchanged. */ +//! typedef size_t (*H5Z_func_t)(unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[], size_t nbytes, size_t *buf_size, void **buf); - -/* +//! +/** * The filter table maps filter identification numbers to structs that * contain a pointers to the filter function and timing statistics. */ +//! typedef struct H5Z_class2_t { - int version; /* Version number of the H5Z_class_t struct */ - H5Z_filter_t id; /* Filter ID number */ - unsigned encoder_present; /* Does this filter have an encoder? */ - unsigned decoder_present; /* Does this filter have a decoder? */ - const char * name; /* Comment for debugging */ - H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */ - H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */ - H5Z_func_t filter; /* The actual filter function */ + int version; /**< Version number of the H5Z_class_t struct */ + H5Z_filter_t id; /**< Filter ID number */ + unsigned encoder_present; /**< Does this filter have an encoder? */ + unsigned decoder_present; /**< Does this filter have a decoder? */ + const char * name; /**< Comment for debugging */ + H5Z_can_apply_func_t can_apply; /**< The "can apply" callback for a filter */ + H5Z_set_local_func_t set_local; /**< The "set local" callback for a filter */ + H5Z_func_t filter; /**< The actual filter function */ } H5Z_class2_t; +//! +/** + * \ingroup H5Z + * + * \brief Registers a new filter with the HDF5 library + * + * \param[in] cls A pointer to a buffer for the struct containing the + * filter-definition + * + * \return \herr_t + * + * \details H5Zregister() registers a new filter with the HDF5 library. + * + * \details Making a new filter available to an application is a two-step + * process. The first step is to write the three filter callback + * functions described below: \c can_apply, \c set_local, and \c + * filter. This call to H5Zregister(), registering the filter with the + * library, is the second step. The can_apply and set_local fields can + * be set to NULL if they are not required for the filter being + * registered. + * + * H5Zregister() accepts a single parameter, a pointer to a buffer for + * the \p cls data structure. That data structure must conform to one + * of the following definitions: + * \snippet this H5Z_class1_t_snip + * or + * \snippet this H5Z_class2_t_snip + * + * \c version is a library-defined value reporting the version number + * of the #H5Z_class_t struct. This currently must be set to + * #H5Z_CLASS_T_VERS. + * + * \c id is the identifier for the new filter. This is a user-defined + * value between #H5Z_FILTER_RESERVED and #H5Z_FILTER_MAX. These + * values are defined in the HDF5 source file H5Zpublic.h, but the + * symbols #H5Z_FILTER_RESERVED and #H5Z_FILTER_MAX should always be + * used instead of the literal values. + * + * \c encoder_present is a library-defined value indicating whether + * the filter’s encoding capability is available to the application. + * + * \c decoder_present is a library-defined value indicating whether + * the filter’s encoding capability is available to the application. + * + * \c name is a descriptive comment used for debugging, may contain a + * descriptive name for the filter, and may be the null pointer. + * + * \c can_apply, described in detail below, is a user-defined callback + * function which determines whether the combination of the dataset + * creation property list values, the datatype, and the dataspace + * represent a valid combination to apply this filter to. + * + * \c set_local, described in detail below, is a user-defined callback + * function which sets any parameters that are specific to this + * dataset, based on the combination of the dataset creation property + * list values, the datatype, and the dataspace. + * + * \c filter, described in detail below, is a user-defined callback + * function which performs the action of the filter. + * + * The statistics associated with a filter are not reset by this + * function; they accumulate over the life of the library. + * + * #H5Z_class_t is a macro which maps to either H5Z_class1_t or + * H5Z_class2_t, depending on the needs of the application. To affect + * only this macro, H5Z_class_t_vers may be defined to either 1 or 2. + * Otherwise, it will behave in the same manner as other API + * compatibility macros. See API Compatibility Macros in HDF5 for more + * information. H5Z_class1_t matches the #H5Z_class_t structure that is + * used in the 1.6.x versions of the HDF5 library. + * + * H5Zregister() will automatically detect which structure type has + * been passed in, regardless of the mapping of the #H5Z_class_t macro. + * However, the application must make sure that the fields are filled + * in according to the correct structure definition if the macro is + * used to declare the structure. + * + * \Bold{The callback functions:}\n Before H5Zregister() can link a + * filter into an application, three callback functions must be + * defined as described in the HDF5 library header file H5Zpublic.h. + * + * When a filter is applied to the fractal heap for a group (e.g., + * when compressing group metadata) and if the can apply and set local + * callback functions have been defined for that filter, HDF5 passes + * the value -1 for all parameters for those callback functions. This + * is done to ensure that the filter will not be applied to groups if + * it relies on these parameters, as they are not applicable to group + * fractal heaps; to operate on group fractal heaps, a filter must be + * capable of operating on an opaque block of binary data. + * + * The \Emph{can apply} callback function must return a positive value + * for a valid combination, zero for an invalid combination, and a + * negative value for an error. + * \snippet this H5Z_can_apply_func_t_snip + * + * Before a dataset is created, the \Emph{can apply} callbacks for any + * filters used in the dataset creation property list are called with + * the dataset's dataset creation property list, \c dcpl_id, the + * dataset's datatype, \p type_id, and a dataspace describing a chunk, + * \p space_id, (for chunked dataset storage). + * + * This callback must determine whether the combination of the dataset + * creation property list settings, the datatype, and the dataspace + * represent a valid combination to which to apply this filter. For + * example, an invalid combination may involve the filter not + * operating correctly on certain datatypes, on certain datatype + * sizes, or on certain sizes of the chunk dataspace. If this filter + * is enabled through H5Pset_filter() as optional and the can apply + * function returns 0, the library will skip the filter in the filter + * pipeline. + * + * This callback can be the NULL pointer, in which case the library + * will assume that the filter can be applied to a dataset with any + * combination of dataset creation property list values, datatypes, + * and dataspaces. + * + * The \Emph{set local} callback function is defined as follows: + * \snippet this H5Z_set_local_func_t_snip + * + * After the can apply callbacks are checked for a new dataset, the + * \Emph{set local} callback functions for any filters used in the + * dataset creation property list are called. These callbacks receive + * \c dcpl_id, the dataset's private copy of the dataset creation + * property list passed in to H5Dcreate() (i.e. not the actual + * property list passed in to H5Dcreate()); \c type_id, the datatype + * identifier passed in to H5Dcreate(), which is not copied and should + * not be modified; and \c space_id, a dataspace describing the chunk + * (for chunked dataset storage), which should also not be modified. + * + * The set local callback must set any filter parameters that are + * specific to this dataset, based on the combination of the dataset + * creation property list values, the datatype, and the dataspace. For + * example, some filters perform different actions based on different + * datatypes, datatype sizes, numbers of dimensions, or dataspace + * sizes. + * + * The \Emph{set local} callback may be the NULL pointer, in which + * case, the library will assume that there are no dataset-specific + * settings for this filter. + * + * The \Emph{set local} callback function must return a non-negative + * value on success and a negative value for an error. + * + * The \Emph{filter operation} callback function, defining the + * filter's operation on the data, is defined as follows: + * \snippet this H5Z_func_t_snip + * + * The parameters \c flags, \c cd_nelmts, and \c cd_values are the + * same as for the function H5Pset_filter(). The one exception is that + * an additional flag, #H5Z_FLAG_REVERSE, is set when the filter is + * called as part of the input pipeline. + * + * The parameter \c buf points to the input buffer which has a size of + * \c buf_size bytes, \c nbytes of which are valid data. + * + * The filter should perform the transformation in place if possible. + * If the transformation cannot be done in place, then the filter + * should allocate a new buffer with malloc() and assign it to \c buf, + * assigning the allocated size of that buffer to \c buf_size. The old + * buffer should be freed by calling free(). + * + * If successful, the \Emph{filter operation} callback function + * returns the number of valid bytes of data contained in \c buf. In + * the case of failure, the return value is 0 (zero) and all pointer + * arguments are left unchanged. + * + * \version 1.8.6 Return type for the \Emph{can apply} callback function, + * \ref H5Z_can_apply_func_t, changed to \ref htri_t. + * \version 1.8.5 Semantics of the \Emph{can apply} and \Emph{set local} + * callback functions changed to accommodate the use of filters + * with group fractal heaps. + * \version 1.8.3 #H5Z_class_t renamed to H5Z_class2_t, H5Z_class1_t structure + * introduced for backwards compatibility with release 1.6.x, + * and #H5Z_class_t macro introduced in this release. Function + * modified to accept either structure type. + * \version 1.8.0 The fields \c version, \c encoder_present, and + * \c decoder_present were added to the #H5Z_class_t \c struct + * in this release. + * \version 1.6.0 This function was substantially revised in Release 1.6.0 with + * a new #H5Z_class_t struct and new set local and can apply + * callback functions. + * + */ H5_DLL herr_t H5Zregister(const void *cls); +/** + * \ingroup H5Z + * + * \brief Unregisters a filter. + * + * \param[in] id Identifier of the filter to be unregistered. + * \return \herr_t + * + * \details H5Zunregister() unregisters the filter specified in \p id. + * + * \details This function first iterates through all opened datasets and + * groups. If an open object that uses this filter is found, the + * function will fail with a message indicating that an object using + * the filter is still open. All open files are then flushed to make + * sure that all cached data that may use this filter are written out. + * + * If the application is a parallel program, all processes that + * participate in collective data write should call this function to + * ensure that all data is flushed. + * + * After a call to H5Zunregister(), the filter specified in filter + * will no longer be available to the application. + * + * \version 1.8.12 Function modified to check for open objects using the + * filter. + * \since 1.6.0 + */ H5_DLL herr_t H5Zunregister(H5Z_filter_t id); +/** + * \ingroup H5Z + * + * \brief Determines whether a filter is available + * + * \param[in] id Filter identifier + * \return \htri_t + * + * \details H5Zfilter_avail() determines whether the filter specified in \p id + * is available to the application. + * + * \since 1.6.0 + */ H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id); +/** + * \ingroup H5Z + * + * \brief Retrieves information about a filter + * + * \param[in] filter Filter identifier + * \param[out] filter_config_flags A bit field encoding the returned filter + * information + * \return \herr_t + * + * \details H5Zget_filter_info() retrieves information about a filter. At + * present, this means that the function retrieves a filter's + * configuration flags, indicating whether the filter is configured to + * decode data, to encode data, neither, or both. + * + * If \p filter_config_flags is not set to NULL prior to the function + * call, the returned parameter contains a bit field specifying the + * available filter configuration. The configuration flag values can + * then be determined through a series of bitwise AND operations, as + * described below. + * + * Valid filter configuration flags include the following: + * + * + * + * + * + *
    #H5Z_FILTER_CONFIG_ENCODE_ENABLEDEncoding is enabled for this filter
    #H5Z_FILTER_CONFIG_DECODE_ENABLEDDecoding is enabled for this filter
    + * + * A bitwise AND of the returned \p filter_config_flags and a valid + * filter configuration flag will reveal whether the related + * configuration option is available. For example, if the value of + * \code + * H5Z_FILTER_CONFIG_ENCODE_ENABLED & filter_config_flags + * \endcode + * is true, i.e., greater than 0 (zero), the queried filter + * is configured to encode data; if the value is \c FALSE, i.e., equal to + * 0 (zero), the filter is not so configured. + * + * If a filter is not encode-enabled, the corresponding \c H5Pset_* + * function will return an error if the filter is added to a dataset + * creation property list (which is required if the filter is to be + * used to encode that dataset). For example, if the + * #H5Z_FILTER_CONFIG_ENCODE_ENABLED flag is not returned for the SZIP + * filter, #H5Z_FILTER_SZIP, a call to H5Pset_szip() will fail. + * + * If a filter is not decode-enabled, the application will not be able + * to read an existing file encoded with that filter. + * + * This function should be called, and the returned \p + * filter_config_flags analyzed, before calling any other function, + * such as H5Pset_szip() , that might require a particular filter + * configuration. + * + * \since 1.6.3 + */ H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags); /* Symbols defined for compatibility with previous versions of the HDF5 API. @@ -224,17 +668,19 @@ H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_confi */ #ifndef H5_NO_DEPRECATED_SYMBOLS -/* +/** * The filter table maps filter identification numbers to structs that * contain a pointers to the filter function and timing statistics. */ +//! typedef struct H5Z_class1_t { - H5Z_filter_t id; /* Filter ID number */ - const char * name; /* Comment for debugging */ - H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */ - H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */ - H5Z_func_t filter; /* The actual filter function */ + H5Z_filter_t id; /**< Filter ID number */ + const char * name; /**< Comment for debugging */ + H5Z_can_apply_func_t can_apply; /**< The "can apply" callback for a filter */ + H5Z_set_local_func_t set_local; /**< The "set local" callback for a filter */ + H5Z_func_t filter; /**< The actual filter function */ } H5Z_class1_t; +//! #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5module.h b/src/H5module.h new file mode 100644 index 00000000000..96bead8c828 --- /dev/null +++ b/src/H5module.h @@ -0,0 +1,34 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the COPYING file, which can be found at the root of the source code * + * distribution tree, or in https://www.hdfgroup.org/licenses. * + * If you do not have access to either file, you may request a copy from * + * help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/* + * Purpose: This file contains declarations which define macros for the + * H5 package. Including this header means that the source file + * is part of the H5 package. + */ +#ifndef H5module_H +#define H5module_H + +/* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error + * reporting macros. + */ +#define H5_MODULE +#define H5_MY_PKG H5 +#define H5_MY_PKG_ERR H5E_LIB +#define H5_MY_PKG_INIT NO + +/**\defgroup H5 H5 + * \brief General Library Functions + * \todo Describe concisely what the functions in this module are about. + */ + +#endif /* H5module_H */ diff --git a/src/H5public.h b/src/H5public.h index 4661ee8ab00..907e162ddfd 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -39,7 +39,7 @@ #endif #ifdef H5_STDC_HEADERS #include /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */ -#include /* For variadic functions in H5VLpublic.h */ +#include /* For variadic functions */ #endif #ifndef __cplusplus #ifdef H5_HAVE_STDINT_H @@ -92,50 +92,130 @@ extern "C" { #endif /* Version numbers */ -#define H5_VERS_MAJOR 1 /* For major interface/format changes */ -#define H5_VERS_MINOR 10 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 8 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "1" /* For pre-releases like snap0 */ -/* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.10.8-1" /* Full version string */ +/** + * For major interface/format changes + */ +#define H5_VERS_MAJOR 1 +/** + * For minor interface/format changes + */ +#define H5_VERS_MINOR 10 +/** + * For tweaks, bug-fixes, or development + */ +#define H5_VERS_RELEASE 8 +/** + * For pre-releases like \c snap0. Empty string for official releases. + */ +#define H5_VERS_SUBRELEASE "1" +/** + * Full version string + */ +#define H5_VERS_INFO "HDF5 library version: 1.10.8-1" #define H5check() H5check_version(H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE) /* macros for comparing the version */ +/** + * \brief Determines whether the version of the library being used is greater + * than or equal to the specified version + * + * \param[in] Maj Major version number - A non-negative integer value + * \param[in] Min Minor version number - A non-negative integer value + * \param[in] Rel Release version number - A non-negative integer value + * \returns A value of 1 is returned if the library version is greater than + * or equal to the version number specified.\n + * A value of 0 is returned if the library version is less than the + * version number specified.\n + * A library version is greater than the specified version number if + * its major version is larger than the specified major version + * number. If the major version numbers are the same, it is greater + * than the specified version number if its minor version is larger + * than the specified minor version number. If the minor version + * numbers are the same, then a library version would be greater than + * the specified version number if its release number is larger than + * the specified release number. + * + * \details The #H5_VERSION_GE and #H5_VERSION_LE macros are used at compile + * time to conditionally include or exclude code based on the version + * of the HDF5 library against which an application will be linked. + * + * The #H5_VERSION_GE macro compares the version of the HDF5 library + * being used against the version number specified in the parameters. + * + * For more information about release versioning, see \ref_h5lib_relver. + * + * \since 1.8.7 + * + */ #define H5_VERSION_GE(Maj, Min, Rel) \ (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE >= Rel)) || \ ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR > Min)) || (H5_VERS_MAJOR > Maj)) +/** + * \brief Determines whether the version of the library being used is less + * than or equal to the specified version + * + * \param[in] Maj Major version number - A non-negative integer value + * \param[in] Min Minor version number - A non-negative integer value + * \param[in] Rel Release version number - A non-negative integer value + * \returns A value of 1 is returned if the library version is less than + * or equal to the version number specified.\n + * A value of 0 is returned if the library version is greater than the + * version number specified.\n + * A library version is less than the specified version number if + * its major version is smaller than the specified major version + * number. If the major version numbers are the same, it is smaller + * than the specified version number if its minor version is smaller + * than the specified minor version number. If the minor version + * numbers are the same, then a library version would be smaller than + * the specified version number if its release number is smaller than + * the specified release number. + * + * \details The #H5_VERSION_GE and #H5_VERSION_LE macros are used at compile + * time to conditionally include or exclude code based on the version + * of the HDF5 library against which an application will be linked. + * + * The #H5_VERSION_LE macro compares the version of the HDF5 library + * being used against the version number specified in the parameters. + * + * For more information about release versioning, see \ref_h5lib_relver. + * + * \since 1.8.7 + * + */ #define H5_VERSION_LE(Maj, Min, Rel) \ (((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR == Min) && (H5_VERS_RELEASE <= Rel)) || \ ((H5_VERS_MAJOR == Maj) && (H5_VERS_MINOR < Min)) || (H5_VERS_MAJOR < Maj)) -/* +/** * Status return values. Failed integer functions in HDF5 result almost * always in a negative value (unsigned failing functions sometimes return * zero for failure) while successful return is non-negative (often zero). * The negative failure value is most commonly -1, but don't bet on it. The * proper way to detect failure is something like: - * - * if((dset = H5Dopen2(file, name)) < 0) - * fprintf(stderr, "unable to open the requested dataset\n"); + * \code + * if((dset = H5Dopen2(file, name)) < 0) + * fprintf(stderr, "unable to open the requested dataset\n"); + * \endcode */ typedef int herr_t; -/* +/** * Boolean type. Successful return values are zero (false) or positive * (true). The typical true value is 1 but don't bet on it. Boolean - * functions cannot fail. Functions that return `htri_t' however return zero + * functions cannot fail. Functions that return #htri_t however return zero * (false), positive (true), or negative (failure). The proper way to test - * for truth from a htri_t function is: - * - * if ((retval = H5Tcommitted(type)) > 0) { - * printf("data type is committed\n"); - * } else if (!retval) { - * printf("data type is not committed\n"); - * } else { - * printf("error determining whether data type is committed\n"); - * } + * for truth from a #htri_t function is: + * \code + * if ((retval = H5Tcommitted(type)) > 0) { + * printf("data type is committed\n"); + * } else if (!retval) { + * printf("data type is not committed\n"); + * } else { + * printf("error determining whether data type is committed\n"); + * } + * \endcode */ #ifdef H5_HAVE_STDBOOL_H #include @@ -304,14 +384,18 @@ typedef unsigned long uint32_t; #error "nothing appropriate for uint32_t" #endif -/* Common iteration orders */ +//! +/** + * Common iteration orders + */ typedef enum { - H5_ITER_UNKNOWN = -1, /* Unknown order */ - H5_ITER_INC, /* Increasing order */ - H5_ITER_DEC, /* Decreasing order */ - H5_ITER_NATIVE, /* No particular order, whatever is fastest */ - H5_ITER_N /* Number of iteration orders */ + H5_ITER_UNKNOWN = -1, /**< Unknown order */ + H5_ITER_INC, /**< Increasing order */ + H5_ITER_DEC, /**< Decreasing order */ + H5_ITER_NATIVE, /**< No particular order, whatever is fastest */ + H5_ITER_N /**< Number of iteration orders */ } H5_iter_order_t; +//! /* Iteration callback values */ /* (Actually, any positive value will cause the iterator to stop and pass back @@ -321,54 +405,451 @@ typedef enum { #define H5_ITER_CONT (0) #define H5_ITER_STOP (1) -/* +//! +/** * The types of indices on links in groups/attributes on objects. * Primarily used for " by index" routines and for iterating over * links in groups/attributes on objects. */ typedef enum H5_index_t { - H5_INDEX_UNKNOWN = -1, /* Unknown index type */ - H5_INDEX_NAME, /* Index on names */ - H5_INDEX_CRT_ORDER, /* Index on creation order */ - H5_INDEX_N /* Number of indices defined */ + H5_INDEX_UNKNOWN = -1, /**< Unknown index type */ + H5_INDEX_NAME, /**< Index on names */ + H5_INDEX_CRT_ORDER, /**< Index on creation order */ + H5_INDEX_N /**< Number of indices defined */ } H5_index_t; +//! -/* +/** * Storage info struct used by H5O_info_t and H5F_info_t */ +//! typedef struct H5_ih_info_t { - hsize_t index_size; /* btree and/or list */ + hsize_t index_size; /**< btree and/or list */ hsize_t heap_size; } H5_ih_info_t; +//! -/* +/** * Allocation statistics info struct */ typedef struct H5_alloc_stats_t { - unsigned long long total_alloc_bytes; /* Running count of total # of bytes allocated */ - size_t curr_alloc_bytes; /* Current # of bytes allocated */ - size_t peak_alloc_bytes; /* Peak # of bytes allocated */ - size_t max_block_size; /* Largest block allocated */ - size_t total_alloc_blocks_count; /* Running count of total # of blocks allocated */ - size_t curr_alloc_blocks_count; /* Current # of blocks allocated */ - size_t peak_alloc_blocks_count; /* Peak # of blocks allocated */ + unsigned long long total_alloc_bytes; /**< Running count of total # of bytes allocated */ + size_t curr_alloc_bytes; /**< Current # of bytes allocated */ + size_t peak_alloc_bytes; /**< Peak # of bytes allocated */ + size_t max_block_size; /**< Largest block allocated */ + size_t total_alloc_blocks_count; /**< Running count of total # of blocks allocated */ + size_t curr_alloc_blocks_count; /**< Current # of blocks allocated */ + size_t peak_alloc_blocks_count; /**< Peak # of blocks allocated */ } H5_alloc_stats_t; /* Functions in H5.c */ +/** + * \ingroup H5 + * \brief Initializes the HDF5 library + * \return \herr_t + * + * \details H5open() initializes the HDF5 library. + * + * \details When the HDF5 library is used in a C application, the library is + * automatically initialized when the first HDf5 function call is + * issued. If one finds that an HDF5 library function is failing + * inexplicably, H5open() can be called first. It is safe to call + * H5open() before an application issues any other function calls to + * the HDF5 library as there are no damaging side effects in calling + * it more than once. + */ H5_DLL herr_t H5open(void); +/** + * \ingroup H5 + * \brief Flushes all data to disk, closes all open objects, and releases memory + * \return \herr_t + * + * \details H5close() flushes all data to disk, closes all open HDF5 objects, + * and cleans up all memory used by the HDF5 library. This function is + * generally called when the application calls exit(), but may be + * called earlier in the event of an emergency shutdown or out of a + * desire to free all resources used by the HDF5 library. + */ H5_DLL herr_t H5close(void); +/** + * \ingroup H5 + * \brief Instructs library not to install atexit() cleanup routine + * \return \herr_t + * + * \details H5dont_atexit() indicates to the library that an atexit() cleanup + * routine should not be installed. The major purpose for using this + * function is in situations where the library is dynamically linked + * into an application and is un-linked from the application before + * exit() gets called. In those situations, a routine installed with + * atexit() would jump to a routine which was no longer in memory, + * causing errors. + * + * \attention In order to be effective, this routine \Emph{must} be called + * before any other HDF5 function calls, and must be called each + * time the library is loaded/linked into the application (the first + * time and after it's been un-loaded). + */ H5_DLL herr_t H5dont_atexit(void); +/** + * \ingroup H5 + * \brief Garbage collects on all free-lists of all types + * \return \herr_t + * + * \details H5garbage_collect() walks through all garbage collection routines + * of the library, freeing any unused memory. + * + * It is not required that H5garbage_collect() be called at any + * particular time; it is only necessary in certain situations where + * the application has performed actions that cause the library to + * allocate many objects. The application should call + * H5garbage_collect() if it eventually releases those objects and + * wants to reduce the memory used by the library from the peak usage + * required. + * + * \note The library automatically garbage collects all the free lists when the + * application ends. + */ H5_DLL herr_t H5garbage_collect(void); +/** + * \ingroup H5 + * \brief Sets free-list size limits + * + * \param[in] reg_global_lim The cumulative limit, in bytes, on memory used for + * all regular free lists (Default: 1MB) + * \param[in] reg_list_lim The limit, in bytes, on memory used for each regular + * free list (Default: 64KB) + * \param[in] arr_global_lim The cumulative limit, in bytes, on memory used for + * all array free lists (Default: 4MB) + * \param[in] arr_list_lim The limit, in bytes, on memory used for each array + * free list (Default: 256KB) + * \param[in] blk_global_lim The cumulative limit, in bytes, on memory used for + * all block free lists and, separately, for all + * factory free lists (Default: 16MB) + * \param[in] blk_list_lim The limit, in bytes, on memory used for each block + * or factory free list (Default: 1MB) + * \return \herr_t + * + * \details H5set_free_list_limits() sets size limits on all types of free + * lists. The HDF5 library uses free lists internally to manage + * memory. The types of free lists used are as follows: + * \li Regular free lists manage memory for single internal data + * structures. + * \li Array free lists manage memory for arrays of internal + * data structures. + * \li Block free lists manage memory for arbitrarily-sized blocks + * of bytes. + * \li Factory free lists manage memory for fixed-size blocks of + * bytes. + * + * The parameters specify global and per-list limits; for example, \p + * reg_global_limit and \p reg_list_limit limit the accumulated size + * of all regular free lists and the size of each individual regular + * free list, respectively. Therefore, if an application sets a 1Mb + * limit on each of the global lists, up to 4Mb of total storage might + * be allocated, 1Mb for each of the regular, array, block, and + * factory type lists. + * + * The settings specified for block free lists are duplicated for + * factory free lists. Therefore, increasing the global limit on block + * free lists by x bytes will increase the potential free list memory + * usage by 2x bytes. + * + * Using a value of -1 for a limit means that no limit is set for the + * specified type of free list. + * + * \version 1.8.3 Function changed in this release to set factory free list + * memory limits. + * + * \since 1.6.0 + */ H5_DLL herr_t H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim); +/** + * \ingroup H5 + * \brief Gets the current size of the free lists used to manage memory + * + * \param[out] reg_size The current size of all "regular" free list memory used + * \param[out] arr_size The current size of all "array" free list memory used + * \param[out] blk_size The current size of all "block" free list memory used + * \param[out] fac_size The current size of all "factory" free list memory used + * \return \herr_t + * + * \details H5get_free_list_sizes() obtains the current size of the different + * kinds of free lists that the library uses to manage memory. The + * free list sizes can be set with H5set_free_list_limits() and + * garbage collected with H5garbage_collect(). These lists are global + * for the entire library. + * + * \since 1.10.7 + */ H5_DLL herr_t H5get_free_list_sizes(size_t *reg_size, size_t *arr_size, size_t *blk_size, size_t *fac_size); +/** + * \ingroup H5 + * \brief Gets the memory allocation statistics for the library + * + * \param[out] stats Memory allocation statistics + * \return \herr_t + * + * \details H5get_alloc_stats() gets the memory allocation statistics for the + * library, if the \c --enable-memory-alloc-sanity-check option was + * given when building the library. Applications can check whether + * this option was enabled detecting if the + * \c H5_MEMORY_ALLOC_SANITY_CHECK macro is defined. This option is + * enabled by default for debug builds of the library and disabled by + * default for non-debug builds. If the option is not enabled, all the + * values returned with be 0. These statistics are global for the + * entire library, but do not include allocations from chunked dataset + * I/O filters or non-native VOL connectors. + * + * \since 1.10.7 + */ H5_DLL herr_t H5get_alloc_stats(H5_alloc_stats_t *stats); +/** + * \ingroup H5 + * \brief Returns the HDF library release number + * + * \param[out] majnum The major version number of the library + * \param[out] minnum The minor version number of the library + * \param[out] relnum The release version number of the library + * \return \herr_t + * + * \details H5get_libversion() retrieves the major, minor, and release numbers + * of the version of the HDF5 library which is linked to the + * application. + * + */ H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum); +/** + * \ingroup H5 + * \brief Verifies that HDF5 library versions are consistent + * + * \param[in] majnum HDF5 library major version number + * \param[in] minnum HDF5 library minor version number + * \param[in] relnum HDF5 library release number + * \return \herr_t + * + * \details H5check_version() verifies that the version of the HDF5 library + * with which an application was compiled, as indicated by the passed + * parameters, matches the version of the HDF5 library against which + * the application is currently linked. + * + * \p majnum is the major version number of the HDF library with which + * the application was compiled, \p minnum is the minor version + * number, and \p relnum is the release number. Consider the following + * example: + * + * An official HDF5 release is labelled as follows: + * HDF5 Release \Code{\.\.\}\n + * For example, in HDF5 Release 1.8.5: + * \li 1 is the major version number, \p majnum. + * \li 8 is the minor version number, \p minnum. + * \li 5 is the release number, \p relnum. + * + * As stated above, H5check_version() first verifies that the version + * of the HDF5 library with which an application was compiled matches + * the version of the HDF5 library against which the application is + * currently linked. If this check fails, H5check_version() causes the + * application to abort (by means of a standard C abort() call) and + * prints information that is usually useful for debugging. This + * precaution is is taken to avoid the risks of data corruption or + * segmentation faults. + * + * The most common cause of this failure is that an application was + * compiled with one version of HDF5 and is dynamically linked with a + * different version different version. + * + * If the above test passes, H5check_version() proceeds to verify the + * consistency of additional library version information. This is + * designed to catch source code inconsistencies that do not normally + * cause failures; if this check reveals an inconsistency, an + * informational warning is printed but the application is allowed to + * run. + * + */ H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); +/** + * \ingroup H5 + * \brief Determines whether the HDF5 library was built with the thread-safety + * feature enabled + * + * \param[out] is_ts Boolean value indicating whether the library was built + * with thread-safety enabled + * \return \herr_t + * + * \details The HDF5 library, although not internally multi-threaded, can be + * built with a thread-safety feature enabled that protects internal + * data structures with a mutex. In certain circumstances, it may be + * useful to determine, at run-time, whether the linked HDF5 library + * was built with the thread-safety feature enabled. + */ H5_DLL herr_t H5is_library_threadsafe(hbool_t *is_ts); +/** + * \ingroup H5 + * \brief Frees memory allocated by the HDF5 library + * + * \param[in] mem Buffer to be freed. Can be NULL + * \return \herr_t + * + * \details H5free_memory() frees memory that has been allocated by the caller + * with H5allocate_memory() or by the HDF5 library on behalf of the + * caller. + * + * H5Tget_member_name() provides an example of memory allocation on + * behalf of the caller: The function returns a buffer containing the + * name of a compound datatype member. It is the caller’s + * responsibility to eventually free that buffer with H5free_memory(). + * + * \attention It is especially important to use this function to free memory + * allocated by the library on Windows. The C standard library is + * implemented in dynamic link libraries (DLLs) known as the C + * run-time (CRT). Each version of Visual Studio comes with two CRT + * DLLs (debug and release) and allocating and freeing across DLL + * boundaries can cause resource leaks and subtle bugs due to heap + * corruption.\n + * Only use this function to free memory allocated by the HDF5 + * Library. It will generally not be safe to use this function to + * free memory allocated by any other means.\n + * Even when using this function, it is still best to ensure that + * all components of a C application are built with the same version + * of Visual Studio and build (debug or release) and thus linked + * against the same CRT. + * + * \see H5allocate_memory(), H5resize_memory() + * + * \since 1.8.13 + * + */ H5_DLL herr_t H5free_memory(void *mem); -H5_DLL void * H5allocate_memory(size_t size, hbool_t clear); -H5_DLL void * H5resize_memory(void *mem, size_t size); +/** + * \ingroup H5 + * \brief Frees memory allocated by the HDF5 library + * + * \param[in] size The size in bytes of the buffer to be allocated + * \param[in] clear Flag whether the new buffer is to be initialized with 0 + * + * \return On success, returns pointer to newly allocated buffer or returns + * NULL if size is 0 (zero).\n + * Returns NULL on failure. + * + * \details H5allocate_memory() allocates a memory buffer of size bytes that + * will later be freed internally by the HDF5 library. + * + * The boolean \p clear parameter specifies whether the buffer should + * be initialized. If clear is \c TRUE, all bits in the buffer are to be + * set to 0 (zero); if clear is \c FALSE, the buffer will not be + * initialized. + * + * This function is intended to have the semantics of malloc() and + * calloc(). However, unlike malloc() and calloc() which allow for a + * "special" pointer to be returned instead of NULL, this function + * always returns NULL on failure or when size is set to 0 (zero). + * + * \note At this time, the only intended use for this function is to allocate + * memory that will be returned to the library as a data buffer from a + * third-party filter. + * + * \attention To avoid heap corruption, allocated memory should be freed using + * the same library that initially allocated it. In most cases, the + * HDF5 API uses resources that are allocated and freed either + * entirely by the user or entirely by the library, so this is not a + * problem. In rare cases, however, HDF5 API calls will free memory + * that the user allocated. This function allows the user to safely + * allocate this memory.\n + * It is particularly important to use this function to allocate + * memory in Microsoft Windows environments. In Windows, the C + * standard library is implemented in dynamic link libraries (DLLs) + * known as the C run-time (CRT). Each version of Visual Studio + * comes with multiple versions of the CRT DLLs (debug, release, et + * cetera) and allocating and freeing memory across DLL boundaries + * can cause resource leaks and subtle bugs due to heap corruption.\n + * Even when using this function, it is best where possible to + * ensure that all components of a C application are built with the + * same version of Visual Studio and configuration (Debug or + * Release), and thus linked against the same CRT.\n + * Use this function only to allocate memory inside third-party HDF5 + * filters. It will generally not be safe to use this function to + * allocate memory for any other purpose. + * + * \see H5free_memory(), H5resize_memory() + * + * \since 1.8.15 + * + */ +H5_DLL void *H5allocate_memory(size_t size, hbool_t clear); +/** + * \ingroup H5 + * \brief Resizes and, if required, re-allocates memory that will later be + * freed internally by the HDF5 library + * + * \param[in] mem Pointer to a buffer to be resized. May be NULL + * \param[in] size New size of the buffer, in bytes + + * + * \return On success, returns pointer to resized or reallocated buffer + * or returns NULL if size is 0 (zero).\n + * Returns NULL on failure. + * + * \details H5resize_memory() takes a pointer to an existing buffer and resizes + * the buffer to match the value in \p size. If necessary, the buffer + * is reallocated. If \p size is 0, the buffer is released. + * + * The input buffer must either be NULL or have been allocated by + * H5allocate_memory() since the input buffer may be freed by the + * library. + * + * For certain behaviors, the pointer \p mem may be passed in as NULL. + * + * This function is intended to have the semantics of realloc(): + * + * + * + * + * + * + * + * + * + * + *
    \Code{H5resize_memory(buffer, size)}Resizes buffer. Returns pointer to resized buffer.
    \Code{H5resize_memory(NULL, size)}Allocates memory using HDF5 Library allocator. + * Returns pointer to new buffer
    \Code{H5resize_memory(buffer, 0)}Frees memory using HDF5 Library allocator. + * Returns NULL.
    \Code{H5resize_memory(NULL, 0)}Returns NULL (undefined in C standard).
    + * + * Unlike realloc(), which allows for a "special pointer to be + * returned instead of NULL, this function always returns NULL on + * failure or when size is 0 (zero). + * + * \note At this time, the only intended use for this function is to resize or + * reallocate memory that will be returned to the library (and eventually + * to the user) as a data buffer from a third-party HDF5 filter. + * + * \attention To avoid heap corruption, allocated memory should be freed using + * the same library that initially allocated it. In most cases, the + * HDF5 API uses resources that are allocated and freed either + * entirely by the user or entirely by the library, so this is not a + * problem. In rare cases, however, HDF5 API calls will free memory + * that the user allocated. This function allows the user to safely + * allocate this memory.\n + * It is particularly important to use this function to resize + * memory on Microsoft Windows systems. In Windows, the C standard + * library is implemented in dynamic link libraries (DLLs) known as + * the C run-time (CRT). Each version of Visual Studio comes with + * multiple versions of the CRT DLLs (debug, release, et cetera) and + * allocating and freeing memory across DLL boundaries can cause + * resource leaks and subtle bugs due to heap corruption.\n + * Even when using this function, it is still best to ensure that + * all components of a C application are built with the same version + * of Visual Studio and the same configuration (Debug or Release), + * and thus linked against the same CRT.\n + * Only use this function to resize memory inside third-party HDF5 + * filters. It will generally not be safe to use this function to + * resize memory for any other purpose. + * + * \see H5allocate_memory(), H5free_memory() + * + * \since 1.8.15 + * + */ +H5_DLL void *H5resize_memory(void *mem, size_t size); #ifdef __cplusplus } diff --git a/src/H5system.c b/src/H5system.c index 14c1b269ac9..144e0bc6a7f 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -25,6 +25,7 @@ /****************/ /* Module Setup */ /****************/ +#include "H5module.h" /* This source code file is part of the H5 module */ /***********/ /* Headers */ From 718395350a9e9ad6393a2048b138f38d5cf0708c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 15:28:26 +0000 Subject: [PATCH 57/66] Committing clang-format changes --- src/H5Dpublic.h | 2 +- src/H5Fpublic.h | 2 +- src/H5Ipublic.h | 32 ++++++++++++++++---------------- src/H5Lpublic.h | 2 +- src/H5Opublic.h | 6 +++--- src/H5public.h | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 6c4d64589b9..c4f4bc3c9ef 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -1107,7 +1107,7 @@ H5_DLL herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_ * frees them from the bottom up, releasing all the memory without * creating memory leaks. * - * \since 1.10.2 + * \since 1.10.2 * */ H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf); diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 1c31a58970d..de0e7623c01 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -255,7 +255,7 @@ extern "C" { * list * * \param[in] filename Name of a file - * + * * \return \htri_t * * \details H5F__is_hdf5() checks if the file specified by \p diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index cfd5b8d5a4d..a6328815c80 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -37,22 +37,22 @@ */ //! typedef enum H5I_type_t { - H5I_UNINIT = (-2), /**< uninitialized type */ - H5I_BADID = (-1), /**< invalid Type */ - H5I_FILE = 1, /**< type ID for File objects */ - H5I_GROUP, /**< type ID for Group objects */ - H5I_DATATYPE, /**< type ID for Datatype objects */ - H5I_DATASPACE, /**< type ID for Dataspace objects */ - H5I_DATASET, /**< type ID for Dataset objects */ - H5I_ATTR, /**< type ID for Attribute objects */ - H5I_REFERENCE, /**< DEPRECATED* type ID for Reference objects */ - H5I_VFL, /**< type ID for virtual file layer */ - H5I_GENPROP_CLS, /**< type ID for generic property list classes */ - H5I_GENPROP_LST, /**< type ID for generic property lists */ - H5I_ERROR_CLASS, /**< type ID for error classes */ - H5I_ERROR_MSG, /**< type ID for error messages */ - H5I_ERROR_STACK, /**< type ID for error stacks */ - H5I_NTYPES /**< number of library types, MUST BE LAST! */ + H5I_UNINIT = (-2), /**< uninitialized type */ + H5I_BADID = (-1), /**< invalid Type */ + H5I_FILE = 1, /**< type ID for File objects */ + H5I_GROUP, /**< type ID for Group objects */ + H5I_DATATYPE, /**< type ID for Datatype objects */ + H5I_DATASPACE, /**< type ID for Dataspace objects */ + H5I_DATASET, /**< type ID for Dataset objects */ + H5I_ATTR, /**< type ID for Attribute objects */ + H5I_REFERENCE, /**< DEPRECATED* type ID for Reference objects */ + H5I_VFL, /**< type ID for virtual file layer */ + H5I_GENPROP_CLS, /**< type ID for generic property list classes */ + H5I_GENPROP_LST, /**< type ID for generic property lists */ + H5I_ERROR_CLASS, /**< type ID for error classes */ + H5I_ERROR_MSG, /**< type ID for error messages */ + H5I_ERROR_STACK, /**< type ID for error stacks */ + H5I_NTYPES /**< number of library types, MUST BE LAST! */ } H5I_type_t; //! diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 45ea94b82d0..5eaab49b56b 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -1182,7 +1182,7 @@ H5_DLL herr_t H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, * */ H5_DLL herr_t H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, - H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id); + H5_iter_order_t order, H5L_iterate_t op, void *op_data, hid_t lapl_id); /* UD link functions */ /** diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 1c33fec22e5..3cb73723874 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -1116,7 +1116,7 @@ H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comm * */ H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, - void *op_data, unsigned fields); + void *op_data, unsigned fields); /** *------------------------------------------------------------------------- * \ingroup H5O @@ -1245,8 +1245,8 @@ H5_DLL herr_t H5Ovisit2(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order * */ H5_DLL herr_t H5Ovisit_by_name2(hid_t loc_id, const char *obj_name, H5_index_t idx_type, - H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields, - hid_t lapl_id); + H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields, + hid_t lapl_id); /** *------------------------------------------------------------------------- * \ingroup H5O diff --git a/src/H5public.h b/src/H5public.h index 907e162ddfd..888dc3199be 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -95,15 +95,15 @@ extern "C" { /** * For major interface/format changes */ -#define H5_VERS_MAJOR 1 +#define H5_VERS_MAJOR 1 /** * For minor interface/format changes */ -#define H5_VERS_MINOR 10 +#define H5_VERS_MINOR 10 /** * For tweaks, bug-fixes, or development */ -#define H5_VERS_RELEASE 8 +#define H5_VERS_RELEASE 8 /** * For pre-releases like \c snap0. Empty string for official releases. */ From 1974868284f9fe4049b8d394f35f6dcd6154c0c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 May 2021 10:24:39 -0500 Subject: [PATCH 58/66] Merge CMake fortran ninja changes from dev --- fortran/src/CMakeLists.txt | 10 +++++----- fortran/test/CMakeLists.txt | 4 ++-- hl/fortran/src/CMakeLists.txt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index fd11c39f4c2..cb83fd1193a 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -74,7 +74,7 @@ add_executable (H5match_types target_include_directories (H5match_types PRIVATE "${HDF5_SRC_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") add_custom_command (TARGET H5match_types POST_BUILD - BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types @@ -82,7 +82,7 @@ add_custom_command (TARGET H5match_types POST_BUILD if (NOT ONLY_SHARED_LIBS) add_custom_command (TARGET H5match_types POST_BUILD - BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h COMMAND ${CMAKE_COMMAND} @@ -95,7 +95,7 @@ if (NOT ONLY_SHARED_LIBS) endif () if (BUILD_SHARED_LIBS) add_custom_command (TARGET H5match_types POST_BUILD - BYPRODUCTS H5f90i_gen.h H5fortran_types.F90 + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h COMMAND ${CMAKE_COMMAND} @@ -235,7 +235,7 @@ add_custom_command (TARGET H5_buildiface POST_BUILD ) if (NOT ONLY_SHARED_LIBS) add_custom_command (TARGET H5_buildiface POST_BUILD - BYPRODUCTS H5_gen.F90 + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static @@ -250,7 +250,7 @@ endif () if (BUILD_SHARED_LIBS) add_custom_command (TARGET H5_buildiface POST_BUILD - BYPRODUCTS H5_gen.F90 + BYPRODUCTS ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${HDF5_F90_BINARY_DIR}/H5_gen.F90 ${HDF5_F90_BINARY_DIR}/shared/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 0dea405004f..1df9edc1f56 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -92,7 +92,7 @@ endif () if (NOT BUILD_SHARED_LIBS) add_custom_command (TARGET H5_test_buildiface POST_BUILD - BYPRODUCTS tf_gen.F90 + BYPRODUCTS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static DEPENDS H5_test_buildiface @@ -104,7 +104,7 @@ if (NOT BUILD_SHARED_LIBS) set_source_files_properties (${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90 PROPERTIES GENERATED TRUE) else () add_custom_command (TARGET H5_test_buildiface POST_BUILD - BYPRODUCTS tf_gen.F90 + BYPRODUCTS ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared/tf_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared DEPENDS H5_test_buildiface diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 6c97886f9fb..973299f9ed6 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -115,7 +115,7 @@ set (HDF5_HL_F90_F_BASE_SOURCES if (NOT ONLY_SHARED_LIBS) add_custom_command (TARGET H5HL_buildiface POST_BUILD - BYPRODUCTS $H5LTff_gen.F90 H5TBff_gen.F90 + BYPRODUCTS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} @@ -132,7 +132,7 @@ if (NOT ONLY_SHARED_LIBS) endif () if (BUILD_SHARED_LIBS) add_custom_command (TARGET H5HL_buildiface POST_BUILD - BYPRODUCTS H5LTff_gen.F90 H5TBff_gen.F90 + BYPRODUCTS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} From 27e06cbd3c817b6e1f1fa43df2fec4408b6fe368 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 May 2021 10:25:34 -0500 Subject: [PATCH 59/66] Enable fortran to gcc yaml --- .github/workflows/main.yml | 2 +- .github/workflows/pr-check.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 78e111535b0..ae429a2dfc1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: os: ubuntu-latest build_type: "Release" cpp: ON - fortran: OFF + fortran: ON java: ON ts: OFF hl: ON diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index b50bf59933a..0acaf2d2860 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -31,7 +31,7 @@ jobs: os: ubuntu-latest build_type: "Release" cpp: ON - fortran: OFF + fortran: ON java: ON ts: OFF hl: ON From a8185a78baf47e940b3b2266d35fa899b0eb016c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 8 Jun 2021 12:00:51 -0500 Subject: [PATCH 60/66] Refactor Fortran CMake config tests and CMake test args --- config/cmake/ConfigureChecks.cmake | 115 ++++++++++- config/cmake/H5pubconf.h.in | 20 +- config/cmake/HDF5UseFortran.cmake | 223 ++------------------- config/cmake/HDFCXXCompilerFlags.cmake | 18 +- config/cmake/HDFCompilerFlags.cmake | 22 +- config/cmake/HDFFortranCompilerFlags.cmake | 14 +- release_docs/RELEASE.txt | 16 ++ tools/test/h5copy/CMakeTests.cmake | 22 +- tools/test/h5diff/CMakeTests.cmake | 2 +- tools/test/h5ls/CMakeTests.cmake | 4 +- tools/test/h5ls/CMakeTestsVDS.cmake | 4 +- 11 files changed, 197 insertions(+), 263 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0d826689cb1..6f005ad683c 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -221,18 +221,125 @@ endif() # Check if C has __float128 extension #----------------------------------------------------------------------------- -CHECK_TYPE_SIZE("__float128" ${HDF_PREFIX}_SIZEOF___FLOAT128) -if (${${HDF_PREFIX}_SIZEOF___FLOAT128}) +HDF_CHECK_TYPE_SIZE(__float128 _SIZEOF___FLOAT128) +if (${_SIZEOF___FLOAT128}) set (${HDF_PREFIX}_HAVE_FLOAT128 1) + set (${HDF_PREFIX}_SIZEOF___FLOAT128 ${_SIZEOF___FLOAT128}) else () set (${HDF_PREFIX}_HAVE_FLOAT128 0) set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) endif () -CHECK_TYPE_SIZE("_Quad" ${HDF_PREFIX}_SIZEOF__QUAD) -if (NOT ${${HDF_PREFIX}_SIZEOF__QUAD}) +HDF_CHECK_TYPE_SIZE(_Quad _SIZEOF__QUAD) +if (NOT ${_SIZEOF__QUAD}) set (${HDF_PREFIX}_SIZEOF__QUAD 0) +else () + set (${HDF_PREFIX}_SIZEOF__QUAD ${_SIZEOF__QUAD}) +endif () + +#----------------------------------------------------------------------------- +# The provided CMake C macros don't provide a general compile/run function +# so this one is used. +#----------------------------------------------------------------------------- +macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Detecting C ${FUNCTION_NAME}") + endif () + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + ${SOURCE_CODE} + ) + TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c + COMPILE_DEFINITIONS "-D_SIZEOF___FLOAT128=${H5_SIZEOF___FLOAT128};-D_HAVE_QUADMATH_H=${H5_HAVE_QUADMATH_H}" + COMPILE_OUTPUT_VARIABLE COMPILEOUT + RUN_OUTPUT_VARIABLE OUTPUT_VAR + ) + + set (${RETURN_VAR} ${OUTPUT_VAR}) + + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") + message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ") + message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") + message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + endif () + + if (${COMPILE_RESULT_VAR}) + if (${RUN_RESULT_VAR} MATCHES 0) + set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - OK") + endif () + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n" + "${OUTPUT_VAR}\n\n" + ) + else () + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") + message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail") + endif () + set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n" + "${OUTPUT_VAR}\n\n") + endif () + else () + message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed") + endif () +endmacro () + +set (PROG_SRC + " +#include \n\ +#include \n\ +#define CHECK_FLOAT128 _SIZEOF___FLOAT128\n\ +#if CHECK_FLOAT128!=0\n\ +#if _HAVE_QUADMATH_H!=0\n\ +#include \n\ +#endif\n\ +#ifdef FLT128_DIG\n\ +#define C_FLT128_DIG FLT128_DIG\n\ +#else\n\ +#define C_FLT128_DIG 0\n\ +#endif\n\ +#else\n\ +#define C_FLT128_DIG 0\n\ +#endif\n\ +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n\ +#define C_LDBL_DIG DECIMAL_DIG\n\ +#else\n\ +#define C_LDBL_DIG LDBL_DIG\n\ +#endif\n\nint main() {\nFILE *pFile = fopen(\"pac_Cconftest.out\",\"w\")\\\;\nfprintf(pFile, \"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n + " +) + +C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES) +file (READ "${CMAKE_BINARY_DIR}/pac_Cconftest.out" PROG_OUTPUT4) +message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}") + +# dnl The output from the above program will be: +# dnl -- long double decimal precision -- __float128 decimal precision + +list (GET PROG_OUTPUT4 0 H5_LDBL_DIG) +list (GET PROG_OUTPUT4 1 H5_FLT128_DIG) + +if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) + set (${HDF_PREFIX}_HAVE_FLOAT128 0) + set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) + set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG}) +else () + set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG}) +endif () +if (NOT ${_PAC_C_MAX_REAL_PRECISION}) + set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0) +else () + set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION}) endif () +message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}") #----------------------------------------------------------------------------- # Macro to determine the various conversion capabilities diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 59f0dca47be..00d80974f87 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -32,7 +32,7 @@ /* Define the default plugins path to compile */ #cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@" -/* Define if `dev_t' is a scalar */ +/* Define if dev_t is a scalar */ #cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@ /* Define to dummy `main' function (if any) required to link to the Fortran @@ -88,6 +88,9 @@ /* Define to 1 if you have the `alarm' function. */ #cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ +/* Define to 1 if you have the header file. */ +#cmakedefine H5_HAVE_ARPA_INET_H @H5_HAVE_ARPA_INET_H@ + /* Define to 1 if you have the `asprintf' function. */ #cmakedefine H5_HAVE_ASPRINTF @H5_HAVE_ASPRINTF@ @@ -101,9 +104,6 @@ /* Define if the compiler understands the __func__ keyword */ #cmakedefine H5_HAVE_C99_FUNC @H5_HAVE_C99_FUNC@ -/* Define to 1 if you have the header file. */ -#cmakedefine H5_HAVE_ARPA_INET_H @H5_HAVE_ARPA_INET_H@ - /* Define to 1 if you have the `clock_gettime' function. */ #cmakedefine H5_HAVE_CLOCK_GETTIME @H5_HAVE_CLOCK_GETTIME@ @@ -267,7 +267,7 @@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@ -/* Define if we can build the Mirror VFD */ +/* Define whether the Mirror virtual file driver (VFD) will be compiled */ #cmakedefine H5_HAVE_MIRROR_VFD @H5_HAVE_MIRROR_VFD@ /* Define if we have MPE support */ @@ -276,10 +276,10 @@ /* Define to 1 if you have the header file. */ #cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@ -/* Define if MPI_Comm_c2f and MPI_Comm_f2c exists */ +/* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@ -/* Define if MPI_Info_c2f and MPI_Info_f2c exists */ +/* Define if MPI_Info_c2f and MPI_Info_f2c exist */ #cmakedefine H5_HAVE_MPI_MULTI_LANG_Info @H5_HAVE_MPI_MULTI_LANG_Info@ /* Define to 1 if you have the header file. */ @@ -483,7 +483,7 @@ /* Define if the compiler understands __inline__ */ #cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@ -/* Define if the library will ignore file locks when disabled */ +/* Define if the library will ignore file locks when disabled */ #cmakedefine H5_IGNORE_DISABLED_FILE_LOCKS @H5_IGNORE_DISABLED_FILE_LOCKS@ /* Define if the high-level library headers should be included in hdf5.h */ @@ -542,10 +542,10 @@ #define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION_STRING@" /* Determine the maximum decimal precision in C */ -#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ +#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@ /* Define Fortran Maximum Real Decimal Precision */ -#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ +#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ /* Width for printf() for type `long long' or `__int64', use `ll' */ #cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@ diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 003f24fcd09..e192ec4dd65 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -129,74 +129,12 @@ endif () # Determine the available KINDs for REALs and INTEGERs #----------------------------------------------------------------------------- -#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE) -set (PROG_SRC_CODE - " - PROGRAM FC_AVAIL_KINDS - IMPLICIT NONE - INTEGER :: ik, jk, k, max_decimal_prec - INTEGER :: num_rkinds = 1, num_ikinds = 1 - INTEGER, DIMENSION(1:10) :: list_ikinds = -1 - INTEGER, DIMENSION(1:10) :: list_rkinds = -1 - - OPEN(8, FILE='pac_fconftest.out', FORM='formatted') - - ! Find integer KINDs - list_ikinds(num_ikinds)=SELECTED_INT_KIND(1) - DO ik = 2, 36 - k = SELECTED_INT_KIND(ik) - IF(k.LT.0) EXIT - IF(k.GT.list_ikinds(num_ikinds))THEN - num_ikinds = num_ikinds + 1 - list_ikinds(num_ikinds) = k - ENDIF - ENDDO - - DO k = 1, num_ikinds - WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k) - IF(k.NE.num_ikinds)THEN - WRITE(8,'(A)',ADVANCE='NO') ',' - ELSE - WRITE(8,'()') - ENDIF - ENDDO - - ! Find real KINDs - list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1) - max_decimal_prec = 1 - - prec: DO ik = 2, 36 - exp: DO jk = 1, 17000 - k = SELECTED_REAL_KIND(ik,jk) - IF(k.LT.0) EXIT exp - IF(k.GT.list_rkinds(num_rkinds))THEN - num_rkinds = num_rkinds + 1 - list_rkinds(num_rkinds) = k - ENDIF - max_decimal_prec = ik - ENDDO exp - ENDDO prec - - DO k = 1, num_rkinds - WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k) - IF(k.NE.num_rkinds)THEN - WRITE(8,'(A)',ADVANCE='NO') ',' - ELSE - WRITE(8,'()') - ENDIF - ENDDO - - WRITE(8,'(I0)') max_decimal_prec - WRITE(8,'(I0)') num_ikinds - WRITE(8,'(I0)') num_rkinds - END PROGRAM FC_AVAIL_KINDS - " -) +READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE) if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") - check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90) + check_fortran_source_runs (${SOURCE_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90) else () FORTRAN_RUN ("REAL and INTEGER KINDs" - "${PROG_SRC_CODE}" + "${SOURCE_CODE}" XX YY FC_AVAIL_KINDS_RESULT @@ -260,7 +198,7 @@ foreach (KIND ${VAR}) USE ISO_C_BINDING IMPLICIT NONE INTEGER (KIND=${KIND}) a - OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted') + OPEN(8,FILE='pac_validIntKinds.${KIND}.out',FORM='formatted') WRITE(8,'(I0)') ${FC_SIZEOF_A} CLOSE(8) END @@ -271,7 +209,7 @@ foreach (KIND ${VAR}) else () FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND}) endif () - file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1) + file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.${KIND}.out" PROG_OUTPUT1) string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},") endforeach () @@ -309,7 +247,7 @@ foreach (KIND ${VAR} ) USE ISO_C_BINDING IMPLICIT NONE REAL (KIND=${KIND}) a - OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted') + OPEN(8,FILE='pac_validRealKinds.${KIND}.out',FORM='formatted') WRITE(8,'(I0)') ${FC_SIZEOF_A} CLOSE(8) END @@ -320,7 +258,7 @@ foreach (KIND ${VAR} ) else () FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND}) endif () - file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1) + file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.${KIND}.out" PROG_OUTPUT1) string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}") set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},") endforeach () @@ -375,7 +313,7 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") else () FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT) endif () -file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT) +file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT3) # dnl The output from the above program will be: # dnl -- LINE 1 -- sizeof INTEGER # dnl -- LINE 2 -- kind of INTEGER @@ -385,14 +323,14 @@ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT) # dnl -- LINE 6 -- kind of DOUBLE PRECISION # Convert the string to a list of strings by replacing the carriage return with a semicolon -string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") +string (REGEX REPLACE "\n" ";" PROG_OUTPUT3 "${PROG_OUTPUT3}") -list (GET PROG_OUTPUT 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) -list (GET PROG_OUTPUT 1 PAC_FORTRAN_NATIVE_INTEGER_KIND) -list (GET PROG_OUTPUT 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF) -list (GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND) -list (GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) -list (GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) +list (GET PROG_OUTPUT3 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) +list (GET PROG_OUTPUT3 1 PAC_FORTRAN_NATIVE_INTEGER_KIND) +list (GET PROG_OUTPUT3 2 PAC_FORTRAN_NATIVE_REAL_SIZEOF) +list (GET PROG_OUTPUT3 3 PAC_FORTRAN_NATIVE_REAL_KIND) +list (GET PROG_OUTPUT3 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF) +list (GET PROG_OUTPUT3 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND) if (NOT PAC_FORTRAN_NATIVE_INTEGER_SIZEOF) message (FATAL_ERROR "Failed to find SIZEOF NATIVE INTEGER KINDs for Fortran") @@ -434,132 +372,13 @@ endif () set (${HDF_PREFIX}_H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") -string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS}) -string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) -set (${HDF_PREFIX}_H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR}/)") - -string (REGEX REPLACE "{" "" OUT_VAR ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) -string (REGEX REPLACE "}" "" OUT_VAR ${OUT_VAR}) -set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR}/)") - -ENABLE_LANGUAGE (C) - -if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") - include (CheckCSourceRuns) -else () -#----------------------------------------------------------------------------- -# The provided CMake C macros don't provide a general compile/run function -# so this one is used. -#----------------------------------------------------------------------------- -macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Detecting C ${FUNCTION_NAME}") - endif () - if (HDF5_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") - else () - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - endif () - file (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c - ${SOURCE_CODE} - ) - TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - RUN_OUTPUT_VARIABLE OUTPUT_VAR - ) - - set (${RETURN_VAR} ${OUTPUT_VAR}) - - #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") - # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") - # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #endif () - - if (${COMPILE_RESULT_VAR}) - if (${RUN_RESULT_VAR} MATCHES 1) - set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Testing C ${FUNCTION_NAME} - OK") - endif () - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n" - "${OUTPUT_VAR}\n\n" - ) - else () - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail") - endif () - set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}") - file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n" - "${OUTPUT_VAR}\n\n") - endif () - else () - message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed") - endif () -endmacro () -endif () - -set (PROG_SRC - " -#include -#include -#define CHECK_FLOAT128 ${${HDF_PREFIX}_SIZEOF___FLOAT128} -#if CHECK_FLOAT128!=0 -# if ${${HDF_PREFIX}_HAVE_QUADMATH_H}!=0 -#include -# endif -# ifdef FLT128_DIG -#define C_FLT128_DIG FLT128_DIG -# else -#define C_FLT128_DIG 0 -# endif -#else -#define C_FLT128_DIG 0 -#endif -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define C_LDBL_DIG DECIMAL_DIG -#else -#define C_LDBL_DIG LDBL_DIG -#endif - int main() { - printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\; - return 1\\\; - } - " -) - -if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") - check_c_source_runs (${PROG_SRC} PROG_OUTPUT) -else () - C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT) -endif () - -# dnl The output from the above program will be: -# dnl -- LINE 1 -- long double decimal precision -# dnl -- LINE 2 -- __float128 decimal precision - -# Convert the string to a list of strings by replacing the carriage return with a semicolon -string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}") - -list (GET PROG_OUTPUT 0 LDBL_DIG) -list (GET PROG_OUTPUT 1 FLT128_DIG) - -if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0) - set (${HDF_PREFIX}_HAVE_FLOAT128 0) - set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) - set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG}) -else () - set(${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG}) -endif () +string (REGEX REPLACE "{" "" OUT_VAR1 ${PAC_FC_ALL_REAL_KINDS}) +string (REGEX REPLACE "}" "" OUT_VAR1 ${OUT_VAR1}) +set (${HDF_PREFIX}_H5CONFIG_F_RKIND "INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/${OUT_VAR1}/)") +string (REGEX REPLACE "{" "" OUT_VAR2 ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) +string (REGEX REPLACE "}" "" OUT_VAR2 ${OUT_VAR2}) +set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR2}/)") # Setting definition if there is a 16 byte fortran integer string (FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos) diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 757692c3313..8bcfb14f09f 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -71,10 +71,6 @@ endif () # HDF5 library compile options #----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- -# CDash is configured to only allow 3000 warnings, so -# break into groups (from the config/gnu-flags file) -#----------------------------------------------------------------------------- if (NOT MSVC AND NOT MINGW) if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP") @@ -147,7 +143,7 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") endif () - # Append more extra warning flags that only gcc 4.8+ know about + # Append more extra warning flags that only gcc 4.8+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") if (HDF5_ENABLE_DEV_WARNINGS) @@ -157,14 +153,14 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 4.9+ know about + # Append more extra warning flags that only gcc 4.9+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9") endif () - # Append more extra warning flags that only gcc 5.1+ know about + # Append more extra warning flags that only gcc 5.1+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5") @@ -175,13 +171,13 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 6.x+ know about + # Append more extra warning flags that only gcc 6.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") endif () - # Append more extra warning flags that only gcc 7.x+ know about + # Append more extra warning flags that only gcc 7.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") @@ -193,7 +189,7 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 8.x+ know about + # Append more extra warning flags that only gcc 8.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") @@ -211,7 +207,7 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 9.x+ know about + # Append more extra warning flags that only gcc 9.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) # autotools always add the C flags with the CXX flags ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index bb6ad78ded5..0775f592bb1 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -81,10 +81,6 @@ endif () # HDF5 library compile options #----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- -# CDash is configured to only allow 3000 warnings, so -# break into groups (from the config/gnu-flags file) -#----------------------------------------------------------------------------- if (NOT MSVC AND NOT MINGW) #----------------------------------------------------------------------------- # Option to allow the user to interpret certain warnings as errors @@ -178,7 +174,7 @@ if (NOT MSVC AND NOT MINGW) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") endif () - # Append more extra warning flags that only gcc 4.8+ know about + # Append more extra warning flags that only gcc 4.8+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") if (HDF5_ENABLE_DEV_WARNINGS) @@ -188,12 +184,12 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 4.9+ know about + # Append more extra warning flags that only gcc 4.9+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") endif () - # Append more extra warning flags that only gcc 5.x+ know about + # Append more extra warning flags that only gcc 5.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) @@ -203,12 +199,12 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 6.x+ know about + # Append more extra warning flags that only gcc 6.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") endif () - # Append more extra warning flags that only gcc 7.x+ know about + # Append more extra warning flags that only gcc 7.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") if (HDF5_ENABLE_DEV_WARNINGS) @@ -218,7 +214,7 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 8.x+ know about + # Append more extra warning flags that only gcc 8.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") if (HDF5_ENABLE_WARNINGS_AS_ERRORS) @@ -231,17 +227,17 @@ if (NOT MSVC AND NOT MINGW) endif () endif () - # Append more extra warning flags that only gcc 9.x+ know about + # Append more extra warning flags that only gcc 9.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") endif () - # Append more extra warning flags that only gcc 9.3+ know about + # Append more extra warning flags that only gcc 9.3+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3") endif () - # Append more extra warning flags that only gcc 10.x+ know about + # Append more extra warning flags that only gcc 10.x+ knows about if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) if (HDF5_ENABLE_DEV_WARNINGS) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10") diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake index 8b631ad003d..18ab62186de 100644 --- a/config/cmake/HDFFortranCompilerFlags.cmake +++ b/config/cmake/HDFFortranCompilerFlags.cmake @@ -80,37 +80,37 @@ if (NOT MSVC AND NOT MINGW) if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") - # Append more extra warning flags that only gcc 4.8+ know about + # Append more extra warning flags that only gcc 4.8+ knows about if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8) ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8") endif () - # Append more extra warning flags that only gcc 4.9+ know about + # Append more extra warning flags that only gcc 4.9+ knows about #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.9) # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.9") #endif () - # Append more extra warning flags that only gcc 5.x+ know about + # Append more extra warning flags that only gcc 5.x+ knows about if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0) ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5") endif () - # Append more extra warning flags that only gcc 6.x+ know about + # Append more extra warning flags that only gcc 6.x+ knows about if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0) ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-6") endif () - # Append more extra warning flags that only gcc 7.x+ know about + # Append more extra warning flags that only gcc 7.x+ knows about #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0) # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-7") #endif () - # Append more extra warning flags that only gcc 8.x+ know about + # Append more extra warning flags that only gcc 8.x+ knows about if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0) ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-8") endif () - # Append more extra warning flags that only gcc 9.x+ know about + # Append more extra warning flags that only gcc 9.x+ knows about #if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0) # ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-9") #endif () diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a725c63c134..56db6294f7b 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -395,6 +395,22 @@ Bug Fixes since HDF5-1.10.7 release Configuration ------------- + - Refactor CMake configure for Fortran + + The Fortran configure tests for KINDs reused a single output file that was + read to form the Integer and Real Kinds defines. However, if config was run + more then once, the CMake completed variable prevented the tests from executing + again and the last value saved in the file was used to create the define. + Creating separate files for each KIND solved the issue. + + In addition the test for H5_PAC_C_MAX_REAL_PRECISION was not pulling in + defines for proper operation and did not define H5_PAC_C_MAX_REAL_PRECISION + correctly for a zero value. This was fixed by supplying the required defines. + In addition it was moved from the Fortran specific HDF5UseFortran.camke file + to the C centric ConfigureChecks.cmake file. + + (ADB - 2021/06/03) + - Remove arbitrary warning flag groups from CMake builds The arbitrary groups were created to reduce the quantity of warnings being diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index 73fbda60c0a..e9b36fe3c94 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -76,13 +76,13 @@ endif () # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} EQUAL 2) + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_F-${testname}-DIFF COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname}) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -110,13 +110,13 @@ endif () # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} EQUAL 2) + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -159,13 +159,13 @@ ) set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill) # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} EQUAL 2) + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY-${testname}-DIFF COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname}) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -198,13 +198,13 @@ ) set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill) # resultcode=2 will cause the test to skip the diff test - if (NOT ${resultcode} EQUAL 2) + if (NOT "${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_SAME-${testname}-DIFF COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname} ) set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname}) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () @@ -218,7 +218,7 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true") endif () if (last_test) @@ -255,7 +255,7 @@ NAME H5COPY_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}.out.h5 ) - if (${resultcode} EQUAL 2) + if ("${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_UD-${testname} COMMAND "${CMAKE_COMMAND}" @@ -318,7 +318,7 @@ NAME H5COPY_UD_ERR-${testname}-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}_ERR.out.h5 ) - if (${resultcode} EQUAL 2) + if ("${resultcode}" STREQUAL "2") add_test ( NAME H5COPY_UD_ERR-${testname} COMMAND "${CMAKE_COMMAND}" diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index ff27d496558..b350444719d 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -434,7 +434,7 @@ macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) - if (${resultcode} EQUAL 2) + if ("${resultcode}" STREQUAL "2") add_test ( NAME H5DIFF_UD-${testname} COMMAND "${CMAKE_COMMAND}" diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index 98435ce8e01..cd2f764b236 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -139,7 +139,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () else () @@ -164,7 +164,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () else () diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake index e8b11bf1455..e93e7e7b278 100644 --- a/tools/test/h5ls/CMakeTestsVDS.cmake +++ b/tools/test/h5ls/CMakeTestsVDS.cmake @@ -85,7 +85,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $ ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () else () @@ -112,7 +112,7 @@ ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}" WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" ) - if (${resultcode} EQUAL 1) + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES WILL_FAIL "true") endif () else () From 9cc4fd00a4fd227cad76991735f34260856d7c89 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 15 Jun 2021 08:29:36 -0500 Subject: [PATCH 61/66] Merge warnings files fixes from develop --- MANIFEST | 9 +- config/clang-cxxflags | 12 -- config/clang-warnings/noerror-general | 6 +- config/cmake/HDFCXXCompilerFlags.cmake | 77 +++++----- config/cmake/HDFCompilerFlags.cmake | 11 +- config/gnu-cxxflags | 20 ++- config/gnu-flags | 6 +- config/gnu-warnings/cxx-4.9 | 1 + config/gnu-warnings/cxx-9 | 4 + config/gnu-warnings/developer-10 | 4 - config/gnu-warnings/noerror-general | 6 +- config/intel-cxxflags | 184 ++++++++++++++++++++++++ config/intel-fflags | 62 +++++--- config/intel-flags | 78 +++++++--- config/intel-warnings/15 | 19 +++ config/intel-warnings/18 | 8 ++ config/intel-warnings/developer-general | 4 + config/intel-warnings/general | 1 - config/intel-warnings/general-19 | 2 + config/linux-gnulibc1 | 14 +- config/pgi-cxxflags | 100 +++++++++++++ config/pgi-fflags | 64 ++++++--- config/pgi-flags | 87 +++++------ 23 files changed, 608 insertions(+), 171 deletions(-) create mode 100644 config/gnu-warnings/cxx-9 create mode 100644 config/intel-cxxflags create mode 100644 config/intel-warnings/15 create mode 100644 config/intel-warnings/18 create mode 100644 config/intel-warnings/developer-general create mode 100644 config/intel-warnings/general-19 create mode 100644 config/pgi-cxxflags diff --git a/MANIFEST b/MANIFEST index 258f3403b57..fbbe7a65621 100644 --- a/MANIFEST +++ b/MANIFEST @@ -136,6 +136,7 @@ ./config/cygwin ./config/ibm-aix ./config/ibm-flags +./config/intel-cxxflags ./config/intel-fflags ./config/intel-flags ./config/libhdf5.pc.in @@ -147,6 +148,7 @@ ./config/lt_vers.am ./config/Makefile.am.blank ./config/netbsd +./config/pgi-cxxflags ./config/pgi-fflags ./config/pgi-flags ./config/solaris @@ -172,6 +174,7 @@ ./config/gnu-warnings/cxx-4.8 ./config/gnu-warnings/cxx-4.9 ./config/gnu-warnings/cxx-5 +./config/gnu-warnings/cxx-9 ./config/gnu-warnings/cxx-error-5 ./config/gnu-warnings/cxx-error-general ./config/gnu-warnings/cxx-noerror-5 @@ -196,8 +199,12 @@ ./config/gnu-warnings/noerror-5 ./config/gnu-warnings/noerror-8 ./config/gnu-warnings/noerror-general -./config/intel-warnings/ifort-general +./config/intel-warnings/15 +./config/intel-warnings/18 +./config/intel-warnings/developer-general ./config/intel-warnings/general +./config/intel-warnings/general-19 +./config/intel-warnings/ifort-general ./config/site-specific/BlankForm diff --git a/config/clang-cxxflags b/config/clang-cxxflags index e7ab6d8631c..23ba6a3d1b2 100644 --- a/config/clang-cxxflags +++ b/config/clang-cxxflags @@ -113,18 +113,6 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then ;; esac - case "$host_os-$host_cpu" in - # cygwin needs the "-std=c99" flag removed, so make - # a specific case for Cygwin without the flag and a default - # case to add the flag everywhere else - cygwin-*) - ;; - - *) - H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11" - ;; - esac - H5_CXXFLAGS="$H5_CXXFLAGS $arch" ############## diff --git a/config/clang-warnings/noerror-general b/config/clang-warnings/noerror-general index b570b2384aa..f90c81292c4 100644 --- a/config/clang-warnings/noerror-general +++ b/config/clang-warnings/noerror-general @@ -1,6 +1,8 @@ # -# HDF5 code should not trigger the following warnings under any -# circumstances, so ask the compiler to treat them as errors: +# These warnings will be treated as errors, using the error-general file, +# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or +# the --enable-warnings-as-errors option is specified for configure. +# Otherwise this file will be used to treat them as warnings. # -Wbad-function-cast -Wimplicit-function-declaration diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake index 8bcfb14f09f..64ec0107d2c 100644 --- a/config/cmake/HDFCXXCompilerFlags.cmake +++ b/config/cmake/HDFCXXCompilerFlags.cmake @@ -86,9 +86,11 @@ if (NOT MSVC AND NOT MINGW) # warnings that are emitted. If you need it, add it at configure time. if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general") + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0) + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15") + endif() if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0) - list (APPEND H5_CXXFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") - list (APPEND H5_CXXFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18") endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED @@ -117,21 +119,20 @@ if (NOT MSVC AND NOT MINGW) #----------------------------------------------------------------------------- if (HDF5_ENABLE_DEV_WARNINGS) message (STATUS "....HDF5 developer group warnings are enabled") - # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - # list (APPEND H5_CXXFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing") - # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # autotools always add the C flags with the CXX flags + if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") - # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general") endif () else () if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general") - # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general") endif () endif () @@ -139,14 +140,15 @@ if (NOT MSVC AND NOT MINGW) # Technically, variable-length arrays are part of the C99 standard, but # we should approach them a bit cautiously... Only needed for gcc 4.X if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last") endif () # Append more extra warning flags that only gcc 4.8+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) - ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8") + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.8") if (HDF5_ENABLE_DEV_WARNINGS) + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8") else () ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8") @@ -155,8 +157,7 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 4.9+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) - # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9") + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9") endif () @@ -173,16 +174,16 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 6.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6") endif () # Append more extra warning flags that only gcc 7.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7") if (HDF5_ENABLE_DEV_WARNINGS) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7") #else () # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7") @@ -191,15 +192,15 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 8.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8") - #if (HDF5_ENABLE_WARNINGS_AS_ERRORS) - # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") - #else () - # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") - #endif () + if (HDF5_ENABLE_WARNINGS_AS_ERRORS) + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8") + else () + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8") + endif () if (HDF5_ENABLE_DEV_WARNINGS) - # autotools always add the C flags with the CXX flags + # Use the C warnings as CXX warnings are the same ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8") else () # autotools always add the C flags with the CXX flags @@ -209,14 +210,26 @@ if (NOT MSVC AND NOT MINGW) # Append more extra warning flags that only gcc 9.x+ knows about if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) - # autotools always add the C flags with the CXX flags - ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9") + # Use the C warnings as CXX warnings are the same + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-9") endif () - endif () -else () - if (NOT MINGW) - list (APPEND HDF5_CMAKE_CXX_FLAGS "/EHsc") + + # Append more extra warning flags that only gcc 9.3+ knows about + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3) + # do not use C warnings, gnu-warnings 9.3, no cxx warniings + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3") endif () + + # Append more extra warning flags that only gcc 10.x+ knows about + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) + if (HDF5_ENABLE_DEV_WARNINGS) + # Use the C warnings as CXX warnings are the same + ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10") + #else () + # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10") + endif () + endif () + endif () endif () #----------------------------------------------------------------------------- diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 0775f592bb1..e38a92b76b1 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -108,14 +108,13 @@ if (NOT MSVC AND NOT MINGW) # warnings that are emitted. If you need it, add it at configure time. if (CMAKE_C_COMPILER_ID STREQUAL "Intel") ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general") - list (APPEND H5_CFLAGS "-Wcomment -Wdeprecated -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith") - list (APPEND H5_CFLAGS "-Wreturn-type -Wstrict-prototypes -Wuninitialized") - list (APPEND H5_CFLAGS "-Wunknown-pragmas -Wunused-function -Wunused-variable") + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0) + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15") + endif() # this is just a failsafe list (APPEND H5_CFLAGS "-finline-functions") if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0) - list (APPEND H5_CFLAGS "-Wextra-tokens -Wformat -Wformat-security -Wic-pointer -Wshadow") - list (APPEND H5_CFLAGS "-Wsign-compare -Wtrigraphs -Wwrite-strings") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18") endif() elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU") # Add general CFlags for GCC versions 4.8 and above @@ -153,7 +152,7 @@ if (NOT MSVC AND NOT MINGW) if (HDF5_ENABLE_DEV_WARNINGS) message (STATUS "....HDF5 developer group warnings are enabled") if (CMAKE_C_COMPILER_ID STREQUAL "Intel") - list (APPEND H5_CFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing") + ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general") elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general") elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang") diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index cba8298293e..b2ba08d47ec 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -183,7 +183,6 @@ if test "X-g++" = "X-$cxx_vendor"; then # Warnings # ############ -# First load the C warnings then add CXX warnings (if needed) ########### # General # @@ -199,6 +198,7 @@ if test "X-g++" = "X-$cxx_vendor"; then # Developer warnings # ###################### + # Use the C warnings as CXX warnings are the same NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general) DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general) @@ -210,6 +210,7 @@ if test "X-g++" = "X-$cxx_vendor"; then # GCC 4.8 through the end of GCC 4 series if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then + # Use the C warnings as CXX warnings are the same H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)" fi @@ -220,13 +221,13 @@ if test "X-g++" = "X-$cxx_vendor"; then # gcc >= 4.8 if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)" + # Use the C warnings as CXX warnings are the same DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)" NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)" fi # gcc >= 4.9 if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 9; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.9)" H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.9)" fi @@ -239,27 +240,40 @@ if test "X-g++" = "X-$cxx_vendor"; then # gcc >= 6 if test $cxx_vers_major -ge 6; then + # Use the C warnings as CXX warnings are the same H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 6)" fi # gcc >= 7 if test $cxx_vers_major -ge 7; then + # Use the C warnings as CXX warnings are the same H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 7)" DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-7)" fi # gcc 8 if test $cxx_vers_major -ge 8; then + # Use the C warnings as CXX warnings are the same H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)" #H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)" #H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments noerror-8)" + # Use the C warnings as CXX warnings are the same DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)" NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)" fi # gcc 9 if test $cxx_vers_major -ge 9; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 9)" + H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-9)" + fi + + # gcc >= 9.3 + # no cxx warnings, do NOT use C warnings + + # gcc >= 10 + if test $cxx_vers_major -ge 10; then + # Use the C warnings as CXX warnings are the same + DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)" fi ################# diff --git a/config/gnu-flags b/config/gnu-flags index 01533de30ac..3e4ceb222fc 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -207,9 +207,9 @@ if test "X-gcc" = "X-$cc_vendor"; then H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)" H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-general)" - ###################### - # Developer warnings # - ###################### + ###################### + # Developer warnings # + ###################### NO_DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments no-developer-general) DEVELOPER_WARNING_CFLAGS=$(load_gnu_arguments developer-general) diff --git a/config/gnu-warnings/cxx-4.9 b/config/gnu-warnings/cxx-4.9 index 046d6dbdc08..30553bdab79 100644 --- a/config/gnu-warnings/cxx-4.9 +++ b/config/gnu-warnings/cxx-4.9 @@ -1 +1,2 @@ +-Wdate-time -Wopenmp-simd diff --git a/config/gnu-warnings/cxx-9 b/config/gnu-warnings/cxx-9 new file mode 100644 index 00000000000..8f843a46c23 --- /dev/null +++ b/config/gnu-warnings/cxx-9 @@ -0,0 +1,4 @@ +-Wattribute-alias=2 +-Wmissing-profile +# Turn this on when the C++ wrappers obey the Rule of Five +-Wno-deprecated-copy diff --git a/config/gnu-warnings/developer-10 b/config/gnu-warnings/developer-10 index fcd460dbd38..022c97f9666 100644 --- a/config/gnu-warnings/developer-10 +++ b/config/gnu-warnings/developer-10 @@ -1,6 +1,2 @@ # New warning -Warith-conversion - -# Enable static analysis of program flow --fanalyzer --fdiagnostics-path-format=none diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general index f5b4afbebab..80c197503c7 100644 --- a/config/gnu-warnings/noerror-general +++ b/config/gnu-warnings/noerror-general @@ -1,6 +1,8 @@ # -# HDF5 code should not trigger the following warnings under any -# circumstances, so ask the compiler to treat them as errors: +# These warnings will be treated as errors, using the error-general file, +# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or +# the --enable-warnings-as-errors option is specified for configure. +# Otherwise this file will be used to treat them as warnings. # -Wbad-function-cast -Wimplicit-function-declaration diff --git a/config/intel-cxxflags b/config/intel-cxxflags new file mode 100644 index 00000000000..484100f403f --- /dev/null +++ b/config/intel-cxxflags @@ -0,0 +1,184 @@ +# -*- shell-script -*- +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. + + +# This file should be sourced into configure if the compiler is the +# Intel icpc compiler or a derivative. It is careful not to do anything +# if the compiler is not Intel; otherwise `cxx_flags_set' is set to `yes' +# + +# +# Prepend `$srcdir/config/intel-warnings/` to the filename suffix(es) given as +# subroutine argument(s), remove comments starting with # and ending +# at EOL, replace spans of whitespace (including newlines) with spaces, +# and re-emit the file(s) thus filtered on the standard output stream. +# +load_intel_arguments() +{ + set -- $(for arg; do + sed 's,#.*$,,' $srcdir/config/intel-warnings/${arg} + done) + IFS=' ' echo "$*" +} + +# Get the compiler version in a way that works for icpc +# icpc unless a compiler version is already known +# +# cxx_vendor: The compiler name: icpc +# cxx_version: Version number: 8.0 +# +if test X = "X$cxx_flags_set"; then + cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 |grep 'Version'`" + if test X != "X$cxx_version"; then + cxx_vendor=icpc + cxx_version=`echo $cxx_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'` + echo "compiler '$CXX' is Intel $cxx_vendor-$cxx_version" + + # Some version numbers + # Intel version numbers are of the form: "major.minor" + cxx_vers_major=`echo $cxx_version | cut -f1 -d.` + cxx_vers_minor=`echo $cxx_version | cut -f2 -d.` + #cxx_vers_patch=`echo $cxx_version | cut -f2 -d.` + test -n "$cxx_vers_major" || cxx_vers_major=0 + test -n "$cxx_vers_minor" || cxx_vers_minor=0 + test -n "$cxx_vers_patch" || cxx_vers_patch=0 + cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` + fi +fi + +# Common Intel flags for various situations +if test "X-icpc" = "X-$cxx_vendor"; then + # Insert section about version specific problems from compiler flags here, + # if necessary. + + arch= + # Architecture-specific flags + # Nothing currently. (Uncomment code below and modify to add any) + #case "$host_os-$host_cpu" in + # *-i686) + # arch="-march=i686" + # ;; + #esac + + # Host-specific flags + # Nothing currently. (Uncomment code below and modify to add any) + #case "`hostname`" in + # sleipnir.ncsa.uiuc.edu) + # arch="$arch -pipe" + # ;; + #esac + + ########### + # General # + ########### + + H5_CXXFLAGS="$H5_CXXFLAGS $arch" + + ############## + # Production # + ############## + + PROD_CXXFLAGS= + + ######### + # Debug # + ######### + + # NDEBUG is handled explicitly in configure + # -g is handled by the symbols flags + DEBUG_CXXFLAGS= + + ########### + # Symbols # + ########### + + NO_SYMBOLS_CXXFLAGS="-Wl,-s" + SYMBOLS_CXXFLAGS="-g" + + ############# + # Profiling # + ############# + + PROFILE_CXXFLAGS="-p" + + ################ + # Optimization # + ################ + + HIGH_OPT_CXXFLAGS="-O3" + DEBUG_OPT_CXXFLAGS="-O0" + NO_OPT_CXXFLAGS="-O0" + + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + # Add various general warning flags in intel-warnings. + # Use the C warnings as CXX warnings are the same + H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments general)" + + ###################### + # Developer warnings # + ###################### + + # Use the C warnings as CXX warnings are the same + #NO_DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments no-developer-general) + #DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments developer-general) + + ############################# + # Version-specific warnings # + ############################# + + # intel == 8.0 + if test $cxx_vers_major -eq 8 -a $cxx_vers_minor -eq 0; then + # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. + HIGH_OPT_CFLAGS="-O2" + fi + + # intel == 10 + if test $cxx_vers_major -eq 10; then + HIGH_OPT_CFLAGS="-O1" + fi + + # intel >= 15 + if test $cxx_vers_major -ge 15; then + # Use the C warnings as CXX warnings are the same + H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments 15)" + fi + + # intel >= 18 + if test $cxx_vers_major -ge 18; then + # Use the C warnings as CXX warnings are the same + H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments 18)" + fi + + # intel <= 19 + if test $cxx_vers_major -le 19; then + # Use the C warnings as CXX warnings are the same + H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments general-19)" + fi + + ################# + # Flags are set # + ################# + cxx_flags_set=yes +fi + +# Clear cxx info if no flags set +if test "X-$cxx_flags_set" = "X-"; then + cxx_vendor= + cxx_version= +fi diff --git a/config/intel-fflags b/config/intel-fflags index b759dfac88a..42c17819912 100644 --- a/config/intel-fflags +++ b/config/intel-fflags @@ -56,13 +56,17 @@ if test X = "X$f9x_flags_set"; then fi fi -# Common Intel flags for various situations if test "X-ifort" = "X-$f9x_vendor"; then - # Insert section about version specific problems from compiler flags here, - # if necessary. + + FC_BASENAME=ifort + F9XSUFFIXFLAG="" + FSEARCH_DIRS="" + + ############################### + # Architecture-specific flags # + ############################### arch= - # Architecture-specific flags # Nothing currently. (Uncomment code below and modify to add any) #case "$host_os-$host_cpu" in # *-i686) @@ -78,32 +82,55 @@ if test "X-ifort" = "X-$f9x_vendor"; then # ;; #esac - # General - FC_BASENAME=ifort - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free" - H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)" + ############## + # Production # + ############## - # Production PROD_FCFLAGS= - # Debug + ######### + # Debug # + ######### + DEBUG_FCFLAGS="-check all" - # Symbols - SYMBOLS_FCFLAGS="-g" + ########### + # Symbols # + ########### + NO_SYMBOLS_FCFLAGS= + SYMBOLS_FCFLAGS="-g" + + ############# + # Profiling # + ############# - # Profiling - # Use this for profiling with gprof PROFILE_FCFLAGS="-p" - # Optimization + ################ + # Optimization # + ################ + HIGH_OPT_FCFLAGS="-O3" DEBUG_OPT_FCFLAGS= NO_OPT_FCFLAGS= + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free" + H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)" + + ############################# + # Version-specific warnings # + ############################# + + ################# # Flags are set # ################# @@ -116,4 +143,3 @@ if test "X-$f9x_flags_set" = "X-"; then f9x_version= fi - diff --git a/config/intel-flags b/config/intel-flags index 409ffe971a7..f46da0aa6da 100644 --- a/config/intel-flags +++ b/config/intel-flags @@ -78,26 +78,43 @@ if test "X-icc" = "X-$cc_vendor"; then # ;; #esac - # General + ########### + # General # + ########### + # Default to C99 standard. H5_CFLAGS="$H5_CFLAGS $arch -std=c99" - # Production + ############## + # Production # + ############## + PROD_CFLAGS= - # Debug + ######### + # Debug # + ######### + # NDEBUG is handled explicitly in configure DEBUG_CFLAGS= - # Symbols - SYMBOLS_CFLAGS="-g" + ########### + # Symbols # + ########### + NO_SYMBOLS_CFLAGS="-Wl,-s" + SYMBOLS_CFLAGS="-g" + + ############# + # Profiling # + ############# - # Profiling - # Use this for profiling with gprof PROFILE_CFLAGS="-p" - # Optimization + ################ + # Optimization # + ################ + HIGH_OPT_CFLAGS="-O3" DEBUG_OPT_CFLAGS="-O0" NO_OPT_CFLAGS="-O0" @@ -110,32 +127,51 @@ if test "X-icc" = "X-$cc_vendor"; then # General # ########### + # Add various general warning flags in intel-warnings. H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general)" + ###################### + # Developer warnings # + ###################### + + #NO_DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments no-developer-general) + #DEVELOPER_WARNING_CFLAGS=$(load_intel_arguments developer-general) + ############################# # Version-specific warnings # ############################# -case "$cc_vendor-$cc_version" in - icc-1[5-6]*) - H5_CFLAGS="$H5_CFLAGS -Wcomment -Wdeprecated -Wextra-tokens -Wformat -Wformat-security -Wmain -Wmissing-declarations -Wmissing-prototypes -Wp64 -Wpointer-arith -Wreturn-type -Wshadow -Wstrict-prototypes -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-variable -Wwrite-strings" - ;; - icc-10*) - HIGH_OPT_CFLAGS="-O1" - ;; - icc-8.0*) + # intel == 8.0 + if test $cc_vers_major -eq 8 -a $cc_vers_minor -eq 0; then # v8.0 -O3 infinite loops when compiling test/tselect.c. Use -O2. HIGH_OPT_CFLAGS="-O2" - ;; - icc-*) - ;; -esac + fi + + # intel == 10 + if test $cc_vers_major -eq 10; then + HIGH_OPT_CFLAGS="-O1" + fi + + # intel >= 15 + if test $cc_vers_major -ge 15; then + H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments 15)" + fi + + # intel >= 18 + if test $cc_vers_major -ge 18; then + H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments 18)" + fi + + # intel <= 19 + # this file has warnings only available before oneapi versions + if test $cc_vers_major -le 19; then + H5_CFLAGS="$H5_CFLAGS $(load_intel_arguments general-19)" + fi ################# # Flags are set # ################# cc_flags_set=yes - fi # Clear cc info if no flags set diff --git a/config/intel-warnings/15 b/config/intel-warnings/15 new file mode 100644 index 00000000000..6746f975736 --- /dev/null +++ b/config/intel-warnings/15 @@ -0,0 +1,19 @@ +-Wcomment +-Wdeprecated +-Wextra-tokens +-Wformat +-Wformat-security +-Wmain +-Wmissing-declarations +-Wmissing-prototypes +-Wp64 +-Wpointer-arith +-Wreturn-type +-Wshadow +-Wstrict-prototypes +-Wtrigraphs +-Wuninitialized +-Wunknown-pragmas +-Wunused-function +-Wunused-variable +-Wwrite-strings diff --git a/config/intel-warnings/18 b/config/intel-warnings/18 new file mode 100644 index 00000000000..565b47a4d85 --- /dev/null +++ b/config/intel-warnings/18 @@ -0,0 +1,8 @@ +-Wextra-tokens +-Wformat +-Wformat-security +-Wic-pointer +-Wshadow +-Wsign-compare +-Wtrigraphs +-Wwrite-strings diff --git a/config/intel-warnings/developer-general b/config/intel-warnings/developer-general new file mode 100644 index 00000000000..fae56f0acc8 --- /dev/null +++ b/config/intel-warnings/developer-general @@ -0,0 +1,4 @@ +-Winline +-Wreorder +-Wport +-Wstrict-aliasing diff --git a/config/intel-warnings/general b/config/intel-warnings/general index d0b2e25e997..bd866b6966d 100644 --- a/config/intel-warnings/general +++ b/config/intel-warnings/general @@ -1,2 +1 @@ -Wall --Wcheck \ No newline at end of file diff --git a/config/intel-warnings/general-19 b/config/intel-warnings/general-19 new file mode 100644 index 00000000000..e35af30213c --- /dev/null +++ b/config/intel-warnings/general-19 @@ -0,0 +1,2 @@ +# this is only available before oneapi versions +-Wcheck diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 0fef1616984..d952c4eeffb 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -199,9 +199,16 @@ if test -z "$CXX"; then CXX_BASENAME=g++ fi +# Figure out Intel CXX compiler flags +# Do this ahead of GNU to avoid icpc being detected as g++ +. $srcdir/config/intel-cxxflags + # Figure out GNU CXX compiler flags . $srcdir/config/gnu-cxxflags +# Figure out PGI CXX compiler flags +. $srcdir/config/pgi-cxxflags + # Figure out Clang CXX compiler flags . $srcdir/config/clang-cxxflags @@ -314,6 +321,9 @@ fi # check if the compiler_version_info is already set if test -z "$cxx_version_info"; then case $CXX in + *pgc++*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgc++'` + ;; *g++*) cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` @@ -322,10 +332,6 @@ case $CXX in cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` ;; - *pgCC*) - cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'` - ;; - *mpicxx*) cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep 'version' |\ sed 's/^[a-z0-9]* for //' |\ diff --git a/config/pgi-cxxflags b/config/pgi-cxxflags new file mode 100644 index 00000000000..5fc74ae24f4 --- /dev/null +++ b/config/pgi-cxxflags @@ -0,0 +1,100 @@ +# -*- shell-script -*- +# +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://www.hdfgroup.org/licenses. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. + + +# This file should be sourced into configure if the compiler is the +# PGI pgc++ compiler or a derivative. It is careful not to do anything +# if the compiler is not PGI; otherwise `cxx_flags_set' is set to `yes' +# + +# Get the compiler version in a way that works for pgc++ +# pgc++ unless a compiler version is already known +# +# cxx_vendor: The compiler name: pgc++ +# cxx_version: Version number: 5.0-2, 5.2-2 +# +if test X = "X$cxx_flags_set"; then + cxx_version="`$CXX $CXXFLAGS -V 2>&1 |grep '^pgc++ '`" + if test X != "X$cxx_version"; then + cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*++\).*/\1/'` + cxx_version=`echo $cxx_version |sed 's/pgc++ \([-a-z0-9\.\-]*\).*/\1/'` + echo "compiler '$CXX' is PGI $cxx_vendor-$cxx_version" + + # Some version numbers + # PGI version numbers are of the form: "major.minor-patch" + cxx_vers_major=`echo $cxx_version | cut -f1 -d.` + cxx_vers_minor=`echo $cxx_version | cut -f2 -d. | cut -f1 -d-` + cxx_vers_patch=`echo $cxx_version | cut -f2 -d. | cut -f2 -d-` + test -n "$cxx_vers_major" || cxx_vers_major=0 + test -n "$cxx_vers_minor" || cxx_vers_minor=0 + test -n "$cxx_vers_patch" || cxx_vers_patch=0 + cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch` + fi +fi + +# Common PGI flags for various situations +if test "X-pgc++" = "X-$cxx_vendor"; then + + ########### + # General # + ########### + + H5_CXXFLAGS="$H5_CXXFLAGS -Minform=warn" + + ############## + # Production # + ############## + + PROD_CXXFLAGS= + + ######### + # Debug # + ######### + + # NDEBUG is handled explicitly in configure + # -g is handled by the symbols flags + DEBUG_CXXFLAGS="-Mbounds" + + ########### + # Symbols # + ########### + + NO_SYMBOLS_CXXFLAGS="-s" + SYMBOLS_CXXFLAGS="-g" + + ############# + # Profiling # + ############# + + PROFILE_CXXFLAGS="-Mprof=func,line" + # Use this for profiling with gprof + #PROFILE_CXXFLAGS="-pg" + + ################ + # Optimization # + ################ + + HIGH_OPT_CXXFLAGS="-O4" + DEBUG_OPT_CXXFLAGS="-gopt -O2" + NO_OPT_CXXFLAGS="-O0" + + ################# + # Flags are set # + ################# + cxx_flags_set=yes +fi + +# Clear cxx info if no flags set +if test "X-$cxx_flags_set" = "X-"; then + cxx_vendor= + cxx_version= +fi diff --git a/config/pgi-fflags b/config/pgi-fflags index 31716955172..6401d8dd5b0 100644 --- a/config/pgi-fflags +++ b/config/pgi-fflags @@ -1,4 +1,4 @@ -# -*- shell-script -*- +# -*- shell-script -*- # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -45,11 +45,12 @@ fi # Common PGI flags for various situations if test "X-pgf90" = "X-$f9x_vendor"; then - # Insert section about version specific problems from gnu-flags here, if - # necessary. + + ############################### + # Architecture-specific flags # + ############################### arch= - # Architecture-specific flags # Nothing currently. (Uncomment code below and modify to add any) #case "$host_os-$host_cpu" in # *-i686) @@ -65,15 +66,10 @@ if test "X-pgf90" = "X-$f9x_vendor"; then # ;; #esac - # General - FC_BASENAME=pgf90 - Fortran_COMPILER_ID=PGI - F9XSUFFIXFLAG="" - FSEARCH_DIRS="" - # Uncomment the following to add something specific for FCFLAGS. - #FCFLAGS="$FCFLAGS" + ############## + # Production # + ############## - # Production # Check for MPI wrapper being used and tweak down compiler options # Comment out the Tweaking since it caused problems to mpich1.2.6. # Need to investigate the reasons to tweak. @@ -84,24 +80,55 @@ if test "X-pgf90" = "X-$f9x_vendor"; then #fi PROD_FCFLAGS="-fast -Mnoframe" - # Debug + ######### + # Debug # + ######### + DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk" - # Symbols - SYMBOLS_FCFLAGS="-g" + ########### + # Symbols # + ########### + NO_SYMBOLS_FCFLAGS="-s" + SYMBOLS_FCFLAGS="-g" + + ############# + # Profiling # + ############# - # Profiling PROFILE_FCFLAGS="-Mprof=func,line" # Use this for profiling with gprof #PROFILE_FCFLAGS="-pg" - # Optimization + ################ + # Optimization # + ################ + HIGH_OPT_FCFLAGS= DEBUG_OPT_FCFLAGS= NO_OPT_FCFLAGS= - # Flags are set + ############ + # Warnings # + ############ + + ########### + # General # + ########### + + FC_BASENAME=pgf90 + Fortran_COMPILER_ID=PGI + F9XSUFFIXFLAG="" + FSEARCH_DIRS="" + # Uncomment the following to add something specific for FCFLAGS. + #FCFLAGS="$FCFLAGS" + + + + ################# + # Flags are set # + ################# f9x_flags_set=yes fi @@ -111,4 +138,3 @@ if test "X-$f9x_flags_set" = "X-"; then f9x_version= fi - diff --git a/config/pgi-flags b/config/pgi-flags index e1bec000486..b197a1ce7f3 100644 --- a/config/pgi-flags +++ b/config/pgi-flags @@ -1,4 +1,4 @@ -# -*- shell-script -*- +# -*- shell-script -*- # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -45,8 +45,8 @@ fi # Common PGI flags for various situations if test "X-pgcc" = "X-$cc_vendor"; then - # Insert section about version specific problems from gnu-flags here, if - # necessary. + # Insert section about version specific problems from compiler flags here, + # if necessary. arch= # Architecture-specific flags @@ -65,58 +65,59 @@ if test "X-pgcc" = "X-$cc_vendor"; then # ;; #esac - # General - H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=inform" - - # Production - case "$cc_vendor-$cc_version" in - pgcc-10.6*) - PROD_CFLAGS= - ;; - pgcc-9.*) - PROD_CFLAGS= - ;; - *) - PROD_CFLAGS="-fast" - ;; - esac - - # Debug + ########### + # General # + ########### + + # Default to C99 standard. + H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn" + + ############## + # Production # + ############## + + # NDEBUG is handled explicitly by the configure script + PROD_CFLAGS="-fast" + + ######### + # Debug # + ######### + # NDEBUG is handled explicitly by the configure script + # -g is handled by the symbols flags DEBUG_CFLAGS="-Mbounds" - # Symbols - SYMBOLS_CFLAGS="-g" + ########### + # Symbols # + ########### + NO_SYMBOLS_CFLAGS="-s" + SYMBOLS_CFLAGS="-g" + + ############# + # Profiling # + ############# - # Profiling PROFILE_CFLAGS="-Mprof=func,line" # Use this for profiling with gprof #PROFILE_CFLAGS="-pg" - # Optimization - case "$cc_vendor-$cc_version" in - # Tweak down compiler optimizations for v10.6, it has a bug - pgcc-10.6*) - HIGH_OPT_CFLAGS="-O1" - ;; - # Tweak down compiler optimizations for v9.x - pgcc-9.*) - HIGH_OPT_CFLAGS="-O1" - ;; - *) - HIGH_OPT_CFLAGS= - ;; - esac - DEBUG_OPT_CFLAGS= - NO_OPT_CFLAGS= - - # Flags are set + ################ + # Optimization # + ################ + + HIGH_OPT_CFLAGS="-O4" + DEBUG_OPT_CFLAGS="-gopt -O2" + NO_OPT_CFLAGS="-O0" + + ################# + # Flags are set # + ################# cc_flags_set=yes fi # Clear cc info if no flags set if test "X-$cc_flags_set" = "X-"; then - cc_vendor= - cc_version= + cc_vendor= + cc_version= fi From 8e1e7a082108d26547a9ff880b42cb6916a8d74c Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 16 Jun 2021 17:21:31 -0500 Subject: [PATCH 62/66] Fix cmake configure path --- config/cmake/ConfigureChecks.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 6f005ad683c..1ded895cd77 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -241,6 +241,7 @@ endif () # The provided CMake C macros don't provide a general compile/run function # so this one is used. #----------------------------------------------------------------------------- +set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR}) macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") message (VERBOSE "Detecting C ${FUNCTION_NAME}") @@ -318,7 +319,7 @@ set (PROG_SRC ) C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES) -file (READ "${CMAKE_BINARY_DIR}/pac_Cconftest.out" PROG_OUTPUT4) +file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_Cconftest.out" PROG_OUTPUT4) message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}") # dnl The output from the above program will be: From 488b74bbe4df5dd659c4459ac99a3b7d15406dce Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 21 Jun 2021 09:21:04 -0500 Subject: [PATCH 63/66] Update missing release note info. --- release_docs/RELEASE.txt | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 56db6294f7b..7838600159c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -49,6 +49,30 @@ New Features Configuration: ------------- + - Adds C++ Autotools configuration file for Intel + + * Checks for icpc as the compiler + * Copies most non-warning flags from intel-flags + + (DER - 2021/06/02) + + - Adds C++ Autotools configuration file for PGI + + * Checks for pgc++ as the compiler name (was: pgCC) + * Other options basically match new C options (below) + + (DER - 2021/06/02) + + - Updates PGI C options + + * -Minform set to warn (was: inform) to suppress spurious messages + * Sets -gopt -O2 as debug options + * Sets -O4 as 'high optimization' option + * Sets -O0 as 'no optimization' option + * Removes specific settings for PGI 9 and 10 + + (DER - 2021/06/02) + - CMake no longer builds the C++ library by default HDF5_BUILD_CPP_LIB now defaults to OFF, which is in line with the @@ -84,7 +108,7 @@ New Features To do so, set CMAKE_OSX_ARCHITECTURES="x86_64;arm64" - (SAM - 2021/02/07, https://github.com/HDFGroup/hdf5/issues/311) + (SAM - 2021/02/07, github-311) - Added a configure-time option to control certain compiler warnings diagnostics @@ -179,7 +203,7 @@ New Features CMake target is 'doxygen' for all available doxygen targets CMake target is 'hdf5lib_doc' for the src subdirectory - (ADB - 2020/11/13) + (ADB - 2020/11/13, HDFFV-11243) - CMake option to use MSVC naming conventions with MinGW From f07d7cd29ecd8b14a8dfcafbde3c8254413d8f9f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 21 Jun 2021 09:25:58 -0500 Subject: [PATCH 64/66] Update code owners --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a80d51cc265..107aeb273f0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -19,7 +19,7 @@ CMakeTests.* @byrnHDF @derobins /doc/ @gnuoyd @jrmainzer -/examples/ @lrknox @derobins @bljhdf +/examples/ @lrknox @derobins @bmribler /fortran/ @brtnfld @epourmal @@ -29,7 +29,7 @@ CMakeTests.* @byrnHDF @derobins /m4/ @lrknox @derobins -/release_docs/ @lrknox @bljhdf @byrnHDF +/release_docs/ @lrknox @bmribler @byrnHDF /src/ @jhendersonHDF @derobins @fortnern @soumagne @vchoi-hdfgroup @jrmainzer From 97e1f4ecd4ba4c57406721272e704ca23e0a622a Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 Jun 2021 08:11:54 -0500 Subject: [PATCH 65/66] Add known problem --- release_docs/RELEASE.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 7838600159c..26f741ee630 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -712,6 +712,9 @@ Known Problems CPP ptable test fails on both VS2017 and VS2019 with Intel compiler, JIRA issue: HDFFV-10628. This test will pass with VS2015 with Intel compiler. + The subsetting option in ph5diff currently will fail and should be avoided. + The subsetting option works correctly in serial h5diff. + Known problems in previous releases can be found in the HISTORY*.txt files in the HDF5 source. Please report any new problems found to help@hdfgroup.org. From 1537925ae46f63d8439474423b141ed40c833cb6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 Jun 2021 14:56:38 -0500 Subject: [PATCH 66/66] Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD --- c++/test/CMakeVFDTests.cmake | 2 +- test/CMakeVFDTests.cmake | 2 +- testpar/CMakeVFDTests.cmake | 2 +- tools/test/h5copy/CMakeLists.txt | 2 +- tools/test/h5diff/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeVFDTests.cmake | 2 +- tools/test/h5ls/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeLists.txt | 4 ++-- tools/test/h5repack/CMakeVFDTests.cmake | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake index 70556ba741b..f1c67999038 100644 --- a/c++/test/CMakeVFDTests.cmake +++ b/c++/test/CMakeVFDTests.cmake @@ -25,7 +25,7 @@ set (VFD_LIST family ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif () diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index dada9a90a8c..892ccf361fe 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -26,7 +26,7 @@ set (VFD_LIST multi family ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif () diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake index 8c076fd625a..8947a293b8e 100644 --- a/testpar/CMakeVFDTests.cmake +++ b/testpar/CMakeVFDTests.cmake @@ -29,7 +29,7 @@ set (H5P_VFD_TESTS t_pflush2 ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif () diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index f76a65ef153..f63eb847601 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -32,7 +32,7 @@ if (BUILD_SHARED_LIBS) add_library (${H5COPY_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c) target_include_directories (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5COPY_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5COPY_TOOL_PLUGIN_LIB_TARGET} ${H5COPY_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") #----------------------------------------------------------------------------- diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index 9349ace9e11..f74db0f0fe9 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -32,7 +32,7 @@ if (BUILD_SHARED_LIBS) add_library (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) target_include_directories (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} ${H5DIFF_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") #----------------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index 242465eb575..a7b4846cc29 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -12,7 +12,7 @@ if (BUILD_SHARED_LIBS) add_library (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c) target_include_directories (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} ${H5DUMP_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") #----------------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake index 014790f055b..01834b3aa87 100644 --- a/tools/test/h5dump/CMakeVFDTests.cmake +++ b/tools/test/h5dump/CMakeVFDTests.cmake @@ -26,7 +26,7 @@ set (VFD_H5DUMP_LIST family ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_H5DUMP_LIST ${VFD_H5DUMP_LIST} direct) endif () diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index ee223b83f5f..ba6e4688399 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -12,7 +12,7 @@ if (BUILD_SHARED_LIBS) add_library (${H5LS_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c) target_include_directories (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5LS_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5LS_TOOL_PLUGIN_LIB_TARGET} ${H5LS_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 26db85a4a6f..0b907504b0f 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -54,13 +54,13 @@ if (BUILD_SHARED_LIBS) add_library (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) target_include_directories (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} ${H5REPACK_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") add_library (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c) target_include_directories (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") TARGET_C_PROPERTIES (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} SHARED) - target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} ${H5REPACK_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB") #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake index 27bc1996c83..7eea4cc0833 100644 --- a/tools/test/h5repack/CMakeVFDTests.cmake +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -25,7 +25,7 @@ set (VFD_LIST family ) -if (DIRECT_VFD) +if (H5_HAVE_DIRECT) set (VFD_LIST ${VFD_LIST} direct) endif ()